diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-24 11:26:22 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-24 11:48:46 +0200 |
commit | 1a9759855639b9e2b3cdc0687d3381dcbf6c9815 (patch) | |
tree | b2da51f6eddddb83c2d97cdcfac24d38d2e67a4e /tests/auto/quick/qquicktextinput | |
parent | 8217ec1b888f3ff93f004801b018c5f85362c484 (diff) | |
parent | e1fc2793aef53b84a3f1e19b6d6bdf1141340074 (diff) |
Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into wip/v4
Conflicts:
src/imports/qtquick2/plugins.qmltypes
src/qml/debugger/qv8debugservice.cpp
src/qml/qml/qml.pri
src/qml/qml/qqmlcompiler.cpp
src/qml/qml/qqmlcomponent.cpp
src/qml/qml/qqmlcontext.cpp
src/qml/qml/qqmldata_p.h
src/qml/qml/qqmlengine_p.h
src/qml/qml/qqmljavascriptexpression.cpp
src/qml/qml/qqmlxmlhttprequest.cpp
src/qml/qml/v4/qv4bindings.cpp
src/qml/qml/v4/qv4irbuilder.cpp
src/qml/qml/v4/qv4jsonobject_p.h
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
src/qml/qml/v8/qv8bindings.cpp
src/qml/qml/v8/qv8contextwrapper.cpp
src/qml/qml/v8/qv8listwrapper.cpp
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/qml/qml/v8/qv8qobjectwrapper_p.h
src/qml/qml/v8/qv8sequencewrapper_p_p.h
src/qml/qml/v8/qv8typewrapper.cpp
src/qml/qml/v8/qv8valuetypewrapper.cpp
src/qml/types/qqmldelegatemodel.cpp
src/quick/items/context2d/qquickcanvasitem.cpp
src/quick/items/context2d/qquickcontext2d.cpp
sync.profile
tests/auto/qml/qjsengine/tst_qjsengine.cpp
tests/benchmarks/qml/animation/animation.pro
tools/qmlprofiler/qmlprofiler.pro
Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
Diffstat (limited to 'tests/auto/quick/qquicktextinput')
-rw-r--r-- | tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index b1648cbed2..7a61ceb7fd 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -3149,6 +3149,7 @@ void tst_qquicktextinput::echoMode() QCOMPARE(initial, QLatin1String("ABCDefgh")); QCOMPARE(input->echoMode(), QQuickTextInput::Normal); QCOMPARE(input->displayText(), input->text()); + const QString passwordMaskCharacter = qApp->styleHints()->passwordMaskCharacter(); //Normal ref &= ~Qt::ImhHiddenText; ref &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData); @@ -3156,7 +3157,7 @@ void tst_qquicktextinput::echoMode() input->setEchoMode(QQuickTextInput::NoEcho); QCOMPARE(input->text(), initial); QCOMPARE(input->displayText(), QLatin1String("")); - QCOMPARE(input->passwordCharacter(), QLatin1String("*")); + QCOMPARE(input->passwordCharacter(), passwordMaskCharacter); //NoEcho ref |= Qt::ImhHiddenText; ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData); @@ -3166,7 +3167,7 @@ void tst_qquicktextinput::echoMode() ref |= Qt::ImhHiddenText; ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData); QCOMPARE(input->text(), initial); - QCOMPARE(input->displayText(), QLatin1String("********")); + QCOMPARE(input->displayText(), QString(8, passwordMaskCharacter.at(0))); QCOMPARE((Qt::InputMethodHints) input->inputMethodQuery(Qt::ImHints).toInt(), ref); // clearing input hints do not clear bits set by echo mode input->setInputMethodHints(Qt::ImhNone); @@ -3221,7 +3222,7 @@ void tst_qquicktextinput::passwordEchoDelay() QQuickItem *cursor = input->findChild<QQuickItem *>("cursor"); QVERIFY(cursor); - QChar fillChar = QLatin1Char('*'); + QChar fillChar = qApp->styleHints()->passwordMaskCharacter(); input->setEchoMode(QQuickTextInput::Password); QCOMPARE(input->displayText(), QString(8, fillChar)); @@ -6124,6 +6125,12 @@ void tst_qquicktextinput::keypress_inputMask_data() keys << Qt::Key_Home << "12ab"; QTest::newRow("uppercase") << QString("9999 >AA;_") << keys << QString("12 AB") << QString("12__ AB"); } + { + KeyList keys; + // inserting '12ab' + keys << Qt::Key_Right << Qt::Key_Right << "1"; + QTest::newRow("Move in mask") << QString("#0:00;*") << keys << QString(":1") << QString("**:1*"); + } } void tst_qquicktextinput::keypress_inputMask() |