diff options
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/kernel.pri | 9 | ||||
-rw-r--r-- | src/widgets/kernel/qaction.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qaction.h | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.h | 1 | ||||
-rw-r--r-- | src/widgets/kernel/qshortcut.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qshortcut.h | 7 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 9 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.h | 4 |
9 files changed, 22 insertions, 22 deletions
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri index 693af7eb80..8115741b6e 100644 --- a/src/widgets/kernel/kernel.pri +++ b/src/widgets/kernel/kernel.pri @@ -20,8 +20,7 @@ HEADERS += \ kernel/qlayout_p.h \ kernel/qlayoutengine_p.h \ kernel/qlayoutitem.h \ - kernel/qshortcut.h \ - kernel/qsizepolicy.h \ + kernel/qsizepolicy.h \ kernel/qstackedlayout.h \ kernel/qwidget.h \ kernel/qwidget_p.h \ @@ -47,7 +46,6 @@ SOURCES += \ kernel/qlayout.cpp \ kernel/qlayoutengine.cpp \ kernel/qlayoutitem.cpp \ - kernel/qshortcut.cpp \ kernel/qsizepolicy.cpp \ kernel/qstackedlayout.cpp \ kernel/qwidget.cpp \ @@ -77,6 +75,11 @@ qtConfig(formlayout) { SOURCES += kernel/qformlayout.cpp } +qtConfig(shortcut) { + HEADERS += kernel/qshortcut.h + SOURCES += kernel/qshortcut.cpp +} + qtConfig(tooltip) { HEADERS += kernel/qtooltip.h SOURCES += kernel/qtooltip.cpp diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index 19ad65692b..e69474cc47 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -46,7 +46,9 @@ #include "qevent.h" #include "qlist.h" #include "qstylehints.h" -#include <private/qshortcutmap_p.h> +#if QT_CONFIG(shortcut) +# include <private/qshortcutmap_p.h> +#endif #include <private/qguiapplication_p.h> #if QT_CONFIG(menu) #include <private/qmenu_p.h> diff --git a/src/widgets/kernel/qaction.h b/src/widgets/kernel/qaction.h index f7693f4dde..d232b8d205 100644 --- a/src/widgets/kernel/qaction.h +++ b/src/widgets/kernel/qaction.h @@ -41,7 +41,9 @@ #define QACTION_H #include <QtWidgets/qtwidgetsglobal.h> -#include <QtGui/qkeysequence.h> +#if QT_CONFIG(shortcut) +# include <QtGui/qkeysequence.h> +#endif #include <QtCore/qstring.h> #include <QtWidgets/qwidget.h> #include <QtCore/qvariant.h> diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index dfa1bc23b1..2d4f114638 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1395,7 +1395,9 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* else *QApplicationPrivate::set_pal = palette; QCoreApplication::setAttribute(Qt::AA_SetPalette); - emit qGuiApp->paletteChanged(*QGuiApplicationPrivate::app_pal); + + if (qGuiApp && QGuiApplicationPrivate::app_pal) + emit qGuiApp->paletteChanged(*QGuiApplicationPrivate::app_pal); } } diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h index 27e743a28d..d7cc4489c4 100644 --- a/src/widgets/kernel/qapplication.h +++ b/src/widgets/kernel/qapplication.h @@ -58,7 +58,6 @@ class QDesktopWidget; class QStyle; class QEventLoop; class QIcon; -template <typename T> class QList; class QLocale; class QPlatformNativeInterface; diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp index eec65c8625..49440ad383 100644 --- a/src/widgets/kernel/qshortcut.cpp +++ b/src/widgets/kernel/qshortcut.cpp @@ -40,7 +40,6 @@ #include "qshortcut.h" #include "private/qwidget_p.h" -#ifndef QT_NO_SHORTCUT #include <qevent.h> #if QT_CONFIG(whatsthis) #include <qwhatsthis.h> @@ -676,7 +675,6 @@ bool QShortcut::event(QEvent *e) } return QObject::event(e); } -#endif // QT_NO_SHORTCUT QT_END_NAMESPACE diff --git a/src/widgets/kernel/qshortcut.h b/src/widgets/kernel/qshortcut.h index 6dcf4971b2..6334788bce 100644 --- a/src/widgets/kernel/qshortcut.h +++ b/src/widgets/kernel/qshortcut.h @@ -44,10 +44,9 @@ #include <QtWidgets/qwidget.h> #include <QtGui/qkeysequence.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(shortcut); -#ifndef QT_NO_SHORTCUT +QT_BEGIN_NAMESPACE class QShortcutPrivate; class Q_WIDGETS_EXPORT QShortcut : public QObject @@ -94,8 +93,6 @@ protected: bool event(QEvent *e) override; }; -#endif // QT_NO_SHORTCUT - QT_END_NAMESPACE #endif // QSHORTCUT_H diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 74aebd1223..0f2e2545cd 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1513,13 +1513,8 @@ QWidget::~QWidget() if (d->declarativeData) { d->wasDeleted = true; // needed, so that destroying the declarative data does the right thing - if (static_cast<QAbstractDeclarativeDataImpl*>(d->declarativeData)->ownedByQml1) { - if (QAbstractDeclarativeData::destroyed_qml1) - QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this); - } else { - if (QAbstractDeclarativeData::destroyed) - QAbstractDeclarativeData::destroyed(d->declarativeData, this); - } + if (QAbstractDeclarativeData::destroyed) + QAbstractDeclarativeData::destroyed(d->declarativeData, this); d->declarativeData = 0; // don't activate again in ~QObject d->wasDeleted = false; } diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 83a6e6d4b3..86f937c4c6 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -53,7 +53,9 @@ #include <QtGui/qregion.h> #include <QtGui/qbrush.h> #include <QtGui/qcursor.h> -#include <QtGui/qkeysequence.h> +#if QT_CONFIG(shortcut) +# include <QtGui/qkeysequence.h> +#endif #ifdef QT_INCLUDE_COMPAT #include <QtGui/qevent.h> |