From cef02b4f611f5f581932d67e0919c33158161d1c Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 5 Dec 2010 12:53:12 +0000 Subject: [PATCH] Fix database test --- src/core/database.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/database.cpp b/src/core/database.cpp index 3992745f7..3963f5e63 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -410,7 +410,10 @@ QSqlDatabase Database::Connect() { // Attach external databases foreach (const QString& key, attached_databases_.keys()) { - const QString filename = attached_databases_[key].filename_; + QString filename = attached_databases_[key].filename_; + + if (!injected_database_name_.isNull()) + filename = injected_database_name_; // Attach the db QSqlQuery q("ATTACH DATABASE :filename AS :alias", db);