summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Android: Place cursor correctly on screen when editing"Rami Potinkara2021-10-264-63/+9
| | | | | | | | | | | | | | | This reverts commit 5c6b10c3cee5737dbc041d0463220898c8120807. It caused a regression such that the main window no longer resized or panned when the VKB is shown, in spite of android:windowSoftInputMode being set. Pick-to: 6.2 5.15 Task-number: QTBUG-95300 Task-number: QTBUG-96117 Task-number: QTBUG-97503 Change-Id: If56e1113eea69a940f6760bdb2ad06a93a0759c1 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* wasm: Hide popups when a window is left-clickedDavid Skoland2021-10-251-0/+3
| | | | | | | | | This logic is taken from the macOS platform implementation and seems reasonable to reuse in WASM. Fixes: QTBUG-90990 Change-Id: Id4a4dd8d9fdd9de3085bfcd9079793aad3dda363 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Android: set EXTRA_TITLE to the initially selected file in save dialogAssam Boudjelthia2021-10-252-4/+9
| | | | | | | | | | | | | | | The extra data EXTRA_TITLE is only documented to be used to provide the initially selected file name in the context of file dialog [1]. So, let's stick to setting it only in save mode. This also now allows the save dialog to set an initial file name which wasn't possible before. [1] https://developer.android.com/reference/kotlin/android/content/ Intent#action_create_document Pick-to: 6.2 5.15 Change-Id: Ib55191a7269bfad28af4928f4e74d87981bdd574 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Initialize member variables before we check their valuesVolker Hilsheimer2021-10-251-5/+3
| | | | | | | | | | | | | Amends 51679efcf97dfea86431912eeb9489088c0804ed, which broke Ctrl+key handling so that the key was not translated based on the alphanumerical character anymore. Fixes: QTBUG-97713 Pick-to: 6.2 Change-Id: I9835fd7af99693aae636ba3c4c114ef8e11621e9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add a QNetworkInformation backend based on GNetworkMonitorIlya Fedin2021-10-243-0/+175
| | | | | | | | | | GNetworkMonitor can get information from 3 sources: * org.freedesktop.portal.NetworkMonitor * NetworkManager * netlink Change-Id: Icfafe6af42148f26360449f1262093ffc6b0613a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* xcb: use QXcbConnection::selectionOwner() convenience APIGatis Paeglis2021-10-224-18/+7
| | | | | Change-Id: I4fbae152829206b15bf0430d3fb2c9e2b6026566 Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: remove confusing indirections for qt selection ownerGatis Paeglis2021-10-226-76/+40
| | | | | | | | | | | | | | | | | | | | This makes it more obvious that clipboard and DnD use the same selection owner (QXcbConnection::qtSelectionOwner()). This way we can also drop some QT_NO_CLIPBOARD defines. These defines actually are broken, but that is out-of-scope for this patch. And renamed the functions according to Qt guidelines: getSelectionOwner() -> selectionOwner() getQtSelectionOwner() -> qtSelectionOwner() The previous naming probably was influenced by underlying C API - xcb_get_selection_owner(). Change-Id: I467f1a3dbe75b4e8fd41c7e66ca9b0e25ef1039c Reviewed-by: Liang Qi <liang.qi@qt.io>
* xcb: avoid to use invalid pointersLiang Qi2021-10-222-2/+14
| | | | | | | Pick-to: 6.2 5.15 5.12 Task-number: QTBUG-96399 Change-Id: I33909940b501cb13f78981c43f3aef9fc9d1d52d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QNI: Add a convenience method for loading the default pluginMårten Nordheim2021-10-224-13/+27
| | | | | | | | | We have some official plugins, we may as well treat them as default and give a convenient function which loads those. Change-Id: I6251c77ac042b795bcf24b86e510e960ee4bab54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: add default Edit menu items, if not added by AppKitVolker Hilsheimer2021-10-212-0/+49
| | | | | | | | | | | | | | | | | | | | | | AppKit automatically appends "Start Dictation..." and "Emoji & Symbols" menu items, after a separator, to a menu in the menu bar that has the title "Edit" in the operating system language. Qt applications might however be translated to some other language, in which case the "Edit" menu is not recognized by AppKit, and the menu items won't be added. This is bad for accessibility and for users wanting to type emojis. If we have a menu that has the title "Edit" as translated in Qt's i18n system, then create those items manually. To prevent a duplication of the system- provided menu items, don't add the items if there already is one with the action being set to the relevant selector. Otherwise, perform the selector or call the NSApplication method ourselves. This then results in the relevant keyboard input through regular code paths. Fixes: QTBUG-79565 Change-Id: Ifd06036211756277550d398034689aca8e770133 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make QOffscreenX11PlatformNativeInterface a QX11ApplicationMichal Klocek2021-10-212-1/+15
| | | | | | | | | | | | | | Make it possible to use new native interface QX11Application with offscreen plugin in case of x11, which technically is x11 application without xcb connection. This change is motivated by use of new native interface in webengine, where offscreen plugin is used for some tests. Pick-to: 6.2 Change-Id: Ic2ed5b39573062feaa1e8985962d5d9327b371d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* TLS plugin (OpenSSL): don't use the deprecated functionsTimur Pocheptsov2021-10-214-26/+58
| | | | | | | | | | | If we have OPENSSL_NO_DEPRECATED_3_0 defined. This includes RSA, DSA, EC and DH-related APIs. As of now, we only make sure the code still compiles. Pick-to: 6.2 5.15 Fixes: QTBUG-83733 Change-Id: Id455b851421ce0dcdfb0229fa515ba2b2ed690b1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFactoryLoader: continue the port from JSON to CBORThiago Macieira2021-10-202-2/+4
| | | | | | | | | | | | | | This continues the effort from the previous commit, by not passing through the JSON conversion at all, and simply using CBOR directly. The port in qtbase is complete, but in order to support the conversion in other modules without introducing breakages, there's a temporary class used for converting to QPluginParsedMetaData from QJsonObject. It'll be removed once all other modules have finished converting. Change-Id: I2de1b4dfacd443148279fffd16a3ed4ddaf34afc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Wake up event dispatcher after running modal dialog helpersTor Arne Vestbø2021-10-203-0/+14
| | | | | | | | | | | | | The root event loop may have been exited, so we need to ensure the event dispatcher is woken up so it can evaluate whether it should continue or not. For most applications this happens automatically when e.g. the user moves their mouse or press a key, but for tests this may not be the case, and the test will stall and never exit its event loop. Pick-to: 6.2 Change-Id: Ic241e3f1045481c34150289ff711b921addb18e4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNI: Windows: support transportMediumMårten Nordheim2021-10-204-1/+102
| | | | | | | | | | | | | Brings support for transportMedium to NetworkListManager backend. Which, with this patch, also uses winrt API because there is no equivalent API available in NLM. This API is so much nicer than NLM... Task-number: QTBUG-91023 Change-Id: I360a3a197caa2aa4848c8f768aea6a09a68b0ed5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QtGui & its plugins: remove set-but-unused variablesThiago Macieira2021-10-191-2/+0
| | | | | | | | | Found by clang 13: qfontsubset.cpp:1211:10: warning: variable 'sumAdvances' set but not used [-Wunused-but-set-variable] Change-Id: Iea05060bc2c046928536fffd16adf500fb9bc8e5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* MySQL: only set the charset if the connection has succeededThiago Macieira2021-10-191-13/+14
| | | | | | | | | | No point otherwise. But do it before trying to select the database, in case the database name has non-US-ASCII characters. Task-number: QTBUG-97054 Pick-to: 6.2 6.2.1 Change-Id: Iea05060bc2c046928536fffd16adf036367b07bb Reviewed-by: Liang Qi <liang.qi@qt.io>
* MySQL: fix the check for the return value of mysql_set_character_set()Thiago Macieira2021-10-191-2/+2
| | | | | | | | | It returns zero on success and non-zero on failure. Fixes: QTBUG-97054 Pick-to: 6.2 6.2.1 Change-Id: Iea05060bc2c046928536fffd16adf0177aadb082 Reviewed-by: Liang Qi <liang.qi@qt.io>
* sqldrivers: Fix typo in error messageJonas Kvinge2021-10-181-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I6354275d04ee9474d4baeaaf0b14a52aca3dd70c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make sure Qt::Popup is treated like a dialogDavid Skoland2021-10-182-3/+2
| | | | | | | | | | | According to the documentation, Qt::Popup should have a proper frame with a title bar. To honor this, two functions had to be slightly altered. Change-Id: I4bbc18e6b7fbec5702fad6e22ef2226c09dea15a Fixes: QTBUG-94768 Pick-to: 5.15 6.2 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Add comment about the meaning of magic number in QWasmEventTranslatorDavid Skoland2021-10-181-0/+5
| | | | | | | | Without this comment, the button == 0 code is very cryptic. This comment helps in deciphering what exactly is being checked. Change-Id: Ied96118362d097d7036bafcc491b8574e1225de1 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* macOS: Don't require marked text before passing mouse down to input contextTor Arne Vestbø2021-10-161-6/+9
| | | | | | | | | | | | | | | | | There are situations where the input context might want the event, even if there's no marked text, for example when long-pressing A with a US keyboard layout and getting the accent popup. In that case we want a press somewhere else in the input item to move the cursor, and commit the current preedit. This is the same approach as NSTextView has, always calling handleEvent, and in line with the recommendation from Apple: https://lists.apple.com/archives/cocoa-dev/2012/May/msg00539.html Pick-to: 6.2 Change-Id: Iff0861a4e604ab594d1ad4ccbb9367d8e0ffe4ef Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Pass on mouse press if input context didn't handle itTor Arne Vestbø2021-10-161-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We follow the approach of [NSTextView mouseDown:] by bailing out if the input context handled the event, and otherwise passing it along to the input item. This allows moving the cursor with a single click in the input item, which will also commit the current preedit string as is, depending on the input context. For some reason 2-Set Korean input results in plain insertText calls for each step of the composition with an NSTextView, while we get marked text. The result is that when composing with 2-Set Korean, a native NSTextView will only require a single click to move the cursor, while for us it requires two, since the input context says it handled the event. We opt to follow the behavior of NSTextView to bail out if the input context handled the event, instead of trying to emulate the observed behavior for 2-Set Korean by always passing the mouse event on, as the former seems like a safer approach. This is also in line with the recommendations from Apple: https://lists.apple.com/archives/cocoa-dev/2012/May/msg00539.html Pick-to: 6.2 Change-Id: I372ac62ee3b8b20531cd7cfa2d412a5efea3eb68 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add implementation of QCocoaInputContext::commit()Tor Arne Vestbø2021-10-162-0/+28
| | | | | | | | | | Without this we end up treating input method commits from the input items as cancellations, as the base class implementation doesn't do anything. Pick-to: 6.2 Change-Id: Ieeed71404ee32ab51287b2f4f2d70ffcf9d8e7ef Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Only send mouse press to input context if clicking input itemTor Arne Vestbø2021-10-161-2/+13
| | | | | | | | | | | | | | | Our QNSView can represent many controls, not just the current input item, so we need to ensure the click happens inside the input item before we ask the input context to handle the event. This allows clicking controls such as buttons and check boxes while composing complex text, without cancelling or otherwise affecting the composition. Fixes: QTBUG-57347 Pick-to: 6.2 Change-Id: I8449c8d74fd21b1ee1d5bd75f960751b64d7e078 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* xcb: Use byte buffer for event masksPovilas Kanapickas2021-10-161-23/+30
| | | | | | | | | | This prepares for use of masks larger than 32 bits which happens on XI 2.4. Additionally, since the XI protocol always sends the masks using little-endian, the XI protocol support on big-endian machines was currently broken. Change-Id: Id22131e075059cea783b5be0691a673a457c7364 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QOpenSSLBackend: Properly load 3.0 when compiled with 3.0Mårten Nordheim2021-10-151-3/+10
| | | | | | | | | | The naming updated but the version suffix is hardcoded on windows and it was overlooked when work was done to support OpenSSL 3. Fixes: QTBUG-97116 Pick-to: 6.2 5.15 6.2.1 Change-Id: Iec15d772c54ed214940ec5634a0929485478f771 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* xcb: Fix typos in source code commentsJonas Kvinge2021-10-146-6/+6
| | | | | Change-Id: I3a91f57d3c47d9e96215d5dc064664626a8f65e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qwindowsdialoghelpers: Fix typo in documentationJonas Kvinge2021-10-141-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I23e096655f68d64c0c40c02a246582916c2d1743 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* qxcbscreen: Fix typo in documentationJonas Kvinge2021-10-141-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I92f7d707a1395594ad6d1fe841fa77d21ae7c8b1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Correctly record normalGeometry in Cocoa pluginVolker Hilsheimer2021-10-143-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cocoa sends QWidget the state-change notification after the window has been resized already, at which point we cannot store the normal geometry anymore. Handle zoom and full screen callbacks prior to the state changing to store the geometry in QCocoaWindow. We do not need to handle minimized state, as the window will still reflect the original geometry. Return the stored value from an override of QPlatformWindow::normalGeometry so that QWidget gets the correct values even though the new state is already active. Fix the tst_QWidget::normalGeometry test to make it pass on all platforms by waiting for the window to actually have transitioned to the new state before comparing geometries. Both macOS and Windows fully pass; on Xcb, deminimizing a window using setWindowState does not work, which is why the test was partially skipped (confirmed by visual testing). Move those problematic, complex test cases to the end so that most cases are covered on Xcb as well. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Pick-to: 6.2 Change-Id: I518a5db9169b80e8fa25fe4fa2b50bd1ea0e6db3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: Fix handling of cursor position when stop composingAndreas Buhr2021-10-141-7/+15
| | | | | | | | | | | | | | | | | | | | | | This is a workaround for a problem in TextEdit. The symptom is that when the user places the cursor inside of a word and hits backspace, the last letter of the word is removed instead of the letter just before the cursor. The reason is as follows. When stopping composing, the current cursor position has to be maintained. To that end, QAndroidInputContext sends an event containing the text to be committed and the cursor position to the editor. But the resulting cursor position is wrong. This patch adapts QAndroidInputContext to send two events: One to commit the text, the second to place the cursor. A real fix would fix the editor to correctly handle the event containing both the committed text and the cursor position. Fixes: QTBUG-97491 Pick-to: 6.2 5.15 Change-Id: Idd00e5afcbfe29c9cb77356f9add2e881c51b9bb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* CMake: remove support for building Qt with the old Intel compilerThiago Macieira2021-10-131-1/+1
| | | | | | | | | | | | | | | | | | This hasn't worked for some time. It's not in our CI and I don't think it was working at all. When I tried to build it, I ran into several problems with C++17 and an Internal Compiler Error I did not have any interest in working around. After discussing with the Intel compiler team, it was decided that fixing those issues in the old compiler is not going to happen. Instead, their recommendation is to adopt the new LLVM-based compiler, which the last commit added support for. This commit does not remove qmake support for the old ICC. It's possible someone is using qmake with a non-Qt6 project and ICC. Change-Id: Icb2516126f674e7b8bb3fffd16ad6350ddbd49e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "[Android] Remove signal and slot mechanism to listen states in editor's"Andreas Buhr2021-10-132-37/+8
| | | | | | | | | | | | | | | | | This reverts commit a40a512dec0f34e84eb63812af556608f03713ff. It caused UI freezes and cursor position inconsistencies. See the linked bugs. Pick-to: 6.2 6.2.1 5.15 Task-number: QTBUG-58013 Task-number: QTBUG-93414 Task-number: QTBUG-95669 Task-number: QTBUG-96671 Task-number: QTBUG-96675 Task-number: QTBUG-96769 Change-Id: Ie8100538609a1460713ca9115cdbe329654d0772 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* XCB: Silence clipboard warning "SelectionRequest too old"Friedemann Kleint2021-10-131-9/+10
| | | | | | | | | | | Use the predefined logging category for clipboard warnings and change the offending warning to qCDebug() so that it is silent by default. Pick-to: 6.2 5.15 Fixes: QTBUG-60257 Change-Id: Icf1bc84cd64207b94ef471f13090c43b45e20728 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Windows QPA: Fix mouse event position for QWindows with ↵Friedemann Kleint2021-10-132-3/+13
| | | | | | | | | | | | Qt::WindowTransparentForInput The local position needs to be corrected when the Qt receiver window does not correspond to the native event receiver window. Fixes: QTBUG-97095 Pick-to: 6.2 5.15 Change-Id: Ic9fa3d84b6ee84ae5f8fa2408b0d60e35dbfa328 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* openglblacklists: Fix typo in descriptionJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I13fa34099daed8de8d23af3952aa18f1ecde7883 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* qwindowsdrag: Fix typo in documentationJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: I4bd8ff5b4ddeee1760b012bd603b014d535534ed Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* windows: Fix typos in source code commentsJonas Kvinge2021-10-125-6/+6
| | | | | Change-Id: I5d83574639d0b1f935843a75217aae70a5925fa0 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Android: remove unused imports and fix warning on network java codeAssam Boudjelthia2021-10-121-3/+2
| | | | | | Pick-to: 6.2 Change-Id: Ifa69c04f7f2e75751b6f8a157d04f3870f0c0eb1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: Fix source code comment typosJonas Kvinge2021-10-124-6/+6
| | | | | Change-Id: I9b2b76c01880c7bb515fdc1a6c4ef1f0bcf6be95 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QWindowsWindow: Fix typo in documentationJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: Ib20b2f23e399b295e26b8c29084023e4e1361579 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* cocoa: Fix typo in debug messagesJonas Kvinge2021-10-122-2/+2
| | | | | | Pick-to: 5.15 6.2 Change-Id: I0a4c344f2104241175a9bfce7cfc7128c3f7d3ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qcocoa: Fix typos in source code commentsJonas Kvinge2021-10-1211-15/+15
| | | | | | Pick-to: 6.2 5.15 Change-Id: Ide20e1d133891890a7673c8403ea91b489baa8f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qcocoa: Fix typos in documentationJonas Kvinge2021-10-122-2/+2
| | | | | | Pick-to: 5.15 6.2 Change-Id: Ibf86b9b95715e20e8bf9c49a347f9c8ca0c04bb5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qwindowsxpstyle: Fix typos in documentationJonas Kvinge2021-10-121-5/+5
| | | | | | Pick-to: 5.15 6.2 Change-Id: I5dc4649783b0d4c2b17e0555b98874b83a5b9f30 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* styles: Fix typos in source code commentsJonas Kvinge2021-10-122-8/+8
| | | | | Change-Id: If0f140f4ad02395bd0dd5eee08f90318d3a7e930 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tls: Fix typos in source code commentsJonas Kvinge2021-10-124-4/+4
| | | | | | Change-Id: Iec42e4d0f3476bd421861a0139731ff89788ee23 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QGtk3Theme: implement appearance function to detect dark themesMitch Curtis2021-10-112-0/+44
| | | | | | | | | | | This allows Qt Quick Controls to detect if a dark theme is in use, and if so, use a dark theme of the current style (if available). Fixes: QTBUG-93955 Pick-to: 6.2 Change-Id: I15fc8a2271acf9ba27232359056d5a681d4cffca Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QNI: Windows: Remove unneeded friendMårten Nordheim2021-10-081-2/+0
| | | | | | Change-Id: I5d66a67a5c16a479f62b9f43cb769d5ee5f66b60 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>