Move query execution and model setup to the right scope

This commit is contained in:
Luis Ángel San Martín 2021-01-12 18:41:09 +01:00
parent 255e51da86
commit 6438c9210f

View File

@ -637,6 +637,10 @@ void ComicModel::setupModelData(const SearchModifiers modifier, const QString &f
selectQuery.prepare(queryString.c_str());
selectQuery.bindValue(":limit", 500); //TODO, load this value from settings
result.bindValues(selectQuery);
selectQuery.exec();
setupModelData(selectQuery);
} catch (const std::exception &e) {
QLOG_ERROR() << "Unable to parse query: " << e.what();
}