Commit Graph

6950 Commits

Author SHA1 Message Date
Edward Welbourne
02af515528 tst_qnetworkreply: use preprocessor rather than "commenting out"
Debug code is suppressed; let someone investigating a problem be able
to turn it on/off by just editing one byte instead of each line of the
block of debug code.

Change-Id: Iba06df4042d9126d3a5d0873e524ef504c19d3de
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 08:00:01 +00:00
Edward Welbourne
fc3346cba8 tst_qnetworkreply: use .left(...) in place of .mid(0, ...)
Change-Id: Iaa150788011552e19b239e675862c0224dbcefc9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:54 +00:00
Edward Welbourne
558cb8e6ec tst_qnetworkreply: ditch fatuous 1* on a constant
Change-Id: I0960fccaaf1316b822c26c5c8be1504469a63ddc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:47 +00:00
Edward Welbourne
99d2e0f861 tst_qnetworkreply: condition dereferencing on non-null
The (event) loop member spends most of its time NULL, so make sure
slots that dereference it can't trip up if called asynchronously when
it is.

Change-Id: If634df0ecf9650b52621bdb5a3e9f151abbc18fc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:41 +00:00
Edward Welbourne
2f865adb16 tst_qnetworkreply: purge stray space inside parenthesis
Change-Id: I82c382b4678c3bd8517221c85febdd174f7058d4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:34 +00:00
Edward Welbourne
06c7d67e13 tst_qnetworkreply: linearise a succession of checks
Restructure an if { if/else} else chain so that it reads more logically.

Change-Id: I0d9a68451147d2b7e6a6d01cf7bee1a64b9902a7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:28 +00:00
Edward Welbourne
32fbcf71ee tst_qnetworkreply: restructure #if-ery round a condition
If SSL was unavailable but requested (should never happen)
MiniHttpServer::incomingConnection() would have crashed on
dereferencing unset member client.  Rework the run-time conditioning
on SSL to sit entirely inside the #if-ery on SSL support, so that
client is at least set in each code-path.

Change-Id: I9a8ee8e4186e16dd0d00b7f9cc9b988f0b4c62ff
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:21 +00:00
Edward Welbourne
0b3509d85d tst_qnetworkreply: deduplicate some code
Moved a line of code that appeared after each call to setupSslServer()
into that function and replaced a copy of its code with a call to it.
Moved a line from the end of both branches of an if/else to after it.

Change-Id: I74ef3e643e41ce0279a6de7f4828baea4423f267
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:16 +00:00
Edward Welbourne
d037cb7821 tst_qnetworkreply, coding style: fixes to brace-placement
Many struct, class and function bodies had their open braces on the
declaring line rather than on a line of their own.  Split some lines
up and joined others in the course of resolving.  Removed a stray
semicolon after a constructor body.

Change-Id: I492233ca8c499f13ebe4b7d63349382e5eaa1e19
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:10 +00:00
Edward Welbourne
0971a46e50 tst_qnetworkreply: drop semicolon from end of do-while macro body
The whole point of this pattern is that the macro can be used with a
semi-colon after it and be a single statement; if it has a semicolon
in it, that makes it two (so, e.g., using it as the body of an if,
without braces, won't let you follow it with an else).

Change-Id: I57aca35898711ca24e10ddab73e075d361ef7eb8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-25 07:59:04 +00:00
Marc Mutz
eee4167a90 Remove tests/auto/other/atwrapper
If it hasn't been ported to QNetworkAccessManager until now, it probably
doesn't add much value, so remove.

Found while looking for remaining QUrlInfo users.

Task-number: QTBUG-19452
Change-Id: I842f2cbd3ed4770096b06415f0c8b9fd8f1965c3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-08-24 12:25:52 +00:00
Jake Petroules
57378a108c Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:05:55 +00:00
Marc Mutz
2f108fafe9 tst_QSslSocket: clean up
- port Q_FOREACH to C++11 range-for
- port use of inefficient QLists to QVector
- port from QSharedPointer to auto variables except where the
  payload is returned from a function (there ported to
  QSharedPointer::create())

Fixes errors pointed out by my tree's static checks.

In sslErrors(), fixed an unwanted double-detach problem by
adding a strategic qAsConst().

Change-Id: I8148e23b73337f6f1a721e009f2974536d8447cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-19 19:03:54 +00:00
Timur Pocheptsov
4c27221295 Refactor Http2::FrameReader/Http2::FrameWriter
Introduce  new entity: class Http2::Frame with accessors like
payloadSize/type/flags/streamID etc. (they actually read
/interpret raw bytes from a frame's buffer) instead of
duplicating this functionality in reader/writer classes.
Delete defaulted members and remove explicitly defined
move ctors/operators (not needed actually).

Update auto-test ('HTTP/2 server') to use these new classes.

Change-Id: Ie3516efbd095704e212142eef9e792323678ccfa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-19 16:26:36 +00:00
BogDan Vatra
691dc71a01 Say hello to Q_NAMESPACE
Q_NAMESPACE is useful to add Q_ENUM_NS/Q_ENUMS, Q_FLAG_NS/Q_FLAGS and
Q_CLASSINFO to a namespace.

[ChangeLog] Added Q_NAMESPACE which can be used to add Q_ENUM_NS/
Q_ENUMS, Q_FLAG_NS/Q_FLAGS and Q_CLASSINFO to a namespace

Task-number: QTBUG-54981
Change-Id: Ic61b972794063e77134681fb347d6c4acddcdb44
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-08-19 15:41:27 +00:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Oswald Buddenhagen
d5dc46d319 employ QMAKE_USE: LIBS += $$QMAKE_LIBS_FOO
this migrates the cases where the build system already made (some) use
of variables (possibly) set by configure.

Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:36 +00:00
Milla Pohjanheimo
bc2cee35c3 Blacklisting tst_QWidget::saveRestoreGeometry test on Ubuntu 16.04
The test is blacklisted already for Ubuntu 14.04, and needs to be
blacklisted for Ubuntu 16.04 too.

Task-number: QTBUG-46116
Change-Id: Ic321a4fd13e00c653e6c387d8a159832173b2eb3
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2016-08-18 11:37:15 +00:00
Timur Pocheptsov
2e4e73d8d3 HTTP/2 - fix invalid read (auto-test)
Since headersFrame is a reference to a vector's element, clearing this
vector before accessing headersFrame.flags is not a good idea, must be
done later.

Change-Id: I80eee0761ac1cad580e979be9371ec7588a694ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-17 20:23:59 +00:00
Jake Petroules
f1f767da92 Don't build the tests which require helpers on UIKit platforms
These tests use helpers, which are not supported on UIKit platforms.

Change-Id: I51447754dba2cd2547be05c3767e4ff3b6b5a671
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 21:22:15 +00:00
Liang Qi
17198e03ab Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/global/qglobal.cpp
	src/corelib/tools/qstring.cpp
	src/network/socket/qabstractsocket.cpp
	src/network/socket/qnativesocketengine_unix.cpp
	src/plugins/platforms/eglfs/api/qeglfsglobal.h

Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
2016-08-16 07:58:32 +02:00
Timur Pocheptsov
bdc16cce79 HTTP/2 - fix QT_NO_SSL build
Recently enabled cleartext fails to build with QT_NO_SSL - fix
test and QNAM.

Change-Id: I467edab8e4eb5113715ad2d3b3022e0d8c027de8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-15 07:59:32 +00:00
Thiago Macieira
12eacc3bab Long live QDeadlineTimer
It's like QElapsedTimer, but marks a time in the future instead.

[ChangeLog][QtCore] Added QDeadlineTimer, a counterpart to
QElapsedTimer, used to mark a time point in the future (a deadline) and
determine whether such a deadline has passed.

Change-Id: Ifea6e497f11a461db432ffff144921f7fbc1d1d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-15 03:07:16 +00:00
Liang Qi
6b8f422c5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/io/qsettings.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp

Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
2016-08-13 01:05:02 +02:00
Marc Mutz
033ebfae21 QSslDiffieHellmanParameters: make fit for release
- add missing \since 5.8 on free functions
- fix \relates of qHash to point to QSslDHP, not QHash, which is in another module
- API fix: use named instead of unnamed ctors
- share code between ctors
- API fix: add inline move ctor (for now, this requires using a naked d pointer,
  which isn't much of a problem, since the class is immutable).

Change-Id: Ic30f9c3c03b8a3798e0676e38991ead85c587214
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-12 12:33:07 +00:00
Topi Reinio
a2ae631c04 Doc: Change instances of '(Mac) OS X' to 'macOS'
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change the occurrences where the Mac platform
is discussed to use a macro \macos, which expands to 'macOS'. This
helps with adapting to future renaming.

Update the instructions on mac-specific Q_OS_* macro usage.

Add a \target for the old 'Qt for OS X' topic to keep links working
for other documentation modules that try to link with the old name.

Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-08-12 08:30:29 +00:00
Marc Mutz
c38ac3dab8 tst_QStringListModel: don't leak memory when tests fail
Simply allocate objects on the stack instead of the heap.

Change-Id: Ic047d78e49668878821cce1c8ab599a8551b6476
Reviewed-by: David Faure <david.faure@kdab.com>
2016-08-12 08:28:07 +00:00
Marc Mutz
b57f743c46 QStringListModel: fix dataChanged's roles parameter
In QStringListModel, the display and the edit roles are synonyms,
so when one is changed, the other changes with it. However, in
setData() we only emitted a vector with just the role that was
passed in by the user.

Fix by always passing both roles, regardless of which one was used
to set the data.

Change-Id: I498e7cb33796fae266901817b01ad85d861d4bb4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-08-12 08:27:53 +00:00
Simon Hausmann
8e29d463dc Make imageAt and formatAt more robus against different font metrics
Don't try to locate the text by coordinates at the edge of the text but
simply aim at the center vertically _and_ horizontally.

Task-number: QTBUG-52991
Change-Id: Ia9e84fc5d12491840e739c4eea730fe13058f3c7
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
2016-08-12 03:59:23 +00:00
Morten Johan Sørvig
b0abe20d4b Darwin: Add QImage::toCGImage() conversion function
(Move QT_FORWARD_DECLARE_CG to qglobal.h)

This function converts to CGImage for supported formats. This
is done by creating a CGImageRef that reuses the QImage data.

The CGImage and QImage ref counting systems are bridged, implemented
by using CGDataProvider that holds a copy of the QImage.

Unlike the previous internal implementation this public version
does not implicitly convert unsupported formats to ARGB32_Premultiplied.

See included documentation for the complete description.

Change-Id: Ie3984a7a8331e02a6f1c42943caaf76854e93538
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-08-11 21:21:05 +00:00
Timur Pocheptsov
69ff49e8f1 Enable cleartext HTTP/2 and bring the auto-test back to life
HTTP/2 does not require TLS connection, it can work in a cleartext mode.
Plus at the moment only OpenSSL backend  allows HTTP/2 negotiation
via ALPN/NPN (and none of our CI configurations with OpenSSL supports
these extensions, rendering HTTP/2 auto-test useless). This patch
implements cleartext HTTP/2 ('h2c') in 'direct' mode - this is
allowed if a client has a prior knowledge that HTTP/2 is supported by
a server.

Change-Id: I4978775e9732c40bc77f549b83bb4a5d1761887e
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-11 15:38:20 +00:00
Marc Mutz
3b0ea78603 tst_QSslSocket::setLocalCertificateChain(): fix resource leak when test fail
The deleteLater() call wasn't reliably reached when tests fail,
so use a QScopedPointer with QScopedPointerDeleteLater deleter.

Change-Id: Ica73bc73c2a0ac1e9b77e4804f2aedcad9b662a0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-08-11 04:34:19 +00:00
Marc Mutz
08a3a52958 Remove ~tst_QImageWriter
The test no longer writes to SRCDIR, so don't try to remove
generated files from there, either.

Amends bb5570082e.

Change-Id: I1d5df88b1865f3dbd914ec71147de61e173f2f4e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-08-11 04:34:14 +00:00
Liang Qi
8ba384a564 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
2016-08-10 17:43:13 +02:00
Oswald Buddenhagen
9945763cab remove redundant x11 handling
one of the effects of CONFIG+=x11 is LIBS+=$$QMAKE_LIBS_X11, so it's
positively pointless for project files to do the same.

Change-Id: I4085acd6254401897b34e131c2cb57f1f76a3638
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:11 +00:00
Oswald Buddenhagen
0eff800e81 add support for returning the command's exit status to $$system()
... and make use of it in qtRunLoggedCommand().

Change-Id: I242dfde344f555800cef1f55d3cb85418a93277f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:29 +00:00
Oswald Buddenhagen
c1ad0c2ebf Fix QZip autotest and enable QZip and QTextOdfWriter tests again
don't refer to non-existent feature 'OdfWriter', and test these
classes if we have a developer build.

Change-Id: I59b0d4bbba4958ed3bd76f504cd8b493dbd7f877
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-10 15:42:01 +00:00
Jędrzej Nowacki
25b72a63ff Fix memory leak in tst_qgraphicsproxywidget
QStyle was created but never removed

Change-Id: I55011377afd475af28e4ce2cf657e435dd37c96a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-08-10 11:06:31 +00:00
Olivier Goffart
5699530758 Add a benchmark for QReadWriteLock
Results on current dev branch [955b2bdfc0]:

thread count: 4
********* Start testing of tst_QReadWriteLock *********
Config: Using QtTest library 5.8.0, Qt 5.8.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 6.1.1 20160707)
PASS   : tst_QReadWriteLock::initTestCase()
PASS   : tst_QReadWriteLock::uncontended(nothing)
RESULT : tst_QReadWriteLock::uncontended():"nothing":
     1,113,292.1 CPU ticks per iteration (total: 11,132,922, iterations: 10)
PASS   : tst_QReadWriteLock::uncontended(QMutex)
RESULT : tst_QReadWriteLock::uncontended():"QMutex":
     35,490,310.7 CPU ticks per iteration (total: 354,903,108, iterations: 10)
PASS   : tst_QReadWriteLock::uncontended(QReadWriteLock, read)
RESULT : tst_QReadWriteLock::uncontended():"QReadWriteLock, read":
     40,513,695.0 CPU ticks per iteration (total: 405,136,950, iterations: 10)
PASS   : tst_QReadWriteLock::uncontended(QReadWriteLock, write)
RESULT : tst_QReadWriteLock::uncontended():"QReadWriteLock, write":
     43,179,327.2 CPU ticks per iteration (total: 431,793,272, iterations: 10)
PASS   : tst_QReadWriteLock::uncontended(std::mutex)
RESULT : tst_QReadWriteLock::uncontended():"std::mutex":
     37,733,243.0 CPU ticks per iteration (total: 377,332,430, iterations: 10)
PASS   : tst_QReadWriteLock::uncontended(std::shared_timed_mutex, read)
RESULT : tst_QReadWriteLock::uncontended():"std::shared_timed_mutex, read":
     71,517,438.7 CPU ticks per iteration (total: 715,174,388, iterations: 10)
PASS   : tst_QReadWriteLock::uncontended(std::shared_timed_mutex, write)
RESULT : tst_QReadWriteLock::uncontended():"std::shared_timed_mutex, write":
     69,967,867.5 CPU ticks per iteration (total: 699,678,676, iterations: 10)
PASS   : tst_QReadWriteLock::readOnly(nothing)
RESULT : tst_QReadWriteLock::readOnly():"nothing":
     479,393,335.3 CPU ticks per iteration (total: 4,793,933,354, iterations: 10)
PASS   : tst_QReadWriteLock::readOnly(QMutex)
RESULT : tst_QReadWriteLock::readOnly():"QMutex":
     823,493,383.2 CPU ticks per iteration (total: 8,234,933,832, iterations: 10)
PASS   : tst_QReadWriteLock::readOnly(QReadWriteLock)
RESULT : tst_QReadWriteLock::readOnly():"QReadWriteLock":
     559,816,053.6 CPU ticks per iteration (total: 5,598,160,536, iterations: 10)
PASS   : tst_QReadWriteLock::readOnly(std::mutex)
RESULT : tst_QReadWriteLock::readOnly():"std::mutex":
     961,903,416.3 CPU ticks per iteration (total: 9,619,034,164, iterations: 10)
PASS   : tst_QReadWriteLock::readOnly(std::shared_timed_mutex)
RESULT : tst_QReadWriteLock::readOnly():"std::shared_timed_mutex":
     1,786,254,363.5 CPU ticks per iteration (total: 17,862,543,636, iterations: 10)
PASS   : tst_QReadWriteLock::cleanupTestCase()
Totals: 14 passed, 0 failed, 0 skipped, 0 blacklisted, 44507ms
********* Finished testing of tst_QReadWriteLock *********

Change-Id: I42189f7a356dcb36378e9d54111b7fbe89e62402
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-10 09:05:14 +00:00
Liang Qi
2579fe7bfd Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-08-09 16:00:53 +00:00
Liang Qi
22e96c4d34 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
2016-08-09 17:59:51 +02:00
Maurice Kalinowski
39def876a6 winrt: update tests
Update due to behavior differences between win32 and winrt.

Change-Id: I39532de98c25cd67da49cbb20d42dccc803f1805
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-08-09 15:58:12 +00:00
Maurice Kalinowski
bd79c4e28c winrt: Make test functional
The adoptedThreads test never spawned any thread causing a test error
later on. Hence add a winrt version using __beginthreadex which exists
for that platform.

Change-Id: I04f980218713df20cb41d804d732e0c99b958489
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-08-09 12:13:23 +00:00
Ulf Hermann
fa95eb0554 QHeaderView: Reset lastSectionLogicalIdx on clear()
Otherwise we can fail to stretch the last section when adding new
sections.

Task-number: QTBUG-52446
Change-Id: I7eb5267ac500bf4246e57c3e3a43268bb65ef1f7
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2016-08-09 08:08:30 +00:00
Thiago Macieira
6f275a4beb Make sure QDBusConnection::connect() returns false if already connected
QDBusConnection::connect() behaves like QObject::connect with a
connection type of Qt::UniqueConnection | Qt::QueuedConnection. So
return false if it's already connected.

[ChangeLog][QtDBus][QDBusConnection] Fixed a bug that would cause
QDBusConnection::connect() to return true if a slot was already
connected to the same D-Bus signal. QtDBus does not support multiple
connections.

Change-Id: I87e17314d8b24ae983b1fffd1453aef5a7c9ad0b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-08-09 02:41:22 +00:00
Oswald Buddenhagen
22d1351dde print no message at all when no argument is supplied to error()
this is useful when an adequate message has already been emitted by
other means, like various built-ins do.

Change-Id: I092771f55969fad8b214204d666327664727c572
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-08 09:48:38 +00:00
Jarek Kobus
385ab06fb1 Always generate size hint for spacer items
Task-number: QTBUG-55008
Change-Id: I53c86b64aa3c0a3e5f80551baefe775c2d4b1e90
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-08-08 07:55:57 +00:00
Marc Mutz
964290126e tests/auto/corelib/codecs: clean up
- port Q_FOREACH to C++11 range-for
- port uses of inefficient QLists to QVector

Fixes errors pointed out by my tree's static checks.

Change-Id: Ica50f44d862f635df06cb8f09ce506b9d30fdfc5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-06 14:49:21 +00:00
Marc Mutz
e38064f698 tst_utf8: use QScopedPointer, not QSharedPointer
There's no sharing, and the use of QSharedPointer(T*)
triggers my tree's static analyzer.

Easiest fix is to port to QScopedPointer, which is the
correct smart pointer to begin with.

Change-Id: I105c1a334c3d6712a475600c8394b0bebc420677
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-06 14:49:16 +00:00
Marc Mutz
c0b6e16ffa tests/auto/corelib/global: clean up
- port Q_FOREACH to C++11 range-for
  (except in the Q_FOREACH tests :)
- port uses of inefficient QLists to QVector
- include QTest, not QtTest

Fixes some errors pointed out by my tree's static checks.

Change-Id: Ibb21a280537af74dda5679ec7c75d59477b6de55
Reviewed-by: David Faure <david.faure@kdab.com>
2016-08-06 14:49:09 +00:00