summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* macOS 11: Fix positioning of focus frame around comboboxVolker Hilsheimer2021-06-181-4/+8
| | | | | | | Fixes: QTBUG-94069 Pick-to: 5.15 6.1 6.2 Change-Id: I09079726c96a41f628ae55724cfe53dbc225d358 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove old configure-related filesJoerg Bornemann2021-06-182-278/+0
| | | | | | | | | | | | | Remove the configure.json and configure.pri files that were used for the qmake-based configure. Remove the .prev_*.cmake files that were a by-product of configurejson2cmake.py. Pick-to: 6.2 Task-number: QTBUG-89536 Change-Id: Ie827562f7fd2513d59f69234d77b8b93124ea78e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Resend event if the first input method event changes focusVolker Hilsheimer2021-06-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractItemView opens the editor and changes focus in response to the first QEvent::InputMethod event. Changing focus however cancels the current composition, so the key press is lost and needs to be repeated by the user. What QAbstractItemView does is probably not that unique, so fixing this there - if possible at all - is not a general solution. In the platform specific input method handling code, we can generally discover that the focus object changed in response to the InputMethod event that gets sent to the focus object. On macOS, we can then pass the key event to the input method once more, which works fine. On Windows and X11, the situation is more complicated. That the focus changed is easily discovered, but re-sending the key press in such a way that the input method responds doesn't seem possible. On Windows, using SendInput simply delivers the exact key to the focus object, without starting the expected composition. On X11 with IBus, it should be possible to call ProcessKeyEvent again on the IBus input context when we discover in filterEventFinished that the focus object changed while delivering the event. However, any attempt to do so has no effect. So, for now only fixing this for macOS. Task-number: QTBUG-54848 Change-Id: I0f7b786cfa57430e6a1e7d605415265cf53eb675 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: fix QWindow::startSystemMove()/Resize() triggered by touchLiang Qi2021-06-164-7/+19
| | | | | | | | | | Abort the system move/resise at XCB_INPUT_TOUCH_END. Limit the behavior only on supported platforms, such as KDE and OpenBox. Change-Id: I53c86979ca56f4de8c5cf2807f781abdad6987b2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: fix QWindow::startSystemMove()/Resize() triggered by mouseLiang Qi2021-06-164-8/+60
| | | | | | | | | | | | | | | | We can't get mouse release event from master pointers after QXcbWindow::doStartSystemMoveResize() which calls xcb_ungrab_pointer(), it looks like most X11 WMs work as that. So we try to get mouse release event from slave pointers. Based on https://specifications.freedesktop.org/wm-spec/1.4/ar01s04.html , we need to send _NET_WM_MOVERESIZE_CANCEL when we get mouse release event. Task-number: QTBUG-91077 Change-Id: I01e74a01c87b381ee7cd6f20d51a1fa61c0e98fc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: cleanup connection when a screen disconnectsRichard Moe Gustavsen2021-06-161-1/+3
| | | | | | | | | | | | | | | | The iOS port creates one QIOSViewController per connected screen. And each view controller listens for changes to the application state. The problem is that we never disconnect this connection again. So if a screen is removed, and the corresponing view controller is deallocated, the connection is still kept alive. This will cause crashes to occur when the signal emits, since the slot will then be accessing deleted memory. Fixes: QTBUG-76948 Pick-to: 6.2 6.1 5.15 Change-Id: I758e51af9297cd62de193aae825f4475a2c7c3e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Schannel: Fix version functionsMårten Nordheim2021-06-141-7/+4
| | | | | | | | | | | | Previously they all returned the runtime versions and one string function did not include the backend's name. The NTDDI_VERSION macro is what we use to base certain feature-availability on during compilation so it makes the most sense to use for the build-string. Pick-to: 6.2 Change-Id: I96b025a5a05c0bbb4db3d5ee68656e0df5f4eb07 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Port some fallthrough comments to Q_FALLTHROUGHGiuseppe D'Angelo2021-06-133-4/+4
| | | | | Change-Id: I70dd492d5c8d198589bfd642db63182cf17b133f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkInformation: Rename the plugins and typeMårten Nordheim2021-06-1115-13/+13
| | | | | | | | | | To better match other plugins in Qt Pick-to: 6.2 Change-Id: I6ab19603f13c80a8afe4fe69f64669559a0eea15 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Yuhang Zhao <2546789017@qq.com>
* macOS: close visible gap between tab bar base line and tabsVolker Hilsheimer2021-06-111-1/+1
| | | | | | | | | | | | | | | | Dock widgets enable the QTabBar::drawBase property, but the clip region left a gap of 3 pixels on each side between the base line and the tabs. Correct the size of the hole cut into the clip region accordingly. Visually tested on macOS 10.15.7 and macOS 11.2.1 using the dockwidgets and tabdialog example. As a drive-by, fix a spelling mistake in related documentation. Fixes: QTBUG-86362 Pick-to: 6.2 6.1 Change-Id: Iada027999467741d0590576ee4508e6f41fb056d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Allow programatically minimizing frameless windowsMorten Johan Sørvig2021-06-091-1/+4
| | | | | | | | | | NSWindowStyleMaskMiniaturizable also controls programatic minimize, in addition to the window decoration button. Fixes: QTBUG-65637 Pick-to: 6.2 6.1 5.15 5.12 Change-Id: Iac5fb483433441173d770f4fcfb9e93440b9fe6a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Keep NSWindow alive after handling windowShouldClose callbackTor Arne Vestbø2021-06-091-0/+9
| | | | | | | | | | | | | | | | | | | | | Option-clicking the close-button on a window in macOS is a request to batch-close all the windows. When this happens we get an event in through the window that was clicked, which in turn results in AppKit calling windowShouldClose: for each window. We respond to that by explicitly closing each window (instead of just responding YES or NO), which results in the window being released and deallocated. This causes a crash when AppKit then follows up by closing each window after we responded YES to windowShouldClose. We work around this by keeping the window alive in the closest auto release pool, which is typically at the level of the runloop. This ensures that the window is alive for the duration of the logic that AppKit has for batch-closing windows. Fixes: QTBUG-92232 Pick-to: 6.2 6.1 5.15 Change-Id: I68b6138eb8325af0576b438ffa011137fec27926 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* windows: gl: Print GetLastError() when makeCurrent failsLaszlo Agocs2021-06-081-1/+6
| | | | | | | | | | | | | This matches the behavior of other implementations, such as QEGLPlatformContext: doing a qWarning with the relevant error from eglGetError() or equivalent is helpful when something goes wrong and should be common among QOpenGLPlatformContext implementations. Pick-to: 6.1 Task-number: QTBUG-85714 Change-Id: Ifa5d22b83808c92ae92efcbcddc8d8c3d3ba34b1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QNetworkInformation: Adjustments to captive portal APIMårten Nordheim2021-06-083-11/+4
| | | | | | | | | | | | | | | Make it return bool since the TriState was really only used signify that the property was unsupported but there is already a separate way to check if it's supported. More importantly there is no different set of actions available to a user if they're in the Unknown or False state. Because of the change to bool, we also rename the property to have an 'is'-prefix. Change-Id: Iaaaad5ac31e663c36e00223bf5b0e719f412fc69 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QNetworkInformation: Some cleanup in NetworkManagerMårten Nordheim2021-06-083-14/+10
| | | | | | Change-Id: I7e0fce63883019278ceb9dc757bf10ee9d77097c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkInformation: Captive portal support for NetworkManagerMårten Nordheim2021-06-083-1/+41
| | | | | | Task-number: QTBUG-93848 Change-Id: I0d31e7ed75e9dbf5c7aac851982d9ed1ac226693 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QNetworkInformation: Captive portal support for WindowsMårten Nordheim2021-06-081-1/+55
| | | | | | | Task-number: QTBUG-93848 Change-Id: Ic1ca895a73c98772aba900bbc3be18ba62be6c0f Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Prevent overly deep build dir hierarchy on WindowsJoerg Bornemann2021-06-071-2/+6
| | | | | | | | | | | | | | | On Windows, building Qt with Ninja Multi-Config failed in a reasonably named build dir. The reason for that is our deep build dir hierarchy, created with add_subdirectory, and long target names like QNetworkListManagerNetworkInformationBackend within that hierarchy. Rename said target to QNLMNIBackend, and set AUTOGEN_BUILD_DIR to a short string that does not repeat the target name. Pick-to: 6.1 Fixes: QTBUG-94211 Change-Id: Iea6fee012fa46d9bfb01142b60e6cb5273893c50 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix inclusion of Qt6Network plugins in static buildsKai Köhne2021-06-048-14/+15
| | | | | | | | | | | The generated CMake file Config.cmake in cmake/Qt6Network/ is generated from the target name. If it doesn't end with "Plugin", then it won't be found by Qt6NetworkPlugins.cmake, which is looking for Qt6*PluginConfig.cmake files. Fixes: QTBUG-94108 Change-Id: I43f7056b2caede14509c9ec66b10e2037033762b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: render shortcuts in context menus correctly alignedVolker Hilsheimer2021-06-021-2/+18
| | | | | | | | | | | | | | | On macOS, shortcuts should be rendered along the imaginary line between the modifiers, and the key. The modifiers are right-aligned on the left side of that line, the key left aligned on the right side. Make an exception for multi-chord sequences, render those always left aligned. Pick-to: 6.1 Fixes: QTBUG-73990 Change-Id: Ie03f3f40278700bdfafbfca7aa52075825e20234 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Android: fix mimetype/namefilters handling for FileDialogAssam Boudjelthia2021-06-021-8/+9
| | | | | | | | | | | | | | | | | | | | Android file dialog uses setType() to set the main mimetype for the dialog if no mimetype or multiple (+1) mimetypes are provided, then the additional mimetypes can be provided via EXTRA_MIME_TYPES flag. The problem was that the mimetypes deduction from the namefilters was: * the namefilter used was empty, now we take the first item nameFilters(), because mimetypes cannot be changed once the dialog is open anyway. * The regex extraction was getting a namefilter ending with an empty char and that was giving a mimetype of any format thus making it show all possible files. Pick-to: 6.1 5.15 Fixes: QTBUG-83089 Change-Id: Ifaef40c2186732ad3a604d28e086409c35dafacf Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* wasm: map named key attribute “Meta” to Qt::Key_MetaMorten Sørvig2021-06-021-0/+1
| | | | | | | | | This value is sent by Apple keyboards, and was missing from the table. Change-Id: I49ad7ea74f2571c60ee9f2547468777b1f4585d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* xcb: Fix touch grab handling on pre-XI 2.2Povilas Kanapickas2021-06-011-4/+6
| | | | | | | | This is only a theoretical bug fix because systems that don't support XI 2.2 are ten years old by now. Change-Id: Ia3770a6ca626b60d0f1e4cd2fdc611adf99cbf25 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* SQLite plugin: use QString::unicode(), not utf16()Giuseppe D'Angelo2021-06-011-1/+1
| | | | | | | | | | utf16() reallocates a QString if it was created from raw data, in order to ensure NUL termination. But here we don't need NUL termination anyways because we also pass the string size, so just use unicode() instead. Change-Id: I4a01ab9f4e53b94b80d3d00272cb0f0e35e30959 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* SQLite driver: fix crash when binding a QByteArray/QStringGiuseppe D'Angelo2021-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing SQLITE_STATIC to sqlite3_bind_*() means that ownership of the data stays in the caller, i.e. SQLite itself doesn't make a copy; such data must be therefore be kept valid until sqlite3_step() is called. The code in the SQLite driver uses that option to avoid copying byte array or string data. But, unlike what the comments in the code say, we do NOT keep the QByteArray/QString alive long enough: they're contained by a temporary QVariant object which gets destroyed at the end of the loop that binds each argument. Luckily the fix is simple: since that QVariant is just a copy of the QVariants used as bound parameters, and these are held in a container (which lives long enough), simply create a reference to the container's elements rather than a copy. This ensures that the data is alive by the time sqlite3_step() is called. This problem doesn't normally appear because of implicit sharing of QByteArray/QString. When the QVariant is copied, the inner element is just a shallow copy. Getting the pointer to the data, and destroying the QVariant, does not destroy the data (it's kept alive by the QByteArray/QString inside the *copied-from* QVariant). Of course there's a catch: if the *copied-from* QVariant contains a QString created via fromRawData, then everything blows up. In this case, 1. the copied QVariant is created (which bumps the QString refcount)¹ 2. the QString inside of it is accessed directly (via QVariant::constData) 3. utf16() is called on that string, which detaches it (!) 4. the result of utf16() is passed to SQLite, with SQLITE_STATIC 5. the copied QVariant is destroyed; this destroys the inner QString, which, being detached, deallocates the data too early. 6. sqlite3_step() is called, kaboom. (The copied-from QVariant still has the string created by fromRawData.) ¹ Note that QString uses the Small QVariant Optimization, so the QString object itself into the QVariant is copied, it's not just a *QVariant* refcount increase. Change-Id: Idcdb192809f1f8f79b4a901e1247f933eb06e854 Pick-to: 6.1 5.15 5.12 Fixes: QTBUG-94070 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Add the 'Private' suffix to the internal module namesAlexey Edelev2021-05-314-29/+29
| | | | | | | | Rename internal modules to adjust their names to the internal module policy. Also modify mappings of the qmake file converters. Change-Id: I69aee1e8136c2379608d9d22d718f8c8a5f73124 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QNetworkInformation: Captive portal support for AndroidMårten Nordheim2021-05-314-5/+30
| | | | | | Task-number: QTBUG-93848 Change-Id: Ia74ed0a756dc2bf71c7172e21ac4ff2361150b32 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* wasm: fix screen offset logicLorn Potter2021-05-271-2/+2
| | | | | Change-Id: Id71dfcba5d0bc1fe660a478db5f4c57e68468b4b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QNetworkInformation: Move android dependencies and perms to pluginMårten Nordheim2021-05-271-7/+2
| | | | | | | | | It was a necessary workaround at the time, but this has since been fixed Task-number: QTBUG-90812 Change-Id: I8c0d5bf4c61d379736cd07a28c089c55d6befdee Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macOS: don't show invisible separator itemsVolker Hilsheimer2021-05-272-3/+8
| | | | | | | | | | | | Give QCocoaMenu access to the item's visibility property by adding a public getter, and respect that state when syncing the separator to the corresponding QCocoaNSMenuItems. Pick-to: 6.1 5.15 Fixes: QTBUG-88651 Change-Id: I7e238e5d3be141ec8f4e8f6f3ab22d761094d2d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Add explicit default constructor for QEglFSContextJanne Koskinen2021-05-271-0/+1
| | | | | | | | Fixes Integrity compiler issue where it cannot find implicitly defined Change-Id: I126333dd4b02b9b653b8e1ac5da07679b343c91f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
* macOS: respect underline attribute in menu item fontsVolker Hilsheimer2021-05-271-2/+4
| | | | | | | | | | | When we draw menu item text with CoreText instead of QPainter, then we need to translate QFont::underline() explicitly to an entry in the attribute dictionary. Task-number: QTBUG-73990 Pick-to: 6.1 5.15 Change-Id: I7e0c258f7cf80a89b29517fa8122576342654de1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Silence warning C4996 (use of deprecated GetDesktopDpi)Kai Köhne2021-05-272-0/+6
| | | | | | | | | | | | | | Silences warnings warning C4996: 'ID2D1Factory::GetDesktopDpi': Deprecated. Use DisplayInformation::LogicalDpi for Windows Store Apps or GetDpiForWindow for desktop apps. Using GetDpiForWindow sounds like the right approach, but it's not obvious where to get the window handle from here. Task-number: QTBUG-94043 Pick-to: 6.1 Change-Id: I2fc005e0c970c8338184f4500b876774ec9d976b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QSsl::ImplementedClass - add DtlsCookieTimur Pocheptsov2021-05-271-0/+1
| | | | | | | | To report QDtlsClientVerifier implementation supported. Change-Id: I23812396c0c6a9595769d8ddb9cc2f85cc636ecb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkManagerService: do not use a module-wide includeGiuseppe D'Angelo2021-05-261-1/+0
| | | | | | | We don't need all of QtDBus + QtCore dragged in. Change-Id: I99dd6b1a50587d8d520ec5240c5129b406e4f40d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Qt xcb: remove false detects of Qt::GroupSwitchModifierAleksei Nikiforov2021-05-261-3/+3
| | | | | | | | | | | | | | | | | In some cases, if X11 is configured with CapsLock as keyboard language switch key, and CapsLock is toggled via Shift+CapsLock key combination, toggled CapsLock is falsely detected as Qt::GroupSwitchModifier for subsequent key events. This change fixes this false detect, but doesn't fix detection of Qt::GroupSwitchModifier which is likely still broken. Fixes: QTBUG-49771 Pick-to: 5.15 6.0 6.1 Change-Id: I485e2d4f3c654707c62adaba367c1b8afb3fc36c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Android: Fix select handles misplacement on QDialogPekka Gehör2021-05-253-8/+43
| | | | | | | | | | Get select handles {Left, Right}Point from a mapToGlobal with a cursorRectangleof anchorRectangle of the selected word/text. Task-number: QTBUG-90799 Change-Id: I4fed19a1d3bb2247656b052306307e6980074405 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* wasm: fix tooltips show/hide behaviorLorn Potter2021-05-211-1/+9
| | | | | | | | | | When tool tip was trying to show its window became activated causing tool tip to hide instantly due to a redundant window activation bug on show/hide/raise/lower. Fixes: QTBUG-91095 Change-Id: Id215400a79cdc4ed1961731949ca139b575eec88 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Fix visual representation to not show tool tip window title barLorn Potter2021-05-222-2/+15
| | | | | Change-Id: I1adf841a97daa64cd8a0ae799235d99bf961171f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Restore logic to set wantsBestResolutionOpenGLSurfaceTor Arne Vestbø2021-05-201-0/+8
| | | | | | | | | | | | | | | | The logic was removed in 1fc7ca091b3fdda52381a383318a3a752ec21132 when we removed support for surface-backed views, based on the documentation for wantsBestResolutionOpenGLSurface noting that layer-backed views ignore the property. But in some cases, when plugin views are embedded into host views, and the host was built with a pre-10.14 SDK, AppKit seems to get confused, and we still need to set this property. Fixes: QTBUG-93770 Pick-to: 6.1 Change-Id: Id67f2fcb8c090c0e01c05d00792eaef311146df1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* wasm: disable the canvas resize observerMorten Sørvig2021-05-201-1/+0
| | | | | | | | | | | | | | We’re seeing crashes on tab close and also when the page has been open for a minute or two. Skip installing the handler until we figure out what’s wrong. Pick-to: 5.15 Fixes: QTBUG-93713 Change-Id: Idd0c4d646de544ebdd2f4d00425faa08645335ac Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* macOS: Fix warning about comparing different types in QCocoaScreen::isOnlineTor Arne Vestbø2021-05-201-2/+2
| | | | | | Pick-to: 6.1 Change-Id: Ieb70108d22bf254c69665e5b3e3a2988703e26a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QXcb: don't dereference pointer before checkingVolker Hilsheimer2021-05-201-1/+2
| | | | | | | | | | | | | | The virtualDesktop pointer is expected to be populated by queryPointer, but that method handles the case that there either is no reply, or that the reply doesn't match, in which case the pointer remains nullptr. Don't dereference it afterwards without checking. Addresses code checker warning a179d1087759bb6ca9c3380257bd70d6 Pick-to: 6.1 5.15 Change-Id: I5877f26fd3b49327c0de3f2c918bb606bee8ac57 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add EGLFS OpenWFD plugin for INTEGRITYKimmo Ollila2021-05-193-1/+27
| | | | | | | | | This enables OpenWFD EGLFS integration plugin and makes EGLFS the default platform for INTEGRITY builds. Change-Id: I65332ca0ae244f40013df435828e2e359200b325 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-181-87/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* iOS: Accessibility: Set the correct traits for EditableTextAndy Shaw2021-05-141-1/+9
| | | | | | | | | | | | Since the correct accessibility traits for EditableText are not available as a direct enum value, then we depend on the defaults for a UITextField to give us this information. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Fixes: QTBUG-93494 Pick-to: 6.1 5.15 5.12 Change-Id: If428414aec5ce571f0f8c0ecccffdbaf1c908120 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* cocoa: be more careful about rejecting frame strut eventsRichard Moe Gustavsen2021-05-121-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The m_buttons property is meant to hold the currently pressed mouse buttons done on the contents part of a QNSView. But m_buttons can sometimes get out of sync with AppKit (NSEvent.pressedMouseButtons). One way this is shown to happen is if you do a mouse press on a native child widget (that is backed by it's own QNSView), and then convert the widget to a top-level window before the release. In that case, the underlying QNSView will be reparented from one NSWindow to another, which will result in the old NSWindow getting the mouseUp call instead of the new window. The result is that we don't update m_buttons for the reparented QNSView, which will instead be left as "pressed". As a result of m_buttons being stuck in a faulty state, we also refuse to send out QEvent::NonClientAreaMouseMove events to the top-level widget. This because QNSView thinks that it's already in a dragging state that started on the content part of the view (and not on the strut). As a result, it can sometimes be impossible to dock a QDockWidget back into a QMainWindow, since we basically don't send out any frame-drag events to Qt for the new dock window. We can reason that if you start a mouse press on the frame strut, you cannot at the same time have an active mouse press on the view contents. This patch will therefore remove the buttons that we know was pressed on the frame strut from m_buttons. This will at least (be one way to) clear the faulty pressed state, and will let us send mouse press/drag/release (and after that, move) frame strut events to Qt. Pick-to: 6.1 5.15 Task-number: QTBUG-70137 Change-Id: If51e1fe57d2531b659d39de85658893dae6391e3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: fix unicode keyboard handlingLorn Potter2021-05-121-145/+9
| | | | | | | | | | | We can simplify and reduce the lookup table by casting to unicode for all printable keys. This means that non US/ASCII keyboards will have better support. Pick-to: 5.15 Fixes: QTBUG-84494 Change-Id: I60aa6320cf1b5d82910ed77e136246d301bfc09a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows QPA/Vista style: Fix placeholder colorFriedemann Kleint2021-05-111-1/+10
| | | | | | | | | | Bring back the code that was removed by 62c3dd5632b04a7ee2410cc2233c0d0605ad5bd6 to the Windows theme. Pick-to: 6.1 Fixes: QTBUG-93635 Change-Id: I066e89d482a584c1719f6bfb6160710ee73e1b81 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* macOS: Remove MIME plumbing from QCocoaNativeInterfaceTor Arne Vestbø2021-05-112-19/+0
| | | | | | | | | | The functions are available as private API though qt_mac_addToGlobalMimeList and qt_mac_removeFromGlobalMimeList for those that need it. Task-number: QTBUG-83252 Change-Id: Ibc17aedd9aaced236a082d3d8de4b28313406a02 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>