summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QMatrix4x4: deprecate operator*(QVector3D, QMatrix4x4)v6.1.0-alpha1Giuseppe D'Angelo2021-02-122-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operation is sketchy for a number of reasons: 1) Mathematically, it doesn't make sense. The code interprets the QVector3D as a point, extending it with w=1, and uses it as a row vector. But similarly, the vector could be intepreted as a directional vector, with w=0. No semantic is "better" than the other. 2) QMatrix4x4 is not meant to be post-multiplied. Granted, one could use a QMatrix4x4 as arbitrary storage for 16 floats, but QMatrix4x4 builds itself to be always *pre* multiplied (e.g. translate changes the 4th column, not the 4th row). We can keep post multiplication for the general case if we do it against a QVector4D, but I don't feel that we should support it also for QVector3D. [ChangeLog][QtGui][QMatrix4x4] The multiplication operator (operator*) between a QVector3D and a QMatrix4x4 has been deprecated. User code needs to extend the QVector3D to a QVector4D first (by specifying the intended w coordinate), and then multiply the QVector4D by the matrix. Change-Id: I41b64d8ab7eb6126dc4c49fe29cf3f1b7afc7987 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 654a2164994974639e62f9d388408ed559b797a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Refactor duplicate code for clearing JNI exceptions before returningAssam Boudjelthia2021-02-111-80/+43
| | | | | | | | | | | Add a private function to handle checking/clearing and deleting the local reference to jobject before returning a QJniObject. Task-number: QTBUG-89633 Change-Id: I0ea28c8ba4da0bfc1e341c6b4c1f61fecfec87a6 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit c7bcc51e2c196e5cc3def89137ca31b4a9d29157) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: take JavaVM() from QJniEnvironment and not QtAndroidPrivateAssam Boudjelthia2021-02-112-4/+5
| | | | | | | | Task-number: QTBUG-89482 Change-Id: Idfd442afc90c00e672b28b43c78c789813f46c7d Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 3348107c038cbac724e33d6bb30671ddddc1505a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QMatrix4x4: deprecate operator*(QMatrix4x4, QVector3D/QPoint(F))Giuseppe D'Angelo2021-02-112-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | The operation does not make sense at the "fundamental" level for these classes (algebraic, in this case), so it shouldn't exist. It's also a semantic trap: * it interprets a _vector_ as a _point_ instead (the vector gets 1-extended in 4D) * after the multiplication, it gets perspective divided. These semantics do not belong to operator*. operator*(QVector3D/QPoint(F), QMatrix) will be tackled in a next commit; we don't have a straightforward replacement for it. Drive-by, document that map() interprets vectors as points. [ChangeLog][QtGui][QMatrix4x4] operator* between a QMatrix4x4 and a QVector3D, QPoint, or QPointF has been deprecated in favor of map() and mapVector(). Task-number: QTBUG-89708 Change-Id: Iad78d6eb68cc8cdc3ac16b1635c4d3b522c95213 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 6862ce3d7763d8163cc1350c45bc6adae8b4fc7f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix registerNativeMethods for goodAssam Boudjelthia2021-02-111-3/+4
| | | | | | | | | | | | | | | | | | The initial implementation and the commit c00ab6f8eaa3cdc9a29dd103c91b2eaf212cac9f was wrong: * env->findClass() in fact returns a global reference, and in any case we shouldn't be calling that, instead QJniObject would be enough. * The size param provided to env->RegisterNatives was wrong. * A test for registerNativeMethods() is added to ensure such break is not repeated again. Task-number: QTBUG-89633 Change-Id: I4d3a6a9270755f465c40add25521fb750dd4de0a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit deca7cd730a44988d3e15c551d9a82a5c75618e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: Disable three-finger-tap editing interaction menu when there's no focus ↵Tor Arne Vestbø2021-02-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | object A typical Qt application, such as a QML application, is a single full screen QUIView, containing all of the granular controls of the UI. The view accepts first responder status, so that we can pass on text input to a possible text field inside the UI. That however triggers iOS to bring up the editing interaction menu whenever the user taps with three fingers, as iOS can't know that only parts of our view is suitable for interaction. To mitigate that we override the editingInteractionConfiguration getter of the view, as documented, and dynamically report the correct enablement based on whether we have an active focus object that accepts input. This works because iOS queries the getter from the three finger tap gesture recognizer, before showing the menu. Change-Id: I0874340c42e437e1d7251896993f2eafe122f09e Fixes: QTBUG-89735 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit f0f00dbd119e0169bc81aa761e4d548e4ecf2214) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: don't report selection changed if it didn't changeRichard Moe Gustavsen2021-02-111-1/+5
| | | | | | | | | | | | | | | | | | | Be more careful about reporting a new selection to Qt. The code for handling IM selection events in QQuickTextArea is quite complex and need to take pre-edit text into account. The latter means that when the pre-edit text changes, as a result of the user composing a word, the width of the pre-edit text will also change (and as such, the cursor rectangle). But the cursor position itself stays the same. And for this reason, it emits cursorRectChanged more often than strictly needed. But rather than trying to clean that up, we do some extra checking before we send the IM event from QPA in the first place. Fixes: QTBUG-63018 Change-Id: I689d989c3fe5d61ef2b1dbee7a70418b7790bce9 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit be06164201d7d9ccdbaaff343af2e8f3662c044d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Filter cosmetic lines using transformed, not world coordinatesEirik Aavitsland2021-02-101-4/+4
| | | | | | | | | | Lines smaller than 1e-12 would not be drawn even when scaled up. Fixes: QTBUG-75630 Change-Id: I8f261876c325b60f61e95ca2e5fde2cb227d4cba Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 1549dff04c49aa37333e54f8bc45900d0f35b270) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Restore pre-Qt6 QList::fill() behaviorAndrei Golubev2021-02-101-1/+4
| | | | | | | | | | | | | | | | | | | Somehow QList::fill(t, newSize) introduced a regression in Qt6: when newSize < QList::size() we should resize to the newSize. This is aligned with QVector::fill() in 5.15 and std::vector::assign() While 6.0 is already out, picking it to 6.0.x could save someone who haven't migrated yet as well as fix some accidental bugs in Qt's code [ChangeLog][QtCore][QList] Fixed QList::fill() regression introduced in 6.0: calling fill() with size < current list size wouldn't truncate the list Fixes: QTBUG-91042 Change-Id: Ic166e2c5e42390b61df1030f7c705e344433f7f2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 6512a7fc642c65455db770385c67cfa6d71c294c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: always pass QT6_INSTALL_PREFIX to androiddeployqtAssam Boudjelthia2021-02-101-5/+2
| | | | | | | | | | | | | Qt CMake uses a fake_prefix as install dir when running tests instead of the main qt install path, this will throw androiddeployqt off since it expects the real qt install path which has gradle and java sources. Fixes: QTBUG-88579 Change-Id: I6580470840ae14d4a4a68a95f217b30408d7ab44 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 0d42f4df9275897d708ee01ed879ac185aab7360) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix typo in android APK generation logAlex Blasche2021-02-101-1/+1
| | | | | | | Change-Id: I9e593f35e1c4a51ef2cd4b08fe7e4b7c1a35a5d6 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 04eb9b7c3279e7e8c3f6079cc28cee9baea5e944) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compilation of the QPSQLDriverPlugin plugin with enabled PCHAlexey Edelev2021-02-101-0/+11
| | | | | | | | | | | | | | | | PostgreSQL package delivers several header files such as pthread, zlib, zconf, uuid, etc. within Windows installation package. The headers are exposed to the compiler by PostgreSQL include paths and have different versions. When compiling PCH of the QPSQLDriverPlugin plugin, MinGW uses the pthread.h header from the PostgreSQL include paths, that cause an error related to pthread implementation mismatch. Disable PCH for the QPSQLDriverPlugin plugin, when using MinGW. Fixes: QTBUG-90850 Change-Id: I0be91bbefe37731acb2658d679b5b644ef552b23 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 43cb801ccb10e2d9efd230803822761b794fd4fb)
* CMake: fix typo in qt_finalize_executable snippetAssam Boudjelthia2021-02-101-1/+1
| | | | | | | | Task-number: QTBUG-90943 Change-Id: Idea90f1a5fdd2070102ebda85feed79abcba3f70 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit ab907053bd7b4c5acc1ddb9220a708b9244f7b0f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: link to QScopeGuard in QScopedValueRollback documentationMitch Curtis2021-02-091-1/+1
| | | | | | | Change-Id: I02b9960fe37b09bc373ed52dec84b1efc8f43397 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 1c2aa56cfa2c5648f05aed912dae2bb3ed5d8951) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation improvements to JNI APIAssam Boudjelthia2021-02-095-264/+362
| | | | | | | | | | | | Amends 4e60681c879a54cf5b34862a30e27c492ed36363. Fixes: QTBUG-89632 Change-Id: I7856e9b63eea5ba68a5472575016540ae656ec5f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 817f8ac03cd4e85b7813b45f8cabf5b679f28702) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QPlainTextEdit: adjust scroll bars when showing upWang Chuan2021-02-091-0/+1
| | | | | | | | | | | | The text of QPlainTextEdit might change when it is invisible, so an adjustment of scroll bars is needed when the QPlainTextEdit showing up, otherwise the range of scroll bars might be incorrect. Fixes: QTBUG-77937 Change-Id: I45c686c7e09ca7b2944c36122e9157de0ec4f0e0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 13ae47d98057c2ddca8c865b845973d7e4c8dd8b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QTextureFileData: support key value metadataJonas Karlsson2021-02-094-3/+56
| | | | | | | | Task-Id: QTBUG-76970 Change-Id: I9dba1b373250cea4d0c806997290a7afcdc900d7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 2861cfb6f851d7cee503b19f0e800a33374db66c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* egl: Add debug option to print all EGLConfigsLaszlo Agocs2021-02-091-0/+15
| | | | | | | | | | QT_QPA_EGLFS_DEBUG=1 prints the attributes for the chosen EGLContext. Make QT_QPA_EGLFS_DEBUG=2 print the same for all EGLContexts. Change-Id: Id161d04789fbd015e29e5a5a89a0901000096ea3 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit d8c771c53acb58cc79cadbb795d59d5e8db7754e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: Fix the input type for date/timeChristian Strømme2021-02-081-1/+1
| | | | | | | | | | | The default variation of the DATETIME class is to show the layout for date and time. If either date or time is requested, then only set one of them. Change-Id: I5178f5f80490b7b0d7e7011d11da402a316d164a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 86e10e1acd34ae4463bb2b0c24b8bdab71c6ade4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle macOS 11 issues in softHyphens testAllan Sandfeld Jensen2021-02-081-2/+8
| | | | | | | | | | | Calculate the effective width of the hyphen better, and compare with ceiled sizes. Fixes: QTBUG-90698 Change-Id: I7ed2eb44c54240ecb2f8a38e5acf1f32608b2bfb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 0ffdbb21261eee3a9ec1cd541478ee883a12065c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* eglfs: kms: Log gbm bo handle and stride as wellLaszlo Agocs2021-02-081-1/+2
| | | | | | | Change-Id: Ie345a3f4a4ab0407e3c532c6385ae31ca698d628 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 3bda970935d4d54c07fa1d6454e2472abff66a77) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compiler warnings for QFontMetrics useAssam Boudjelthia2021-02-081-1/+1
| | | | | | | Change-Id: I4c416280cef8c316258817184e94962c250370da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit d6b9200e329281269ad8c74177f2b2621798ae56) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Introduce QSsl::X509Certificate interface and its implementationsTimur Pocheptsov2021-02-0727-192/+2890
| | | | | | | | | | | | To enable QSslCertificate to use TLS plugins. All backend-specific code is to be moved from QSslCertificate(Private) making them backend-neutral. Pick-to: dev Task-number: QTBUG-90954 Task-number: QTBUG-65922 Change-Id: Ic9d5abf91e42ce81fe56239f95ae97b64035e950 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* iOS: close edit menu upon focus transferRichard Moe Gustavsen2021-02-051-0/+3
| | | | | | | | | | | | | | | | | If you select text, the edit menu will show. But if you tap directly inside another input field, and as such, transfer focus, the menu will continue to stay visible. This patch will ensure that we hide the edit menu when the input field that it was requested for looses focus. Fixes: QTBUG-90937 Change-Id: I1d97bd57fc793826a3170404795b06a1e058d1b7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 0bae5fbabbb64371b1b6c646ce0a32e084e42f83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix crash when requesting A32 glyph on WaylandEskil Abrahamsen Blomfeldt2021-02-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | On Wayland we aren't getting any information about the subpixel layout of the screen. On Freetype, this triggers an assert / memory corruption when explicitly requesting a subpixel antialiased glyph (via QRawFont) because it needs to know the layout to render the glyphs. It might be possible to get this information in the Wayland plugin, but at least we should have a failsafe which doesn't crash when the problem occurs. This simply falls back to using A8 antialiasing when it doesn't know the subpixel layout. [ChangeLog][Freetype] Fixed crash when calling QRawFont::alphaMapForGlyph() with subpixel antialiasing on Wayland. Fixes: QTBUG-90236 Change-Id: Iddee2e171a81664ae9e3989115881f23262b2182 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit ef763e195892a6d8ce207f5d947fe508f645cb6d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* a11y: Report mixed state if QCheckBox is PartiallyCheckedJan Arve Sæther2021-02-051-0/+2
| | | | | | | | | | | Previously it only returned checked or unchecked for a tri-state checkbox. Fixes: QTBUG-84616 Change-Id: Ife72098e35f8295fd389bda232de5478ffa7e87f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f4887aca1e5ac7b90abf862d7c9828417a74a1b6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkInformation backend for AndroidMårten Nordheim2021-02-056-0/+520
| | | | | | | | | | | | | | Based on the old bearer manager code! A lot of the old code went away though since it had been deprecated in the time since it was written. Pick-to: dev Task-number: QTBUG-86966 Change-Id: I21a6db1d4ebd8367084355a8e3202f4c05d9dce5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove QNetworkStatusMonitorMårten Nordheim2021-02-056-467/+10
| | | | | | | | | Since the old code is now fully integrated in QNetworkInformation backends Pick-to: dev Change-Id: Ia843d17bb3c98333e8d68752e25722b5860f48e0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* SCNetworkReachability based backend for QNetworkInformationMårten Nordheim2021-02-054-1/+160
| | | | | | | | | | | For macOS/iOS. Based on the code Timur wrote for QNetworkStatusMonitor, and uses QNetworkConnectionMonitor. It has less detail than the other backends which is unfortunate but should be fine! Pick-to: dev Task-number: QTBUG-86966 Change-Id: I0d5930d539f9668f001d6f85c86c9df0803d0f60 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* NetworkManager based backend for QNetworkInformationMårten Nordheim2021-02-055-0/+435
| | | | | | | | | | | | For Linux. Based on the code from the old bearer plugin for NetworkManager with changes to fit better the objective of QNetworkInformation. Pick-to: dev Task-number: QTBUG-86966 Change-Id: I90c3488ff31ef6dfdcfb877c0e9c592c6c328a89 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QStandardItem(Model): refactor multiData supportGiuseppe D'Angelo2021-02-051-24/+23
| | | | | | | | | | | | | | | | QSI(M) allow users to override their data() functions. This means that we can't have their data() implemented in terms of multiData(), or otherwise a subclass that overrides data() will fall out of sync with its multiData() implementation. We must keep multiData() implemented in terms of data() instead. While at it, document QSI::multiData(). Task-number: QTBUG-89423 Change-Id: If30a980d8449135b516745fec73170d53367b4b7 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit a1e9817cec5e0dccf26040d0b0d24e974841d5b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: hide edit menu if typing on the input panelRichard Moe Gustavsen2021-02-041-4/+8
| | | | | | | | | | | | | | | | | On iOS, if you select some text, the edit menu will show on top of it. And if you tap on the screen (or inside the menu) it will hide. But if you type on the input panel, it will stay open. This is wrong. This patch will keep better track of whether or not the edit menu was opened by us, and if it was, ensure we close it also if the cursor moves by typing on the input panel. Fixes: QTBUG-90860 Change-Id: I0a51382030560182e7925c8b694b42e50943514e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit b39081230428a9cc08389342c4610d11b2ee210d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: fix compiler warnings for Android inputAssam Boudjelthia2021-02-044-48/+61
| | | | | | | | | | | QPointingDevice requires using the constructor to set its settings in Qt 6. Replace + with | operator and return QKeyCombination instead of int. Change-Id: Id3da469cc13b34ec7b55afa751dbc04601880df6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4493b90224f575e5570afeb1ec181be5c4e74b09)
* Remove false Q_UNREACHABLE from shaping codeEskil Abrahamsen Blomfeldt2021-02-041-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added by 9ff76c27b9031ae7c49c4c9e8b5a3bea1e0e3c78 on the basis that it signifies a shaping error and would later assert or crash. But the line is easily reachable by user code. If Harfbuzz returns 0 glyphs, it just means it is unable to shape the string, for instance if the input string only contains default ignorables (like a ZWJ) and does not have any appropriate glyph to use for replacement. Qt expects there to always be at least one glyph in the output (num_glyphs == 0 is used to indicate shaping is not yet done), so to avoid asserts later on, we simply populate the output with a single 0 token, which is a required entry in the font that is reserved for representing unrepresentable characters. This also adds a test and therefore a zero-width joiner to the test font to reproduce the issue. [ChangeLog][QtGui][Text] Fixed a possible crash with certain fonts when shaping strings consisting only of control characters. Fixes: QTBUG-89155 Change-Id: Ia0dd6a04844c9be90dcab6c464bebe339a3dab11 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> (cherry picked from commit fccd419dd632306a4bd85928223e0a56a59510ef)
* testlib: Only consider major version for macOS 11 and later in blacklistsLiang Qi2021-02-031-0/+4
| | | | | | | | Change-Id: I9d3f7ca2022b17559dd5bdd5c6bb8c85e89c3f64 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit faab8f603d2cc34c072ffd0822af68dafcfd686a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: gl: Attempt reading back floating point formatsLaszlo Agocs2021-02-032-9/+27
| | | | | | | | | | ...in the hope that they may work. If not, that's it, but at least we tried. Task-number: QTBUG-76970 Change-Id: I134c5cc4cfb5ad1e6f9edbfcf506df20022e127a Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit d136299bb83f5343a62f9e02693f6737981edf62)
* Optimize RGBA64->RGBA64PM for SSE2/AVX2Allan Sandfeld Jensen2021-02-034-50/+45
| | | | | | | | And remove the direct conversion so we can get both the SIMD optimization and threading applied. Change-Id: Id032ea91cc40c1cbf1c8a1da0386de35aa36cfb5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix inefficient use of qToBigEndianAllan Sandfeld Jensen2021-02-021-4/+1
| | | | | | | It can do unaligned access directly as well. Change-Id: I4046cf69e2ad8eb628b8b53bfa521800bb35dc6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qtlskey_schannel_p.cpp: fix a compilation errorLi Xinwei2021-02-021-0/+1
| | | | | | | qtlskey_schannel.cpp(183): error C3861: 'lcSsl': identifier not found Change-Id: I406860f87a7b7f93ac2c0ca3d426dfa88615a90e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* macOS: Reduce duplicated code for showing file dialogsTor Arne Vestbø2021-02-022-75/+37
| | | | | | | | | | The initialization was duplicated across the different modes. We now do the setup once, in a shared showPanel:withParent function. This also simplifies and removes the need to store the return code. Change-Id: I3c4da48cfef92bcc59c76cffa15b40150de1a9e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Reduce duplicated updates of file dialog propertiesTor Arne Vestbø2021-02-021-13/+6
| | | | | Change-Id: I2017bfdfa6d5598405d700680ecaaf04fd6023fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Refactor computing of accepted extensions in file dialogsTor Arne Vestbø2021-02-021-21/+20
| | | | | Change-Id: Ie71db5a0ab66dd9d157b53297cbb9aba248fa8af Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Use single variable to track file dialog in QCocoaFileDialogHelperTor Arne Vestbø2021-02-021-64/+74
| | | | | | | | | | | | | | Relying on Objective-C's no-op behavior when sending messages to nil was nifty, but a bit confusing when trying to track the ownership model of the class. It's now explicit at the call sites what's going on (a cast). The canSelectHiddenExtension property is valid both save and open panels, but AppKit will only show it for save panels. Change-Id: I8e12d629639e2179d155b2ecda1bb2dab2a5757d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* NetworkListManager based backend for QNetworkInformationMårten Nordheim2021-02-027-9/+393
| | | | | | | | | | For Windows. Based on the code I wrote for QNetworkStatusMonitor. It also renames the netlistmgr feature, avoiding the abbreviation. Locally my MinGW fails the networklistmanager feature test so it may not be supported on MinGW, likely leaving it without a backend at all. Change-Id: I13bbe4127edc2a9c0bb91602c95f1cb206a85a69 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make setSelectionOnFocusObject() take native pixelsMorten Sørvig2021-02-022-11/+10
| | | | | | | | | | | | Change the setSelectionOnFocusObject() to take geometry arguments in native pixels, in order to be consistent with other QPlatformInputContext API. Calling code which pass non-native geometry must be updated (in practice only the Android platform plugin). Change-Id: I1c61b8cf583afe607567d6056ca7ff23cc3de3f3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: Replace magic number for TYPE_NUMBER_VARIATION_PASSWORDChristian Strømme2021-02-021-1/+1
| | | | | | | | | This field has been defined since API level 11, so no reason why we shouldn't just use that instead. Pick-to: 6.0 Change-Id: I8e3ffde3680e41f26d776e1f0474f632186a6b27 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Fix input method hints for ImhHiddenTextChristian Strømme2021-02-021-15/+9
| | | | | | | | | | | | | | | | | | | If ImhHiddenText is set then that should take precedence over the other input method hints. Also, certain combinations aren't really possible. E.g., ImhEmailCharactersOnly and ImhHiddenText doesn't have its own specific variation on Android. ImhSensitiveData and ImhNoPredictiveText are also likely to not work as TYPE_TEXT_FLAG_NO_SUGGESTIONS is normally ignored by Android keyboards. A common workaround is to use the visible password variation but since this will force the layout to use latin characters it's not something we can use as an universal workaround, so users will need to manually enable it through the environment variable QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT Fixes: QTBUG-85787 Pick-to: 6.0 5.15 Change-Id: I0ff591ec9acf8dd556c7987e6d997cff3ddfe38e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix QJniObject::registerNativeMethods use of global referenceAssam Boudjelthia2021-02-021-4/+3
| | | | | | | | | registerNativeMethods() should be using the local jclass from findClass() instead of the global reference. Task-number: QTBUG-89633 Change-Id: I469a9a1ecff95ab9948421baa5c88735ba7ad776 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix nullptr dereference on out-of-memory conditionsAllan Sandfeld Jensen2021-02-021-0/+2
| | | | | | | Fixes two static analysis warnings. Change-Id: Id4644d1944e97c9c53d2268a9a71e5f6347d3946 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Segment qimage conversion block irrelevant of depthAllan Sandfeld Jensen2021-02-022-5/+5
| | | | | | | | Always try segments from 64k to 128k pixels, this matches qimagescale logic, and gives a one percent speedup locally. Change-Id: I3ef468eac9dca4b84f04850e970f3d15a4f16255 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>