summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qunifiedtoolbarsurface_mac.cpp4
-rw-r--r--src/gui/painting/qunifiedtoolbarsurface_mac_p.h4
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp8
3 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/painting/qunifiedtoolbarsurface_mac.cpp b/src/gui/painting/qunifiedtoolbarsurface_mac.cpp
index 722355e..ab05dbd 100644
--- a/src/gui/painting/qunifiedtoolbarsurface_mac.cpp
+++ b/src/gui/painting/qunifiedtoolbarsurface_mac.cpp
@@ -45,6 +45,8 @@
#include <QDebug>
+#ifdef QT_MAC_USE_COCOA
+
QT_BEGIN_NAMESPACE
QUnifiedToolbarSurface::QUnifiedToolbarSurface(QWidget *widget)
@@ -231,3 +233,5 @@ void QUnifiedToolbarSurface::prepareBuffer(QImage::Format format, QWidget *widge
}
QT_END_NAMESPACE
+
+#endif // QT_MAC_USE_COCOA
diff --git a/src/gui/painting/qunifiedtoolbarsurface_mac_p.h b/src/gui/painting/qunifiedtoolbarsurface_mac_p.h
index d7805e8..4d72ff9 100644
--- a/src/gui/painting/qunifiedtoolbarsurface_mac_p.h
+++ b/src/gui/painting/qunifiedtoolbarsurface_mac_p.h
@@ -58,6 +58,8 @@
#include <private/qwidget_p.h>
#include <private/qnativeimage_p.h>
+#ifdef QT_MAC_USE_COCOA
+
QT_BEGIN_NAMESPACE
class QNativeImage;
@@ -92,4 +94,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_MAC_USE_COCOA
+
#endif // QUNIFIEDTOOLBARSURFACE_MAC_P_H
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index 99f8597..217723f 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -251,6 +251,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
#ifdef Q_WS_MAC
+#ifdef QT_MAC_USE_COCOA
// Unified toolbar hack.
QMainWindow* mWindow = qobject_cast<QMainWindow*>(widget->window());
if (mWindow) {
@@ -267,6 +268,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
}
}
}
+#endif // QT_MAC_USE_COCOA
Q_UNUSED(offset);
// Get a context for the widget.
@@ -338,7 +340,8 @@ void QRasterWindowSurface::setGeometry(const QRect &rect)
prepareBuffer(QNativeImage::systemFormat(), window());
}
d->inSetGeometry = false;
-#ifdef Q_WS_MAC
+
+#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA)
QMainWindow* mWindow = qobject_cast<QMainWindow*>(window());
if (mWindow) {
QMainWindowLayout *mLayout = qobject_cast<QMainWindowLayout*>(mWindow->layout());
@@ -354,7 +357,8 @@ void QRasterWindowSurface::setGeometry(const QRect &rect)
}
}
}
-#endif // Q_WS_MAC
+#endif // Q_WS_MAC && QT_MAC_USE_COCOA
+
}
// from qwindowsurface.cpp