diff options
author | Uwe Klotz <uwe_klotz@web.de> | 2017-06-17 13:52:59 +0200 |
---|---|---|
committer | Uwe Klotz <uwe_klotz@web.de> | 2017-06-17 13:52:59 +0200 |
commit | a83585bf2234f65cd1d41a42885673d2123dcc77 (patch) | |
tree | af89cc7d32dd7d2c7c5fae36fc77bf12dc94292a /src/util | |
parent | c1823edc3f3db362ae75e116c5c9a63dff45f49c (diff) |
Move initialization of database from Library to MainWindow
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/db/dbconnectionpool.h | 10 |
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 |