summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* sqlite: Fix QSqlError handling when opening/closing databaseFlorian Bruhin2018-09-131-7/+12
| | | | | | | | | | | | | | | | | | | Both sqlite3_open_v2 and sqlite3_close are documented to return an error code: https://www.sqlite.org/c3ref/open.html https://sqlite.org/c3ref/close.html However, those were ignored (other than checking whether the operation succeeded), causing QSqlError::nativeErrorCode() to always be "-1" when there was an error while opening/closing the database. Additionally, the error string needs to be read (via sqlite3_errmsg16) in qMakeError *before* d->access is set to 0, or the databaseText() will always be "out of memory" no matter what error actually happened. Task-number: QTBUG-70506 Change-Id: I75cbf178c9711442e640afd26c4502214d20c598 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Detect when we are at the sentence boundaryAndy Shaw2018-09-131-2/+14
| | | | | | | | | | | | On Samsung devices this would cause it to always to captalize each word even if it was not a new sentence. Therefore we use QTextBoundaryFinder to determine if it is a new sentence or not. Task-number: QTBUG-69398 Task-number: QTBUG-66531 Change-Id: I24bf36f09a2570acfefd4343551cb1720ddc6279 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix XCB on endian mismatched client and server with SHM offAllan Sandfeld Jensen2018-09-121-0/+2
| | | | | | | If SHM is disabled, that code path already does its own bswaping. Change-Id: I6c17f6c5c5502c8f89098d38d931b6b8f50b2640 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.11.2' into 5.11Qt Forward Merge Bot2018-09-092-26/+31
|\ | | | | | | Change-Id: I2fa26fa061cbf5d2bded203a299a19b7d1c31d0a
| * Revert "macOS: Force light theme on macOS 10.14+"Morten Johan Sørvig2018-09-031-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not really work: as soon as you build with the 10.14 SDK you opt-in to having updated palette management, which the Qt 5.11 series does not have. This leaves app developers with two ways to opt-out of dark mode: - Build with the 10.13 (or earlier) SDK. - Set NSRequiresAquaSystemAppearance in Info.plist This reverts commit 04671a80db32bd7fce470c50934cf60f2e8ffa70. Change-Id: I5c01b9965da45de914f699526ba0723837f36e1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * QMacStyle: Make helper-NSViews layer-backedTor Arne Vestbø2018-08-281-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents the view from triggering display of its superview when being temporarily added, which is both inefficient and causes issues when those dirty-rects are wrong due to the wrong frame position of the added view. The additional drawRect: calls and corresponding expose events resulting from the needsDisplay calls also caused repaint issues in Qt Widgets. QWidgetBackingStore doesn't seem to take the exposed region into account for an expose event, and will try to flush all dirty regions. Some of those may be outside the exposed region, and will be clipped away by the window system, never ending up on the screen, but with Widgets still thinking it has flushed all dirty regions. This is a separate issue, possibly solvable by setting the wantsDefaultClipping property on NSView to NO, but this needs further testing, so applying this commit as workaround makes sense, even if it's just hiding the real bug. Task-number: QTBUG-67998 Task-number: QTBUG-68023 Task-number: QTBUG-69990 Task-number: QTBUG-69740 Task-number: QTBUG-69292 Task-number: QTBUG-69332 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 38979332d0a66666ebd178bccd7e7a2b300a7e42) Change-Id: I4ef3fef29f749daa4f3a11fe9186ae77b359f966 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Windows QPA: Fix missing accessibility info with WebEngineViewAndre de la Rocha2018-09-041-4/+18
|/ | | | | | | | | | | | It seems when a WebEngineView is parented by a window its accessible interface will not know its parent, which prevented the root of an UI Automation fragment from being found, causing missing accessibility info. This change adds a workaround to avoid this issue. Task-number: QTBUG-70199 Change-Id: Ia7cfc9f410c4f0ef3b5f9d1700748a9a3e29b7c2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Windows QPA: Fix mapping of static text accessibility roleAndre de la Rocha2018-08-171-1/+1
| | | | | | | | | QAccessible::StaticText should be mapped to UIA_TextControlTypeId instead of UIA_EditControlTypeId. Task-number: QTBUG-69894 Change-Id: If2f8f55d2be492c02a3af5b1813ca12cf774a33a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Silence warning about comparing signed and unsignedShawn Rutledge2018-08-141-2/+2
| | | | | | | | qxcbimage.cpp:72:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] Task-number: QTBUG-69923 Change-Id: Icdb4ce8cb7ce5b48d7ee3839166eb1c7c9520c78 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* VNC plugin: explicitly cast int to uint16_t before calling htonsShawn Rutledge2018-08-141-3/+3
| | | | | | | | | | Otherwise there is a -Werror=narrowing error on big-endian architectures (where htons does nothing). Task-number: QTBUG-68390 Change-Id: Idb204a81aaedb9f4fde1d5fae406da36c7a1953e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from b206d1c8082a9e01ad3755d311a4cf683ec35161)
* xcb: make sure we have a valid m_qimage in backing storeGatis Paeglis2018-08-131-50/+61
| | | | | | | | | | | | | | | | | | | | | | | | This patch amends a62f1d03560937a306c7586669a46cd9575e9464. If the initial backing store resize request is called with QSize(0, 0), we end up with QXcbBackingStoreImage holding a default contructed QImage / m_qimage. This happens because of the logic in QXcbBackingStoreImage::create(), where if we detect that the requested segmentSize == 0, we do not allocate any memory, and thus don't create a valid image in m_qimage. On subsequent call to QXcbBackingStore::resize() we would only check if QXcbBackingStoreImage object has been created, but not if it is in a valid state. This obviously would cause problems. This patch re-factors the logic to handle better resize to QSize(0, 0). And make the code cleaner by: - merging ::create and ::resize as semantically it is always resize(). - dropping unnecessary argument passing. Task-number: QTBUG-69581 Change-Id: Ied337beb449dea8259fcf6b7d29f0a5bd553019d Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* IBus: connect to ibus-daemon when it restarts in FlatpakTakao Fujiwara2018-08-102-11/+40
| | | | | | | | IBus clients cannot access the IBus socket path in Flatpak and need to watch the D-Bus disconnection. Change-Id: Ida1a5ce4fe112c1c4f8855ec886e74f2cbdcc8a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Force light theme on macOS 10.14+Gabriel de Dietrich2018-08-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Until we can properly fix QPalette and QMacStyle, we should disable dark appearance in Qt applications. Disable by setting NSApp.appearance to Aqua, unless dark mode support has been requested via Info.plist or environment variable. Read the NSRequiresAquaSystemAppearance Info.plist key, don’t set NSApp.appearance if its value is false. Also check the QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE environment variable and apply similar logic. You then enable dark mode support by setting: QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE=0 which is slightly awkward, but matches Info.plist behavior. Task-number: QTBUG-68891 Change-Id: I86dc6cf3dee951d46c953396c57d2c31f2e4afcc Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* IBus: Support the portal, needed for Flatpak environmentRobin Lee2018-08-085-11/+140
| | | | | | | | | | | | | Following commit 35ce6247 in IBus, IBus input plugin now connects to session bus and use IBus portal to create input context when running in Flatpak environment or IBUS_USE_PORTAL is set. [ChangeLog][plugins][ibus] Support IBus portal. Qt programs in Flatpak environment can now trigger IBus input method. Change-Id: I561f5f873d709b8abeae554d804daa058f9f6e16 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
* macOS: Don't blend the backingstore unless the window has a backgroundTor Arne Vestbø2018-08-071-5/+5
| | | | | | | | | | | | | If there's no background, we should copy the backingstore, so that the backingstore is not blended with the result of the previous flush. The unified toolbar case is covered by the window having a textured background. Task-number: QTBUG-69773 Change-Id: I2f4eed9f44a60ebe7495ce68cf5a54d3d2424b0c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Update window geometries after screen properties changeTor Arne Vestbø2018-08-071-0/+14
| | | | | | | Task-number: QTBUG-69794 Task-number: QTBUG-68140 Change-Id: I4d33bc2136478d779cc4ae8170c3421d9a7557cc Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Windows QPA: Fix UIA-to-MSAA accessibility bridgeAndre de la Rocha2018-08-062-16/+13
| | | | | | | | | | | | According to MS sample code, MSAA requests should be replied with UI Automation providers to enable the use the UIA-to-MSAA bridge, in order to support MSAA-only clients. Also changing the mapping of QAccessible::Client from UIA_CustomControlTypeId to UIA_GroupControlTypeId, as it seems more appropriate and avoids an incorrect mapping to a push button type in the UIA-to-MSAA conversion. Change-Id: I5149d250da2d1bd7b14b44ca46e856a81c9be045 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Check for QImage allocation failure in qgifhandlerEirik Aavitsland2018-08-061-1/+6
| | | | | | | | Since image files easily can be (or corrupt files claim to be) huge, it is worth checking for out of memory situations. Change-Id: I635a3ec6852288079fdec4e14cf7e776fe59e9e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows: Implement Qt::WindowStaysOnBottomHintFriedemann Kleint2018-08-031-0/+2
| | | | | | | | | | | | Set the Z-order to HWND_BOTTOM in that case. Add a doc note stating that it only works for frameless or full screen windows. Task-number: QTBUG-53717 Change-Id: I7abf219a88aac715c51d27d925504da9e91b56f1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QCocoaMenuLoader - ensure that ensureAppMenuInMenu indeed, ensuresGabriel de Dietrich2018-08-011-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The logic seems to be incorrect (or the naming is misleading): it only adds 'appMenu' if it was found in the previous 'mainMenu', failing otherwise. Consider the following example: while (true){ QApplication app(a,b); MainWindow w; w.show(); app.exec(); } It's quite a contrived but apparently allowed API use (OP claims they have to switch languages in their app). The main window and the app are destroyed, so is the menu bar. Then a new main window is created, with a new menu bar. Now the current [NSApp mainMenu] (the one set after we deleted the previous) does not have 'appMenu' anymore (we removed it when initializing the first menu bar). So as a result we have app menu missing and add new menus/items to a wrong menus/at wrong index. Change-Id: I64fce766d6c12ebf7ae12bb94af41c8c1de3d78b Task-number: QTBUG-69496 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* xcb: partly revert 3bc0f1724ae49c2fd7e6d7bcb650350d20d12246Gatis Paeglis2018-08-014-101/+3
| | | | | | | | | | | | | | | After trying to fix (work around) system resize/move issues in various ways from within the platform plugin, it has been concluded that it is a bug at widget layer and should be fixed there instead: QTBUG-69716. This patch reverts parts of 3bc0f1724a and disables system move / resize on XCB plugin. Meaning, QSizeGrip will use its own implementation for resizing a window. Task-number: QTBUG-68501 Task-number: QTBUG-69628 Change-Id: Ib4744a93fb3e3c20f690a8f43713103856cb7d1a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Windows QPA: Fix override cursor being cleared when crossing window bordersFriedemann Kleint2018-07-313-5/+20
| | | | | | | | | | | Override cursors can be modified externally when for example crossing window borders. Add helper function to enforce the cursor again to QWindowsWindow::applyCursor() which is called for enter events. Task-number: QTBUG-69637 Change-Id: Ibea4da9f2aac81377002b626daae64b1102f6c2b Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix touch input for HoloLens devicesOliver Wolff2018-07-271-4/+5
| | | | | | | | | | With newer HoloLens images every touch event has a pressure of 0.0. By checking both values we make sure that touch points are handled correctly for new and old images. Task-number: QTBUG-69651 Change-Id: Ic16e3416ffb7a89e4c1adbec1703e84aa962b211 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* xcb: Fix build when xinput2 is not availableFriedemann Kleint2018-07-251-4/+10
| | | | | | | | | | | | Fix the #ifdefs. Amends 3bc0f1724ae49c2fd7e6d7bcb650350d20d12246. Task-number: QTBUG-68501 Task-number: QTBUG-51385 Task-number: QTBUG-32476 Change-Id: Icc6421fe2e91a3b29bcec8cb1a8a91cb71ae3172 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Windows QPA: Fix tablet event coords delay for tablets in pen modeRomain Pokrzywka2018-07-242-7/+3
| | | | | | | | | | | | | | Now that the mouse mode check is only done once for the first event after the TabletEnterProximityEvent, the m_oldGlobalPosF member has lost its purpose and should be removed. Worse, its value was used instead of currentGlobalPosF when in pen mode, resulting in an unnecessary 1-frame delay in the reported positions in the tablet events. Task-number: QTBUG-36937 Change-Id: I6bd2db57898850a65088d9bb41fbfbd96eac54f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows: Fix invisible element being included in the UI Automation treeAndre de la Rocha2018-07-241-22/+45
| | | | | | | | | | | When an element is not visible then it should not be shown in the element tree at all when using tools like Inspect. Also, the IsOffscreen property was hardcoded to false instead of reflecting the actual object offscreen state. Task-number: QTBUG-69537 Change-Id: If6e8a4685c0505ee2b99dfbb8bf2b5d0f4112b1e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* xcb: fix various bugs with _NET_WM_MOVERESIZEGatis Paeglis2018-07-235-9/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) After a37785ec7638e7485112b87dd7e767881fecc114 it become apparent that we don't get mouse release event from X server when system move/resize ends (because WM is grabbing the pointer). The old code (before a37785ec) would wrongly deduce mouse move as mouse release, which is why the issue was not seen before. The solution is to subscribe to slave device events. 2) This patch also amends 2488f34ecfd68702b5508c50cca3fb8e967ac8ea as that patch was solving the issue only for 1/3 of the supported DEs. It worked with KWin, but not with Unity and Gnome. Its worth noting that it also worked with two other WMs that I tested - openbox and awesomewm. The way forward is to detect when system move/resize was started as a result of touch event and let the QSizeGrip do the move/resize instead of WMs that are known to have bugs. With this patch we also need to adjust the event compression algorithm to not treat all XI_TouchUpdate events equally. For XI_Motion we don't care if the event that we process comes from a master or a slave device, so we can process them as equal. Task-number: QTBUG-68501 Task-number: QTBUG-51385 Task-number: QTBUG-32476 Change-Id: Iab4e79a289d7bc0fe26f7ae2cff7c562f51a3334 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QMacStyle: Configure checkbox NSButton as tri-stateGabriel de Dietrich2018-07-171-0/+2
| | | | | | | | | Qt allows this as a property of QCheckBox, so it should be enabled in its Cocoa counterpart. Change-Id: I88eb6dddabb173050c4fe7229f15c768181ef527 Task-number: QTBUG-69453 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* XCB/Xlib: make sure we don't get problems for sys headers using registerThiago Macieira2018-07-117-0/+14
| | | | | | | | | Found while compiling on FreeBSD 11.2 (clang 6 update has the warning): /usr/local/include/X11/Xlibint.h:675:7: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] Change-Id: I117816bf0f5e469b8d34fffd153e6482ccaed69f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* winrt: Avoid superfluous touch events for multitouchOliver Wolff2018-07-111-1/+4
| | | | | | | | | | | | | A touch press event's state has to be set to "stationary" after the touch event (including its list of touch points) has been passed to the QWindowSystemInterface. Following touch events (that are caused by another id) will not change the press event's state which can otherwise cause more than one press event for a given id in a multitouch setup. Task-number: QTBUG-58793 Change-Id: I44628912251beacfbda7dd37059577cb1d085bd5 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* xcb: Monitor XSETTINGS changeAlexander Volkov2018-07-101-0/+1
| | | | | | | | | | | | | Register QXcbXSettings object as a listener of events received by XSETTINGS window. It was forgotten to be done in 0f31a5d91f13bd6a574bed8db894a7ebb2813292 which introduced QXcbXSettings. XSettings are used by QXcbCursor to get cursor theme. Without this change QXcbCursor can't react on theme change. Change-Id: I0fdd4c913b1d7a482b507c5a054b7052cac61666 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* xcb: Move handling of RRScreenChangeNotify from QXcbScreen to QXcbVirtualDesktopAlexander Volkov2018-07-093-100/+103
| | | | | | | | | | | | | | | This event relates to xcb_screen_t (virtual desktop), not to RandR crtcs, so move its processing to QXcbVirtualDesktop. Currently it triggers redundant calling of RRGetCrtcInfo (from QXcbScreen::updateGeometry()). It's called anyway after receiving RRCrtcChangeNotify, so just drop it. There is also a mess between the rotation of Screen and crtcs, obviously they should be processed separately. Task-number: QTBUG-65598 Change-Id: I124752ccbde03adb15e9ba592dd8b2d8d7fc35f4 Reviewed-by: Daniel Vrátil <dvratil@kde.org> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* macOS: Ensure all windows are created on a valid screenTor Arne Vestbø2018-07-051-13/+18
| | | | | | | | | | | | | | | We rely on AppKit repositioning the window if the original position is not on any of the available screens. We do this by keeping the original position, but using the primary screen as reference. This doesn't work unless the window has a title bar, so in the corner case where the window has an invalid position, we apply the title bar style mask for a brief moment, so that AppKit will place the window correctly. Task-number: QTBUG-69221 Change-Id: If66cac36bf36f051570ba5854951ce4504fe771f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Add missing override keyword found by ClangThiago Macieira2018-07-051-1/+1
| | | | | | | qbsdfbscreen.h:57:10: error: 'initialize' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] Change-Id: I117816bf0f5e469b8d34fffd153e649318d2fd7c Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* QNX: Add the ability to disable EGL_KHR_surfaceless_context useJames McDonnell2018-07-013-2/+18
| | | | | | | | | | | QML fails to draw when this is used on at least one jacinto6 platform. Works when it's disabled. Task-number: QTBUG-68227 Change-Id: I7b3c081d4d5a4fe22136f4bdd8ad1f34495cd94a Reviewed-by: Adam Treat <adam.treat@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Fix automatic showing/hiding of the Windows 10 on-screen keyboardAndre de la Rocha2018-06-283-38/+74
| | | | | | | | | | | | The automatic showing/hiding of the built-in on-screen keyboard in touchscreen-based Windows computers, like the Microsoft Surface line, has stopped working after recent Windows updates. The OSK no longer seems to rely on UI Automation properties to detect text widgets. However, it can be triggered by showing an invisible caret. Task-number: QTBUG-68808 Change-Id: Ia604d21e314965dcdc61f1ced050cc3ed771f567 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: Guard non-reentrant uses of NSOpenGLContextTor Arne Vestbø2018-06-271-0/+5
| | | | | | | | | | | | | | | | | | | NSOpenGLContext should be re-entrant, but is not in practice, resulting in deadlocks when there are two render threads, eg: thread #23, name = 'QSGRenderThread' frame #0: 0x00007fff5c6dda4e libsystem_kernel.dylib`__psynch_mutexwait + 10 frame #1: 0x00007fff5c8a5b9d libsystem_pthread.dylib`_pthread_mutex_lock_wait + 83 frame #2: 0x00007fff5c8a34c8 libsystem_pthread.dylib`_pthread_mutex_lock_slow + 253 frame #3: 0x00007fff31ebb52e AppKit`flush_notify + 110 frame #4: 0x00007fff3e75ee2a GLEngine`glSwap_Exec + 186 frame #5: 0x00007fff3e740797 OpenGL`CGLFlushDrawable + 59 frame #6: 0x00007fff31ad43ac AppKit`-[NSOpenGLContext flushBuffer] + 27 ... Task-number: QTBUG-69040 Change-Id: I6f28b4cc5faf61ae93f66353ce2abdf8c223d994 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Windows QPA/GL: Fix build with MinGW/g++ 8.1 x64Friedemann Kleint2018-06-263-25/+49
| | | | | | | | | | | | | | | Fix warnings about invalid function type casts (return types conflicting with the PROC returned by wglGetProcAddress()) like: qwindowsglcontext.cpp:1250:138: error: cast between incompatible function types from 'PROC' {aka 'long long int (*)()'} to 'GLenum (*)()' {aka 'unsigned int (*)()'} [-Werror=cast-function-type] m_getGraphicsResetStatus = (GLenum (APIENTRY *)()) QOpenGLStaticContext::opengl32.wglGetProcAddress("glGetGraphicsResetStatusARB"); by introducing nested casts. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I7c51836f2b9f7e2a6fa17c5108d59b23c42fb99d Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Do not update scroll coordinates on ignorable enter eventsAllan Sandfeld Jensen2018-06-221-4/+4
| | | | | | | | | | | | | | | This greatly reduces how often we reset the scroll evaluators, especially with non-focused windows in KWin which sends an enter for every wheel events in that case. The update of the evaluators also has race conditions with the normal events, and thus reducing them fixes odd scrolling behavior with rapid firing mouse wheels. Task-number: QTBUG-42415 Task-number: QTBUG-68734 Change-Id: I1c14ca3352bf9c6e57e47ad3aaee1712fe6ba30b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix ico.json to avoid returning an empty mimetypeDavid Faure2018-06-221-1/+1
| | | | | | | | | QImageWriter::supportedMimeTypes() had an empty mimetype name in the list because the mimetype for the key "cur" was missing in this json file. Change-Id: I4eae4275cb04c4d640dbcac76cd9dc99baa4f0a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Recognize X11/XCB keysyms Undo, Redo, Find, CancelJonathan Marten2018-06-221-0/+7
| | | | | | | | | Convert these keysyms into the corresponding Qt::Key_ enum values, so that they can be part of a QKeySequence and used by applications. Task-number: QTBUG-69062 Change-Id: I6f2e28191dd8dacd63d4bf710e1714fc5dcce75f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* xcb: add qt.qpa.input.events logging of wheel eventsShawn Rutledge2018-06-211-0/+2
| | | | | | | | | | This is comparable to what we do on macOS, except that the scroll phase and inverted state are missing. Task-number: QTBUG-38570 Task-number: QTBUG-56075 Change-Id: I27502e1e2667317ab701f30f1fc601ae1e0591d0 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Windows QPA: Fix crashes when processing native eventsFriedemann Kleint2018-06-211-1/+1
| | | | | | | | | | | Change a0a22037cdacbf51a2db560ff902a5a341561b15 wrongly introduced a level of indirection when passing the MSG * as void * to QWindowSystemInterface::handleNativeEvent() in QWindowsContext::filterNativeEvent(). Remove the indirection. Task-number: QTBUG-67095 Change-Id: Ibc2db7ae56bca38f79bafabfabb6127d6ff8cf09 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Cocoa: handle WindowMaximizeButtonHint as wellMorten Johan Sørvig2018-06-211-0/+2
| | | | | Change-Id: I6af265d48e83fc3fc0ce86903820c2b37db05f03 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cocoa: Tool windows should always be resizableMorten Johan Sørvig2018-06-211-1/+4
| | | | | | | | | | | | | | | | | | | | Undocked dock windows have the following flags: Tool|X11BypassWindowManagerHint|WindowTitleHint| WindowSystemMenuHint|CustomizeWindowHint|WindowCloseButtonHint CustomizeWindowHint with no WindowMaximizeButtonHint means that we disable window resize in order to remove the zoom button (this is perhaps questionable, but is established behavior). That will however break dock windows: add exception for Qt::Tool. After refactoring we discover this special case, again. See previous fix in d37643c43. Change-Id: I67a09341e75b92fdb3108ea93901295c39107fe1 History-repeats: QTBUG-46882 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* cocoa: Don’t trigger security dialog on dragMorten Johan Sørvig2018-06-211-1/+5
| | | | | | | | | macOS 10.14+ will display an “Accessibility Access” security dialog if we generate mouse events, so don’t. Task-number: QTBUG-68830 Change-Id: If832ca3cd49ec6bdad1a8188feab884b6562e9d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QWindowsFontDatabase/QWindowsXPStyle: Fix compilation with g++ 8.1/MinGWFriedemann Kleint2018-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | Silence warnings about copying/clearing memory types which g++ considers non-trivial, for example: windows\qwindowsfontdatabase.cpp:1003:75: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const ushort' {aka 'const short unsigned int'} [-Werror=class-memaccess] memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength); qwindowsxpstyle.cpp:946:46: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); ^ qwindowsxpstyle.cpp:1053:38: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); by introducing a cast. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I160eb5fc7b64a2bc404e1fa61d306af2662d1252 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge remote-tracking branch 'origin/5.11.1' into 5.11Qt Forward Merge Bot2018-06-1918-126/+215
|\ | | | | | | Change-Id: I9a4571ccf826a86e055dfbba23b5e5cbd8ea55e8
| * xcb: add QT_XCB_NO_MITSHM envvar for disabling MIT-SHM extensionGatis Paeglis2018-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | We had something like this already in Qt4: QT_X11_NO_MITSHM The logic from 67227aeffdf94be8d177309d27291d5b3247586c not always works. There can still be cases that xcb_shm_attach_checked() returns with no errors on remote clients. Task-number: QTBUG-68783 Change-Id: Idd27ac66eb8f1114e3d1e1ddaaab2b00f235c561 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Access private properties via sandbox-safe API on Apple OSesTor Arne Vestbø2018-06-141-23/+8
| | | | | | | | | | | | | | | | | | | | We detect whether or not we're running inside a sandbox and bail out if so. We use runtime lookup of the property, so that static analysis of the application will not mistakenly think we're using the API in sandboxed situations. Change-Id: I5f5c42f5a4a44b62de061d945b62ac63167ece09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>