aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2020-02-26 09:35:10 +0100
committerJan Arve Sæther <jan-arve.saether@qt.io>2020-02-28 17:08:36 +0100
commitd8f6f41c334d14c4712b1dc16554f80bb1290e24 (patch)
tree36b5b4258724eabca5e2e2c23debae18600ee36d
parent8319597ae30219c71aef9d2086e8e8294802686c (diff)
Deprecate non-const version of saveToFile()
It will be removed in Qt 6 Change-Id: I7d8853ce3008bb2c594caa5a23e2964158717fe4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/quick/items/qquickitemgrabresult.cpp2
-rw-r--r--src/quick/items/qquickitemgrabresult.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/items/qquickitemgrabresult.cpp b/src/quick/items/qquickitemgrabresult.cpp
index f298803c7f..00e84536e9 100644
--- a/src/quick/items/qquickitemgrabresult.cpp
+++ b/src/quick/items/qquickitemgrabresult.cpp
@@ -195,6 +195,7 @@ bool QQuickItemGrabResult::saveToFile(const QString &fileName) const
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
* \overload
* \internal
@@ -203,6 +204,7 @@ bool QQuickItemGrabResult::saveToFile(const QString &fileName)
{
return qAsConst(*this).saveToFile(fileName);
}
+#endif
#endif // < Qt 6
QUrl QQuickItemGrabResult::url() const
diff --git a/src/quick/items/qquickitemgrabresult.h b/src/quick/items/qquickitemgrabresult.h
index c92a8c52f4..a45ed62ed5 100644
--- a/src/quick/items/qquickitemgrabresult.h
+++ b/src/quick/items/qquickitemgrabresult.h
@@ -68,7 +68,10 @@ public:
QUrl url() const;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- Q_INVOKABLE bool saveToFile(const QString &fileName); // ### Qt 6: remove
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("This overload is deprecated. Use the const member function instead")
+ Q_INVOKABLE bool saveToFile(const QString &fileName);
+#endif
#endif
Q_INVOKABLE bool saveToFile(const QString &fileName) const;