summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-09-20 11:37:26 +0200
committerLiang Qi <liang.qi@qt.io>2017-09-20 11:58:32 +0200
commit01bc69f99f189b03d0b9cad77cc300798937cad1 (patch)
tree730f3b691cfc1830ec617b3c2ad8df16180de724 /src/sql
parentc23c4a921d0e9e2d18a62af82d38ca27eac7bcb3 (diff)
parent6d699d08200b1fe3a616dfbc275d46c98b77fcbd (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsqldatabase.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index bca981a865..14374c7ca9 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -365,6 +365,14 @@ void QSqlDatabasePrivate::disable()
cloneDatabase() to create an independent database connection based
on an existing one.
+ \warning It is highly recommended that you do not keep a copy of the
+ QSqlDatabase around as a member of a class, as this will prevent the
+ instance from being correctly cleaned up on shutdown. If you need to
+ access an existing QSqlDatabase, it should be accessed with database().
+ If you chose to have a QSqlDatabase member variable, this needs to be
+ deleted before the QCoreApplication instance is deleted, otherwise it
+ may lead to undefined behavior.
+
If you create multiple database connections, specify a unique
connection name for each one, when you call addDatabase(). Use
database() with a connection name to get that connection. Use