Commit Graph

25971 Commits

Author SHA1 Message Date
Liang Qi
1377709711 Added -lsocket in QMAKE_LIBS_CORE for QNX
This change ammends 105fc117.

Change-Id: I154f968c450dafa6269c5d4210e02dcc2280598e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: James McDonnell <jmcdonnell@qnx.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-12-02 17:10:43 +00:00
Tony Sarajärvi
609aaf64dc Remove insignificant flag for qstatictext test
Task-number: QTBUG-28593
Change-Id: Idcffe328dcb8d17b12244574518bb091157ae41e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-12-02 16:31:41 +00:00
Friedemann Kleint
b24bb12f6a Testlib: Move documentation from qtestcase.cpp to qtestcase.qdoc.
Previously, one had to skip  1300 lines of documentation before
seeing the actual code in this file.

Task-number: QTBUG-38890
Change-Id: I5a375cbe6b62575f6040e952a0931ac8ea2dd557
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-12-02 11:09:18 +00:00
Oswald Buddenhagen
a5a4c02d72 fix copy&paste-o in HostVar error message
Change-Id: Id70452d160d60c8f1defa10e163a8eba899e32ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-01 17:18:58 +00:00
Oswald Buddenhagen
a9090afbd0 remove now unnecessary indirections
qt5 qmake is perfectly capable of complex expressions on the LHS.

Change-Id: Ibf8c82a4aa1a419895c6012610269e1cc9ca93ab
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-01 17:18:53 +00:00
Andy Shaw
00648503bb Include the qml files into a resource when building a static plugin
Whenever a qml plugin is made static, the qmldir and other related
files need to be compiled into the resources, so they can be found
in the import path. By using qrc:/qt-project.org/imports, we can
have this taken care of automatically for us via the build system,
leaving us to just ensure that it is initialized in the code.

Task-number: QTBUG-35754
Change-Id: Ifa7e2a66fd78dc6713dd7a8661ea2c155b174d35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-01 16:11:17 +00:00
James McDonnell
72de2ae317 Add a file to the TESTDATA list
The file exists but it isn't listed in TESTDATA.  This is only a problem
when the target is a another system as is the case with Qt for QNX.
Tests fail because the file isn't deployed.

Noticed this while testing the changes for custom spacing of JSON
output.

Task-number: QTBUG-47437
Change-Id: I098c34d2ab9027956d9233b24f30b5192ecfe96f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-01 14:52:33 +00:00
Erik Verbruggen
4e8f07cd0f Use __builtin_clz/ctz when available.
Nicely ask the compiler if it has a built-in for clz/ctz before
resorting to CPU specific brute force measurements.

Change-Id: Ifa992267ec4528219d7da14524af738316ceeaea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-01 12:51:04 +00:00
Marc Mutz
bf7ce1ff84 QDirModel: replace a copy by a reference
Since we are storing pointers to the elements of the
vector thus copied, we better make sure we don't cause
it to deep-copy. The old code was fragile in that sense,
using a reference removes one layer of potential mess-ups.

Change-Id: Ib8ebbb47c2a478b5e666e767d05429700b528afd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-01 12:45:36 +00:00
Marc Mutz
cb7d397e3d Simplify QAbstractItemViewPrivate::canDrop()
Scope some variables better and drag a constant
expression out of the loop, at the expense of
executing it unconditionally. That should not
be a problem, as all operands of the expression
are calls to const member functions.

Change-Id: Ibcf54b2e2faf9a818df7d12c0790c1f173c8a8ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-01 12:45:29 +00:00
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