Commit c7e6b584 authored by Stefan Brüns's avatar Stefan Brüns

[Bookmarks Runner] Remove unused database parameter from query

Summary:
The query is no longer initialized for each query, just once, thus there
no longer is a need for the database parameter.

Test Plan: make

Reviewers: #frameworks, davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15490
parent 984b2832
......@@ -39,8 +39,7 @@
class StaticQuery : public BuildQuery {
public:
StaticQuery(const QString &query) : m_query(query) {}
QString query(QSqlDatabase *database) const override {
Q_UNUSED(database);
QString query() const override {
return m_query;
}
private:
......
......@@ -67,7 +67,7 @@ void FetchSqlite::teardown()
QList<QVariantMap> FetchSqlite::query(BuildQuery *buildQuery, QMap<QString, QVariant> bindObjects)
{
return query(buildQuery->query(&m_db), bindObjects);
return query(buildQuery->query(), bindObjects);
}
QList<QVariantMap> FetchSqlite::query(const QString &sql, QMap<QString, QVariant> bindObjects)
......
......@@ -33,7 +33,7 @@
class BuildQuery {
public:
virtual QString query(QSqlDatabase *database) const = 0;
virtual QString query() const = 0;
virtual ~BuildQuery() {}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment