summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Brüns <[email protected]>2018-09-09 19:55:41 +0200
committerStefan Brüns <[email protected]>2018-09-14 00:27:22 +0200
commit0ac6c595389c1a6e93a3dcada70008b0528f5229 (patch)
tree873de5496e0ae7fe14747f2cb5262692154e5f63
parentbedf66c2a0ca23eb485e10c77f2fd28732259164 (diff)
[Bookmarks Runner] Expose list of tables from FetchSqlite
Summary: This is a preparatory patch required for further rework Test Plan: make Reviewers: #frameworks, davidedmundson Reviewed By: davidedmundson Subscribers: davidedmundson, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D15488
-rw-r--r--runners/bookmarks/fetchsqlite.cpp7
-rw-r--r--runners/bookmarks/fetchsqlite.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/runners/bookmarks/fetchsqlite.cpp b/runners/bookmarks/fetchsqlite.cpp
index fff570e..ce6cb74 100644
--- a/runners/bookmarks/fetchsqlite.cpp
+++ b/runners/bookmarks/fetchsqlite.cpp
@@ -100,3 +100,10 @@ QList<QVariantMap> FetchSqlite::query(const QString &sql, QMap<QString, QVariant
}
return result;
}
+
+QStringList FetchSqlite::tables(QSql::TableType type)
+{
+ QMutexLocker lock(&m_mutex);
+
+ return m_db.tables(type);
+}
diff --git a/runners/bookmarks/fetchsqlite.h b/runners/bookmarks/fetchsqlite.h
index 1df9a7d..7f3fc71 100644
--- a/runners/bookmarks/fetchsqlite.h
+++ b/runners/bookmarks/fetchsqlite.h
@@ -48,6 +48,7 @@ public:
QList<QVariantMap> query(const QString &sql, QMap<QString,QVariant> bindObjects);
QList<QVariantMap> query(BuildQuery *buildQuery, QMap<QString,QVariant> bindObjects);
QList<QVariantMap> query(const QString &sql);
+ QStringList tables(QSql::TableType type = QSql::Tables);
private:
QString const m_databaseFile;