Work around what apparently is a GCC 4.6.0 bug

The QFlags::operator int() isn't being called, so GCC complains that
this isn't an integer expression.

Change-Id: I537d06fd4a52ecbcddf0ef67807b298c42d3e911
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Thiago Macieira 2011-10-19 23:41:17 +02:00 committed by Qt by Nokia
parent b4ec690bbd
commit 1904970dad

View File

@ -106,7 +106,7 @@ void tst_QFlags::constExpr()
switch (btn) {
case Qt::LeftButton: QVERIFY(false); break;
case Qt::RightButton: QVERIFY(false); break;
case Qt::LeftButton | Qt::RightButton: QVERIFY(true); break;
case int(Qt::LeftButton | Qt::RightButton): QVERIFY(true); break;
default: QVERIFY(false);
}