Fix binding values to search query

This was broken while doing a rebase
This commit is contained in:
Luis Ángel San Martín 2021-01-08 16:59:17 +01:00
parent 8efb9912ee
commit 255e51da86

View File

@ -717,17 +717,17 @@ void FolderModelProxy::setupFilteredModelData()
QLOG_ERROR() << "not implemented"; QLOG_ERROR() << "not implemented";
break; break;
} }
selectQuery.prepare(queryString.c_str());
result.bindValues(selectQuery);
selectQuery.exec();
QLOG_DEBUG() << selectQuery.lastError() << "--";
setupFilteredModelData(selectQuery, rootItem);
} catch (const std::exception &e) { } catch (const std::exception &e) {
QLOG_ERROR() << "Unable to parse query: " << e.what(); QLOG_ERROR() << "Unable to parse query: " << e.what();
} }
selectQuery.prepare(queryString.c_str());
selectQuery.bindValues(selectQuery);
selectQuery.exec();
QLOG_DEBUG() << selectQuery.lastError() << "--";
setupFilteredModelData(selectQuery, rootItem);
} }
QSqlDatabase::removeDatabase(db.connectionName()); QSqlDatabase::removeDatabase(db.connectionName());