summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qlayout
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qlayout')
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index e4c76cd237..7e68db0e8c 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -57,10 +57,6 @@
#include <QRadioButton>
#include <private/qlayoutengine_p.h>
-#ifdef Q_OS_MAC
-# include <QtWidgets/QMacStyle>
-#endif
-
class tst_QLayout : public QObject
{
Q_OBJECT
@@ -276,7 +272,7 @@ public:
void tst_QLayout::layoutItemRect()
{
#ifdef Q_OS_MAC
- if (qobject_cast<QMacStyle*>(QApplication::style())) {
+ if (QApplication::style()->inherits("QMacStyle")) {
QWidget *window = new QWidget;
QRadioButton *radio = new QRadioButton(window);
QWidgetItem item(radio);