summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-18 09:01:51 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-18 09:01:51 +0100
commitc7934f2489e2eb9a539206bab35f335b1943c5bd (patch)
treea27d0ed6c001fe9432e2a0f28fb935acf9e4c65f /src/platformsupport
parentf40593b11199fbef886bfcb6b210a214d8c3adf3 (diff)
parent08f9a1bd6ab9b1777ee5ba163d75e5c848c39eb4 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/eventdispatchers/eventdispatchers.pri6
-rw-r--r--src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp197
-rw-r--r--src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h69
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp8
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp3
5 files changed, 281 insertions, 2 deletions
diff --git a/src/platformsupport/eventdispatchers/eventdispatchers.pri b/src/platformsupport/eventdispatchers/eventdispatchers.pri
index 6e16a46b34..a0b37cae1a 100644
--- a/src/platformsupport/eventdispatchers/eventdispatchers.pri
+++ b/src/platformsupport/eventdispatchers/eventdispatchers.pri
@@ -6,6 +6,12 @@ SOURCES +=\
HEADERS +=\
$$PWD/qunixeventdispatcher_qpa_p.h\
$$PWD/qgenericunixeventdispatcher_p.h\
+} else: win32 {
+SOURCES +=\
+ $$PWD/qwindowsguieventdispatcher.cpp
+
+HEADERS +=\
+ $$PWD/qwindowsguieventdispatcher_p.h
}
contains(QT_CONFIG, glib) {
diff --git a/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
new file mode 100644
index 0000000000..f57d16f51d
--- /dev/null
+++ b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher.cpp
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qwindowsguieventdispatcher_p.h"
+
+#include <qpa/qwindowsysteminterface.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
+
+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 Lighthouse gui events should be done
+ from within the qWindowsWndProc to ensure correct processing of messages.
+
+ \internal
+ \ingroup qt-lighthouse-win
+*/
+
+QWindowsGuiEventDispatcher::QWindowsGuiEventDispatcher(QObject *parent) :
+ QEventDispatcherWin32(parent), m_flags(0)
+{
+ 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_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(Q_OS_WINCE) && !defined(QT_NO_SESSIONMANAGER)
+ {WM_QUERYENDSESSION, "WM_QUERYENDSESSION", true},
+ {WM_ENDSESSION, "WM_ENDSESSION", true},
+#endif
+#ifndef Q_OS_WINCE
+ {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_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},
+#endif // !Q_OS_WINCE
+ {WM_THEMECHANGED, "WM_THEMECHANGED", true}
+};
+
+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
new file mode 100644
index 0000000000..1e9c906cc8
--- /dev/null
+++ b/src/platformsupport/eventdispatchers/qwindowsguieventdispatcher_p.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://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 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $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 for the convenience
+// of the QLibrary class. This header file may change from
+// version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/private/qeventdispatcher_win_p.h>
+
+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) Q_DECL_OVERRIDE;
+ void sendPostedEvents() Q_DECL_OVERRIDE;
+
+private:
+ QEventLoop::ProcessEventsFlags m_flags;
+};
+
+QT_END_NAMESPACE
+
+#endif // QWINDOWSGUIEVENTDISPATCHER_H
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
index 8e7a393613..2a39fc1bbd 100644
--- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
@@ -243,7 +243,13 @@ static const char *specialLanguages[] = {
"sa", // Siddham
"sd", // Khudawadi
"mai", // Tirhuta
- "hoc" // WarangCiti
+ "hoc", // WarangCiti
+ "", // Ahom
+ "", // AnatolianHieroglyphs
+ "", // Hatran
+ "", // Multani
+ "", // OldHungarian
+ "" // SignWriting
};
Q_STATIC_ASSERT(sizeof(specialLanguages) / sizeof(const char *) == QChar::ScriptCount);
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index e12cda25ba..60fb7e2cce 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -609,8 +609,9 @@ QVariant QGnomeTheme::themeHint(QPlatformTheme::ThemeHint hint) const
case QPlatformTheme::DialogButtonBoxLayout:
return QVariant(QPlatformDialogHelper::GnomeLayout);
case QPlatformTheme::SystemIconThemeName:
+ return QVariant(QStringLiteral("Adwaita"));
case QPlatformTheme::SystemIconFallbackThemeName:
- return QVariant(QString(QStringLiteral("gnome")));
+ return QVariant(QStringLiteral("gnome"));
case QPlatformTheme::IconThemeSearchPaths:
return QVariant(QGenericUnixTheme::xdgIconThemePaths());
case QPlatformTheme::StyleNames: {