summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-25 01:00:25 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-25 11:30:04 +0100
commit58c69df4d38324644bc49ec5f42ee8343a454b2d (patch)
treede0a1ce603292dcaff134d4e1e8ab064295515a2 /src/sql
parent03b1d2c44940322208c12c7bceee376b51d8e852 (diff)
parent59a705e3710b0ba93bb698e3223241cfac932948 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsqlquery.cpp3
-rw-r--r--src/sql/models/qsqltablemodel.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp
index 8947ed1084..ce6c997919 100644
--- a/src/sql/kernel/qsqlquery.cpp
+++ b/src/sql/kernel/qsqlquery.cpp
@@ -182,6 +182,9 @@ QSqlQueryPrivate::~QSqlQueryPrivate()
You can retrieve the values of all the fields in a single variable
(a map) using boundValues().
+ \note Not all SQL operations support binding values. Refer to your database
+ system's documentation to check their availability.
+
\section1 Approaches to Binding Values
Below we present the same example using each of the four
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index d6810cc6af..4d20915c09 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -1305,7 +1305,7 @@ Qt::ItemFlags QSqlTableModel::flags(const QModelIndex &index) const
Q_D(const QSqlTableModel);
if (index.internalPointer() || index.column() < 0 || index.column() >= d->rec.count()
|| index.row() < 0)
- return 0;
+ return { };
bool editable = true;