From 91055b66e49cf3136b59692054cdb4b76247ac53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 30 Sep 2022 16:35:04 +0200 Subject: Properly deprecate QStyleHints::keyboardAutoRepeatRate() The property also needs a QT_DEPRECATED_SINCE guard, and we can specify the version in the qdoc \deprecated tag. Change-Id: Ib333df862d1ef1c0c41a1baf51691928a64ecd75 Reviewed-by: Ivan Solovev --- src/gui/kernel/qstylehints.cpp | 2 +- src/gui/kernel/qstylehints.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp index f932caaae5..69de74e2c3 100644 --- a/src/gui/kernel/qstylehints.cpp +++ b/src/gui/kernel/qstylehints.cpp @@ -283,7 +283,7 @@ int QStyleHints::keyboardInputInterval() const \property QStyleHints::keyboardAutoRepeatRate \brief the rate, in events per second, in which additional repeated key presses will automatically be generated if a key is being held down. - \deprecated Use keyboardAutoRepeatRateF() instead + \deprecated [6.5] Use keyboardAutoRepeatRateF() instead */ int QStyleHints::keyboardAutoRepeatRate() const { diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h index 37e742a24d..8321b6189e 100644 --- a/src/gui/kernel/qstylehints.h +++ b/src/gui/kernel/qstylehints.h @@ -19,7 +19,9 @@ class Q_GUI_EXPORT QStyleHints : public QObject Q_DECLARE_PRIVATE(QStyleHints) Q_PROPERTY(int cursorFlashTime READ cursorFlashTime NOTIFY cursorFlashTimeChanged FINAL) Q_PROPERTY(qreal fontSmoothingGamma READ fontSmoothingGamma STORED false CONSTANT FINAL) +#if QT_DEPRECATED_SINCE(6, 5) Q_PROPERTY(int keyboardAutoRepeatRate READ keyboardAutoRepeatRate STORED false CONSTANT FINAL) +#endif Q_PROPERTY(int keyboardAutoRepeatRateF READ keyboardAutoRepeatRateF STORED false CONSTANT FINAL) Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval NOTIFY keyboardInputIntervalChanged FINAL) -- cgit v1.2.3