summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Avoid format conversion in backing store texture uploadAllan Sandfeld Jensen2020-05-131-44/+50
| | | | | | | | | Use glPixelStorei where possible Pick-To: 5.15, 5.12 Fixes: QTBUG-84189 Change-Id: Iadf039b5c6d8e7b6bb11d031a94683343dee0dc6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QUrlIdna: replace manual pointer handling with std::begin()/end()Marc Mutz2020-05-131-6/+4
| | | | | | | This is more readable, because it follows usual iterator patterns. Change-Id: I56900286ddbca57a86aa499020f175e8add17fd9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port qt_punycodeEncoder() to QStringViewMarc Mutz2020-05-133-17/+15
| | | | | Change-Id: I264e67bc08413f8a39e2d16c774bfd2c76c320ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QString: fix premature pessimisation in arg(char-ish)Marc Mutz2020-05-131-6/+2
| | | | | | | | | Instead of converting the char or QChar to a QString, convert them to a QStringView, saving the memory allocation. Pick-to: 5.15 Change-Id: I023712ec00172f1c8570e762817bfc3a95e01125 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QString: remove op+=(char) and op+=(QChar::SpecialCharacter)Marc Mutz2020-05-133-28/+12
| | | | | | | | | | | | | | | | | | | The former messes in bad ways with the overload set (it, fatally, attracts char16_t, e.g.). The latter was probably added in response to ambiguities between (char) and (QChar). While it's harmless now, remove it, since it no longer pulls its weight. The no-ascii warning is now coming from QChar(char), so the protection isn't lost. [ChangeLog][QtCore][QString] The += operators taking char and QChar::SpecialCharacter have been removed as they cause adding a char16_t to QString to call the char overload, losing information. The append() function was not affected. Change-Id: I57116314bcc71c0d9476159513c0c10048239db3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove deprecated QDesktopServices APIsVolker Hilsheimer2020-05-135-158/+2
| | | | | Change-Id: Ic21ad2938b20c1aa3ae499a921c9cff92f615816 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QPlatformNativeInterface functions for CGImage conversionTor Arne Vestbø2020-05-132-18/+0
| | | | | | | | | | | QMacExtras no longer use them. Clients who need the functionality should use QImage::toCGImage(), or qt_mac_toQImage() from QtGui's private qcoregraphics_p.h, until we've made a public verion of it. Task-number: QTBUG-83252 Change-Id: If74d05afe8f4ce6728d8c503bd97f7632583fbed Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QtCore/Windows: fix deprecated QChar conversionsFriedemann Kleint2020-05-131-1/+1
| | | | | | | global\qlogging.cpp:1698:91: warning: 'constexpr QChar::QChar(char)' is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] Change-Id: I3c8a9499c9504bb6198dc187cb79239f705e2d39 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QNetworkReply/http2: Add a contentEncoding testMårten Nordheim2020-05-134-0/+173
| | | | | | | | Will be useful when DecompressHelper gets taken into use for both. Task-number: QTBUG-83269 Change-Id: Iaf253219bed193025c2b82d6609f4dcc4de33df8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Document Qt for Python usage of the resource systemFriedemann Kleint2020-05-131-0/+15
| | | | | | | | Pick-to: 5.15 Change-Id: I77576d0e6464099a7595a74f4bf8ef18ec515ec2 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Remove deprecated functionality in QMetaObjectBuilderShawn Rutledge2020-05-131-11/+0
| | | | | Change-Id: Ic0539aed854b9bf9b335cbb8030d5a4eb4296a7d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Android: add ANDROID_ABIS qmake snippetAssam Boudjelthia2020-05-131-0/+10
| | | | | | | | | | Add snippet on how to use ANDROID_ABIS inside the .pro file. Pick-to: 5.15 Task-number: QTCREATORBUG-24014 Change-Id: Id3bb960c04ea6480b06878121ad33f89c03e5642 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* ARM neon draw helper only available for little endianPeter Seiderer2020-05-131-4/+4
| | | | | | | | | | | Fixes: qimage_conversions.cpp:(.text+0x2598): undefined reference to `storeRGB32FromARGB32PM_neon(unsigned char*, unsigned int const*, int, int, QVector<unsigned int> const*, QDitherInfo*)' Task-number: QTBUG-84110 Change-Id: I61ac697dd1d0b2c793fd5751209cd041ee30ad38 Pick-to: 5.15 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port qt_check_std3rules() to QStringViewMarc Mutz2020-05-133-14/+16
| | | | | | | Also port its callees. These functions scream to the QStringView-ified... Change-Id: I13c95d65941eb8d02223306d80efd1437b4bd9b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Drop the deprecated QStringViewLiteralGiuseppe D'Angelo2020-05-132-11/+0
| | | | | Change-Id: I6e6643b4c7cbcd43c495c332de0d6874856b9528 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove obsolete storage, constructors and accessors in QEvent subclassesShawn Rutledge2020-05-127-501/+14
| | | | | Change-Id: I5c51244031ff40f1972106ad4fe27010c8be1193 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port qt_urlRecode() to QStringViewMarc Mutz2020-05-125-34/+28
| | | | | | | It's about time :) Change-Id: I27e597516318382850d4c193fd5b66a35fb9c316 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QUrl: port percent-decoding to char16_tMarc Mutz2020-05-121-12/+16
| | | | | | | | | Port decode() to take a QStringView to isolate callers from char16_t. Have it return qsizetype instead of int. Use QChar* as output pointer internally, to avoid more casts. Change-Id: Ia388361a281ee97c41b01d8e6fe2c00801d988c4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android JNI: update usage of QWindowSystemInterface::handleMouseEvent()Shawn Rutledge2020-05-121-18/+15
| | | | | | | | | | Follup to a37785ec7638e7485112b87dd7e767881fecc114: this API has been deprecated since 5.11. Pick-to: 5.15 Change-Id: Ib143f3997f89fc71d37d740338dae7df52ff45b4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* QUrlIdna: QChar(0x2d) → QLatin1Char('-')Marc Mutz2020-05-121-2/+2
| | | | | | | | A reader of the code shoudn't need to know ASCII code points by heart, so don't force them to. Change-Id: I2c44fcf4a948b85dfbc02ac8b5b7b934e87b41a7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Android: allow file dialog to use remote locationsAssam Boudjelthia2020-05-122-10/+0
| | | | | | | | | Allow the native file dialog to use remote locations like OneDrive, Google Drive, etc. Pick-to: 5.15 Change-Id: I67027f0da8e6bd759a4936e03b6c9e95f3f90e1a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* rhi: d3d11: Handle DXGI_ERROR_SDK_COMPONENT_MISSING gracefullyLaszlo Agocs2020-05-121-0/+9
| | | | | | | | | | | | Requesting the debug layer is not something that succeeds at run time if the corresponding SDK component is not present. Handle it gracefully: simply retry D3D11CreateDevice without the debug device flag. Relevant also for the Qt CI's Windows 10 VMs. Task-number: QTBUG-84067 Change-Id: Ia7b2562917ec11ce04a75c052527bf526d1fe81b Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* pro2cmake: Handle QMAKE_TARGET_XXX variablesJoerg Bornemann2020-05-1215-1/+32
| | | | | Change-Id: I62151e04d21c20d8c8ad5825464f26074c8abc3d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Set QT_TARGET_XXX properties for Qt executables and pluginsJoerg Bornemann2020-05-121-10/+44
| | | | | | | | | | | | | Before, we were setting those properties only for Qt modules. Now, Qt executables and plugins have a full VERSIONINFORMATION resource on Windows. Also, extend the CMake API with the possibility to pass target information to modules, plugins and tools. This will be used in a subsequent commit. Change-Id: I2bb8d3637569e0eaec76f56331bc23282285d872 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix some build warnings due to bad integer format in printfJean-Michaël Celerier2020-05-121-3/+3
| | | | | Change-Id: I4b882b0a800f92eaa13f38ed23caa4b1f4992e26 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* CMake: Use correct file typeYuhang Zhao2020-05-121-1/+6
| | | | | Change-Id: Ie32a32bd1cc3e5885a6699e8ea2281982527e50e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Disable the PCRE Jit when compiling qmakeLars Knoll2020-05-123-3/+5
| | | | | | | | | I'm getting compile errors with gcc 9.3 without this, and it makes sense to disable the JIT in bootstrapped builds anyway. Change-Id: Ife867bd2d6fd0bf133edae4903bb6b6d295db547 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: pro2cmake: Fix cmake api detection for pluginsAlexandru Croitor2020-05-121-1/+1
| | | | | | | | We should search for the values of function names rather than the mapping key. Change-Id: Iedef7fcf4d716ff7f6d277d9626d9dc2dd781401 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix potential memory leak by adding a virtual destructor to AnchorVertexVolker Hilsheimer2020-05-121-17/+18
| | | | | | | | | | | | | | | | | | The subclass AnchorVertexPair is allocated and passed around as pointers to AnchorVertex, and placed in lists that are then later cleaned up via qDeleteAll. This very likely results in memory leaks, as the compiler- generated ~AnchorVertexPair destructor is never called. Add a virtual destructor. Since there now is a vtable generated for AnchorVertex, remove the m_type member (which is only used for string generation in debug builds) and make toString virtual instead. Change-Id: I2cf184c0b1da1bd59b056a0f696a0e5479d4cb4e Fixes: QTBUG-84094 Coverity-Id: 218707 Pick-to: 5.15 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* MSVC: Fix build with -developer-buildEskil Abrahamsen Blomfeldt2020-05-121-2/+2
| | | | | | | | Passing 0xA7 to a signed char causes a truncation warning with MSVC2017. Make the cast explicit. Change-Id: Ief1a97c52544b271556811816f7804074bd336df Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Port qustrlen and qustrchr to char16_tMarc Mutz2020-05-124-19/+19
| | | | | | | Fix callers. Change-Id: Iaf604c890941aa3de3bd31da300b2066e65968ed Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace some QString::fromRawData() with QStringViews around the codeMarc Mutz2020-05-124-4/+4
| | | | | | | | | Even though QString::fromRawData() may not be as expensive as it used to be, it's still and out-of-line call _and_ more characters to type, so replace with QStringView construction where applicable. Change-Id: I70662da1bd45284f67e117e92b25d242afb8aaf8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Teach QDateTimeParser some common time-zone offset formatsAndrei Golubev2020-05-124-62/+270
| | | | | | | | Fixes: QTBUG-83687 Fixes: QTBUG-83844 Pick-to: 5.15 Change-Id: Ia1c827017b93cf8277aa5a0266805d773d2d9818 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Cache QUrl::idnWhiteList() absent user_idn_whitelistMarc Mutz2020-05-121-7/+10
| | | | | | | | | | | | Instead of creating a QStringList from a static array anew for each call, cache the result in a static variable. If we have to pay for the overhead of implicitly-shared classes, we should at least reap the benefits, too. Use IILE to gain automatic thread-safety (thread-safe statics). Change-Id: Ib92dd9cb85f84e013f98ca81565cc392bb39e76b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Specify QTextOption behavior in drawTextPaul Wicking2020-05-121-1/+2
| | | | | | | | | | Be more specific about overriding behavior when using the drawText overload that takes a QTextOption argument. Fixes: QTBUG-41894 Pick-to: 5.15 Change-Id: I8b38cb383005f1a07f4c6d70050e0d2cbb551521 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: fix QRandomGenerator code snippetsTasuku Suzuki2020-05-121-4/+4
| | | | | | | | Use the static global instance to call bounded() and fillRange(). Pick-To: 5.15 Change-Id: I91678b7c985ab9d0dcdf09aadad6cb8f495c02cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Close memory leak in QTestLib support for item model testingVolker Hilsheimer2020-05-121-4/+14
| | | | | | | | | | | | QTest::toString allocates memory by calling qstrdup; that memory must be freed by the caller. Change-Id: I218bc57b3312fdd9195fb49eaed7d20df4bf717c Fixes: QTBUG-84081 Coverity-Id: 186979 Covierty-Id: 186980 Pick-to: 5.15 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* cmake: Add MinGW platform checkFriedemann Kleint2020-05-121-0/+1
| | | | | | | Task-number: QTBUG-78167 Change-Id: Id203925d69c5b4d7e0841c0dbdd298269a13f06a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtCore: use new QChar::fromUcs{2,4}()Marc Mutz2020-05-124-16/+7
| | | | | | | | | | Also replace one case of QChar(0) with QChar::Null. These were errors in my local tree, which means they're included in bootstrap builds (incl. qmake). Change-Id: I3dffa9383fd1a30aa43fe2491ad95bb2b1869b40 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qmake: fix a few deprecated QChar(non-char-type) warningsMarc Mutz2020-05-123-9/+9
| | | | | | | | The QChar ctors from non-char-types are going to be deprecated. Change-Id: I17d7916fb1dac9889ead61daca846b1257d17312 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Sweep of int-ish → char-ish types near calls to QString::fromU*()Marc Mutz2020-05-1212-147/+147
| | | | | | | | | | | | The fromUtf16(ushort*) and fromUcs4(uint*) overloads are going to be deprecated. Use the newer fromUtf16(char16_t*) and fromUcs4(char32_t*) overloads. As a drive-by, use std::end()/std::size() where applicable. Change-Id: I5a93e38cae4a2e33d49c90d06c5f14f7cb7ce90c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QChar::fromUcs4() moreMarc Mutz2020-05-124-7/+9
| | | | | | Change-Id: I02be41de92d84145186de9ac5f5ea3541a941964 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QUrlQuery: improve defaultQuery{Value,Pair}Delimiter()Marc Mutz2020-05-122-6/+8
| | | | | | | | | | | | | | - constexpr - noexcept - return char16_t (this converts implicitly to QChar, but allows use elsewhere, too) [ChangeLog][QtCore][QUrlQuery] The defaultQueryValueDelimiter() and defaultQueryPairDelimiter() functions now return char16_t instead of QChar. Change-Id: I4662f832a89ae9f4a984ea9349b5e0e212a09c95 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_QShortcut: avoid int -> QChar conversionsMarc Mutz2020-05-121-10/+10
| | | | | | | They're being made explicit/deprecated/removed. Change-Id: I2d849d85e51c58b1f837c6795f3d45371f773a92 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QUrl: replace some lower-case macros with functionsMarc Mutz2020-05-121-3/+5
| | | | | | | It's cleaner. Change-Id: Ib2297b905f5dd242c5e7ab431393398e7c93ecbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix coverity warnings about uninitialized data membersVolker Hilsheimer2020-05-122-2/+2
| | | | | | | | | | | | | | | | | | | Coverity alerts about uninitialized members. While this might be ok in the code here (ie TreeNode::splitLeft is never used for leaf nodes) it can easily result in undefined behavior and other hard-to-debug issues. Initializing the struct with initializer syntax; compiler explorer indicates that the compile will be able to optimze the calls to avoid duplicate initialization of data members. Change-Id: I0eb5d26e34f466d8c659c1945f02601aef511fbf Fixes: QTBUG-84160 Fixes: QTBUG-84156 Coverity-Id: 218601 Coverity-Id: 11398 Pick-to: 5.15 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Rhi: improve qHash implementationsGiuseppe D'Angelo2020-05-122-5/+26
| | | | | | | | Use the combiners and an algorithm. Change-Id: I577950bbd2e8b0556f28e2a8381e432c22bb0dc9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Long live qHashMulti(Commutative)Giuseppe D'Angelo2020-05-129-47/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper function so that we have a shortcut. Instead of writing: QHashCombine hash; seed = hash(seed, fieldA); seed = hash(seed, fieldB); // etc. return seed; one can now simply write: return qHashMulti(seed, fieldA, fieldB, fieldC); Port a few usages inside qtbase as a demonstration. [ChangeLog][QtCore][QHash] Added the qHashMulti and qHashMultiCommutative functions as convenience helpers to calculate a hash from multiple variables (typically, data members of a class). Change-Id: I881a9ad41168df20ceecc6588a94abe7ddc6a532 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* qmake: Remove the DISCARDABLE flag for icon resourcesYuhang Zhao2020-05-112-2/+2
| | | | | | | | | | According to [1] the DISCARDABLE attribute is for 16-bit Windows, and it is ignored. We can drop it. [1] https://docs.microsoft.com/en-us/windows/win32/menurc/common-resource-attributes Change-Id: I70e5b0441a9d20f6c76c3d7a84947f8bce5c8fbd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Add more entries for rc filesYuhang Zhao2020-05-111-1/+31
| | | | | | | | | As what we did for QMake. Amends commit 317383217baa280b7e7401a5adc4ce976320e272 Change-Id: Iab3b755193b5483362896da20a03fe2d59f37192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>