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

Method reorderingChildren

YACReaderLibrary/db/reading_list_model.cpp:716–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714}
715
716void ReadingListModel::reorderingChildren(QList<ReadingListItem *> children)
717{
718 QList<qulonglong> childrenIds;
719 int i = 0;
720 for (auto *item : children) {
721 item->setOrdering(i++);
722 childrenIds << item->getId();
723 }
724 QString connectionName = "";
725 {
726 QSqlDatabase db = DataBaseManagement::loadDatabase(_databasePath);
727 DBHelper::reasignOrderToSublists(childrenIds, db);
728 connectionName = db.connectionName();
729 }
730 QSqlDatabase::removeDatabase(connectionName);
731}
732
733bool ReadingListModel::rowIsSpecialList(int row, const QModelIndex &parent) const
734{

Callers

nothing calls this directly

Calls 2

setOrderingMethod · 0.80
getIdMethod · 0.45

Tested by

no test coverage detected