mirror of
https://github.com/YACReader/yacreader
synced 2025-07-27 01:15:07 -04:00
added new view for empty folders in YACReaderLibrary that shows a list with all the subfolders
TODO ?use a special case for the root folder?
This commit is contained in:
@ -671,5 +671,18 @@ ComicInfo DBHelper::loadComicInfo(QString hash, QSqlDatabase & db)
|
||||
else
|
||||
comicInfo.existOnDb = false;
|
||||
|
||||
return comicInfo;
|
||||
return comicInfo;
|
||||
}
|
||||
|
||||
QList<QString> DBHelper::loadSubfoldersNames(qulonglong folderId, QSqlDatabase &db)
|
||||
{
|
||||
QList<QString> result;
|
||||
QSqlQuery selectQuery(db);
|
||||
selectQuery.prepare("SELECT name FROM folder WHERE parentId = :parentId AND id <> 1"); //do not select the root folder
|
||||
selectQuery.bindValue(":parentId", folderId);
|
||||
selectQuery.exec();
|
||||
while(selectQuery.next()){
|
||||
result << selectQuery.record().value("name").toString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user