Fix color loading for labels.

This commit is contained in:
Luis Ángel San Martín 2018-04-26 22:18:12 +02:00
parent 4deec13cff
commit dc992edb55

View File

@ -952,7 +952,9 @@ void DBHelper::insertComicsInFavorites(const QList<ComicDB> &comicsList, QSqlDat
query.bindValue(":ordering", numComics++); query.bindValue(":ordering", numComics++);
query.exec(); query.exec();
} }
QLOG_TRACE() << query.lastError();
db.commit(); db.commit();
} }
@ -976,7 +978,9 @@ void DBHelper::insertComicsInLabel(const QList<ComicDB> &comicsList, qulonglong
query.bindValue(":ordering", numComics++); query.bindValue(":ordering", numComics++);
query.exec(); query.exec();
} }
QLOG_TRACE() << query.lastError();
db.commit(); db.commit();
} }
@ -1272,7 +1276,7 @@ QList<Label> DBHelper::getLabels(qulonglong libraryId)
{ {
Label item(selectQuery.value(name).toString(), Label item(selectQuery.value(name).toString(),
selectQuery.value(id).toLongLong(), selectQuery.value(id).toLongLong(),
static_cast<YACReader::LabelColors>(selectQuery.value(color).toInt())); static_cast<YACReader::LabelColors>(selectQuery.value(ordering).toInt()));
if(labels.isEmpty()) if(labels.isEmpty())
{ {