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 *and* the target is not Mac OS X.

Change-Id: I7245f2eab8ea47ab7495fef874b2f8a29186b659
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 60e5ed805af1e11aaec426b823df209b4c895c29)
This commit is contained in:
Jason McDonald 2011-04-21 14:49:41 +10:00 committed by Rohan McGovern
parent 0ea9ffef43
commit 46412f7128

View File

@ -3998,7 +3998,7 @@ void tst_QAccessibility::accelerators()
label->setText(tr("Q &&A"));
QCOMPARE(accLineEdit->text(QAccessible::Accelerator, 0), QString());
#ifndef QT_NO_DEBUG
#if !defined(QT_NO_DEBUG) && !defined(Q_WS_MAC)
QTest::ignoreMessage(QtWarningMsg, "QKeySequence::mnemonic: \"Q &A&B\" contains multiple occurrences of '&'");
#endif
label->setText(tr("Q &A&B"));