summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2018-09-12 10:04:39 +0200
committerFlorian Bruhin <qt-project.org@the-compiler.org>2018-09-13 18:18:47 +0000
commit49efea26a5fae8c2275999c36c7c8d24cf4125de (patch)
tree88a829c298dc72a5938e0ec7c51b62877375dd22 /src/plugins/platforms/xcb/qxcbconnection.h
parent45c1473847ad65c4d43f9a605a86439867442883 (diff)
sqlite: Fix QSqlError handling when opening/closing database
Both sqlite3_open_v2 and sqlite3_close are documented to return an error code: https://www.sqlite.org/c3ref/open.html https://sqlite.org/c3ref/close.html However, those were ignored (other than checking whether the operation succeeded), causing QSqlError::nativeErrorCode() to always be "-1" when there was an error while opening/closing the database. Additionally, the error string needs to be read (via sqlite3_errmsg16) in qMakeError *before* d->access is set to 0, or the databaseText() will always be "out of memory" no matter what error actually happened. Task-number: QTBUG-70506 Change-Id: I75cbf178c9711442e640afd26c4502214d20c598 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
0 files changed, 0 insertions, 0 deletions