diff options
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qaction.cpp | 6 | ||||
-rw-r--r-- | src/widgets/kernel/qaction.h | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qaction_p.h | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qlayout.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qshortcut.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwindowcontainer.cpp | 4 |
7 files changed, 18 insertions, 6 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index a7116b1462..2813340ea2 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -48,7 +48,9 @@ #include "qstylehints.h" #include <private/qshortcutmap_p.h> #include <private/qapplication_p.h> +#if QT_CONFIG(menu) #include <private/qmenu_p.h> +#endif #include <private/qdebug_p.h> #define QAPP_CHECK(functionName) \ @@ -645,7 +647,7 @@ QIcon QAction::icon() const return d->icon; } -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) /*! Returns the menu contained by this action. Actions that contain menus can be used to create menu items with submenus, or inserted @@ -672,7 +674,7 @@ void QAction::setMenu(QMenu *menu) menu->d_func()->setOverrideMenuAction(this); d->sendDataChanged(); } -#endif // QT_NO_MENU +#endif // QT_CONFIG(menu) /*! If \a b is true then this action will be considered a separator. diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h index ca127ef51a..e1d431100e 100644 --- a/src/widgets/kernel/qaction.h +++ b/src/widgets/kernel/qaction.h @@ -121,7 +121,7 @@ public: void setPriority(Priority priority); Priority priority() const; -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) QMenu *menu() const; void setMenu(QMenu *menu); #endif diff --git a/src/widgets/kernel/qaction_p.h b/src/widgets/kernel/qaction_p.h index 4c1537b63b..19ae47c7b9 100644 --- a/src/widgets/kernel/qaction_p.h +++ b/src/widgets/kernel/qaction_p.h @@ -53,7 +53,9 @@ #include <QtWidgets/private/qtwidgetsglobal_p.h> #include "QtWidgets/qaction.h" +#if QT_CONFIG(menu) #include "QtWidgets/qmenu.h" +#endif #if QT_CONFIG(graphicsview) #include "private/qgraphicswidget_p.h" #endif diff --git a/src/widgets/kernel/qlayout.cpp b/src/widgets/kernel/qlayout.cpp index 56edd019bb..1e455b0d64 100644 --- a/src/widgets/kernel/qlayout.cpp +++ b/src/widgets/kernel/qlayout.cpp @@ -45,7 +45,9 @@ #include "qmenubar.h" #endif #include "qtoolbar.h" +#if QT_CONFIG(sizegrip) #include "qsizegrip.h" +#endif #include "qevent.h" #include "qstyle.h" #include "qvariant.h" diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp index 18376bb183..0585a59e89 100644 --- a/src/widgets/kernel/qshortcut.cpp +++ b/src/widgets/kernel/qshortcut.cpp @@ -45,7 +45,9 @@ #if QT_CONFIG(whatsthis) #include <qwhatsthis.h> #endif +#if QT_CONFIG(menu) #include <qmenu.h> +#endif #if QT_CONFIG(menubar) #include <qmenubar.h> #endif @@ -276,7 +278,7 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge #endif for (int i = 0; i < widgets.size(); ++i) { QWidget *w = widgets.at(i); -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) if (QMenu *menu = qobject_cast<QMenu *>(w)) { #ifdef Q_OS_DARWIN // On Mac, menu item shortcuts are processed before reaching any window. diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index b8ec5774b0..05bd6ea04b 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -45,7 +45,9 @@ #include "qdesktopwidget_p.h" #include "qevent.h" #include "qlayout.h" +#if QT_CONFIG(menu) #include "qmenu.h" +#endif #include "qmetaobject.h" #include "qpixmap.h" #include "qpointer.h" @@ -8983,7 +8985,7 @@ bool QWidget::event(QEvent *event) case Qt::CustomContextMenu: emit customContextMenuRequested(static_cast<QContextMenuEvent *>(event)->pos()); break; -#ifndef QT_NO_MENU +#if QT_CONFIG(menu) case Qt::ActionsContextMenu: if (d->actions.count()) { QMenu::exec(d->actions, static_cast<QContextMenuEvent *>(event)->globalPos(), diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index e509f522d8..d2ad7a466e 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -44,7 +44,9 @@ #include <qpa/qplatformintegration.h> #include <QDebug> +#if QT_CONFIG(mdiarea) #include <QMdiSubWindow> +#endif #include <QAbstractScrollArea> QT_BEGIN_NAMESPACE @@ -98,7 +100,7 @@ public: QWidget *p = q->parentWidget(); while (p) { if (false -#ifndef QT_NO_MDIAREA +#if QT_CONFIG(mdiarea) || qobject_cast<QMdiSubWindow *>(p) != 0 #endif #if QT_CONFIG(scrollarea) |