[ChangeLog][Important Behavior Changes] QDebug output for QStrings
changed compared to Qt 5.5.0 to more closely match the output of
previous Qt versions. Like Qt 5.5.0, QDebug will escape non-printable
characters, the backslash and quote characters, but will no longer
escape the printable characters.
Task-number: QTBUG-47316
Change-Id: I52dd43c12685407bb9a6ffff13f62ef68cbc80c5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Otherwise, on some systems (Windows), we'll always create the same dirs.
Change-Id: Id3d5c7bf4d4c45069621ffff13f79ba91e0f974b
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
A couple of test always fail on OS X/iOS with SecureTransport
(simply not implemented yet).
Change-Id: Idd82262512938c36b657b497751738fdc804c182
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Richard J. Moore <rich@kde.org>
[ChangeLog][QtCore][QLoggingCategory] Fixed behavior of default
severity passed to constructor or Q_LOGGING_CATEGORY with regards to
QtInfoMsg, which was previously treated as being more severe than
QtFatalMsg.
This is because the code was using the numeric value of QtMsgType as a
proxy for severity (via the <= operator), but the value of QtInfoMsg is
greater than QtFatalMsg. Instead, the severity ordering must be dealt
with explicitly.
Change-Id: I5f178afc735221b00cb67c2cea4fa964bd9079ce
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Also removed the XFAIL from connectToUnresponsiveHost
Change-Id: Ie0f5685a8fa437c00d22f9e76b51ac61347ce03b
Task-number: QTBUG-15111
Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: Ie29640451dddeb58342038a8cd5fac152cce39e5
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Build it only in -developer-build mode for tests that might depend
on exact-matching font behavior.
Return earlier to avoid doing any useless job.
Change-Id: I966ee5689f03403e45f4c957b63e3113f0467803
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: I624deb320c378c18a29b3707f48583d53bfd5186
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: Icaa1edafcc6e2779fbd6dbc2c058544d6e07f1e9
Reviewed-by: Richard J. Moore <rich@kde.org>
The QSslCertificate tests only covered certificates with RSA keys, this
extends the test coverage to DSA and EC keys.
Change-Id: Ibee26f449cf6c1d97cbac6b511972eb44d6f0bd2
Reviewed-by: Richard J. Moore <rich@kde.org>
All overloads of QProcess::start will now check whether the program
string is empty and in that case
- set error to FailedToStart,
- set errorString to "No program defined",
- emit error.
Until now only one of the three overloads behaved like this.
As a side effect, start(QString(), QStringList()) will not crash on
Windows anymore.
Task-number: QTBUG-47404
Change-Id: I2f93657204fe3643b1d74a74817843c05fc4a96b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: I4e4a319c5918d697a33f6d6032c36b8c9660ca05
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Introduce overloads in the API to allow specifying multiple color
attachment sizes and formats. When these are in use and MRT is supported,
a texture or renderbuffer is created for each of GL_COLOR_ATTACHMENT0, 1, 2, ...
[ChangeLog] Added support for multiple render targets in QOpenGLFramebufferObject
Task-number: QTBUG-39235
Change-Id: Ie7cfd81d1b796a9166b80dff7513aafe0120d53d
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
According to history, the test was supposed to verify
the correct parsing of the command line on Windows by the qWinCmdLine()
function in corelib. It did not test anything since the test
application printed out argv[1] instead of
QCoreApplication::arguments()[1]. Since qWinCmdLine() has been replaced
by the WinAPI CommandLineToArgvW(), the test no longer makes sense
and also starts to fail then warnings are printed to the error output.
Change-Id: Idf642783ebb56eaa8fba9004174557485563a84f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
So we can have interoperability with algorithms.
Motivated by inefficient code like qDeleteAll(hash.keys())
[ChangeLog][QtCore][QHash] Added key iterators, accessible through
keyBegin() and keyEnd().
Change-Id: I1f9db8a7a4294e1556cbb50b8fe5ebdcf0dc29a2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
So we can have interoperability with algorithms.
Motivated by inefficient code like qDeleteAll(map.keys())
[ChangeLog][QtCore][QMap] Added key iterators, accessible through
keyBegin() and keyEnd().
Change-Id: Ieee2f9ad031e9d1e845a71447746699bbe95b96c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The comment about non-OpenSSL backends not reproting a specific error
for self-signed certificates contained a typo, this fixes it.
Change-Id: I3010981d5d87d68ebf5e984c003b8bbbfb019b96
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Non-OpenSSL backends are not able to report a specific error code
for self-signed certificates.
Change-Id: I56bf130335b2afa65cf2bd5248a40ac0e32f74c2
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Rename the test slot eventFilter() to testEventFilter(), which fixes:
tst_qgraphicsproxywidget.cpp:101:10: warning: 'tst_QGraphicsProxyWidget::eventFilter' hides overloaded virtual function [-Woverloaded-virtual]
void eventFilter();.
Change-Id: Ia05d188b18dcbf3a0b093dcea19a7122bcde6e62
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
tst_qgraphicsanchorlayout.cpp:144:5: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
layoutGeometry.adjusted(+right, +top, -left, -bottom);
Change-Id: I411ccaa867e418f36869fc244ea2eeaa5b117312
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Fix warnings:
tst_qtcpsocket.cpp:245:9: warning: private field 'numConnections' is not used [-Wunused-private-field]
int numConnections;
^
tst_qtcpsocket.cpp:1834:9: warning: private field 'exitCode' is not used [-Wunused-private-field]
int exitCode;
tst_qcheckbox.cpp:86:10: warning: private field 'tmp' is not used [-Wunused-private-field]
uint tmp;
^
tst_qcheckbox.cpp:88:10: warning: private field 'tmp2' is not used [-Wunused-private-field]
uint tmp2;
Below warning is caused by code #ifdefed for OS X only, make it a local variable:
tst_qlabel.cpp:114:16: warning: private field 'test_edit' is not used [-Wunused-private-field]
QLineEdit *test_edit;
Change-Id: I53c755545fe2e7ca1f053f40c8c0e50aec2efcdd
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
in tests/auto/other, tests/auto/printsupport and tests/auto/xml.
Change-Id: I28cbdc89d36791f179425f17f90b697c60660938
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Preparing the replacement of Q[TRY]_VERIFY(a == b) by
Q[TRY]_COMPARE(a, b) for non-boolean types.
Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: I7add5b7afeba83895acdcbed110e8275dc76864a
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The history state had the limitation that it was hard (or impossible) to
use when more than one default state had to be entered. For example,
using it in a parallel state was impossible without ending up in an
infinite loop.
This patch changes the QHistoryState to only have an initial transition,
and the state selection algorithm is changed accordingly. It also brings
QStateMachine closer to the SCXML standard.
The existing defaultState is implemented on top of the
defaultTransition: when used, a new transition, with the default state as
its target, is set as the defaultTransition.
Task-number: QTBUG-46703
Change-Id: Ifbb44e4f0f26b72e365af4c94753e4483f9850e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
A parallel state cannot have an initial state, as all children of the
parallel state will be entered. Setting such an initial state on a
QState marked as ParallelStates would already produce a warning and
ignore the initial state. Now any initial state that has been set before
changing the child-mode to ParallelStates will also produce a warning
and remove the previously set initial state.
Change-Id: Ie5fcd44b03516744f785f2d1880bf806918c44d4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Add QTRY_VERIFY2_WITH_TIMEOUT() similar to QTRY_VERIFY_WITH_TIMEOUT()
except that QTRY_VERIFY2() is used below the loop and QTRY_VERIFY2()
based on it.
Add tests to cmptest.
[ChangeLog][QtTest] Added macros QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2()
making it possible to output a message after the timeout has expired.
Change-Id: I587e24f3aeb73542dbf3ccb936a16f2e0806555f
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Set QFileDevice::WriteUser on all files extracted from resources. These
are read-only, which is preserved by QFile::copy(). This caused the
deletion of the temporary directory to fail on Windows.
Change-Id: Id99de9160471c38bcec68025c89cfabbe209bdbe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
[ChangeLog][QtCore][QProcess] Fixed a bug that caused QProcess to launch
a child process on Unix even if the directory specified with
setWorkingDirectory did not exist.
Task-number: QTBUG-47271
Change-Id: Ib306f8f647014b399b87ffff13f195158b0e52f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We force a recreation of the library paths with added information on
construction of QCoreApplication. This way we can find plugins in
the application directory which only becomes known when
QCoreApplication is created. When the user changes the library path
we create a new list of the manually modified library paths and
recalculate it from the delta of original vs. modified paths when
QCoreApplication is created.
The upsides of this approach vs. keeping an explicit delta are:
* We don't need to introduce a separate data structure to hold
the added/removed status for delta items or the information that
the whole list got replaced.
* The lists never get larger than the the real library paths. An
explicit delta would have to record all modifications.
* I don't think the delta replay algorithm we would have to do
anyway could be made much more compact than the one this change
introduces.
Of course, if the user actually changes anything, the list is
duplicated. Considering that this is a rarely used function and
that we would have to save some extra information anyway, I think
we can live with this.
Task-number: QTBUG-38598
Change-Id: I3bfbbd1be62dd5804dcc7ac808b053428a4e3149
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This adds an OpenSSL-based implementation of the QSslKeyPrivate encrypt
and decrypt method. This puts both the OpenSSL-based and non-OpenSSL
backends (WinRT for now) on par.
Change-Id: I18a75ee5f1c223601e51ebf0933f4430e7c5c29b
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This is low-hanging fruit, for two reasons:
1. The implementation is dead-simple (unlike, say, in QList).
2. It's completely transparent to the QVector user (unlike,
say, emplace_back, which can only be used inside an ifdef).
Change-Id: Iaf750100cf61ced77aa452f0e4e3c4ec36b29639
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
FileInfo is larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile property
of (inefficient) QLists that references to elements therein never are
invalidated.
Change-Id: I772177c5ac544a5fecce2368f628148308ef260f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The overload was added for NokiaX86 and RVCT and is bound for
removal.
Task-number: QTBUG-47260
Change-Id: Ic67cee8769847956e16cd0470ebcd663a9e98a40
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Long-lived threads started by Qt itself can now receive events even if
QCoreApplication hasn't been created. This is required in all threads we
start that will handle events, unless we're sure that the thread will
exit before the global application object begins destruction.
Otherwise, those threads will have race conditions dealing with the
event delivery system trying to call the QCoreApplication::notify()
virtual while the object is being destroyed.
Change-Id: I27eaacb532114dd188c4ffff13d4ad2a4bb443e6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Otherwise, if I open tests/auto/dbus/dbus.pro in Qt Creator, it shows me
"test", "test2", "test3", "test4" and it's very hard to know which test
is which.
Change-Id: Iee8cbc07c4434ce9b560ffff13d0654696c025b7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
I'm getting an error with WSARecvFrom in nativeBytesAvailable() and I
don't know why. The number of bytes obtained is correct and the test
works for 2 bytes, so let's use that.
The Windows nativeBytesAvailable() function has a comment saying that
WSAIoctl sometimes indicates 1 byte available when there's a pending
error notification, so that function proceeds to do a WSARecvFrom to
peek the number of bytes. Somehow that function in this test is getting
a SOCKET_ERROR I can't explain.
Change-Id: Ic5b19e556e572a72a9df9a405b1fee3b7efb8b24
Reviewed-by: Richard J. Moore <rich@kde.org>
From MSVC 2015 onwards, MSVC formats floats using printf("%g") like
g++, so the fiddling of the expected output needs to restricted
accordingly.
Change-Id: I6e7f78e5e90f70886a8b2ef37c0fb9bf82b5e1a3
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>