diff options
author | Pekka Vuorela <pekka.ta.vuorela@nokia.com> | 2012-01-02 17:42:00 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-05 11:40:08 +0100 |
commit | 8ad583b7f9cd4ab450e636bc2c0626975397aa86 (patch) | |
tree | cccc38e417a7e9ffb1f0020456078d6d114b5c7f /tests/auto/widgets/kernel/qapplication | |
parent | ad22c0c7cff332a77ea527c21e39490c8917b68e (diff) |
Removed QApplication::setInputContext()
Obsoleted by platform input context. Setting a custom QInputContext
wouldn't work properly anymore.
Change-Id: I966573a82fdd7530544878513a655eae7b3ad67b
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 10f91895a7..4cf15879cc 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -83,7 +83,6 @@ public slots: void cleanup(); private slots: void sendEventsOnProcessEvents(); // this must be the first test - void getSetCheck(); void staticSetup(); void alert(); @@ -175,38 +174,6 @@ void tst_QApplication::sendEventsOnProcessEvents() QVERIFY(spy.recordedEvents.contains(QEvent::User + 1)); } -class MyInputContext : public QInputContext -{ -public: - MyInputContext() : QInputContext() {} - QString identifierName() { return QString("NoName"); } - QString language() { return QString("NoLanguage"); } - void reset() {} - bool isComposing() const { return false; } -}; - -// Testing get/set functions -void tst_QApplication::getSetCheck() -{ - int argc = 0; - QApplication obj1(argc, 0, QApplication::GuiServer); - MyInputContext *var1 = new MyInputContext; - - // QApplication takes ownership, so check for reparenting: - obj1.setInputContext(var1); - QCOMPARE(var1->parent(), static_cast<QObject *>(&obj1)); - - // Test for self-assignment: - obj1.setInputContext(obj1.inputContext()); - QVERIFY(obj1.inputContext()); - QCOMPARE(static_cast<QInputContext *>(var1), obj1.inputContext()); - - // Resetting the input context to 0 is not allowed: - QTest::ignoreMessage(QtWarningMsg, "QApplication::setInputContext: called with 0 input context"); - obj1.setInputContext(0); - - QCOMPARE(static_cast<QInputContext *>(var1), obj1.inputContext()); -} class CloseEventTestWindow : public QWidget { |