diff options
author | Christian Ehrlicher <[email protected]> | 2024-07-17 19:22:22 +0200 |
---|---|---|
committer | Christian Ehrlicher <[email protected]> | 2024-07-18 22:25:53 +0200 |
commit | 9844da5036d7a7a185ddd4eb3fa59bc4ede9e5d7 (patch) | |
tree | 1a43691a06440cb279d5d5ead916a4e6c8b494fc | |
parent | 920dfb2f443042777ea9547ff7a8beef56e90d92 (diff) |
SQL/IBase: Don't let open() fail when lastError() is set
Since QSqlDriver::lastError() always contains the last error, it is not
a valid source to check if the last operation failed or not. Therefore
remove the check for lastError() when initializing the timezone mapping
- the function is optional since an old database might not contain the
timezone mapping table which is perfectly fine.
Pick-to: 6.8
Fixes: QTBUG-127175
Task-number: QTBUG-125467
Change-Id: I22ea75c004654cead9a4461d2eaccfcbe8a116be
Reviewed-by: Andreas Bacher <[email protected]>
Reviewed-by: Hamish Moffatt <[email protected]>
Reviewed-by: Axel Spoerl <[email protected]>
-rw-r--r-- | src/plugins/sqldrivers/ibase/qsql_ibase.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp index aefea6e93dd..e3c37630a9b 100644 --- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp +++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp @@ -1642,11 +1642,6 @@ bool QIBaseDriver::open(const QString &db, setOpenError(false); #if (FB_API_VER >= 40) std::call_once(initTZMappingFlag, [d](){ d->initTZMappingCache(); }); - if (lastError().isValid()) - { - setOpen(true); - return false; - } #endif return true; } |