The QSslSocket one is both wrong and redundant as there is a
Q_DECLARE_METATYPE for it already.
Change-Id: I63d065abfb3d0e3d82a8b1f29a6752b7676db847
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
there is no point to use this for in-module references.
cleaning it out in an attempt to purge the constants entirely.
Change-Id: I1da4d70e3778257dd43eda0bdfc71eaec1124732
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Also change Trolltech for QtProject in other places
Task-number: QTBUG-23269
Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Execute the test in a temporary directory, purge remaining files
except the special readonly-files in cleanup().
Avoid repeated invocation of QFINDTESTDATA() by assigning to
member variables.
Do more checks in rename(), check on contents of file.
Generally, use more QVERIFY2, print error messages.
Task-number: QTBUG-3570
Change-Id: Ibd0e11a361208a716ea3efbcca76adeda70e061a
Reviewed-by: David Faure (KDE) <faure@kde.org>
When the floating-point behavior in MSVC is set to "precise" (default),
assigning nan numbers to a float causes the bit pattern to be altered
(only affects 32bit builds). We should therefore not assign the swapped
value back to a float and use it.
Task-number: QTBUG-25950
Change-Id: I7b6cc4d546e5c8aeafdede749056358b7d639ec7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
On the BlackBerry platform, applications run in a sandbox. They are
not allowed to read or write outside of this sandbox. Hence in
QSettings there is no use for the system scope and differentiating
between organization and application. This change will also improve
performance.
Change-Id: I79fee0140595385f3d33bd89fe5daa36b04836bc
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
If ReadFile returns with an error then we must set our internal state
accordingly. QWindowsPipeReader::readSequenceStarted must be set to
false. If ReadFile fails, we're not within a read sequence.
Also, we must handle the ERROR_BROKEN_PIPE error.
Task-number: QTBUG-25342
Change-Id: Ic9247f170fa9cc47fa7e45d0f47ccfedac06a593
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Change-Id: Ia9bf8d3c202b17746036e203268ef6229aaa900d
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Remove QSKIP and instead omit the whole tests when appropriate.
Remove QSKIP from crashTest, crashTest2 and exitStatus on Windows,
the tests are now passing.
Add a guard in testForwarding to check if QT_NO_PROCESS is defined.
Change-Id: Icba4d773315e3bf87764a381742168b51cf169c0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
The test expects 'fail:invalid' to be an invalid file,
which it no longer is on Windows 7. It also assumes that
f: is an invalid drive. Fix by picking a drive that does not exist.
Task-number: QTBUG-27306
Change-Id: I9d9b36c50fc31d2561d3c4eec66f65d96084f0d7
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
On Fedora 17 /sbin/ is a symlink now, so this test fails there.
Using /usr/ instead.
Change-Id: Ie35902fc093101191bdbf33324e20835d1da1528
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Normalise all signal/slot signatures in tests/*/corelib,
except in tst_QObject, where they might be test data.
Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
tst_QProcess::echoTest_performance() is not an unit test but a
performance test, so moving it from 'tests/auto/corelib/io/qprocess'
to 'tests/benchmarks/corelib/io/qprocess'
Change-Id: I796788534eafc5ca3b8d86c0ec46998285fd4b8f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Instead omit the whole test when Q_OS_WINCE is defined.
Change-Id: Ifd09048687db95913f39a64cffb42a743af8fa81
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_WINCE is defined.
Change-Id: Ic69accb138121d2b39f068cef181da13b18e46ee
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the omit the whole test when Q_OS_WINCE is defined.
Change-Id: I8c0f12c63bbc4567edb3a8626ab060d5ce38f3cd
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_WINCE is defined.
Change-Id: I356af3ea145012142b3cf2af0b5d813d4be07a25
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_MAC is defined.
Change-Id: I7d35c99ecd69b3c5bb8f8590342edd9665300709
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Instead omit the whole tests when Q_OS_WINCE is defined.
Change-Id: Idb15d622c9e1dbe4c8ec6a43c34a88e7fef2a384
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_WINCE is defined.
Change-Id: I19e35b837709c92e0202c6a96d113367bc6c92c2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This reverts commit daba2c507ad42c66dafa6a29cffa94e9641e0c58,
re-applying commit d9c06bf25210b3d0b31ee6126e57bcb82c292da1, because
the change was accidentally brought back in commit
eae8fb8599.
There's a potential deadlock when a QProcess is created while a
QCoreApplication is instantiated but never executed, or if the main
thread waits() for the child thread.
Task-number: QTBUG-27260
Change-Id: I9e0fdc0341b3063de90979377bac35f2a827b260
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Cursor dependant auto tests are currently skipped in various ways.
Some are checking PlatformQuirks::haveMouseCursor() that tries to
detect if the desktop environment is MeeGo, using obsolete Q_WS_X11.
Some are skipped if QT_NO_CURSOR or Q_OS_WINCE is defined and
some are actually missing the approriate guards.
=> unify by defining QTEST_NO_CURSOR in qtest-config.h when
appropriate ie. for platforms that have no regular mouse cursor
support or when QT_NO_CURSOR is defined.
Task-number: QTBUG-22551
Change-Id: I9a1e0e3156617945ae46226c79268955454c8a9a
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Append the Windows executables suffixes from the PATHEXT
environment variable.
The previous code had a bug since the 'break' statement
bailed out of the inner loop only.
Factor search code out into a separate functions, avoiding
repeated invocations of list.constEnd() and variable
assignments in the old code.
Add a static function that is called on Unix and on Windows
for executable names with a suffix.
Call another function applying a candidate list of suffixes
in case an executable name without a suffix is passed.
Lower case the extensions from PATHEXT, streamline code.
Split up the test, add a _data() slot for clarity.
Task-number: QTBUG-27457
Change-Id: I2bf34de52aeadddd3b937ad1e22191c3c850fd26
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Keep the original QString that triggered the parsing error, instead of
just one QChar. This provides more powerful error messages, like:
Invalid IPv6 address; source was "http://[:::]"; scheme = "http", host = ""
(QUrl cannot keep invalid hostnames)
Invalid port or port number out of range; source was "http://example.com:abc"; scheme = "http", host = "example.com"
(QUrl cannot keep a non-numeric port number)
Invalid path (character '%' not permitted); source was "foo:/path%?"; scheme = "foo", path = "/path%25%1F"
(the tolerant parser runs first, so the faulty component is fixed)
This stores the error state in a special structure which is not
allocated under normal conditions, keeping the memory consumption
down. On 32-bit systems, QUrlPrivate does not increase in size; on
64-bit systems, it grows by 8 bytes.
Change-Id: I93d798d43401dfeb9fca7b6eed7ea758da10136b
Reviewed-by: David Faure <faure@kde.org>
Make both invalid hostname messages start with "Invalid hostname". And
split the empty port error from the invalid port one.
Change-Id: I870d1ed6fb07ec494f553871a37ed167141ffc06
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
That's what we have QUrl::errorString() for. This will become evident
especially now that QUrl::toString() / toEncoded() return empty if
there are errors.
Change-Id: I64a84e9c6ee57c0fc38cc0c58f5286ddc1248d1f
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
These two errors can only happen if one calls setPath() explicitly. They
cannot happen for parsed URLs, which is why they are only caught with
isValid(). It's not possible to set the error condition in setPath()
either because they depend on the presence / absence of the authority
and scheme.
Also update all the unit tests that set a path not starting with a slash
and were just "freeloaders" on the previous behaviour.
Change-Id: Ice58cd4589a850452d7573a5b19667bbab2fb43e
Reviewed-by: David Faure <faure@kde.org>
This tests QProcess::setProcessChannelMode().
The tests verifies if testForwarding really forwards
the output of testProcessEcho (spawned by testForwarding).
Change-Id: Ifc4164569256aeaeab0edef42116986272362c01
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
As it was confusing to use the term local file when referring
to a file that was accessible using native APIs and not just
a file that was on a hard disk somewhere already the function
name has been changed.
By renaming it to createNativeFile we keep it consistant with QFileInfo
which has an isNativeFile() function too.
Test also added.
Task-number: QTBUG-3169
Change-Id: I410e7ed28133d68fd312c6c0faf3f7191460d7ce
Reviewed-by: João Abecasis <joao@abecasis.name>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_QWinOverlappedIoNotifier::multipleOperations starts asynchronous
read and write operations on the same named pipe handle.
The received notifications must contain the right byte count and
OVERLAPPED pointer corresponding to the I/O operation.
Change-Id: I6f3fa5cf3ca6d62fcb9bc7073d28611fcfa7d98a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
When doing multiple I/O operations on the same handle, we get notified
for every operations. These must be distinguished by comparing the
pointer to the OVERLAPPED struct.
We now pass the OVERLAPPED pointer via the notified signal and let the
receiver decide if it wants to handle this notification.
Change-Id: I4efe70f39c6ae5282b949f2f4b21f6e7dd3df785
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
According to the repo history the tailFile was introduced with the
S60 port but the functionality it's testing was never implemented.
Task-number: QTBUG-22341
Change-Id: I16e8e43bbd799f05f8b136925cb0add0b918289e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
While the large data block can be written to a file, the test is
also showing instability while reading back the written block.
Adding another expected failure to address this instability.
Task-number: QTBUG-26906
Change-Id: I9704d441cf2bd6d7ef0f9023240ea61bb89561b6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
The current check is not enough to catch the unstable failure.
Update the test to catch the failure in all cases.
Task-number: QTBUG-26906
Change-Id: I2e37a1f6513df768cd410df7c91a9fd843150e57
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Member variables for lastSeparator, first and lastDotInFileName are now
initialized to -1 (non-existing), where the previous value of zero would
mean a separator/dot at that position and resulted in path() returning
'/', instead of '.'.
Tests were expanded for better coverage of empty state and
default-constructed instances.
Change-Id: Ie27547886b52224d38b5be0b4f920c9927fd440f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
The test is not hanging on Windows anymore.
On Windows, add an expected failure for the failing case.
Task-number: QTBUG-22801
Task-number: QTBUG-27306
Change-Id: Iede95766504f3e8a278a4554a5967ca333aae3bf
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Change copyrights and license headers from Nokia to Digia
Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
The Blackberry OS uses a filesystem with the noatime option,
which returns a "wrong" access time.
Change-Id: I04cdb899699e819a36e0917e30d750067b33388d
Reviewed-by: Tobias Koenig
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Changing it outside of the test function definition to avoid running
empty/inapplicable test functions.
Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Caroline Chao <caroline.chao@nokia.com>