From d2997b92666f19ab86b9571f54ed9573fa057c30 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 9 Jul 2015 12:43:49 +0200 Subject: on failure to load platform plugin, show the path(s) checked The error message was not informative enough to troubleshoot. Change-Id: Ib21fce238c80b31d21939d139fc173b48eb5ceb8 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qguiapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qguiapplication.cpp') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 7d469dd25e..b8c7bbba0a 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1058,7 +1058,7 @@ static void init_platform(const QString &pluginArgument, const QString &platform QStringList keys = QPlatformIntegrationFactory::keys(platformPluginPath); QString fatalMessage - = QStringLiteral("This application failed to start because it could not find or load the Qt platform plugin \"%1\".\n\n").arg(name); + = QStringLiteral("This application failed to start because it could not find or load the Qt platform plugin \"%1\"\nin \"%2\".\n\n").arg(name, QDir::toNativeSeparators(platformPluginPath)); if (!keys.isEmpty()) { fatalMessage += QStringLiteral("Available platform plugins are: %1.\n\n").arg( keys.join(QStringLiteral(", "))); -- cgit v1.2.3 From ee9621b9dc6cab96df627aa7b926e6256ea2102a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 26 Jan 2016 13:28:37 +0100 Subject: Move shortcut handling back into QGuiApplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit c7e5e1d9e01849 assumed shortcut handling could be done at the QPA level, but this fails on async platforms where there are e.g activation events in the QPA queue and we then try to handle the shortcut synchronously. This commit restores the handling to QtGui for non-OS X platforms, and we should fix OS X by adding callbacks through the IME for the special case of OS X. Task-number: QTBUG-50467 Change-Id: I7460184cc60d0319f07771eec487325a17d7e7e7 Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qguiapplication.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gui/kernel/qguiapplication.cpp') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index b8c7bbba0a..a19abccb37 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1960,6 +1960,15 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE window = QGuiApplication::focusWindow(); } +#if !defined(Q_OS_OSX) + // FIXME: Include OS X in this code path by passing the key event through + // QPlatformInputContext::filterEvent(). + if (e->keyType == QEvent::KeyPress && window) { + QWindowSystemInterface::handleShortcutEvent(window, e->timestamp, e->key, e->modifiers, + e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers, e->unicode, e->repeat, e->repeatCount); + } +#endif + QKeyEvent ev(e->keyType, e->key, e->modifiers, e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers, e->unicode, e->repeat, e->repeatCount); -- cgit v1.2.3 From 8c843712da2510beb7f510c1885df819edbdf058 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 14 Dec 2015 14:47:01 +0100 Subject: Doc: a QScreen can be a placeholder if there are no screens attached MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of change a094af001795c9651b299d700a992150d1aba33a, X11 now joins other platforms in having a fake screen if no physical screens are attached, rather than ever allowing QGuiApplication::screens() to return an empty list or QGuiApplication::primaryScreen() to return null. This is more consistent across platforms and helps to prevent bugs in applications which want to use QScreen in some context but fail to check whether it exists. [ChangeLog][X11] In case there are no physical screens attached, QGuiApplication::screens() and QGuiApplication::primaryScreen() will return a placeholder QScreen object. Task-number: QTBUG-42985 Change-Id: I0f58afbfe2a034fb9e872a5d1dbdabad2c7dbf9e Reviewed-by: Błażej Szczygieł Reviewed-by: Paul Olav Tvete --- src/gui/kernel/qguiapplication.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/gui/kernel/qguiapplication.cpp') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a19abccb37..8352c95457 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -921,15 +921,10 @@ QList QGuiApplication::screens() /*! \property QGuiApplication::primaryScreen - \brief the primary (or default) screen of the application, or null if there is none. + \brief the primary (or default) screen of the application. This will be the screen where QWindows are initially shown, unless otherwise specified. - On some platforms, it may be null when there are actually no screens connected. - It is not possible to start a new QGuiApplication while there are no screens. - Applications which were running at the time the primary screen was removed - will stop rendering graphics until one or more screens are restored. - The primaryScreenChanged signal was introduced in Qt 5.6. \sa screens() -- cgit v1.2.3 From 98dedefd0cfe3a21b2fc7310f6002076f0e54c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 29 Jan 2016 12:14:09 +0100 Subject: Don't send regular key press event if it matched a shortcut MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression after ee9621b9dc6cab96df627aa7b926e6256ea2102a. Change-Id: If4a5595d7f191563d0636ccee20cf0ac8c7c0f1f Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qguiapplication.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/kernel/qguiapplication.cpp') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8352c95457..65d679cdad 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1959,8 +1959,9 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE // FIXME: Include OS X in this code path by passing the key event through // QPlatformInputContext::filterEvent(). if (e->keyType == QEvent::KeyPress && window) { - QWindowSystemInterface::handleShortcutEvent(window, e->timestamp, e->key, e->modifiers, - e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers, e->unicode, e->repeat, e->repeatCount); + if (QWindowSystemInterface::handleShortcutEvent(window, e->timestamp, e->key, e->modifiers, + e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers, e->unicode, e->repeat, e->repeatCount)) + return; } #endif -- cgit v1.2.3