Commit Graph

116 Commits

Author SHA1 Message Date
Ville Voutilainen
0e4cc15da3 Fix comparison between nullptr and QWeakPointer
The comparison between nullptr and QWeakPointer was just bogus
and ill-formed. The INTEGRITY compiler catches that even if
nothing tries to use the comparison. It is an ill-formed, no
diagnostic required case of a function template never being
able to produce a valid specialization. And while we're at
it, this patch makes the result of comparing a nullptr to
a QWeakPointer or vice versa the same as asking .isNull() from
the weak pointer, because it seems mind-boggling if those
are not the same operation.

Task-number: QTBUG-93093
Change-Id: I0cc80e795c9af2be1b76de05157aa458ef260f2e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-28 23:33:06 +03:00
Ville Voutilainen
e439fab4be Resurrect tests for QSharedPointer
Task-number: QTBUG-93093
Change-Id: I030c18db1ab9e48cbd3339bc2040ba0b46cd1370
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-27 01:33:42 +03:00
Joerg Bornemann
ad2da2d27a Remove the qmake project files
Remove the qmake project files for most of Qt.

Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.

Also leave the qmake project files for utils and other minor parts that
lack CMake project files.

Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-07 15:32:28 +01:00
David Skoland
27d96b4789 Replace QtTest headers with QTest
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.

Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-22 15:20:30 +01:00
Allan Sandfeld Jensen
564b59d903 Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.

Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-10-07 23:02:47 +02:00
Lars Knoll
557623cc4f Rename QLibraryInfo::location() to path()
As per ### Qt6 comment. Also rename the LibraryLocation enum
to LibraryPath.

Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-12 23:35:56 +02:00
Thiago Macieira
7e93870401 QProcess/Unix: introduce setChildProcessModifier()
[ChangeLog][Source-Incompatible Changes] QProcess::setupChildProcess()
was removed. To execute code in a child process, use
QProcess::setChildProcessModifier()

[ChangeLog][QtCore][QProcess] Added setChildProcessModifier() function
with which one can provide code to be run in the Unix child process
between fork() and execve(). With this function, it is no longer
necessary to derive from QProcess in order to execute actions in the
child process.

Another reason is that we can tell whether the std::function carries a
valid target much more easily than we can tell whether QProcess was
overridden.

The setupChildProcess() virtual function does not need to be marked
final, since no overrider could ever return an inaccessible private
class. This also makes sure the error presented to the user is about the
return type, not about attempting to override a final.

Clang:
 error: virtual function 'f' has a different return type ('void') than the function it overrides (which has return type 'QProcess::Use_setChildProcessModifier_Instead')

GCC:
 error: conflicting return type specified for 'virtual void MyProcess::setupChildProcess()'
 note: overridden function is 'virtual QProcess::Use_setChildProcessModifier_Instead QProcess::setupChildProcess()'

ICC:
 error: return type is neither identical to nor covariant with return type "QProcess::Use_setChildProcessModifier_Instead" of overridden virtual function "QProcess::setupChildProcess"

MSVC is not relevant since it doesn't compile to Unix.

Change-Id: Ia8b65350cd5d49debca9fffd15f801161363aea7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-09-08 21:00:29 -07:00
Edward Welbourne
e40320c552 QWeakPointer: purge deprecated API
Since 5.0: assignment/construction from QObject pointer
Since 5.14: data() to recover the packaged pointer

Change-Id: I5d6ab561ce39bc0d9d3e5035eb2ca38139cd76b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-31 10:32:39 +02:00
Allan Sandfeld Jensen
6f0df02d00 Replace Qt CONSTEXPR defines with constexpr
Both normal and relaxed constexpr are required by our new minimum of
C++17.

Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-14 15:52:58 +02:00
Thiago Macieira
95afe6b244 QSharedPointer: do allow calling deleters on null pointers
I don't know why std::shared_ptr allows this, but why not.

[ChangeLog][Important Behavior Changes] QSharedPointer objects will now
call custom deleters even when the pointer being tracked was null. This
behavior is the same as std::shared_ptr.

Fixes: QTBUG-85285
Pick-to: 5.15
Change-Id: I24006db8360041f598c5fffd161c260df0313b55
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-07-31 10:40:25 -07:00
Jarek Kobus
989fca660c Use QList instead of QVector in corelib tests
Task-number: QTBUG-84469
Change-Id: Ic80fde5517aed363f17d0da55cadcc958c3c8895
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 11:48:45 +02:00
Giuseppe D'Angelo
3e1d03b1ea Port Q_STATIC_ASSERT(_X) to static_assert
There is no reason for keep using our macro now that we have C++17.
The macro itself is left in for the moment being, as well as its
detection logic, because it's needed for C code (not everything
supports C11 yet).  A few more cleanups will arrive in the next few
patches.

Note that this is a mere search/replace; some places were using
double braces to work around the presence of commas in a macro, no
attempt has been done to fix those.

tst_qglobal had just some minor changes to keep testing the macro.

Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-19 19:38:23 +02:00
Lars Knoll
c6e1b54f94 Cleanup code where we mixed QHash and QMultiHash iterator code
Change-Id: Ib229cad13ca21d6288e009c6ee1c39fa974f80b8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Qt Forward Merge Bot
b327807c5e Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/io/qstandardpaths_unix.cpp
	src/corelib/tools/qsharedpointer_impl.h
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
2019-10-24 10:23:44 +02:00
Milian Wolff
014d7ac654 Q{Shared,Weak}Pointer: Reduce overload sets in implicit conversions
Only allow implicit conversions when the types involved are compatible.
That means, only allow construction and copy assignment when the type
X* is convertible to type T*. This is done using SFINAE and the
std::is_convertible type trait, which makes the previous
QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete.

This patch fixes compilation when a function is overloaded with
Q{Shared,Weak}Pointer of different, incompatible types. Previously, this
resulted in a compilation error due to an ambiguous overload.

Change-Id: I069d22f3582e69842f14284d4f27827326597ca2
Fixes: QTBUG-75222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-11 16:53:23 +02:00
Sona Kurazyan
9b3e8b32f2 Remove usages of deprecated APIs of corelib
- Replaced the usages of deprecated APIs of corelib by corresponding
  alternatives in the library code and documentation.

- Modified the tests to make them build when deprecated APIs disabled:
    * Made the the parts of the tests testing the deprecated APIs to
      be compiled conditionally, only when the corresponding methods are
      enabled.
    * If the test-case tests only the deprecated API, but not the
      corresponding replacement, added tests for the replacement.

Task-number: QTBUG-76491
Task-number: QTBUG-76539
Task-number: QTBUG-76541
Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-05 11:25:46 +02:00
Giuseppe D'Angelo
34fe9232db Port from QAtomic::load() to loadRelaxed()
Semi-automated, just needed ~20 manual fixes:

$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} +
$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} +

It can be easily improved (e.g. for store check that there are no commas
after the opening parens). The most common offender is QLibrary::load,
and some code using std::atomic directly.

Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-06-20 20:48:59 +02:00
Allan Sandfeld Jensen
cf7d990a48 Fix reference to a dead temporary
NoDefaultConstructorRef1 was taking a reference of the input, which
meant in the first test it would get a reference to the temporary
created by the 1 literal. A temporary that would be out of scope by
the time we check its value.

Instead add a test with unique_ptr to test we can pass movable
temporaries.

Change-Id: I6b02377dfe30c82b6e71bfb3353a81ad81558ed3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-22 11:22:40 +02:00
Liang Qi
b1a216649e Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/unix/unixmake2.cpp
	src/corelib/thread/qthread_unix.cpp
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
2019-06-14 13:45:18 +02:00
Joerg Bornemann
8fe3680193 Add cmdline feature to qmake
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".

Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-02-18 07:12:14 +00:00
Thiago Macieira
f8dba7ac01 tst_QSharedPointer: raise the timeout for running qmake and makespec
We had 30s and 60s only, which isn'tenough for the Qt CI.

Task-number: QTBUG-69741
Change-Id: I00e04a465fcf4fc1a462fffd154782999e84ef8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-04 23:26:24 +00:00
Thiago Macieira
c359df5ca6 Add support for QSharedPointer<cv qualified>::create()
[ChangeLog][QtCore][QSharedPointer] Fixed a problem that made create()
on a type with const qualification fail to compile.

Task-number: QTBUG-68300
Change-Id: I0825ff5b5f6f4c85939ffffd152f3e55e5b9caae
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-05-17 15:08:04 +00:00
Liang Qi
305dd1b61f Merge remote-tracking branch 'origin/5.9' into 5.11
Conflicts:
	.qmake.conf
	src/corelib/animation/qvariantanimation.cpp
	src/corelib/global/qglobal.cpp
	src/corelib/global/qlogging.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/json/qjsonarray.cpp
	src/corelib/tools/qsimd_p.h
	src/corelib/tools/qtimezoneprivate_p.h
	src/corelib/xml/qxmlstream_p.h
	src/gui/kernel/qsimpledrag.cpp
	src/gui/kernel/qsimpledrag_p.h
	src/plugins/generic/generic.pro
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/widgets/styles/qmacstyle_mac.mm
	tests/auto/concurrent/qtconcurrentmap/BLACKLIST
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qmessagebox/BLACKLIST

Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
2018-02-14 12:51:24 +01:00
Friedemann Kleint
b624cdac21 tst_QSharedPointer: Fix termination of external processes on Windows
Timeouts with subsequent failures to delete the temporary
directories have been observed in COIN.

Previously, QProcess:terminate() was used to end the processes,
which does not have any effect on console processes on Windows.
Add a helper function which resorts to kill() on failure
to terminate().

Change-Id: I05539d1703280d34b392f2e8ff8565b9a04d703c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-08 19:56:03 +00:00
Liang Qi
153e8b49ad Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/network/access/qhttp2protocolhandler_p.h
	src/network/kernel/kernel.pri
	src/network/ssl/qsslkey_qt.cpp
	src/plugins/platforms/cocoa/qcocoascreen.mm
	src/plugins/platforms/windows/accessible/iaccessible2.cpp
	src/plugins/platforms/windows/accessible/iaccessible2.h
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
	src/widgets/widgets/qmenu_p.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp
	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
2017-11-23 09:36:03 +01:00
Thiago Macieira
19b0ce5daa Change almost all other uses of qrand() to QRandomGenerator
The vast majority is actually switched to QRandomGenerator::bounded(),
which gives a mostly uniform distribution over the [0, bound)
range. There are very few floating point cases left, as many of those
that did use floating point did not need to, after all. (I did leave
some that were too ugly for me to understand)

This commit also found a couple of calls to rand() instead of qrand().

This commit does not include changes to SSL code that continues to use
qrand() (job for someone else):
  src/network/ssl/qsslkey_qt.cpp
  src/network/ssl/qsslsocket_mac.cpp
  tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-08 09:14:03 +00:00
Giuseppe D'Angelo
71a2dd955c QSharedPointer: add get() for STL compatibility
[ChangeLog][QtCore][QSharedPointer] Added get(), for compatibility
with std::shared_ptr.

Change-Id: I77189c89bc6a222313b9b2353f1fb3969433c750
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-12 14:05:21 +00:00
Allan Sandfeld Jensen
b32b61f17e Remove handling of missing Q_COMPILER_RVALUE_REFS
Remove remaining handling of missing support for rvalue refs.

Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 20:24:45 +00:00
Giuseppe D'Angelo
d4435a37ca Add qobject_cast operators for std::shared_ptr
Mimicking what we currently have for QSharedPointer, but also adding
* snake_case version (matching the ones in std)
* rvalue-overloaded versions (matching the C++2a overloads).

[ChangeLog][QtCore][QSharedPointer] Overloads of
qSharedPointerObjectCast have been added to work on std::shared_ptr.

Change-Id: I26ddffd82b000bf876e7c141fdce86a7b8c1d75a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 18:37:32 +00:00
Allan Sandfeld Jensen
4628e5cded Remove handling of missing very old compiler feature check
Removes handling of missing Q_COMPILER_NULLPTR, Q_COMPILER_AUTODECL,
Q_COMPILER_LAMBDA, Q_COMPILER_VARIADIC_MACROS and
Q_COMPILER_AUTO_FUNCTION.

We haven't supported any compilers without these for a long time.

Change-Id: I3df88206516a25763e2c28b083733780f35a8764
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-06 13:27:15 +00:00
Allan Sandfeld Jensen
1ef274fb94 Replace qMove with std::move
Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-06 11:00:38 +00:00
Friedemann Kleint
807f3d32b1 tst_QSharedPointer: Terminate hanging qmake-processes
Change-Id: I580ff3ccbecba81c09ce3fc3e082b906f956171d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-06-28 17:53:24 +00:00
Tony Sarajärvi
315f634180 Fix autotest not to open too many files on a Unix
tst_QSharedPointer can't create a pipe as the OS has too many files
open. Systems like macOS have a lower limit to these simultaneous files
open.

Task-number: QTBUG-60410
Change-Id: I21e89f992ada2a7d09b706522a05b5952f00ec33
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-05-29 06:46:50 +00:00
Ihor Dutchak
d1210281e4 Fix undefined behavior in QSharedPointer::create()
Initialize a deleter for a new object, created by
QSharedPointer::create(), only after the object is actually
constructed.

[ChangeLog][QtCore][QSharedPointer] Fixed undefined behavior when
creating an object with QSharedPointer::create() and its conscructor
throws an exception.

Task-number: QTBUG-49824
Change-Id: I07f77a78ff468d9b45b8ef133278e8cdd96a0647
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-17 09:56:15 +00:00
Ulf Hermann
44af54419e Properly use the "process" feature
Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in
qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess
headers, exclude the sources from compilation when switched off, guard
header inclusions in places where compilation without QProcess seems
supported, drop some unused includes, and fix some tests that were
apparently designed to work with QT_NO_PROCESS but failed to.

Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-27 15:44:46 +00:00
Marc Mutz
2889ebc903 QSharedPointer: clean up #ifdefs
We require Q_COMPILER_RVALUE_REFS and _VARIADIC_TEMPLATES since Qt 5.7,
so remove the non-variadic version which anyway has zero test coverage.

Also drop #include <utility>, as that is included from qglobal.h already,
and drop QSKIP from test.

Change-Id: I1fc7f7068eac80ad6fd85e1d8f6d33c5c7bb67db
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-08-15 16:55:45 +00:00
Giuseppe D'Angelo
982ef5b494 QSharedPointer/QWeakPointer/QScopedPointer: add comparison against nullptr
Some constructors were added, but the comparison operators were missing.
The STL has them, so we ought have them too.

Change-Id: I030c14a3b355988f509716b4b1b1a835b3ab9481
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-06-08 09:09:47 +00:00
Thiago Macieira
e22a230a03 Make QSharedPointer without custom deleters call the correct destructor
Where "correct" is defined by what std::shared_ptr does as well as what
happens when an intermediate QSharedPointer of the exact type of the
constructor behaves

That is,
   QSharedPointer<X> ptr(new Y);

Behaves like
   QSharedPointer<X> ptr;
   { QSharedPointer<Y> tmp(new Y); ptr = tmp; }

Change-Id: Id75834dab9ed466e94c7ffff14455d445f72592b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-28 12:58:35 +00:00
Thiago Macieira
8026dc6f36 Add support for initializing QSharedPointer from nullptr
std::shared_ptr supports it. To resolve an ambiguous overload when a
literal 0 is passed as a parameter, the normal constructors needed to be
made a template, like std::shared_ptr.

Task-number: QTBUG-52569
Change-Id: Id75834dab9ed466e94c7ffff14451417892d2148
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-19 04:54:36 +00:00
Friedemann Kleint
7fc2864dc5 QtCore: Remove Windows CE.
Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE
and wince .pro file clauses in library, examples and tests.

Task-number: QTBUG-51673
Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-30 11:22:47 +00:00
Liang Qi
0a1af55a9b Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:18 +00:00
Liang Qi
158a3a4159 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qiodevice_p.h
	src/corelib/kernel/qvariant_p.h
	src/corelib/tools/qsimd.cpp
	src/gui/kernel/qguiapplication.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp

Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
2016-01-21 08:17:21 +01:00
Liang Qi
8f569c740a Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	config.tests/common/atomic64/atomic64.cpp
	configure
	src/3rdparty/forkfd/forkfd.c
	src/corelib/io/forkfd_qt.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tools/configure/configureapp.cpp

Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
2016-01-19 10:03:01 +01:00
Marc Mutz
c38b14e251 Fix UB in tst_QSharedPointer::basics()
Binding a reference to the nullptr is undefined
behavior.

Just skip that particular test when 'ptr' is null.

Found by UBSan:
  tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp:258:32: runtime error: reference binding to null pointer of type 'struct Data'

Change-Id: I125588b9d269a6f76716d660d03142f409513885
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-01-07 13:00:40 +00:00
Liang Qi
beb65dcd79 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/gui/painting/painting.pri
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
	tests/auto/corelib/tools/qlocale/test/test.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
	tools/configure/environment.cpp

Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
2015-12-18 08:37:31 +01:00
Thiago Macieira
401507b348 Fix constructing a QSharedPointer<const> of a QEnableSharedFromThis type
It should compile, since the std::shared_ptr does.

[ChangeLog][QtCore][QSharedPointer] Fixed a problem that would cause a
compilation error when constructing a QSharedPointer of a const type
when the type derives from QEnableSharedFromThis.

Task-number: QTBUG-49748
Change-Id: I8de47ed6c7be4847b99bffff141c84f5e0b6bea8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-08 06:32:20 +00:00
Liang Qi
c7934f2489 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/network/kernel/qnetworkinterface_winrt.cpp
	tools/configure/configureapp.cpp

Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
2015-11-18 09:01:51 +01:00
Oswald Buddenhagen
5292dbc595 remove pointless conditional defines
wince triggers the functionally identical cross_compile scope above.

Change-Id: I92cdbb1df51599b2b4aa8a7ca2f3d6407034ba26
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-16 14:40:20 +00:00
Liang Qi
4456984da7 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/tools/qversionnumber/qversionnumber.pro

Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
2015-10-14 15:45:35 +02:00