From be2e993a9ac03a6fc43b2fa15f3df068984acd70 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Thu, 22 Oct 2015 20:04:21 +0300 Subject: Fix build with 'udpsocket' feature disabled Wrap related code in QNativeSocketEngine and the tuiotouch plugin in conditionals. Change-Id: Ic6861b1c6a9e041fa8a50f96149f7280473a9fba Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- src/plugins/generic/generic.pro | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/generic/generic.pro b/src/plugins/generic/generic.pro index 82a4ad4ce8..0c1943b7dd 100644 --- a/src/plugins/generic/generic.pro +++ b/src/plugins/generic/generic.pro @@ -1,5 +1,7 @@ TEMPLATE = subdirs +load(qfeatures) + contains(QT_CONFIG, evdev) { SUBDIRS += evdevmouse evdevtouch evdevkeyboard evdevtablet } @@ -8,7 +10,9 @@ contains(QT_CONFIG, tslib) { SUBDIRS += tslib } -SUBDIRS += tuiotouch +!contains(QT_DISABLED_FEATURES, udpsocket) { + SUBDIRS += tuiotouch +} contains(QT_CONFIG, libinput) { SUBDIRS += libinput -- cgit v1.2.3 From fe4ab7edce3863a23d5871634d93f0b855aa93ac Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 16 Nov 2015 12:07:15 +0100 Subject: iOS: always flush spontaneous key press events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we changed sending key events through QPA instead of directly to the focus object, we only flushed from deleteBackward (06be9f026). The reason was to avoid unnecessary flushes, as this in general can be a source to recursion problems. It turns out that this is also needed when sending Qt::Key_Return. The reason is that we sometimes resign first responder when the return key is pressed, which will also change the focus object in Qt. And without flushing the key event first, it will be processed after the change and therefore end up at the wrong object. It seems like the most sensible thing is to always flush upon receiving spontaneous key/text events from iOS, which is also how it was before. Task-number: QTBUG-49021 Change-Id: I44885a11275dee5039ef6a8abbcbdadc092695e7 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiostextresponder.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm index c9120e848c..f3ea68cdc4 100644 --- a/src/plugins/platforms/ios/qiostextresponder.mm +++ b/src/plugins/platforms/ios/qiostextresponder.mm @@ -329,6 +329,7 @@ { QWindowSystemInterface::handleKeyEvent(qApp->focusWindow(), QEvent::KeyPress, key, modifiers); QWindowSystemInterface::handleKeyEvent(qApp->focusWindow(), QEvent::KeyRelease, key, modifiers); + QWindowSystemInterface::flushWindowSystemEvents(); } #ifndef QT_NO_SHORTCUT @@ -875,7 +876,6 @@ // UITextInput selects the text to be deleted before calling this method. To avoid // drawing the selection, we flush after posting the key press/release. [self sendKeyPressRelease:Qt::Key_Backspace modifiers:Qt::NoModifier]; - QWindowSystemInterface::flushWindowSystemEvents(); } @end -- cgit v1.2.3 From e5ca416e2f2f17d6a4213094b547ccb6d44d4e56 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 23 Nov 2015 11:39:20 +0100 Subject: Windows QPA: Add API for setting the application orientation preference. Dynamically load the Win32 API functions for setting the rotation preference and map this to static functions taking a Qt::ScreenOrientation in QWindowsScreen. Task-number: QTBUG-49541 Change-Id: I1c81cf6274d79a023a2ee755dd7c085ffd7cc015 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/windows/qwindowscontext.cpp | 5 +- src/plugins/platforms/windows/qwindowscontext.h | 6 ++ src/plugins/platforms/windows/qwindowsscreen.cpp | 68 +++++++++++++++++++++++ src/plugins/platforms/windows/qwindowsscreen.h | 3 + 4 files changed, 81 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 5cda6379de..f2f6402889 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -177,7 +177,8 @@ QWindowsUser32DLL::QWindowsUser32DLL() : isHungAppWindow(0), isTouchWindow(0), registerTouchWindow(0), unregisterTouchWindow(0), getTouchInputInfo(0), closeTouchInputHandle(0), setProcessDPIAware(0), - addClipboardFormatListener(0), removeClipboardFormatListener(0) + addClipboardFormatListener(0), removeClipboardFormatListener(0), + getDisplayAutoRotationPreferences(0), setDisplayAutoRotationPreferences(0) { } @@ -198,6 +199,8 @@ void QWindowsUser32DLL::init() addClipboardFormatListener = (AddClipboardFormatListener)library.resolve("AddClipboardFormatListener"); removeClipboardFormatListener = (RemoveClipboardFormatListener)library.resolve("RemoveClipboardFormatListener"); } + getDisplayAutoRotationPreferences = (GetDisplayAutoRotationPreferences)library.resolve("GetDisplayAutoRotationPreferences"); + setDisplayAutoRotationPreferences = (SetDisplayAutoRotationPreferences)library.resolve("SetDisplayAutoRotationPreferences"); } bool QWindowsUser32DLL::initTouch() diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h index 641e3ed41f..d08fc8f726 100644 --- a/src/plugins/platforms/windows/qwindowscontext.h +++ b/src/plugins/platforms/windows/qwindowscontext.h @@ -94,6 +94,8 @@ struct QWindowsUser32DLL typedef BOOL (WINAPI *SetProcessDPIAware)(); typedef BOOL (WINAPI *AddClipboardFormatListener)(HWND); typedef BOOL (WINAPI *RemoveClipboardFormatListener)(HWND); + typedef BOOL (WINAPI *GetDisplayAutoRotationPreferences)(DWORD *); + typedef BOOL (WINAPI *SetDisplayAutoRotationPreferences)(DWORD); // Functions missing in Q_CC_GNU stub libraries. SetLayeredWindowAttributes setLayeredWindowAttributes; @@ -116,6 +118,10 @@ struct QWindowsUser32DLL // Clipboard listeners, Windows Vista onwards AddClipboardFormatListener addClipboardFormatListener; RemoveClipboardFormatListener removeClipboardFormatListener; + + // Rotation API + GetDisplayAutoRotationPreferences getDisplayAutoRotationPreferences; + SetDisplayAutoRotationPreferences setDisplayAutoRotationPreferences; }; struct QWindowsShell32DLL diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index e69665e4a9..02696c87cd 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -325,6 +325,74 @@ void QWindowsScreen::handleChanges(const QWindowsScreenData &newData) } } +enum OrientationPreference // matching Win32 API ORIENTATION_PREFERENCE +#if defined(Q_COMPILER_CLASS_ENUM) || defined(Q_CC_MSVC) + : DWORD +#endif +{ + orientationPreferenceNone = 0, + orientationPreferenceLandscape = 0x1, + orientationPreferencePortrait = 0x2, + orientationPreferenceLandscapeFlipped = 0x4, + orientationPreferencePortraitFlipped = 0x8 +}; + +bool QWindowsScreen::setOrientationPreference(Qt::ScreenOrientation o) +{ + bool result = false; +#ifndef Q_OS_WINCE + if (QWindowsContext::user32dll.setDisplayAutoRotationPreferences) { + DWORD orientationPreference = 0; + switch (o) { + case Qt::PrimaryOrientation: + orientationPreference = orientationPreferenceNone; + break; + case Qt::PortraitOrientation: + orientationPreference = orientationPreferencePortrait; + break; + case Qt::LandscapeOrientation: + orientationPreference = orientationPreferenceLandscape; + break; + case Qt::InvertedPortraitOrientation: + orientationPreference = orientationPreferencePortraitFlipped; + break; + case Qt::InvertedLandscapeOrientation: + orientationPreference = orientationPreferenceLandscapeFlipped; + break; + } + result = QWindowsContext::user32dll.setDisplayAutoRotationPreferences(orientationPreference); + } +#endif // !Q_OS_WINCE + return result; +} + +Qt::ScreenOrientation QWindowsScreen::orientationPreference() +{ + Qt::ScreenOrientation result = Qt::PrimaryOrientation; +#ifndef Q_OS_WINCE + if (QWindowsContext::user32dll.getDisplayAutoRotationPreferences) { + DWORD orientationPreference = 0; + if (QWindowsContext::user32dll.getDisplayAutoRotationPreferences(&orientationPreference)) { + switch (orientationPreference) { + case orientationPreferenceLandscape: + result = Qt::LandscapeOrientation; + break; + case orientationPreferencePortrait: + result = Qt::PortraitOrientation; + break; + case orientationPreferenceLandscapeFlipped: + result = Qt::InvertedLandscapeOrientation; + break; + case orientationPreferencePortraitFlipped: + result = Qt::InvertedPortraitOrientation; + break; + } + } + } +#endif // !Q_OS_WINCE + return result; +} + /*! \brief Queries ClearType settings to check the pixel layout */ diff --git a/src/plugins/platforms/windows/qwindowsscreen.h b/src/plugins/platforms/windows/qwindowsscreen.h index 879cda047e..b46bd88ec6 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.h +++ b/src/plugins/platforms/windows/qwindowsscreen.h @@ -97,6 +97,9 @@ public: QPixmap grabWindow(WId window, int qX, int qY, int qWidth, int qHeight) const Q_DECL_OVERRIDE; QPlatformScreen::SubpixelAntialiasingType subpixelAntialiasingTypeHint() const Q_DECL_OVERRIDE; + static Qt::ScreenOrientation orientationPreference(); + static bool setOrientationPreference(Qt::ScreenOrientation o); + inline void handleChanges(const QWindowsScreenData &newData); #ifndef QT_NO_CURSOR -- cgit v1.2.3 From b4c8e1517455becb138876c08b3bdd880a80770d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 23 Nov 2015 12:02:24 +0100 Subject: Windows Open GL blacklist: Introduce keyword "disable_rotation". Add a flag to disable rotation to the Renderers enumeration of QWindowsOpenGLTester triggered by the keyword "disable_rotation". Specifying this keyword forces the application to landscape mode for Desktop GL. It is intended for drivers that have issues with rotation. Task-number: QTBUG-49541 Change-Id: I0f0bb7415c59e98648be09b34a59dd201d52b211 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/windows/qwindowsintegration.cpp | 17 ++++++++++++++--- src/plugins/platforms/windows/qwindowsopengltester.cpp | 5 ++++- src/plugins/platforms/windows/qwindowsopengltester.h | 4 +++- 3 files changed, 21 insertions(+), 5 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 797a96cda7..6b50ebe8a1 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -338,11 +338,18 @@ QWindowsWindow *QWindowsIntegration::createPlatformWindowHelper(QWindow *window, QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate() { #if defined(QT_OPENGL_DYNAMIC) + const QWindowsOpenGLTester::Renderers supportedRenderers = QWindowsOpenGLTester::supportedRenderers(); + QWindowsOpenGLTester::Renderer requestedRenderer = QWindowsOpenGLTester::requestedRenderer(); switch (requestedRenderer) { case QWindowsOpenGLTester::DesktopGl: - if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create()) + if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create()) { + if ((supportedRenderers & QWindowsOpenGLTester::DisableRotationFlag) + && !QWindowsScreen::setOrientationPreference(Qt::LandscapeOrientation)) { + qCWarning(lcQpaGl, "Unable to disable rotation."); + } return glCtx; + } qCWarning(lcQpaGl, "System OpenGL failed. Falling back to Software OpenGL."); return QOpenGLStaticContext::create(true); // If ANGLE is requested, use it, don't try anything else. @@ -363,10 +370,14 @@ QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate() break; } - const QWindowsOpenGLTester::Renderers supportedRenderers = QWindowsOpenGLTester::supportedRenderers(); if (supportedRenderers & QWindowsOpenGLTester::DesktopGl) { - if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create()) + if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create()) { + if ((supportedRenderers & QWindowsOpenGLTester::DisableRotationFlag) + && !QWindowsScreen::setOrientationPreference(Qt::LandscapeOrientation)) { + qCWarning(lcQpaGl, "Unable to disable rotation."); + } return glCtx; + } } if (QWindowsOpenGLTester::Renderers glesRenderers = supportedRenderers & QWindowsOpenGLTester::GlesMask) { if (QWindowsEGLStaticContext *eglCtx = QWindowsEGLStaticContext::create(glesRenderers)) diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp index e32a7e32af..fcbe488f93 100644 --- a/src/plugins/platforms/windows/qwindowsopengltester.cpp +++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp @@ -268,7 +268,10 @@ QWindowsOpenGLTester::Renderers QWindowsOpenGLTester::detectSupportedRenderers(c result &= ~QWindowsOpenGLTester::AngleRendererD3d9; } } - + if (features.contains(QStringLiteral("disable_rotation"))) { + qCDebug(lcQpaGl) << "Disabling rotation: " << gpu; + result |= DisableRotationFlag; + } srCache->insert(qgpu, result); return result; #endif // !Q_OS_WINCE && !QT_NO_OPENGL diff --git a/src/plugins/platforms/windows/qwindowsopengltester.h b/src/plugins/platforms/windows/qwindowsopengltester.h index f22031aa4e..0fad3d960e 100644 --- a/src/plugins/platforms/windows/qwindowsopengltester.h +++ b/src/plugins/platforms/windows/qwindowsopengltester.h @@ -76,7 +76,9 @@ public: AngleBackendMask = AngleRendererD3d11 | AngleRendererD3d9 | AngleRendererD3d11Warp, Gles = 0x0010, // ANGLE/unspecified or Generic GLES for Windows CE. GlesMask = Gles | AngleBackendMask, - SoftwareRasterizer = 0x0020 + SoftwareRasterizer = 0x0020, + RendererMask = 0x00FF, + DisableRotationFlag = 0x0100 }; Q_DECLARE_FLAGS(Renderers, Renderer) -- cgit v1.2.3 From a4ecd5f1b336629c3f1e0224e28c639a9d56757e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 20 Nov 2015 16:12:23 +0100 Subject: Windows: Open GL blacklist - Disable rotation for Intel HD Graphics 4000 / 5500. The driver causes crashes when switching orientation in full screen mode. Task-number: QTBUG-49541 Change-Id: I8293d4b2f2981fa627654d06894a74c922304ac3 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/windows/openglblacklists/default.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/openglblacklists/default.json b/src/plugins/platforms/windows/openglblacklists/default.json index 1e003e2d15..2672711d3a 100644 --- a/src/plugins/platforms/windows/openglblacklists/default.json +++ b/src/plugins/platforms/windows/openglblacklists/default.json @@ -66,6 +66,18 @@ "features": [ "disable_desktopgl", "disable_angle" ] + }, + { + "id": 6, + "description": "Intel(R) HD Graphics 4000 / 5500 cause crashes on orientation changes in fullscreen mode (QTBUG-49541)", + "vendor_id": "0x8086", + "device_id": [ "0x0166", "0x1616" ], + "os": { + "type": "win" + }, + "features": [ + "disable_rotation" + ] } ] } -- cgit v1.2.3 From 40a8302115d6bcc171b314c7d3b4e574b08b66b0 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 24 Oct 2015 12:41:08 +0200 Subject: QtBase: remove explicit function info from qWarning() etc This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/plugins/bearer/blackberry/qbbengine.cpp | 22 ++--- .../networkmanager/qnetworkmanagerservice.cpp | 6 +- src/plugins/platforms/cocoa/qcocoamenu.mm | 12 +-- src/plugins/platforms/cocoa/qcocoamenubar.mm | 6 +- src/plugins/platforms/cocoa/qcocoamenuitem.mm | 4 +- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 +- .../platforms/qnx/qqnxabstractnavigator.cpp | 2 +- src/plugins/platforms/qnx/qqnxbpseventfilter.cpp | 22 ++--- src/plugins/platforms/qnx/qqnxbuffer.cpp | 10 +- .../platforms/qnx/qqnxbuttoneventnotifier.cpp | 8 +- src/plugins/platforms/qnx/qqnxclipboard.cpp | 14 +-- src/plugins/platforms/qnx/qqnxeglwindow.cpp | 2 +- .../platforms/qnx/qqnxfiledialoghelper_bb10.cpp | 22 ++--- src/plugins/platforms/qnx/qqnxglcontext.cpp | 18 ++-- src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp | 108 ++++++++++----------- .../platforms/qnx/qqnxinputcontext_noimf.cpp | 14 +-- src/plugins/platforms/qnx/qqnxintegration.cpp | 40 ++++---- src/plugins/platforms/qnx/qqnxnavigatorbps.cpp | 2 +- .../platforms/qnx/qqnxnavigatoreventhandler.cpp | 14 +-- .../platforms/qnx/qqnxnavigatoreventnotifier.cpp | 20 ++-- src/plugins/platforms/qnx/qqnxnavigatorpps.cpp | 14 +-- .../platforms/qnx/qqnxrasterbackingstore.cpp | 14 +-- src/plugins/platforms/qnx/qqnxrasterwindow.cpp | 8 +- src/plugins/platforms/qnx/qqnxscreen.cpp | 32 +++--- .../platforms/qnx/qqnxscreeneventhandler.cpp | 22 ++--- .../platforms/qnx/qqnxscreeneventthread.cpp | 10 +- .../platforms/qnx/qqnxvirtualkeyboardbps.cpp | 18 ++-- .../platforms/qnx/qqnxvirtualkeyboardpps.cpp | 14 +-- src/plugins/platforms/qnx/qqnxwindow.cpp | 40 ++++---- .../platforms/windows/qwindowsclipboard.cpp | 2 +- .../platforms/windows/qwindowsglcontext.cpp | 4 +- src/plugins/platforms/winrt/qwinrtinputcontext.cpp | 4 +- src/plugins/platforms/xcb/qxcbxsettings.cpp | 4 +- 33 files changed, 267 insertions(+), 267 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/blackberry/qbbengine.cpp b/src/plugins/bearer/blackberry/qbbengine.cpp index d90d9fa217..5483c48eaa 100644 --- a/src/plugins/bearer/blackberry/qbbengine.cpp +++ b/src/plugins/bearer/blackberry/qbbengine.cpp @@ -151,14 +151,14 @@ void QBBEngine::disconnectFromId(const QString &id) void QBBEngine::initialize() { if (initialized) { - qWarning() << Q_FUNC_INFO << "called, but instance already initialized."; + qWarning("called, but instance already initialized."); return; } instanceStorage()->setLocalData(new EngineInstanceHolder(this)); if (netstatus_request_events(0) != BPS_SUCCESS) { - qWarning() << Q_FUNC_INFO << "cannot register for network events. Polling enabled."; + qWarning("cannot register for network events. Polling enabled."); const QMutexLocker locker(&pollingMutex); pollingRequired = true; @@ -176,12 +176,12 @@ void QBBEngine::requestUpdate() void QBBEngine::doRequestUpdate() { - qBearerDebug() << Q_FUNC_INFO << "entered method"; + qBearerDebug("entered method"); netstatus_interface_list_t interfaceList; if ((netstatus_get_interfaces(&interfaceList)) != BPS_SUCCESS) { - qBearerDebug() << Q_FUNC_INFO << "cannot retrieve interface list"; + qBearerDebug("cannot retrieve interface list"); return; } @@ -193,7 +193,7 @@ void QBBEngine::doRequestUpdate() for (int i = 0; i < interfaceList.num_interfaces; i++) { const char *interface = interfaceList.interfaces[i]; - qBearerDebug() << Q_FUNC_INFO << "discovered interface" << interface; + qBearerDebug() << "discovered interface" << interface; updateConfiguration(interface); @@ -262,7 +262,7 @@ QNetworkConfigurationPrivatePointer QBBEngine::defaultConfiguration() const QMutexLocker locker(&mutex); if (accessPointConfigurations.contains(id)) { - qBearerDebug() << Q_FUNC_INFO << "found default interface:" << id; + qBearerDebug() << "found default interface:" << id; return accessPointConfigurations.value(id); } @@ -287,7 +287,7 @@ bool QBBEngine::nativeEventFilter(const QByteArray &eventType, void *message, lo Q_ASSERT(event); if (bps_event_get_domain(event) == netstatus_get_domain()) { - qBearerDebug() << Q_FUNC_INFO << "got update request."; + qBearerDebug("got update request."); doRequestUpdate(); } @@ -299,7 +299,7 @@ void QBBEngine::updateConfiguration(const char *interface) netstatus_interface_details_t *details = 0; if (netstatus_get_interface_details(interface, &details) != BPS_SUCCESS) { - qBearerDebug() << Q_FUNC_INFO << "cannot retrieve details for interface" << interface; + qBearerDebug() << "cannot retrieve details for interface" << interface; return; } @@ -355,12 +355,12 @@ void QBBEngine::updateConfiguration(const char *interface) locker.unlock(); if (changed) { - qBearerDebug() << Q_FUNC_INFO << "configuration changed:" << interface; + qBearerDebug() << "configuration changed:" << interface; Q_EMIT configurationChanged(ptr); } else { // maybe Wifi has changed but gateway not yet ready etc. - qBearerDebug() << Q_FUNC_INFO << "configuration has not changed."; + qBearerDebug("configuration has not changed."); if (oldIpStatus != ipStatus) { // if IP status changed if (ipStatus != NETSTATUS_IP_STATUS_OK && ipStatus != NETSTATUS_IP_STATUS_ERROR_NOT_UP @@ -389,7 +389,7 @@ void QBBEngine::updateConfiguration(const char *interface) locker.unlock(); - qBearerDebug() << Q_FUNC_INFO << "configuration added:" << interface; + qBearerDebug() << "configuration added:" << interface; Q_EMIT configurationAdded(ptr); } diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp index 75c4ce2014..fc9a3281b8 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp @@ -74,7 +74,7 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent) if (!propsReply.isError()) { propertyMap = propsReply.value(); } else { - qWarning() << Q_FUNC_INFO << "propsReply"< > nmReply @@ -83,7 +83,7 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent) if (!nmReply.isError()) { devicesPathList = nmReply.value(); } else { - qWarning() << Q_FUNC_INFO <<"nmReply"<nsItem() menu]) { - qWarning() << Q_FUNC_INFO << "Menu item is already in a menu, remove it from the other menu first before inserting"; + qWarning("Menu item is already in a menu, remove it from the other menu first before inserting"); return; } // if the item we're inserting before is merged, skip along until @@ -326,7 +326,7 @@ void QCocoaMenu::insertNative(QCocoaMenuItem *item, QCocoaMenuItem *beforeItem) if (beforeItem) { if (beforeItem->isMerged()) { - qWarning() << Q_FUNC_INFO << "No non-merged before menu item found"; + qWarning("No non-merged before menu item found"); return; } NSUInteger nativeIndex = [m_nativeMenu indexOfItem:beforeItem->nsItem()]; @@ -342,7 +342,7 @@ void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem) QMacAutoReleasePool pool; QCocoaMenuItem *cocoaItem = static_cast(menuItem); if (!m_menuItems.contains(cocoaItem)) { - qWarning() << Q_FUNC_INFO << "Menu does not contain the item to be removed"; + qWarning("Menu does not contain the item to be removed"); return; } @@ -352,7 +352,7 @@ void QCocoaMenu::removeMenuItem(QPlatformMenuItem *menuItem) m_menuItems.removeOne(cocoaItem); if (!cocoaItem->isMerged()) { if (m_nativeMenu != [cocoaItem->nsItem() menu]) { - qWarning() << Q_FUNC_INFO << "Item to remove does not belong to this menu"; + qWarning("Item to remove does not belong to this menu"); return; } [m_nativeMenu removeItem: cocoaItem->nsItem()]; @@ -372,7 +372,7 @@ void QCocoaMenu::syncMenuItem(QPlatformMenuItem *menuItem) QMacAutoReleasePool pool; QCocoaMenuItem *cocoaItem = static_cast(menuItem); if (!m_menuItems.contains(cocoaItem)) { - qWarning() << Q_FUNC_INFO << "Item does not belong to this menu"; + qWarning("Item does not belong to this menu"); return; } diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.mm b/src/plugins/platforms/cocoa/qcocoamenubar.mm index 7775cdbde6..1a516f874b 100644 --- a/src/plugins/platforms/cocoa/qcocoamenubar.mm +++ b/src/plugins/platforms/cocoa/qcocoamenubar.mm @@ -108,12 +108,12 @@ void QCocoaMenuBar::insertMenu(QPlatformMenu *platformMenu, QPlatformMenu *befor #endif if (m_menus.contains(menu)) { - qWarning() << Q_FUNC_INFO << "This menu already belongs to the menubar, remove it first"; + qWarning("This menu already belongs to the menubar, remove it first"); return; } if (beforeMenu && !m_menus.contains(beforeMenu)) { - qWarning() << Q_FUNC_INFO << "The before menu does not belong to the menubar"; + qWarning("The before menu does not belong to the menubar"); return; } @@ -138,7 +138,7 @@ void QCocoaMenuBar::removeMenu(QPlatformMenu *platformMenu) { QCocoaMenu *menu = static_cast(platformMenu); if (!m_menus.contains(menu)) { - qWarning() << Q_FUNC_INFO << "Trying to remove a menu that does not belong to the menubar"; + qWarning("Trying to remove a menu that does not belong to the menubar"); return; } m_menus.removeOne(menu); diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index 0fc1bff325..0f551bcd7d 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -281,7 +281,7 @@ NSMenuItem *QCocoaMenuItem::sync() } default: - qWarning() << Q_FUNC_INFO << "menu item" << m_text << "has unsupported role" << (int)m_role; + qWarning() << "menu item" << m_text << "has unsupported role" << (int)m_role; } if (mergeItem) { @@ -398,7 +398,7 @@ QKeySequence QCocoaMenuItem::mergeAccel() void QCocoaMenuItem::syncMerged() { if (!m_merged) { - qWarning() << Q_FUNC_INFO << "Trying to sync a non-merged item"; + qWarning("Trying to sync a non-merged item"); return; } [m_native setTag:reinterpret_cast(this)]; diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index a545dbddd5..5a59a842c6 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1523,7 +1523,7 @@ void QCocoaWindow::syncWindowState(Qt::WindowState newState) // do nothing except set the new state NSRect contentRect = [contentView() frame]; if (contentRect.size.width <= 0 || contentRect.size.height <= 0) { - qWarning() << Q_FUNC_INFO << "invalid window content view size, check your window geometry"; + qWarning("invalid window content view size, check your window geometry"); m_synchedWindowState = newState; return; } diff --git a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp index 985cc14b1d..7bec1fb603 100644 --- a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp +++ b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp @@ -62,7 +62,7 @@ bool QQnxAbstractNavigator::invokeUrl(const QUrl &url) // which is not recognized by the navigator anymore const bool result = requestInvokeUrl(url.toString().toUtf8()); - qNavigatorDebug() << Q_FUNC_INFO << "url=" << url << "result=" << result; + qNavigatorDebug() << "url=" << url << "result=" << result; return result; } diff --git a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp index 3950681c5e..66843283b6 100644 --- a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp +++ b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp @@ -78,7 +78,7 @@ QQnxBpsEventFilter::~QQnxBpsEventFilter() void QQnxBpsEventFilter::installOnEventDispatcher(QAbstractEventDispatcher *dispatcher) { - qBpsEventFilterDebug() << Q_FUNC_INFO << "dispatcher=" << dispatcher; + qBpsEventFilterDebug() << "dispatcher=" << dispatcher; if (navigator_request_events(NAVIGATOR_EXTENDED_DATA) != BPS_SUCCESS) qWarning("QQNX: failed to register for navigator events"); @@ -125,7 +125,7 @@ bool QQnxBpsEventFilter::nativeEventFilter(const QByteArray &eventType, void *me Q_UNUSED(result); bps_event_t *event = static_cast(message); const int eventDomain = bps_event_get_domain(event); - qBpsEventFilterDebug() << Q_FUNC_INFO << "event=" << event << "domain=" << eventDomain; + qBpsEventFilterDebug() << "event=" << event << "domain=" << eventDomain; if (eventDomain == screen_get_domain()) { if (!m_screenEventHandler) { @@ -151,10 +151,10 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event) switch (bps_event_get_code(event)) { case NAVIGATOR_ORIENTATION_CHECK: { const int angle = navigator_event_get_orientation_angle(event); - qBpsEventFilterDebug() << Q_FUNC_INFO << "ORIENTATION CHECK event. angle=" << angle; + qBpsEventFilterDebug() << "ORIENTATION CHECK event. angle=" << angle; const bool result = m_navigatorEventHandler->handleOrientationCheck(angle); - qBpsEventFilterDebug() << Q_FUNC_INFO << "ORIENTATION CHECK event. result=" << result; + qBpsEventFilterDebug() << "ORIENTATION CHECK event. result=" << result; // reply to navigator whether orientation is acceptable navigator_orientation_check_response(event, result); @@ -163,7 +163,7 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event) case NAVIGATOR_ORIENTATION: { const int angle = navigator_event_get_orientation_angle(event); - qBpsEventFilterDebug() << Q_FUNC_INFO << "ORIENTATION event. angle=" << angle; + qBpsEventFilterDebug() << "ORIENTATION event. angle=" << angle; m_navigatorEventHandler->handleOrientationChange(angle); navigator_done_orientation(event); @@ -171,17 +171,17 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event) } case NAVIGATOR_SWIPE_DOWN: - qBpsEventFilterDebug() << Q_FUNC_INFO << "SWIPE DOWN event"; + qBpsEventFilterDebug("SWIPE DOWN event"); m_navigatorEventHandler->handleSwipeDown(); break; case NAVIGATOR_EXIT: - qBpsEventFilterDebug() << Q_FUNC_INFO << "EXIT event"; + qBpsEventFilterDebug("EXIT event"); m_navigatorEventHandler->handleExit(); break; case NAVIGATOR_WINDOW_STATE: { - qBpsEventFilterDebug() << Q_FUNC_INFO << "WINDOW STATE event"; + qBpsEventFilterDebug("WINDOW STATE event"); const navigator_window_state_t state = navigator_event_get_window_state(event); const QByteArray id(navigator_event_get_groupid(event)); @@ -200,14 +200,14 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event) } case NAVIGATOR_WINDOW_ACTIVE: { - qBpsEventFilterDebug() << Q_FUNC_INFO << "WINDOW ACTIVE event"; + qBpsEventFilterDebug("WINDOW ACTIVE event"); const QByteArray id(navigator_event_get_groupid(event)); m_navigatorEventHandler->handleWindowGroupActivated(id); break; } case NAVIGATOR_WINDOW_INACTIVE: { - qBpsEventFilterDebug() << Q_FUNC_INFO << "WINDOW INACTIVE event"; + qBpsEventFilterDebug("WINDOW INACTIVE event"); const QByteArray id(navigator_event_get_groupid(event)); m_navigatorEventHandler->handleWindowGroupDeactivated(id); break; @@ -219,7 +219,7 @@ bool QQnxBpsEventFilter::handleNavigatorEvent(bps_event_t *event) return false; default: - qBpsEventFilterDebug() << Q_FUNC_INFO << "Unhandled navigator event. code=" << bps_event_get_code(event); + qBpsEventFilterDebug() << "Unhandled navigator event. code=" << bps_event_get_code(event); return false; } diff --git a/src/plugins/platforms/qnx/qqnxbuffer.cpp b/src/plugins/platforms/qnx/qqnxbuffer.cpp index 2c3a42ac7c..7ee6664676 100644 --- a/src/plugins/platforms/qnx/qqnxbuffer.cpp +++ b/src/plugins/platforms/qnx/qqnxbuffer.cpp @@ -51,13 +51,13 @@ QT_BEGIN_NAMESPACE QQnxBuffer::QQnxBuffer() : m_buffer(0) { - qBufferDebug() << Q_FUNC_INFO << "empty"; + qBufferDebug("empty"); } QQnxBuffer::QQnxBuffer(screen_buffer_t buffer) : m_buffer(buffer) { - qBufferDebug() << Q_FUNC_INFO << "normal"; + qBufferDebug("normal"); // Get size of buffer int size[2]; @@ -118,17 +118,17 @@ QQnxBuffer::QQnxBuffer(const QQnxBuffer &other) : m_buffer(other.m_buffer), m_image(other.m_image) { - qBufferDebug() << Q_FUNC_INFO << "copy"; + qBufferDebug("copy"); } QQnxBuffer::~QQnxBuffer() { - qBufferDebug() << Q_FUNC_INFO; + qBufferDebug(); } void QQnxBuffer::invalidateInCache() { - qBufferDebug() << Q_FUNC_INFO; + qBufferDebug(); // Verify native buffer exists if (m_buffer == 0) diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp index ae3153336f..614bfc381f 100644 --- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp @@ -74,7 +74,7 @@ QQnxButtonEventNotifier::~QQnxButtonEventNotifier() void QQnxButtonEventNotifier::start() { - qButtonDebug() << Q_FUNC_INFO << "starting hardware button event processing"; + qButtonDebug("starting hardware button event processing"); if (m_fd != -1) return; @@ -91,7 +91,7 @@ void QQnxButtonEventNotifier::start() m_readNotifier = new QSocketNotifier(m_fd, QSocketNotifier::Read); QObject::connect(m_readNotifier, SIGNAL(activated(int)), this, SLOT(updateButtonStates())); - qButtonDebug() << Q_FUNC_INFO << "successfully connected to Navigator. fd =" << m_fd; + qButtonDebug() << "successfully connected to Navigator. fd =" << m_fd; } void QQnxButtonEventNotifier::updateButtonStates() @@ -115,7 +115,7 @@ void QQnxButtonEventNotifier::updateButtonStates() // Ensure data is null terminated buffer[bytes] = '\0'; - qButtonDebug() << Q_FUNC_INFO << "received PPS message:\n" << buffer; + qButtonDebug() << "received PPS message:\n" << buffer; // Process received message QByteArray ppsData = QByteArray::fromRawData(buffer, bytes); @@ -197,7 +197,7 @@ bool QQnxButtonEventNotifier::parsePPS(const QByteArray &ppsData, QHashtype()) { case QEvent::CloseSoftwareInputPanel: @@ -692,19 +692,19 @@ QRectF QQnxInputContext::keyboardRect() const void QQnxInputContext::reset() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); endComposition(); } void QQnxInputContext::commit() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); endComposition(); } void QQnxInputContext::update(Qt::InputMethodQueries queries) { - qInputContextDebug() << Q_FUNC_INFO << queries; + qInputContextDebug() << queries; if (queries & Qt::ImCursorPosition) { int lastCaret = m_caretPosition; @@ -716,7 +716,7 @@ void QQnxInputContext::update(Qt::InputMethodQueries queries) initEvent(&caretEvent.event, sInputSession, EVENT_CARET, CARET_POS_CHANGED, sizeof(caretEvent)); caretEvent.old_pos = lastCaret; caretEvent.new_pos = m_caretPosition; - qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event caret changed" << lastCaret << m_caretPosition; + qInputContextDebug() << "ictrl_dispatch_event caret changed" << lastCaret << m_caretPosition; p_ictrl_dispatch_event(&caretEvent.event); } } @@ -724,7 +724,7 @@ void QQnxInputContext::update(Qt::InputMethodQueries queries) void QQnxInputContext::closeSession() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); if (!imfAvailable()) return; @@ -746,7 +746,7 @@ bool QQnxInputContext::openSession() closeSession(); sInputSession = p_ictrl_open_session(&ic_funcs); - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); return sInputSession != 0; } @@ -770,7 +770,7 @@ bool QQnxInputContext::hasSelectedText() bool QQnxInputContext::dispatchRequestSoftwareInputPanel() { - qInputContextDebug() << Q_FUNC_INFO << "requesting keyboard" << m_inputPanelVisible; + qInputContextDebug() << "requesting keyboard" << m_inputPanelVisible; m_virtualKeyboard.showKeyboard(); return true; @@ -778,7 +778,7 @@ bool QQnxInputContext::dispatchRequestSoftwareInputPanel() bool QQnxInputContext::dispatchCloseSoftwareInputPanel() { - qInputContextDebug() << Q_FUNC_INFO << "hiding keyboard" << m_inputPanelVisible; + qInputContextDebug() << "hiding keyboard" << m_inputPanelVisible; m_virtualKeyboard.hideKeyboard(); return true; @@ -824,7 +824,7 @@ bool QQnxInputContext::dispatchFocusGainEvent(int inputHints) focusEvent.style |= IMF_EMAIL_TYPE; } - qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event focus gain style:" << focusEvent.style; + qInputContextDebug() << "ictrl_dispatch_event focus gain style:" << focusEvent.style; p_ictrl_dispatch_event((event_t *)&focusEvent); @@ -834,7 +834,7 @@ bool QQnxInputContext::dispatchFocusGainEvent(int inputHints) void QQnxInputContext::dispatchFocusLossEvent() { if (hasSession()) { - qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_event focus lost"; + qInputContextDebug("ictrl_dispatch_event focus lost"); focus_event_t focusEvent; initEvent(&focusEvent.event, sInputSession, EVENT_FOCUS, FOCUS_LOST, sizeof(focusEvent)); @@ -909,7 +909,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan navigation_event_t navEvent; initEvent(&navEvent.event, sInputSession, EVENT_NAVIGATION, key, sizeof(navEvent)); navEvent.magnitude = 1; - qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even navigation" << key; + qInputContextDebug() << "ictrl_dispatch_even navigation" << key; p_ictrl_dispatch_event(&navEvent.event); } } else { @@ -922,7 +922,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan keyEvent.sequence_id = sequenceId; p_ictrl_dispatch_event(&keyEvent.event); - qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even key" << key; + qInputContextDebug() << "ictrl_dispatch_even key" << key; } return true; @@ -938,7 +938,7 @@ void QQnxInputContext::updateCursorPosition() QCoreApplication::sendEvent(input, &query); m_caretPosition = query.value(Qt::ImCursorPosition).toInt(); - qInputContextDebug() << Q_FUNC_INFO << m_caretPosition; + qInputContextDebug() << m_caretPosition; } void QQnxInputContext::endComposition() @@ -951,7 +951,7 @@ void QQnxInputContext::endComposition() if (hasSession()) { action_event_t actionEvent; initEvent(&actionEvent.event, sInputSession, EVENT_ACTION, ACTION_END_COMPOSITION, sizeof(actionEvent)); - qInputContextDebug() << Q_FUNC_INFO << "ictrl_dispatch_even end composition"; + qInputContextDebug("ictrl_dispatch_even end composition"); p_ictrl_dispatch_event(&actionEvent.event); } } @@ -968,7 +968,7 @@ void QQnxInputContext::updateComposition(spannable_string_t *text, int32_t new_c m_composingText = QString::fromWCharArray(text->str, text->length); m_isComposing = true; - qInputContextDebug() << Q_FUNC_INFO << m_composingText << new_cursor_position; + qInputContextDebug() << m_composingText << new_cursor_position; QList attributes; attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, @@ -1017,7 +1017,7 @@ void QQnxInputContext::finishComposingText() QObject *input = qGuiApp->focusObject(); if (input) { - qInputContextDebug() << Q_FUNC_INFO << m_composingText; + qInputContextDebug() << m_composingText; QInputMethodEvent event; event.setCommitString(m_composingText); @@ -1082,13 +1082,13 @@ int32_t QQnxInputContext::processEvent(event_t *event) int32_t result = -1; switch (event->event_type) { case EVENT_SPELL_CHECK: { - qInputContextDebug() << Q_FUNC_INFO << "EVENT_SPELL_CHECK"; + qInputContextDebug("EVENT_SPELL_CHECK"); result = handleSpellCheck(reinterpret_cast(event)); break; } case EVENT_NAVIGATION: { - qInputContextDebug() << Q_FUNC_INFO << "EVENT_NAVIGATION"; + qInputContextDebug("EVENT_NAVIGATION"); int key = event->event_id == NAVIGATE_UP ? KEYCODE_UP : event->event_id == NAVIGATE_DOWN ? KEYCODE_DOWN : @@ -1111,7 +1111,7 @@ int32_t QQnxInputContext::processEvent(event_t *event) int flags = KEY_SYM_VALID | KEY_CAP_VALID; if (event->event_id == IMF_KEY_DOWN) flags |= KEY_DOWN; - qInputContextDebug() << Q_FUNC_INFO << "EVENT_KEY" << flags << keySym; + qInputContextDebug() << "EVENT_KEY" << flags << keySym; QQnxScreenEventHandler::injectKeyboardEvent(flags, keySym, modifiers, 0, keyCap); result = 0; break; @@ -1127,10 +1127,10 @@ int32_t QQnxInputContext::processEvent(event_t *event) case EVENT_USER_ACTION: case EVENT_STROKE: case EVENT_INVOKE_LATER: - qCritical() << Q_FUNC_INFO << "Unsupported event type: " << event->event_type; + qCritical() << "Unsupported event type: " << event->event_type; break; default: - qCritical() << Q_FUNC_INFO << "Unknown event type: " << event->event_type; + qCritical() << "Unknown event type: " << event->event_type; } return result; } @@ -1151,7 +1151,7 @@ int32_t QQnxInputContext::onCommitText(spannable_string_t *text, int32_t new_cur int32_t QQnxInputContext::onDeleteSurroundingText(int32_t left_length, int32_t right_length) { - qInputContextDebug() << Q_FUNC_INFO << "L:" << left_length << " R:" << right_length; + qInputContextDebug() << "L:" << left_length << " R:" << right_length; QObject *input = qGuiApp->focusObject(); if (!input) @@ -1182,7 +1182,7 @@ int32_t QQnxInputContext::onFinishComposingText() int32_t QQnxInputContext::onGetCursorPosition() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); QObject *input = qGuiApp->focusObject(); if (!input) @@ -1196,7 +1196,7 @@ int32_t QQnxInputContext::onGetCursorPosition() spannable_string_t *QQnxInputContext::onGetTextAfterCursor(int32_t n, int32_t flags) { Q_UNUSED(flags); - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); QObject *input = qGuiApp->focusObject(); if (!input) @@ -1213,7 +1213,7 @@ spannable_string_t *QQnxInputContext::onGetTextAfterCursor(int32_t n, int32_t fl spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(int32_t n, int32_t flags) { Q_UNUSED(flags); - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); QObject *input = qGuiApp->focusObject(); if (!input) @@ -1232,7 +1232,7 @@ spannable_string_t *QQnxInputContext::onGetTextBeforeCursor(int32_t n, int32_t f int32_t QQnxInputContext::onSendEvent(event_t *event) { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); return processEvent(event); } @@ -1248,7 +1248,7 @@ int32_t QQnxInputContext::onSetComposingRegion(int32_t start, int32_t end) QString text = query.value(Qt::ImSurroundingText).toString(); m_caretPosition = query.value(Qt::ImCursorPosition).toInt(); - qInputContextDebug() << Q_FUNC_INFO << text; + qInputContextDebug() << text; m_isUpdatingText = true; @@ -1291,7 +1291,7 @@ int32_t QQnxInputContext::onIsTextSelected(int32_t* pIsSelected) { *pIsSelected = hasSelectedText(); - qInputContextDebug() << Q_FUNC_INFO << *pIsSelected; + qInputContextDebug() << *pIsSelected; return 0; } @@ -1307,20 +1307,20 @@ int32_t QQnxInputContext::onIsAllTextSelected(int32_t* pIsSelected) *pIsSelected = query.value(Qt::ImSurroundingText).toString().length() == query.value(Qt::ImCurrentSelection).toString().length(); - qInputContextDebug() << Q_FUNC_INFO << *pIsSelected; + qInputContextDebug() << *pIsSelected; return 0; } void QQnxInputContext::showInputPanel() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); dispatchRequestSoftwareInputPanel(); } void QQnxInputContext::hideInputPanel() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); dispatchCloseSoftwareInputPanel(); } @@ -1336,7 +1336,7 @@ QLocale QQnxInputContext::locale() const void QQnxInputContext::keyboardVisibilityChanged(bool visible) { - qInputContextDebug() << Q_FUNC_INFO << "visible=" << visible; + qInputContextDebug() << "visible=" << visible; if (m_inputPanelVisible != visible) { m_inputPanelVisible = visible; emitInputPanelVisibleChanged(); @@ -1345,7 +1345,7 @@ void QQnxInputContext::keyboardVisibilityChanged(bool visible) void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale) { - qInputContextDebug() << Q_FUNC_INFO << "locale=" << locale; + qInputContextDebug() << "locale=" << locale; if (m_inputPanelLocale != locale) { m_inputPanelLocale = locale; emitLocaleChanged(); @@ -1354,7 +1354,7 @@ void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale) void QQnxInputContext::setHighlightColor(int index, const QColor &color) { - qInputContextDebug() << Q_FUNC_INFO << "setHighlightColor" << index << color << qGuiApp->focusObject(); + qInputContextDebug() << "setHighlightColor" << index << color << qGuiApp->focusObject(); if (!sInputContextInstance) return; @@ -1373,7 +1373,7 @@ void QQnxInputContext::setHighlightColor(int index, const QColor &color) void QQnxInputContext::setFocusObject(QObject *object) { - qInputContextDebug() << Q_FUNC_INFO << "input item=" << object; + qInputContextDebug() << "input item=" << object; // Ensure the colors are reset if we've a change in focus object setHighlightColor(-1, QColor()); @@ -1403,7 +1403,7 @@ void QQnxInputContext::setFocusObject(QObject *object) bool QQnxInputContext::checkSpelling(const QString &text, void *context, void (*spellCheckDone)(void *context, const QString &text, const QList &indices)) { - qInputContextDebug() << Q_FUNC_INFO << "text" << text; + qInputContextDebug() << "text" << text; if (!imfAvailable()) return false; diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp index 3860cdf0db..af280f5c6f 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp @@ -88,13 +88,13 @@ bool QQnxInputContext::filterEvent( const QEvent *event ) if (event->type() == QEvent::CloseSoftwareInputPanel) { m_virtualKeyboard.hideKeyboard(); - qInputContextDebug() << Q_FUNC_INFO << "hiding virtual keyboard"; + qInputContextDebug("hiding virtual keyboard"); return false; } if (event->type() == QEvent::RequestSoftwareInputPanel) { m_virtualKeyboard.showKeyboard(); - qInputContextDebug() << Q_FUNC_INFO << "requesting virtual keyboard"; + qInputContextDebug("requesting virtual keyboard"); return false; } @@ -121,13 +121,13 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan void QQnxInputContext::showInputPanel() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); m_virtualKeyboard.showKeyboard(); } void QQnxInputContext::hideInputPanel() { - qInputContextDebug() << Q_FUNC_INFO; + qInputContextDebug(); m_virtualKeyboard.hideKeyboard(); } @@ -148,7 +148,7 @@ void QQnxInputContext::keyboardHeightChanged() void QQnxInputContext::keyboardVisibilityChanged(bool visible) { - qInputContextDebug() << Q_FUNC_INFO << "visible=" << visible; + qInputContextDebug() << "visible=" << visible; if (m_inputPanelVisible != visible) { m_inputPanelVisible = visible; emitInputPanelVisibleChanged(); @@ -157,7 +157,7 @@ void QQnxInputContext::keyboardVisibilityChanged(bool visible) void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale) { - qInputContextDebug() << Q_FUNC_INFO << "locale=" << locale; + qInputContextDebug() << "locale=" << locale; if (m_inputPanelLocale != locale) { m_inputPanelLocale = locale; emitLocaleChanged(); @@ -166,7 +166,7 @@ void QQnxInputContext::keyboardLocaleChanged(const QLocale &locale) void QQnxInputContext::setFocusObject(QObject *object) { - qInputContextDebug() << Q_FUNC_INFO << "input item=" << object; + qInputContextDebug() << "input item=" << object; if (!inputMethodAccepted()) { if (m_inputPanelVisible) diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index 1c825dbbdd..6548c82310 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -164,7 +164,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList) #endif { ms_options = parseOptions(paramList); - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); // Open connection to QNX composition manager Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT), "Failed to create screen context"); @@ -261,7 +261,7 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList) QQnxIntegration::~QQnxIntegration() { - qIntegrationDebug() << Q_FUNC_INFO << "platform plugin shutdown begin"; + qIntegrationDebug("platform plugin shutdown begin"); delete m_nativeInterface; #if !defined(QT_NO_DRAGANDDROP) @@ -325,12 +325,12 @@ QQnxIntegration::~QQnxIntegration() // Destroy navigator interface delete m_navigator; - qIntegrationDebug() << Q_FUNC_INFO << "platform plugin shutdown end"; + qIntegrationDebug("platform plugin shutdown end"); } bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); switch (cap) { case MultipleWindows: case ThreadedPixmaps: @@ -348,7 +348,7 @@ bool QQnxIntegration::hasCapability(QPlatformIntegration::Capability cap) const QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); QSurface::SurfaceType surfaceType = window->surfaceType(); const bool needRootWindow = options() & RootWindow; switch (surfaceType) { @@ -366,14 +366,14 @@ QPlatformWindow *QQnxIntegration::createPlatformWindow(QWindow *window) const QPlatformBackingStore *QQnxIntegration::createPlatformBackingStore(QWindow *window) const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); return new QQnxRasterBackingStore(window); } #if !defined(QT_NO_OPENGL) QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); return new QQnxGLContext(context); } #endif @@ -381,14 +381,14 @@ QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLCont #if defined(QQNX_PPS) QPlatformInputContext *QQnxIntegration::inputContext() const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); return m_inputContext; } #endif void QQnxIntegration::moveToScreen(QWindow *window, int screen) { - qIntegrationDebug() << Q_FUNC_INFO << "w =" << window << ", s =" << screen; + qIntegrationDebug() << "w =" << window << ", s =" << screen; // get platform window used by widget QQnxWindow *platformWindow = static_cast(window->handle()); @@ -402,7 +402,7 @@ void QQnxIntegration::moveToScreen(QWindow *window, int screen) QAbstractEventDispatcher *QQnxIntegration::createEventDispatcher() const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); // We transfer ownersip of the event-dispatcher to QtCoreApplication QAbstractEventDispatcher *eventDispatcher = m_eventDispatcher; @@ -419,7 +419,7 @@ QPlatformNativeInterface *QQnxIntegration::nativeInterface() const #if !defined(QT_NO_CLIPBOARD) QPlatformClipboard *QQnxIntegration::clipboard() const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); #if defined(QQNX_PPS) if (!m_clipboard) @@ -438,7 +438,7 @@ QPlatformDrag *QQnxIntegration::drag() const QVariant QQnxIntegration::styleHint(QPlatformIntegration::StyleHint hint) const { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); if ((hint == ShowIsFullScreen) && (ms_options & FullScreenApplication)) return true; @@ -458,7 +458,7 @@ QStringList QQnxIntegration::themeNames() const QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const { - qIntegrationDebug() << Q_FUNC_INFO << "name =" << name; + qIntegrationDebug() << "name =" << name; if (name == QBlackberryTheme::name()) return new QBlackberryTheme(this); return 0; @@ -467,7 +467,7 @@ QPlatformTheme *QQnxIntegration::createPlatformTheme(const QString &name) const QWindow *QQnxIntegration::window(screen_window_t qnxWindow) { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); QMutexLocker locker(&ms_windowMapperMutex); Q_UNUSED(locker); return ms_windowMapper.value(qnxWindow, 0); @@ -475,7 +475,7 @@ QWindow *QQnxIntegration::window(screen_window_t qnxWindow) void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window) { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); QMutexLocker locker(&ms_windowMapperMutex); Q_UNUSED(locker); ms_windowMapper.insert(qnxWindow, window); @@ -483,7 +483,7 @@ void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window) void QQnxIntegration::removeWindow(screen_window_t qnxWindow) { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); QMutexLocker locker(&ms_windowMapperMutex); Q_UNUSED(locker); ms_windowMapper.remove(qnxWindow); @@ -491,7 +491,7 @@ void QQnxIntegration::removeWindow(screen_window_t qnxWindow) void QQnxIntegration::createDisplays() { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); // Query number of displays int displayCount = 0; int result = screen_get_context_property_iv(ms_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT, @@ -520,11 +520,11 @@ void QQnxIntegration::createDisplays() Q_SCREEN_CHECKERROR(result, "Failed to query display attachment"); if (!isAttached) { - qIntegrationDebug() << Q_FUNC_INFO << "Skipping non-attached display" << i; + qIntegrationDebug() << "Skipping non-attached display" << i; continue; } - qIntegrationDebug() << Q_FUNC_INFO << "Creating screen for display" << i; + qIntegrationDebug() << "Creating screen for display" << i; createDisplay(displays[i], /*isPrimary=*/false); } // of displays iteration } @@ -558,7 +558,7 @@ void QQnxIntegration::removeDisplay(QQnxScreen *screen) void QQnxIntegration::destroyDisplays() { - qIntegrationDebug() << Q_FUNC_INFO; + qIntegrationDebug(); Q_FOREACH (QQnxScreen *screen, m_screens) { QPlatformIntegration::destroyScreen(screen); } diff --git a/src/plugins/platforms/qnx/qqnxnavigatorbps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorbps.cpp index 67f936a8dd..0d730d6f57 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorbps.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatorbps.cpp @@ -56,7 +56,7 @@ bool QQnxNavigatorBps::requestInvokeUrl(const QByteArray &encodedUrl) int ret = navigator_invoke(encodedUrl, &error); if (error) { - qWarning() << Q_FUNC_INFO << "error=" << error; + qWarning() << "error=" << error; bps_free(error); } diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp index f179719c6b..647c53e32c 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp @@ -57,20 +57,20 @@ bool QQnxNavigatorEventHandler::handleOrientationCheck(int angle) { // reply to navigator that (any) orientation is acceptable // TODO: check if top window flags prohibit orientation change - qNavigatorEventHandlerDebug() << Q_FUNC_INFO << "angle=" << angle; + qNavigatorEventHandlerDebug() << "angle=" << angle; return true; } void QQnxNavigatorEventHandler::handleOrientationChange(int angle) { // update screen geometry and reply to navigator that we're ready - qNavigatorEventHandlerDebug() << Q_FUNC_INFO << "angle=" << angle; + qNavigatorEventHandlerDebug() << "angle=" << angle; emit rotationChanged(angle); } void QQnxNavigatorEventHandler::handleSwipeDown() { - qNavigatorEventHandlerDebug() << Q_FUNC_INFO; + qNavigatorEventHandlerDebug(); Q_EMIT swipeDown(); } @@ -78,25 +78,25 @@ void QQnxNavigatorEventHandler::handleSwipeDown() void QQnxNavigatorEventHandler::handleExit() { // shutdown everything - qNavigatorEventHandlerDebug() << Q_FUNC_INFO; + qNavigatorEventHandlerDebug(); QCoreApplication::quit(); } void QQnxNavigatorEventHandler::handleWindowGroupActivated(const QByteArray &id) { - qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id; + qNavigatorEventHandlerDebug() << id; Q_EMIT windowGroupActivated(id); } void QQnxNavigatorEventHandler::handleWindowGroupDeactivated(const QByteArray &id) { - qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id; + qNavigatorEventHandlerDebug() << id; Q_EMIT windowGroupDeactivated(id); } void QQnxNavigatorEventHandler::handleWindowGroupStateChanged(const QByteArray &id, Qt::WindowState state) { - qNavigatorEventHandlerDebug() << Q_FUNC_INFO << id; + qNavigatorEventHandlerDebug() << id; Q_EMIT windowGroupStateChanged(id, state); } diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp index aa47b5409b..6199eb8e11 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp @@ -74,18 +74,18 @@ QQnxNavigatorEventNotifier::~QQnxNavigatorEventNotifier() if (m_fd != -1) close(m_fd); - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "navigator event notifier stopped"; + qNavigatorEventNotifierDebug("navigator event notifier stopped"); } void QQnxNavigatorEventNotifier::start() { - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "navigator event notifier started"; + qNavigatorEventNotifierDebug("navigator event notifier started"); // open connection to navigator errno = 0; m_fd = open(navigatorControlPath, O_RDWR); if (m_fd == -1) { - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << ": failed to open navigator pps:" + qNavigatorEventNotifierDebug() << "failed to open navigator pps:" << strerror(errno); return; } @@ -96,7 +96,7 @@ void QQnxNavigatorEventNotifier::start() void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray &msg, QByteArray &dat, QByteArray &id) { - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "data=" << ppsData; + qNavigatorEventNotifierDebug() << "data=" << ppsData; // tokenize pps data into lines QList lines = ppsData.split('\n'); @@ -110,7 +110,7 @@ void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray // tokenize current attribute const QByteArray &attr = lines.at(i); - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "attr=" << attr; + qNavigatorEventNotifierDebug() << "attr=" << attr; int firstColon = attr.indexOf(':'); if (firstColon == -1) { @@ -127,8 +127,8 @@ void QQnxNavigatorEventNotifier::parsePPS(const QByteArray &ppsData, QByteArray QByteArray key = attr.left(firstColon); QByteArray value = attr.mid(secondColon + 1); - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "key=" << key; - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "val=" << value; + qNavigatorEventNotifierDebug() << "key=" << key; + qNavigatorEventNotifierDebug() << "val=" << value; // save attribute value if (key == "msg") @@ -155,7 +155,7 @@ void QQnxNavigatorEventNotifier::replyPPS(const QByteArray &res, const QByteArra } ppsData += "\n"; - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "reply=" << ppsData; + qNavigatorEventNotifierDebug() << "reply=" << ppsData; // send pps message to navigator errno = 0; @@ -166,7 +166,7 @@ void QQnxNavigatorEventNotifier::replyPPS(const QByteArray &res, const QByteArra void QQnxNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByteArray &dat, const QByteArray &id) { - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "msg=" << msg << ", dat=" << dat << ", id=" << id; + qNavigatorEventNotifierDebug() << "msg=" << msg << ", dat=" << dat << ", id=" << id; // check message type if (msg == "orientationCheck") { @@ -190,7 +190,7 @@ void QQnxNavigatorEventNotifier::handleMessage(const QByteArray &msg, const QByt void QQnxNavigatorEventNotifier::readData() { - qNavigatorEventNotifierDebug() << Q_FUNC_INFO << "reading navigator data"; + qNavigatorEventNotifierDebug("reading navigator data"); // allocate buffer for pps data char buffer[ppsBufferSize]; diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp index c3b088ae5f..b139471669 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp @@ -73,7 +73,7 @@ bool QQnxNavigatorPps::openPpsConnection() return false; } - qNavigatorDebug() << Q_FUNC_INFO << "successfully connected to Navigator. fd=" << m_fd; + qNavigatorDebug() << "successfully connected to Navigator. fd=" << m_fd; return true; } @@ -95,7 +95,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra ppsMessage += "\n"; - qNavigatorDebug() << Q_FUNC_INFO << "sending PPS message:\n" << ppsMessage; + qNavigatorDebug() << "sending PPS message:\n" << ppsMessage; // send pps message to navigator errno = 0; @@ -117,7 +117,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra // ensure data is null terminated buffer[bytes] = '\0'; - qNavigatorDebug() << Q_FUNC_INFO << "received PPS message:\n" << buffer; + qNavigatorDebug() << "received PPS message:\n" << buffer; // process received message QByteArray ppsData(buffer); @@ -136,7 +136,7 @@ bool QQnxNavigatorPps::sendPpsMessage(const QByteArray &message, const QByteArra void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHash &messageFields) { - qNavigatorDebug() << Q_FUNC_INFO << "data=" << ppsData; + qNavigatorDebug() << "data=" << ppsData; // tokenize pps data into lines QList lines = ppsData.split('\n'); @@ -151,7 +151,7 @@ void QQnxNavigatorPps::parsePPS(const QByteArray &ppsData, QHashscreenForNative(nativeDisplay); if (!screen) { @@ -598,7 +598,7 @@ void QQnxScreenEventHandler::handlePropertyEvent(screen_event_t event) break; default: // event ignored - qScreenEventDebug() << Q_FUNC_INFO << "Ignore property event for property: " << property; + qScreenEventDebug() << "Ignore property event for property: " << property; } } diff --git a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp index e0801a2d60..a7d5c4d4bc 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp @@ -84,7 +84,7 @@ void QQnxScreenEventThread::unlock() void QQnxScreenEventThread::run() { - qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread started"; + qScreenEventThreadDebug("screen event thread started"); int errorCounter = 0; // loop indefinitely @@ -117,7 +117,7 @@ void QQnxScreenEventThread::run() if (qnxType == SCREEN_EVENT_USER) { // treat all user events as shutdown requests - qScreenEventThreadDebug() << Q_FUNC_INFO << "QNX user screen event"; + qScreenEventThreadDebug("QNX user screen event"); m_quit = true; } else { m_mutex.lock(); @@ -127,7 +127,7 @@ void QQnxScreenEventThread::run() } } - qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread stopped"; + qScreenEventThreadDebug("screen event thread stopped"); // cleanup m_mutex.lock(); @@ -160,10 +160,10 @@ void QQnxScreenEventThread::shutdown() // cleanup screen_destroy_event(event); - qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread shutdown begin"; + qScreenEventThreadDebug("screen event thread shutdown begin"); // block until thread terminates wait(); - qScreenEventThreadDebug() << Q_FUNC_INFO << "screen event thread shutdown end"; + qScreenEventThreadDebug("screen event thread shutdown end"); } diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp index 3d749b486d..b55ae842ed 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp @@ -80,7 +80,7 @@ bool QQnxVirtualKeyboardBps::handleEvent(bps_event_t *event) bool QQnxVirtualKeyboardBps::showKeyboard() { - qVirtualKeyboardDebug() << Q_FUNC_INFO << "current visibility=" << isVisible(); + qVirtualKeyboardDebug() << "current visibility=" << isVisible(); // They keyboard's mode is global between applications, we have to set it each time if ( !isVisible() ) @@ -92,7 +92,7 @@ bool QQnxVirtualKeyboardBps::showKeyboard() bool QQnxVirtualKeyboardBps::hideKeyboard() { - qVirtualKeyboardDebug() << Q_FUNC_INFO << "current visibility=" << isVisible(); + qVirtualKeyboardDebug() << "current visibility=" << isVisible(); virtualkeyboard_hide(); return true; } @@ -102,7 +102,7 @@ void QQnxVirtualKeyboardBps::applyKeyboardOptions() virtualkeyboard_layout_t layout = keyboardLayout(); virtualkeyboard_enter_t enter = enterKey(); - qVirtualKeyboardDebug() << Q_FUNC_INFO << "mode=" << keyboardMode() << "enterKey=" << enterKeyType(); + qVirtualKeyboardDebug() << "mode=" << keyboardMode() << "enterKey=" << enterKeyType(); virtualkeyboard_change_options(layout, enter); } @@ -176,12 +176,12 @@ bool QQnxVirtualKeyboardBps::handleLocaleEvent(bps_event_t *event) const QString country = QString::fromLatin1(locale_event_get_country(event)); const QLocale newLocale(language + QLatin1Char('_') + country); - qVirtualKeyboardDebug() << Q_FUNC_INFO << "current locale" << locale() << "new locale=" << newLocale; + qVirtualKeyboardDebug() << "current locale" << locale() << "new locale=" << newLocale; setLocale(newLocale); return true; } - qVirtualKeyboardDebug() << Q_FUNC_INFO << "Unhandled locale event. code=" << bps_event_get_code(event); + qVirtualKeyboardDebug() << "Unhandled locale event. code=" << bps_event_get_code(event); return false; } @@ -190,24 +190,24 @@ bool QQnxVirtualKeyboardBps::handleVirtualKeyboardEvent(bps_event_t *event) { switch (bps_event_get_code(event)) { case VIRTUALKEYBOARD_EVENT_VISIBLE: - qVirtualKeyboardDebug() << Q_FUNC_INFO << "EVENT VISIBLE: current visibility=" << isVisible(); + qVirtualKeyboardDebug() << "EVENT VISIBLE: current visibility=" << isVisible(); setVisible(true); break; case VIRTUALKEYBOARD_EVENT_HIDDEN: - qVirtualKeyboardDebug() << Q_FUNC_INFO << "EVENT HIDDEN: current visibility=" << isVisible(); + qVirtualKeyboardDebug() << "EVENT HIDDEN: current visibility=" << isVisible(); setVisible(false); break; case VIRTUALKEYBOARD_EVENT_INFO: { const int newHeight = virtualkeyboard_event_get_height(event); - qVirtualKeyboardDebug() << Q_FUNC_INFO << "EVENT INFO: current height=" << height() << "new height=" << newHeight; + qVirtualKeyboardDebug() << "EVENT INFO: current height=" << height() << "new height=" << newHeight; setHeight(newHeight); break; } default: - qVirtualKeyboardDebug() << Q_FUNC_INFO << "Unhandled virtual keyboard event. code=" << bps_event_get_code(event); + qVirtualKeyboardDebug() << "Unhandled virtual keyboard event. code=" << bps_event_get_code(event); return false; } diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp index 2c7a28e835..d5a9a49ac6 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp @@ -75,7 +75,7 @@ QQnxVirtualKeyboardPps::~QQnxVirtualKeyboardPps() void QQnxVirtualKeyboardPps::start() { - qVirtualKeyboardDebug() << Q_FUNC_INFO << "starting keyboard event processing"; + qVirtualKeyboardDebug("starting keyboard event processing"); if (!connect()) return; } @@ -120,7 +120,7 @@ bool QQnxVirtualKeyboardPps::connect() m_fd = ::open(ms_PPSPath, O_RDWR); if (m_fd == -1) { - qVirtualKeyboardDebug() << Q_FUNC_INFO << ": Unable to open" << ms_PPSPath + qVirtualKeyboardDebug() << "Unable to open" << ms_PPSPath << ':' << strerror(errno); close(); return false; @@ -158,7 +158,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady() { ssize_t nread = qt_safe_read(m_fd, m_buffer, ms_bufferSize - 1); - qVirtualKeyboardDebug() << Q_FUNC_INFO << "keyboardMessage size: " << nread; + qVirtualKeyboardDebug() << "keyboardMessage size: " << nread; if (nread < 0){ connect(); // reconnect return; @@ -197,7 +197,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady() else if (strcmp(value, "info") == 0) handleKeyboardInfoMessage(); else if (strcmp(value, "connect") == 0) - qVirtualKeyboardDebug() << Q_FUNC_INFO << "Unhandled command 'connect'"; + qVirtualKeyboardDebug("Unhandled command 'connect'"); else qCritical("QQnxVirtualKeyboard: Unexpected keyboard PPS msg value: %s", value ? value : "[null]"); } else if (pps_decoder_get_string(m_decoder, "res", &value) == PPS_DECODER_OK) { @@ -224,12 +224,12 @@ void QQnxVirtualKeyboardPps::handleKeyboardInfoMessage() } setHeight(newHeight); - qVirtualKeyboardDebug() << Q_FUNC_INFO << "size=" << newHeight; + qVirtualKeyboardDebug() << "size=" << newHeight; } bool QQnxVirtualKeyboardPps::showKeyboard() { - qVirtualKeyboardDebug() << Q_FUNC_INFO; + qVirtualKeyboardDebug(); if (!prepareToSend()) return false; @@ -251,7 +251,7 @@ bool QQnxVirtualKeyboardPps::showKeyboard() bool QQnxVirtualKeyboardPps::hideKeyboard() { - qVirtualKeyboardDebug() << Q_FUNC_INFO; + qVirtualKeyboardDebug(); if (!prepareToSend()) return false; diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 3f92bcbc01..4dc1248bd1 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -156,7 +156,7 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW m_windowState(Qt::WindowNoState), m_mmRendererWindow(0) { - qWindowDebug() << Q_FUNC_INFO << "window =" << window << ", size =" << window->size(); + qWindowDebug() << "window =" << window << ", size =" << window->size(); QQnxScreen *platformScreen = static_cast(window->screen()->handle()); @@ -215,7 +215,7 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW QQnxWindow::~QQnxWindow() { - qWindowDebug() << Q_FUNC_INFO << "window =" << window(); + qWindowDebug() << "window =" << window(); // Qt should have already deleted the children before deleting the parent. Q_ASSERT(m_childWindows.size() == 0); @@ -247,7 +247,7 @@ void QQnxWindow::setGeometry(const QRect &rect) void QQnxWindow::setGeometryHelper(const QRect &rect) { - qWindowDebug() << Q_FUNC_INFO << "window =" << window() + qWindowDebug() << "window =" << window() << ", (" << rect.x() << "," << rect.y() << "," << rect.width() << "," << rect.height() << ")"; @@ -277,7 +277,7 @@ void QQnxWindow::setGeometryHelper(const QRect &rect) void QQnxWindow::setVisible(bool visible) { - qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "visible =" << visible; + qWindowDebug() << "window =" << window() << "visible =" << visible; if (m_visible == visible || window()->type() == Qt::Desktop) return; @@ -308,7 +308,7 @@ void QQnxWindow::setVisible(bool visible) void QQnxWindow::updateVisibility(bool parentVisible) { - qWindowDebug() << Q_FUNC_INFO << "parentVisible =" << parentVisible << "window =" << window(); + qWindowDebug() << "parentVisible =" << parentVisible << "window =" << window(); // Set window visibility int val = (m_visible && parentVisible) ? 1 : 0; Q_SCREEN_CHECKERROR(screen_set_window_property_iv(m_window, SCREEN_PROPERTY_VISIBLE, &val), @@ -320,7 +320,7 @@ void QQnxWindow::updateVisibility(bool parentVisible) void QQnxWindow::setOpacity(qreal level) { - qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "opacity =" << level; + qWindowDebug() << "window =" << window() << "opacity =" << level; // Set window global alpha int val = (int)(level * 255); Q_SCREEN_CHECKERROR(screen_set_window_property_iv(m_window, SCREEN_PROPERTY_GLOBAL_ALPHA, &val), @@ -331,7 +331,7 @@ void QQnxWindow::setOpacity(qreal level) void QQnxWindow::setExposed(bool exposed) { - qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "expose =" << exposed; + qWindowDebug() << "window =" << window() << "expose =" << exposed; if (m_exposed != exposed) { m_exposed = exposed; @@ -346,7 +346,7 @@ bool QQnxWindow::isExposed() const void QQnxWindow::setBufferSize(const QSize &size) { - qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "size =" << size; + qWindowDebug() << "window =" << window() << "size =" << size; // libscreen fails when creating empty buffers const QSize nonEmptySize = size.isEmpty() ? QSize(1, 1) : size; @@ -408,7 +408,7 @@ void QQnxWindow::setBufferSize(const QSize &size) void QQnxWindow::setScreen(QQnxScreen *platformScreen) { - qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "platformScreen =" << platformScreen; + qWindowDebug() << "window =" << window() << "platformScreen =" << platformScreen; if (platformScreen == 0) { // The screen has been destroyed m_screen = 0; @@ -422,7 +422,7 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen) return; if (m_screen) { - qWindowDebug() << Q_FUNC_INFO << "Moving window to different screen"; + qWindowDebug("Moving window to different screen"); m_screen->removeWindow(this); if ((QQnxIntegration::options() & QQnxIntegration::RootWindow)) { @@ -453,7 +453,7 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen) void QQnxWindow::removeFromParent() { - qWindowDebug() << Q_FUNC_INFO << "window =" << window(); + qWindowDebug() << "window =" << window(); // Remove from old Hierarchy position if (m_parentWindow) { if (m_parentWindow->m_childWindows.removeAll(this)) @@ -467,7 +467,7 @@ void QQnxWindow::removeFromParent() void QQnxWindow::setParent(const QPlatformWindow *window) { - qWindowDebug() << Q_FUNC_INFO << "window =" << this->window() << "platformWindow =" << window; + qWindowDebug() << "window =" << this->window() << "platformWindow =" << window; // Cast away the const, we need to modify the hierarchy. QQnxWindow* const newParent = static_cast(const_cast(window)); @@ -499,7 +499,7 @@ void QQnxWindow::setParent(const QPlatformWindow *window) void QQnxWindow::raise() { - qWindowDebug() << Q_FUNC_INFO << "window =" << window(); + qWindowDebug() << "window =" << window(); if (m_parentWindow) { m_parentWindow->m_childWindows.removeAll(this); @@ -513,7 +513,7 @@ void QQnxWindow::raise() void QQnxWindow::lower() { - qWindowDebug() << Q_FUNC_INFO << "window =" << window(); + qWindowDebug() << "window =" << window(); if (m_parentWindow) { m_parentWindow->m_childWindows.removeAll(this); @@ -583,7 +583,7 @@ void QQnxWindow::setFocus(screen_window_t newFocusWindow) void QQnxWindow::setWindowState(Qt::WindowState state) { - qWindowDebug() << Q_FUNC_INFO << "state =" << state; + qWindowDebug() << "state =" << state; // Prevent two calls with Qt::WindowFullScreen from changing m_unmaximizedGeometry if (m_windowState == state) @@ -598,7 +598,7 @@ void QQnxWindow::setWindowState(Qt::WindowState state) void QQnxWindow::propagateSizeHints() { // nothing to do; silence base class warning - qWindowDebug() << Q_FUNC_INFO << ": ignored"; + qWindowDebug("ignored"); } void QQnxWindow::setMMRendererWindowName(const QString &name) @@ -634,7 +634,7 @@ QQnxWindow *QQnxWindow::findWindow(screen_window_t windowHandle) void QQnxWindow::minimize() { #if defined(Q_OS_BLACKBERRY) - qWindowDebug() << Q_FUNC_INFO; + qWindowDebug(); pps_encoder_t encoder; @@ -643,7 +643,7 @@ void QQnxWindow::minimize() if (navigator_raw_write(pps_encoder_buffer(&encoder), pps_encoder_length(&encoder)) != BPS_SUCCESS) { - qWindowDebug() << Q_FUNC_INFO << "navigator_raw_write failed:" << strerror(errno); + qWindowDebug() << "navigator_raw_write failed:" << strerror(errno); } pps_encoder_cleanup(&encoder); @@ -654,7 +654,7 @@ void QQnxWindow::minimize() void QQnxWindow::setRotation(int rotation) { - qWindowDebug() << Q_FUNC_INFO << "angle =" << rotation; + qWindowDebug() << "angle =" << rotation; Q_SCREEN_CHECKERROR( screen_set_window_property_iv(m_window, SCREEN_PROPERTY_ROTATION, &rotation), "Failed to set window rotation"); @@ -726,7 +726,7 @@ void QQnxWindow::joinWindowGroup(const QByteArray &groupName) { bool changed = false; - qWindowDebug() << Q_FUNC_INFO << "group:" << groupName; + qWindowDebug() << "group:" << groupName; if (!groupName.isEmpty()) { if (groupName != m_parentGroupName) { diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp index 25cfd12b44..1071a2e038 100644 --- a/src/plugins/platforms/windows/qwindowsclipboard.cpp +++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp @@ -236,7 +236,7 @@ void QWindowsClipboard::propagateClipboardMessage(UINT message, WPARAM wParam, L // suspended by a shell prompt 'Select' or debugger). if (QWindowsContext::user32dll.isHungAppWindow && QWindowsContext::user32dll.isHungAppWindow(m_nextClipboardViewer)) { - qWarning("%s: Cowardly refusing to send clipboard message to hung application...", Q_FUNC_INFO); + qWarning("Cowardly refusing to send clipboard message to hung application..."); return; } // Do not block if the process is being debugged, specifically, if it is diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index a06707b84c..8d33e2f0db 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -463,7 +463,7 @@ static int choosePixelFormat(HDC hdc, const QSurfaceFormat &format, PIXELFORMATDESCRIPTOR *obtainedPfd) { if (QOpenGLStaticContext::opengl32.moduleIsNotOpengl32()) { - qWarning("%s: Attempted to use GDI functions with a non-opengl32.dll library", Q_FUNC_INFO); + qWarning("Attempted to use GDI functions with a non-opengl32.dll library"); return 0; } @@ -1018,7 +1018,7 @@ QByteArray QOpenGLStaticContext::getGlString(unsigned int which) QOpenGLStaticContext *QOpenGLStaticContext::create(bool softwareRendering) { if (!opengl32.init(softwareRendering)) { - qWarning("%s: Failed to load and resolve WGL/OpenGL functions", Q_FUNC_INFO); + qWarning("Failed to load and resolve WGL/OpenGL functions"); return 0; } diff --git a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp index 9d8792a6db..a0474b6710 100644 --- a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp +++ b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp @@ -81,7 +81,7 @@ QWinRTInputContext::QWinRTInputContext(QWinRTScreen *screen) IInputPaneStatics *statics; if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_ViewManagement_InputPane).Get(), &statics))) { - qWarning(Q_FUNC_INFO ": failed to retrieve input pane statics."); + qWarning("failed to retrieve input pane statics."); return; } @@ -98,7 +98,7 @@ QWinRTInputContext::QWinRTInputContext(QWinRTScreen *screen) m_keyboardRect = getInputPaneRect(inputPane, m_screen->scaleFactor()); m_isInputPanelVisible = !m_keyboardRect.isEmpty(); } else { - qWarning(Q_FUNC_INFO ": failed to retrieve InputPane."); + qWarning("failed to retrieve InputPane."); } } diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp index 46cee5d6d0..effdbf7334 100644 --- a/src/plugins/platforms/xcb/qxcbxsettings.cpp +++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp @@ -147,7 +147,7 @@ public: return; char byteOrder = xSettings.at(0); if (byteOrder != LSBFirst && byteOrder != MSBFirst) { - qWarning("%s ByteOrder byte %d not 0 or 1", Q_FUNC_INFO , byteOrder); + qWarning("ByteOrder byte %d not 0 or 1", byteOrder); return; } @@ -157,7 +157,7 @@ public: qFromBigEndian((const uchar *)(x))) #define VALIDATE_LENGTH(x) \ if ((size_t)xSettings.length() < (offset + local_offset + 12 + x)) { \ - qWarning("%s Length %d runs past end of data", Q_FUNC_INFO , x); \ + qWarning("Length %d runs past end of data", x); \ return; \ } -- cgit v1.2.3 From 678a4273a30e9e073dabe684ba21f18faf426e15 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 24 Oct 2015 22:32:45 +0200 Subject: QtBase: combine adjacent qDebug()/qCritical() lines For qDebug() and qWarning(), this is just an optimization. For qCritical(), which can be fatal, the old code was just wrong. Change-Id: I6d8ab1d7531d766cd41b49569dc0fd4420ecab8b Reviewed-by: Friedemann Kleint Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/plugins/bearer/nla/qnlaengine.cpp | 42 ++++++++++++------------ src/plugins/platforms/android/androidjnimain.cpp | 4 +-- 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/bearer/nla/qnlaengine.cpp b/src/plugins/bearer/nla/qnlaengine.cpp index 3680eb7305..cc65364a02 100644 --- a/src/plugins/bearer/nla/qnlaengine.cpp +++ b/src/plugins/bearer/nla/qnlaengine.cpp @@ -69,39 +69,39 @@ QWindowsSockInit2::~QWindowsSockInit2() #ifdef BEARER_MANAGEMENT_DEBUG static void printBlob(NLA_BLOB *blob) { - qDebug() << "==== BEGIN NLA_BLOB ===="; + qDebug() << "==== BEGIN NLA_BLOB ====" << endl - qDebug() << "type:" << blob->header.type; - qDebug() << "size:" << blob->header.dwSize; - qDebug() << "next offset:" << blob->header.nextOffset; + << "type:" << blob->header.type << endl + << "size:" << blob->header.dwSize << endl + << "next offset:" << blob->header.nextOffset; switch (blob->header.type) { case NLA_RAW_DATA: - qDebug() << "Raw Data"; - qDebug() << '\t' << blob->data.rawData; + qDebug() << "Raw Data" << endl + << '\t' << blob->data.rawData; break; case NLA_INTERFACE: - qDebug() << "Interface"; - qDebug() << "\ttype:" << blob->data.interfaceData.dwType; - qDebug() << "\tspeed:" << blob->data.interfaceData.dwSpeed; - qDebug() << "\tadapter:" << blob->data.interfaceData.adapterName; + qDebug() << "Interface" << endl + << "\ttype:" << blob->data.interfaceData.dwType << endl + << "\tspeed:" << blob->data.interfaceData.dwSpeed << endl + << "\tadapter:" << blob->data.interfaceData.adapterName; break; case NLA_802_1X_LOCATION: - qDebug() << "802.1x Location"; - qDebug() << '\t' << blob->data.locationData.information; + qDebug() << "802.1x Location" << endl + << '\t' << blob->data.locationData.information; break; case NLA_CONNECTIVITY: - qDebug() << "Connectivity"; - qDebug() << "\ttype:" << blob->data.connectivity.type; - qDebug() << "\tinternet:" << blob->data.connectivity.internet; + qDebug() << "Connectivity" << endl + << "\ttype:" << blob->data.connectivity.type << endl + << "\tinternet:" << blob->data.connectivity.internet; break; case NLA_ICS: - qDebug() << "ICS"; - qDebug() << "\tspeed:" << blob->data.ICS.remote.speed; - qDebug() << "\ttype:" << blob->data.ICS.remote.type; - qDebug() << "\tstate:" << blob->data.ICS.remote.state; - qDebug() << "\tmachine name:" << blob->data.ICS.remote.machineName; - qDebug() << "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName; + qDebug() << "ICS" << endl + << "\tspeed:" << blob->data.ICS.remote.speed << endl + << "\ttype:" << blob->data.ICS.remote.type << endl + << "\tstate:" << blob->data.ICS.remote.state << endl + << "\tmachine name:" << blob->data.ICS.remote.machineName << endl + << "\tshared adapter name:" << blob->data.ICS.remote.sharedAdapterName; break; default: qDebug() << "UNKNOWN BLOB TYPE"; diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp index d419e42cd5..f500d6e413 100644 --- a/src/plugins/platforms/android/androidjnimain.cpp +++ b/src/plugins/platforms/android/androidjnimain.cpp @@ -498,8 +498,8 @@ static jboolean startQtApplication(JNIEnv *env, jobject /*object*/, jstring para } if (!m_main) { - qCritical() << "dlsym failed:" << dlerror(); - qCritical() << "Could not find main method"; + qCritical() << "dlsym failed:" << dlerror() << endl + << "Could not find main method"; return false; } -- cgit v1.2.3 From e931ad71101585cf7826641f4c8e373c7b3119b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 12 Nov 2015 16:22:14 +0100 Subject: Don't use QT_AUTO_SCREEN_SCALE_FACTOR With the addition of Qt::AA_EnableHighDpiScaling testing of the env. variable only is no longer sufficient. Use QHighDpiScaling::isActive() instead, which is available at the time loadAndroidStyle is called. Change-Id: Iaa6bbb5a04a71fa3bd68f3bdc8c8bcdfb5d1778f Reviewed-by: BogDan Vatra Reviewed-by: J-P Nurmi --- src/plugins/platforms/android/qandroidplatformtheme.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp index 71a3f910d2..5531910555 100644 --- a/src/plugins/platforms/android/qandroidplatformtheme.cpp +++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp @@ -46,6 +46,7 @@ #include #include +#include #include QT_BEGIN_NAMESPACE @@ -217,7 +218,7 @@ QJsonObject AndroidStyle::loadStyleData() static std::shared_ptr loadAndroidStyle(QPalette *defaultPalette) { - double pixelDensity = qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") ? QtAndroid::pixelDensity() : 1.0; + double pixelDensity = QHighDpiScaling::isActive() ? QtAndroid::pixelDensity() : 1.0; std::shared_ptr style(new AndroidStyle); style->m_styleData = AndroidStyle::loadStyleData(); if (style->m_styleData.isEmpty()) -- cgit v1.2.3 From b0ec05f27bff6065c97e6e4a0f1606da7472d18c Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Thu, 29 Oct 2015 13:16:31 +0100 Subject: Rename ANGLE libs in order to not conflict with other ANGLE libs This is needed to be able to use Qt (with dynamic ANGLE) in a plugin while the host runs a different version of Qt (and ANGLE). In addition to changing the LIBEGL_NAME and LIBGLESV2_NAME variables you also need to update the value of the LIBRARY definition in the .def files for ANGLE: qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2[d?].def qtbase/src/3rdparty/angle/src/libGLESv2/libEGL[d?].def Task-number: QTBUG-48431 Change-Id: Idd00d039ba3e20cc0ec7496bee36ed1c90383b0d Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowseglcontext.cpp | 17 +++++++++-------- src/plugins/platforms/windows/windows.pri | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp index 21eba6da7e..65a9763be6 100644 --- a/src/plugins/platforms/windows/qwindowseglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp @@ -118,11 +118,11 @@ void *QWindowsLibEGL::resolve(const char *name) bool QWindowsLibEGL::init() { -#ifdef QT_DEBUG - const char dllName[] = "libEGLd.dll"; -#else - const char dllName[] = "libEGL.dll"; + const char dllName[] = QT_STRINGIFY(LIBEGL_NAME) +#if defined(QT_DEBUG) && !defined(Q_OS_WINCE) + "d" #endif + ""; qCDebug(lcQpaGl) << "Qt: Using EGL from" << dllName; @@ -178,11 +178,12 @@ void *QWindowsLibGLESv2::resolve(const char *name) bool QWindowsLibGLESv2::init() { -#ifdef QT_DEBUG - const char dllName[] = "libGLESv2d.dll"; -#else - const char dllName[] = "libGLESv2.dll"; + + const char dllName[] = QT_STRINGIFY(LIBGLESV2_NAME) +#if defined(QT_DEBUG) && !defined(Q_OS_WINCE) + "d" #endif + ""; qCDebug(lcQpaGl) << "Qt: Using OpenGL ES 2.0 from" << dllName; #if !defined(QT_STATIC) || defined(QT_OPENGL_DYNAMIC) diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri index 29297116da..065108cb03 100644 --- a/src/plugins/platforms/windows/windows.pri +++ b/src/plugins/platforms/windows/windows.pri @@ -132,3 +132,6 @@ contains(QT_CONFIG, freetype) { } contains(QT_CONFIG, accessibility):include($$PWD/accessible/accessible.pri) + +DEFINES *= LIBEGL_NAME=$${LIBEGL_NAME} +DEFINES *= LIBGLESV2_NAME=$${LIBGLESV2_NAME} -- cgit v1.2.3 From 5d63e325faa44cf1345d6f7b5cb39ec874527675 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 30 Nov 2015 11:31:43 +0100 Subject: Avoid dynamic switching between backingstore composition paths Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll Reviewed-by: Eike Ziller Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/windows/qwindowsintegration.cpp | 2 ++ src/plugins/platforms/xcb/qxcbintegration.cpp | 1 + 2 files changed, 3 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 6b50ebe8a1..55e6d55e5b 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -282,6 +282,8 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co return true; case AllGLFunctionsQueryable: return true; + case SwitchableWidgetComposition: + return true; default: return QPlatformIntegration::hasCapability(cap); } diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 9cedfa77ad..19e8b1de7d 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -252,6 +252,7 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const case ForeignWindows: return true; case SyncState: return true; case RasterGLSurface: return true; + case SwitchableWidgetComposition: return true; default: return QPlatformIntegration::hasCapability(cap); } } -- cgit v1.2.3 From 5f00d18ad34979f57d6c17770ee9df5a2acb93e6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 1 Oct 2015 11:40:49 +0200 Subject: Windows QPA: Fix window state transition from minimized to normal. Use SW_SHOWNORMAL instead SW_SHOWNOACTIVATE as a parameter to ShowWindow() to enforce the window to be restored to normal state, even if the state before minimized was maximized. Task-number: QTBUG-48449 Change-Id: I9436623b1495f574a72050e50e8b31bfc83ced5c Reviewed-by: Andy Shaw --- src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index c49682cc26..48484209b5 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1779,7 +1779,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState) if ((oldState == Qt::WindowMinimized) != (newState == Qt::WindowMinimized)) { if (visible) ShowWindow(m_data.hwnd, (newState == Qt::WindowMinimized) ? SW_MINIMIZE : - (newState == Qt::WindowMaximized) ? SW_MAXIMIZE : SW_SHOWNOACTIVATE); + (newState == Qt::WindowMaximized) ? SW_MAXIMIZE : SW_SHOWNORMAL); } qCDebug(lcQpaWindows) << '<' << __FUNCTION__ << this << window() << newState; } -- cgit v1.2.3 From 1b6f705ca73f67e91bd75daabeb1945dce4aefb2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 1 Dec 2015 16:43:18 +0100 Subject: Windows: Load DirectWrite dynamically. DirectWrite is not supported on Windows XP. Task-number: QTBUG-49711 Change-Id: Ie1df6250814226d53fe4fb3a1c6bd024f6018796 Reviewed-by: Joerg Bornemann --- .../platforms/windows/qwindowsfontdatabase.cpp | 52 +++++++++++++++------- src/plugins/platforms/windows/windows.pri | 1 - 2 files changed, 37 insertions(+), 16 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index c8eaccd956..334c6a9407 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include @@ -60,6 +61,38 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_DIRECTWRITE +// ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711) + +typedef HRESULT (WINAPI *DWriteCreateFactoryType)(DWRITE_FACTORY_TYPE, const IID &, IUnknown **); + +static inline DWriteCreateFactoryType resolveDWriteCreateFactory() +{ + if (QSysInfo::windowsVersion() < QSysInfo::WV_VISTA) + return Q_NULLPTR; + QSystemLibrary library(QStringLiteral("dwrite")); + QFunctionPointer result = library.resolve("DWriteCreateFactory"); + if (Q_UNLIKELY(!result)) { + qWarning("Unable to load dwrite.dll"); + return Q_NULLPTR; + } + return reinterpret_cast(result); +} + +static IDWriteFactory *createDirectWriteFactory() +{ + static const DWriteCreateFactoryType dWriteCreateFactory = resolveDWriteCreateFactory(); + if (!dWriteCreateFactory) + return Q_NULLPTR; + IUnknown *result = Q_NULLPTR; + if (FAILED(dWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), &result))) { + qErrnoWarning("DWriteCreateFactory failed"); + return Q_NULLPTR; + } + return reinterpret_cast(result); +} +#endif // !QT_NO_DIRECTWRITE + // Helper classes for creating font engines directly from font data namespace { @@ -466,14 +499,9 @@ namespace { class CustomFontFileLoader { public: - CustomFontFileLoader() : m_directWriteFactory(0), m_directWriteFontFileLoader(0) + CustomFontFileLoader() : m_directWriteFactory(createDirectWriteFactory()), m_directWriteFontFileLoader(0) { - HRESULT hres = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, - __uuidof(IDWriteFactory), - reinterpret_cast(&m_directWriteFactory)); - if (FAILED(hres)) { - qErrnoWarning(hres, "%s: DWriteCreateFactory failed.", __FUNCTION__); - } else { + if (m_directWriteFactory) { m_directWriteFontFileLoader = new DirectWriteFontFileLoader(); m_directWriteFactory->RegisterFontFileLoader(m_directWriteFontFileLoader); } @@ -571,15 +599,9 @@ qreal QWindowsFontDatabase::fontSmoothingGamma() static inline bool initDirectWrite(QWindowsFontEngineData *d) { if (!d->directWriteFactory) { - const HRESULT hr = DWriteCreateFactory( - DWRITE_FACTORY_TYPE_SHARED, - __uuidof(IDWriteFactory), - reinterpret_cast(&d->directWriteFactory) - ); - if (FAILED(hr)) { - qErrnoWarning("%s: DWriteCreateFactory failed", __FUNCTION__); + d->directWriteFactory = createDirectWriteFactory(); + if (!d->directWriteFactory) return false; - } } if (!d->directWriteGdiInterop) { const HRESULT hr = d->directWriteFactory->GetGdiInterop(&d->directWriteGdiInterop); diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri index 065108cb03..67af5c03ef 100644 --- a/src/plugins/platforms/windows/windows.pri +++ b/src/plugins/platforms/windows/windows.pri @@ -13,7 +13,6 @@ wince: DEFINES *= QT_LIBINFIX=L"\"\\\"$${QT_LIBINFIX}\\\"\"" DEFINES *= QT_NO_CAST_FROM_ASCII contains(QT_CONFIG, directwrite) { - LIBS *= -ldwrite SOURCES += $$PWD/qwindowsfontenginedirectwrite.cpp HEADERS += $$PWD/qwindowsfontenginedirectwrite.h } else { -- cgit v1.2.3 From 96cc7fe5c26e2b2fb3e49813ff9beadd38ef5992 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 27 Nov 2015 14:37:07 +0100 Subject: DirectWrite: Inherit synthesized properties for fallback fonts When a fallback font is selected, we need to copy out the properties from the main font which can be synthesized by the font engine. In particular, this is weight > normal, and oblique style. This is the DirectWrite equivalent of a856c4a902816a7d691ca50e6f556521287be441. Change-Id: I5d1215c66a433c8a8029c06e7a3dcee287f3f76f Reviewed-by: Konstantin Ritt --- src/plugins/platforms/windows/qwindowsfontengine.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index 3685197430..4a799af44e 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -1357,6 +1357,11 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at) QWindowsFontEngineDirectWrite *fedw = new QWindowsFontEngineDirectWrite(directWriteFontFace, fontEngine->fontDef.pixelSize, data); + if (fontEngine->fontDef.weight > QFont::Normal) + fedw->fontDef.weight = fontEngine->fontDef.weight; + if (fontEngine->fontDef.style > QFont::StyleNormal) + fedw->fontDef.style = fontEngine->fontDef.style; + fedw->fontDef.family = fam; return fedw; } else { qErrnoWarning("%s: CreateFontFace failed", __FUNCTION__); @@ -1368,7 +1373,13 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at) // Get here if original font is not DirectWrite or DirectWrite creation failed for some // reason - return new QWindowsFontEngine(fam, lf, data); + QFontEngine *fe = new QWindowsFontEngine(fam, lf, data); + if (fontEngine->fontDef.weight > QFont::Normal) + fe->fontDef.weight = fontEngine->fontDef.weight; + if (fontEngine->fontDef.style > QFont::StyleNormal) + fe->fontDef.style = fontEngine->fontDef.style; + fe->fontDef.family = fam; + return fe; } bool QWindowsFontEngine::supportsTransformation(const QTransform &transform) const -- cgit v1.2.3 From a2ef3479b8e6fcebf97e6c67f4eb1910db66cdba Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 19 Nov 2015 17:49:46 +0100 Subject: Differ between vertical and no hinting on Windows Symmetric text rendering seems to be the equivalent to no hinting at all since it does subpixel antialiasing in both horizontal and vertical directions. Let people select non-symmetric, natural rendering as well, by setting vertical hinting on the font. This is the mode used for many UI elements in newer versions of Windows (like the title bar of windows etc.) [ChangeLog][Windows] Added differentiation between vertical hinting and no hinting in DirectWrite font engine. Task-number: QTBUG-48546 Change-Id: I2f75ae2d16fdf26706587d92da43daf29afbbcf2 Reviewed-by: Konstantin Ritt Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 4 +++- src/plugins/platforms/windows/qwindowsfontengine.cpp | 2 ++ .../platforms/windows/qwindowsfontenginedirectwrite.cpp | 14 ++++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 334c6a9407..8a2fbe1f6d 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1239,11 +1239,13 @@ QT_WARNING_POP fontFile->Release(); - fontEngine = new QWindowsFontEngineDirectWrite(directWriteFontFace, pixelSize, + fontEngine = new QWindowsFontEngineDirectWrite(directWriteFontFace, + pixelSize, fontEngineData); // Get font family from font data fontEngine->fontDef.family = font.familyName(); + fontEngine->fontDef.hintingPreference = hintingPreference; directWriteFontFace->Release(); } diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index 4a799af44e..30417f7cee 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -1362,6 +1362,7 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at) if (fontEngine->fontDef.style > QFont::StyleNormal) fedw->fontDef.style = fontEngine->fontDef.style; fedw->fontDef.family = fam; + fedw->fontDef.hintingPreference = fontEngine->fontDef.hintingPreference; return fedw; } else { qErrnoWarning("%s: CreateFontFace failed", __FUNCTION__); @@ -1379,6 +1380,7 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at) if (fontEngine->fontDef.style > QFont::StyleNormal) fe->fontDef.style = fontEngine->fontDef.style; fe->fontDef.family = fam; + fe->fontDef.hintingPreference = fontEngine->fontDef.hintingPreference; return fe; } diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp index 75449e22ed..593ac7d810 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp @@ -196,8 +196,8 @@ namespace { */ QWindowsFontEngineDirectWrite::QWindowsFontEngineDirectWrite(IDWriteFontFace *directWriteFontFace, - qreal pixelSize, - const QSharedPointer &d) + qreal pixelSize, + const QSharedPointer &d) : QFontEngine(DirectWrite) , m_fontEngineData(d) , m_directWriteFontFace(directWriteFontFace) @@ -547,12 +547,17 @@ QImage QWindowsFontEngineDirectWrite::imageForGlyph(glyph_t t, transform.m21 = xform.m21(); transform.m22 = xform.m22(); + DWRITE_RENDERING_MODE renderMode = + fontDef.hintingPreference == QFont::PreferNoHinting + ? DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC + : DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL; + IDWriteGlyphRunAnalysis *glyphAnalysis = NULL; HRESULT hr = m_fontEngineData->directWriteFactory->CreateGlyphRunAnalysis( &glyphRun, 1.0f, &transform, - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC, + renderMode, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &glyphAnalysis @@ -626,7 +631,8 @@ QImage QWindowsFontEngineDirectWrite::alphaRGBMapForGlyph(glyph_t t, QFontEngine *QWindowsFontEngineDirectWrite::cloneWithSize(qreal pixelSize) const { QFontEngine *fontEngine = new QWindowsFontEngineDirectWrite(m_directWriteFontFace, - pixelSize, m_fontEngineData); + pixelSize, + m_fontEngineData); fontEngine->fontDef = fontDef; fontEngine->fontDef.pixelSize = pixelSize; -- cgit v1.2.3