From 11a6d868b5613dd7fdbef02198aaf9566fcd1f17 Mon Sep 17 00:00:00 2001 From: Mikko Knuutila Date: Mon, 14 Nov 2011 10:18:22 +0100 Subject: Fix for QMessageBox's autotest. Mnemonic shortcut caused string comparison to fail. Task-number: QTBUG-22119 Reviewed-by: Friedemann Kleint --- tests/auto/qmessagebox/tst_qmessagebox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()))); } } -- cgit v0.12