summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-2956-522/+669
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-01-286-15/+38
| |\ | | | | | | | | | Change-Id: Ia5727ce68001bcaab467f5fae3a4933d1217015f
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-286-15/+38
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpnghandler.cpp Change-Id: I8630f363457bb613d8fb88470a71d95d97cdb301
| | | * updateSystemPrivate(): fix handling of empty string as non-null QVariantEdward Welbourne2020-01-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSystemLocale::query() can return an empty string for PositiveSign on Windows, apparently. In any case, we shouldn't be taking .at(0) of a QString without checking it's non-empty. Fixes: QTBUG-81530 Change-Id: I4d496a2650362f225d02998bd7b8be9fd783edb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * QXmlStreamReader: fix memory leakGiuseppe D'Angelo2020-01-232-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some inputs a QXmlStreamReaderPrivate may allocate another QXmlStreamReaderPrivate as its entityResolver. Which, recursively, may allocate yet another one. This "chain" of QXmlStreamReaderPrivate objects was managed using raw pointers, and a leak was possible by resetting one of these pointers to nullptr without freeing the corresponding object. Change-Id: I2c6e1f023a2ed68b2b1857db25c53cce7f6bd3e7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
| | | * QXmlStreamReader: early return in case of malformed attributesGiuseppe D'Angelo2020-01-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no point at keep raising errors after encountering the first malformed attribute. Change-Id: Idb37e577ea96c3bd850b3caf008fe3ecd57dd32e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Fix QLocale::system() and uiLanguages() for the mobile platformsAndy Shaw2020-01-222-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iOS, it was no longer using the Cocoa specific code needed to get the locale and uiLanguages information so this functionality is brought back as it was accidently lost. In addition, this has a side-effect of fixing a problem with Android versions below API 24 where it has no UiLanguages functionality so it gets the information based on the system locale as a fallback. Fixes: QTBUG-81307 Fixes: QTBUG-81357 Change-Id: I1709675b5bd5e9cedefb99eaec28279f20a347a4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * macOS: Work around CoreFoundation failing to resolve bundle resourcesTor Arne Vestbø2020-01-221-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a framework is loaded from a Samba share CoreFoundation will fail to resolve its Resources directory, and hence its Info.plist, which means we can't look up the bundle by id. Until this has been fixed in CoreFoundation and/or the macOS Samba implementation we work around it by manually looking for QtCore. This fixes our particular use-case of finding QtCore so we can resolve the relocatable prefix, but there's still a potential issue if any other code tries to use CF for bundle lookups. We don't seem to have any of those in Qt itself, but this should be kept in mind if we see similar issues in the future. Change-Id: I8fd471e44f6afe33a7459ce550f0fcec9acfefb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | | * macOS: Remove doc references to the Carbon frameworkTor Arne Vestbø2020-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I4d496acfc3d810d6334baba99cd697168bef0b75 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-01-2852-487/+719
| |\ \ \
| | * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-2852-487/+719
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsettings.cpp src/corelib/kernel/qvariant.cpp src/corelib/serialization/qjsoncbor.cpp src/corelib/serialization/qjsonvalue.cpp src/corelib/tools/tools.pri src/gui/image/qimage.cpp src/gui/kernel/qguivariant.cpp src/widgets/kernel/qshortcut.cpp tests/auto/tools/moc/allmocs_baseline_in.json tests/auto/tools/moc/tst_moc.cpp src/opengl/qglframebufferobject.cpp Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Leander Beernaert <leander.beernaert@qt.io> Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
| | | * | QThread::setPriority() Warn about invalid parameter on all platformsFriedemann Kleint2020-01-272-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InheritPriority may not be set, but the warning only occurs on Windows. Move the warning to the public class. Change-Id: I51d401300f840e4c1396c2c30182e49ed45d60d2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | | * | Doc: Clarify usage of Qt::ReturnByValue in QCursorSze Howe Koh2020-01-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6ce2c658dc0e72beb9e7a2497c6dbdbc71d96bc5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | * | Doc: Replace some usages of 0/zero/null with \nullptrSze Howe Koh2020-01-273-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibe7de11fc6fc41477c35e7d653c6a911855deabb Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | * | QMultiMap: Add unite documentationMårten Nordheim2020-01-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I missed copying over the documentation from QMap::unite when deprecating it. Amends 4ec6748c6a30f74e6d8fbb90fc118b306d1fa690 Change-Id: I118382c4645bdc679a378e02a462d104b9af9aad Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | * | Doc/QtBase: replace some 0 with \nullptrChristian Ehrlicher2020-01-265-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace some 'is 0' or 'are 0' where 0 referes to a nullptr with 'is \nullptr' and 'are \nullptr' Change-Id: Ida9af2971924377efe2f49f435d79e109de2bdf4 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | | * | Doc/QtCore: use new signal/slot signature in snippetsChristian Ehrlicher2020-01-2615-65/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new signal/slot syntax in the snippets where possible. Also change some 0 to nullptr. Change-Id: Ie3da2721d3cec33704f73f4d39c06a767717b095 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | | * | QStringList: use local storage in removeDuplicates()Marc Mutz2020-01-263-6/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If available, use a C++17 std::pmr::unordered_set with a monotonic buffer resource and a 256-byte stack buffer to avoid the per-element allocations of QSet. Results on my machine: RESULT : tst_QStringList::removeDuplicates():"empty": - 0.00014 msecs per iteration (total: 74, iterations: 524288) + 0.000031 msecs per iteration (total: 66, iterations: 2097152) RESULT : tst_QStringList::removeDuplicates():"short-dup-0.00": - 0.00043 msecs per iteration (total: 57, iterations: 131072) + 0.00013 msecs per iteration (total: 69, iterations: 524288) RESULT : tst_QStringList::removeDuplicates():"short-dup-0.50": - 0.00049 msecs per iteration (total: 65, iterations: 131072) + 0.00032 msecs per iteration (total: 85, iterations: 262144) RESULT : tst_QStringList::removeDuplicates():"short-dup-0.66": - 0.00057 msecs per iteration (total: 75, iterations: 131072) + 0.00039 msecs per iteration (total: 52, iterations: 131072) RESULT : tst_QStringList::removeDuplicates():"short-dup-0.75": - 0.00064 msecs per iteration (total: 85, iterations: 131072) + 0.00048 msecs per iteration (total: 63, iterations: 131072) RESULT : tst_QStringList::removeDuplicates():"long-dup-0.00": - 0.083 msecs per iteration (total: 85, iterations: 1024) + 0.039 msecs per iteration (total: 80, iterations: 2048) RESULT : tst_QStringList::removeDuplicates():"long-dup-0.50": - 0.11 msecs per iteration (total: 58, iterations: 512) + 0.078 msecs per iteration (total: 80, iterations: 1024) RESULT : tst_QStringList::removeDuplicates():"long-dup-0.66": - 0.13 msecs per iteration (total: 70, iterations: 512) + 0.10 msecs per iteration (total: 53, iterations: 512) RESULT : tst_QStringList::removeDuplicates():"long-dup-0.75": - 0.16 msecs per iteration (total: 86, iterations: 512) + 0.13 msecs per iteration (total: 69, iterations: 512) When interpreting the data, take into account that each iteration contains _also_ a deep copy of the QStringList d/t the detach from 'input'. The pattern is used elsewhere in Qt, so I've put the class that implements the seen set into a private header file and used in some other places I found. Change-Id: I1f71a82008a16d5a3818f91f290ade21d837805e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * | QLabel: Allow pixmap() and picture() to return by-valueSze Howe Koh2020-01-262-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous versions of these functions that returned by-pointer are held over from Qt 1 times. They are inconsistent with the rest of the Qt API. [ChangeLog][QtWidgets][QLabel] QLabel::pixmap() and QLabel::picture() can now return by-value instead of by-pointer. Task-number: QTBUG-48701 Change-Id: I23ce319a7b1f757e1f4dec697551bb472e92fabf Reviewed-by: André Hartmann <aha_1980@gmx.de>
| | | * | CMake: Add Qt6 forward compatible CMake API and targetsAlexandru Croitor2020-01-252-1/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create Qt:: versionless targets for libraries and tools. So Qt::Core will link to Qt5::Core. Add additional feature properties to targets, with the same name they have in Qt6: QT_ENABLED_PUBLIC_FEATURES, QT_DISABLED_PUBLIC_FEATURES, QT_ENABLED_PRIVATE_FEATURES, QT_DISABLED_PRIVATE_FEATURES, to be forward-compatible with Qt6. Prefix properties with INTERFACE_ for interface libraries. Create functions with no major version in their prefix, so qt_foo instead of qt5_foo. The non-versioned functions will call the versioned functions, depending on the value of QT_DEFAULT_MAJOR_VERSION, which can be set by an application developer before finding the Qt package. Set QT_DEFAULT_MAJOR_VERSION to 5 if the value has not been defined in the current scope. Application developers can set QT_NO_CREATE_VERSIONLESS_FUNCTIONS to TRUE before calling find_package(Qt5) to suppress creation of the non-versioned functions. Application developers can set QT_NO_CREATE_VERSIONLESS_TARGETS to TRUE before calling find_package(Qt5) to suppress creation of the non-versioned targets. Setting these can be useful when both find_package(Qt5) and find_package(Qt6) are in the same project. If none of these are set by the user, then the first find_package(Qt5) will create versionless targets with the major version being "5", which means the second find_package(Qt6) will not create versionless targets. Handle versionless plugin names in qt_import_plugins, so both Qt::QCocoaIntegrationPlugin and Qt5/6::QCocoaIntegrationPlugin are recognized by the function. Allow specifying multiple types in EXCLUDE_BY_TYPE in qt_import_plugins, to be consitent with the Qt 6 version. Make sure to set the QT_PLUGIN_CLASS_NAME property to compatible with Qt 6. Task-number: QTBUG-74137 Task-number: QTBUG-80477 Change-Id: Ib89d090ea6f7794d7debd64f03f29da963a17ca7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | | * | Register QColorSpace as a QtGui metatypeAllan Sandfeld Jensen2020-01-252-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helps pass it through QVariant, and needed for QML support. Change-Id: Id161ff9b8f81ad55a7ee7a7c4c614bdf74bca4a1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | Fix some qdoc-warningsFriedemann Kleint2020-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/tools/qmap.cpp:1199: (qdoc) warning: Can't link to 'QMultiMap::unite()' src/gui/kernel/qevent.cpp:949: (qdoc) warning: Unknown command '\see' src/gui/painting/qpaintengine_raster.cpp:344: (qdoc) warning: clang found diagnostics parsing \fn Type QRasterPaintEngine::type() const error: unknown type name 'Type' src/gui/doc/src/qtgui.qdoc:45: (qdoc) warning: Can't link to 'Build with CMake' examples/widgets/doc/src/gallery.qdoc:28: (qdoc) warning: Cannot find file 'widgets/gallery/gallery.pro' or 'widgets/gallery/gallery.pyproject' src/widgets/kernel/qwidget.cpp:5950: (qdoc) warning: Can't link to 'setFilePath' src/widgets/kernel/qshortcut.cpp:542: (qdoc) warning: No such parameter 'context' in QShortcut::QShortcut() Change-Id: I2395af854efebef719d4762da466f69f7c5aab9e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | * | Introduce Q_PROPERTY attribute REQUIREDFabian Kosmale2020-01-235-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is meant to correspond to required properties in QML. Change-Id: I2645981e13f7423bc86b48370c165b3cfe2aaa62 Task-number: QTBUG-81561 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * | Replace most use of QVariant::type and occurrences of QVariant::TypeOlivier Goffart2020-01-2315-393/+393
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I made a clazy automated check that replaced the use of QVariant::Type by the equivalent in QMetaType. This has been deprecated since Qt 5.0, but many uses were not yet removed. In addition, there was some manual changes to fix the compilation errors. Adapted the Private API of QDateTimeParser and QMimeDataPrivate and adjust QDateTimeEdit and QSpinBox. QVariant(QVariant::Invalid) in qstylesheet made no sense. But note that in QVariant::save, we actually wanted to use the non-user type. In the SQL module, many changes were actually reverted because the API still expects QVarient::Type. Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | | QProcess: remove deprecated signature of finished signalVitaly Fanaskov2020-01-282-21/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-80906 Change-Id: Ic9852bc5031d357d23ff6c13a65d020a4b6ea3d6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | | Only add --automoc-json to AUTOMOC_OPTIONS for metatypes targetsLeander Beernaert2020-01-291-0/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I7c2e859a83ea78c2a6cf2ad59c175c1b29a74621 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Skip processing '-framework' flags in qt6_generate_meta_types_dep_fileAlexandru Croitor2020-01-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we get generation errors due to calling GENEX_EVAL on something that is an invalid target. Perhaps there will be a better way once https://gitlab.kitware.com/cmake/cmake/issues/20287 is fixed. Change-Id: I6af9511cbb9942b9edbc3b3fc7028936308715d8 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Generate metatypes dependency fileLeander Beernaert2020-01-291-4/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to generator expression it is impossible to recursively evaluate the link dependencies of a target. This is required by QtDeclarative's qmltyperegistrar. To overcome this we generate a ${target}_metatypes_dep.txt file which contain lines with the following pattern: ${PATH_TO_METATYPES.json}=${PATH_TO_METATYPES_DEP.txt} This can be used to recursively evaluate the dependencies at run time. Change-Id: Ia4cee0632c16ba9631e0289db906fe9d320844a3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | | | Fix qt_import_plugins compatibility with Qt 5Alexandru Croitor2020-01-271-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle versionless plugin names passed to qt_import_plugins. Task-number: QTBUG-74137 Task-number: QTBUG-80477 Change-Id: Ic7fb6e54d2822c7eb58a7874b4a1c137f0c101d9 Reviewed-by: Qt CMake Build Bot Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | | | CMake: Add Qt 5 backward compatible CMake APIAlexandru Croitor2020-01-272-31/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create versionless function names, that coincide with the Qt 5 CMake API. Task-number: QTBUG-74137 Task-number: QTBUG-80477 Change-Id: I8559b2c8a49b23e5a89ec81603aaec54ea634d70 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Add initial support for CMake "Ninja Multi-Config" generatorAlexandru Croitor2020-01-271-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows doing debug_and_release builds with Ninja on all platforms. The "Ninja Multi-Config generator" is available starting with CMake 3.17. Desired configurations can be set via CMAKE_CONFIGURATION_TYPES. Possible values: "Release, Debug, RelWithDebInfo, MinRelSize". For example -DCMAKE_CONFIGURATION_TYPES="Release;Debug". The first configuration is the 'default' configuration which is built when calling ninja with no arguments. To build all targets of a certain configuration use "ninja all:Release" or "ninja all:Debug". To build all targets in all configurations use "ninja all:all". Note that the first configuration influences which configuration of tools will be used when building the libraries for all configurations. In simple terms, when configured with -DCMAKE_CONFIGURATION_TYPES="Release;Debug" the release version of moc is used by AUTOMOC. When configured with -DCMAKE_CONFIGURATION_TYPES="Debug;Release" the debug version of moc is used by AUTOMOC. Framework builds and Ninja Multi-Config don't currently work together due to multiple bugs in CMake, which ends up generating an invalid ninja file with duplicate rules. There are also issues with placement of the debug artifacts. This will be handled in a follow up patch after CMake is fixed. Task-number: QTBUG-76899 Change-Id: If224adc0b71b7d1d6606738101536146aa866cd7 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* | | | Post Merge FixesLeander Beernaert2020-01-243-26/+132
| | | | | | | | | | | | | | | | | | | | Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-24242-6176/+9113
|\| | | | | | | | | | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-1910-227/+335
| |\| | | | | | | | | | | | | | Change-Id: I68702c9f9680772d332b5bb777ddd2663168abd5
| | * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-187-42/+72
| | |\ \
| | | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-187-42/+72
| | | |\| | | | | | | | | | | | | | | | Change-Id: I12148e7b20bcdb72d9b328035d528c99633b1e92
| | | | * Doc: Fix qdoc compilation errors qtbaseNico Vertriest2020-01-175-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | | | * Fix MS-Win system locale code to return QString for numeric tokensEdward Welbourne2020-01-161-35/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSystemLocale::query() is specified to return a QString (wrapped in a QVariant) for the various tokens used in formatting numbers (zero digit, signs, separators) but the MS-Win back-end was returning QChar (wrapped as QVariant) instead, using the first UCS-2 code-point of the string (even if this was the first of a surrogate pair). The same error shall be perpetrated by its caller, but we can at least DTRT in the back-end, ready for the coming fix (in Qt 6) to its caller. In the process, eliminate some local variables that shadowed a member variable and adapt number-conversion to cope with surrogate-pair digits. Optimised the latter for the case where zero is "0". Change-Id: Idfb416c301add4c961dde613b3dc28b2e31fd0af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * QRegularExpression: fixup docs of wildcardToRegularExpressionGiuseppe D'Angelo2020-01-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a couple of typos, and add a paragraph explaining that there is no need of anchor the pattern again; a wildcard is always anchored. Fixes: QTBUG-81396 Change-Id: Ia67dc7477a05a450bdcc3def1ebbacce2006da4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | QMap: deprecate insertMulti, unite and friendsMårten Nordheim2020-01-172-184/+262
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | insertMulti and unite will silently transform a QMap into a multi-map which is not behavior we want to keep around anymore and as such is being deprecated. QMap functions that only make sense in a multi-map scenario are also deprecated and the implementation is moved to QMultiMap where it makes sense. Use QMultiMap if multiple keys are desired and insert(const QMap &) if a non multi-map-converting unite is desired. [ChangeLog][QtCore][QMap] insertMulti(), unite(), values(Key), uniqueKeys(), count(Key) is now deprecated. Please use QMultiMap instead. Task-number: QTBUG-35544 Change-Id: I158c938ceefb5aaba0e6e7513b2c26a64d29d521 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Do not anchor an already-anchored regexpGiuseppe D'Angelo2020-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wildcardToRegularExpression() returns an anchored regexp, so it is pointless to anchor it again. Change-Id: If470179d63ae7ca2e7f137c0f403ec5bb5be8aaf Task-number: QTBUG-81396 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
| * | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-01-1711-87/+191
| |\ \ \
| | * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-1611-87/+191
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qshortcut.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
| | | * | QResource: Add API to get the decompressed contentThiago Macieira2020-01-152-63/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QResource] Added uncompressedSize() and uncompressedData(), which will perform any required decompression on the data, prior to returning (unlike data() and size()). Change-Id: Ief874765cd7b43798de3fffd15aa053bc505dcb1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-159-24/+33
| | | |\| | | | | | | | | | | | | | | | Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
| | | | * Doc: Correct non-link related qdoc compilation errorsNico Vertriest2020-01-145-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I94dc566c9fb11bc8c598c0d5c043b6f388ebdc80 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | | | * Do fewer calendrical calculations in QDateTimeParser::setDigit()Edward Welbourne2020-01-141-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was calling a QDate's year(), month() and day() methods, each of which repeats most of the same calendrical calculations; and the same results can be obtained from the calendar's partsFromDate() all in one go. This also reduces the number of local variables needed. Change-Id: I8f84e66a5f677f55cb2113c56ebbdf7c2517e828 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * Doc: Don't document QTextStreamManipulatorPaul Wicking2020-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-81002 Change-Id: Ic7d0516a25a8a6e63e1a305ca87498948d41013c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | | | * ICC compile-fix for __builtin_add_overflow()'s parameter typeEdward Welbourne2020-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Glen Johnson's patch, but rearranged to avoid repetition. Fixes: QTBUG-81248 Change-Id: I9c23ab233ebd5514bc05fd155999597ada7295ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | | * qglobal.h: remove non-ASCII quotes from commentThiago Macieira2020-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because MSVC warns. Added by me on commit. c496fee2a5b65fd1b0672923293db058486e350e Fixes: QTBUG-81310 Change-Id: I596aec77785a4e4e84d5fffd15e93a8e367e035e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>