summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Clean up the last of QT6_(NOT_)?VIRTUALEdward Welbourne2020-09-141-5/+1
| | | | | | | | | This follows up on commit d273076b4474bb473d90e996960c4c773745761a which left a comment asking for the clean-up this finishes. Task-number: QTBUG-85700 Change-Id: I1c6896a42a09b873302ad7ec8273879f2a4a4ce6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QString: use QCommonArrayOps::erase instead of custom logicAndrei Golubev2020-09-141-4/+2
| | | | | | | | | | With 6e8985e3576a4439bd66c0767f9912d1e124682c merged we can now use generic erase logic provided by array operations. This commit aligns QString with QList/QByteArray Task-number: QTBUG-84320 Change-Id: I83e9349e2461afd98737df25613aa2d0fd817a71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Compile on QNX after QFlags constructor deprecationThiago Macieira2020-09-131-2/+2
| | | | | | | | | | The QFlags constructor taking a plain zero literal was deprecated in commit af2daafde72db02454d24b7d691aa6861525ab99. Pick-to: 5.15 Fixes: QTBUG-86585 Change-Id: I2fc68c725ba649218bd9fffd1633d6251649d2bd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use universal C++20 bit operations when availableAllan Sandfeld Jensen2020-09-133-19/+67
| | | | | | | Avoids using compiler builtins, and can in future replace them. Change-Id: I3f0afe7d28b6ba05bcd1c1132b44a8db7b182d8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Restore qWait() implementationLars Knoll2020-09-132-4/+21
| | | | | | | | | | | | qWait() and qWaitFor() have one subtle difference in behavior, where qWait passes the remaining time to processEvents() and qWaitFor() does not. This lead to instability on timing sensitive tests on macOS. Amends 1abea5f5f13b4b8ec2a1c282e643b791cea12f30 Change-Id: I20f516813ca67d9e86de468c4403e475f08edc26 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QStringList an alias to QList<QString>Lars Knoll2020-09-1213-245/+114
| | | | | | | | | | | | | | | | | | Fix our API, so that QStringList and QList<QString> are the same thing. This required a bit of refactoring in QList and moving the indexOf(), lastIndexOf() and contains() method into QListSpecialMethods. In addition, we need to ensure that the QStringList(const QString&) constructor is still available for compatibility with Qt 5. Once those two are done, all methods in QStringList can be moved into QListSpecialMethods<QString>. Change-Id: Ib8afbf5b6d9df4d0d47051252233506f62335fa3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix generated forward declarations in qdbusxml.cppLars Knoll2020-09-121-0/+4
| | | | | | | Simply use qcontainerfwd.h, instead of declaring those manually. Change-Id: I6d87bf14b60469b457e8e9335868f8cdb0303817 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-125-14/+27
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Inline one method as per ###Qt6Lars Knoll2020-09-122-8/+6
| | | | | | Change-Id: I4bf0ddf4ddf4044a60d881a57ef63b96d4bac262 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Remap QMetaType ids to create more space for builtin typesLars Knoll2020-09-122-54/+90
| | | | | | | | | | | We were starting to run out of space for builtin core types. Remap the type id's to create lots of additional space. We now reserve the first 64k id's for Qt, and have 16k id's for Qt Core. That should hopfully be enough for a while ;-) Fixes: QTBUG-85914 Change-Id: I0dab6bf23652e46a9557d9b38af7990b68c572b6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Partially revert "Inline QTest::qSleep()"Lars Knoll2020-09-122-1/+32
| | | | | | | | | | | | | | | | | | This change partially reverts change a0e0b51001edfc1c7aea113c472ce995efa833fd. Replacing the QTest specific sleep function with QThread::msleep() was not a good idea. The reason is that QThread::msleep() will force the thread to sleep to x mseconds, even if a signal woke the thread in the meantime. This would cause qWaitFor() to not call processEvents(), in some cases, leading to flakyness and test failures in tests that rely on timing, such as the animation tests in Qt Qml. Change-Id: I0ad132cdf32be5813b2e73552d772251fe1d7f89 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMetaContainer: Add function to erase ranges from sequencesUlf Hermann2020-09-123-0/+48
| | | | | Change-Id: Ic51103c36d288f236106e2d3aec1401d53b97a15 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QMetaSequence's d_ptr constUlf Hermann2020-09-121-1/+1
| | | | | | | The container interface should really never change. Change-Id: I31dedf5b776da97a747f0eb26f3bc83ce46f3caa Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Provide methods for adding values to a sequential iterableUlf Hermann2020-09-124-75/+321
| | | | | | | | | | | Provide functionality to add and remove values, so that you can use a sequential iterable as stack or queue if the underlying container supports this. To this end, provide a way to specify whether the value should be added or removed at the beginning or the end of the iterable. Change-Id: If63d302f3ca085e56d601116ce4dfaa6b94a0c4f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMetaContainer: Add an "input" iterator capabilityUlf Hermann2020-09-122-3/+24
| | | | | | | | | For completeness' sake we should expose this. The iterators provided by QIterable and friends will check the category at runtime, and should give sensible feedback. Change-Id: I778894f340c862f79a18c6c5607bcbba98dd7598 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix Qt6 related comments in qdebugLars Knoll2020-09-112-45/+33
| | | | | Change-Id: I9861d29a6615863094cd007178f214a816865eb7 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Get rid of QEnableIfLars Knoll2020-09-112-9/+3
| | | | | | | Use std::enable_if instead. Change-Id: I02a2f3066f9e4cab6db1909681a17330afdbbedb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove pre-C++17 code pathLars Knoll2020-09-111-17/+0
| | | | | Change-Id: Iaa7f677f45cee50f0b9ed236cf5bef18d5764bfa Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Revert "Remove timeStep parameter from QAnimationDrive::advanceAnimation"Lars Knoll2020-09-113-14/+19
| | | | | | | | | | This reverts commit f51b690e91bb2d7c8a03c5cef42abca37d97f8bb. The commit made all animation tests in qtdeclarative on macOS flaky. Change-Id: I4ccaa879df7e2ba7e253657de01cbabc9b2c655f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QMetaSequence's "elements" to "values"Ulf Hermann2020-09-113-176/+176
| | | | | | | | | | This is so that they are in line with the "value_type" usually found in containers. Associative containers have "key_type" and "mapped_type" and we will use those names for access to elements in QMetaAssociation. Using "value" as name for sequential containers improves consistency. Change-Id: I628b7e1446bb2d56843b843bca72d279a6b247e6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Prepare QSequentialIterable for non-const operationUlf Hermann2020-09-112-12/+66
| | | | | | | | | Introduce a smart pointer that saves its constness, even if the constness of the parent object changes. This allows us to implement the const and mutable iterators in the same class. Change-Id: I156e564c7fa2ecc8981c6d71861d796a5cbfec66 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QVariant: guard usage of fromType.metaObject()Richard Moe Gustavsen2020-09-111-1/+1
| | | | | | | | | | | | | | | | This patch amends 19874d6a63. That patch caused a crash to occur when running the auto test tst_QQuickApplicationWindow::attachedProperties(). The crash can be traced back to QMetaType trying to access fromType.metaObject(), which is null. This patch will add a guard to ensure that we don't try to call a function on an object that is null. Fixes: QTBUG-86517 Change-Id: Idafd154a7b6a43e16126038fc5f9b30d7871f0d0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Document that this method got added in 6.0Lars Knoll2020-09-111-0/+1
| | | | | | Change-Id: I6a7f35f81b9df83f911781516ec7e0ed82e09303 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Fix race condition in -trace configured buildJoerg Bornemann2020-09-101-0/+5
| | | | | | | | | | | | qt_create_tracepoints(Core) creates a dependency from Core to Core_tracepoints_header, but the helper library Core_qobject also uses qtcore_tracepoints_p.h and must therefore depend on Core_tracepoints_header too. This amends 5c092c2b401. Change-Id: I0ed51f3ab9accea00f524c170cd319bb8af11df7 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Introduce QProcess::startCommand(QString, OpenMode)Joerg Bornemann2020-09-103-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The removal of the QProcess::start(QString, OpenMode) leads to more porting work than anticipated. A call like QProcess p; p.start(cmdline); must be transformed in the following cumbersome way: QProcess p; QStringList args = QProcess::splitCommand(cmdline); QString program = args.takeFirst(); p.start(program, args); This patch revives QProcess::start(QString, OpenMode) and renames it to QProcess::startCommand. This is still source-incompatible, but the transformation is much simpler: QProcess p; p.startCommand(cmdline); [ChangeLog][QtCore][QProcess] Added QProcess::startCommand(QString, OpenMode) as replacement for the removed QProcess::start(QString, OpenMode). Change-Id: I5499bbb39a025e115042c43a4cc63affddae585c Reviewed-by: hjk <hjk@qt.io>
* Android: use bin for instead of QT6_HOST_INFO_BINDIRAssam Boudjelthia2020-09-101-3/+3
| | | | | | | | | | | ${QT6_HOST_INFO_BINDIR} is returning an empty string making the tools paths unusable, and android apps building fails. Partially revert 09ac1bdfc5d2ee7a537c63e54348a8cf8d905fcf. Task-number: QTBUG-86557 Change-Id: I1522b3a4b45fbcb41894ea3bd7c714f7a79eb954 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QString/QBA: change realloc*Data signatures to use qsizetypeAndrei Golubev2020-09-104-26/+26
| | | | | | | | | | Changed reallocData, reallocGrowData signatures to use qsizetype instead of size_t Change-Id: Iebe7def5430d3d3f4660e19cb6c12612543c5abc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove '\0' space reservation logic in QStringAndrei Golubev2020-09-102-32/+43
| | | | | | | | | Changed QString to use implicit element reserved by QArrayData Task-number: QTBUG-84320 Change-Id: If517500b3f0e71bb8d2989c64815a634aa8dd554 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove '\0' space reservation logic in QByteArrayAndrei Golubev2020-09-102-25/+39
| | | | | | | | | Changed QByteArray to use implicit element reserved by QArrayData Task-number: QTBUG-84320 Change-Id: I2a0091c814a47a5c052da7a83d10cb641834c7bd Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Inline QMetaObject::cast(QObject *), as requested by ### Qt 6 commentEdward Welbourne2020-09-102-8/+5
| | | | | | Task-number: QTBUG-85700 Change-Id: I29405df37b82d34a92537e39a3863b5f6c998556 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove spurious const from QVariant::convert()'s first parameterEdward Welbourne2020-09-102-4/+4
| | | | | | | | As per ### Qt6 comment. Task-number: QTBUG-85700 Change-Id: I24292d9f2b8f7781032aa8df2a7a0c58ad4fb6c9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove some pre-Qt6 codeEdward Welbourne2020-09-104-58/+0
| | | | | | Task-number: QTBUG-85700 Change-Id: Id4856d035b697276f6a7090956359044bac7d817 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix possible corner cases in qarraydataops.hAndrei Golubev2020-09-101-9/+11
| | | | | | | | | | | | | | | Updated moveNonPod function to behave correctly under exceptions being thrown. This is the version that was implemented at some point but then got changed prior to merge. Added tests for moveInGrowthDirection (which uses moveNonPod in general case) to verify that range movements are correctly done Updated QCommonArrayOps access modifier from private to protected to allow testing of internal stuff by subclassing Task-number: QTBUG-84320 Change-Id: Idb994a72ee601762e32248670cdc7819aaca0088 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: clean up the QProcess::setChildProcessModifier exampleThiago Macieira2020-09-101-3/+3
| | | | | | | | | | - Use nullptr instead of 0 - Pass directory to chroot that is not in /etc - Set umask to a sensible value (0 is insecure) Change-Id: I1dba29bc0f454df09ca1fffd161801257f9ccb3c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove redundant non-const QMutex::isRecursive()Edward Welbourne2020-09-102-15/+0
| | | | | | | | As directed by ### Qt 6 comment. Task-number: QTBUG-85700 Change-Id: Iae4179b017840efe4902de2b1529cf7ec0606865 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make Q*ArrayOps erase aligned with std::vector::eraseAndrei Golubev2020-09-101-5/+5
| | | | | | | | | | | Scoped GrowsBackwards-optimized erase to only be applied when erase starts at the beginning of the element range. In other cases, old "left-shifting" erase is used to align with std::vector::erase invalidation policy Task-number: QTBUG-84320 Change-Id: I2e7f3b96b056bc371119eb2d36cc7c74af52c394 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Do not wait in QWindowsPipe{Reader|Writer}::stop()"Alex Trotsenko2020-09-104-30/+14
| | | | | | | | | | | | | | This reverts commit c7ec07d40115bef849574c81d619b629af9434a9. Reason for revert: This causes a memory leak on program termination. The initial commit was an attempt to fix a deadlock where the user destroys object from a thread that does not own the object. This is an unsupported case and should be treated as an invalid report. Pick-to: 5.15 Change-Id: I4957784b86a0361adb65b9d023542f96480f00ba Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Fix a number of MSVC integer conversion warningsFriedemann Kleint2020-09-108-13/+13
| | | | | | | | Mostly related to qstrlen(). Change-Id: I69e2052c83766e4fc466ed398d0d0eac011a77ec Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QProcess/Unix: introduce setChildProcessModifier()Thiago Macieira2020-09-085-42/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Source-Incompatible Changes] QProcess::setupChildProcess() was removed. To execute code in a child process, use QProcess::setChildProcessModifier() [ChangeLog][QtCore][QProcess] Added setChildProcessModifier() function with which one can provide code to be run in the Unix child process between fork() and execve(). With this function, it is no longer necessary to derive from QProcess in order to execute actions in the child process. Another reason is that we can tell whether the std::function carries a valid target much more easily than we can tell whether QProcess was overridden. The setupChildProcess() virtual function does not need to be marked final, since no overrider could ever return an inaccessible private class. This also makes sure the error presented to the user is about the return type, not about attempting to override a final. Clang: error: virtual function 'f' has a different return type ('void') than the function it overrides (which has return type 'QProcess::Use_setChildProcessModifier_Instead') GCC: error: conflicting return type specified for 'virtual void MyProcess::setupChildProcess()' note: overridden function is 'virtual QProcess::Use_setChildProcessModifier_Instead QProcess::setupChildProcess()' ICC: error: return type is neither identical to nor covariant with return type "QProcess::Use_setChildProcessModifier_Instead" of overridden virtual function "QProcess::setupChildProcess" MSVC is not relevant since it doesn't compile to Unix. Change-Id: Ia8b65350cd5d49debca9fffd15f801161363aea7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QSemaphore: Make 64-bit wideThiago Macieira2020-09-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | The implementation can be more efficient with two 32-bit fields instead of just one, but it depends on whether operations on 64-bit atomics are locked or not. Quick check for the following architectures does not reveal any problems, but someone needs to investigate more. Notably, GCC and Clang generate a call to libatomic's __atomic_load_n / __atomic_store_n / etc. 32-bit std::atomic<uint64_t> Arch ::is_always_lock_free .is_lock_free() ARMv7-A false true i386 false true MIPS false true PPC false true RISC-V false true SPARC false true Change-Id: Ia2273af1172d493092d6fffd163251a99064c51b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "Cleanup QSemaphore and make it always 64bit large"Thiago Macieira2020-09-092-60/+104
| | | | | | | | | | | | This reverts commit ff69227a49119c00f703cf89c9d72db7eeeeaa66. Reason for revert: 64-bit atomics on 32-bit systems are often (but not always) worse than the 32-bit semaphore as it was implemented. Plus the High32 and Low32 functions are returning the same thing, forgetting the endianness check. Change-Id: I5d5ade6e9bc7086600ff2302546385151e32142b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Disable operator+ and operator- for QFlagsGiuseppe D'Angelo2020-09-091-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and the associated enumeration. Using them is almost always a certain mistake. 1) op+ between two enumerators of the same enumeration yields int, not QFlags, so removing the type safety that QFlags is supposed to give and breaking the semantics of bitwise operations. 2) op+ between two enumerators of different enumerations is deprecated in C++20 (already flagged by GCC10), and again yields int. This is a code smell. Dedicated classes (holding a combination of unrelated enums) should be used instead. 3) op+ between an enumerator and its QFlags loses the semantic meaning of bitwise operations. If the real meaning was to use operator|, then use that instead; operator+ hides the intent, and can introduce bugs by creating a result not expressible via OR combinations of enumerators: enum E { A = 0x01, B = 0x02 }; QFlags<E> f = E::A; f + E::A; // ??? f + E::B; // ??? Identical reasoning applies for operator-. Technically the other arithmetic operators could be disabled as well, but I really don't expect any real-world usage for them. This has spotted bugs in Qt. [ChangeLog][Potentially Source-Incompatible Changes][QFlags] Using operator+ or operator- with a QFlags object or with an enumeration that has a corresponding QFlags object will now result in a compile-time error, because it's a generally unsafe operation. Use the proper bitwise operations instead (|, &, ~); or cast the enumeration to a integral type before attempting arithmetic manipulations on it. Change-Id: I5eabc5195dec3d3082bc9da10dbc8cf5dff3e1eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix failures in tst_qdatetime under non-english localesMarcel Krems2020-09-091-2/+1
| | | | | | | | | QDateTime::toString uses the C locale since 5ba66c5622e9e0da87a5037399b375d7e8cee554 So don't expect locale specific day- and month-names. Task-number: QTBUG-80441 Change-Id: I08f53b6b33ed9e7eaaa58df4ca6a966c4ba9ef24 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Initialize "uc1" variableWang Wei2020-09-081-1/+1
| | | | | | | remove warning for -Wmaybe-uninitialized. Change-Id: Ib17200eb86ee443875a9059b62762b2dc2100634 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QCommonArrayOps: append when inserting into empty containerAndrei Golubev2020-09-071-3/+3
| | | | | | | | | | | Ensured append is chosen instead of prepend for corner cases when inserting into an empty container Mirrored the logic in shouldGrowBeforeInsert function Task-number: QTBUG-84320 Change-Id: I1c963a2588c331029e450fe55001bbf324f65fb4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QList/QString/QByteArray: no prepend optimized allocation when emptyAndrei Golubev2020-09-073-7/+6
| | | | | | | | | | | | | | | | | | Scoped prepend optimized allocation to only work when prepending into a non-empty container. Otherwise, even appends would be considered prepends since d.size == 0 when container is empty This is, of course, not good for prepend cases but we prefer appends over prepends. My proposal is to figure out what's the best strategy based on use cases and performance measurements. For now, let's just make sure appends are not additionally pessimized Anyhow, this is an implementation detail and should not be considered behavior change (at least not the one that is user noticeable) Task-number: QTBUG-84320 Change-Id: Ibed616a2afa9bc24f78252f15a617bf92e2c6ea3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update QList's documentation bitsAndrei Golubev2020-09-071-44/+43
| | | | | | | | Fixed some QList documentation that described old API/behavior Change-Id: I9101ebb7bed9bcac328509765f8e9b85d63d305b Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Deliver Quit event when calling QCoreApplication::quit()Tor Arne Vestbø2020-09-071-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of QCoreApplication::quit() directly calling exit(0), which would leave QGuiApplication and client code out of the loop, we now send the Quit event, and let it pass through event delivery, before finally ending up in QCoreApplication::event(), where we call exit(0). This has the advantage that QGuiApplication can ensure all windows are closed before quitting, and if any of those windows ignore the close event the quit will be aborted. This aligns the behavior of synthetic quits via QCoreApplication::quit() with spontaneous quits from the platform via QGuiApplicationPrivate::processApplicationTermination. Clients who wish to exit the application without any event delivery or potential user interaction can call the lower level exit() function directly. [ChangeLog][QtGui] Application termination via qApp->quit() will now deliver Quit events to the application, which in turn will result in application windows being closed as part of the application quit, with an option to cancel the application quit by ignoring the close event. Clients who explicitly want to exit the application without any user interaction should call QCoreApplication::exit() explicitly. Task-number: QTBUG-45262 Task-number: QTBUG-33235 Task-number: QTBUG-72013 Task-number: QTBUG-59782 Change-Id: Id4b3907e329b9ecfd936fe9a5f8a70cb66b76bb7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up QTextBoundaryFinder and qunicodetoolsLars Knoll2020-09-074-195/+185
| | | | | | | | | | | Make QTBF ready for Qt6 by using qsizetype in the API and use QStringView where it makes sense. Change the exported API of qunicodetools to use QStringView as well and use char16_t internally. Change-Id: I853537bcabf40546a8e60fdf2ee7d751bc371761 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make QStringMatcher ready for Qt 6Lars Knoll2020-09-072-48/+31
| | | | | | | | | | Use qsizetype for string indices everywhere. Clean up the data structures and remove some Qt 3 or Qt 4 left-overs. This reduces the size of the QStringMatcher from 1056 to 288 bytes. Change-Id: Icc351da8e3aad10a6c940196f52c39f8d2f5bf80 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>