summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-08-27 19:08:17 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-09-11 17:21:20 +0000
commit79851be72918f4f3bd7549f40884bc68027cdfa9 (patch)
treebe192d0d2c867fffdbbcc74d9df774213344596b /src/widgets/styles/qmacstyle_mac.mm
parent689606de91faecf91f1f92e8d355789d9be62d2f (diff)
Convert features.mainwindow to QT_[REQUIRE_]CONFIG
Change-Id: If7efc8c15d8876f5bc5575d48686894ea71bbe62 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac.mm')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index fcda61ef8c..f48de99825 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -74,7 +74,9 @@
#include <qhash.h>
#include <qheaderview.h>
#include <qlineedit.h>
+#if QT_CONFIG(mainwindow)
#include <qmainwindow.h>
+#endif
#include <qmdisubwindow.h>
#if QT_CONFIG(menubar)
#include <qmenubar.h>
@@ -959,7 +961,7 @@ static QAquaWidgetSize qt_aqua_guess_size(const QWidget *widg, QSize large, QSiz
return QAquaSizeLarge;
}
-#ifndef QT_NO_MAINWINDOW
+#if QT_CONFIG(mainwindow)
if (qEnvironmentVariableIsSet("QWIDGET_ALL_SMALL")) {
//if (small.width() != -1 || small.height() != -1)
return QAquaSizeSmall;
@@ -2457,7 +2459,7 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
#endif
break;
case PM_DefaultFrameWidth:
-#ifndef QT_NO_MAINWINDOW
+#if QT_CONFIG(mainwindow)
if (widget && (widget->isWindow() || !widget->parentWidget()
|| (qobject_cast<const QMainWindow*>(widget->parentWidget())
&& static_cast<QMainWindow *>(widget->parentWidget())->centralWidget() == widget))
@@ -4801,7 +4803,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
// the title bar. The following code fills the toolBar area with transparent pixels
// to make that gradient visible.
if (w) {
-#ifndef QT_NO_MAINWINDOW
+#if QT_CONFIG(mainwindow)
if (QMainWindow * mainWindow = qobject_cast<QMainWindow *>(w->window())) {
if (toolBar && toolBar->toolBarArea == Qt::TopToolBarArea && mainWindow->unifiedTitleAndToolBarOnMac()) {
@@ -6986,7 +6988,7 @@ bool QMacStyle::event(QEvent *e)
QWidget *top = f->parentWidget();
while (top && !top->isWindow() && !(top->windowType() == Qt::SubWindow))
top = top->parentWidget();
-#ifndef QT_NO_MAINWINDOW
+#if QT_CONFIG(mainwindow)
if (qobject_cast<QMainWindow *>(top)) {
QWidget *central = static_cast<QMainWindow *>(top)->centralWidget();
for (const QWidget *par = f; par; par = par->parentWidget()) {