Commit Graph

25961 Commits

Author SHA1 Message Date
Marc Mutz
9cbee30661 QWindowsFontDataBase: use QSharedPointer::create()
More efficient, because control block and tracked object
are co-located in a single memory allocation.

Change-Id: Ibd1a37836b96837afd6209a743a05a727dbc9907
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-01 12:45:25 +00:00
Jake Petroules
32eeb46f3c Remove Carbon API usage.
The new API has been available since 10.6 or 10.7 and the debugger
indicates it simply calls through to TransformProcessType.

Change-Id: Ia8f82d7426cb409aca8fd5feb8e43e1b0e79f8f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-12-01 03:20:00 +00:00
Louai Al-Khanji
105fc117b7 Add qt_safe_poll
This function is introduced to safely provide poll(2)-like semantics for
socket multiplexing on Unix-like platforms. For platforms where no poll
system call is available, an implementation based on select(2) is provided.

Change-Id: I320e97dae5924316675a74d1897c48cae292ac6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-01 00:13:41 +00:00
Marc Mutz
f9ba58a13b Fix scoping of loop variables in QApplicationPrivate::dispatchEnterLeave()
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>
2015-11-30 14:10:29 +00:00
Mark Brand
22639e65d2 qsql: move QSqlCachedResultPrivate to header
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>
2015-11-30 08:33:33 +00:00
Mark Brand
6303f5c7b8 qsqldriver: use Q_D macro
Change-Id: Ic05165e99e6a5ab8fccc0da5f571f8579f2ab5b2
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-11-30 08:33:20 +00:00
Mark Brand
d8aac3313c qsql: add missing Q_DECL_OVERRIDE
Change-Id: Ic562ee9e287f21d73b94f6dc3c4884a2ed33b9fe
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-11-30 08:32:51 +00:00
Marc Mutz
51089a5742 Use Q_UNLIKELY for every qFatal()/qCritical()
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>
2015-11-29 22:59:17 +00:00
Marc Mutz
14d189f787 AndroidStyle: use std::make_shared()
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>
2015-11-29 22:47:15 +00:00
Andrew Knight
f2fbee5134 configure: Fix (Open)SSL detection on WinCE
"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>
2015-11-29 17:49:33 +00:00
Marc Mutz
9291e2e667 QXmlStreamStringRef: overload ctor from QString with an rvalue version
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>
2015-11-29 11:51:15 +00:00
Sérgio Martins
f7ab19955f Make a couple of iterators trivially-copyable in Qt 6
Change-Id: I1d1c382fa6214590b3a51d77b18c7df390f2dc70
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-11-29 11:45:29 +00:00
Alex Trotsenko
9ac0f47e64 QFile: document a default constructor as public
Change-Id: Ia45b7e9d2c985432bbac9b5428b5424f8d0d78c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-29 09:45:33 +00:00
Tony Sarajärvi
63c3515a87 Update bug ID after insignificant flag
Task-number: QTBUG-49630
Change-Id: I2dba72dd81f267b90ce5b44f68221fdf72b4af41
Reviewed-by: Heikki Halmet <heikki.halmet@theqtcompany.com>
2015-11-29 07:02:40 +00:00
Tony Sarajärvi
b857d4ca8f Remove insignificant flag for a platform not supported
VS2010 is not supported in Qt5.7+

Change-Id: I9961c49750d39dd92b593ae4c29e11d57a3fbbfa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-11-29 07:02:20 +00:00
Marc Mutz
ca1f842158 QDebug: reduce template bloat
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>
2015-11-28 16:26:24 +00:00
Marc Mutz
88d7c8f963 QDebug: refactor streaming of sequential containers and add suppoprt for STL types
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>
2015-11-28 16:25:52 +00:00
Marc Mutz
bfdcbe8bfb QFont*: fix some const-incorrectnesses involving QFontPrivate
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>
2015-11-27 13:50:13 +00:00
Simon Hausmann
69817f6ad1 Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2015-11-27 17:43:53 +00:00
Mark Brand
d6ecdb4344 qsql: move Q<driver>Result out of header
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>
2015-11-27 12:15:15 +00:00
Mark Brand
6333edfdf3 qsql: add missing Q_EXPORT_SQLDRIVER_* macros
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>
2015-11-27 12:15:05 +00:00
Jake Petroules
f00794bb12 Remove dead code.
Change-Id: Idfaef408536bafbb31444ec8728dbcf289abac8d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-11-27 11:55:24 +00:00
Simon Hausmann
ea5f40a788 Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
2015-11-27 08:27:53 +01:00
Alex Trotsenko
bdf49888ef QHttpSocketEngine: remove unused members
Change-Id: I136070100589993dcccf44666851c94d0fd30b1f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2015-11-26 18:45:10 +00:00
Laszlo Agocs
b13801fd55 Avoid pulling in X11 headers in brcm backend
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>
2015-11-26 17:35:56 +00:00
Oswald Buddenhagen
9b2e98245a use bindir instead of libdir when launching tools on windows
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>
2015-11-26 17:03:39 +00:00
Oswald Buddenhagen
94fb31be98 build QML plugins with relative RPATH as well
amends 967372c97.

Change-Id: I898950d6847e43d565748cd8d1ea583cf5ca5c9d
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-26 17:03:32 +00:00
Oswald Buddenhagen
a3bcb68bc8 fix copy&paste-o in DeviceVar error message
Change-Id: I2b7d95c004ce045527b124ef25b6d224535c895b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-26 17:03:28 +00:00
Allan Sandfeld Jensen
7cbbca5860 Add AArch64 ASM to qimage_neon.cpp
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>
2015-11-26 16:46:06 +00:00
Erik Verbruggen
0c9b4c84ad Aarch64: fix Q_PROCESSOR_ARM_V8 detection.
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>
2015-11-26 16:18:30 +00:00
Mark Brand
bd30cb2a91 qsql: remove stray includes and forward decls
Change-Id: I9b8f6283c7e98ab071473f684f3fc22b1c0c7273
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-26 16:09:34 +00:00
Robin Burchell
4a4b17805c Fix QCOMPARE with enum classes.
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>
2015-11-26 16:00:30 +00:00
Friedemann Kleint
adc4894fca tst_QProcess: Use a QTemporaryDir for files to be created.
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>
2015-11-26 15:53:34 +00:00
Volker Krause
45470e71bc Remove O(n^2) behavior in fallbacksForFamily().
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>
2015-11-26 15:52:07 +00:00
Friedemann Kleint
ee632a21f6 tst_QWaitCondition::wakeOne(): Increase wait interval.
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>
2015-11-26 15:51:07 +00:00
Friedemann Kleint
19e295b330 tst_QWaitCondition: Prevent test functions from interfering with each other.
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>
2015-11-26 15:50:36 +00:00
Ilya Kotov
acc3df2c4e Send QEvent::Tooltip to QSystemTrayIcon
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>
2015-11-26 15:48:34 +00:00
Allan Sandfeld Jensen
07fdfa5598 Detect NEON on AArch64
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>
2015-11-26 15:40:41 +00:00
Tor Arne Vestbø
5c446031c3 iOS: Map make install to xcodebuild build for the iOS simulator
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>
2015-11-26 15:37:58 +00:00
Nicolas Capens
7944706857 Fix potential division by zero.
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>
2015-11-26 15:37:45 +00:00
Marc Mutz
5e6816114d QPair: add compile test involving pair with contained C array
Task-number: QTBUG-48780
Change-Id: Ic53121d9251bfdc905c2ed28d1d9716a475e2f5b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-26 15:11:50 +00:00
Marc Mutz
12a9d6be28 QPair: add tests for conversion ctor/assignment operators
Change-Id: Id54ada05f477aa3262ad99d82bc243c3d17e06f0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-11-26 15:11:32 +00:00
Louai Al-Khanji
a9a11f020f QBlitterPaintEngine: Fix capability mask settings
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>
2015-11-26 14:53:13 +00:00
Konstantin Ritt
bd0bd64c08 Configure with -system-harfbuzz by default
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>
2015-11-26 14:19:03 +00:00
Friedemann Kleint
64684c23fd QPixmapStyle: Add "We mean it." warning.
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>
2015-11-26 05:32:37 +00:00
Tor Arne Vestbø
980f8aed32 iOS: Add support for delivering touch pressure on iPhone 6s/6s+ devices
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>
2015-11-26 02:45:57 +00:00
Allan Sandfeld Jensen
9b28fd5bfc Fix inplaceRgbConversion test on non-x86
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>
2015-11-26 02:43:21 +00:00
Romain Pokrzywka
8d6fe1a371 Accept concurrent input from multiple tablet devices in QGuiApplication
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>
2015-11-26 00:51:03 +00:00
Friedemann Kleint
eaf160c586 Add a manual test for cursors in multi-screen/High DPI setups.
Change-Id: I4c0baeaf01f0b3d6162a16ef7fda822f5a4cb1db
Task-number: QTBUG-49511
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-25 20:50:30 +00:00
Friedemann Kleint
3c56e33a27 tst_QProcess: Remove macro QPROCESS_VERIFY().
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>
2015-11-25 20:50:18 +00:00