diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-27 19:32:08 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-27 19:32:08 (GMT) |
commit | e0a2a4d343902e96e51df1fabeaaf543f4cd2a47 (patch) | |
tree | 4cb1ab83e9881a403e2857882fb0d6383118a393 /tests/auto/declarative/qdeclarativetextinput | |
parent | f6f9777408691a945c49ef8ec5037d8401c747eb (diff) | |
parent | a17339e943f21bb6c6e16884f716dd9ab8f94938 (diff) | |
download | Qt-e0a2a4d343902e96e51df1fabeaaf543f4cd2a47.zip Qt-e0a2a4d343902e96e51df1fabeaaf543f4cd2a47.tar.gz Qt-e0a2a4d343902e96e51df1fabeaaf543f4cd2a47.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
tools/qdoc3/test/assistant.qdocconf
tools/qdoc3/test/designer.qdocconf
tools/qdoc3/test/linguist.qdocconf
tools/qdoc3/test/qmake.qdocconf
tools/qdoc3/test/qt-html-templates.qdocconf
tools/qdoc3/test/qt.qdocconf
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextinput')
7 files changed, 23 insertions, 6 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml index ddc98cc..f0d1be5 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { width: 300; height: 300; color: "white" TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject" diff --git a/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml index b404682..da6b81f 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/inputmethodhints.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 TextInput { text: "Hello world!" diff --git a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml index 08a857c..141c243 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 TextInput{ focus: true diff --git a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml index 7cbeadd..c3d5994 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 TextInput{ focus: true diff --git a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml index 04f06da..58866b7 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { property variant myInput: input diff --git a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml index 41e8b59..b10ea81 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { property variant myInput: input diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index fcd7527..83ebe6c 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -644,21 +644,38 @@ void tst_qdeclarativetextinput::echoMode() QVERIFY(input != 0); QTRY_VERIFY(input->hasFocus() == true); QString initial = input->text(); + Qt::InputMethodHints ref; QCOMPARE(initial, QLatin1String("ABCDefgh")); QCOMPARE(input->echoMode(), QDeclarativeTextInput::Normal); QCOMPARE(input->displayText(), input->text()); + //Normal + ref &= ~Qt::ImhHiddenText; + ref &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + QCOMPARE(input->inputMethodHints(), ref); input->setEchoMode(QDeclarativeTextInput::NoEcho); QCOMPARE(input->text(), initial); QCOMPARE(input->displayText(), QLatin1String("")); QCOMPARE(input->passwordCharacter(), QLatin1String("*")); + //NoEcho + ref |= Qt::ImhHiddenText; + ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + QCOMPARE(input->inputMethodHints(), ref); input->setEchoMode(QDeclarativeTextInput::Password); + //Password + ref |= Qt::ImhHiddenText; + ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); QCOMPARE(input->text(), initial); QCOMPARE(input->displayText(), QLatin1String("********")); + QCOMPARE(input->inputMethodHints(), ref); input->setPasswordCharacter(QChar('Q')); QCOMPARE(input->passwordCharacter(), QLatin1String("Q")); QCOMPARE(input->text(), initial); QCOMPARE(input->displayText(), QLatin1String("QQQQQQQQ")); input->setEchoMode(QDeclarativeTextInput::PasswordEchoOnEdit); + //PasswordEchoOnEdit + ref &= ~Qt::ImhHiddenText; + ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + QCOMPARE(input->inputMethodHints(), ref); QCOMPARE(input->text(), initial); QCOMPARE(input->displayText(), QLatin1String("QQQQQQQQ")); QTest::keyPress(canvas, Qt::Key_A);//Clearing previous entry is part of PasswordEchoOnEdit |