diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-24 09:25:25 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-24 07:49:30 +0000 |
commit | 7183d08095f4598fc0f7702608bd726986bf1307 (patch) | |
tree | 0511abe7b7ef3f520e60ada656f0dcb9a2650057 /tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp | |
parent | 7a8da57a637f7a0b94199bb0e19f97a53958a8f0 (diff) |
Tests: Harmonize code checking on platform name.
Use case insensitive comparison and static invocation
of QGuiApplication::platformName().
Change-Id: I8c197c7b4f0669f71c019fbcee09a0f03dfab399
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp')
-rw-r--r-- | tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp index ab17edecb6..e3b71e40d1 100644 --- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp +++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp @@ -191,7 +191,7 @@ void tst_qinputmethod::cursorRectangle() { QCOMPARE(qApp->inputMethod()->cursorRectangle(), QRectF()); - if (qApp->platformName().toLower() == QLatin1String("wayland")) + if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) QSKIP("Wayland: This fails. Figure out why."); DummyWindow window; @@ -289,10 +289,10 @@ void tst_qinputmethod::inputDirection() void tst_qinputmethod::inputMethodAccepted() { - if (qApp->platformName().toLower() == QLatin1String("wayland")) + if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) QSKIP("Wayland: This fails. Figure out why."); - if (qApp->platformName().toLower() == QLatin1String("xcb")) + if (!QGuiApplication::platformName().compare(QLatin1String("xcb"), Qt::CaseInsensitive)) QSKIP("XCB: depends on dedicated platform context."); InputItem disabledItem; |