From 6438c9210f2103c7a9b8e9b297bf913fe0197689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 12 Jan 2021 18:41:09 +0100 Subject: [PATCH] Move query execution and model setup to the right scope --- YACReaderLibrary/db/comic_model.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/YACReaderLibrary/db/comic_model.cpp b/YACReaderLibrary/db/comic_model.cpp index d41b7806..59fa9887 100644 --- a/YACReaderLibrary/db/comic_model.cpp +++ b/YACReaderLibrary/db/comic_model.cpp @@ -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(); }