Don't reuse 'w' as the loop variable for every loop in the
(very long) function. Scope the variable closer, or, where
there are no natural scopes, define a new variable.
Required turning some while loops into (more natural) for
loops.
Change-Id: I7d1a52503aeb19cd76be22153ba3d0961bd44cae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Later changes will subclass this class. Moving to the header now
for better readable patches.
Change-Id: If17607d69169aa5c449c36c9445308164e387f29
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
If, after checking a condition, we issue a qFatal()
or a qCritical(), by definition that check is
unlikely to be true.
Tell the compiler so it can move the error handling
code out of the normal code path to increase the
effective icache size.
Moved conditional code around where possible so that
we could always use Q_UNLIKELY, instead of having to
revert to Q_LIKELY here and there.
In some cases, simplified the expressions newly wrapped
in Q_UNLIKELY as a drive-by.
Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
More efficient, because control block and tracked object
are co-located in a single memory allocation.
Change-Id: Id18e2d06db43568eb34c2e2d129d1b116af73acb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
"ssl" should be defined when "openssl" is defined, and WinCE should
default to autodetection of OpenSSL.
Change-Id: I5693923ba2d3fea1a670df556c107e6ff75e6575
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The only tricky part here is to take the size of the moved-to
member, not the moved-from parameter QString object.
To avoid accidents, give the lvalue version the same structure.
Change-Id: Ic68bb896f1d817c21d913feab43522235c51029b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
When streaming non-Q_FLAG QFlags, factor the common code
into a helper function only templated on QFlags<T>::Int
and pass what varies as parameters.
Then overload the helper function for the most common int
type (int) as an out-of-line function, implemented via the
primary template to avoid the two going out of sync.
That leaves the primary helper template only for special
cases (such as future extensions).
Change-Id: I70e0001bcfacab9f8765c9b1075fe80b596223f1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
What triggered this change was the use of QVector::toList() in
op<<(QDebug, QVector).
Only added support for STL types of which we already include the
headers.
[ChangeLog][QtCore][QDebug] Can now output std::vector, std::list,
std::map, and std::multimap.
Change-Id: I49581e3038daa7626b00169430b72d3d5175eae7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Detected with a modified (deep const propagating) shared data pointer.
Most are fixed by using copy constructor and assignment operator
of the shared pointer instead of feeding it .data(). The rest
required adding const locally.
Change-Id: I51e36b9e7040dc2211ef4c5dadfbda73ad22c414
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Leaf result classes do not need to be exposed in the headers. The
implementations were inconsistent on this point.
Change-Id: I5bd41ae9e77b932f6232218a014400a59f2ef5a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
and remove a stray one.
Change-Id: I1a10688e6cf916aa93f383ecc9e9aa8e28966e95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andre Somers <andre@familiesomers.nl>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Change-Id: Idfaef408536bafbb31444ec8728dbcf289abac8d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
In some configurations we may end up using Mesa's EGL headers instead
of the Broadcom ones. Make this work by setting the usual define to
prevent including Xlib headers that then conflict with all sorts of
things in QtCore.
Change-Id: I4970553428e5b0e81bd76694980f3b6b194ae4c2
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
longer term, the redundant .dlls from the libdir will hopefully
disappear. short term, this is a workaround for CI brokenness.
Change-Id: Ia30173355f3aca222d4ca40e7a38c2cf535bbc03
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Since AArch64 NEON assembly is different from Arm32 NEON we need to
write a separate version.
Assembly is used over intrinsics as the intrinsics have trouble
efficiently using the vstX and vldX instructions.
Change-Id: I5b67fc87acb2433b503e658099b742d57a9cff18
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
The macro __ARM64_ARCH_8 is only set by Apple's flavor of clang. GCC and
mainline clang set __ARM_ARCH to 8, and set __ARM_ARCH_8A (when
applicable).
Change-Id: I356b785ffdbfedf8f1ed682840db431db2779ba5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As these are strongly typed, they won't implicitly convert to int, so make sure
to cast explicitly.
(cherry picked from commit 9626baaea9, auto test
is not included)
Task-number: QTBUG-49597
Change-Id: I29c4331a9b0c61f2e60c2bcab5a99f65daa7060f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Ensure the test works in a working directory with read-only
permission and that the file names are unique.
The test can then be executed repeatedly by COIN even in case
left-over hanging process helpers still lock the files. Also
disambiguate the "data" files used by various tests.
Task-number: QTBUG-47370
Change-Id: I3b9c7b70828da78f400196fcbba27bc61ea4538f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Speeds up application startup by a few percent, even with just a normal
amount of fonts installed.
Change-Id: I4c3d87119ddbc53e66166f21cb72946cdf7e4a41
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Introduce constants and make the interval for the 2nd thread a bit
longer.
Task-number: QTBUG-49653
Change-Id: I92ac0494ec6c9af5bde858007d08e26210215434
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Introduce a base class for the threads that ensures termination in the
destructor to ensure all QThreads instantiated on the stack are terminated.
This should reduce crashes since the test thread classes have pointers
to stack variables of the test slots.
Set object names on the threads for better diagnostics.
Decouple wakeOne()/wakeAll() that impact each other via the static count
variables of the thread class by introducing a base class WakeThreadBase
keeping a pointer to an QAtomicInt count variable on the stack instead
(similar to the existing pointers to the mutexes, etc).
Task-number: QTBUG-49653
Change-Id: I73537386bf36019efa81e8e24ba9af92506f7794
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
QSystemTrayIcon's window should send QEvent::ToolTip to QSystemTrayIcon
main class under X11. This patch fixes regression inroduced in Qt 5.0.
Change-Id: I81f6d85e13f492e5e7d13dacc44185a511e5085d
Task-number: QTBUG-46130
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The __ARM_NEON is the standard define for NEON instructions support
__ARM_NEON__ is only legacy, and specifically not defined in
AArch64 builds, which causes us not to detect NEON support there.
The NEON assembler files doesn't build with AArch64, so the NEON
drawhelper methods must be excluded for now.
Change-Id: Ie32f855bde94ee7efd8a8ddb7766c931778e729b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The xcodebuild tool only supports the install action for devices, not
for the iOS simulator platform.
Change-Id: I47e8bb7d44962bd4a433a314fa9d315ed3683ca6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
In a Chrome Remote Desktop session the htotal and/or vtotal timings
can be zero and lead to a SIGFPE exception.
Task-number: QTBUG-49322
Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
The scaling bit was being set incorrectly in two ways. First, the two
flags SourceOverPixmapCapability and SourceOverScaledPixmapCapability
where being confused. Second, the scaling bit was being set on the wrong
mask.
Change-Id: I4bed44f8bb82f153bc35ad2b580d33b8b6f11f89
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Since 4f8c75acbd, we require HB>=0.9.42, which assumes
multi-treading support.
On OS X, -qt-harfbuzz is still required for AAT fonts support.
Change-Id: I2a95b2c245a1eb2c580306ede7ee4eb0c7727317
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Fix syncqt-warning:
QtWidgets: qtbase/src/widgets/styles/qpixmapstyle_p.h does not have the "We mean it." warning
Change-Id: I66ab3a12e53fe91254d539e236a58ada16bb2cd2
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
As 3D touch can be disabled/enabled at runtime on those devices, we need
to watch for changes to the relevant settings and update the touch device
capabilities that we report to the user.
Note that iOS will deliver touchesBegan with a touch force of 0, which
we will reflect/propagate as a 0 pressure, but there is no clear
alternative, as we don't want to wait for a touchedMoved before
sending a touch press event to Qt, just to have a valid pressure.
Change-Id: I47fb8a9f98ab3244e16a337bbfcf1fe24e4c7aa2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
We test that inline conversion between same image depths always succeed
inline, but that requires that any direct conversions exists both in
non-inline and inline versions.
This patch adds a non-sse2 inline conversion from ARGB32 to ARGB32PM
which was missing.
Change-Id: I71937cd4b77fb41fe2064da937f6dcbf2a6534e6
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
As a follow-up to 352c357e6f enabling
support for multiple evdevtablet plugins at runtime (one per device),
we also need to adjust the way QGuiApplication handles the events
received from those plugins, in particular when multiple devices
are sending tablet events concurrently.
Replace the static members in QGuiApplication by a vector storing
the same data per-device, so tablet press/release events can be
recognized independently.
Change-Id: Ie0975cdb03a8f6d05903e2e2e57ceb9de73a74a4
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
It was used to verify waitForFinished() and printed QProcess::errorString()
on failure, which is misleading, since the process is not
in an error state - it is still running. Example:
QWARN : tst_QProcess::setStandardOutputFileAndWaitForBytesWritten() QProcess error: 5: Unknown error
FAIL! : tst_QProcess::setStandardOutputFileAndWaitForBytesWritten() 'ret' returned FALSE. ()
Use a plain QVERIFY instead.
Task-number: QTBUG-47370
Change-Id: Iacfa6e1a5ffd2be4e1257a27a400ccc59671e8c8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Silence warning:
Don't know how to handle 'hint', use qRegisterMetaType to register it.
Task-number: QTBUG-49623
Change-Id: Iec0a823c7af87eddd9a3f126a1b970da1ff2f03f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Don't know how to handle 'hint', use qRegisterMetaType to register it.
becomes:
QSignalSpy: Unable to handle parameter 'hint' of type 'QAbstractItemModel::LayoutChangeHint' of method 'layoutChanged', use qRegisterMetaType to register it.
Task-number: QTBUG-49623
Change-Id: I5020bb5b6f4ba87438d0f862279bed1ceb203d12
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
0e99f3c broke tst_qquicktextinput::horizontalAlignment_RightToLeft()
and tst_qquicktextedit::hAlign_RightToLeft(). This fix was proposed
by Konstantin.
Change-Id: I602b7301d415f266224ae2c1ffd81244e9565862
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>