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

Method setupReadingListsData

YACReaderLibrary/db/reading_list_model.cpp:355–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355void ReadingListModel::setupReadingListsData(QString path)
356{
357 beginResetModel();
358
359 cleanAll();
360
361 _databasePath = path;
362 QString connectionName = "";
363 {
364 QSqlDatabase db = DataBaseManagement::loadDatabase(path);
365
366 // setup special lists
367 specialLists = setupSpecialLists(db);
368
369 // separator--------------------------------------------
370
371 // setup labels
372 setupLabels(db);
373
374 // separator--------------------------------------------
375
376 // setup reading list
377 setupReadingLists(db);
378
379 connectionName = db.connectionName();
380 }
381 QSqlDatabase::removeDatabase(connectionName);
382
383 endResetModel();
384}
385
386void ReadingListModel::addNewLabel(const QString &name, YACReader::LabelColors color)
387{

Callers 1

loadLibraryMethod · 0.80

Calls 4

insertMethod · 0.45
getIdMethod · 0.45
nextMethod · 0.45
appendChildMethod · 0.45

Tested by

no test coverage detected