diff options
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/kernel.pri | 19 | ||||
-rw-r--r-- | src/widgets/kernel/qaction.cpp | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qaction.h | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qactiongroup.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qactiongroup.h | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qshortcut.cpp | 12 | ||||
-rw-r--r-- | src/widgets/kernel/qt_widgets_pch.h | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetaction.cpp | 3 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetaction.h | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetaction_p.h | 2 |
11 files changed, 32 insertions, 40 deletions
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri index 8115741b6e..58107973d8 100644 --- a/src/widgets/kernel/kernel.pri +++ b/src/widgets/kernel/kernel.pri @@ -7,9 +7,6 @@ KERNEL_P= kernel HEADERS += \ kernel/qtwidgetsglobal.h \ kernel/qtwidgetsglobal_p.h \ - kernel/qaction.h \ - kernel/qaction_p.h \ - kernel/qactiongroup.h \ kernel/qapplication.h \ kernel/qapplication_p.h \ kernel/qwidgetrepaintmanager_p.h \ @@ -24,8 +21,6 @@ HEADERS += \ kernel/qstackedlayout.h \ kernel/qwidget.h \ kernel/qwidget_p.h \ - kernel/qwidgetaction.h \ - kernel/qwidgetaction_p.h \ kernel/qgesture.h \ kernel/qgesture_p.h \ kernel/qstandardgestures_p.h \ @@ -37,8 +32,6 @@ HEADERS += \ kernel/qtestsupport_widgets.h SOURCES += \ - kernel/qaction.cpp \ - kernel/qactiongroup.cpp \ kernel/qapplication.cpp \ kernel/qwidgetrepaintmanager.cpp \ kernel/qboxlayout.cpp \ @@ -49,7 +42,6 @@ SOURCES += \ kernel/qsizepolicy.cpp \ kernel/qstackedlayout.cpp \ kernel/qwidget.cpp \ - kernel/qwidgetaction.cpp \ kernel/qgesture.cpp \ kernel/qstandardgestures.cpp \ kernel/qgesturerecognizer.cpp \ @@ -65,6 +57,17 @@ macx: { SOURCES += kernel/qmacgesturerecognizer.cpp } +qtConfig(action) { + HEADERS += kernel/qaction.h \ + kernel/qaction_p.h \ + kernel/qactiongroup.h \ + kernel/qwidgetaction.h \ + kernel/qwidgetaction_p.h + SOURCES += kernel/qaction.cpp \ + kernel/qactiongroup.cpp \ + kernel/qwidgetaction.cpp +} + qtConfig(opengl) { HEADERS += kernel/qopenglwidget.h SOURCES += kernel/qopenglwidget.cpp diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index 77b33a89aa..fdf262c947 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -40,7 +40,6 @@ #include "qaction.h" #include "qactiongroup.h" -#ifndef QT_NO_ACTION #include "qaction_p.h" #include "qapplication.h" #include "qevent.h" @@ -353,5 +352,3 @@ QAction::showStatusText(QWidget *widget) } QT_END_NAMESPACE - -#endif // QT_NO_ACTION diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h index f835c50265..808ee9065d 100644 --- a/src/widgets/kernel/qaction.h +++ b/src/widgets/kernel/qaction.h @@ -46,10 +46,9 @@ #include <QtWidgets/qwidget.h> #include <QtCore/qvariant.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(action); -#ifndef QT_NO_ACTION +QT_BEGIN_NAMESPACE class QMenu; class QActionGroup; @@ -108,8 +107,6 @@ QT_BEGIN_INCLUDE_NAMESPACE #include <QtWidgets/qactiongroup.h> QT_END_INCLUDE_NAMESPACE -#endif // QT_NO_ACTION - QT_END_NAMESPACE #endif // QACTION_H diff --git a/src/widgets/kernel/qactiongroup.cpp b/src/widgets/kernel/qactiongroup.cpp index 56e1df6b23..cc900cbb0f 100644 --- a/src/widgets/kernel/qactiongroup.cpp +++ b/src/widgets/kernel/qactiongroup.cpp @@ -40,8 +40,6 @@ #include "qactiongroup.h" #include <QtGui/private/qguiactiongroup_p.h> -#ifndef QT_NO_ACTION - #include "qaction.h" QT_BEGIN_NAMESPACE @@ -188,5 +186,3 @@ QList<QAction*> QActionGroup::actions() const } QT_END_NAMESPACE - -#endif // QT_NO_ACTION diff --git a/src/widgets/kernel/qactiongroup.h b/src/widgets/kernel/qactiongroup.h index 6ec2fc09ef..0a6a85f093 100644 --- a/src/widgets/kernel/qactiongroup.h +++ b/src/widgets/kernel/qactiongroup.h @@ -44,10 +44,9 @@ #include <QtGui/qguiactiongroup.h> #include <QtWidgets/qaction.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(action); -#ifndef QT_NO_ACTION +QT_BEGIN_NAMESPACE class QActionGroupPrivate; @@ -76,8 +75,6 @@ private: Q_DISABLE_COPY(QActionGroup) }; -#endif // QT_NO_ACTION - QT_END_NAMESPACE #endif // QACTIONGROUP_H diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp index 49440ad383..be5708aea7 100644 --- a/src/widgets/kernel/qshortcut.cpp +++ b/src/widgets/kernel/qshortcut.cpp @@ -53,7 +53,9 @@ #include <qapplication.h> #include <private/qapplication_p.h> #include <private/qshortcutmap_p.h> -#include <private/qaction_p.h> +#if QT_CONFIG(action) +# include <private/qaction_p.h> +#endif #include <private/qwidgetwindow_p.h> #include <qpa/qplatformmenu.h> @@ -70,7 +72,7 @@ static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidge #if QT_CONFIG(graphicsview) static bool correctGraphicsWidgetContext(Qt::ShortcutContext context, QGraphicsWidget *w, QWidget *active_window); #endif -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidget *active_window); #endif @@ -107,7 +109,7 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context) if (!active_window) return false; -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) if (auto a = qobject_cast<QAction *>(object)) return correctActionContext(context, a, active_window); #endif @@ -283,7 +285,7 @@ static bool correctGraphicsWidgetContext(Qt::ShortcutContext context, QGraphicsW } #endif -#ifndef QT_NO_ACTION +#if QT_CONFIG(action) static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidget *active_window) { const QWidgetList &widgets = static_cast<QActionPrivate *>(QObjectPrivate::get(a))->widgets; @@ -331,7 +333,7 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge #endif return false; } -#endif // QT_NO_ACTION +#endif // QT_CONFIG(action) /*! diff --git a/src/widgets/kernel/qt_widgets_pch.h b/src/widgets/kernel/qt_widgets_pch.h index b70941950b..3551f19e80 100644 --- a/src/widgets/kernel/qt_widgets_pch.h +++ b/src/widgets/kernel/qt_widgets_pch.h @@ -53,7 +53,9 @@ #include <qabstractbutton.h> #include <qabstractscrollarea.h> #include <qabstractslider.h> -#include <qaction.h> +#if QT_CONFIG(action) +# include <qaction.h> +#endif #include <qcommonstyle.h> #include <qlayout.h> #include <qstyle.h> diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 0f2e2545cd..efe225a5f5 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -88,7 +88,9 @@ #include "qwidget_p.h" #include <QtGui/private/qwindow_p.h> -#include "qaction_p.h" +#if QT_CONFIG(action) +# include "qaction_p.h" +#endif #include "qlayout_p.h" #if QT_CONFIG(graphicsview) #include "QtWidgets/qgraphicsproxywidget.h" diff --git a/src/widgets/kernel/qwidgetaction.cpp b/src/widgets/kernel/qwidgetaction.cpp index 6eebaca42c..14b7bc74c9 100644 --- a/src/widgets/kernel/qwidgetaction.cpp +++ b/src/widgets/kernel/qwidgetaction.cpp @@ -40,7 +40,6 @@ #include "qwidgetaction.h" #include "qdebug.h" -#ifndef QT_NO_ACTION #include "qwidgetaction_p.h" QT_BEGIN_NAMESPACE @@ -282,5 +281,3 @@ QList<QWidget *> QWidgetAction::createdWidgets() const QT_END_NAMESPACE #include "moc_qwidgetaction.cpp" - -#endif // QT_NO_ACTION diff --git a/src/widgets/kernel/qwidgetaction.h b/src/widgets/kernel/qwidgetaction.h index 4769332a23..4d302e8c61 100644 --- a/src/widgets/kernel/qwidgetaction.h +++ b/src/widgets/kernel/qwidgetaction.h @@ -43,10 +43,9 @@ #include <QtWidgets/qtwidgetsglobal.h> #include <QtWidgets/qaction.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(action); -#ifndef QT_NO_ACTION +QT_BEGIN_NAMESPACE class QWidgetActionPrivate; @@ -78,8 +77,6 @@ private: friend class QToolBar; }; -#endif // QT_NO_ACTION - QT_END_NAMESPACE #endif // QWIDGETACTION_H diff --git a/src/widgets/kernel/qwidgetaction_p.h b/src/widgets/kernel/qwidgetaction_p.h index 1fbcf236a1..0e633a65e4 100644 --- a/src/widgets/kernel/qwidgetaction_p.h +++ b/src/widgets/kernel/qwidgetaction_p.h @@ -54,6 +54,8 @@ #include <QtWidgets/private/qtwidgetsglobal_p.h> #include "private/qaction_p.h" +QT_REQUIRE_CONFIG(action); + QT_BEGIN_NAMESPACE class QWidgetActionPrivate : public QActionPrivate |