From ec9a8c1925799cd554111d30ff6d1a841a4e7de6 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Thu, 21 Jul 2022 17:56:09 +0200 Subject: [PATCH] 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 Reviewed-by: Giuseppe D'Angelo (cherry picked from commit 7ba39fff8d9d6c8b6d7629c599dd57d14a379cec) Reviewed-by: Qt Cherry-pick Bot --- src/sql/models/qsqlquerymodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp index b45b08eb476..61620f81d45 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