summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Android: Place cursor correctly on screen when editing"Rami Potinkara2021-10-267-98/+17
| | | | | | | | | | | | | | | 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>
* QHash: avoid crashing when reserving on a shared hashMårten Nordheim2021-10-261-1/+2
| | | | | | | | Pick-to: 6.2 Change-Id: I21ad13fa223bd5a2c61112e790965093a2750268 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHash: use the shadow seedThiago Macieira2021-10-261-21/+20
| | | | | | | | | | | | | [ChangeLog][Important Behavior Changes] The qHash functions operating on string-like types and the qHashBits function will now mix in a shadow seed (not available in any API) if the provided main seed is not 0. This means the hashing value for any particular input has an almost zero chance of being equal in two different processes, even if processes of the same application. This unpredictability makes QHash more strongly resist denial-of-service attacks through degenerate hashing tables. Change-Id: Id2983978ad544ff79911fffd167240196f7cd5c8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHash: double the size of the stored seedThiago Macieira2021-10-261-66/+114
| | | | | | | | | | | | | | | | There's now another half of the seed which will be used by the hashers. This is not stored in QHash, so it is never changed for the lifetime of the application (not even when QHashSeed::setDeterministicGlobalSeed() is called). However, we will not use it when we're in deterministic mode. This commit uses the compiler thread-safe statics to implement the initialization of more than one atomic word, thus freeing us from having to have a reserved value. As a bonus, the QT_HASH_SEED warning will only be printed once. Change-Id: Id2983978ad544ff79911fffd16723f1673f9a5b4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add internal property to store Qt namespaceAlexey Edelev2021-10-261-0/+2
| | | | | | | | | | In some cases it might be useful to use the value of Qt namespace in CMake files. Currently the value is only stored inside Core target compile definitions. This adds the internal property _qt_namespace to the Core target and exports it. Change-Id: Ic0454f0ce6b8c65b5a186981463d3977169b022e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QNI: refactor to avoid tiny lambda slot objectsMårten Nordheim2021-10-262-11/+10
| | | | | | | | | | | | | | by just adding the parameter to the signal there's no longer a need for the tiny lambdas that just call a getter. Originally the idea was that, since the emission from Backend to the 'frontend' may be a queued emission, I wanted to use the getter so that the data emitted from the frontend was as up-to-date as possible. But on one hand, that's not really a big problem, and at the same time it would then emit the signal twice with the same value. Change-Id: Ief0959f8cbf06faf1b02a1ed4ae777181ff4f059 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix overflow issue on parsing min-qint64 with its minus sign repeatedEdward Welbourne2021-10-261-1/+16
| | | | | | | | | | | The call to std::from_chars() accepts a sign, but we've already dealt with a sign, so that would be a second sign. Check the first character after any prefix is in fact a digit (for the base in use). This is a follow-up to commit 5644af6f8a800a1516360a42ba4c1a8dc61fc516. Fixes: QTBUG-97521 Change-Id: I65fb144bf6a8430da90ec5f65088ca20e79bf02f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused statements in QWindowDavid Skoland2021-10-261-2/+0
| | | | | Change-Id: I91f0d23d22923f7c2b8c9099371288d226d541c6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Enforce zero warnings for QtCore, QtGuiTopi Reinio2021-10-262-0/+6
| | | | | Change-Id: I7b39f9bf8d7bc9c9c5c21c4bd648a86281162740 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QObjectComputedProperty docs: move example to snippetIvan Solovev2021-10-262-36/+38
| | | | | | | | | | | This patch amends 89a4c8d40d2ee1b8794dd7fcf80d226c5c87ba6c. It moves the code sample into a separate snippet file, which allows us to use Q_OBJECT macro in it without complaints from moc. Task-number: QTBUG-97656 Pick-to: 6.2 Change-Id: I368d8dd8c00dbbebd8a6bf3788be796c8ca4bce8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QTabBar: re-layout when tab size hint depends on selected stateVolker Hilsheimer2021-10-261-0/+7
| | | | | | | | | | | | | | | | | QTabBar caches the rects for the tabs to avoid costly recalculation of each tab's size hint. That cache is only updated via layoutTabs if the entire tab bar is resized or modified. However, when a style sheet is set that calculates a different size hint for tabs that are selected, then the tab bar also needs to be laid-out when the current tab changes. To minimize the cost, compare the cached size for the new current tab with its new size hint, and re-layout the tabs when they are different. Fixes: QTBUG-6905 Fixes: QTBUG-8209 Pick-to: 6.2 Change-Id: I110444d18938c2b3446ee58e4a8c6c472b5f12c3 Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
* Don't fire shortcut if the action only lives in an unreachable submenuVolker Hilsheimer2021-10-251-1/+1
| | | | | | | | | | | | | | | | | Menus can be represented by a menu action, and if that menu action has been hidden or disabled, then the submenu is not accessible from the parent menu or menu bar to which it was added. Don't walk the menu action chain further when checking whether the shortcut should trigger. Note that this is unrelated to the menu being visible or not; we obviously want to trigger shortcuts for actions that only live in a menu that has not been shown, otherwise the shortcut would be rather pointless. Pick-to: 6.2 Fixes: QTBUG-25743 Change-Id: I48735e17352989bbc84a72263e4828f519b78095 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make QObjectComputedProperty documentation visibleIvan Solovev2021-10-251-2/+0
| | | | | | | | | | | QObjectComputedProperty belongs to public API. It's even referred in other documentation (for example, QBindable). It does not make sense to have its documentation marked as \internal. Task-number: QTBUG-97656 Pick-to: 6.2 Change-Id: I6ca81292cfafea873dd3577fb0e5ddb583969dc3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix -trace build on WindowsIvan Solovev2021-10-252-4/+23
| | | | | | | | | | | | | | | | | | | | | | The TraceLoggingValue template does not have overloads for Qt types, so it was throwing multiple template instantiation errors while trying to log the unknown types. Fix it by serializing such types to QString using QDebug::toString, and the logging this string. Apart from that, fixes some other compiler errors on Windows build with -trace enabled: - implicit size_t to ULONG conversion - complaints on std::min - add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE to the generated *_tracepoints_p.h headers to fix the namespace build. Task-number: QTBUG-97246 Fixes: QTBUG-97241 Pick-to: 6.2 Change-Id: Ifba134bab8d7fda7f1e30da9938e25cae813e1c6 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix compilation with QT_NAMESPACE and tracing on LinuxIvan Solovev2021-10-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tracegen tool was not taking into account that Qt could be build with a custom namespace. As a result, the combination of namespace build and tracing enabled was not working, because tracegen generated classes without the namespace. This patch fixes it. We cannot add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE because of the tricky logic that recursively includes the generated header file multiple times, also including the code like static const struct lttng_event_desc *_TP_COMBINE_TOKENS(__event_desc___, TRACEPOINT_PROVIDER)[] = { (hash)include TRACEPOINT_INCLUDE NULL, /* Dummy, C99 forbids 0-len array. */ }; where TRACEPOINT_INCLUDE is the path to the generated header. This patch is using QT_USE_NAMESPACE, wrapped into some #ifdefs. This should be safe, considering that the generated trace headers are only used as private API. The windows tracing support seems to be broken even in a non-namespace build, so it's not handled in this patch. Task-number: QTBUG-97246 Pick-to: 6.2 Change-Id: I12db76e199a3aa3abde641fbf99a6e1a3d7de203 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@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>
* Doc: Fix formatting: remove extra \c before \nullptrIvan Tkachenko2021-10-241-1/+1
| | | | | Change-Id: Ie93cf7253bdc6b70fd187c208da636fc551491c2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update windows version detectionMårten Nordheim2021-10-241-1/+11
| | | | | | | | Since the API still doesn't return 11. Pick-to: 6.2 5.15 Change-Id: Ifd4f7f845915702fcbb0f857487358ae8e806273 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove old pre-6.0 hooksThiago Macieira2021-10-221-2/+0
| | | | | | | Now only qt_startup_hook officially remains Change-Id: Iac31783a62a040638d73fffd168aaaa7408c9be4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix qdoc warnngsVenugopal Shivashankar2021-10-232-2/+4
| | | | | | | | | | | qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:75: (qdoc) warning: Cannot tie this documentation to anything [qdoc found a /*! ... */ comment, but there was no topic command (e.g., '\fn', '\page') in the comment and no function definition following the comment.] qt5/qtbase/src/gui/text/qtextformat.cpp:1500: (qdoc) warning: Overrides a previous doc qt5/qtbase/src/gui/text/qtextformat.cpp:1487: (qdoc) warning: (The previous doc is here) qt5/qtbase/src/gui/text/qtextformat.cpp:1533: (qdoc) warning: Overrides a previous doc qt5/qtbase/src/gui/text/qtextformat.cpp:1520: (qdoc) warning: (The previous doc is here) Change-Id: I5a089bef1841d6d69bff4c780805d20e5926fe6f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix qdoc warningsVenugopal Shivashankar2021-10-234-9/+14
| | | | | | | | | | | | | | | | | src/corelib/kernel/qmetatype.cpp:1605: (qdoc) warning: Command '\snippet (//! [[implicit]])' failed at end of file 'qmetatyp> src/corelib/kernel/qmetatype.cpp:1615: (qdoc) warning: Command '\snippet (//! [[member]])' failed at end of file 'qmetatype/> src/corelib/kernel/qmetatype.cpp:1626: (qdoc) warning: Command '\snippet (//! [[memberOk]])' failed at end of file 'qmetatyp> src/corelib/kernel/qmetatype.cpp:1639: (qdoc) warning: Command '\snippet (//! [[unaryfunc]])' failed at end of file 'qmetaty> src/corelib/text/qbytearraymatcher.cpp:233: (qdoc) warning: No such parameter 'view' in QByteArrayMatcher::indexIn() src/corelib/time/qdatetime.cpp:1854: (qdoc) warning: Can't link to 'QLocaleie:pmText()' src/corelib/thread/qsemaphore.cpp:494: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/corelib/thread/qsemaphore.cpp:505: (qdoc) warning: Undocumented parameter 'timeout' in QSemaphore::try_acquire_for() src/corelib/thread/qsemaphore.cpp:505: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/corelib/thread/qsemaphore.cpp:516: (qdoc) warning: Undocumented parameter 'tp' in QSemaphore::try_acquire_until() src/corelib/thread/qsemaphore.cpp:516: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text Change-Id: Ib612c69525ec7542f2ad3dd9a07e89f266718fd8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QVarLengthArray: Reduce memory allocations in emplace()Robert Löhning2021-10-231-1/+2
| | | | | | | | | | | | | | | | Currently, we allocate memory for elements one by one which can get pretty slow when adding many elements. [ChangeLog][QtCore][QVarLengthArray] Reduced number of memory allocations in emplace() by allocating more memory at once. Fixes: QTBUG-97489 Pick-to: 6.2 Change-Id: Idfb5b5946b047d5215c8ed00770574249f9f5d40 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* Update Gradle to 7.2.0 and Android Gradle Plugin to 7.0.2Mårten Nordheim2021-10-229-1078/+584
| | | | | | | | | | | | | | The latest build-tools 31.0.0 requires AGP version 7.0+, and that requires Gradle version 7.0+, so use the latest stable release for both. [1] https://developer.android.com/studio/releases/gradle-plugin? buildsystem=ndk-build#updating-gradle Fixes: QTBUG-97002 Pick-to: 6.2 Change-Id: I8ff26819bdf1a00f484ecc194c4d4e7bca2b598a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove superfluous qfuture.h includes from qcoreapplication[_p].hJoerg Bornemann2021-10-223-6/+2
| | | | | | | | | | | | | | | | | This include is only needed on Android, and removing it improves build times slightly. Remove the include from qcoreapplication.h and guard the includes in qcoreapplication_platform.h properly for Android. Remove the include from qcoreapplication_p.h as well. This was a left-over from the app permissions API that was removed. Pick-to: 6.2 Task-number: QTBUG-97601 Change-Id: I131baebe3e08e93ad5420d40908c2dceab89554c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused qapplicationpermission.hJoerg Bornemann2021-10-224-82/+0
| | | | | | | | | The app permission API was removed, and this file is a left-over. This amends commit 72e5b36e2e4c79dc7995f0203968503266b4f2f5. Pick-to: 6.2 Change-Id: Ie1bf9465260594864464c4d4ee4dc99593c28cc1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractItemView: auto-scroll with selection rectangleVolker Hilsheimer2021-10-222-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some item views, such as QListView in icon mode, implement a selection rectangle with which the user can "lasso" items. So far, dragging that rectangle did not trigger auto scroll, so unless an item near the edge was selected, the user had to stop the lassoing and scroll manually to reach more items. Since QAbtractItemView implements auto scrolling for drag'n'drop, we can use that mechanism also when the selection rectangle is dragged. This requires some modifications: We need to make sure that scrolling the view during a drag-selection generates mouse move events so that the selection is extended and the rectangle is updated in subclasses. And we need to stop using QCursor::pos to get the position of the mouse pointer, as this makes the auto-scrolling untestable. Instead, record the mouse position last seen during a mouseMove or dragMoveEvent in content-coordinates (identical to pressedPosition). As a drive-by, fix some coding-style issues in nearby code. Done-with: Zhang Hao <zhanghao@uniontech.com> Fixes: QTBUG-96124 Change-Id: I426f786e5842ae9f9fb04e9d34dc6d3379a6207f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QNI: Add a convenience method for loading the default pluginMårten Nordheim2021-10-227-15/+92
| | | | | | | | | 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>
* QNI: Add supportedFeatures getterMårten Nordheim2021-10-222-0/+11
| | | | | | | Which just returns all the supported features Change-Id: I8c3996b00a6ebb114bdbc9db3085a0e27fc8fa79 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Doc: QString: formalize that we now include the QBA's nullsThiago Macieira2021-10-211-7/+36
| | | | | | | | | | | | | | We've been meaning to do this ever since the QByteArray overloads were added some time prior to Qt 4.5.1[1], but had been wary of behavior compatibility issues. Commit 6abdbb65e59779af56ae25372a853efca19eac59 did it and even explained so in the ChangeLog. I'm just being more explicit. [1] https://code.qt.io/cgit/qt/qt.git/tree/src/corelib/tools/qstring.h?h=v4.5.1#n415 Fixes: QTBUG-97451 Change-Id: Icb2516126f674e7b8bb3fffd16ad55e46a9781c8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLatin1String: harmonize null byte handling with the rest of QStringThiago Macieira2021-10-221-3/+3
| | | | | | | | | | | | | | | | | | | | After the introduction of QByteArrayView, all the QString::fromXxx overloads and the constructor will include the null bytes inside QByteArrays and so will QLatin1Strings created from QByteArrayViews. This was the lone stand-out that wasn't fixed in 6.0, so do it now. [ChangeLog][Important Behavior Changes] Since Qt 6.0, all QString and QLatin1String methods consuming QByteArray and QByteArrayView objects will include any embedded null bytes and treat them as U+0000 Unicode characters, whereas in Qt 4.x and 5.x, they would stop at the first null byte like bare C strings. Qt 6.3 contains a fix for a couple of the methods that mistakenly persisted the old behavior in 6.0-6.2, namely the QLatin1String constructor from QByteArray and the equality and inequality operators between QByteArray and QString. Task-number: QTBUG-97451 Change-Id: Icb2516126f674e7b8bb3fffd16ad5621cf3e64ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add QFontMetricsF methods taking text options into accountAllan Sandfeld Jensen2021-10-222-6/+201
| | | | | | | | | | This is needed by Qt Quick to be able to calculate font metrics using design metrics matching Quick text rendering. Task-number: QTBUG-85936 Task-number: QTBUG-94023 Change-Id: I67c74e2a912bd58df7a57349a858f20f04609f0f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Avoid warnings when compiling bootstrap library without zstdUlf Hermann2021-10-211-0/+4
| | | | | Change-Id: Ic67cd2b582df0464a17f6181157ebbd47986114c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix warnings due to enums in QSizePolicyFan RuiJie2021-10-211-2/+3
| | | | | | | | | | | | | | gcc 11 generates warnings as "bitwise operation between different enumeration types 'QSizePolicy::Policy' and 'QSizePolicy::PolicyFlag' is deprecated" in C++20. Fixes: QTBUG-93810 Pick-to: 6.2 5.15 Change-Id: If8a796b33a772cc1a561eb0b6bc4def8f9f54bc0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Enable qdoc warning count limitVenugopal Shivashankar2021-10-218-0/+24
| | | | | | | | This should restrict changes that introduce new warnings. Change-Id: I7e4b5d9d5d84b7c336509c380bc7e6d86e360f4a Reviewed-by: Topi Reiniö <topi.reinio@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>
* Android: set allowNativeHeapPointerTagging to false in the manifestAssam Boudjelthia2021-10-211-1/+2
| | | | | | | | | | | | | | | | Android 11 enables pointer tagging by default on arm64 systems [1], which can cause QML to get invalid data, which caused the color issue (and most likely other issues). [1] https://source.android.com/devices/tech/debug/tagged-pointers Fixes: QTBUG-97009 Task-number: QTBUG-91150 Change-Id: Ic4f145bba3345b3bee5445685f03269e3785f514 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit 9fa805f7f8dfe96d561e9ed3170770ad768baf93) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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>
* Fix inconsistencies between advanceWidth and bounding rectsAllan Sandfeld Jensen2021-10-213-117/+57
| | | | | | | | | | | | | | | | Unify the logic in QTextEngine Ensure tightBoundingRect, and the FreeType boundingRect, calculates from the shaped x offset when calculating the max x coordinate for a glyph. Fixes: QTBUG-7768 Task-number: QTBUG-70184 Task-number: QTBUG-85936 Task-number: QTBUG-94023 Change-Id: I6daafb25c79158dc7e777529abb5e8d3a284dac0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* androidtestrunner: make sure that system-user is usedBartlomiej Moskal2021-10-211-1/+10
| | | | | | | | | | | | | | | | | | | | | | | It happens on Android Automotive emulator, that output file is in other directory. According android spec [1]: "If a default user isn't specified, each adb subcommand has a different user. The best practice is to retrieve the user ID with am get-current-user and then explicitly use --user <userId> for any command that supports it." That is the reason why output file can be found in /data/user/USER_ID/PACKAGE_NAME directory. Checking path related to current user was added as backup solution. [1]https://source.android.com/devices/tech/admin/multi-user-testing Pick-to: 6.2 Change-Id: Id7e6ddef74f4f20b7469a07bba6a71d3622c4e20 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move the ABI tag from minimum-linux.S to qlibraryinfo.cppThiago Macieira2021-10-214-111/+44
| | | | | | | | | | | | | | | We don't need the assembly file any more. According to a comment to patchsets 2 in the Gerrit code review for commit bb8a61866ec6a6de2426012f8c4219d41b3a414a, the section ended up as SHT_PROGBITS instead of SHT_NOTE. I didn't know then that the section type is not actually important, only whether it's present in the segment pointed by a PT_NOTE is. That isn't recorded in the review. Since we now depend on the linker properly placing the .note.* sections for Qt plugins, we can rely on this working. Change-Id: Icb2516126f674e7b8bb3fffd16ad659149e34a23 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: QByteArrayMatcher: add note that the pattern must remain on scopeThiago Macieira2021-10-211-4/+9
| | | | | | | | This issue bit me. The API is surprising and very un-Qt-like... Pick-to: 6.2 Change-Id: I2bbf422288924c198645fffd16aa1c58d921bd7e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFactoryLoader: continue the port from JSON to CBORThiago Macieira2021-10-206-28/+52
| | | | | | | | | | | | | | 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>
* QPlugin: keep the CBOR data as CBORThiago Macieira2021-10-206-78/+110
| | | | | | | | | | Since QJsonValue and QCborValue use the same backend, we may as well use the CBOR frontend classes, which means we avoid an unnecessary conversion until later. Change-Id: I2de1b4dfacd443148279fffd16a3e2f56cd74c0b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>