else if (m_echoMode == QQuickTextInput::PasswordEchoOnEdit)
hints &= ~Qt::ImhHiddenText;
if (m_echoMode != QQuickTextInput::Normal)
- hints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ hints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
q->setInputMethodHints(hints);
}
/*!
QCOMPARE(input->displayText(), input->text());
//Normal
ref &= ~Qt::ImhHiddenText;
- ref &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ ref &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
QCOMPARE(input->inputMethodHints(), ref);
input->setEchoMode(QQuickTextInput::NoEcho);
QCOMPARE(input->text(), initial);
QCOMPARE(input->passwordCharacter(), QLatin1String("*"));
//NoEcho
ref |= Qt::ImhHiddenText;
- ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
QCOMPARE(input->inputMethodHints(), ref);
input->setEchoMode(QQuickTextInput::Password);
//Password
ref |= Qt::ImhHiddenText;
- ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
QCOMPARE(input->text(), initial);
QCOMPARE(input->displayText(), QLatin1String("********"));
QCOMPARE(input->inputMethodHints(), ref);
input->setEchoMode(QQuickTextInput::PasswordEchoOnEdit);
//PasswordEchoOnEdit
ref &= ~Qt::ImhHiddenText;
- ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText);
+ ref |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText | Qt::ImhSensitiveData);
QCOMPARE(input->inputMethodHints(), ref);
QCOMPARE(input->text(), initial);
QCOMPARE(input->displayText(), QLatin1String("QQQQQQQQ"));