From 50fd0092db7b3de82fc017f1885cb0d4fdfed205 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 20 Apr 2011 11:39:14 +1000 Subject: [PATCH] Only ignore warning when it can actually be produced. Fix regression introduced in 3ca51d87296bcb3098d7de14294fef9294fd5ed4. The warning is only generated in builds where QT_NO_DEBUG is not defined. Change-Id: I9aa3db369094f4046062b5dc1dc694342208ee45 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern (cherry picked from commit 67bc4990f7541cca089882a8c3be1b2b8d98cd4c) --- tests/auto/qaccessibility/tst_qaccessibility.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index ec27874..fc91996 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -3998,7 +3998,9 @@ void tst_QAccessibility::accelerators() label->setText(tr("Q &&A")); QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QString()); +#ifndef QT_NO_DEBUG QTest::ignoreMessage(QtWarningMsg, "QKeySequence::mnemonic: \"Q &A&B\" contains multiple occurrences of '&'"); +#endif label->setText(tr("Q &A&B")); QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QKeySequence(Qt::ALT).toString(QKeySequence::NativeText) + QLatin1String("A")); -- 2.7.4