Instead of using initTestCase and QFETCH_GLOBAL, which make the rest of
the tests repeat themselves with IDN data, which isn't necessary.
Pick-to: 6.5
Change-Id: I3e3bfef633af4130a03afffd175e2537ba89dc04
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
There's little need for us to dynamically load it. The reasons why that
was necessary aren't in the public history (Qt 4.5 already had it[1]). I
remember writing the code in 2007-2008, I just don't remember why.
On modern Linux and FreeBSD, there's no libresolv.so any more and those
symbols have been rolled up into libc.so. It's still necessary on Darwin
systems, so this commit introduces WrapResolv.
It also resolves the unity build issues relating to libresolv symbols.
[1] https://code.qt.io/cgit/qt/qt.git/tree/src/network/kernel/qhostinfo_unix.cpp?h=v4.5.1
Task-number: QTBUG-109394
Change-Id: Ic5799e4d000b6c9395109e008780643bac52122b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This simplifies the code greatly, because we don't need to use
QtPrivate::convertToMilliseconds any more, as QDeadlineTimer has
nanosecond precision.
Internally it becomes simpler too because lockInternal was already using
QDeadlineTimer. I just had to use the parameter instead and update the
two non-futex implementations to take it again. This may even be fixing
a mistake in case sem_timedwait(2) got interrupted.
Change-Id: I6f518d59e63249ddbf43fffd1759fed9f50b3606
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This propagates inside the internals, ending up in wait_until calls in
the internal std::condition_variable. For systems with proper support
for monotonic waiting (Linux, FreeBSD), this should improve performance.
We could even remove the hasExpired() check and pass a time point in the
past too. Right now, there's a minor performance drawback for
tryLockForXxxx(), because we will make at least two system calls to get
the time.
Change-Id: I6f518d59e63249ddbf43fffd1759fc5b2e40256a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We can now do that because tryLockForXxxx(-1) is fast for the
uncontended case too.
Change-Id: I3d728c4197df49169066fffd1756ddd06caf7b52
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
They're unnecessary now because the timed function is fast enough.
Note: the default argument will move to the QDeadlineTimer functions
before the Qt 6.6 release.
Change-Id: I3d728c4197df49169066fffd1756ddc0e4f796d3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This allows the fast, uncontended case to exist in a function that does
much less work and therefore needs to save less state in its
prologue. This is interesting too for LTO because the compiler can then
inline the fast, uncontended path where the locks were used.
Pick-to: 6.5
Change-Id: I3d728c4197df49169066fffd1756dc04d8a5f04a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Just move it to the private class. This also allows this function to get
inlined in QWaitCondition::wait().
Pick-to: 6.5
Change-Id: I6f518d59e63249ddbf43fffd1759fc99c28c7ca8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Handle any queued messages before attempting to dispatch
any newly received messages. This ensures that messages are
processed in the order they were sent.
Add a regression test for this bug using code adapted
from the bug report by Pascal Weisser. Because of the
nature of the bug, this new test does not always fail
even when compiled with affected versions of Qt though.
Fixes: QTBUG-105457
Pick-to: 6.2 6.5
Change-Id: I2725f3450ad537d63d6660e21645ac2c578e1768
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As described in the bug report, in cases where host Qt is built using
MSVC, these flags may leak to user projects if they are set to be
configured by a different compiler, e.g., Clang.
Pick-to: 6.5
Fixes: QTBUG-112737
Change-Id: Iad922e24cc7e7f835e08ed37271dfbedc6e38dbe
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Amends 3bf5b5f894, after which free
functions and std::bind could no longer be used as callables in
QMetaMethod::invokeMethod.
For free functions to work we need to decay to function pointers when
choosing what type QtPrivate::Callable aliases.
And std::bind has operator() overloads and the return type cannot be
deduced. So simplify the definition of the ZeroArgFunctor - we know
the function prototype if we know the return type.
Add testcase for calling std::bind and free function, and remove the
now unneeded helpers for functor argument and return type deduction.
Change-Id: I54aac5cb6d660267e6b2f5ab05d583e8826cdf9a
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This reverts commit 4710fb3528.
The theme it responsible for defining a set of good fallbacks,
and we should respect that order. We should also respect any
override the application developer does of the fallback theme,
and not unconditionally fall back to the system fallback theme.
Change-Id: I77f1a74c71a2a7db70464666b1a96a00fb4a1d8f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
A zone without transitions, such as any UTC-based one, would
previously return invalid data for the offset data at a given
time. The method was documented to be "the equivalent of calling
offsetFromUtc(), abbreviation(), etc" but these methods do return
sensible data for a zone with no transitions. Furthermore, the backend
data() method on which it depends is implemented by all backends,
including the UTC one, with no transitions.
Fix offsetData() to also return data when no transitions are
available. Improve docs.
Adapt the checkOffset() test to test offsetData() as well as the
various functions to get parts of it. In the process, change that test
to use a QTimeZone row instead of its name as a QByteArray, so that we
can also have rows for lightweight time representations.
Change-Id: I241ecf02a26a228cca972bca5e2db687fe41feb4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Some zones that fell into one or another of the supported groups had
different start times or even dates for their transitions, causing the
tests to fail in those zones. Adapt the test data to them.
In the process, arrange for part of the test to report more: verifying
a value is 1 or -1 sadly leaves no report of what it was when it
wasn't. So use the scope-guard report pattern to do that on failure.
Change-Id: I01cc4a90e3b45867ba0edb2d6c46397d465046ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTimeZone is no longer dependent on feature timezone, only its
backends are. We can also pass it as test data, rather than only its
name. So replace the zoneName column with a plain zone column, make
the UTC row for the epoch use QTimeZone::UTC instead of "UTC" and make
only the remaining rows depend on the feature, and then only for their
test using the backend zone.
The test itself was doing some convoluted twists to check local time
handled the relevant dates and times as expected. Where local time is
the zone the test relates to, this can just as well be handled by
adding a separate row for it - which we can even do without feature
timezone.
Otherwise, testing an expectation that local time *doesn't* have
anything odd going on for the selected days was somewhat unreliable,
as other zones that coincide with the tested zone for that particular
date would fail. So just drop that unreliable side of the local-time
testing.
Change-Id: Id58b2d4cf7649567f1831154a605f31139e987d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This follows up on commit ca4aa06523
with a correction to the start of day, which should of course be
01:00, not invalid.
Unsurprisingly, the MS backend doesn't know anything about that, so
gets this wrong; kludge round it. In the process, adapt the kludge to
the Sofia test-case to work the same way.
Change-Id: If18e6d005783a0854c56092e695177898ec61712
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
AppKit will in some cases call this method, even if we are layer backed,
just because we implement it. We should remove the implementation, but
doing so requires us to also move from displayLayer to updateLayer for
the layer backed drawing, which requires more testing.
Pick-to: 6.5
Fixes: QTBUG-113500
Change-Id: I70bde34fdb433105d85ccea0514a5342e2c1e725
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Coverity complained about the call to warnNullCallable() being dead
code for most instantiations of the create() function template. It's
right, of course, even though warning in a template that clearly has
instantations where it's not dead code isn't exactly helpful.
Nonetheless, take the opportinity to avoid the dead code warning at
the expense of a bit or un-DRY-ing:
- because we now use them more than once, cache the result of
is_*function_* predicates in constexpr variables
- then scope the is_null variable such that its use is not subject to
dead-code removal anymore (at instantiation time; it may still be
removed by the optimizer)
As drive-bys, add a comment about the reinterpret_cast, and make the
custom template predicates variable- instead of class templates.
Coverity-Id: 407640
Change-Id: I272223042c2aae9d814e82c466e1d29e1c42bfa1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Helps keep the code fit into line length limitations.
Change-Id: I2e861c6f0a991cc36991572c4386040b8e11ca40
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Because we can, and it prevents all the machinery from being exported
by the Q_CORE_EXPORT on QRunnable.
Change-Id: I80e0690956bff612f2048eefb2b64bc198835f1f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
There's only one user of this function-like macro and already broke
unity-build, so make it a lambda instead and scope it close.
Remove the previous work-around (#undef at end of TU).
Pick-to: 6.5
Change-Id: I0bd7cd41b89a6f32144d2040ff2b4a18d0045d21
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
After 9efaf8bae9 commit there is no
possibility to create release package for cmake based builds.
Added a new cmake variable (QT_ANDROID_DEPLOY_RELEASE) to allow turning
on release build manually.
Task-number: QTBUG-112921
Task-number: QTBUG-108132
Task-number: COIN-882
Pick-to: 6.5
Change-Id: Idf015b4ad3f8cba792aab75a01e1c81225cad4f0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
... optimizing the storage of empty function objects.
I thought we had applied this a long time ago, but it turns out that
QPrivateSlotObject (c61d9873e5) is only
for QObjectPrivate::connect()...
This adds the same optimization for regular QObject::connect(). This
is BC, since we don't touch the base class (QSlotObjectBase), and the
QCallableObject subclasses are all-inline or explicitly Q_DECL_HIDDEN.
Amends c61d9873e5.
Change-Id: I63fd1b6f882b58f9f98eae67c636c3615248ad79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Useful for operating on QPainterPaths with algorithms designed for
quadratic, and not cubic, curves.
Change-Id: I1af2d6e4f2b66ce675cde863f67d65fbf9db7d39
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Correctly return only the fileName portion from
AndroidContentFileEngineIterator::currentFileName(); which
QDirIteratorPrivate::matchesFilters() expects when looking for matches
of the file pattern provided to the QDirIterator.
Fixes: QTBUG-112738
Pick-to: 6.5 6.2 5.15
Change-Id: I98dba2df014b27f33cd7e54fab3ad2de8c7c1750
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
When searching for an icon, we either use the system theme or the theme
set as a fallback through QPlatformTheme, it's only one or the other.
It can easily happen that the fallback theme we pick as a parent theme
will not fit into the application style (color-wise). For example using
KDE apps on GNOME, where we use "Adwaita" icon theme, we would always
fallback to "Breeze", however, using dark theming, we want to fallback
to "Breeze-dark" and this can be easily set through QPlatformTheme
integration, but it's not going to be used when the system icon theme
is valid and in such case the fallback theme will be ignored.
This change makes the system fallback theme used as the default fallback
by putting it to the list of parent themes.
Pick-to: 6.5 6.2 5.15
Change-Id: I966cd8ddd0e5576e3593d349fe7ee7139136bfdf
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Don't refer to qt_add_big_resources as the preferred way of adding big
resources. The qt_add_resources command has support for big resources
these days.
Move the link to add_big_resources to the "see also" part of the page.
Pick-to: 6.5
Change-Id: I030ef079db8ac41417049e58e98eb7aa6fd809e9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The QWeakPointer conversion SMFs cannot actually be used for QObject
payloads, as, for unknown reasons (some comment about vtable this
author doesn't understand), conversion goes through QSharedPointer,
the creation of which throws the checkQObjectShared() warning and
yields a nullptr.
We need to continue to use the QWeakPointer(T*, bool) constructor the
QPointer(T*) ctor also uses.
It's high time we dissociated QPointer from QWeakPointer...
Amends 5f28d367d9.
Fixes: QTBUG-112464
Change-Id: I2f93843af3daf02323d77a4259eaa3745d8de3a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The constructor's documentation already had the note saying that we
could apply this optimization, but it wasn't there and looks like it
never was. This only applies to the default constructor, which sets t1
to zero, which is the epoch. This could be a problem for an OS whose
monotonic clock starts with negative values, but I don't know such an OS
exists and this hasn't been a problem so far.
This commit doesn't change the behavior of the old-style, non-
std::chrono getters, because we always transform any negative remaining
time to 0. It is only possible to observe it by asking the remaining
time or the deadline using the std::chrono API.
Change-Id: I6f518d59e63249ddbf43fffd175a3fc2911e91fb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We have quite a few Qt API that assumes this, so making this change
helps transitioning them to QDeadlineTimer.
[ChangeLog][Important Behavior Changes] QDeadlineTimer will now
interpret negative millisecond remaining times as "forever", instead of
only the value -1. This brings the API closer in line with other API
like QMutex. This change does not apply to the nanosecond counts in the
API, nor to the API based on std::chrono.
Change-Id: I6f518d59e63249ddbf43fffd175a3e5bead564ae
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In case the time is of less than 1 ns, we want to make sure it remains
non-zero.
Change-Id: I3e3bfef633af4130a03afffd175d9c4903271f80
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Commit b498e1ae3a removed the last
distinction. And since there was no distinction, the code that was
previously under a conditional for CoarseTimer must work for precise
too.
Change-Id: I6f518d59e63249ddbf43fffd175a3eddbd41611a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
qabstractanimation_p.h is pulled in from qmltc generated code, that
users may decide to build with `QT_NO_KEYWORDS`
Change-Id: I6ce1e82b3c68f6b7e1e349b40945a6f398d8baf5
Pick-to: 6.5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
As part of ed2b110b6a the implicit caching
of some of the system locale queries was removed, resulting in a
three orders of magnitude performance regression on converting
dates to strings via QLocale::system() on macOS and iOS.
We now cache the most critical of these, the zero digit, in the Darwin
backend, and clear the cache in response to the system locale changing,
restoring the performance two orders of a magnitude closer to that of Qt 5.
We're still one order of magnitude off, which seems to stem from the
auto release pool in QSystemLocale::query().
Fixes: QTBUG-104785
Pick-to: 6.5 6.2
Change-Id: I26f96147d430f08a721c55a1048d586a4af3a76c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add some tests inspired by the initial form of a bug report (before we
found out what the real issue was), that a small fraction with a large
exponent is correctly handled. This should work as long as the result
is representable, even if the fraction itself is too small to be
represented by the floating-point type.
Pick-to: 6.5
Task-number: QTBUG-113443
Change-Id: Ie004197961fc7b603e5024a6ebc5928261a0e2bb
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It was blacklisted some years ago, the bug was closed as
cannot reproduce, and no one unblacklisted it.
Pick-to: 6.5 6.2
Change-Id: I51f1fe4d819e0f90bf18c19b67fa0dca198914d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Having the size potentially be larger than the capacity can't
be considered anything other than a bug.
Pick-to: 6.5
Change-Id: Id059c0f2c7320f992d897011d7aa944c5cb86058
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Support for PRE_TARGETDEPS was added for iOS applications in
53ac8094b1, even if the Xcode
generator doesn't support PRE_TARGETDEPS, by taking advantage
of the glue Makefile we use to run xcodebuild.
And we add our own Qt libraries to PRE_TARGETDEPS in qt.prf,
as you would expect. But since Xcode supports both debug and
release, we always set debug_and_release for this glue Makefile.
The result is that when computing the Qt library PRE_TARGETDEPS,
we fail to apply a _debug suffix from qtPlatformTargetSuffix(),
since we've enabled debug_and_release.
In a debug only build, this means that 'make' of the glue Makefile
will fail to find the release versions of our Qt libraries.
To work around this we skip adding Qt to the target deps when
generating the xcodebuild Makefile, as we know these libraries
are added to the target in the Xcode project.
Pick-to: 6.5 6.2
Change-Id: Icafc103e34a6f83240fa8187181d885fb0172a86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Use qUtf16Printable() to convert QString to somthing consumable by
%ls. Fixes the format/argument mismatch on non-Windows platforms:
tst_qfont.cpp: In member function ‘void tst_QFont::italicOblique()’:
tst_qfont.cpp:153:67: warning: format ‘%ls’ expects argument of type ‘wchar_t*’, but argument 2 has type ‘const ushort*’ {aka ‘const short unsigned int*’} [-Wformat=]
153 | QVERIFY2(f.italic(), qPrintable(QString::asprintf("Failed for font \"%ls\"", f.family().utf16())));
| ^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
| |
| const ushort* {aka const short unsigned int*}
Amends 4bf82909f1.
Change-Id: I0c7e2dca91a093835d7dba8bff2e5ea78d3a926e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This moves the padding that exists on 64-bit architectures from between
the two fields to the end of the the structure. In turns, this allows
certain ABIs to reuse the tail padding space of the base class to store
some information. It can only be used if the functor has alignment of 4
or less, but the interesting case is when it's an empty but final
functor.
The pahole report goes from:
struct CallableObject : QSlotObjectBase {
/* class QSlotObjectBase <ancestor>; */ /* 0 16 */
struct FinalFunctor func; /* 16 0 */
/* XXX last struct has 1 byte of padding */
/* size: 24, cachelines: 1, members: 2 */
/* padding: 8 */
/* paddings: 1, sum paddings: 1 */
} __attribute__((__aligned__(8)));
to (pahole gets very confused by this trick):
struct CallableObject : QSlotObjectBase {
/* class QSlotObjectBase <ancestor>; */ /* 0 16 */
/* XXX last struct has 4 bytes of padding */
/* XXX 65532 bytes hole, try to pack */
struct FinalFunctor func; /* 12 0 */
/* size: 16, cachelines: 1, members: 2 */
/* padding: 4 */
/* paddings: 2, sum paddings: 5 */
/* BRAIN FART ALERT! 16 bytes != 0 (member bytes) + 0 (member bits) + 65532 (byte holes) + 0 (bit holes), diff = -524160 bits */
} __attribute__((__aligned__(8)));
Change-Id: I3e3bfef633af4130a03afffd175d3be98511bae5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
After the recent changes we only have a single implementation of
QSlotObjectBase, which can handle free functions, member functions,
functors, and lambdas. Rename it to callable, and explicitly hide
the static implementation function so that it doesn't become a symbol
of static libraries using Qt.
Also rename makeSlotObject to makeCallableObject, and polish coding
style and comments in the qobjectdefs_impl header a bit.
Change-Id: Id19107cedfe9c624f807cd8089beb80e9eb99f50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSet's iterator doesn't have operator--, but the
Q_DECLARE_SEQUENTIAL_ITERATOR macro declared and implemented functions
hasPrevious/previous/peekPrevious/findPrevious for the QSetIterator
anyway, depending on that operator. The resulting code couldn't compile.
Use SFINAE to remove the various "previous" functions from Java-style
iterators if operator--() is not present.
This removes the hasPrevious() API as well, even though it could compile
(as we only check whether the iterator points at constBegin). But since
nothing useful can be done with that information, it's best to remove
that member function as well.
[ChangeLog][Potentially source-incompatible changes] QSetIterator no
longer has a hasPrevious() member function. The underlying iterator
doesn't implement operator--(), so couldn't be moved backwards anyway.
Fixes: QTBUG-113379
Change-Id: I47b0ba384d8fcd127123d8fa509cd89e10ea8c99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QDoc adds a 'Status' field to the table on top of type reference pages.
One common status for Qt modules/types is 'Technical preview'. Add
an icon that is displayed next to the status description, highlighting
the fact that the type is in tech. preview and therefore subject to
change.
Pick-to: 6.5
Task-number: QTBUG-113026
Change-Id: Ibe6ca2a562cc7810fe27e7dcf514c711cd022894
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The reason this worked before is unclear. It could be suspected
that we have made a dpi awareness change or Microsoft changed
the behavior of the OpenThemeData function.
Regardless, we expect the result to match the primary display which
OpenThemeData doesn't do (anymore). Instead it returns a value based on
the hwnd screen (which btw didn't always match the widget) and the cache
system would then re-use that theme also for hwnds on other screens.
The most obvious solution is to use OpenThemeDataForDpi to make sure
we get a theme result matching the primary sceen. Then our correction
of the result by with multiplying
QWindowsStylePrivate::nativeMetricScaleFactor(widget)
works again.
This fix does not only fix QMenu sizes. It fixes the size for all
widgets that use this theme function, which could return near
random results before.
We load this library dynamically since MinGW 11.2.0 won't link with it.
[ChangeLog][QWidgets][QMenu] Fixed menu sizes on Windows systems
with more screens.
Fixes: QTBUG-112911
Pick-to: 6.5
Change-Id: I8fdfde2ef5b2aa407cbc74c85afe2c0b74026cff
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
If the event dispatcher is interrupted we propagate the interrupt to
lower event loop levels, in case they too need to be interrupted. And
we defer the actual interrupt of the NSApplication to the next time we
process Qt events, to avoid AppKit dropping queued events on the floor.
This logic relies on QCocoaEventDispatcher::processEvents() setting the
interrupt flag to false, which signals that we should not continue to
tear down any further event loops.
Unfortunately, native run loops such as running application modal
sessions, are not driven by QCocoaEventDispatcher::processEvents(),
so we never reset the interrupt, and end up ending the session
immediately.
To work around this we need to explicitly clear the interrupt flag
before starting native modal sessions. This also fixes the issue
seen in QTBUG-111524 with showing native alerts from nested event
loops.
Fixes: QTBUG-112697
Task-number: QTBUG-111524
Pick-to: 6.5 6.5.1
Change-Id: I6aaec97011fd18c4a513c1dde3173b1cc4d50112
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>