diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-18 08:37:31 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-18 08:37:31 +0100 |
commit | beb65dcd79f8c354dab7bb4a8d08157bd9d69329 (patch) | |
tree | 4632a0ff0df8462f8913f347042cf8378de03268 /src/gui/kernel | |
parent | 3fc1002489d5861d4f7cc2e1e8800881d6593c9d (diff) | |
parent | e3288f246b44ba2b6d90b90eb99ab61f496d8d57 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
src/gui/painting/painting.pri
src/plugins/platforms/xcb/qxcbconnection.cpp
tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
tests/auto/corelib/tools/qlocale/test/test.pro
tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
tools/configure/environment.cpp
Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qplatformdialoghelper.h | 17 | ||||
-rw-r--r-- | src/gui/kernel/qplatformmenu.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformsystemtrayicon.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qscreen.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwindow_p.h | 2 |
6 files changed, 27 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h index 936dbdfa89..5b2f4ece77 100644 --- a/src/gui/kernel/qplatformdialoghelper.h +++ b/src/gui/kernel/qplatformdialoghelper.h @@ -104,6 +104,7 @@ public: }; Q_DECLARE_FLAGS(StandardButtons, StandardButton) + Q_FLAG(StandardButtons) enum ButtonRole { // keep this in sync with QDialogButtonBox::ButtonRole and QMessageBox::ButtonRole @@ -128,6 +129,7 @@ public: Reverse = 0x40000000, EOL = InvalidRole }; + Q_ENUM(ButtonRole) enum ButtonLayout { // keep this in sync with QDialogButtonBox::ButtonLayout and QMessageBox::ButtonLayout @@ -167,6 +169,7 @@ QT_BEGIN_NAMESPACE class Q_GUI_EXPORT QColorDialogOptions { + Q_GADGET public: enum ColorDialogOption { ShowAlphaChannel = 0x00000001, @@ -175,6 +178,7 @@ public: }; Q_DECLARE_FLAGS(ColorDialogOptions, ColorDialogOption) + Q_FLAG(ColorDialogOptions) QColorDialogOptions(); QColorDialogOptions(const QColorDialogOptions &rhs); @@ -226,6 +230,7 @@ private: class Q_GUI_EXPORT QFontDialogOptions { + Q_GADGET public: enum FontDialogOption { NoButtons = 0x00000001, @@ -237,6 +242,7 @@ public: }; Q_DECLARE_FLAGS(FontDialogOptions, FontDialogOption) + Q_FLAG(FontDialogOptions) QFontDialogOptions(); QFontDialogOptions(const QFontDialogOptions &rhs); @@ -279,11 +285,19 @@ private: class Q_GUI_EXPORT QFileDialogOptions { + Q_GADGET public: enum ViewMode { Detail, List }; + Q_ENUM(ViewMode) + enum FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly }; + Q_ENUM(FileMode) + enum AcceptMode { AcceptOpen, AcceptSave }; + Q_ENUM(AcceptMode) + enum DialogLabel { LookIn, FileName, FileType, Accept, Reject, DialogLabelCount }; + Q_ENUM(DialogLabel) enum FileDialogOption { @@ -297,6 +311,7 @@ public: DontUseCustomDirectoryIcons = 0x00000080 }; Q_DECLARE_FLAGS(FileDialogOptions, FileDialogOption) + Q_FLAG(FileDialogOptions) QFileDialogOptions(); QFileDialogOptions(const QFileDialogOptions &rhs); @@ -396,9 +411,11 @@ private: class Q_GUI_EXPORT QMessageDialogOptions { + Q_GADGET public: // Keep in sync with QMessageBox::Icon enum Icon { NoIcon, Information, Warning, Critical, Question }; + Q_ENUM(Icon) QMessageDialogOptions(); QMessageDialogOptions(const QMessageDialogOptions &rhs); diff --git a/src/gui/kernel/qplatformmenu.h b/src/gui/kernel/qplatformmenu.h index 1022d0ed4a..bc0b3a4870 100644 --- a/src/gui/kernel/qplatformmenu.h +++ b/src/gui/kernel/qplatformmenu.h @@ -63,6 +63,7 @@ public: // They could be added as public QAction roles if necessary. CutRole, CopyRole, PasteRole, SelectAllRole, RoleCount }; + Q_ENUM(MenuRole) virtual void setTag(quintptr tag) = 0; virtual quintptr tag()const = 0; @@ -91,6 +92,7 @@ class Q_GUI_EXPORT QPlatformMenu : public QObject Q_OBJECT public: enum MenuType { DefaultMenu = 0, EditMenu }; + Q_ENUM(MenuType) virtual void insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) = 0; virtual void removeMenuItem(QPlatformMenuItem *menuItem) = 0; diff --git a/src/gui/kernel/qplatformsystemtrayicon.h b/src/gui/kernel/qplatformsystemtrayicon.h index 437f5e02b1..6ef2d1538f 100644 --- a/src/gui/kernel/qplatformsystemtrayicon.h +++ b/src/gui/kernel/qplatformsystemtrayicon.h @@ -57,8 +57,10 @@ public: Trigger, MiddleClick }; + Q_ENUM(ActivationReason) enum MessageIcon { NoIcon, Information, Warning, Critical }; + Q_ENUM(MessageIcon) QPlatformSystemTrayIcon(); ~QPlatformSystemTrayIcon(); diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index 9355e83491..2bd35491fb 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -164,6 +164,8 @@ public: SmallFont, MiniFont, FixedFont, + GroupBoxTitleFont, + TabButtonFont, NFonts }; diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp index fb322ae74f..52e7686439 100644 --- a/src/gui/kernel/qscreen.cpp +++ b/src/gui/kernel/qscreen.cpp @@ -116,8 +116,8 @@ QScreen::~QScreen() bool movingFromVirtualSibling = primaryScreen && primaryScreen->handle()->virtualSiblings().contains(handle()); // Move any leftover windows to the primary screen - foreach (QWindow *window, QGuiApplication::topLevelWindows()) { - if (window->screen() != this) + foreach (QWindow *window, QGuiApplication::allWindows()) { + if (!window->isTopLevel() || window->screen() != this) continue; const bool wasVisible = window->isVisible(); diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h index 23a6d800c0..6880edaada 100644 --- a/src/gui/kernel/qwindow_p.h +++ b/src/gui/kernel/qwindow_p.h @@ -50,6 +50,7 @@ #include <qpa/qplatformwindow.h> #include <QtCore/private/qobject_p.h> +#include <QtCore/qelapsedtimer.h> #include <QtGui/QIcon> QT_BEGIN_NAMESPACE @@ -187,6 +188,7 @@ public: #endif bool compositing; + QElapsedTimer lastComposeTime; }; |