diff options
author | Water-Team <water@pad.test.qt.nokia.com> | 2011-11-15 01:00:13 +0100 |
---|---|---|
committer | Water-Team <water@pad.test.qt.nokia.com> | 2011-11-15 01:00:13 +0100 |
commit | 301ec400cf5257d0ce5aec7ac4a9e7a0edf77ca3 (patch) | |
tree | a8ff2355bddcc7dbecfbf4f95fa70cdc7d174b1b /tests | |
parent | f8ca22cbd388c29dd507b74d3b409284df0ddd48 (diff) | |
parent | f37db56dda632d4a7e2e0301756331697f72b65a (diff) | |
download | qt4-tools-301ec400cf5257d0ce5aec7ac4a9e7a0edf77ca3.tar.gz |
Merge branch '4.8-upstream' into master-water
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qfontdatabase/tst_qfontdatabase.cpp | 14 | ||||
-rw-r--r-- | tests/auto/qmessagebox/tst_qmessagebox.cpp | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp index 735c7e4350..7bbd32da79 100644 --- a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp @@ -80,6 +80,10 @@ private slots: void addAppFont_data(); void addAppFont(); + +#ifdef Q_WS_MAC + void localizedFonts(); +#endif }; tst_QFontDatabase::tst_QFontDatabase() @@ -275,5 +279,15 @@ void tst_QFontDatabase::addAppFont() QVERIFY(db.families() == oldFamilies); } +#ifdef Q_WS_MAC +void tst_QFontDatabase::localizedFonts() +{ + QFontDatabase db; + + QVERIFY(db.hasFamily(QString::fromUtf8("ヒラギノ明朝 Pro"))); + QVERIFY(!db.hasFamily(QString::fromUtf8("NotValidFont"))); +} +#endif + QTEST_MAIN(tst_QFontDatabase) #include "tst_qfontdatabase.moc" diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp index ed085cef8b..06e242ca5e 100644 --- a/tests/auto/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp @@ -720,7 +720,8 @@ void tst_QMessageBox::detailsButtonText() QAbstractButton* btn = NULL; foreach(btn, list) { if (btn && (btn->inherits("QPushButton"))) { - if (btn->text() != QMessageBox::tr("OK") && btn->text() != QMessageBox::tr("Show Details...")) { + if (btn->text().remove("&") != QMessageBox::tr("OK") + && btn->text() != QMessageBox::tr("Show Details...")) { QFAIL(qPrintable(QString("Unexpected messagebox button text: %1").arg(btn->text()))); } } |