diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-27 15:16:46 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-06-27 15:16:46 (GMT) |
commit | b39dc4a9029040f43f1ca3ace6bf7e77740a3f39 (patch) | |
tree | f3aee03f9c978f645d56307a5162a8e0f65b021c /tests | |
parent | eadf2bbf49e906f43421fc31fd76ba9812a545f4 (diff) | |
parent | fff467981fe515974e722e1d092a916f6a8f5dcc (diff) | |
download | Qt-b39dc4a9029040f43f1ca3ace6bf7e77740a3f39.zip Qt-b39dc4a9029040f43f1ca3ace6bf7e77740a3f39.tar.gz Qt-b39dc4a9029040f43f1ca3ace6bf7e77740a3f39.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging:
Incorrect property name in QAccessibleAbstractSpinBox::setCurrentValue
When asking for relations, don't crash on children that don't return an interface.
Remove more inconsistencies with invisible.
QAccessibleToolButton::text should return accessibleName if set.
Remove stray semicolon.
Do not expose text when echo mode is not Normal.
Check validator when changing text using accessibility functions.
Fix some issues introduced in df6713b8f55fc007796f40.
Add tilde (both ~ and ~<userName>) expansion to QFileDialog on UNIX.
Avoid bogus accessibility focus events from menus.
Build fix for Mac OS 10.5
Avoided calling updateAccessibility() from updateMicroFocus if the item was hidden
Notify a11y framework of FocusChanges for QGraphicsObject
Call updateAccessibility on the QGraphicsObject in updateMicroFocus
Fix updateAccessibility for QGraphicsObjects
Make accessibility work on Windows with alien
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qaccessibility/tst_qaccessibility.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qfiledialog/tst_qfiledialog.cpp | 39 |
2 files changed, 45 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index 109afbc..7b70a5e 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -3049,6 +3049,12 @@ void tst_QAccessibility::lineEditTest() QTestAccessibility::clearEvents(); le2->setFocus(Qt::TabFocusReason); QTRY_VERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(le2, 0, QAccessible::Focus))); + + le->setText(QLatin1String("500")); + le->setValidator(new QIntValidator()); + iface->setText(QAccessible::Value, 0, QLatin1String("This text is not a number")); + QCOMPARE(le->text(), QLatin1String("500")); + delete iface; delete le; delete le2; diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index bc076c5..08d2e88 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -78,6 +78,10 @@ # define STRINGIFY(x) #x # define TOSTRING(x) STRINGIFY(x) # define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" +#elif defined(Q_OS_UNIX) +#ifdef QT_BUILD_INTERNAL +extern Q_GUI_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded = 0); +#endif #endif class QNonNativeFileDialog : public QFileDialog @@ -144,6 +148,10 @@ private slots: void clearLineEdit(); void enableChooseButton(); void hooks(); +#ifdef Q_OS_UNIX + void tildeExpansion_data(); + void tildeExpansion(); +#endif private: QByteArray userSettings; @@ -1323,5 +1331,36 @@ void tst_QFiledialog::hooks() QCOMPARE(QFileDialog::getSaveFileName(), QString("saveName")); } +#ifdef Q_OS_UNIX +void tst_QFiledialog::tildeExpansion_data() +{ + QTest::addColumn<QString>("tildePath"); + QTest::addColumn<QString>("expandedPath"); + + QTest::newRow("empty path") << QString() << QString(); + QTest::newRow("~") << QString::fromLatin1("~") << QDir::homePath(); + QTest::newRow("~/some/sub/dir/") << QString::fromLatin1("~/some/sub/dir") << QDir::homePath() + + QString::fromLatin1("/some/sub/dir"); + QString userHome = QString(qgetenv("USER")); + userHome.prepend('~'); + QTest::newRow("current user (~<user> syntax)") << userHome << QDir::homePath(); + QString invalid = QString::fromLatin1("~thisIsNotAValidUserName"); + QTest::newRow("invalid user name") << invalid << invalid; +} + + +void tst_QFiledialog::tildeExpansion() +{ +#ifndef QT_BUILD_INTERNAL + QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll); +#else + QFETCH(QString, tildePath); + QFETCH(QString, expandedPath); + + QCOMPARE(qt_tildeExpansion(tildePath), expandedPath); +#endif +} +#endif + QTEST_MAIN(tst_QFiledialog) #include "tst_qfiledialog.moc" |