diff options
| author | 2023-04-30 18:30:36 -0400 | |
|---|---|---|
| committer | 2023-04-30 18:30:36 -0400 | |
| commit | 3565aad630864ecdbe53fdaa501ea708555b3c7c (patch) | |
| tree | c743e4ad0bad39ebdb2f514c7cc52d34a257ebbe /SQLiteStudio3/coreSQLiteStudio/plugins/dbpluginsqlite3.cpp | |
| parent | 1fdc150116cad39aae5c5da407c3312b47a59e3a (diff) | |
New upstream version 3.4.4+dfsg.upstream/3.4.4+dfsg
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/plugins/dbpluginsqlite3.cpp')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/plugins/dbpluginsqlite3.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/dbpluginsqlite3.cpp b/SQLiteStudio3/coreSQLiteStudio/plugins/dbpluginsqlite3.cpp index 4a19489..854e7b4 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/dbpluginsqlite3.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/dbpluginsqlite3.cpp @@ -10,6 +10,9 @@ Db* DbPluginSqlite3::getInstance(const QString& name, const QString& path, const if (!db->openForProbing()) { + if (errorMessage) + *errorMessage = db->getErrorText(); + delete db; return nullptr; } @@ -17,9 +20,13 @@ Db* DbPluginSqlite3::getInstance(const QString& name, const QString& path, const SqlQueryPtr results = db->exec("SELECT * FROM sqlite_master"); if (results->isError()) { + if (errorMessage) + *errorMessage = db->getErrorText(); + delete db; return nullptr; } + results.clear(); db->closeQuiet(); return db; |
