summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Fix mis-guided init() in default QAndroidTimeZonePrivate constructorEdward Welbourne2019-11-271-8/+8
| | | | | | | | | | | | | It set the time-zone member sensibly to the default zone, but then called init("UTC"), which over-wrote that default with UTC. This had no visible effect (as the default-constructed object is only used to access methods that (though virtual) are effectively static), but was needlessly complicated. Tidied up systemTimeZoneId() at the same time. Change-Id: I897aff16855c28487a1029bef50c75ebc1ff5b55 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Sanitize QAndroidTimeZonePrivate::init()Edward Welbourne2019-11-271-17/+19
| | | | | | | | | | | | | | | | | | | | | | It was setting the system zone ID if it somehow managed to find a match for an empty zone name; that makes no sense. A case-insensitive comparison seems reasonable for the "this isn't just a default zone object, used because the name I asked for isn't recognized" check. It set m_id after it had checked everything, where it could just as well have used m_id as the variable in which to record whether its check has succeeded already. It was using the name it was asked for, rather than the one this ended up being mapped to, which is probably a better name to use for it. (This should only differ in case.) Split a long line. Change-Id: I41a3b01ba99522ee68f3d7941c532019b9ebf946 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Permit leading space at start of RFC 2822 Date formatEdward Welbourne2019-11-271-2/+2
| | | | | | | Relevant RFCs explicitly permit such space. Change-Id: I8eb444e96287368cbbf973c77513b43d1d36f972 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make Qt::RFC2822Date's doc match up with its implementationEdward Welbourne2019-11-272-6/+14
| | | | | | | | | | | | | | | | | | The qdatetime implementation's rfcDateImpl() uses regexes which did not match its comments; nor did either the regexes or the comments match what was documented. A review of relevant RFCs suggests we should revise this in future, probably at Qt 6. The documentation also only addressed the formats recognized when parsing a date-time, without indicating how they are serialised or how dates and times are handled separately. Added a note to the tests for the read-only formats, to remind the reader that the RFCs merely recommend recognising these - be permissive in what you expect and strict in what you deliver. Change-Id: I0f0bec752e7a50bde98cceceb7e0d11be15c6a6f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Qt5CoreMacros: properly check the CMake versionBen Boeckel2019-11-261-1/+1
| | | | | | | | | The POSITION_INDEPENDENT_CODE property was introduced in 2.8.12, so use it in versions newer than 2.8.12. Fixes: QTBUG-79671 Change-Id: If7f023e80964f2e47edc35eee617b51aeecbf032 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix qdoc include paths for QStandardPathsFriedemann Kleint2019-11-261-7/+7
| | | | | | | | | | | | | | | | | Amends c30ffe1d33e6f48fa94e2003d7c9b17f4c83a6e9. Fix src/corelib/io/qstandardpaths.cpp:361: (qdoc) warning: Cannot find qdoc include file 'standardpath/functiondoc.qdocinc' src/corelib/io/qstandardpaths.cpp:368: (qdoc) warning: Cannot find qdoc include file 'standardpath/functiondoc.qdocinc' src/corelib/io/qstandardpaths.cpp:392: (qdoc) warning: Cannot find qdoc include file 'standardpath/functiondoc.qdocinc' src/corelib/io/qstandardpaths.cpp:406: (qdoc) warning: Cannot find qdoc include file 'standardpath/functiondoc.qdocinc' src/corelib/io/qstandardpaths.cpp:479: (qdoc) warning: Cannot find qdoc include file 'standardpath/functiondoc.qdocinc' src/corelib/io/qstandardpaths.cpp:537: (qdoc) warning: Cannot find qdoc include file 'standardpath/functiondoc.qdocinc' src/corelib/io/qstandardpaths.cpp:594: (qdoc) warning: Cannot find qdoc include file 'standardpath/functiondoc.qdocinc' Task-number: QTBUG-79827 Change-Id: I8eb0ae7bc167151979c729964d2dc3f171e10568 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QGb18030Codec: fix out-of-bounds access when decoding surrogate pairsThiago Macieira2019-11-261-1/+0
| | | | | | | | | This is already the second surrogate of the pair, there's no need to + +i. Fixes: QTBUG-80268 Change-Id: Ia2aa807ffa8a4c798425fffd15d9a48ee0ca8ed7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QCborValue: Extend the constructor to also create extended typesThiago Macieira2019-11-231-74/+83
| | | | | | | | | | | | | | | We already did that when parsing from CBOR binary data, so the code was already present. [ChangeLog][QtCore][QCborValue] The constructor taking a CBOR tag and a value to be tagged now attempts to convert to a QCborValue extended type. For example, if the tag is 0 (UnixTime_t) and the payload is a number, the resulting object will become tag 1 (DateTime) and the payload will be the the ISO-8601 date/time string. Fixes: QTBUG-79196 Change-Id: I6edce5101800424a8093fffd15cdf650fb2fc45c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QCborValue::toCbor with non-ASCII URLsThiago Macieira2019-11-231-5/+5
| | | | | | | Found while fixing QTBUG-79196. Change-Id: Ia2aa807ffa8a4c798425fffd15d841657def99af Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QSortFilterProxyModel: Add change signals for propertiesKai Uwe Broulik2019-11-222-6/+22
| | | | | | | | | | Makes it more easily consumable from QML. This patch only adds them for properties where no behavior change (i.e. no "if (m_foo == foo) return" changes) is necessary. The other ones will be done in a follow-up patch. Change-Id: If9f35cf9ac382e6f626db138a88eb14cebda1d52 Reviewed-by: David Faure <david.faure@kdab.com>
* QTemporaryFile: Add a note about behavior on LinuxAndre Hartmann2019-11-201-0/+6
| | | | | | | | | | Mostly copied from the 5.10 changelog file. Task-number: QTBUG-80157 Change-Id: I58654fe998ada603241b9a7cb967f55e66ebc954 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Tomasz Siekierda <sierdzio@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Move the common documentation to a qdocincVenugopal Shivashankar2019-11-181-59/+7
| | | | | | | | | | The member functions of QStandardPath and Qt.labs.platform.StandardPath behave the same, so it's ideal to maintain their documentation in one place. Task-number: QTBUG-79827 Change-Id: I349dbb85cd9b6a3bedac329c0707fc07057cd64b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Change the QtCore library output to show the plugin pathThiago Macieira2019-11-181-2/+2
| | | | | | | | | It's a lot more useful than the include dir. It actually helps debug problems. Change-Id: I1496b069cc534f1a838dfffd15ca07fe8ad1c8c6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Allow longer time-zone components on AndroidEdward Welbourne2019-11-141-0/+6
| | | | | | | | | | | | | | | Android uses its own time-zone naming, which includes a zone called "Canada/East-Saskatchewan", whose second component is 17 characters long. This violates a rule in the IANA naming scheme for zones, that limits components to 14 characters each. So tweak the isValidId() check to allow Android its long names. Android has added Outer Mongolian time-zones, which are as borked as many others in 1970, so blacklist those transitionEachZone() tests. Fixes: QTBUG-69128 Change-Id: I46f674f095431335b16900860d83b624257ae3bb Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-11-131-1/+1
|\ | | | | | | | | | | | | | | Conflicts: examples/widgets/widgets/scribble/mainwindow.cpp This amends cb54c16584cf3be746a1a536c1e37cb3022a2f1b. Change-Id: Iaae60a893330524b2973917e23b31f9d51f8bd38
| * Fix typo in QLoggingCategory documentationMitch Curtis2019-11-061-1/+1
| | | | | | | | | | Change-Id: Id147e6f4c25a75eed5456390819f340d8d20172c Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | Do not load plugin from the $PWDOlivier Goffart2019-11-111-1/+0
| | | | | | | | | | | | | | | | I see no reason why this would make sense to look for plugins in the current directory. And when there are plugins there, it may actually be wrong Change-Id: I5f5aa168021fedddafce90effde0d5762cd0c4c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Rationalize descriptions of date-time formatsEdward Welbourne2019-11-071-154/+61
| | | | | | | | | | | | | | | | | | | | Document QDateTime's methods by reference to QDate and QTime, to avoid repetition. Use consistent descriptions between toString() and fromString(), in each case. Document the truth: various things were simply wrong, in at least some copies. Change-Id: Ie80017250cd470f65733f96d182ed7d043694f0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Qt Forward Merge Bot2019-11-061-1/+1
|\ \
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-061-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/features/mac/default_post.prf src/corelib/tools/qsimd_p.h src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm util/qfloat16-tables/gen_qfloat16_tables.cpp Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
| | * Merge remote-tracking branch 'origin/5.13.2' into 5.13Qt Forward Merge Bot2019-10-301-1/+1
| | |\ | | | | | | | | | | | | Change-Id: Ieb5afc87086758119bcfc8efbe355f5c0a93fc04
| | | * Merge 5.13 into 5.13.2Frederik Gladhorn2019-10-113-2/+9
| | | |\ | | | | | | | | | | | | | | | Change-Id: Id8852e90bfc5e4bd3e344435195992c5c7a0ab86
| | | * | Fix build: disable the HWRNG in bootstrapped modeThiago Macieira2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmake build fails: qrandom.o: in function `QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*)': /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/global/qrandom.cpp:333: undefined reference to `qRandomCpu(void*, long long)' Fixes: QTBUG-78937 Change-Id: Ib5d667bf77a740c28d2efffd15cb4236f765917c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | | Fix a -Wclass-memaccess problem in qjsonVille Voutilainen2019-10-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/serialization/qjson_p.h:230:38: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of type ‘QJsonPrivate::qle_ushort’ {aka ‘class QSpecialInteger<QLittleEndianStorageType<short unsigned int> >’} with ‘private’ member ‘QSpecialInteger<QLittleEndianStorageType<short unsigned int> >::val’ from an array of ‘const class QChar’; use assignment or copy-initialization instead [-Werror=class-memaccess] 230 | str.length()*sizeof(ushort)); | ^ Change-Id: Ie58e7fe4bae3003227364012ad56ab23bd560d8c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Make QDir::cleanPath documentation less misleadingVolker Hilsheimer2019-11-061-2/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code doesn't convert anything that might be a separator on other platforms (most notably, '\') to '/', it only replaces platform-native separators (i.e. '\' if running on Windows) with '/'. Change-Id: I2e241b88b8bd271dfa5d7db61402fe8ef9a6bb6f Fixes: QTBUG-79736 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | QProcess: explicitly mark QProcess::error() as deprecatedChristian Ehrlicher2019-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signal QProcess::error() was deprecated in Qt5.6 but not annotated with QT_DEPRECATED_X. Change-Id: I9dd11c9b8019a0554cb82d6acb6b7e0a01c78123 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | | QFile::decodeName(const char *): don't construct QByteArray but use the ↵Adam Sowa2019-11-011-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument directly Use QString::fromLocal8Bit(const QByteArray &str) instead of constructing QByteArray to avoid memory allocation and strcpy. Change-Id: I32bbb47fbc45681c621adaebe8f8574d8f8ad6bf Fixes: QTBUG-79644 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Doc: Remove empty section title from QMilankovicCalendarTopi Reinio2019-10-311-2/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I01b311cbe67fbb89625beb5a3941a652c9e851ed Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Doc: Clarify the ownership of a state for addState()Kavindra Palaraja2019-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibe498c5288faa478a4dba934bc3c403829b337db Fixes: QTBUG-62445 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | CMake: Fix androiddeployqt support when using add_library MODULEAlexandru Croitor2019-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent change to support android with CMake assumes that the user project will have add_library(foo SHARED), and sets the CMAKE_SHARED_LIBRARY_SUFFIX_CXX variable to modify the final library name to contain an ABI suffix. This did not work when using add_library(foo MODULE), and androiddeployqt failed saying it can't find the application binary. Make sure to apply the ABI suffix to MODULE targets. Also cover the suffix to be added regardless if the language used for compiling the SO is C or C++. Amends 52c799ed4425076df4353c02950ea1444fe5f102 Change-Id: Ic44d67e33a123bd0104d98b368ceda0844474980 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | | no-thread: Add dummy implementations for stackSize functions in QThreadEskil Abrahamsen Blomfeldt2019-10-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently added a call to setStackSize() in the QML thread, which revealed that the dummy implementation for this function was missing in no-thread builds. Fixes: QTBUG-79571 Change-Id: Ibabb48d9cba73afda0842642045a2961e65523f9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | Update public suffix list to latest versionEdward Welbourne2019-10-252-13712/+13877
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] Updated DNS public suffix list Task-number: QTBUG-79418 Change-Id: I02dbe2b1f5b5f3e4a1ed4fde60ee71f5b0a50cb5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Android: Add multi-abi support for CMakeCristian Adam2019-10-254-1/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds ANDROID_BUILD_ABI_<abi> CMake options, which when enabled will determine CMake to build the current project with the enabled ABI settings. When building with CMake and the official Android CMake toolchain one needs to specify the Qt base directory as an argument to CMAKE_FIND_ROOT_PATH, which contains the Android NDK sysroot set by the toolchain. CMake will consider directories that contain this base path as valid directories to search packages. In the developer build case we have to append "lib/cmake" because the Qt base directory passed as CMAKE_FIND_ROOT_PATH will be the same directory as the developer build base, and will not be considered. Change-Id: I180502032c8ea1105bde2456252b367497f511d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | | Disable Clang warning for 'using namespace' in qtextstream.hJüri Valdmann2019-10-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header file intentionally puts a 'using namespace' into the global namespace, the artful cleverness of which Clang doesn't properly appreciate. Teach Clang a lesson by disabling the warning. Change-Id: I9754ac5fc9d4c53654854082e1145d8b5fef186d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Update CLDR to v36Edward Welbourne2019-10-258-6052/+6190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Released on October 4th. Adds Windows names for two time zones, Qyzylorda and Volgograd. Added languages Chickasaw (cic), Muscogee (mus) and Silesian (szl). Norwegian number formatting has flipped back to using colon rather than dot as time separator; it's flipped back and forth over the last several CLDR releases. The dot form is present as a variant, the colon form was long given as the normal pattern, then went away; but now it's back as a contributed draft and that's what we pick up. The MS-Win time-zone ID script was iterating a dict, causing random reshuffling when new entries are added. Fixed that by doing the critical iteration in sorted order. Omitted locales ccp_BD and ccp_IN due to QTBUG-69324. Task-number: QTBUG-79418 Change-Id: I43869ee1810ecc1fe876523947ddcbcddf4e550a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | QSet: Document to/from QVector transformation techniquesSamuel Gaist2019-10-246-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2a2ff6332bd6e8ed3d4ba7b4765da0a94a06f133 Fixes: QTBUG-71067 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | QFileSystemEngine: Consistently check for invalid file namesUlf Hermann2019-10-243-34/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stat() and friends expect a null-terminated C string. There is no way to generate anything useful from a string that has null bytes in the middle. It's important to catch this early, as otherwise, for example, a QDir::exists() on such a path can return true, as the path is silently truncated. Extend the checks for empty file names to windows and add checks for null bytes. Change-Id: Ie9794c3a7c4fd57f9a66bdbbab8b45a08b6f9170 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QStateMachine: Don't scream at the userRobert Loehning2019-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I171606d10985bc7338b0f24ceb142fc0d88e7932 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-244-61/+54
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_unix.cpp src/corelib/tools/qsharedpointer_impl.h tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
| * | | QEndian: do not use "raw" constexprGiuseppe D'Angelo2019-10-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the Qt's macros instead, since constexpr support may be revoked on certain compilers. Amends d26289ffb43a5fcf34e855db1dfbf42aa03c4f5a. Change-Id: I62354b14b57ae5fcbf3f1186ddb48bcf26535e90 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | Use arrays rather than assigning literals to char* (warning-fix)Edward Welbourne2019-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrity has a hack, to let us link to the library mmap is in, that depends on two extern "C" symbols of type char *; but assigning a string literal to a char * variable as initializer is a const-ness violation (as the Integrity compiler does point out), so change the two variables to be char[] instead of char *, so that the literals populate (and determine the size of) the arrays, instead. Change-Id: Iab34fb378bc0522e14539592ead066f068751ad0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | QStandardPaths: Correct handling for XDG_RUNTIME_DIRSamuli Piippo2019-10-121-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always try to create the runtime directory and never change the permissions of an existing directory. Conform to the XDG Base Directory Specification: "If, when attempting to write a file, the destination directory is non-existent an attempt should be made to create it with permission 0700. If the destination directory exists already the permissions should not be changed." Fixes: QTBUG-68338 Change-Id: Iaf854d69225fc46e43abae86232d749e5c247df0 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Q{Shared,Weak}Pointer: Reduce overload sets in implicit conversionsMilian Wolff2019-10-111-31/+20
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow implicit conversions when the types involved are compatible. That means, only allow construction and copy assignment when the type X* is convertible to type T*. This is done using SFINAE and the std::is_convertible type trait, which makes the previous QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete. This patch fixes compilation when a function is overloaded with Q{Shared,Weak}Pointer of different, incompatible types. Previously, this resulted in a compilation error due to an ambiguous overload. Change-Id: I069d22f3582e69842f14284d4f27827326597ca2 Fixes: QTBUG-75222 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QSortFilterProxyModel: Add a cheaper way to find source_sort_columnUlf Hermann2019-10-181-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two places where we are only interested in the mapping of proxy to source sort column, rather than the full mapping. Creating the full mapping is rather expensive as it iterates all rows and columns and allocates a large number of objects. Just figuring out the n-th accepted column can be much cheaper. Fixes: QTBUG-41659 Change-Id: I7ea914cb695518b4d47cdc3ad67c7786380d8709 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Win32: Consolidate registry codeFriedemann Kleint2019-10-146-74/+253
| | | | | | | | | | | | | | | | | | | | | | | | Add a RAII class for registry keys and use it throughout the code base. Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Fix QEasingCurve possible imprecision at endpointsEirik Aavitsland2019-10-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the spline curves and (most of) the predefines curves are defined as having start value 0.0 and end value 1.0. The spline and In/OutBack functions would sometimes not produce that result precisely, so code could not reliably depend on expressions like (easedValue < 1.0) becoming false. Fix by explicitly handling endpoints. Fixes: QTBUG-76781 Fixes: QTBUG-72630 Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | | Distinguish invalid datetimes from othersEdward Welbourne2019-10-111-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed QDateTime is invalid, but compared equal to a valid one referencing the start of 1970. This lead to date properties in QML being initialized invalid but not getting an onChange if the first value they're set to is the start of 1970. Fixing that then lead to some tests failing. Indeed, the original equality check involved using toMSecsSinceEpoch(), whose value is undefined unless the datetime is valid, without a prior check on its validity: so ensure all uses of toMSecsSinceEpoch() are guarded with isValid() checks. Reworked tst_QDateTime::toSecsSinceEpoch() to use its bool column (previously unused, after separating from toTime_t(), which uses this column for "out of time_t's range") for validity of the datetime. [ChangeLog][QtCore][QDateTime] Invalid datetimes are now treated as equal and less than all valid ones. They could previously be found equal to valid datetimes. Fixes: QTBUG-79006 Change-Id: Ie72deb8af4350a5e808144d0f6e42dc8eb3ff5ef Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix relocatable prefix for hardware-specific Linux buildsJoerg Bornemann2019-10-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.3.0 we recommend that Linux distributions place a SSE2-enabled copy of QtCore in a $PREFIX/lib/sse2 subdirectory (see Qt 5.3.0 changelog for details). Same for other hardware capabilities like AVX2 and AVX512. This use case was broken with the introduction of the 'relocatable' feature, because the prefix is determined from the location of libQt5Core.so and the relative path from libdir to prefix, which is baked in at configure time. We now try to locate the libdir below the prefix, and if that fails try again in the upper directories. Fixes: QTBUG-78948 Change-Id: Ieec6e1484974e19335cf08ae0df3ee5c0e316d28 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-10-102-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.h src/src.pro Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
| * | Include XDG font locations in QStandardPaths::FontsLocation on LinuxAlex Henrie2019-10-082-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ~/.fonts was deprecated in 2012, see https://wiki.archlinux.org/index.php/Font_configuration#Fontconfig_configuration Few people keep fonts there anymore. Change-Id: Ide048e1df2c2db4856a38c574df36663ab684f89 Reviewed-by: David Faure <david.faure@kdab.com>