Test password mask delay and characters on Mac.
Task-number: QTBUG-31498 Change-Id: Iab4a56b94364e3db78070aca40c629f9398ffbb7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>bb10
parent
eb5749e8d9
commit
5ec3b2826b
|
|
@ -87,6 +87,7 @@ private slots:
|
|||
void layoutSpacings();
|
||||
void smallMiniNormalExclusivity_data();
|
||||
void smallMiniNormalExclusivity();
|
||||
void passwordCharacter();
|
||||
|
||||
private:
|
||||
static QSize msh(QWidget *widget);
|
||||
|
|
@ -405,6 +406,17 @@ void tst_QMacStyle::smallMiniNormalExclusivity()
|
|||
}
|
||||
}
|
||||
|
||||
void tst_QMacStyle::passwordCharacter()
|
||||
{
|
||||
QLineEdit lineEdit;
|
||||
lineEdit.setEchoMode(QLineEdit::Password);
|
||||
QTest::keyClick(&lineEdit, Qt::Key_P);
|
||||
// Should be no password delay; text should instantly be masked.
|
||||
const QChar bullet(0x2022);
|
||||
const QString expected(1, bullet);
|
||||
QCOMPARE(lineEdit.displayText(), expected);
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QMacStyle)
|
||||
#include "tst_qmacstyle.moc"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue