summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix accidental shadowing in QLocale::uiLanguages()Edward Welbourne2020-11-091-1/+1
| | | | | | | | | | | | While simplifying uses of QSystemLocale::query() I declared a shadowing local variable instead of setting a function-scope variable that the code had previously set. Restore prior correct behavior. Fixup for commit b5bc3ee036575dd5a3eec1d6bd578738df7bd6ad. Fixes: QTBUG-87858 Change-Id: I6bd64aef1eb7df9ec4a703c59aa7369245ab2472 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Reduce memory reallocations in QTextTablePrivate::update()Robert Loehning2020-11-092-14/+6
| | | | | | | | | | This fixes oss-fuzz issue 21100. Task-number: QTBUG-85139 Pick-to: 5.15 Change-Id: I635c1fa9b16dd527e568ec1e98ea7cac73977020 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QAsn1Element: Read value in blocks to avoid oom at wrong lengthRobert Loehning2020-11-091-5/+13
| | | | | | | | Fixes oss-fuzz issue 22272. Pick-to: 5.15 Change-Id: I8a49b9487f632469402c983e517e817e8e65bef7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Reorder IterateKernel data members to avoid holes in the dataSona Kurazyan2020-11-091-6/+7
| | | | | Change-Id: I7661eaa6b14b7a7b930390e6bb8c6894f4a91846 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* cmake: Allow module to specify initial dependsTor Arne Vestbø2020-11-091-1/+4
| | | | | Change-Id: I85f39f16f2103dcb42ff467bbc79a0baf6c020e1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QMultiHash: add a QHash&& constructor and unite() overloadMårten Nordheim2020-11-092-0/+132
| | | | | | | | Reaches into the internals to avoid erasing one entry at a time from the QHash. Change-Id: I47079592d130d2ecd844998dfa31e633e049d4c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix regular expression initialize with incorrect filtersZhang Yu2020-11-091-3/+3
| | | | | | | | | | | | | | | | | | | The filters used to construct regular expression is the parameter of QDirIteratorPrivate constructor,and not the member variable 'filters' of QDirIteratorPrivate. When using filters as QDir::NoFilter to construct QDirIteratorPrivate, then the regular expression will incorrectly initialize with QDir::CaseSensitive(result of QDir::NoFilter),and not Qt::CaseInsensitive(result of QDir::AllEntries). Therefore, using the '_filters' to replace the parameter 'filters' Fixes: QTBUG-88227 Pick-to: 5.15 Change-Id: I8a21fe1075fd95981e328a161a978e4fe546c9ca Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix pcre2 feature conditionsJoerg Bornemann2020-11-093-6/+6
| | | | | | | | | | | The pcre2 feature was turned off when the user passed -system-pcre to configure. The reason were faulty expressions in the enable/disable fields. Fixes: QTBUG-88295 Pick-to: 5.15 Change-Id: I4edee49a9c797797ef3b80f955b48b5492fb4fc7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Remove -strip from configure's helpJoerg Bornemann2020-11-091-1/+0
| | | | | | | | | This option is not supported by the CMake build anymore as 'cmake --install <build-dir> --strip' takes over this task. Task-number: QTBUG-88290 Change-Id: I4d435e72f5f12fac6e86ec65cd0b26467c3fa4e0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add tests for QOperatingSystemVersionIvan Solovev2020-11-096-1/+205
| | | | | | Task-number: QTBUG-88183 Change-Id: I7083dae5bf9ef8cc5eb18e68052706cc3f7c66ab Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Automatically generate unit tests for QtConcurrentAndreas Buhr2020-11-0921-46/+1948
| | | | | | | | | | There are many different ways to to call map and filter functions in QtConcurrent. This patch adds a python script to generate all possible combinations. Change-Id: I61ed1758601e219c5852e8cc939c5feebb23d2f6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-0922-34/+34
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ib59de7976fae19e7b39962e80161df6628e4070b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: mention that disconnecting all signals can be dangerousMitch Curtis2020-11-092-0/+40
| | | | | | | | Task-number: QTBUG-83387 Change-Id: I55c0a267e5490ba0226fd6858c18fd88cc3b8d59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* CMake: Fix qt-configure-module location in configure's outputJoerg Bornemann2020-11-091-1/+6
| | | | | | | | | For non-cross-builds, qt-configure-module is located in CMAKE_INSTALL_PREFIX/bin, not below the staging prefix. Fixes: QTBUG-88262 Change-Id: Ib6cdd88ece391d5b8ce850b991564e5bed1e475d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Support customized device discovery with udevElvis Lee2020-11-092-3/+7
| | | | | | | | | | With derived class from QDeviceDiscoveryUDev, eglfs for a platform can create own input handlers. Task-number: QTBUG-85268 Change-Id: Ib8e99b365195eff9540e7c90e14c5d269d37ad86 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Allow painting above INT16_MAX on 64-bit architecturesAllan Sandfeld Jensen2020-11-097-182/+268
| | | | | | | | | | | The logic in qgrayraster was ready for it except for an intermediate format. qrasterizer.cpp and qcosmeticstroker.cpp uses a dot-16 fixed point format, and had to be changed to handle higher coordinates on 64-bit architectures. Fixes: QTBUG-84428 Change-Id: I85ab7a04e38bd0dbcefa9f16c16ccc84785a33cf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Limit value in setFontWeightFromValue()Robert Loehning2020-11-091-1/+2
| | | | | | | | | QFont::setWeight() just accepts values between 0 and 900 anyway. Fixes: oss-fuzz-24986 Pick-to: 5.12 5.15 Change-Id: Ic65139a7821be3a12c65444d010736f03c8b74f5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Avoid usage of FEATURE_debug_and_release in QtSetup.cmakeJoerg Bornemann2020-11-091-1/+1
| | | | | | | | | | | If the user turns on debug_and_release with the configure script, FEATURE_debug_and_release will not be set, and the debug postfix won't be set correctly. Directly use FEATURE_debug_and_release's condition instead. Change-Id: Ica4af3caa25f2e6712eca4659818aac2c8b95256 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configure -developer-buildJoerg Bornemann2020-11-091-0/+6
| | | | | | | | | | | | | | | Configure now translates -developer-build to INPUT_developer_build without setting FEATURE_developer_build. The install prefix determination code in QtSetup.cmake happens much earlier than the feature evaluation. As the developer_build feature is merely a switch that's supposed to be flipped by the user, we can just translate the INPUT_developer_build value to FEATURE_developer_build in QtSetup.cmake. Fixes: QTBUG-88318 Change-Id: I57918232359e2e367e41b779d3f4737731dd76e5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Minor refactor of installMetaFileMichal Klocek2020-11-092-20/+27
| | | | | | | | | | Move some lines into createSedArgs. This is used in follow up patch. Pick-to: 5.15 Task-number: QTBUG-87154 Change-Id: I226f4aad4aaf703a4726c42b40afb4bde3a9d878 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* moc: output errors and warnings in a way that matches compilersVolker Hilsheimer2020-11-092-60/+60
| | | | | | | | | | | | | | | | | | gcc, clang, and MSVC all use lowercase "warning:", "error:" and "note:". Follow that standard. Also, include a column number; just print 1, as the Symbol doesn't give us a column number, and searching backwards for a newline seems overkill. This fixes IDE integrations that parse compiler output using regular expressions. The test checks for moc output, but most tests were so far only running on Linux systems. Expand this to Unix for most tests, which then includes macOS. Change-Id: I0a6151cc0dc50e52ca72ff8048a45213aebdb3a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Member-initialize QOpenGLWidgetPrivateVolker Hilsheimer2020-11-091-35/+18
| | | | | | | Fix warning about requestedFormat not being initialized in sequence. Change-Id: I7b948cb356b65ea2953424a700eb1a70cd1802f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: List missing country names in QLocale::CountryTopi Reinio2020-11-091-11/+21
| | | | | | | | And drop the use of 'please' when documenting replacements for obsolete values. Change-Id: I1c5697023794f2935755d538fad602fe78ba8501 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: fix \inmodule for classes moved to QtGuiv6.0.0-beta4Volker Hilsheimer2020-11-093-4/+4
| | | | | Change-Id: If7a42dde8c728356e0e5646743a1425b08fccbcb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QAnyStringView comparison documentationVolker Hilsheimer2020-11-092-7/+7
| | | | | | | | | | qdoc's clang knows about spaceship operator, but we still need to document the regular ones. Also add missing return types. Change-Id: If382ac2f51a49c9adbe4a99025403a3e8332fabd Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix broken link in QWidgetVolker Hilsheimer2020-11-091-1/+1
| | | | | | | \l expects the link target first, then link text second Change-Id: I4d8638c2c441c6d2949b1f011422c191df3ff619 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Teach QPixmapIconEngine how to handle @Nx pixmapsMorten Johan Sørvig2020-11-083-34/+110
| | | | | | | | | | | | | | | | | | | | Bring QPixmapIconEngine on par with QIconLoaderEngine when it comes to @Nx pixmap handling: Make the scale factor a test parameter during icon lookup. This allows storing e.g 16x16@1, 16x16@2, 16x16@3 versions of a pixmap in the icon, and then having QIcon select the correct one based on the target devicePixelRatio. Extend the qiconhighdpi test to also cover QPixmapIconEngine, via the addPixmap() API. The corner cases of pixmap lookup can be much complicated. QIconLoaderEngine and QPixmapIconEngine should ideally have identical behavior in order to avoid surprises. Change-Id: I17552cc61755bff9553c4a462e3983ac6759c13b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QLocale: improve speed of 'applyIntegerFormatting()'Andreas Buhr2020-11-081-4/+7
| | | | | | | | | | | | | This patch reduced the runtime of "QString::number(12345678)" from 119ns to 84ns in one measurement. It removes one copy of a QString into a local lambda function, it adds a std::move on return, removing another QString instantiation and it removes the usage of StringBuilder on return, which created another QString. Task-number: QTBUG-87330 Change-Id: Ia37e314353c354ae04402cd482d0f7aeabbfc0cb Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix static assert in Markdown parserAndreas Buhr2020-11-081-1/+1
| | | | | | | | | A static assert was misstated. The equality operator has precedence over the bitwise or operator, the static assert was thus not checking what it was intended to check. Fixed by this patch. Change-Id: If21faa617dca1d1786fc6bfaf0b87423e0d35e4e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* cmake: Add function to get a target property, with empty string as fallbackTor Arne Vestbø2020-11-081-0/+9
| | | | | Change-Id: Ic39fefb91e9ca0f36c815c969ff1072767a9ab16 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Update documentation of CMake commands for Qt 6 for DBusKai Koehne2020-11-081-12/+10
| | | | | Change-Id: Iec86b42a0a1b52ea4688226f3c71fc2bfc6d48ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Expose resource source files to IDEsAlexey Edelev2020-11-081-0/+17
| | | | | | | | | Add fake targets for .qml/.js and other files added using qt6_add_resources Task-number: QTBUG-87642 Change-Id: I690b223711afe96ea7fdb4cf11b8e3317ed9bbe6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update public suffix list header to latest versionEdward Welbourne2020-11-083-13995/+14329
| | | | | | | | | The former *.platform.sh entry has been replaced by more specific entries, replacing the wildcard with only selected second levels. Task-number: QTBUG-87925 Change-Id: Ie4ba7c66ba9aa40eafe23f02faa12f19d791cff2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename qurltlds-related files to match the header's moveEdward Welbourne2020-11-086-4/+4
| | | | | | | | | | | | | The header is now in src/network/kernel/ rather than src/corelib/io/, but the qt_attribution.json got left behind and the update program was still in a sub-dir of util/corelib/. Renamed the latter to util/publicSuffix/ (second-layer sub-directory was overkill, util/ isn't crowded and it was the only thing in util/corelib/; and there was no util/network/). This is a follow-up to commit 4f076db3d2e2e27cc56029fe878056ee79def56f Change-Id: I51c2c7892752ddc47390966044eb5650dfdfa9c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use the right UI language lookup in macOS backend for QSystemLocaleEdward Welbourne2020-11-081-22/+7
| | | | | | | | Use CFLocaleCopyPreferredLanguages() instead of a home-grown call to a low-level API. Brought to light by QTBUG-87858. Change-Id: Ica22c446e01930da65d34c8851e3e67c9d020d8b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rework QLocale's likely sub-tag additionEdward Welbourne2020-11-081-55/+108
| | | | | | | | | | | | | | Instead of looking up each candidate pattern in a separte O(log(n)) search, exploit the fact that the array is in the right order to put each candidate we try after the ones we'd have preferred over it. At the same time, add und_script_region and und_region searches, which aren't mentioned in the spec's algorithm but are clearly meant to be searched (the spec's examples include some). Also, document what's going on - because it's a bit complicated ! Change-Id: Id88ced335b0d2dfd18fb59c9a3dc75571f2a44ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Implement binary search in QLocale's likely sub-tag lookupEdward Welbourne2020-11-084-410/+446
| | | | | | | | | | | | | | Follow through on a comment from 2012: sort the likely subtag array (in the CLDR update script) and use bsearch to find entries in it. This simplifies QLocaleXmlReader.likelyMap() slightly, moving the detection of last entry to LocaleDataWriter.likelySubtags(), but requires collecting all likely sub-tag mapping pairs (rather than just passing them through from read to write via generators) in order to sort them. Change-Id: Ieb6875ccde1ddbd475ae68c0766a666ec32b7005 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update CLDR to v38Edward Welbourne2020-11-089-5842/+5852
| | | | | | | | | | | | | Fresh on the heels of our update to v37, they've released a new version. No new languages to complicate life, fortunately. Updated license (year range) and attribution. One test also needed an update: Catalan's long time format now parenthesizes the zone. Task-number: QTBUG-87925 Pick-to: 5.15 Change-Id: I54fb9b7f084b5cd019c983c1e3862dc03865a272 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Reorder locale enums alphabeticallyEdward Welbourne2020-11-088-11966/+11975
| | | | | | | | | | | | | Binary-incompatible change: change the numeric values of QLocale's Language, Script and Country enums, as encouraged by a comment in the generator script enumdata.py and clarify documentation around that. In the process (since I was changing almost every line anyway), convert the dictionary values from (mutable) lists of length two to tuples, since they are (and should be) immutable data. Change-Id: I26222bce45b9f5074b1d81ed70015a75ac34adcd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use newer names for various languages, territories and scriptsEdward Welbourne2020-11-088-1164/+983
| | | | | | | | | | Our enumdata.py namings of countries had fallen somewhat out of sync with CLDR's names. In the process, support including hyphenation in the unsquashed name, along with spacing. Distinguish, in comments, between older renamings and those first seen in Qt6. Change-Id: I91ec444bf35222ab6a9332e389ace19cca0e4fdf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify QLocaleXmlWriter::enumData()Edward Welbourne2020-11-081-7/+7
| | | | | | | | | Move the repeated List suffix to the __enumTable() helper, where half the parameter's uses were having to snip it off anyway. Change-Id: Ia396e87e59ceeb81fc4b0890a86934dc67da10cb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Replace QLocalePriave::create() with a plain constructorEdward Welbourne2020-11-082-34/+20
| | | | | | | | | | Be up front about using new in all the places where it's created. Made one of the global statics into a function-local static. Eliminated a static made redundant by its const sibling. Made two members const now that they can be. Change-Id: I46532b3c1e0e62d1f8c84f55494f70cff09d4404 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace fallbackUiLocaleData() with fallbackUiLocaleIndex()Edward Welbourne2020-11-082-3/+3
| | | | | | | | | | | | | This means always initializing globalLocaleData from an entry in the locale_data array, where in principle the fallbackUiLocale() could be the system locale, which isn't held in the array. However, no actual implementation of fallbackUiLocale() uses the system locale (nor is it clear this would work if one did). Change-Id: Ie1c5ef3e8a97f21e0d82fa2dfb3cf3eb9e4c8840 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Rename QLocalePrivate's m_data_offset to m_indexEdward Welbourne2020-11-082-6/+7
| | | | | | | Change-Id: I1d27e6e57893c2f96df40746e1280fc8428e9ec1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QLocale: Compare to &globalLocaleData instead of systemData()Edward Welbourne2020-11-081-34/+34
| | | | | | | | | | | | | | | | | Calling systemData() locks a mutex but the tests against its return are just testing whether some m_data we're looking at is the &globalLocaleData it's returning; any other m_data points into the locale_data global array. So bypass the expensive mutex for these tests and just compare against the pointer systemData() would be returning. Thanks to Andreas Buhr <andreas.buhr@qt.io> for the analysis that showed the need for this. Task-number: QTBUG-87330 Change-Id: Ib06233773511dc9d532cb4658319b6d589d17b56 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Always pass index when creating a QLocalePrivateEdward Welbourne2020-11-082-3/+21
| | | | | | | | | | | | | | Previously, two calls using the default locale (which has an index in the locale_data array when it isn't the system locale) neglected to pass the index and the call for the system locale had no idnex, where it should really set the index appropriate to its language, script and country, so that we get appropriate calendar data to go with the system locale. One other place that handled the default locale also neglected to revise the index it was using. Change-Id: I4cc52e2d085a99e61236c91c0ae873b3bde5f11d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocale: use uint lessEdward Welbourne2020-11-082-14/+11
| | | | | | | | | | Various uses of uint were simply redundant, now that Language, Script and Country are ushort-based. Others should in any case have been quint16 or char32_t. Change-Id: Id0d0dc2558e1724907907cde56059f70972e824a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use QLocaleId in place of language, script, country triplesEdward Welbourne2020-11-084-54/+39
| | | | | | | | | | | | Pass a single argument in place of three; and (prepare to) replace QLocalePrivate::getLangAndCountry(), taking three out parameters, with QLocaleId::fromName(). Removal of getLangAndCountry() must wait for removal of linguist's use of it in qttools, which has to wait for this change to land in qtbase. In the process, change findLocaleIndex()'s return to int. Change-Id: I9f5c44c41f2dd1598c53ed5ccb0abddc6b17d21f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Rework finding of locale data to be index-basedEdward Welbourne2020-11-082-84/+52
| | | | | | | | | | | | | | | | Instead of returning a pointer (from which we then have to infer an index for use in calendar data access), compute the index as primary and infer the data pointer from it. Also refer to the index as such, rather than as an offset. Comments advocating this wanted to dispense with the pointer entirely; that's not an option, however, due to the system locale having its data in a separate object, outside the array that contains all the other locales' data. Change-Id: I1c60e688229394003e61372dbfc6cfb11086eafa Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct processEvents documentationAndreas Buhr2020-11-082-4/+4
| | | | | | | | | | | | | | | | The documentation of processEvents states that it processes all pending events. However, this is not true for the glib backend and probably was not true for at least a decade. QEventDispatcherGlib::processEvents(ProcessEventsFlags) calls "g_main_context_iteration" which is documented to only process events of highest priority: https://developer.gnome.org/glib/2.66/glib-The-Main-Event-Loop.html#g-main-context-iteration Fixes: QTBUG-87307 Task-number: QTBUG-84291 Pick-to: 5.15 Change-Id: I82c6f9dba865bb07f981ad648a128316749682ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>