summaryrefslogtreecommitdiffstats
path: root/src/analyzer/analyzerqueue.cpp
diff options
context:
space:
mode:
authorUwe Klotz <uwe_klotz@web.de>2017-06-22 07:39:16 +0200
committerUwe Klotz <uwe_klotz@web.de>2017-06-22 07:40:15 +0200
commit2ce4adbd09fb7a26f58d11b0a80a1d308486534d (patch)
tree58ed93706a8f1408f86bb48151e5a6efaed2f435 /src/analyzer/analyzerqueue.cpp
parent4aedce29dc78d4692f06489a95cf479cc7cb27be (diff)
Test move semantics of DbConnectionPooler
Diffstat (limited to 'src/analyzer/analyzerqueue.cpp')
-rw-r--r--src/analyzer/analyzerqueue.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/analyzer/analyzerqueue.cpp b/src/analyzer/analyzerqueue.cpp
index ceba67a124..26f7da95fc 100644
--- a/src/analyzer/analyzerqueue.cpp
+++ b/src/analyzer/analyzerqueue.cpp
@@ -311,14 +311,16 @@ void AnalyzerQueue::execThread() {
// m_pAnalysisDao remains null if no analyzer needs database access.
// Currently only waveform analyses makes use of it.
if (m_pAnalysisDao) {
- dbConnectionPooler = mixxx::DbConnectionPooler(m_pDbConnectionPool);
- if (!dbConnectionPooler) {
+ dbConnectionPooler = mixxx::DbConnectionPooler(m_pDbConnectionPool); // move assignment
+ if (!dbConnectionPooler.isPooling()) {
kLogger.warning()
- << "Failed to open database connection for analyzer queue thread";
+ << "Failed to obtain database connection for analyzer queue thread";
return;
}
// Obtain and use the newly created database connection within this thread
- m_pAnalysisDao->initialize(mixxx::DbConnectionPooled(m_pDbConnectionPool));
+ QSqlDatabase dbConnection = mixxx::DbConnectionPooled(m_pDbConnectionPool);
+ DEBUG_ASSERT(dbConnection.isOpen());
+ m_pAnalysisDao->initialize(dbConnection);
}
m_progressInfo.current_track.reset();