summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qinputmethod.cpp2
-rw-r--r--src/gui/kernel/qinputmethod.h8
-rw-r--r--tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp14
3 files changed, 14 insertions, 10 deletions
diff --git a/src/gui/kernel/qinputmethod.cpp b/src/gui/kernel/qinputmethod.cpp
index 9e724446ffb..23ab8535a0e 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 0acddc05e28..92ae016b971 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;
diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
index bc364e37f1f..3810546146b 100644
--- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
+++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
@@ -110,7 +110,7 @@ public:
virtual ~tst_qinputmethod() {}
private slots:
void initTestCase();
- void visible();
+ void isVisible();
void animating();
void keyboarRectangle();
void inputItem();
@@ -133,20 +133,20 @@ void tst_qinputmethod::initTestCase()
inputMethodPrivate->testContext = &m_platformInputContext;
}
-void tst_qinputmethod::visible()
+void tst_qinputmethod::isVisible()
{
- QCOMPARE(qApp->inputMethod()->visible(), false);
+ QCOMPARE(qApp->inputMethod()->isVisible(), false);
qApp->inputMethod()->show();
- QCOMPARE(qApp->inputMethod()->visible(), true);
+ QCOMPARE(qApp->inputMethod()->isVisible(), true);
qApp->inputMethod()->hide();
- QCOMPARE(qApp->inputMethod()->visible(), false);
+ QCOMPARE(qApp->inputMethod()->isVisible(), false);
qApp->inputMethod()->setVisible(true);
- QCOMPARE(qApp->inputMethod()->visible(), true);
+ QCOMPARE(qApp->inputMethod()->isVisible(), true);
qApp->inputMethod()->setVisible(false);
- QCOMPARE(qApp->inputMethod()->visible(), false);
+ QCOMPARE(qApp->inputMethod()->isVisible(), false);
}
void tst_qinputmethod::animating()