summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | QTextCodec: try to work around an ICC 19 bugMarc Mutz2019-10-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICC 19 barfs on the TextCodecsMutexLocker class because it doesn't have a user-provided default ctor: ../../corelib/codecs/qtextcodec.cpp(543): error #854: const variable locker requires an initializer -- class TextCodecsMutexLocker has no user-provided default constructor [...] But the class doesn't have members that would delete the implictly-declared default ctor, so no user-provided default ctor should be necessary: The only member is the result of qt_unique_lock(), which is std::unique_lock, which does have a default ctor. We conclude that this is a compiler bug, and work around it with the introduction of a user-provided default ctor. Fix brace placement as a drive-by. Fixes: QTBUG-78844 Change-Id: I1f5a326afd68138fbebad506ba9aa1926f1afb85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSysInfo::prettyProductName(): Fix up dc042c6deea7e90b4a9dfcffdc33cbe61df421bdFriedemann Kleint2019-10-041-6/+5
| | | | | | | | | | | | | | | | | | - Fix indentation - Fix empty name returned for WinRT. - Remove duplicated string "Version" for Windows 10 Change-Id: Ia093006a6f8d8c88257d6b4e31afa37510dc6037 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Include likely-adjusted uiLanguages for the system localeEdward Welbourne2019-10-042-16/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLocale::uiLanguages() on the system locale uses whatever the system locale's query(QSystemLocale::UILanguages,...) returns. On Android, this is just a list of locales. However, for non-system locales, we also include some results of removing likely sub-tags from the locale name, where equivalent. Thus zh-CN would also get zh and zh-Hans-CN added to it; however, if the system locale is zh-Hans-CN, the shorter forms are omitted. So post-process the system locale list in the same way, albeit tweaked to avoid duplicates and rearranged so that we can insert likely-adjusted entries between what they adjust and what followed it. Added QLocalePrivate::rawName() in the process, since it looks likely to be useful in other contexts (and I needed its value): it just joins such tags as are non-Any. This, however, uses QByteArrayList, so added that (it's small) to the bootstrap library and qmake. This follows up on commit 8796e3016fae1672e727e2fa4e48f671a0c667ba. [ChangeLog][QtCore][QLocale] The system locale's UI languages list now includes, as for that of an ordinary locale, the results of adding likely sub-tags from each locale name, and of removing some, where this doesn't change which locale is specified. This gives searches for translation files a better chance of finding a suitable file. Fixes: QTBUG-75413 Change-Id: Iaafd79aac6a0fdd5f44aed16e445e84a2267c9da Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Simplify creating QCFTypes from CFTypeRefsTor Arne Vestbø2019-10-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of forcing the user to cast: QCFType<CFFooRef> foo = (CFFooRef)CFFunctionReturningCFTypeRef()); We can do it for them, since we already know the expected type: auto foo = QCFType<CFFooRef>(CFFunctionReturningCFTypeRef)); Change-Id: I994d5d6530f220288b4bfd6ab16eae9f159ce3ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Add explicit QDebug stream operator for QCFStringTor Arne Vestbø2019-10-042-0/+7
| | | | | | | | | | | | | | Disambiguates between the QString and CFStringRef overloads. Change-Id: I55a7121cd7449b4adc081f6bb7e29736e7af4442 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | macOS: Add missing export of QDebug stream operator for QMacAutoReleasePoolTor Arne Vestbø2019-10-041-1/+1
| | | | | | | | | | | | Change-Id: Id3e140bd91dcbf2683a41cd9ac36ff79b8f365b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix unused function warning for prefixFromQtCoreLibraryHelperTor Arne Vestbø2019-10-041-0/+3
| | | | | | | | | | | | Change-Id: Iedbe0e9363b6bd97071b38aa1d4546777b34139d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | CMake: generate moc files for headers using Q_NAMESPACE_EXPORT tooDavid Faure2019-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f66c1db16c050c introduced Q_NAMESPACE_EXPORT and cmake automoc needs to be told to trigger moc creation for headers using that. The default value for this variable, from cmake's Modules/CMakeGenericSystem.cmake is set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_NAMESPACE") But it makes more sense to set this here than in upstream cmake, anyway, given that changes to this list happen here in qtbase. Change-Id: I07c85fd0bb5e03e98df7687a8663e28620e1fdb6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | docs: Mark QPair and QLatin1Char as reentrantKavindra Palaraja2019-10-042-0/+2
| | | | | | | | | | | | Change-Id: I7d37eb13809a6fa4d1c2c74fd8aea35bdf235996 Fixes: QTBUG-78552 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Convert a few sizeof(array)/sizeof(element0) fors to range forsAlbert Astals Cid2019-10-041-4/+3
| | | | | | | | | | | | | | | | Increases readability Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Qt Forward Merge Bot2019-10-042-2/+6
|\ \
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-042-2/+6
| |\| | | | | | | | | | Change-Id: I31c1c469c00016f1bd21ecfab39794df372e56f2
| | * Fix crash when running QtCore: Stack is misaligned on x86-64Thiago Macieira2019-10-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When our ELF entry point function is started by the kernel, the stack is aligned at 16 bytes. However, the stack is expected to be off by 8, due to a preceding CALL instruction which didn't exist. This cauases a crash further down as the compiler may generate aligned stack access. Change-Id: I1496b069cc534f1a838dfffd15c9dc4ef9e3869e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QList: make cast from ptrdiff_t to int explicitEdward Welbourne2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Amends ffc2d5722317fcab86865b11491d7bf7fef3e16d. Fixes: QTBUG-78235 Change-Id: Ie91d8d71c92bb62e3268847407b7b252c382d700 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Correct handling of -qfloat16(0)Edward Welbourne2019-10-032-3/+3
|/ / | | | | | | | | | | | | | | It is finite and normal; it classifies as a zero; and it should not be > qfloat16(0). Added tests to match. Change-Id: I7874fb54f622b4cdf28b0894050ad3e75cf5d77c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Export lcEventDispatcher in private namespaceTor Arne Vestbø2019-10-032-5/+12
| | | | | | | | | | | | | | | | | | The category is used outside of QtCore, and needs to be exported for shared library builds. Change-Id: I9bba477d37b823146eaec4e1e53197651f09c013 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Android: Fix plugins namingBogDan Vatra2019-10-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 5 doesn't extract the files from libs folder unless they are prefixed with "lib". This patch sets a proper name for the plugin which will make gdb happy and it will also avoid any name clashes. If we rename the plugins when we copy them, gdb won't find them, therefore it can't load their symbols. On Android all the libs are in a single folder, so to make sure we don't have any name clashes, we are prefixing the plugin name with it's relative path to qt folder (we replace / with _). Fixes: QTBUG-78616 Change-Id: I7e0e67d65448532769d69f46b1856c029e2cf5cb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Liang Qi2019-09-308-64/+168
|\ \
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-308-64/+168
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| | * QVarLengthArray: Avoid int vs. size_t warnings in operator=Laszlo Agocs2019-09-291-1/+1
| | | | | | | | | | | | | | | Change-Id: I879b62c55e4211d3e4e1a18f6699f26e3f5de1f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Windows/MinGW: Fix posted events timer not stoppingFriedemann Kleint2019-09-272-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specify the type of the enum value SendPostedEventsWindowsTimerId to be UINT_PTR to work with the g++ interpretation of enumeration signedness and use the correct type for the returned timer id. Fixes: QTBUG-78491 Change-Id: I7b3f306d3f60da7a21500ece5243ac90854ccf1a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix QRandomGenerator initialization on AMD CPUsDmitry Kazakov2019-09-264-51/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a failing random generation instruction, which always returns 0xffffffff, even when generation was "successful". This code checks if hardware random generator generates four consecutive equal numbers. If it does, then we probably have a failing one and should disable it completely. Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a Fixes: QTBUG-69423 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QFileInfo: clarify documentation about handling of symlink attributesThiago Macieira2019-09-251-11/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, shortcut ".lnk" files are treated as symlinks, and attribute queries on a shortcut file return the results for the shortcut target. Fixes: QTBUG-77523 Change-Id: I907a43cd9a714da288a2fffd15bada7eba37d3ba Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Doc: Q_FLAG should be applied to the enum, not the QFlagsThiago Macieira2019-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moc extracts he name that is inthe Q_FLAG macro and that gets used in qDebug(). As the documentation described, qDebug would have printed: QFlags<LoadHints>(QLibrary::ResolveAllSymbolsHint) which doesn't compile (though we could have partially specialized QFlags<QFlags<E>> to be QFlags<E>). The semantically correct output is: QFlags<LoadHint>(QLibrary::ResolveAllSymbolsHint) which is what this change gets. The ideal output would be: LoadHints(QLibrary::ResolveAllSymbolsHint) But that's not a doc change. Fixes: QTBUG-77216 Change-Id: I0635172f4f2a4c51a435fffd15b59a859886e90c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * Filesystem: avoid crashes on exit in case the locale codec is nullThiago Macieira2019-09-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On exit, QLocale::codecForLocale() can return null as the codec may have already been destroyed. In that case, pretend that Latin1 was the locale, so any file name is acceptable. This matches QString: QTextCodec *codec = QTextCodec::codecForLocale(); if (codec) return codec->toUnicode(str, size); #endif // textcodec return fromLatin1(str, size); Note that if we're wrong and the locale was *not* Latin1, files that you had a name to may not be encoded or decoded the same way. Fixes: QTBUG-78446 Change-Id: Iece6e011237e4ab284ecfffd15c54077728a17ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Featurize support for signaling NaNEdward Welbourne2019-09-304-3/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of our compilers for emscripten coerces all signaling NaNs to quiet ones, so won't do any actual signaling. Anyone relying on them to do so shall be disappointed, so it's better that they know about it at compile-time - or, at least, have the ability to find it out. Put the signaling NaN producers (and remaining (test) code using them) under the control of a feature that's disabled when numeric_limits claims double has no signaling NaN. Assume the bootstrap library doesn't need signaling NaNs. Sadly, until C++20 <bit>, there's no contexpr way to test that alleged signalling and quiet NaNs are actually distinct. Added some auto-tests for signaling NaN, including that it's distinct from quiet NaN. Any platform on which the last fails should disable this feature. Task-number: QTBUG-77967 Change-Id: I57e9d14bfe276732cd313887adc9acc354d88f08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace use of deprecated API in macOS event dispatchersTor Arne Vestbø2019-09-281-1/+1
| | | | | | | | | | | | Change-Id: I077ba12b406f662ba22b2f2cddf0171963335739 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Fix documentation of qfloat16Edward Welbourne2019-09-271-3/+44
| | | | | | | | | | | | | | Various methods were undocumented and even one that was lacked a \since 5.14 Change-Id: I1e65ed1bb9c5b9de06210d7e18af36539aafc4ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix doc of QDateTime::YearRange; include its \since 5.14Edward Welbourne2019-09-271-0/+1
| | | | | | | | | | Change-Id: I2e6c27953ecce95df3ac4868a6d953596ba115f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix QCalendar::isValid(): make it constEdward Welbourne2019-09-262-2/+11
| | | | | | | | | | | | | | | | Spotted in API change review, thanks to Albert Astals Cid. Also added documentation of this method. Change-Id: I2ef2c526a98b571a3cb3bb5f93d1952b1b0d63a9 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* | Windows: QSysInfo::prettyProductName(): Improve version formattingFriedemann Kleint2019-09-251-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Windows 10 and higher, the SP version and major/minor versions are not relevant any more; the release id (displayed by the winver tool as "Version" should be displayed instead. Add helpers and change the output accordingly. For Windows 7, output the build number. [ChangeLog][QtCore][Windows] QSysInfo::prettyProductName() now returns a version including the Windows 10 release id or Windows 7 build number respectively, resembling the version string displayed by the winver tool. Change-Id: Ia783272a0da234d2f7ff35c4a9a6fc296da277e0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | doc: add a note to QFileSystemWatcher about files saved by re-creationShawn Rutledge2019-09-231-0/+6
| | | | | | | | | | | | | | Fixes: QTBUG-46483 Fixes: QTBUG-53607 Change-Id: I434f177b35689d55aa1deea360bf7e6ae009ad68 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Fix crash when using signaldumper and sender is deletedMårten Nordheim2019-09-231-3/+4
| | | | | | | | | | | | | | | | Testlib's signaldumper functionality would crash inside testlib as it dereferenced the sender after it was deleted. Change-Id: I6013b75b0a121e2768429d8a3cf0339a940314f2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-231-8/+4
|\| | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
| * Doc: Remove broken example snippet from Q_ENUMSPaul Wicking2019-09-201-8/+4
| | | | | | | | | | | | | | | | | | | | | | The code snippet is used by both Q_ENUMS and Q_ENUM. Therefore, remove the example snippet from Q_ENUMS documentation, as it is obsolete. Also, move recommendation to use Q_ENUM in new code to the very top of Q_ENUMS' documentation. Fixes: QTBUG-63203 Change-Id: I12a9f45e0b3bd75dfe98e1ecbc45e299a688b80c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Android: Fix loading of pluginsBogDan Vatra2019-09-224-11/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5bb178c479a247720fbc3fbb7f06a32b725193ac, the Android platform plugin was moved from platforms/android to platforms/. The unforeseen consequence of this was that the plugin loader for plugins/platforms would now find it, whereas before it would be ignored. It would therefore be detected as the appropriate plugin, but since it was intended to be loaded as a static plugin, loading it dynamically would fail. Instead of fixing the static plugin loading, we remove this hack. Fixes: QTBUG-78440 Change-Id: Idcb6c075fdebaf67644f32a59d7aaf0d1c0bbe20 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Revert "QReadWriteLock: replace (QWaitCondition, QMutex) with ↵Jani Heikkinen2019-09-192-29/+22
| | | | | | | | | | | | | | | | | | | | | | std::(condition_variable, mutex)" This reverts commit 319c4786036b5f45fc95c683cef5cf5ba2ce2a6d. Reason for revert: QTBUG-78450 Change-Id: Ifaea83626296508558591d4ff207d4e0c883f841 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Enable debug plugin check for MinGW / Unix in debug_and_release modeCristian Adam2019-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | In the case when the Qt build is debug_and_release the debug plugin check should be enabled, otherwise the mixture of Qt debug and Qt release libraries will cause crashes (e.g. QTBUG-77431) Task-number: QTBUG-78445 Change-Id: Ice0b03e63ddad893334a0e1a4ede1f6ace83007b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix mis-handling of actual TLD in qIsEffectiveTLD()Edward Welbourne2019-09-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the domain passed down is an actual TLD that's the subject of a * rule, e.g. "ck" subject to *.ck, then we were finding no dot in it and concluding that it couldn't be the subject of a * rule. Added a test for the specific .ck case and commented on where we could get some canonical test data that I tripped over while researching this. Cross-reference the cookie-jar test from the QUrl test, too. Fixes: QTBUG-78097 Change-Id: Id858a9dae22e6b306a68df3fc199e0160f537159 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Reflow documentation after indentation changeEdward Welbourne2019-09-164-111/+117
| | | | | | | | | | | | | | | | Combining this with the indentation would be counted as mixing space changes with non-space changes, so they're separate. Change-Id: Iac57050717b1c4c86a253866c9a6cd5ea7add8f7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Standardize indentation of calendar code's documentationEdward Welbourne2019-09-164-263/+263
| | | | | | | | | | | | | | | | | | | | | | There was a haphazard mix of 4-space and 2-space indents. Use four spaces throughout. This commit includes no reflow (which is needed), as the inanity-bot will complain about the mixing of space changes with "non-space" changes if I do that. Change-Id: If55ab035da02d0770471e77ecfe00eb168a3da15 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | doc: Remove ifndef Q_QDOCMartin Smith2019-09-161-4/+0
| | | | | | | | | | | | | | qdoc needs to see these declarations now because... clang. Change-Id: I93264125db5bcea6adb1a4636e5459ec80702de1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Revert "Revert "Deprecate QAtomic::load() / store()""Giuseppe D'Angelo2019-09-161-4/+8
| | | | | | | | | | | | | | | | | | | | This reverts commit 5859f7d0d9440f82086486639a707f3935696cf4. Reason for revert: the blocker for qtdeclarative has been merged (in qtdeclarative/c060f6e765a2f155b38158f2ed73eac4aad37e02). Change-Id: Ie69cb1567417173f543e88f659658fe03ba28830 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Doc-fix: correct some misinformation about QDateTime's handling of DSTEdward Welbourne2019-09-131-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tidy up QDateTime::offsetFromUtc's doc, in the process. We don't take DST into account for dates before the epoch; that should be mentioned when saying we take DST into account. Also, referring to *this as the "current" time begs to be misunderstood. The \class comment also misleadingly claimed that we don't take into account any changes to time-zone before DST; where, in fact, we only ignore DST changes before 1970, not changes to standard offset. Change-Id: I090e668edf0338c825f5afcc67f894579a129c46 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | MS TZ data: avoid calculating a date in year 0Edward Welbourne2019-09-131-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no year 0 in the proleptic Gregorian calendar, so QDate() won't be happy if asked for a date in it. Tweak scanning of the data we get from MS-Win so as to avoid a date calculation that could otherwise happen in year 0 when constructing QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), QTimeZone("Australia/Sydney")). Added a test for this case, which Oliver Wolff has kindly verified does reproduce the assertion failure. However, Coin is unable to reproduce, as all its MS builds are configured with -release, so Q_ASSERT() does nothing. (The relevant code then skips over year 0, albeit for the wrong reasons, and gets the right results, albeit inefficiently, leaving no other symptom by which to detect the problem.) Fixes: QTBUG-78051 Change-Id: Ife8a7470e5bd450bc421e89b3f1e1211756fc889 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>