mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Fix loading folder from sql query
This commit is contained in:
parent
880e17acff
commit
6ba6adb26f
@ -1658,6 +1658,7 @@ void DBHelper::readFolderFromQuery(Folder &folder, QSqlQuery &query)
|
|||||||
{
|
{
|
||||||
QSqlRecord record = query.record();
|
QSqlRecord record = query.record();
|
||||||
|
|
||||||
|
int id = record.indexOf("id");
|
||||||
int parentId = record.indexOf("parentId");
|
int parentId = record.indexOf("parentId");
|
||||||
int name = record.indexOf("name");
|
int name = record.indexOf("name");
|
||||||
int path = record.indexOf("path");
|
int path = record.indexOf("path");
|
||||||
@ -1672,6 +1673,7 @@ void DBHelper::readFolderFromQuery(Folder &folder, QSqlQuery &query)
|
|||||||
int updated = record.indexOf("updated");
|
int updated = record.indexOf("updated");
|
||||||
|
|
||||||
if (query.next()) {
|
if (query.next()) {
|
||||||
|
folder.id = query.value(id).toULongLong();
|
||||||
folder.parentId = query.value(parentId).toULongLong();
|
folder.parentId = query.value(parentId).toULongLong();
|
||||||
folder.name = query.value(name).toString();
|
folder.name = query.value(name).toString();
|
||||||
folder.path = query.value(path).toString();
|
folder.path = query.value(path).toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user