diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-10-12 10:34:03 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-10-12 08:34:01 +0000 |
commit | 37eb139a38ce45b41ee219d92dce40bb8d0c85df (patch) | |
tree | 4b394feeec91749eaf4fa7aefe8c16822e51db28 /src/quick/items/qquickitemgrabresult.h | |
parent | a7c0393b35f213c11e9a20ff773c368e929a63ab (diff) |
QQuickItemGrabResult: mark saveToFile() as const
This method does not modify the object.
Can't change the API, so overload and mark the old function
for removal in Qt 6.
Change-Id: I435af6785b765efb68037dd3fcdc9cbf56aec6da
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/items/qquickitemgrabresult.h')
-rw-r--r-- | src/quick/items/qquickitemgrabresult.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/items/qquickitemgrabresult.h b/src/quick/items/qquickitemgrabresult.h index 371bee52bc..30f8f0c2ef 100644 --- a/src/quick/items/qquickitemgrabresult.h +++ b/src/quick/items/qquickitemgrabresult.h @@ -64,7 +64,10 @@ public: QImage image() const; QUrl url() const; - Q_INVOKABLE bool saveToFile(const QString &fileName); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + Q_INVOKABLE bool saveToFile(const QString &fileName); // ### Qt 6: remove +#endif + Q_INVOKABLE bool saveToFile(const QString &fileName) const; protected: bool event(QEvent *) override; |