summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorUwe Klotz <uwe_klotz@web.de>2017-06-17 13:52:59 +0200
committerUwe Klotz <uwe_klotz@web.de>2017-06-17 13:52:59 +0200
commita83585bf2234f65cd1d41a42885673d2123dcc77 (patch)
treeaf89cc7d32dd7d2c7c5fae36fc77bf12dc94292a /src/util
parentc1823edc3f3db362ae75e116c5c9a63dff45f49c (diff)
Move initialization of database from Library to MainWindow
Diffstat (limited to 'src/util')
-rw-r--r--src/util/db/dbconnectionpool.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/util/db/dbconnectionpool.h b/src/util/db/dbconnectionpool.h
index 5ce3049507..d52e467635 100644
--- a/src/util/db/dbconnectionpool.h
+++ b/src/util/db/dbconnectionpool.h
@@ -33,14 +33,16 @@ class DbConnectionPool final {
const DbConnection::Params& params,
const QString& connectionName);
+ // Prefer to use DbConnectionPooler instead of the
+ // following functions. Only if there is no appropriate
+ // scoping possible then use these functions directly.
+ bool createThreadLocalConnection();
+ void destroyThreadLocalConnection();
+
private:
DbConnectionPool(const DbConnectionPool&) = delete;
DbConnectionPool(const DbConnectionPool&&) = delete;
- friend class DbConnectionPooler;
- bool createThreadLocalConnection();
- void destroyThreadLocalConnection();
-
// Returns a database connection for the current thread, that has
// previously been created by instantiating DbConnectionPooler. The
// returned connection is only valid within the current thread! It