This should reduce the failure rate. We're still doing qSleep of the
same amount of time, but we now only fail if the slip is over 100 ms.
Task-number: QTBUG-58713
Change-Id: I536c32a88bff44dab37afffd14a1afdf0b2e522a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Solves a data race found by TSan.
Since thread and threadId are QAtomicPointer, I've removed the explicit
initialization in the QThreadData constructor
Task-number: QTBUG-58855
Change-Id: I4139d5f93dcb4b429ae9fffd14a34082f2683f76
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
currencySymbol == "$" does not mean negative currency values will be formatted
as "($value)". With all locales I have on my mac machines (10.11/10.12) the
result is different from what this test expects. Also, the results are very
different for different locales. Apparently, we never saw this problem before
since in our CI "macs" we never have US Dollar/en_US selected in System Preferences.
Task-number: QTBUG-58784
Change-Id: Ic2c3a3172bf1e715e99092ddee8f461b216d995a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
1. Do not use Q_GLOBAL_STATIC to hold QAtomicInt or QMutex, use
file-static QBasicAtomicInt and QBasicMutex instead. They are
zero-initialized PODs.
2. Use only QMutexLocker to lock mutexes.
Also wrap the atomic counter into a next...() function, as done
elsewhere.
Change-Id: I4b14ac0de9d4cb6780b1f1372c2b5fc88e918e4c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The runUpdateMimeDatabase() call was timing out on the CI due to
running out of the default 30s timeout for QProcess::waitForFinished()
(on my machine, that call takes less than 0.5s, reliably...).
Increase to two minutes.
Change-Id: I61b2e060ea9c2508b853847ba7040ad499e0084c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
When one of the QCOMPAREs in Consumer::run() fails, the consumer
returns early, leaving the producer deadlocked in a QSemaphore's
acquire() call. Change these to tryAcquire() with a large timeout,
so the producer, too, eventually leaves run().
Change-Id: I7421d43305decd4754e09c8e092363594d1be06b
Reviewed-by: David Faure <david.faure@kdab.com>
$ git grep -we futexFlagSupport
src/corelib/thread/qmutex_linux.cpp:static QBasicAtomicInt futexFlagSupport = Q_BASIC_ATOMIC_INITIALIZER(-1);
The last user of this variable was removed in 9ef59b5.
Change-Id: I818a13a481ad25baa5ff7d389a737b8801adcfcc
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This test was determined to be flaky on the CI.
Task-number: QTBUG-58741
Change-Id: I43196d3a27f726fb96b427f5071e726b571a0404
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Call the Win32 API GetDesktopWindow() to obtain a HWND of the desktop
instead of calling QApplicationPrivate::getHWNDForWidget() for desktop
windows. This allows for lazily creating desktop platform windows.
Observed in some tests where no window is visible.
Change-Id: I97074f69606b3d74f3fbc90acb4a077d52eeb84d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is an old error of the gstrip binutils. The bug has been corrected
and re-introduced.
The command *elfdump -d xxx* on the ELF does bring lines like those :
.SUNW_syminfo: invalid sh_info: 0
Task-number: QTBUG-58814
Change-Id: I330c4031dcf4ba64297df4b333b41cf0a003914f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Calling setScreen() on a QWindow doesn't move the window to that screen
unless the new screen is a separate virtual desktop, as the window
geometry is what determines the position of the window within each
virtual desktop.
But when mapping a QWindow that doesn't have a position explicitly set by
the user, we try to resolve a reasonable position for it. In that case we
should take the QWindow screen into account, as setting it to a non-primary
screen is a good indication that the user wants the window to end up on
that screen. If that's the case, it should override the logic of using
the transient parent or the cursor position to choose which screen to
place the window on.
Change-Id: I591d872a93913173b20eb3da19aa63118fcf6b12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
We can defer the creation until the window is shown.
Change-Id: I3d5b45ae59ee0925996cf12cd46dd574c8c6ef95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Since QVector is implicitly shared, don't re-generate the same
two color tables all over again, but create them once and keep
them around in a Q_GLOBAL_STATIC.
Change-Id: I9a8d32021d8cc327264f2818a23beaae67fe3ee8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Linking with too many object files could lead to "LNK1170: line in
command file contains 131071 or more characters". Do not write all .obj
files into one line but respect a limit of 1000 characters. If the limit
is reached the object files are separated by newlines instead of spaces.
Task-number: QTBUG-58710
Change-Id: Ibae1f737d6b614a9624b4e00cdd21d3722d341e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
NVIDIA 370 introduced new calls needed to work with eglstreams in the
wayland window system
Task-number: QTBUG-58299
Change-Id: I606b143d3016f365b0d5ca4bc163b99289afbea1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
All implementations of QCollator::sortKey() can benefit from
moving their CollatorKeyType into the QCollatorSortKeyPrivate
on construction.
So make the QCollatorSortKeyPrivate ctor a perfect forwarder
for its m_key member, and add std::move() calls where they
were missing (in all but one case, lvalues were passed).
Make the ctor explicit, as it should have been from the
beginning.
Change-Id: I2a1cdda5fd23990ace019b963df895c621a1fa85
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QThreadPool maintains three containers of QThreadPoolThread*:
- allThreads, a QSet
- waitingThreads, a QQueue
- expiredThreads, also a QQueue
None of the operations on allThreads make use of QSets fast lookup.
The only functions called on it are isEmpty(), count(), insert(),
and swap().
Since therefore QSet adds nothing but overhead, causes indeterminism
(e.g. when deleting threads in Private::reset()) and code bloat, use
the same container for allThreads that underlies QQueue: QList.
Port insert() to append(). Add an assert to verify that we're not
running into an ABA problem here (but this should never fire, since
we're never deleting threads except in Private::reset(), where we
do remove them from allThreads), just in case.
Saves ~0.5KiB in text size on optimized Linux AMD64 GCC 7.0 builds.
Change-Id: I53a4d5ef2c204420f7c8852f1e72ab3d6ea43d08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add proper support for 'so' and 'bundle' suffixes. Qt wrongly assumes
.so libraries are not versioned on Apple platforms, which is
wrong. Also, the shared library .bundle which is what Apple recommends
instead of .so, are also versioned (not to be confound with the
different Core Foundation bundles, which are directory hierarchy).
For more info, see http://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm.
Especially the part that reads:
"Loadable modules, called bundles in Mac OS X, have the file type
MH_BUNDLE. Most Unix-based software ports usually produce bundles with a
.so extension, for the sake of consistency across platforms. Although
Apple recommends giving bundles a .bundle extension, it isn't
mandatory."
Task-number: QTBUG-50446
Change-Id: Iacd5136397a12d65d83821434f332eb602550b4b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And if __AES__ or __PCLMUL__ is defined, then we expect wmmintrin.h to
exist.
Change-Id: I445bb15619f6401494e8fffd149db77dc513e071
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This reverts commit b0c1e07d64.
The unit tests it introduced trigger errors with the macOS and
Win32 implementations, which means the there's something seriously
wrong with either the API, our implementation or the tests.
Revert for now until this gets fixed. Blacklisting was also the
wrong tool to use. The tests should have used QEXPECT_FAIL.
Change-Id: Ida20c6bbe0c019835a22464535029585e8e1e367
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Now that notification callbacks are delivered directly to QCocoaWindow,
it doesn't make sense to then send them to QPA via QNSView. By skipping
the QNSView roundtrip we also enable window state notifications for
foreign windows.
As an optimization we no longer flush all window system events, but use
the new synchronous API to deliver the window state change event.
Change-Id: I529b625fbe22e664c34a51bcd4448d1bf0392e6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
There weren't any, at all.
Testing on the CI showed that the implementation is broken on
macOS, and, to a lesser extent, on Windows, so blacklist the
failing tests until the implementation can be fixed. No need
to hold back testing the other implementations.
Task-number: QTBUG-58737
Change-Id: I9ae16ab778dbe2e95a6ca5e0bae00df4bad65cb2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4f7df9abcd580297a40fd9dd16a26f5f93e1c4c7
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This test was determined to be flaky on the CI, depite attempts
to stabilize it (b750a3786f).
Task-number: QTBUG-58745
Change-Id: I933199cd537002699906147d172bb797f1dc90c1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The function is only used from inside the #ifndef ES2 blocks,
causing it to fail compilation with a default configuration
on iOS (where warnings are errors).
Change-Id: I4f76c6371bd9125c7d1c919685df4a870eeb62f0
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
We have observed that MSVC 2013 gets lost with the overloads that this
header adds, causing compilation bugs. This is believed to be a compiler
bug, but it's not something we can work around.
Task-number: QTBUG-58555
Change-Id: I536c32a88bff44dab37afffd14a1bad1d31dc16d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Glen Mabey <Glen.Mabey@swri.org>
Since 5.7, QIODevice::peek() implementation is based on transaction
mechanism. While technically it's correct, seeking backward on a
buffered random-access device clears the internal buffer that affects
the performance of reading.
To solve the problem, this patch implements peek mode directly inside
the reading procedure.
Task-number: QTBUG-56032
Change-Id: Ic5269f76e44c491a0309e13aba87fa7cf7b9259f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Move device-dependent part of the code into the private function for
further reusing by peek() procedure.
Task-number: QTBUG-56032
Change-Id: Iedceafe4b0bab109ca5c64ad274d779efe87c27b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We're already using it, for example in qpaintengine_pic.cpp:502:
d->s << p << ti.text() << fnt << ti.renderFlags() << [...]
^
[ChangeLog][QtCore][QFlags] Added operator<< and operator>> for
streaming QFlags into and out of QDataStreams.
Change-Id: I33dc971f005a4848bb8ffffd1478e79d6102d1bc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
the file contains no code.
this avoids complaints from ar/ranlib in static/bootstrapped builds.
Change-Id: Iee22ffc61a5f9ea8c25f5455b7e8e017ac521624
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... instead of merely defaulting it to off on android and windows.
this reflects actual reality.
Change-Id: I880254138bedd07124aa00096a06dd6e1803feb9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The controls need to reflect the facts that e.g. maximized and fullscreen
can both be set at the same time, the same way a window can be minimized
and fullscreen.
Change-Id: I7f3e354a5efaefb9f51e6b1f24fa35980fe35899
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>