summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-07-21 17:56:09 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-10 21:17:06 +0000
commitec9a8c1925799cd554111d30ff6d1a841a4e7de6 (patch)
tree03f194a36598b394cacfaa52a1280451281c1f2f
parente215d4d987e8341f02bba0d544e720f4a448565d (diff)
QSqlQueryModel: guard the definition of deprecated method
... to prevent compilation errors when built with QT_DISABLE_DEPRECATED_BEFORE >= 0x060200 This commit amends 14f9f00fdb2dc428610c08e3d9d03e38e9602166 Task-number: QTBUG-105048 Change-Id: I33c586508353ccb4c0af3f5da0cdaf9abe9f590e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 7ba39fff8d9d6c8b6d7629c599dd57d14a379cec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/sql/models/qsqlquerymodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp
index b45b08eb47..61620f81d4 100644
--- a/src/sql/models/qsqlquerymodel.cpp
+++ b/src/sql/models/qsqlquerymodel.cpp
@@ -384,7 +384,7 @@ void QSqlQueryModel::queryChange()
// do nothing
}
-
+#if QT_DEPRECATED_SINCE(6, 2)
/*!
\deprecated [6.2] Use the \c{setQuery(QSqlQuery &&query)} overload instead.
\overload
@@ -396,6 +396,7 @@ void QSqlQueryModel::setQuery(const QSqlQuery &query)
QT_IGNORE_DEPRECATIONS(QSqlQuery copy = query;)
setQuery(std::move(copy));
}
+#endif // QT_DEPRECATED_SINCE(6, 2)
/*!
Resets the model and sets the data provider to be the given \a