Fixed compile of autotests for Mac & QPA
authorRohan McGovern <rohan.mcgovern@nokia.com>
Tue, 21 Jun 2011 07:36:13 +0000 (09:36 +0200)
committerQt Continuous Integration System <qt-info@nokia.com>
Tue, 21 Jun 2011 11:52:20 +0000 (13:52 +0200)
Several autotests were assuming that Q_OS_MAC == Mac cocoa port, which
caused compile failures when QPA is used.

Change-Id: I4480ed815c15b6d9ce83edf0057b7293f2e3ad7e
Reviewed-on: http://codereview.qt.nokia.com/533
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
tests/auto/other.pro
tests/auto/qfontdialog/qfontdialog.pro
tests/auto/qlayout/tst_qlayout.cpp
tests/auto/qmacstyle/tst_qmacstyle.cpp
tests/auto/qwidget/qwidget.pro

index b50e169..c4ddc83 100644 (file)
@@ -38,7 +38,7 @@ SUBDIRS=\
 contains(QT_CONFIG, accessibility):SUBDIRS += qaccessibility
 
 contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter
-mac: {
+mac:!qpa {
     SUBDIRS += macgui \
                macnativeevents \
                macplist \
index 637e896..d4edaac 100644 (file)
@@ -4,7 +4,7 @@ QT += core-private gui-private
 
 SOURCES  += tst_qfontdialog.cpp
 
-mac {
+mac:!qpa {
     OBJECTIVE_SOURCES += tst_qfontdialog_mac_helpers.mm
     LIBS += -framework Cocoa
 }
index eb651f4..81b92ca 100644 (file)
@@ -56,7 +56,7 @@
 #include <QRadioButton>
 #include <private/qlayoutengine_p.h>
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 # include <QtGui/QMacStyle>
 #endif
 
@@ -280,7 +280,7 @@ public:
 
 void tst_QLayout::layoutItemRect()
 {
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
     if (qobject_cast<QMacStyle*>(QApplication::style())) {
         QWidget *window = new QWidget;
         QRadioButton *radio = new QRadioButton(window);
index f9fc81e..6e03afd 100644 (file)
@@ -45,7 +45,7 @@
 
 #include <qmacstyle_mac.h>
 
-#ifdef Q_OS_MAC
+#ifdef Q_WS_MAC
 
 const int N = 1;
 
index dfb7358..50aa08d 100644 (file)
@@ -9,7 +9,7 @@ aix-g++*:QMAKE_CXXFLAGS+=-fpermissive
 
 CONFIG += x11inc
 
-mac {
+mac:!qpa {
     LIBS += -framework Security -framework AppKit -framework Carbon
     OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm
 }