test: fix tst_QPushButton::sizeHint() with Mac style on Mac OS X
The style name should be macintosh, not mac. This also reverts commit 2f46ea9fd677ffff3592b096db4aecdaaaa2b5aa. Task-number: QTBUG-23680 Change-Id: I7fd06da165ca5bc99801c13af13fdb3d35119566 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
3b2143bdf7
commit
dbaff44ff1
@ -566,7 +566,7 @@ void tst_QPushButton::sizeHint_data()
|
|||||||
QTest::newRow("gtk") << QString::fromLatin1("gtk");
|
QTest::newRow("gtk") << QString::fromLatin1("gtk");
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
|
#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
|
||||||
QTest::newRow("mac") << QString::fromLatin1("mac");
|
QTest::newRow("macintosh") << QString::fromLatin1("macintosh");
|
||||||
#endif
|
#endif
|
||||||
#if !defined(QT_NO_STYLE_FUSION)
|
#if !defined(QT_NO_STYLE_FUSION)
|
||||||
QTest::newRow("fusion") << QString::fromLatin1("fusion");
|
QTest::newRow("fusion") << QString::fromLatin1("fusion");
|
||||||
@ -589,11 +589,6 @@ void tst_QPushButton::sizeHint()
|
|||||||
{
|
{
|
||||||
QFETCH(QString, stylename);
|
QFETCH(QString, stylename);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
if (stylename == "mac")
|
|
||||||
QSKIP("QStyleFactory cannot create the Mac style, see QTBUG-23680");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QStyle *style = QStyleFactory::create(stylename);
|
QStyle *style = QStyleFactory::create(stylename);
|
||||||
if (!style)
|
if (!style)
|
||||||
QFAIL(qPrintable(QString::fromLatin1("Cannot create style: %1").arg(stylename)));
|
QFAIL(qPrintable(QString::fromLatin1("Cannot create style: %1").arg(stylename)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user