summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Clarify what static mutex in QCocoaGLContext is used forTor Arne Vestbø2018-09-131-4/+6
| | | | | | Change-Id: I4af0b78dbecad40b2a73cdbdb09a8eb60efdb013 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* SQL PostgreSQL/SQlite: Properly decode default varchar parameterChristian Ehrlicher2018-09-122-3/+13
| | | | | | | | | The default values for varchar columns were not decoded properly. Task-number: QTBUG-46968 Change-Id: Ie13d48c316cd694240f7e287010b97afc8c6c341 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* ODBC: Remove the trailing \0 in the case of a non unicode stringAndy Shaw2018-09-111-3/+6
| | | | | | | | | | | | | | Some ODBC drivers, such as old Informix ODBC drivers will incorrectly include a trailing \0 in a string when this should not exist. For unicode strings this was already accounted for, but for non-unicode ones this was not covered. The change also fixes up the comments a bit to make this clearer and also added one for the unicode case. Task-number: QTBUG-62406 Change-Id: Id932a58d9e5fdff2f4d1aacf8cc9fdaeb34f95f4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macOS: Prevent flickering when resizing window rendered to by separate threadTor Arne Vestbø2018-09-111-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a window is resized AppKit groups all updates to the view frames and corresponding layer bounds, so that the result of the resize is visually atomic, but this only works for the main thread. http://openradar.appspot.com/radar?id=4990815088672768 When a separate thread renders to one of the views in the window, it may result in the view and its layer updating its bounds visually before the resize has been visually reflected for the window itself and its border. To ensure visually atomic updates, we disable all screen updates for the process during resizing. This is the same workaround used by e.g. the NSOpenPanel class, which renders the content of the view out of process, and by Chromium for a similar use-case: https://chromium-review.googlesource.com/c/chromium/src/+/798774 Ideally we'd do this only for the window that is being resized, but there's no known API to do that. The deprecated [NSWindow disableScreenUpdatesUntilFlush] is a no-op these days, and used NSDisableScreenUpdates internally anyways). Fixes: QTBUG-69321 Change-Id: I84de714782278f2e0b2b2e1eb245c30810cb3023 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Windows: Disable shader disk cache for Intel HD Graphics 620Friedemann Kleint2018-09-114-1/+22
| | | | | | | | | | Set Qt::AA_DisableShaderDiskCache when the feature "disable_program_cache" (modeled after the Chromium driver bug list) is present and set it for the Intel HD Graphics 620 card. Task-number: QTBUG-64697 Change-Id: Ibba588d2ab296b5c959ab8ee9712b47ec7cc906e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* macOS: Use dark gradients for title and status bar in dark modeMorten Johan Sørvig2018-09-101-18/+38
| | | | | | | | | | | | | | These were hardcoded to light colors, which made the QMainWindow status bar look out of place and made the (light) text hard to read. Hardcode to dark colors for DarkAqua which more or less match the native look. Keep the optimization where the Gradients are stored in static variabless. Change-Id: I3e75b42c41d3e2d18e4bc0f17d950a702ccad662 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gabriel de Dietrich (DO NOT ADD TO REVIEWS) <gabriel.dedietrich@gmail.com>
* Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into ↵Liang Qi2018-09-101-21/+0
|\ | | | | | | refs/staging/5.12
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-101-21/+0
| |\ | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/macx.conf Change-Id: I8576493b417912fa5e5501bc2c1b935d186ac209
| | * 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>
* | | | macOS: Release surfaces straight away when reconfiguring QCocoaGLContextTor Arne Vestbø2018-09-101-0/+10
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling setView or update on NSOpenGLContext results in recreating the internal GL surfaces of the view. Unfortunately there seems to be a fixed amount of these surfaces available, so if we spin a loop where we for some reason end up recreating them, we'll easily run out, and lock up the whole window system: thread #6, name = 'SwapThread' frame #0: 0x00007fff7b45220a libsystem_kernel.dylib`mach_msg_trap + 10 frame #1: 0x00007fff7b451724 libsystem_kernel.dylib`mach_msg + 60 frame #2: 0x00007fff751c1675 SkyLight`SLSBindSurface + 247 frame #3: 0x00007fff5d9c4328 OpenGL`___lldb_unnamed_symbol29$$OpenGL + 255 frame #4: 0x00007fff6bf42c33 libGPUSupportMercury.dylib`gldAttachDrawable + 364 frame #5: 0x00007fff5d9e61e7 GLEngine`gliAttachDrawableWithOptions + 257 frame #6: 0x00007fff5d9c4bb0 OpenGL`___lldb_unnamed_symbol38$$OpenGL + 969 frame #7: 0x00007fff5d9c8b0e OpenGL`___lldb_unnamed_symbol57$$OpenGL + 82 frame #8: 0x00007fff5d9c8e55 OpenGL`CGLSetSurface + 330 frame #9: 0x00007fff50d0eb2c AppKit`NSOpenGLContextAttachOffScreenViewSurface + 352 This can happen e.g. when resizing the application, where AppKit itself spins a loop where we don't end up back in QCocoaEventDispatcher::processEvents() for each pass (where we do have a local pool). Or it can happen in the render-loop of a render-thread that doesn't use the event dispatcher. Change-Id: Iaf2f879dd01e3d807d0f35705ccc978dbc89036b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | macOS: Use NSOpenGLContext's drawable directly to track active drawableTor Arne Vestbø2018-09-095-64/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need a separate QWindow pointer to keep track of the active window, it's recorded already by the NSOpenGLContext's drawable. And we don't need to juggle the drawable when the window is hidden, the drawable is still valid after the window is re-shown, and we call update on every frame (for now) anyways, which will reconfigure the drawable if needed. Change-Id: I199b6c027226dd239c13ecc4aba86986ca09a1eb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Cocoa: change background color of selected menu itemsRichard Moe Gustavsen2018-09-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 582d221b29 caused a regression when drawing menu items in e.g a QComboBox. After that change, QCocoaSystemSettings would set the QPalette::Highlight color to [NSColor selectedMenuItemTextColor]. But the Highlight color is the background color, not the text color. And we also use [NSColor selectedMenuItemTextColor] as the QPalette::HighlightedText color. The result is that highlighed menu items end up with the same foreground and background color (white), which means that they "disappear". The color that we used before the patch, alternateSelectedControlColor, could be used, but has the downside that it doesn't follow the appearance color in system settings (like it should, compared to native apps). And it's also slightly to blue. But using keyboardFocusIndicatorColor seems like a perfect match. Fixes: QTBUG-69500 Change-Id: I07f091a5130a7308525743948d2a435226658a6f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | macOS: Clear NSOpenGLContex's drawable when using offscreen surfacesTor Arne Vestbø2018-09-071-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the user might accidentally render to the previously active window, if not explicitly using an FBO. This will have an performance impact if doing makeCurrent on a real window and an offscreen window back and forth with the same context, but that's not really a common or recommended use of QOffscreenSurface, as you can create FBOs with a normal window current as well. The use case of QOffscreenSurface is when a real window is not available. Change-Id: If93d04f82564523e15d5970429afea34c5cd31fe Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-071-4/+18
|\| | | | | | | | | | | Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
| * | 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>
* | cocoa: Fix build with MoltenVKLaszlo Agocs2018-09-061-2/+6
| | | | | | | | | | Change-Id: If92afa2d30d55e1dd2968f582350ba2cf16fe27b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Use single call site for timer processing in event dispatcherTor Arne Vestbø2018-09-062-5/+11
| | | | | | | | | | | | | | | | | | | | Makes it easier to add shared logic later on. The call to maybeCancelWaitForMoreEvents() has been left out as it was not called from all call sites. Change-Id: Ibcb10ab4d788de80850b0e5a4286b4d49091cddb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Rename QCocoaGLContext::setActiveWindow to setDrawableTor Arne Vestbø2018-09-062-12/+16
| | | | | | | | | | Change-Id: I0be5125b434418c005f45f05c54b22f0418b46e4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Remove some misplaced sizeof() scalings on array sizes for new[]Edward Welbourne2018-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | Noticed during review of clang-tidy warnings. I have searched the source tree (using grep) and only this one file contains examples of this mistake. Change-Id: I3bbcec736e5a184db7251962fd3671a21ab5d238 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Make flatpak portal support to be used also by Snap applicationsJan Grulich2018-09-0210-131/+133
| | | | | | | | | | | | | | | | | | Snap now uses xdg-desktop-portal for portal support. Add check for apps running in Snap and make them use portals by default. We also should be using different name for the platform theme used by sandboxed apps. Change-Id: Ibaa35b7549b3d94775d7edb937f729a300d071b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix clang-tidy warnings about (private) class definitionsFriedemann Kleint2018-09-024-44/+48
| | | | | | | | | | | | | | | | | | | | | | Add override, disable copies where appropriate and use = default for trivial functions. Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows QPA: Stop synthesizing mouse events from tablet/touchAndre de la Rocha2018-09-012-26/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fake mouse events should be synthesized by QtGui, not the QPA plugin, when the tablet/touch events are not handled by the application and the Qt::AA_SynthesizeMouseForUnhandledTouchEvents or Qt::AA_SynthesizeMouseForUnhandledTabletEvents flags are set. Task-number: QTBUG-47007 Task-number: QTBUG-60437 Change-Id: I4d6d5e6667d245c45a4eb4f3a94db05cf9772f52 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | wasm: disable RasterGlSurfaceLorn Potter2018-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QOpenGlWidget and QuickQidget do not work at this time anyway. This also causes gl to be initialized for widget apps, so disabling this will optimize widget apps. We could use Qt::AA_ForceRasterWidgets as well. Task-number: QTBUG-67797 Change-Id: I8f86a9f72e6f3d437a818b4fbe3d6f3658e17d04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | macOS: Remove support for QSurfaceFormat::StereoBuffersTor Arne Vestbø2018-08-311-5/+3
| | | | | | | | | | | | | | | | | | | | The NSOpenGLPFAStereo attribute was deprecated in macOS 10.12, without any replacement, and adding the attribute to the pixel format results in context creation failure, so we're assuming the feature is no longer supported an disable it wholesale on macOS. Change-Id: I27d9f300fdaff9abe90781e3160b97f8b66121ad Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | macOS: Update all deprecated enums to their 10.12+ equivalentsTor Arne Vestbø2018-08-3114-135/+133
| | | | | | | | | | Change-Id: I3034258da95c9c70eb6758db92967f438617f6e9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Remove codepaths and checks for unsupported Apple platformsTor Arne Vestbø2018-08-318-91/+42
| | | | | | | | | | | | | | We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3. Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | WebAssembly for QtBaseMorten Johan Sørvig2018-08-3030-0/+4711
| | | | | | | | | | | | | | | | | | | | | | | | This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-302-9/+14
| | | | | | | | | | | | | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows QPA: Fix duplicate Pointer Touch events and missing TouchCancelRomain Pokrzywka2018-08-304-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | translateTouchEvent needs to filter events based on the message type passed in msg, as Windows sends more than just down/up/update events, it also sends enter/leave for each touch and occasionally a few more. One of them is WM_POINTERCAPTURECHANGED which indicates a general loss of touch input, which needs to be translated to a touch cancel event. Ignore WM_POINTERENTER/WM_POINTERLEAVE events as they result in sending duplicate Qt::TouchPointPressed/Qt::TouchPointReleased events otherwise. Also avoid sending duplicate events for each additional touchpoint: Windows already bundles all available touchpoints for a touch event when calling GetPointerFrameTouchInfo, so we get all points at once, but we'll still receive other events for each additional touchpoint, resulting in reading the same bundled data again for each one and sending duplicate events to QWindowSystemInterface. Use SkipPointerFrameMessages() to avoid receiving the additional events for the frame we just processed. Finally, add raw event logging when the platform verbose level is >1. Change-Id: I55d840285f642a00f6ffcda4a3efd7ae3985310b Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* | Windows QPA: Improve Pointer Pen events translationRomain Pokrzywka2018-08-273-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compute QPointF hi-res screen coordinates based on the HIMETRIC values contained in the native message. This gives the same high-precision screen coordinates as what the old WinTab handler supported. Add the possibility to not synthesize mouse events if the platform plugin option DontPassOsMouseEventsSynthesizedFromTouch is set, just like we do for finger touches. This makes it possible to have clean Pen events without mouse duplicates for an application that handles both input types in parallel. Add raw event logging when the platform verbose level is >1. Change-Id: Ibf68b6275400388a76f8d5c573eed8f4b9bf4e9d Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | macOS: minor refactoring QSendSuperHelperMikhail Svetkin2018-08-241-14/+5
| | | | | | | | | | | | | | Replace local implementation of index_sequence with QtPrivate::IndexesList Change-Id: I193b9183ec6832294687e979576a2e3ec56d550b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | cups: Add a QT_CONFIG(dialogbuttonbox) guardTamas Zakor2018-08-231-0/+6
| | | | | | | | | | | | | | | | | | | | This fixes build with -no-feature-action configuration. The corresponding dialog is added by: 6c5c1a562c cups: Show a dialog when asked for password Change-Id: Ic88bdd62c756749959e66252427b5edc2c3ce7cc Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Windows QPA: Force windows to the main screen in certain AMD GPU setupsAndre de la Rocha2018-08-233-11/+136
| | | | | | | | | | | | | | | | | | | | | | | | A multi-screen setup with an AMD adapter set as the 'main display' leads to using the AMD drivers for OpenGL. This then causes a crash when calling SetPixelFormat and similar for windows located on another adapter's screen. This workaround detects the conditions leading to the crash and moves the window to the main display. Task-number: QTBUG-50371 Change-Id: I4007c490bdcdc13d6e8bce82983b150aa4930338 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-221-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
| * 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>
* | Windows QPA: Add option to detect AltGr key pressesFriedemann Kleint2018-08-216-10/+62
| | | | | | | | | | | | | | | | | | | | | | According to MSDN, AltGr key presses are sent as a sequence of SYS left Ctrl + right Alt. Add an option to detect AltGr as modifier key. Task-number: QTBUG-69317 Change-Id: I30ce169d2e6dbbae194ff714abfbc732b53652ce Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge dev into 5.12Oswald Buddenhagen2018-08-2136-727/+739
|\ \ | | | | | | | | | Change-Id: I63f632b595f66d2fc93e9aa713500e3799e3df2a
| * | macOS: Teach QWheelEvent to handle a new ScrollMomentum phaseTor Arne Vestbø2018-08-171-23/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We detect if there's an upcoming momentum phase using the same trick used by e.g. Mozilla in their event handling: https://tinyurl.com/yd8lcs4l, and as recommended by an Apple engineer: https://tinyurl.com/y8yytlgv The event is not guaranteed to be in the queue, but in practice it seems to be. If this assumption fails we can add a wait timeout to the event search instead of using [NSDate distantPast] as a timeout (which only looks at queued events). When the momentum phase is detected, QWheelEvent::phase will have the new ScrollMomentum value, and the phase transitions will be ScrollBegin -> ScrollUpdate -> ScrollMomentum -> ScrollEnd. We no longer send ScrollEnd to signify that the user's fingers have been lifted off the trackpad; rather, the first event with ScrollMomentum phase means that the fingers have been lifted and macOS is now sending simulated-momentum events. This means ScrollEnd is a reliable indicator that the entire scroll gesture (both the user interaction and the momentum) has ended. If the ScrollMomentum phase is skipped, it means the user's fingers came to rest before being lifted, so there is no momentum. In that case the transitions will be ScrollBegin -> ScrollUpdate -> ScrollEnd. Task-number: QTBUG-63026 Task-number: QTBUG-65160 Change-Id: I80191a472f6fa892387004c199166a6350124274 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | WinRT QPA: Fix mapping of static text accessibility roleAndre de la Rocha2018-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QAccessible::StaticText should be mapped to AutomationControlType_Text instead of AutomationControlType_Edit. Change-Id: If8c840f0dea553c1a750225586778a7d24cf424a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | xcb: replace tiny helper function with an inline codeGatis Paeglis2018-08-171-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | Having these 2 lines in a function does not add much value and requires scrolling that could be avoided. Change-Id: Ife814be6478521cd64b0048d1b6ee447afea55de Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | xcb: avoid unnecessary InternAtom requestsGatis Paeglis2018-08-175-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QXcbConnection::internAtom() creates the atom if it does not exist. The lifetime of an atom is not tied to the interning client. Atoms remain defined until server reset (lost connection, restart). So create the atom once via QXcbConnection::initializeAllAtoms(), and later fetch the atom value from local array, instead of repeating InternAtom requests. Change-Id: I3cae21895febad6e5daf8c32e72612202baaad64 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Modernize the "thread" featureUlf Hermann2018-08-172-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-169-80/+288
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-08-169-80/+288
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/plugins/platforms/xcb/qxcbbackingstore.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I4af138ffb2f5306373244523768209e8873b2798
| | | * 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>