summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMikko Knuutila <Mikko.Knuutila@Digia.com>2011-11-14 09:18:22 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-11-14 09:18:22 (GMT)
commit11a6d868b5613dd7fdbef02198aaf9566fcd1f17 (patch)
treedfd1339faae525a49dfe5fee76a6b62aba17e3e4 /tests
parent0792215fa8d227617a2080af9f12fd7f486b87d6 (diff)
downloadQt-11a6d868b5613dd7fdbef02198aaf9566fcd1f17.zip
Qt-11a6d868b5613dd7fdbef02198aaf9566fcd1f17.tar.gz
Qt-11a6d868b5613dd7fdbef02198aaf9566fcd1f17.tar.bz2
Fix for QMessageBox's autotest.
Mnemonic shortcut caused string comparison to fail. Task-number: QTBUG-22119 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qmessagebox/tst_qmessagebox.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp
index ed085ce..06e242c 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())));
}
}