From 787da35eb84a19f9c2b8d59b7ab93e78dd5e7cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 19 Mar 2012 14:05:41 +0100 Subject: Fixed QInputMethod API to use isVisible() instead of visible(). Deprecate the old API for now as not to break existing usages. Change-Id: I7abbbbe8a34951282537a9d74cded03743f44df7 Reviewed-by: Pekka Vuorela Reviewed-by: Lars Knoll --- src/gui/kernel/qinputmethod.cpp | 2 +- src/gui/kernel/qinputmethod.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qinputmethod.cpp b/src/gui/kernel/qinputmethod.cpp index 9e724446ff..23ab8535a0 100644 --- a/src/gui/kernel/qinputmethod.cpp +++ b/src/gui/kernel/qinputmethod.cpp @@ -215,7 +215,7 @@ void QInputMethod::hide() \sa show(), hide() */ -bool QInputMethod::visible() const +bool QInputMethod::isVisible() const { Q_D(const QInputMethod); QPlatformInputContext *ic = d->platformInputContext(); diff --git a/src/gui/kernel/qinputmethod.h b/src/gui/kernel/qinputmethod.h index 0acddc05e2..92ae016b97 100644 --- a/src/gui/kernel/qinputmethod.h +++ b/src/gui/kernel/qinputmethod.h @@ -62,7 +62,7 @@ class Q_GUI_EXPORT QInputMethod : public QObject Q_PROPERTY(QObject *inputItem READ inputItem WRITE setInputItem NOTIFY inputItemChanged) Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged) Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle NOTIFY keyboardRectangleChanged) - Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged) + Q_PROPERTY(bool visible READ isVisible NOTIFY visibleChanged) Q_PROPERTY(bool animating READ isAnimating NOTIFY animatingChanged) Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged) Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged) @@ -89,7 +89,11 @@ public: ContextMenu }; - bool visible() const; +#if QT_DEPRECATED_SINCE(5,0) + QT_DEPRECATED bool visible() const { return isVisible(); } +#endif + + bool isVisible() const; void setVisible(bool visible); bool isAnimating() const; -- cgit v1.2.3