summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
* | QReadWriteLock: replace (QWaitCondition, QMutex) with ↵Marc Mutz2019-09-132-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::(condition_variable, mutex) It turns out that QWaitCondition is a std::condition_variable_any. The _any variant works with any mutex type, but requires a native mutex for the native condition variable. So, QWaitCondition and std::condition_variable_any both require two different mutexes: the one the user passes in, and an internal one. std::condition_variable, however, only works with std::mutex, and since both are backed by the native API, condition_variable can use the mutex passed in by the user instead of having to use an internal one. So, port from 2 × QWaitCondition + QMutex (2 × native cond + 2 × native mutex + Qt mutex) to std::condition_variable + std::mutex (2 × native cond + native mutex), shaving the overhead of two additional mutexes (one Qt, one native) as well as the memory allocation performed by QWaitCondition (for its Private). Speeds up the writeOnly case by ~1/8th: PASS : tst_QReadWriteLock::writeOnly(QReadWriteLock) RESULT : tst_QReadWriteLock::writeOnly():"QReadWriteLock": - 39,703 msecs per iteration (total: 39,703, iterations: 1) + 34,950 msecs per iteration (total: 34,950, iterations: 1) Change-Id: I196cb13a27242fc1cb99723dfab5b2e5f8522143 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Port QReadWriteLock from QMutexLocker to qt_unique_lockMarc Mutz2019-09-131-6/+7
| | | | | | | | | | | | | | | | | | Most of these are unique_locks because they call QWaitCondition::wait() and it doesn't feel right to use qt_scoped_lock if the lock is dropped within the scope. Change-Id: I506eede63008dad135c21112e578da4f7684e528 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QPointer: some simplificationsMarc Mutz2019-09-131-12/+3
| | | | | | | | | | | | | | | | | | | | | | - don't write explicit meta functions, use std::conditional - = default the default ctor The class is already not trivially-copyable, so making the default ctor trivial doesn't change the ABI. Change-Id: I8e35bbbb35973c9ff8fc48dfbfc10061de4bfd30 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QTranslator doc: use QCoreApplication::installTranslator()Christian Ehrlicher2019-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The example snippet was using app.installTranslator() even installTranslator() is a static function. And since app is a QApplication instead a QCoreApplication this could lead to the assumption that a QTranslator can only be used for gui applications. Therefore use the correct static invocation QCoreApplication::installTranslator(). Change-Id: Ia3ce00f25230c2fe2bdc159ec14c88c961924651 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QCoreApplication: work towards replacing a QRecursiveMutex with a QMutexMarc Mutz2019-09-122-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At first glance, libraryPathMutex is only recursive because setLibraryPaths(), addLibraryPath() and removeLibraryPath(), all of which lock libraryPathMutex, may call libraryPaths(), which does, too. This is easily fixed by splitting libraryPaths() into public libraryPaths() and private libraryPathsLocked(), the latter expecting to be called with the libraryPathMutex already held. And this is what this patch does. However, on second glance, the building of the initial app_libpaths calls a monstrous amount of code, incl. QLibraryInfo, and some of that code probably re-enters one of the library-path functions. So while this patch is a step towards making libraryPathMutex non-recursive, it's probably not the end. Change-Id: I3ed83272ace6966980cf8e1db877f24c89789da3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QReadWriteLock: use NSDMI to simplify the Private ctorMarc Mutz2019-09-121-10/+8
| | | | | | | | | | | | Change-Id: I7267dedb152186ad8c74cbf2eddd863c3bc0845f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Add qt.core.filesystemwatcher logging categoryShawn Rutledge2019-09-111-4/+9
| | | | | | | | | | | | | | | | QFileSystemWatcher has open bugs, so users should be able to help troubleshoot. Change-Id: I6b703e25f294944469d20fd36012b6a55133732a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix qdoc warningsFriedemann Kleint2019-09-103-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/global/qnamespace.qdoc:3279: (qdoc) warning: Can't link to 'QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()' src/corelib/time/qislamiccivilcalendar.cpp:49: (qdoc) warning: Can't link to 'QJijriCalendar' src/network/ssl/qsslsocket.cpp:1510: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/access/qhttp2configuration.cpp:49: (qdoc) warning: '\brief' statement does not end with a full stop. src/gui/text/qtextformat.cpp:532: (qdoc) warning: Undocumented enum item 'TableBorderCollapse' in QTextFormat::Property src/gui/text/qtextdocument.cpp:2066: (qdoc) warning: Undocumented enum item 'UnknownResource' in QTextDocument::ResourceType src/gui/kernel/qguiapplication.cpp:3500: (qdoc) warning: Undocumented parameter 'policy' in QGuiApplication::setHighDpiScaleFactorRoundingPolicy() Change-Id: I3573ef98cf9b58d16525c356270fe009fdffcf45 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-093-10/+15
|\| | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * QRandom: retry the use of RDRAND instruction as recommended by manualsThiago Macieira2019-09-081-7/+12
| | | | | | | | | | | | | | | | | | | | | | The Intel whitepaper[1] recommends retrying RDRAND some 10 times even after it fails, since the hardware has a fairness algorithm and reseeds itself quite quickly. [1] https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide Change-Id: I907a43cd9a714da288a2fffd15baafd88242d8b6 Reviewed-by: André Hartmann <aha_1980@gmx.de>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-2/+2
| |\ | | | | | | | | | Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
| | * qFatal: make it so you cannot disable the messageThiago Macieira2019-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solves a few recursion problems in Qt, since then we won't try to inspect the logging registry while creating the logging registry. Fixes: QTBUG-78007 Change-Id: I44cc9ee732f54d2380bafffd15c0f51c7140682e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge remote-tracking branch 'origin/5.13.1' into 5.13Qt Forward Merge Bot2019-09-051-1/+1
| |\ \ | | | | | | | | | | | | Change-Id: Ic633850940bbe17dcedc1609217a052b6f81ce4b
| | * | Revert "Disable debug plugin check for MinGW"Oliver Wolff2019-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch caused an error when loading applications built in debug mode with MinGW and thus has to be reverted. This reverts commit bba44746f9f2cfca785a309deb056033ae0bea6e. Fixes: QTBUG-77431 Change-Id: I3134878a742b304d10176cc8b0ed5ce06d4de53f Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | | Make Qt relocatableAlexandru Croitor2019-09-072-53/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore] Qt installations on the host system can now be relocated, i.e. moved to other directories. Add a new feature 'relocatable' that's by default enabled for non-static builds - on platforms where libdl is available, - on macOS when configured with -framework, - on Windows. If the feature is enabled, the directory where plugins, translations and other assets are loaded from is determined by the location of libQt5Core.so and the lib dir (bin dir on Windows) relative to the prefix. For static builds, the feature 'relocatable' is off by default. It can be turned on manually by passing -feature-relocatable to configure. In that case, QLibraryInfo::location(QLibraryInfo::TranslationsPaths) and friends will return paths rooted in the user application's directory. The installed and relocated qmake determines properties like QT_INSTALL_PREFIX and QT_HOST_PREFIX from the location of the qmake executable and the host bin dir relative to the host prefix. This is now always done, independent of the 'relocatable' feature. Note that qmake is currently only relocatable within an environment that has the same layout as the original build machine due to absolute paths to the original prefix in .prl, .pc and .la files. This will be addressed in a separate patch. Task-number: QTBUG-15234 Change-Id: I7319e2856d8fe17f277082d71216442f52580633 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Android: Fix cmake generatorBogDan Vatra2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-29859 Change-Id: Id0b5f9ab8b4866483361ba9f15cf51dc0d2627d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Clarify documentation of daysInMonth()Edward Welbourne2019-09-051-3/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I86258512c33cabec8d11ff3c794934f40850e413 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | Optimize QEventDispatcherWinRT::runOnMainThread()Marc Mutz2019-09-051-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use std::make_shared instead of QSharedPointer - two memory allocations saved - co-locate semaphore and HRESULT object in a single State object - one more memory allocation saved - pass the shared_ptr<State> by value into the runnable - two more memory allocations saved Not only is the new code much faster, it's also much more readable. Also use QSemaphoreReleaser, just in case the delegate should throw. Change-Id: Ib99b9da86984d440d10b72e3071aa88099e24a1f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | Refine QCalendar::hasYearZero()'s documentationEdward Welbourne2019-09-051-23/+23
| | | | | | | | | | | | | | | | | | | | Change-Id: I06697485c6be1c31998d0da54b357f3f5c8701e7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | Remove QOperatingSystemVersion::WindowsVistaSona Kurazyan2019-09-052-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minimum supported version is Windows 7. Remove QOperatingSystemVersion::WindowsVista added by b0cd007335853f283c47ffb0f5611d14e6dbe84b and replace with "true" wherever it was used. Change-Id: I08c0208467b655a921b6773f77d8bc099be69031 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Rename calendar methods from m{in,ax} to m{in,ax}imumEdward Welbourne2019-09-049-48/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Words should not be abbreviated. Split a long line and reflowed some comments in the process. Fixes: QTBUG-78008 Change-Id: I52d75409f02e2cecbed3e94d424617ad594c275b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Use quiet NaNs instead of signaling onesEdward Welbourne2019-09-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I see no good reason why the NaN returned when reading "nan" as a double should be a signaling one; a quiet one should be just fine. [ChangeLog][QtCore][QLocale] The NaN obtained when reading "nan" as a floating-point value is now quiet rather than signaling. [ChangeLog][QtCore][QTextStream] The NaN obtained when reading "nan" as a floating-point value is now quiet rather than signaling. Change-Id: Ife477a30bfb813c611b13a33c38ea82f9e8a93eb Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QUnicodeTables: use array for case folding tablesMarc Mutz2019-09-044-2722/+2695
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of four pairs of :1 :15 bit fields, use an array of four :1, :15 structs. This allows to replace the case folding traits classes with a simple enum that indexes into said array. I don't know what the WASM #ifdef'ed code is supposed to effect (a :0 bit-field is only useful to separate adjacent bit-field into separate memory locations for multi-threading), but I thought it safer to leave it in, and that means the array must be a 64-bit block of its own, so I had to move two fields around. Saves ~4.5KiB in text size on optimized GCC 10 LTO Linux AMD64 builds. Change-Id: Ib52cd7706342d5227b50b57545d073829c45da9a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Doc: Remove 'f.i.'Kai Koehne2019-09-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spell it out, or entirely remove it if it's not necessary. Change-Id: Idc371427e9351d948245ce7b719e3457dfc27845 Reviewed-by: Matthew Woehlke <mwoehlke.floss@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Liang Qi2019-09-0410-170/+165
|\ \ \ \
| * | | | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-0410-170/+165
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| | * | | QRegexp: Fix MSVC2019 warning about fallthrough not being followed by a case ↵Friedemann Kleint2019-09-031-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | label Move fallthrough down, fixing: tools\qregexp.cpp(3014): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label tools\qregexp.cpp(3054): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label tools\qregexp.cpp(3100): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label Change-Id: If25ddec5dc1d4929a3383729aabad89f5879e316 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
| | * | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-312-2/+2
| | |\ \ \ | | | | |/ | | | |/| | | | | | Change-Id: I9823da32168e99bbece2f8337d0bd4d33e6d634c
| | | * | Doc: Clarify QJsonDocument::toJson()Joerg Bornemann2019-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mention that this method returns an indented document. Change-Id: I0cadcc1c894c9a87910cfce389c6a5288238044d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | | * | Remove hardcoded qt_instdate field from binaryFredrik Orderud2019-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move hardcoded date to the only client code in the repo. This field is currently modified by MaintenanceTool and possibly windeployqt, which contributes to breaking the DLL signature on Windows. Removing the field should avoid this problem. Task-number: QTBUG-76985 Change-Id: I01386136ac493ea50c99c05879a3e215f3f6344c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Allan Sandfeld Jensen2019-08-271-2/+2
| | |\ \ \
| | | * | | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-08-271-2/+2
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp src/gui/painting/qdrawhelper_p.h src/gui/painting/qdrawhelper_sse2.cpp src/gui/painting/qdrawhelper_x86_p.h Change-Id: I83256bb38ab3a705776e353bc0629315b6c59a0f
| | | | * | Fix assertion on passing nullptr QLatin1Strings to qt_compare_stringsMarc Mutz2019-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qstrnicmp() has an assertion that the lhs string is not nullptr. Fix by moving the length check back to the front, regardless of cs's value. Amends cad7100fda1b27ba56c4d9efc6bceba62859dfbc. Change-Id: I31f808936c8dc6fbb10a70a59923746ef3e675e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | | Docs: Some cleanup of class documentationKavindra Palaraja2019-08-271-140/+127
| | |/ / / | | | | | | | | | | | | | | | | | | | | Change-Id: I62f89157e57189a97151f9661bc354af9bd67468 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | * | | Also fall back to direct write for Android content: URLs in QSaveFileVolker Krause2019-08-241-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot rename into content: URLs, so that is the only option, and this is particularly relevant here as the native file dialog will give us content: URLs by default for saving to. Change-Id: Ie96fcfc404a0842d397c7d1554e3c76f06bb3074 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-222-1/+10
| | |\| | | | | | | | | | | | | | | | | Change-Id: Ia4bcd81eff948e56a5eda9519cdbee59b7da54d9
| | | * | Point out that dynamically modified meta objects are not threadsafeVolker Hilsheimer2019-08-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that this is an exception, it doesn't invalidate the general thread-safety of static meta objects, and putting a locking mechanism into Qt for this would be complete over- (and performance-)kill. Task-number: QTBUG-70915 Change-Id: I4a538b977f5c2e8173cb236023e5d9ca34add5b5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | | * | Fix qErrnoWarning() printing no error in some conditionsThiago Macieira2019-08-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because it allocates memory, it may call system functions that set errno or Win32's GetLastError(). [ChangeLog][QtCore] Fixed a bug that made qErrnoWarning() say there was no error when generating the error message. Fixes: QTBUG-77322 Change-Id: Ife213d861bb14c1787e1fffd15b811a4f83cf3e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | | Merge "Merge remote-tracking branch 'qt/5.12' into 5.13"Paul Olav Tvete2019-08-201-1/+1
| | |\ \ \
| | | * | | Merge remote-tracking branch 'qt/5.12' into 5.13Paul Olav Tvete2019-08-201-1/+1
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/configure.json src/gui/util/qtexturefilereader.cpp src/gui/util/util.pri tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp Change-Id: I2bc4f84705b66099e97330cda68e0b816aceb9cc
| | | | * | Fix typo in description of feature datestringEdward Welbourne2019-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I858512af94b5160a0008789ca972cd57307cc9e2 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | | | Fix building with -no-feature-codecsAllan Sandfeld Jensen2019-08-201-2/+5
| | |/ / / | | | | | | | | | | | | | | | | | | | | Change-Id: Ifce31a5ef07101f5ef8aabbc81b42eee47153961 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | / / / QUnicodeTables: pack Properties structMarc Mutz2019-09-042-2639/+2641
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC doesn't like the sequence : 5 : 5 : 8 : 6 : 8 and inserts a :6 padding between the :5 and the :8 and a :2 padding between the :6 and the :8, growing the bitfield by 8 bits of embedded padding and another byte to bring the struct back to sizeof % 2 == 0. Fix by reshuffling the elements and adding a static_assert for the next round. Saves ~5KiB in QtCore executable size. Change-Id: I4758a6f48ba389abc2aee92f60997d42ebb0e5b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Fix some qdoc warnings in 5.14Friedemann Kleint2019-09-036-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark QCalendarBackend as internal since it is in a private header and fix some issues in the QCalendar related classes. src/corelib/time/qcalendar.cpp:201: (qdoc) warning: clang found diagnostics parsing \fn int QCalendarBackend::daysInMonth(int month, int year) const error: incomplete type 'QCalendarBackend' named in nested name specifier (repeats) src/corelib/time/qdatetime.cpp:1426: (qdoc) warning: Unknown command '\override' (repeats) src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'Last' in QCalendar::System src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'User' in QCalendar::System src/corelib/time/qcalendar.cpp:744: (qdoc) warning: Undocumented parameter 'year' in QCalendar::isLeapYear() src/corelib/time/qcalendar.cpp:923: (qdoc) warning: Can't link to 'dateTimeString()' (repeats) src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'year' in QCalendar::partsFromDate() src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'month' in QCalendar::partsFromDate() src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'day' in QCalendar::partsFromDate() src/corelib/time/qdatetime.cpp:1425: (qdoc) warning: Undocumented parameter 'nmonths' in QDate::addMonths() src/corelib/time/qdatetime.cpp:1467: (qdoc) warning: Undocumented parameter 'nyears' in QDate::addYears() src/corelib/statemachine/qstatemachine.cpp:2522: (qdoc) warning: Undocumented enum item 'StateMachineChildModeSetToParallelError' in QStateMachine::Error src/corelib/kernel/qtimer.cpp:602: (qdoc) warning: Undocumented parameter 'connectionType' in QTimer::callOnTimeout() src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'name' in QCalendarBackend::QCalendarBackend() src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'id' in QCalendarBackend::QCalendarBackend() src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'registerCalendar()' src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'fromName()' src/corelib/time/qcalendar.cpp:178: (qdoc) warning: Can't link to 'QCalendar::fromEnum()' src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Undocumented parameter 'jd' in QCalendarBackend::dayOfWeek() src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'weekDayName()' src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'standaloneWeekDayName()' src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'isLeapYear()' src/corelib/time/qcalendar.cpp:295: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLuniSolar()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isSolar()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLunar()' src/corelib/time/qcalendar.cpp:340: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:357: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:544: (qdoc) warning: Can't link to 'fromName()' Change-Id: Ia2fabefb917f8e4cfa361044d9b754717276f4aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | Make sure QLatin1Literal fwd header is generatedKevin Funk2019-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This broke when QLatin1Literal got deprecated in change 45373c19243aea335897ba0f371a1dd53ae8f079 Both hunks in this patch are needed. The hunk in syncqt.pl removes the QT_DEPRECATED_X(...) macro if it appears solely on a line in source code, the second hunk inserts a newline after the QT_DEPRECATED_X(...) macro usage to trigger that code path in the Perl script. Before/after comparison of the headers generated in include/QtCore: ``` % diff ~/old.txt ~/new.txt 105a106 > QLatin1Literal ``` Change-Id: I468dd2dd54bf115521ed82c6182236905556f568 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | | Fix spelling of primarily in QCalendar::isSolar()'s docEdward Welbourne2019-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It was missing a y. Change-Id: I12dac02e451addff966f554811ca1999acadbb1b Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | | | Remove QFileInfo::type and related enum from 5.14Volker Hilsheimer2019-08-302-83/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is problematic for several reasons: - the mixing of flags and enum in a single enum type - the name "type" as somewhat overloaded - the ease of misuse when comparing the result rather than testing for a bit being set In light of this, focus for 5.14 on the new isShortcut and isSymbolicLink functions, thus migitating the problematic isSymLink which conflates the two concepts. Change-Id: I57e02321edd5061f69a775f04a0932ef89adf866 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | QDateTimeParser: replace QVector with QVarLengthArray<12>Marc Mutz2019-08-301-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lists of month and day-of-week names usually currently do not exceed 13 elements (incl. possible leap months), so don't use QVector, use QVarLengthArray with Prealloc = 13. This value may be increased when ISO week-as-month is merged, but the container remains valid even with 52 "months" (though the code that calculates its runtime size will naturally need to be adjusted). Change-Id: I4ead897d933f89fc092850fcc22ca41da0a6ddc6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Pass QDate, QTime as value classes, rather than by const referenceEdward Welbourne2019-08-302-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can, of course, only be done in private APIs - but comment on public APIs to do the same at Qt 6. Change-Id: I3c79951572be3c37b0b0c5b1b05bced051a40964 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | Optimize QDate by shortcutting some gregorian calendar methodsEdward Welbourne2019-08-303-15/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some static methods to QGregorianCalendar, some of which serve to implement its methods, that QDate can use to bypass vtables and exploit fixed truths of the Gregorian calendar in its default handling. Change-Id: Iec191cdf4d52945dbd5679e609180cb4fe59b5fd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>