From bc84b7d046092dd719bc5cd925a13fd3b23bc3a8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 28 May 2020 07:12:25 +0200 Subject: Move the Windows Event Dispatcher into QtGui Task-number: QTBUG-83255 Change-Id: Ida86f27d7f52b9be48fbea909979320866ff8dae Reviewed-by: Oliver Wolff --- src/gui/.prev_CMakeLists.txt | 1 + src/gui/CMakeLists.txt | 1 + src/gui/platform/platform.pri | 1 + .../windows/qwindowsguieventdispatcher.cpp | 230 +++++++++++++++++++++ .../windows/qwindowsguieventdispatcher_p.h | 76 +++++++ src/gui/platform/windows/windows.pri | 2 + .../eventdispatchers/.prev_CMakeLists.txt | 5 - .../eventdispatchers/CMakeLists.txt | 5 - .../eventdispatchers/eventdispatchers.pro | 6 - .../qwindowsguieventdispatcher.cpp | 230 --------------------- .../qwindowsguieventdispatcher_p.h | 75 ------- src/plugins/platforms/direct2d/direct2d.pro | 1 - src/plugins/platforms/minimal/.prev_CMakeLists.txt | 8 +- src/plugins/platforms/minimal/CMakeLists.txt | 8 +- src/plugins/platforms/minimal/minimal.pro | 4 +- .../platforms/offscreen/.prev_CMakeLists.txt | 8 +- src/plugins/platforms/offscreen/CMakeLists.txt | 8 +- src/plugins/platforms/offscreen/offscreen.pro | 4 +- src/plugins/platforms/windows/.prev_CMakeLists.txt | 52 +++-- src/plugins/platforms/windows/CMakeLists.txt | 49 +++-- .../platforms/windows/qwindowsclipboard.cpp | 2 +- src/plugins/platforms/windows/qwindowscontext.cpp | 2 +- .../platforms/windows/qwindowsintegration.cpp | 2 +- .../platforms/windows/qwindowskeymapper.cpp | 2 +- src/plugins/platforms/windows/windows.pro | 1 - 25 files changed, 391 insertions(+), 392 deletions(-) create mode 100644 src/gui/platform/windows/qwindowsguieventdispatcher.cpp create mode 100644 src/gui/platform/windows/qwindowsguieventdispatcher_p.h create mode 100644 src/gui/platform/windows/windows.pri delete mode 100644 src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp delete mode 100644 src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt index 36f4334fdc..c2d00b7b03 100644 --- a/src/gui/.prev_CMakeLists.txt +++ b/src/gui/.prev_CMakeLists.txt @@ -303,6 +303,7 @@ qt_extend_target(Gui CONDITION WIN32 SOURCES image/qpixmap_win.cpp kernel/qwindowdefs_win.h + platform/windows/qwindowsguieventdispatcher.cpp platform/windows/qwindowsguieventdispatcher_p.h rhi/qrhid3d11.cpp rhi/qrhid3d11_p.h rhi/qrhid3d11_p_p.h PUBLIC_LIBRARIES diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 246e8aef2c..f2bb71ecef 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -392,6 +392,7 @@ qt_extend_target(Gui CONDITION WIN32 SOURCES image/qpixmap_win.cpp kernel/qwindowdefs_win.h + platform/windows/qwindowsguieventdispatcher.cpp platform/windows/qwindowsguieventdispatcher_p.h rhi/qrhid3d11.cpp rhi/qrhid3d11_p.h rhi/qrhid3d11_p_p.h PUBLIC_LIBRARIES diff --git a/src/gui/platform/platform.pri b/src/gui/platform/platform.pri index be8c752b18..15b5c1a69b 100644 --- a/src/gui/platform/platform.pri +++ b/src/gui/platform/platform.pri @@ -1,2 +1,3 @@ wasm:include(wasm/wasm.pri) darwin:include(darwin/darwin.pri) +win32:include(windows/windows.pri) diff --git a/src/gui/platform/windows/qwindowsguieventdispatcher.cpp b/src/gui/platform/windows/qwindowsguieventdispatcher.cpp new file mode 100644 index 0000000000..ca4bc4091b --- /dev/null +++ b/src/gui/platform/windows/qwindowsguieventdispatcher.cpp @@ -0,0 +1,230 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Samuel Gaist +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qwindowsguieventdispatcher_p.h" + +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +/*! + \class QWindowsGuiEventDispatcher + \brief Event dispatcher for Windows + + Maintains a global stack storing the current event dispatcher and + its processing flags for access from the Windows procedure + qWindowsWndProc. Handling the QPA gui events should be done + from within the qWindowsWndProc to ensure correct processing of messages. + + \internal +*/ + +QWindowsGuiEventDispatcher::QWindowsGuiEventDispatcher(QObject *parent) : + QEventDispatcherWin32(parent) +{ + setObjectName(QStringLiteral("QWindowsGuiEventDispatcher")); + createInternalHwnd(); // QTBUG-40881: Do not delay registering timers, etc. for QtMfc. +} + +bool QWindowsGuiEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags) +{ + const QEventLoop::ProcessEventsFlags oldFlags = m_flags; + m_flags = flags; + const bool rc = QEventDispatcherWin32::processEvents(flags); + m_flags = oldFlags; + return rc; +} + +void QWindowsGuiEventDispatcher::sendPostedEvents() +{ + QEventDispatcherWin32::sendPostedEvents(); + QWindowSystemInterface::sendWindowSystemEvents(m_flags); +} + +// Helpers for printing debug output for WM_* messages. +struct MessageDebugEntry +{ + UINT message; + const char *description; + bool interesting; +}; + +static const MessageDebugEntry +messageDebugEntries[] = { + {WM_CREATE, "WM_CREATE", true}, + {WM_PAINT, "WM_PAINT", true}, + {WM_CLOSE, "WM_CLOSE", true}, + {WM_DESTROY, "WM_DESTROY", true}, + {WM_MOVE, "WM_MOVE", true}, + {WM_SIZE, "WM_SIZE", true}, + {WM_GETICON, "WM_GETICON", false}, + {WM_KEYDOWN, "WM_KEYDOWN", true}, + {WM_SYSKEYDOWN, "WM_SYSKEYDOWN", true}, + {WM_SYSCOMMAND, "WM_SYSCOMMAND", true}, + {WM_KEYUP, "WM_KEYUP", true}, + {WM_SYSKEYUP, "WM_SYSKEYUP", true}, +#if defined(WM_APPCOMMAND) + {WM_APPCOMMAND, "WM_APPCOMMAND", true}, +#endif + {WM_IME_CHAR, "WM_IMECHAR", true}, + {WM_IME_KEYDOWN, "WM_IMECHAR", true}, + {WM_CANCELMODE, "WM_CANCELMODE", true}, + {WM_CHAR, "WM_CHAR", true}, + {WM_DEADCHAR, "WM_DEADCHAR", true}, + {WM_ACTIVATE, "WM_ACTIVATE", true}, + {WM_SETFOCUS, "WM_SETFOCUS", true}, + {WM_KILLFOCUS, "WM_KILLFOCUS", true}, + {WM_ENABLE, "WM_ENABLE", true}, + {WM_SHOWWINDOW, "WM_SHOWWINDOW", true}, + {WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED", true}, + {WM_SETCURSOR, "WM_SETCURSOR", false}, + {WM_GETFONT, "WM_GETFONT", true}, + {WM_LBUTTONDOWN, "WM_LBUTTONDOWN", true}, + {WM_LBUTTONUP, "WM_LBUTTONUP", true}, + {WM_LBUTTONDBLCLK, "WM_LBUTTONDBLCLK", true}, + {WM_RBUTTONDOWN, "WM_RBUTTONDOWN", true}, + {WM_RBUTTONUP, "WM_RBUTTONUP", true}, + {WM_RBUTTONDBLCLK, "WM_RBUTTONDBLCLK", true}, + {WM_MBUTTONDOWN, "WM_MBUTTONDOWN", true}, + {WM_MBUTTONUP, "WM_MBUTTONUP", true}, + {WM_MBUTTONDBLCLK, "WM_MBUTTONDBLCLK", true}, + {WM_MOUSEWHEEL, "WM_MOUSEWHEEL", true}, + {WM_XBUTTONDOWN, "WM_XBUTTONDOWN", true}, + {WM_XBUTTONUP, "WM_XBUTTONUP", true}, + {WM_XBUTTONDBLCLK, "WM_XBUTTONDBLCLK", true}, + {WM_MOUSEHWHEEL, "WM_MOUSEHWHEEL", true}, + {WM_GETOBJECT, "WM_GETOBJECT", true}, + {WM_IME_SETCONTEXT, "WM_IME_SETCONTEXT", true}, + {WM_INPUTLANGCHANGE, "WM_INPUTLANGCHANGE", true}, + {WM_IME_NOTIFY, "WM_IME_NOTIFY", true}, +#if defined(WM_DWMNCRENDERINGCHANGED) + {WM_DWMNCRENDERINGCHANGED, "WM_DWMNCRENDERINGCHANGED", true}, +#endif + {WM_IME_SETCONTEXT, "WM_IME_SETCONTEXT", true}, + {WM_IME_NOTIFY, "WM_IME_NOTIFY", true}, + {WM_RENDERFORMAT, "WM_RENDERFORMAT", true}, + {WM_RENDERALLFORMATS, "WM_RENDERALLFORMATS", true}, + {WM_DESTROYCLIPBOARD, "WM_DESTROYCLIPBOARD", true}, + {WM_CAPTURECHANGED, "WM_CAPTURECHANGED", true}, + {WM_IME_STARTCOMPOSITION, "WM_IME_STARTCOMPOSITION", true}, + {WM_IME_COMPOSITION, "WM_IME_COMPOSITION", true}, + {WM_IME_ENDCOMPOSITION, "WM_IME_ENDCOMPOSITION", true}, + {WM_IME_NOTIFY, "WM_IME_NOTIFY", true}, + {WM_IME_REQUEST, "WM_IME_REQUEST", true}, +#if !defined(QT_NO_SESSIONMANAGER) + {WM_QUERYENDSESSION, "WM_QUERYENDSESSION", true}, + {WM_ENDSESSION, "WM_ENDSESSION", true}, +#endif + {WM_MOUSEACTIVATE,"WM_MOUSEACTIVATE", true}, + {WM_CHILDACTIVATE, "WM_CHILDACTIVATE", true}, + {WM_PARENTNOTIFY, "WM_PARENTNOTIFY", true}, + {WM_ENTERIDLE, "WM_ENTERIDLE", false}, + {WM_GETMINMAXINFO, "WM_GETMINMAXINFO", true}, + {WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING", true}, + {WM_NCCREATE, "WM_NCCREATE", true}, + {WM_NCDESTROY, "WM_NCDESTROY", true}, + {WM_NCCALCSIZE, "WM_NCCALCSIZE", true}, + {WM_NCACTIVATE, "WM_NCACTIVATE", true}, + {WM_NCMOUSEMOVE, "WM_NCMOUSEMOVE", true}, + {WM_NCMOUSELEAVE, "WM_NCMOUSELEAVE", true}, + {WM_NCLBUTTONDOWN, "WM_NCLBUTTONDOWN", true}, + {WM_NCLBUTTONUP, "WM_NCLBUTTONUP", true}, + {WM_ACTIVATEAPP, "WM_ACTIVATEAPP", true}, + {WM_NCPAINT, "WM_NCPAINT", true}, + {WM_ERASEBKGND, "WM_ERASEBKGND", true}, + {WM_MOUSEMOVE, "WM_MOUSEMOVE", true}, + {WM_MOUSELEAVE, "WM_MOUSELEAVE", true}, + {WM_NCHITTEST, "WM_NCHITTEST", false}, +#ifdef WM_TOUCH + {WM_TOUCH, "WM_TOUCH", true}, +#endif + {WM_CHANGECBCHAIN, "WM_CHANGECBCHAIN", true}, + {WM_DISPLAYCHANGE, "WM_DISPLAYCHANGE", true}, + {WM_DRAWCLIPBOARD, "WM_DRAWCLIPBOARD", true}, + {WM_THEMECHANGED, "WM_THEMECHANGED", true}, + {0x90, "WM_UAHDESTROYWINDOW", true}, + {0x272, "WM_UNREGISTER_WINDOW_SERVICES", true}, +#ifdef WM_POINTERUPDATE + {WM_POINTERDEVICECHANGE, "WM_POINTERDEVICECHANGE", true}, + {WM_POINTERDEVICEINRANGE, "WM_POINTERDEVICEINRANGE", true}, + {WM_POINTERDEVICEOUTOFRANGE, "WM_POINTERDEVICEOUTOFRANGE", true}, + {WM_NCPOINTERUPDATE, "WM_NCPOINTERUPDATE", true}, + {WM_NCPOINTERDOWN, "WM_NCPOINTERDOWN", true}, + {WM_NCPOINTERUP, "WM_NCPOINTERUP", true}, + {WM_POINTERUPDATE, "WM_POINTERUPDATE", true}, + {WM_POINTERDOWN, "WM_POINTERDOWN", true}, + {WM_POINTERUP, "WM_POINTERUP", true}, + {WM_POINTERENTER, "WM_POINTERENTER", true}, + {WM_POINTERLEAVE, "WM_POINTERLEAVE", true}, + {WM_POINTERACTIVATE, "WM_POINTERACTIVATE", true}, + {WM_POINTERCAPTURECHANGED, "WM_POINTERCAPTURECHANGED", true}, + {WM_TOUCHHITTESTING, "WM_TOUCHHITTESTING", true}, + {WM_POINTERWHEEL, "WM_POINTERWHEEL", true}, + {WM_POINTERHWHEEL, "WM_POINTERHWHEEL", true}, +#endif // WM_POINTERUPDATE +#ifdef DM_POINTERHITTEST + {DM_POINTERHITTEST, "DM_POINTERHITTEST", true}, +#endif // DM_POINTERHITTEST +#ifdef WM_POINTERROUTEDTO + {WM_POINTERROUTEDTO, "WM_POINTERROUTEDTO", true}, + {WM_POINTERROUTEDAWAY, "WM_POINTERROUTEDAWAY", true}, + {WM_POINTERROUTEDRELEASED, "WM_POINTERROUTEDRELEASED", true}, +#endif // WM_POINTERROUTEDTO +}; + +static inline const MessageDebugEntry *messageDebugEntry(UINT msg) +{ + for (size_t i = 0; i < sizeof(messageDebugEntries)/sizeof(MessageDebugEntry); i++) + if (messageDebugEntries[i].message == msg) + return messageDebugEntries + i; + return 0; +} + +const char *QWindowsGuiEventDispatcher::windowsMessageName(UINT msg) +{ + if (const MessageDebugEntry *e = messageDebugEntry(msg)) + return e->description; + return "Unknown"; +} + +QT_END_NAMESPACE diff --git a/src/gui/platform/windows/qwindowsguieventdispatcher_p.h b/src/gui/platform/windows/qwindowsguieventdispatcher_p.h new file mode 100644 index 0000000000..c6506f2dc9 --- /dev/null +++ b/src/gui/platform/windows/qwindowsguieventdispatcher_p.h @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QWINDOWSGUIEVENTDISPATCHER_H +#define QWINDOWSGUIEVENTDISPATCHER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_GUI_EXPORT QWindowsGuiEventDispatcher : public QEventDispatcherWin32 +{ + Q_OBJECT +public: + explicit QWindowsGuiEventDispatcher(QObject *parent = 0); + + static const char *windowsMessageName(UINT msg); + + bool QT_ENSURE_STACK_ALIGNED_FOR_SSE processEvents(QEventLoop::ProcessEventsFlags flags) override; + void sendPostedEvents() override; + +private: + QEventLoop::ProcessEventsFlags m_flags; +}; + +QT_END_NAMESPACE + +#endif // QWINDOWSGUIEVENTDISPATCHER_H diff --git a/src/gui/platform/windows/windows.pri b/src/gui/platform/windows/windows.pri new file mode 100644 index 0000000000..809576ab31 --- /dev/null +++ b/src/gui/platform/windows/windows.pri @@ -0,0 +1,2 @@ +HEADERS += platform/windows/qwindowsguieventdispatcher_p.h +SOURCES += platform/windows/qwindowsguieventdispatcher.cpp diff --git a/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt b/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt index 2e25d6cfd6..528677a16f 100644 --- a/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt +++ b/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt @@ -29,11 +29,6 @@ qt_extend_target(EventDispatcherSupport CONDITION UNIX qunixeventdispatcher_qpa_p.h ) -qt_extend_target(EventDispatcherSupport CONDITION WIN32 - SOURCES - qwindowsguieventdispatcher.cpp qwindowsguieventdispatcher_p.h -) - qt_extend_target(EventDispatcherSupport CONDITION QT_FEATURE_glib SOURCES qeventdispatcher_glib.cpp qeventdispatcher_glib_p.h diff --git a/src/platformsupport/eventdispatchers/CMakeLists.txt b/src/platformsupport/eventdispatchers/CMakeLists.txt index 72b873423b..746855a337 100644 --- a/src/platformsupport/eventdispatchers/CMakeLists.txt +++ b/src/platformsupport/eventdispatchers/CMakeLists.txt @@ -31,11 +31,6 @@ qt_extend_target(EventDispatcherSupport CONDITION UNIX qunixeventdispatcher_qpa_p.h ) -qt_extend_target(EventDispatcherSupport CONDITION WIN32 - SOURCES - qwindowsguieventdispatcher.cpp qwindowsguieventdispatcher_p.h -) - qt_extend_target(EventDispatcherSupport CONDITION QT_FEATURE_glib SOURCES qeventdispatcher_glib.cpp qeventdispatcher_glib_p.h diff --git a/src/platformsupport/eventdispatchers/eventdispatchers.pro b/src/platformsupport/eventdispatchers/eventdispatchers.pro index 9d3ac4bbc6..fc08543b48 100644 --- a/src/platformsupport/eventdispatchers/eventdispatchers.pro +++ b/src/platformsupport/eventdispatchers/eventdispatchers.pro @@ -15,12 +15,6 @@ unix { HEADERS += \ qunixeventdispatcher_qpa_p.h \ qgenericunixeventdispatcher_p.h -} else { - SOURCES += \ - qwindowsguieventdispatcher.cpp - - HEADERS += \ - qwindowsguieventdispatcher_p.h } qtConfig(glib) { diff --git a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp deleted file mode 100644 index ca4bc4091b..0000000000 --- a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Samuel Gaist -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qwindowsguieventdispatcher_p.h" - -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -/*! - \class QWindowsGuiEventDispatcher - \brief Event dispatcher for Windows - - Maintains a global stack storing the current event dispatcher and - its processing flags for access from the Windows procedure - qWindowsWndProc. Handling the QPA gui events should be done - from within the qWindowsWndProc to ensure correct processing of messages. - - \internal -*/ - -QWindowsGuiEventDispatcher::QWindowsGuiEventDispatcher(QObject *parent) : - QEventDispatcherWin32(parent) -{ - setObjectName(QStringLiteral("QWindowsGuiEventDispatcher")); - createInternalHwnd(); // QTBUG-40881: Do not delay registering timers, etc. for QtMfc. -} - -bool QWindowsGuiEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags) -{ - const QEventLoop::ProcessEventsFlags oldFlags = m_flags; - m_flags = flags; - const bool rc = QEventDispatcherWin32::processEvents(flags); - m_flags = oldFlags; - return rc; -} - -void QWindowsGuiEventDispatcher::sendPostedEvents() -{ - QEventDispatcherWin32::sendPostedEvents(); - QWindowSystemInterface::sendWindowSystemEvents(m_flags); -} - -// Helpers for printing debug output for WM_* messages. -struct MessageDebugEntry -{ - UINT message; - const char *description; - bool interesting; -}; - -static const MessageDebugEntry -messageDebugEntries[] = { - {WM_CREATE, "WM_CREATE", true}, - {WM_PAINT, "WM_PAINT", true}, - {WM_CLOSE, "WM_CLOSE", true}, - {WM_DESTROY, "WM_DESTROY", true}, - {WM_MOVE, "WM_MOVE", true}, - {WM_SIZE, "WM_SIZE", true}, - {WM_GETICON, "WM_GETICON", false}, - {WM_KEYDOWN, "WM_KEYDOWN", true}, - {WM_SYSKEYDOWN, "WM_SYSKEYDOWN", true}, - {WM_SYSCOMMAND, "WM_SYSCOMMAND", true}, - {WM_KEYUP, "WM_KEYUP", true}, - {WM_SYSKEYUP, "WM_SYSKEYUP", true}, -#if defined(WM_APPCOMMAND) - {WM_APPCOMMAND, "WM_APPCOMMAND", true}, -#endif - {WM_IME_CHAR, "WM_IMECHAR", true}, - {WM_IME_KEYDOWN, "WM_IMECHAR", true}, - {WM_CANCELMODE, "WM_CANCELMODE", true}, - {WM_CHAR, "WM_CHAR", true}, - {WM_DEADCHAR, "WM_DEADCHAR", true}, - {WM_ACTIVATE, "WM_ACTIVATE", true}, - {WM_SETFOCUS, "WM_SETFOCUS", true}, - {WM_KILLFOCUS, "WM_KILLFOCUS", true}, - {WM_ENABLE, "WM_ENABLE", true}, - {WM_SHOWWINDOW, "WM_SHOWWINDOW", true}, - {WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED", true}, - {WM_SETCURSOR, "WM_SETCURSOR", false}, - {WM_GETFONT, "WM_GETFONT", true}, - {WM_LBUTTONDOWN, "WM_LBUTTONDOWN", true}, - {WM_LBUTTONUP, "WM_LBUTTONUP", true}, - {WM_LBUTTONDBLCLK, "WM_LBUTTONDBLCLK", true}, - {WM_RBUTTONDOWN, "WM_RBUTTONDOWN", true}, - {WM_RBUTTONUP, "WM_RBUTTONUP", true}, - {WM_RBUTTONDBLCLK, "WM_RBUTTONDBLCLK", true}, - {WM_MBUTTONDOWN, "WM_MBUTTONDOWN", true}, - {WM_MBUTTONUP, "WM_MBUTTONUP", true}, - {WM_MBUTTONDBLCLK, "WM_MBUTTONDBLCLK", true}, - {WM_MOUSEWHEEL, "WM_MOUSEWHEEL", true}, - {WM_XBUTTONDOWN, "WM_XBUTTONDOWN", true}, - {WM_XBUTTONUP, "WM_XBUTTONUP", true}, - {WM_XBUTTONDBLCLK, "WM_XBUTTONDBLCLK", true}, - {WM_MOUSEHWHEEL, "WM_MOUSEHWHEEL", true}, - {WM_GETOBJECT, "WM_GETOBJECT", true}, - {WM_IME_SETCONTEXT, "WM_IME_SETCONTEXT", true}, - {WM_INPUTLANGCHANGE, "WM_INPUTLANGCHANGE", true}, - {WM_IME_NOTIFY, "WM_IME_NOTIFY", true}, -#if defined(WM_DWMNCRENDERINGCHANGED) - {WM_DWMNCRENDERINGCHANGED, "WM_DWMNCRENDERINGCHANGED", true}, -#endif - {WM_IME_SETCONTEXT, "WM_IME_SETCONTEXT", true}, - {WM_IME_NOTIFY, "WM_IME_NOTIFY", true}, - {WM_RENDERFORMAT, "WM_RENDERFORMAT", true}, - {WM_RENDERALLFORMATS, "WM_RENDERALLFORMATS", true}, - {WM_DESTROYCLIPBOARD, "WM_DESTROYCLIPBOARD", true}, - {WM_CAPTURECHANGED, "WM_CAPTURECHANGED", true}, - {WM_IME_STARTCOMPOSITION, "WM_IME_STARTCOMPOSITION", true}, - {WM_IME_COMPOSITION, "WM_IME_COMPOSITION", true}, - {WM_IME_ENDCOMPOSITION, "WM_IME_ENDCOMPOSITION", true}, - {WM_IME_NOTIFY, "WM_IME_NOTIFY", true}, - {WM_IME_REQUEST, "WM_IME_REQUEST", true}, -#if !defined(QT_NO_SESSIONMANAGER) - {WM_QUERYENDSESSION, "WM_QUERYENDSESSION", true}, - {WM_ENDSESSION, "WM_ENDSESSION", true}, -#endif - {WM_MOUSEACTIVATE,"WM_MOUSEACTIVATE", true}, - {WM_CHILDACTIVATE, "WM_CHILDACTIVATE", true}, - {WM_PARENTNOTIFY, "WM_PARENTNOTIFY", true}, - {WM_ENTERIDLE, "WM_ENTERIDLE", false}, - {WM_GETMINMAXINFO, "WM_GETMINMAXINFO", true}, - {WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING", true}, - {WM_NCCREATE, "WM_NCCREATE", true}, - {WM_NCDESTROY, "WM_NCDESTROY", true}, - {WM_NCCALCSIZE, "WM_NCCALCSIZE", true}, - {WM_NCACTIVATE, "WM_NCACTIVATE", true}, - {WM_NCMOUSEMOVE, "WM_NCMOUSEMOVE", true}, - {WM_NCMOUSELEAVE, "WM_NCMOUSELEAVE", true}, - {WM_NCLBUTTONDOWN, "WM_NCLBUTTONDOWN", true}, - {WM_NCLBUTTONUP, "WM_NCLBUTTONUP", true}, - {WM_ACTIVATEAPP, "WM_ACTIVATEAPP", true}, - {WM_NCPAINT, "WM_NCPAINT", true}, - {WM_ERASEBKGND, "WM_ERASEBKGND", true}, - {WM_MOUSEMOVE, "WM_MOUSEMOVE", true}, - {WM_MOUSELEAVE, "WM_MOUSELEAVE", true}, - {WM_NCHITTEST, "WM_NCHITTEST", false}, -#ifdef WM_TOUCH - {WM_TOUCH, "WM_TOUCH", true}, -#endif - {WM_CHANGECBCHAIN, "WM_CHANGECBCHAIN", true}, - {WM_DISPLAYCHANGE, "WM_DISPLAYCHANGE", true}, - {WM_DRAWCLIPBOARD, "WM_DRAWCLIPBOARD", true}, - {WM_THEMECHANGED, "WM_THEMECHANGED", true}, - {0x90, "WM_UAHDESTROYWINDOW", true}, - {0x272, "WM_UNREGISTER_WINDOW_SERVICES", true}, -#ifdef WM_POINTERUPDATE - {WM_POINTERDEVICECHANGE, "WM_POINTERDEVICECHANGE", true}, - {WM_POINTERDEVICEINRANGE, "WM_POINTERDEVICEINRANGE", true}, - {WM_POINTERDEVICEOUTOFRANGE, "WM_POINTERDEVICEOUTOFRANGE", true}, - {WM_NCPOINTERUPDATE, "WM_NCPOINTERUPDATE", true}, - {WM_NCPOINTERDOWN, "WM_NCPOINTERDOWN", true}, - {WM_NCPOINTERUP, "WM_NCPOINTERUP", true}, - {WM_POINTERUPDATE, "WM_POINTERUPDATE", true}, - {WM_POINTERDOWN, "WM_POINTERDOWN", true}, - {WM_POINTERUP, "WM_POINTERUP", true}, - {WM_POINTERENTER, "WM_POINTERENTER", true}, - {WM_POINTERLEAVE, "WM_POINTERLEAVE", true}, - {WM_POINTERACTIVATE, "WM_POINTERACTIVATE", true}, - {WM_POINTERCAPTURECHANGED, "WM_POINTERCAPTURECHANGED", true}, - {WM_TOUCHHITTESTING, "WM_TOUCHHITTESTING", true}, - {WM_POINTERWHEEL, "WM_POINTERWHEEL", true}, - {WM_POINTERHWHEEL, "WM_POINTERHWHEEL", true}, -#endif // WM_POINTERUPDATE -#ifdef DM_POINTERHITTEST - {DM_POINTERHITTEST, "DM_POINTERHITTEST", true}, -#endif // DM_POINTERHITTEST -#ifdef WM_POINTERROUTEDTO - {WM_POINTERROUTEDTO, "WM_POINTERROUTEDTO", true}, - {WM_POINTERROUTEDAWAY, "WM_POINTERROUTEDAWAY", true}, - {WM_POINTERROUTEDRELEASED, "WM_POINTERROUTEDRELEASED", true}, -#endif // WM_POINTERROUTEDTO -}; - -static inline const MessageDebugEntry *messageDebugEntry(UINT msg) -{ - for (size_t i = 0; i < sizeof(messageDebugEntries)/sizeof(MessageDebugEntry); i++) - if (messageDebugEntries[i].message == msg) - return messageDebugEntries + i; - return 0; -} - -const char *QWindowsGuiEventDispatcher::windowsMessageName(UINT msg) -{ - if (const MessageDebugEntry *e = messageDebugEntry(msg)) - return e->description; - return "Unknown"; -} - -QT_END_NAMESPACE diff --git a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h deleted file mode 100644 index 4ff047a60e..0000000000 --- a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QWINDOWSGUIEVENTDISPATCHER_H -#define QWINDOWSGUIEVENTDISPATCHER_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -class QWindowsGuiEventDispatcher : public QEventDispatcherWin32 -{ - Q_OBJECT -public: - explicit QWindowsGuiEventDispatcher(QObject *parent = 0); - - static const char *windowsMessageName(UINT msg); - - bool QT_ENSURE_STACK_ALIGNED_FOR_SSE processEvents(QEventLoop::ProcessEventsFlags flags) override; - void sendPostedEvents() override; - -private: - QEventLoop::ProcessEventsFlags m_flags; -}; - -QT_END_NAMESPACE - -#endif // QWINDOWSGUIEVENTDISPATCHER_H diff --git a/src/plugins/platforms/direct2d/direct2d.pro b/src/plugins/platforms/direct2d/direct2d.pro index fc21c6f843..cf41ffa116 100644 --- a/src/plugins/platforms/direct2d/direct2d.pro +++ b/src/plugins/platforms/direct2d/direct2d.pro @@ -2,7 +2,6 @@ TARGET = qdirect2d QT += \ core-private gui-private \ - eventdispatcher_support-private \ fontdatabase_support-private LIBS += -ldwmapi -lversion -ld3d11 -ldxgi -ldxguid diff --git a/src/plugins/platforms/minimal/.prev_CMakeLists.txt b/src/plugins/platforms/minimal/.prev_CMakeLists.txt index e0ecf464cf..82a1040bd0 100644 --- a/src/plugins/platforms/minimal/.prev_CMakeLists.txt +++ b/src/plugins/platforms/minimal/.prev_CMakeLists.txt @@ -16,7 +16,6 @@ qt_internal_add_plugin(QMinimalIntegrationPlugin PUBLIC_LIBRARIES Qt::Core Qt::CorePrivate - Qt::EventDispatcherSupportPrivate Qt::Gui Qt::GuiPrivate ) @@ -27,6 +26,11 @@ qt_internal_add_plugin(QMinimalIntegrationPlugin ## Scopes: ##################################################################### +qt_extend_target(QMinimalIntegrationPlugin CONDITION UNIX + PUBLIC_LIBRARIES + Qt::EventDispatcherSupportPrivate +) + qt_extend_target(QMinimalIntegrationPlugin CONDITION NOT APPLE PUBLIC_LIBRARIES Qt::FontDatabaseSupportPrivate @@ -37,5 +41,5 @@ qt_extend_target(QMinimalIntegrationPlugin CONDITION QT_FEATURE_freetype WrapFreetype::WrapFreetype ) -#### Keys ignored in scope 4:.:.:minimal.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +#### Keys ignored in scope 5:.:.:minimal.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: # PLUGIN_EXTENDS = "-" diff --git a/src/plugins/platforms/minimal/CMakeLists.txt b/src/plugins/platforms/minimal/CMakeLists.txt index 9fd20bd3c4..1fd9437053 100644 --- a/src/plugins/platforms/minimal/CMakeLists.txt +++ b/src/plugins/platforms/minimal/CMakeLists.txt @@ -19,7 +19,6 @@ qt_internal_add_plugin(QMinimalIntegrationPlugin PUBLIC_LIBRARIES Qt::Core Qt::CorePrivate - Qt::EventDispatcherSupportPrivate Qt::Gui Qt::GuiPrivate ) @@ -30,6 +29,11 @@ qt_internal_add_plugin(QMinimalIntegrationPlugin ## Scopes: ##################################################################### +qt_extend_target(QMinimalIntegrationPlugin CONDITION UNIX + PUBLIC_LIBRARIES + Qt::EventDispatcherSupportPrivate +) + qt_extend_target(QMinimalIntegrationPlugin CONDITION NOT APPLE PUBLIC_LIBRARIES Qt::FontDatabaseSupportPrivate @@ -40,5 +44,5 @@ qt_extend_target(QMinimalIntegrationPlugin CONDITION QT_FEATURE_freetype WrapFreetype::WrapFreetype ) -#### Keys ignored in scope 4:.:.:minimal.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +#### Keys ignored in scope 5:.:.:minimal.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: # PLUGIN_EXTENDS = "-" diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index eaa5deb721..345244a820 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -1,9 +1,9 @@ TARGET = qminimal QT += \ - core-private gui-private \ - eventdispatcher_support-private + core-private gui-private +!win32: QT += eventdispatcher_support-private !darwin: QT += fontdatabase_support-private DEFINES += QT_NO_FOREACH diff --git a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt index 06861088b9..e36b70588a 100644 --- a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt +++ b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt @@ -17,7 +17,6 @@ qt_internal_add_plugin(QOffscreenIntegrationPlugin PUBLIC_LIBRARIES Qt::Core Qt::CorePrivate - Qt::EventDispatcherSupportPrivate Qt::Gui Qt::GuiPrivate ) @@ -28,6 +27,11 @@ qt_internal_add_plugin(QOffscreenIntegrationPlugin ## Scopes: ##################################################################### +qt_extend_target(QOffscreenIntegrationPlugin CONDITION UNIX + PUBLIC_LIBRARIES + Qt::EventDispatcherSupportPrivate +) + qt_extend_target(QOffscreenIntegrationPlugin CONDITION NOT APPLE PUBLIC_LIBRARIES Qt::FontDatabaseSupportPrivate @@ -40,5 +44,5 @@ qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_ Qt::GlxSupportPrivate ) -#### Keys ignored in scope 4:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +#### Keys ignored in scope 5:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: # PLUGIN_EXTENDS = "-" diff --git a/src/plugins/platforms/offscreen/CMakeLists.txt b/src/plugins/platforms/offscreen/CMakeLists.txt index 5d9dd0083c..446d8ff94b 100644 --- a/src/plugins/platforms/offscreen/CMakeLists.txt +++ b/src/plugins/platforms/offscreen/CMakeLists.txt @@ -18,7 +18,6 @@ qt_internal_add_plugin(QOffscreenIntegrationPlugin PUBLIC_LIBRARIES Qt::Core Qt::CorePrivate - Qt::EventDispatcherSupportPrivate Qt::Gui Qt::GuiPrivate ) @@ -29,6 +28,11 @@ qt_internal_add_plugin(QOffscreenIntegrationPlugin ## Scopes: ##################################################################### +qt_extend_target(QOffscreenIntegrationPlugin CONDITION UNIX + PUBLIC_LIBRARIES + Qt::EventDispatcherSupportPrivate +) + qt_extend_target(QOffscreenIntegrationPlugin CONDITION NOT APPLE PUBLIC_LIBRARIES Qt::FontDatabaseSupportPrivate @@ -41,5 +45,5 @@ qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_ Qt::GlxSupportPrivate ) -#### Keys ignored in scope 4:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +#### Keys ignored in scope 5:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: # PLUGIN_EXTENDS = "-" diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro index d44caf536c..c68d88bc59 100644 --- a/src/plugins/platforms/offscreen/offscreen.pro +++ b/src/plugins/platforms/offscreen/offscreen.pro @@ -1,9 +1,9 @@ TARGET = qoffscreen QT += \ - core-private gui-private \ - eventdispatcher_support-private + core-private gui-private +!win32: QT += eventdispatcher_support-private !darwin: QT += fontdatabase_support-private DEFINES += QT_NO_FOREACH diff --git a/src/plugins/platforms/windows/.prev_CMakeLists.txt b/src/plugins/platforms/windows/.prev_CMakeLists.txt index eb9d46aa85..3c1568ad53 100644 --- a/src/plugins/platforms/windows/.prev_CMakeLists.txt +++ b/src/plugins/platforms/windows/.prev_CMakeLists.txt @@ -50,11 +50,9 @@ qt_internal_add_plugin(QWindowsIntegrationPlugin PUBLIC_LIBRARIES Qt::Core Qt::CorePrivate - Qt::EventDispatcherSupportPrivate Qt::FontDatabaseSupportPrivate Qt::Gui Qt::GuiPrivate - Qt::ThemeSupportPrivate dwmapi imm32 oleaut32 @@ -93,38 +91,13 @@ qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl Qt::OpenGLPrivate ) -qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility - SOURCES - uiautomation/qwindowsuiaaccessibility.cpp uiautomation/qwindowsuiaaccessibility.h - uiautomation/qwindowsuiabaseprovider.cpp uiautomation/qwindowsuiabaseprovider.h - uiautomation/qwindowsuiaexpandcollapseprovider.cpp uiautomation/qwindowsuiaexpandcollapseprovider.h - uiautomation/qwindowsuiagriditemprovider.cpp uiautomation/qwindowsuiagriditemprovider.h - uiautomation/qwindowsuiagridprovider.cpp uiautomation/qwindowsuiagridprovider.h - uiautomation/qwindowsuiainvokeprovider.cpp uiautomation/qwindowsuiainvokeprovider.h - uiautomation/qwindowsuiamainprovider.cpp uiautomation/qwindowsuiamainprovider.h - uiautomation/qwindowsuiaprovidercache.cpp uiautomation/qwindowsuiaprovidercache.h - uiautomation/qwindowsuiarangevalueprovider.cpp uiautomation/qwindowsuiarangevalueprovider.h - uiautomation/qwindowsuiaselectionitemprovider.cpp uiautomation/qwindowsuiaselectionitemprovider.h - uiautomation/qwindowsuiaselectionprovider.cpp uiautomation/qwindowsuiaselectionprovider.h - uiautomation/qwindowsuiatableitemprovider.cpp uiautomation/qwindowsuiatableitemprovider.h - uiautomation/qwindowsuiatableprovider.cpp uiautomation/qwindowsuiatableprovider.h - uiautomation/qwindowsuiatextprovider.cpp uiautomation/qwindowsuiatextprovider.h - uiautomation/qwindowsuiatextrangeprovider.cpp uiautomation/qwindowsuiatextrangeprovider.h - uiautomation/qwindowsuiatoggleprovider.cpp uiautomation/qwindowsuiatoggleprovider.h - uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h - uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h - uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h - PUBLIC_LIBRARIES - Qt::AccessibilitySupportPrivate -) - qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_directwrite3 DEFINES QT_USE_DIRECTWRITE2 QT_USE_DIRECTWRITE3 ) -#### Keys ignored in scope 5:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +#### Keys ignored in scope 4:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: # PLUGIN_EXTENDS = "-" qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_dynamicgl @@ -203,6 +176,29 @@ if(QT_FEATURE_imageformat_png) ) endif() +qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility + SOURCES + uiautomation/qwindowsuiaaccessibility.cpp uiautomation/qwindowsuiaaccessibility.h + uiautomation/qwindowsuiabaseprovider.cpp uiautomation/qwindowsuiabaseprovider.h + uiautomation/qwindowsuiaexpandcollapseprovider.cpp uiautomation/qwindowsuiaexpandcollapseprovider.h + uiautomation/qwindowsuiagriditemprovider.cpp uiautomation/qwindowsuiagriditemprovider.h + uiautomation/qwindowsuiagridprovider.cpp uiautomation/qwindowsuiagridprovider.h + uiautomation/qwindowsuiainvokeprovider.cpp uiautomation/qwindowsuiainvokeprovider.h + uiautomation/qwindowsuiamainprovider.cpp uiautomation/qwindowsuiamainprovider.h + uiautomation/qwindowsuiaprovidercache.cpp uiautomation/qwindowsuiaprovidercache.h + uiautomation/qwindowsuiarangevalueprovider.cpp uiautomation/qwindowsuiarangevalueprovider.h + uiautomation/qwindowsuiaselectionitemprovider.cpp uiautomation/qwindowsuiaselectionitemprovider.h + uiautomation/qwindowsuiaselectionprovider.cpp uiautomation/qwindowsuiaselectionprovider.h + uiautomation/qwindowsuiatableitemprovider.cpp uiautomation/qwindowsuiatableitemprovider.h + uiautomation/qwindowsuiatableprovider.cpp uiautomation/qwindowsuiatableprovider.h + uiautomation/qwindowsuiatextprovider.cpp uiautomation/qwindowsuiatextprovider.h + uiautomation/qwindowsuiatextrangeprovider.cpp uiautomation/qwindowsuiatextrangeprovider.h + uiautomation/qwindowsuiatoggleprovider.cpp uiautomation/qwindowsuiatoggleprovider.h + uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h + uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h + uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h +) + qt_extend_target(QWindowsIntegrationPlugin CONDITION MINGW AND QT_FEATURE_accessibility PUBLIC_LIBRARIES uuid diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt index 1c5e2eb309..823ba613a3 100644 --- a/src/plugins/platforms/windows/CMakeLists.txt +++ b/src/plugins/platforms/windows/CMakeLists.txt @@ -51,7 +51,6 @@ qt_internal_add_plugin(QWindowsIntegrationPlugin PUBLIC_LIBRARIES Qt::Core Qt::CorePrivate - Qt::EventDispatcherSupportPrivate Qt::FontDatabaseSupportPrivate Qt::Gui Qt::GuiPrivate @@ -93,36 +92,13 @@ qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl Qt::OpenGLPrivate ) -qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility - SOURCES - uiautomation/qwindowsuiaaccessibility.cpp uiautomation/qwindowsuiaaccessibility.h - uiautomation/qwindowsuiabaseprovider.cpp uiautomation/qwindowsuiabaseprovider.h - uiautomation/qwindowsuiaexpandcollapseprovider.cpp uiautomation/qwindowsuiaexpandcollapseprovider.h - uiautomation/qwindowsuiagriditemprovider.cpp uiautomation/qwindowsuiagriditemprovider.h - uiautomation/qwindowsuiagridprovider.cpp uiautomation/qwindowsuiagridprovider.h - uiautomation/qwindowsuiainvokeprovider.cpp uiautomation/qwindowsuiainvokeprovider.h - uiautomation/qwindowsuiamainprovider.cpp uiautomation/qwindowsuiamainprovider.h - uiautomation/qwindowsuiaprovidercache.cpp uiautomation/qwindowsuiaprovidercache.h - uiautomation/qwindowsuiarangevalueprovider.cpp uiautomation/qwindowsuiarangevalueprovider.h - uiautomation/qwindowsuiaselectionitemprovider.cpp uiautomation/qwindowsuiaselectionitemprovider.h - uiautomation/qwindowsuiaselectionprovider.cpp uiautomation/qwindowsuiaselectionprovider.h - uiautomation/qwindowsuiatableitemprovider.cpp uiautomation/qwindowsuiatableitemprovider.h - uiautomation/qwindowsuiatableprovider.cpp uiautomation/qwindowsuiatableprovider.h - uiautomation/qwindowsuiatextprovider.cpp uiautomation/qwindowsuiatextprovider.h - uiautomation/qwindowsuiatextrangeprovider.cpp uiautomation/qwindowsuiatextrangeprovider.h - uiautomation/qwindowsuiatoggleprovider.cpp uiautomation/qwindowsuiatoggleprovider.h - uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h - uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h - uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h -) - qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_directwrite3 DEFINES QT_USE_DIRECTWRITE2 QT_USE_DIRECTWRITE3 ) -#### Keys ignored in scope 5:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +#### Keys ignored in scope 4:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: # PLUGIN_EXTENDS = "-" qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_dynamicgl @@ -201,6 +177,29 @@ if(QT_FEATURE_imageformat_png) ) endif() +qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility + SOURCES + uiautomation/qwindowsuiaaccessibility.cpp uiautomation/qwindowsuiaaccessibility.h + uiautomation/qwindowsuiabaseprovider.cpp uiautomation/qwindowsuiabaseprovider.h + uiautomation/qwindowsuiaexpandcollapseprovider.cpp uiautomation/qwindowsuiaexpandcollapseprovider.h + uiautomation/qwindowsuiagriditemprovider.cpp uiautomation/qwindowsuiagriditemprovider.h + uiautomation/qwindowsuiagridprovider.cpp uiautomation/qwindowsuiagridprovider.h + uiautomation/qwindowsuiainvokeprovider.cpp uiautomation/qwindowsuiainvokeprovider.h + uiautomation/qwindowsuiamainprovider.cpp uiautomation/qwindowsuiamainprovider.h + uiautomation/qwindowsuiaprovidercache.cpp uiautomation/qwindowsuiaprovidercache.h + uiautomation/qwindowsuiarangevalueprovider.cpp uiautomation/qwindowsuiarangevalueprovider.h + uiautomation/qwindowsuiaselectionitemprovider.cpp uiautomation/qwindowsuiaselectionitemprovider.h + uiautomation/qwindowsuiaselectionprovider.cpp uiautomation/qwindowsuiaselectionprovider.h + uiautomation/qwindowsuiatableitemprovider.cpp uiautomation/qwindowsuiatableitemprovider.h + uiautomation/qwindowsuiatableprovider.cpp uiautomation/qwindowsuiatableprovider.h + uiautomation/qwindowsuiatextprovider.cpp uiautomation/qwindowsuiatextprovider.h + uiautomation/qwindowsuiatextrangeprovider.cpp uiautomation/qwindowsuiatextrangeprovider.h + uiautomation/qwindowsuiatoggleprovider.cpp uiautomation/qwindowsuiatoggleprovider.h + uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h + uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h + uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h +) + qt_extend_target(QWindowsIntegrationPlugin CONDITION MINGW AND QT_FEATURE_accessibility PUBLIC_LIBRARIES uuid diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp index b23904e978..01377a55e0 100644 --- a/src/plugins/platforms/windows/qwindowsclipboard.cpp +++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp @@ -54,7 +54,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 170c2818c3..9b7c89fa05 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -84,7 +84,7 @@ #include #include -#include +#include #include #include diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 315b65acfe..2d014a7c07 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -77,7 +77,7 @@ #include #include -#include +#include #include #include diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index 4f46c05f7a..02e397ca9f 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #if defined(WM_APPCOMMAND) diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro index c9549f0eaf..258ffb0c0d 100644 --- a/src/plugins/platforms/windows/windows.pro +++ b/src/plugins/platforms/windows/windows.pro @@ -2,7 +2,6 @@ TARGET = qwindows QT += \ core-private gui-private \ - eventdispatcher_support-private \ fontdatabase_support-private qtConfig(opengl): QT += opengl-private -- cgit v1.2.3