MCPcopy Create free account
hub / github.com/YACReader/yacreader / resetFolderCover

Method resetFolderCover

YACReaderLibrary/db/folder_model.cpp:733–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731}
732
733void FolderModel::resetFolderCover(const QModelIndex &index)
734{
735 QString connectionName = "";
736 {
737 QSqlDatabase db = DataBaseManagement::loadDatabase(_databasePath);
738 db.transaction();
739
740 auto item = static_cast<FolderItem *>(index.internalPointer());
741 item->setData(FolderModel::CustomImage, "");
742
743 Folder f = DBHelper::loadFolder(item->id, db);
744 f.customImage = "";
745 DBHelper::update(f, db);
746
747 db.commit();
748 connectionName = db.connectionName();
749 }
750 QSqlDatabase::removeDatabase(connectionName);
751
752 emit dataChanged(index, index);
753}
754
755QStringList FolderModel::getSubfoldersNames(const QModelIndex &mi)
756{

Callers

nothing calls this directly

Calls 1

setDataMethod · 0.45

Tested by

no test coverage detected