summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp34
-rw-r--r--tests/auto/corelib/io/qdir/qdir.pro2
-rw-r--r--tests/auto/corelib/io/qdiriterator/qdiriterator.pro2
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro2
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp3
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+haiku/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+haiku/test20
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+haiku/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/qfileselector.qrc3
-rw-r--r--tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp2
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST1
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp2
-rw-r--r--tests/auto/corelib/io/qiodevice/BLACKLIST2
-rw-r--r--tests/auto/corelib/io/qprocess/BLACKLIST2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp168
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp19
-rw-r--r--tests/auto/corelib/io/qsettings/BLACKLIST2
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp8
-rw-r--r--tests/auto/corelib/io/qtextstream/BLACKLIST2
-rw-r--r--tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp3
20 files changed, 169 insertions, 88 deletions
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index 3e19e816c9..db2805ebf0 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -49,6 +49,7 @@ private slots:
void debugWithBool() const;
void debugSpaceHandling() const;
void debugNoQuotes() const;
+ void verbosity() const;
void stateSaver() const;
void veryLongWarningMessage() const;
void qDebugQChar() const;
@@ -192,7 +193,11 @@ public:
QDebug operator<< (QDebug s, const MyLine& line)
{
const QDebugStateSaver saver(s);
- s.nospace() << "MyLine(" << line.p1 << ", " << line.p2 << ")";
+ s.nospace();
+ s << "MyLine(" << line.p1 << ", "<< line.p2;
+ if (s.verbosity() > 2)
+ s << ", Manhattan length=" << (qAbs(line.p2.v1 - line.p1.v1) + qAbs(line.p2.v2 - line.p1.v2));
+ s << ')';
return s;
}
@@ -255,6 +260,33 @@ void tst_QDebug::debugNoQuotes() const
QCOMPARE(s_msg, QString::fromLatin1("'H' \"Hello\" \"Hello\" H Hello Hello"));
}
+void tst_QDebug::verbosity() const
+{
+ MyLine line(MyPoint(10, 11), MyPoint (12, 13));
+ QString output;
+ QDebug d(&output);
+ d.nospace();
+ d << line << '\n';
+ const int oldVerbosity = d.verbosity();
+ d.setVerbosity(0);
+ QCOMPARE(d.verbosity(), 0);
+ d.setVerbosity(7);
+ QCOMPARE(d.verbosity(), 7);
+ const int newVerbosity = oldVerbosity + 2;
+ d.setVerbosity(newVerbosity);
+ QCOMPARE(d.verbosity(), newVerbosity);
+ d << line << '\n';
+ d.setVerbosity(oldVerbosity );
+ QCOMPARE(d.verbosity(), oldVerbosity );
+ d << line;
+ const QStringList lines = output.split(QLatin1Char('\n'));
+ QCOMPARE(lines.size(), 3);
+ // Verbose should be longer
+ QVERIFY2(lines.at(1).size() > lines.at(0).size(), qPrintable(lines.join(QLatin1Char(','))));
+ // Switching back to brief produces same output
+ QCOMPARE(lines.at(0).size(), lines.at(2).size());
+}
+
void tst_QDebug::stateSaver() const
{
MessageHandlerSetter mhs(myMessageHandler);
diff --git a/tests/auto/corelib/io/qdir/qdir.pro b/tests/auto/corelib/io/qdir/qdir.pro
index d3e954bd32..0adc7e0450 100644
--- a/tests/auto/corelib/io/qdir/qdir.pro
+++ b/tests/auto/corelib/io/qdir/qdir.pro
@@ -10,3 +10,5 @@ DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
android:!android-no-sdk {
RESOURCES += android_testdata.qrc
}
+
+win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
index 3b5d2bd931..a2429bf2f0 100644
--- a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
@@ -8,3 +8,5 @@ TESTDATA += entrylist
wince*mips*|wincewm50smart-msvc200*: DEFINES += WINCE_BROKEN_ITERATE=1
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
index de99447404..571637be37 100644
--- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
@@ -7,3 +7,5 @@ RESOURCES += qfileinfo.qrc \
win32:!wince:!winrt:LIBS += -ladvapi32 -lnetapi32
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 96ad78a666..8d276b3616 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -287,7 +287,8 @@ void tst_QFileInfo::initTestCase()
m_resourcesDir = dataPath + QLatin1String("/resources");
m_proFile = dataPath + QLatin1String("/tst_qfileinfo.pro");
- QVERIFY(m_dir.isValid());
+ QVERIFY2(m_dir.isValid(),
+ ("Failed to create temporary dir: " + m_dir.errorString()).toUtf8());
QVERIFY(QDir::setCurrent(m_dir.path()));
}
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+haiku/test b/tests/auto/corelib/io/qfileselector/platforms/+haiku/test
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+haiku/test
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+haiku/test2 b/tests/auto/corelib/io/qfileselector/platforms/+haiku/test2
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+haiku/test2
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+haiku/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+haiku/test
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/corelib/io/qfileselector/platforms/+unix/+haiku/test
diff --git a/tests/auto/corelib/io/qfileselector/qfileselector.qrc b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
index 661647f933..6e2699774d 100644
--- a/tests/auto/corelib/io/qfileselector/qfileselector.qrc
+++ b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
@@ -19,6 +19,7 @@
<file>platforms/+unix/+darwin/+mac/+osx/test</file>
<file>platforms/+unix/+darwin/+mac/test</file>
<file>platforms/+unix/+darwin/test</file>
+ <file>platforms/+unix/+haiku/test</file>
<file>platforms/+unix/+linux/test</file>
<file>platforms/+unix/test</file>
<file>platforms/+windows/+wince/test</file>
@@ -30,6 +31,7 @@
<file>platforms/+osx/test</file>
<file>platforms/+darwin/test</file>
<file>platforms/+mac/test</file>
+ <file>platforms/+haiku/test</file>
<file>platforms/+linux/test</file>
<file>platforms/+wince/test</file>
@@ -39,6 +41,7 @@
<file>platforms/+blackberry/test2</file>
<file>platforms/+ios/test2</file>
<file>platforms/+osx/test2</file>
+ <file>platforms/+haiku/test2</file>
<file>platforms/+linux/test2</file>
<file>platforms/+wince/test2</file>
<file>platforms/+winnt/test2</file>
diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
index b3767b4887..87381f4c4e 100644
--- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
+++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
@@ -89,7 +89,7 @@ void tst_QFileSelector::basicTest_data()
QString expectedPlatform2File(""); //Only the last selector
QString expectedPlatform3File; // Only the first selector (the family)
#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && \
- !defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX)
+ !defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX) && !defined(Q_OS_HAIKU)
/* We are only aware of specific unixes, and do not have test files for any of the others.
However those unixes can get a selector added from the result of a uname call, so this will
lead to a case where we don't have that file so we can't expect the concatenation of platform
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST b/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST
index 3ac0b9dff4..10a4ba069e 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST
+++ b/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST
@@ -6,3 +6,4 @@ windows 64bit msvc
osx
[watchFileAndItsDirectory:native backend-specialchars]
osx
+windows
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 7e56ecaab3..a0434aa8ee 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -553,7 +553,7 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
timer.start(3000);
eventLoop.exec();
int fileChangedSpyCount = fileChangedSpy.count();
-#ifdef Q_OS_WIN64
+#ifdef Q_OS_WIN
if (fileChangedSpyCount != 0)
QEXPECT_FAIL("", "See QTBUG-30943", Continue);
#endif
diff --git a/tests/auto/corelib/io/qiodevice/BLACKLIST b/tests/auto/corelib/io/qiodevice/BLACKLIST
new file mode 100644
index 0000000000..b8a61d3ca9
--- /dev/null
+++ b/tests/auto/corelib/io/qiodevice/BLACKLIST
@@ -0,0 +1,2 @@
+[unget]
+redhatenterpriselinuxworkstation-6.6
diff --git a/tests/auto/corelib/io/qprocess/BLACKLIST b/tests/auto/corelib/io/qprocess/BLACKLIST
new file mode 100644
index 0000000000..dcd913ca49
--- /dev/null
+++ b/tests/auto/corelib/io/qprocess/BLACKLIST
@@ -0,0 +1,2 @@
+[lockupsInStartDetached]
+redhatenterpriselinuxworkstation-6.6
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 0995f764b7..caefc3fc21 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -124,9 +124,9 @@ private slots:
void removeFileWhileProcessIsRunning();
void fileWriterProcess();
void switchReadChannels();
-#ifdef Q_OS_WIN
+ void discardUnwantedOutput();
void setWorkingDirectory();
-#endif // Q_OS_WIN
+ void setNonExistentWorkingDirectory();
#endif // not Q_OS_WINCE
void exitStatus_data();
@@ -220,7 +220,6 @@ void tst_QProcess::getSetCheck()
QCOMPARE(QProcess::ProcessChannel(QProcess::StandardError), obj1.readChannel());
}
-//-----------------------------------------------------------------------------
void tst_QProcess::constructing()
{
QProcess process;
@@ -282,7 +281,6 @@ void tst_QProcess::simpleStart()
QCOMPARE(qvariant_cast<QProcess::ProcessState>(spy.at(2).at(0)), QProcess::NotRunning);
}
-//-----------------------------------------------------------------------------
void tst_QProcess::startWithOpen()
{
QProcess p;
@@ -300,7 +298,6 @@ void tst_QProcess::startWithOpen()
QVERIFY(p.waitForFinished(5000));
}
-//-----------------------------------------------------------------------------
void tst_QProcess::startWithOldOpen()
{
// similar to the above, but we start with start() actually
@@ -319,7 +316,6 @@ void tst_QProcess::startWithOldOpen()
QVERIFY(p.waitForFinished(5000));
}
-//-----------------------------------------------------------------------------
void tst_QProcess::execute()
{
QCOMPARE(QProcess::execute("testProcessNormal/testProcessNormal",
@@ -327,7 +323,6 @@ void tst_QProcess::execute()
QCOMPARE(QProcess::execute("nonexistingexe"), -2);
}
-//-----------------------------------------------------------------------------
void tst_QProcess::startDetached()
{
QProcess proc;
@@ -339,7 +334,6 @@ void tst_QProcess::startDetached()
QCOMPARE(QProcess::startDetached("nonexistingexe"), false);
}
-//-----------------------------------------------------------------------------
void tst_QProcess::readFromProcess()
{
int lines = 0;
@@ -349,7 +343,6 @@ void tst_QProcess::readFromProcess()
}
}
-//-----------------------------------------------------------------------------
void tst_QProcess::crashTest()
{
qRegisterMetaType<QProcess::ProcessState>("QProcess::ProcessState");
@@ -362,11 +355,13 @@ void tst_QProcess::crashTest()
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
- QSignalSpy spy(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
- QSignalSpy spy2(process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished));
+ QSignalSpy spy(process, &QProcess::errorOccurred);
+ QSignalSpy spy2(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy spy3(process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished));
QVERIFY(spy.isValid());
QVERIFY(spy2.isValid());
+ QVERIFY(spy3.isValid());
QVERIFY(process->waitForFinished(30000));
@@ -374,7 +369,10 @@ void tst_QProcess::crashTest()
QCOMPARE(*static_cast<const QProcess::ProcessError *>(spy.at(0).at(0).constData()), QProcess::Crashed);
QCOMPARE(spy2.count(), 1);
- QCOMPARE(*static_cast<const QProcess::ExitStatus *>(spy2.at(0).at(1).constData()), QProcess::CrashExit);
+ QCOMPARE(*static_cast<const QProcess::ProcessError *>(spy2.at(0).at(0).constData()), QProcess::Crashed);
+
+ QCOMPARE(spy3.count(), 1);
+ QCOMPARE(*static_cast<const QProcess::ExitStatus *>(spy3.at(0).at(1).constData()), QProcess::CrashExit);
QCOMPARE(process->exitStatus(), QProcess::CrashExit);
@@ -387,7 +385,6 @@ void tst_QProcess::crashTest()
QCOMPARE(qvariant_cast<QProcess::ProcessState>(stateSpy.at(2).at(0)), QProcess::NotRunning);
}
-//-----------------------------------------------------------------------------
void tst_QProcess::crashTest2()
{
process = new QProcess;
@@ -397,7 +394,7 @@ void tst_QProcess::crashTest2()
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
- QSignalSpy spy(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy spy(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::errorOccurred));
QSignalSpy spy2(process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished));
QVERIFY(spy.isValid());
@@ -423,7 +420,6 @@ void tst_QProcess::crashTest2()
#ifndef Q_OS_WINCE
//Reading and writing to a process is not supported on Qt/CE
-//-----------------------------------------------------------------------------
void tst_QProcess::echoTest_data()
{
QTest::addColumn<QByteArray>("input");
@@ -438,8 +434,6 @@ void tst_QProcess::echoTest_data()
QTest::newRow("10000 bytes") << QByteArray(10000, '@');
}
-//-----------------------------------------------------------------------------
-
void tst_QProcess::echoTest()
{
QFETCH(QByteArray, input);
@@ -484,14 +478,11 @@ void tst_QProcess::echoTest()
}
#endif
-//-----------------------------------------------------------------------------
void tst_QProcess::exitLoopSlot()
{
QTestEventLoop::instance().exitLoop();
}
-//-----------------------------------------------------------------------------
-
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::echoTest2()
@@ -543,7 +534,6 @@ void tst_QProcess::echoTest2()
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// Reading and writing to a process is not supported on Qt/CE
-//-----------------------------------------------------------------------------
void tst_QProcess::echoTestGui()
{
QProcess process;
@@ -572,7 +562,6 @@ void tst_QProcess::testSetNamedPipeHandleState()
}
#endif // !Q_OS_WINCE && Q_OS_WIN
-//-----------------------------------------------------------------------------
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
// Batch files are not supported on Windows CE
void tst_QProcess::batFiles_data()
@@ -601,7 +590,6 @@ void tst_QProcess::batFiles()
}
#endif // !Q_OS_WINCE && Q_OS_WIN
-//-----------------------------------------------------------------------------
void tst_QProcess::exitStatus_data()
{
QTest::addColumn<QStringList>("processList");
@@ -644,7 +632,7 @@ void tst_QProcess::exitStatus()
process->deleteLater();
process = 0;
}
-//-----------------------------------------------------------------------------
+
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::loopBackTest()
@@ -670,7 +658,6 @@ void tst_QProcess::loopBackTest()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::readTimeoutAndThenCrash()
@@ -688,8 +675,10 @@ void tst_QProcess::readTimeoutAndThenCrash()
QCOMPARE(process->error(), QProcess::Timedout);
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
- QSignalSpy spy(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy spy(process, &QProcess::errorOccurred);
+ QSignalSpy spy2(process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
QVERIFY(spy.isValid());
+ QVERIFY(spy2.isValid());
process->kill();
@@ -698,6 +687,8 @@ void tst_QProcess::readTimeoutAndThenCrash()
QCOMPARE(spy.count(), 1);
QCOMPARE(*static_cast<const QProcess::ProcessError *>(spy.at(0).at(0).constData()), QProcess::Crashed);
+ QCOMPARE(spy2.count(), 1);
+ QCOMPARE(*static_cast<const QProcess::ProcessError *>(spy2.at(0).at(0).constData()), QProcess::Crashed);
delete process;
process = 0;
@@ -750,7 +741,6 @@ void tst_QProcess::deadWhileReading()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::restartProcessDeadlock()
@@ -780,7 +770,6 @@ void tst_QProcess::restartProcess()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::closeWriteChannel()
@@ -808,7 +797,6 @@ void tst_QProcess::closeWriteChannel()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE"
void tst_QProcess::closeReadChannel()
@@ -840,7 +828,6 @@ void tst_QProcess::closeReadChannel()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::openModes()
@@ -885,7 +872,6 @@ void tst_QProcess::openModes()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
@@ -921,7 +907,6 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
}
#endif
-//-----------------------------------------------------------------------------
void tst_QProcess::hardExit()
{
QProcess proc;
@@ -945,7 +930,6 @@ void tst_QProcess::hardExit()
QCOMPARE(int(proc.error()), int(QProcess::Crashed));
}
-//-----------------------------------------------------------------------------
void tst_QProcess::softExit()
{
QProcess proc;
@@ -1055,7 +1039,6 @@ private:
QByteArray dataToWrite;
};
-//-----------------------------------------------------------------------------
void tst_QProcess::softExitInSlots_data()
{
QTest::addColumn<QString>("appName");
@@ -1065,7 +1048,6 @@ void tst_QProcess::softExitInSlots_data()
#endif
QTest::newRow("console app") << "testProcessEcho2/testProcessEcho2";
}
-//-----------------------------------------------------------------------------
void tst_QProcess::softExitInSlots()
{
@@ -1081,7 +1063,6 @@ void tst_QProcess::softExitInSlots()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::mergedChannels()
@@ -1106,7 +1087,6 @@ void tst_QProcess::mergedChannels()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
@@ -1161,7 +1141,6 @@ void tst_QProcess::forwardedChannels()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::atEnd()
@@ -1222,7 +1201,6 @@ private:
int exitCode;
};
-//-----------------------------------------------------------------------------
void tst_QProcess::processInAThread()
{
for (int i = 0; i < 10; ++i) {
@@ -1233,7 +1211,6 @@ void tst_QProcess::processInAThread()
}
}
-//-----------------------------------------------------------------------------
void tst_QProcess::processesInMultipleThreads()
{
for (int i = 0; i < 10; ++i) {
@@ -1258,7 +1235,6 @@ void tst_QProcess::processesInMultipleThreads()
}
}
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForFinishedWithTimeout()
@@ -1279,7 +1255,6 @@ void tst_QProcess::waitForFinishedWithTimeout()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForReadyReadInAReadyReadSlot()
@@ -1308,7 +1283,6 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot()
@@ -1320,7 +1294,6 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
@@ -1347,7 +1320,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot()
@@ -1357,7 +1329,7 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot()
QTestEventLoop::instance().exitLoop();
}
#endif
-//-----------------------------------------------------------------------------
+
void tst_QProcess::spaceArgsTest_data()
{
QTest::addColumn<QStringList>("args");
@@ -1410,7 +1382,6 @@ static QByteArray startFailMessage(const QString &program, const QProcess &proce
return result;
}
-//-----------------------------------------------------------------------------
void tst_QProcess::spaceArgsTest()
{
QFETCH(QStringList, args);
@@ -1483,7 +1454,6 @@ void tst_QProcess::spaceArgsTest()
#if defined(Q_OS_WIN)
-//-----------------------------------------------------------------------------
void tst_QProcess::nativeArguments()
{
QProcess proc;
@@ -1527,7 +1497,6 @@ void tst_QProcess::nativeArguments()
#endif
-//-----------------------------------------------------------------------------
void tst_QProcess::exitCodeTest()
{
for (int i = 0; i < 255; ++i) {
@@ -1544,7 +1513,6 @@ void tst_QProcess::exitCodeTest()
}
}
-//-----------------------------------------------------------------------------
void tst_QProcess::failToStart()
{
#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
@@ -1556,12 +1524,14 @@ void tst_QProcess::failToStart()
QProcess process;
QSignalSpy stateSpy(&process, &QProcess::stateChanged);
- QSignalSpy errorSpy(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
+ QSignalSpy errorSpy2(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
QSignalSpy finishedSpy(&process, static_cast<void (QProcess::*)(int)>(&QProcess::finished));
QSignalSpy finishedSpy2(&process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished));
QVERIFY(stateSpy.isValid());
QVERIFY(errorSpy.isValid());
+ QVERIFY(errorSpy2.isValid());
QVERIFY(finishedSpy.isValid());
QVERIFY(finishedSpy2.isValid());
@@ -1578,6 +1548,7 @@ void tst_QProcess::failToStart()
for (int j = 0; j < 8; ++j) {
for (int i = 0; i < attempts; ++i) {
QCOMPARE(errorSpy.count(), j * attempts + i);
+ QCOMPARE(errorSpy2.count(), j * attempts + i);
process.start("/blurp");
switch (j) {
@@ -1602,6 +1573,7 @@ void tst_QProcess::failToStart()
QCOMPARE(process.error(), QProcess::FailedToStart);
QCOMPARE(errorSpy.count(), j * attempts + i + 1);
+ QCOMPARE(errorSpy2.count(), j * attempts + i + 1);
QCOMPARE(finishedSpy.count(), 0);
QCOMPARE(finishedSpy2.count(), 0);
@@ -1614,7 +1586,6 @@ void tst_QProcess::failToStart()
}
}
-//-----------------------------------------------------------------------------
void tst_QProcess::failToStartWithWait()
{
#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
@@ -1625,11 +1596,13 @@ void tst_QProcess::failToStartWithWait()
QProcess process;
QEventLoop loop;
- QSignalSpy errorSpy(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
+ QSignalSpy errorSpy2(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
QSignalSpy finishedSpy(&process, static_cast<void (QProcess::*)(int)>(&QProcess::finished));
QSignalSpy finishedSpy2(&process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished));
QVERIFY(errorSpy.isValid());
+ QVERIFY(errorSpy2.isValid());
QVERIFY(finishedSpy.isValid());
QVERIFY(finishedSpy2.isValid());
@@ -1639,12 +1612,12 @@ void tst_QProcess::failToStartWithWait()
QCOMPARE(process.error(), QProcess::FailedToStart);
QCOMPARE(errorSpy.count(), i + 1);
+ QCOMPARE(errorSpy2.count(), i + 1);
QCOMPARE(finishedSpy.count(), 0);
QCOMPARE(finishedSpy2.count(), 0);
}
}
-//-----------------------------------------------------------------------------
void tst_QProcess::failToStartWithEventLoop()
{
#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
@@ -1655,16 +1628,18 @@ void tst_QProcess::failToStartWithEventLoop()
QProcess process;
QEventLoop loop;
- QSignalSpy errorSpy(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
+ QSignalSpy errorSpy2(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
QSignalSpy finishedSpy(&process, static_cast<void (QProcess::*)(int)>(&QProcess::finished));
QSignalSpy finishedSpy2(&process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished));
QVERIFY(errorSpy.isValid());
+ QVERIFY(errorSpy2.isValid());
QVERIFY(finishedSpy.isValid());
QVERIFY(finishedSpy2.isValid());
// The error signal may be emitted before start() returns
- connect(&process, SIGNAL(error(QProcess::ProcessError)), &loop, SLOT(quit()), Qt::QueuedConnection);
+ connect(&process, &QProcess::errorOccurred, &loop, &QEventLoop::quit, Qt::QueuedConnection);
for (int i = 0; i < 50; ++i) {
@@ -1674,6 +1649,7 @@ void tst_QProcess::failToStartWithEventLoop()
QCOMPARE(process.error(), QProcess::FailedToStart);
QCOMPARE(errorSpy.count(), i + 1);
+ QCOMPARE(errorSpy2.count(), i + 1);
QCOMPARE(finishedSpy.count(), 0);
QCOMPARE(finishedSpy2.count(), 0);
}
@@ -1715,7 +1691,6 @@ void tst_QProcess::failToStartEmptyArgs()
QCOMPARE(process.error(), QProcess::FailedToStart);
}
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::removeFileWhileProcessIsRunning()
@@ -1734,7 +1709,6 @@ void tst_QProcess::removeFileWhileProcessIsRunning()
QVERIFY(process.waitForFinished(5000));
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// OS doesn't support environment variables
void tst_QProcess::setEnvironment_data()
@@ -1812,7 +1786,6 @@ void tst_QProcess::setEnvironment()
}
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// OS doesn't support environment variables
void tst_QProcess::setProcessEnvironment_data()
@@ -1853,7 +1826,7 @@ void tst_QProcess::setProcessEnvironment()
}
}
#endif
-//-----------------------------------------------------------------------------
+
void tst_QProcess::systemEnvironment()
{
#if defined (Q_OS_WINCE)
@@ -1869,7 +1842,6 @@ void tst_QProcess::systemEnvironment()
#endif
}
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::spaceInName()
@@ -1882,7 +1854,6 @@ void tst_QProcess::spaceInName()
}
#endif
-//-----------------------------------------------------------------------------
void tst_QProcess::lockupsInStartDetached()
{
// Check that QProcess doesn't cause a lock up at this program's
@@ -1896,7 +1867,6 @@ void tst_QProcess::lockupsInStartDetached()
QProcess::startDetached("yjhbrty");
}
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::atEnd2()
@@ -1915,7 +1885,6 @@ void tst_QProcess::atEnd2()
}
#endif
-//-----------------------------------------------------------------------------
void tst_QProcess::waitForReadyReadForNonexistantProcess()
{
// Start a program that doesn't exist, process events and then try to waitForReadyRead
@@ -1923,11 +1892,13 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
QProcess process;
- QSignalSpy errorSpy(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
+ QSignalSpy errorSpy2(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
QSignalSpy finishedSpy1(&process, static_cast<void (QProcess::*)(int)>(&QProcess::finished));
QSignalSpy finishedSpy2(&process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished));
QVERIFY(errorSpy.isValid());
+ QVERIFY(errorSpy2.isValid());
QVERIFY(finishedSpy1.isValid());
QVERIFY(finishedSpy2.isValid());
@@ -1939,11 +1910,12 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
#endif
QCOMPARE(errorSpy.count(), 1);
QCOMPARE(errorSpy.at(0).at(0).toInt(), 0);
+ QCOMPARE(errorSpy2.count(), 1);
+ QCOMPARE(errorSpy2.at(0).at(0).toInt(), 0);
QCOMPARE(finishedSpy1.count(), 0);
QCOMPARE(finishedSpy2.count(), 0);
}
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardInputFile()
@@ -1973,7 +1945,6 @@ void tst_QProcess::setStandardInputFile()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardOutputFile_data()
@@ -2004,7 +1975,6 @@ void tst_QProcess::setStandardOutputFile_data()
<< true;
}
-//-----------------------------------------------------------------------------
void tst_QProcess::setStandardOutputFile()
{
static const char data[] = "Original data. ";
@@ -2089,7 +2059,6 @@ void tst_QProcess::setStandardOutputFileAndWaitForBytesWritten()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardOutputProcess_data()
@@ -2130,7 +2099,6 @@ void tst_QProcess::setStandardOutputProcess()
}
#endif
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::fileWriterProcess()
@@ -2158,7 +2126,6 @@ void tst_QProcess::fileWriterProcess()
}
#endif
-//-----------------------------------------------------------------------------
void tst_QProcess::detachedWorkingDirectoryAndPid()
{
qint64 pid;
@@ -2202,7 +2169,6 @@ void tst_QProcess::detachedWorkingDirectoryAndPid()
QCOMPARE(actualPid, pid);
}
-//-----------------------------------------------------------------------------
#ifndef Q_OS_WINCE
// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::switchReadChannels()
@@ -2233,16 +2199,38 @@ void tst_QProcess::switchReadChannels()
}
#endif
-//-----------------------------------------------------------------------------
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#ifndef Q_OS_WINCE
+// Reading and writing to a process is not supported on Qt/CE
+void tst_QProcess::discardUnwantedOutput()
+{
+ QProcess process;
+
+ process.setProgram("testProcessEcho2/testProcessEcho2");
+ process.start(QIODevice::WriteOnly);
+ process.write("Hello, World");
+ process.closeWriteChannel();
+ QVERIFY(process.waitForFinished(5000));
+
+ process.setReadChannel(QProcess::StandardOutput);
+ QCOMPARE(process.bytesAvailable(), Q_INT64_C(0));
+ process.setReadChannel(QProcess::StandardError);
+ QCOMPARE(process.bytesAvailable(), Q_INT64_C(0));
+}
+#endif
+
+#ifndef Q_OS_WINCE
// Q_OS_WIN - setWorkingDirectory will chdir before starting the process on unices
// Windows CE does not support working directory logic
void tst_QProcess::setWorkingDirectory()
{
process = new QProcess;
process->setWorkingDirectory("test");
- process->start("testSetWorkingDirectory/testSetWorkingDirectory");
- QVERIFY(process->waitForFinished());
+
+ // use absolute path because on Windows, the executable is relative to the parent's CWD
+ // while on Unix with fork it's relative to the child's (with posix_spawn, it could be either).
+ process->start(QFileInfo("testSetWorkingDirectory/testSetWorkingDirectory").absoluteFilePath());
+
+ QVERIFY2(process->waitForFinished(), process->errorString().toLocal8Bit());
QByteArray workingDir = process->readAllStandardOutput();
QCOMPARE(QDir("test").canonicalPath(), QDir(workingDir.constData()).canonicalPath());
@@ -2250,9 +2238,26 @@ void tst_QProcess::setWorkingDirectory()
delete process;
process = 0;
}
+
+void tst_QProcess::setNonExistentWorkingDirectory()
+{
+ process = new QProcess;
+ process->setWorkingDirectory("this/directory/should/not/exist/for/sure");
+
+ // use absolute path because on Windows, the executable is relative to the parent's CWD
+ // while on Unix with fork it's relative to the child's (with posix_spawn, it could be either).
+ process->start(QFileInfo("testSetWorkingDirectory/testSetWorkingDirectory").absoluteFilePath());
+ QVERIFY(!process->waitForFinished());
+#ifdef QPROCESS_USE_SPAWN
+ QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Continue);
+#endif
+ QCOMPARE(int(process->error()), int(QProcess::FailedToStart));
+
+ delete process;
+ process = 0;
+}
#endif
-//-----------------------------------------------------------------------------
void tst_QProcess::startFinishStartFinish()
{
QProcess process;
@@ -2271,7 +2276,6 @@ void tst_QProcess::startFinishStartFinish()
}
}
-//-----------------------------------------------------------------------------
void tst_QProcess::invalidProgramString_data()
{
QTest::addColumn<QString>("programString");
@@ -2286,17 +2290,19 @@ void tst_QProcess::invalidProgramString()
QProcess process;
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
- QSignalSpy spy(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
+ QSignalSpy spy(&process, &QProcess::errorOccurred);
+ QSignalSpy spy2(&process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error));
QVERIFY(spy.isValid());
+ QVERIFY(spy2.isValid());
process.start(programString);
QCOMPARE(process.error(), QProcess::FailedToStart);
QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy2.count(), 1);
QVERIFY(!QProcess::startDetached(programString));
}
-//-----------------------------------------------------------------------------
void tst_QProcess::onlyOneStartedSignal()
{
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
@@ -2323,8 +2329,6 @@ void tst_QProcess::onlyOneStartedSignal()
QCOMPARE(spyFinished.count(), 1);
}
-//-----------------------------------------------------------------------------
-
class BlockOnReadStdOut : public QObject
{
Q_OBJECT
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index be9a38c499..2099101a91 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -66,11 +66,19 @@ void tst_QProcessEnvironment::operator_eq()
QVERIFY(e1 == e2);
e1.clear();
- QVERIFY(e1 != e2);
+ QVERIFY(e1 == e2);
e2.clear();
+ QVERIFY(e1 == e2);
+
+ e1.insert("FOO", "bar");
+ QVERIFY(e1 != e2);
+ e2.insert("FOO", "bar");
QVERIFY(e1 == e2);
+
+ e2.insert("FOO", "baz");
+ QVERIFY(e1 != e2);
}
void tst_QProcessEnvironment::clearAndIsEmpty()
@@ -196,6 +204,15 @@ void tst_QProcessEnvironment::insertEnv()
QCOMPARE(e.value("Hello"), QString("Another World"));
QCOMPARE(e.value("FOO2"), QString("bar2"));
QCOMPARE(e.value("A2"), QString("bc2"));
+
+ QProcessEnvironment e3;
+ e3.insert("FOO2", "bar2");
+ e3.insert("A2", "bc2");
+ e3.insert("Hello", "Another World");
+
+ e3.insert(e3); // mustn't deadlock
+
+ QVERIFY(e3 == e2);
}
void tst_QProcessEnvironment::caseSensitivity()
diff --git a/tests/auto/corelib/io/qsettings/BLACKLIST b/tests/auto/corelib/io/qsettings/BLACKLIST
new file mode 100644
index 0000000000..1cba99b66c
--- /dev/null
+++ b/tests/auto/corelib/io/qsettings/BLACKLIST
@@ -0,0 +1,2 @@
+[isWritable:native]
+osx-10.10
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 3e98a369ce..58a3db9615 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -93,6 +93,7 @@ void tst_QTemporaryDir::construction()
QCOMPARE(dir.path().left(tmp.size()), tmp);
QVERIFY(dir.path().contains("tst_qtemporarydir"));
QVERIFY(QFileInfo(dir.path()).isDir());
+ QCOMPARE(dir.errorString(), QString());
}
// Testing get/set functions
@@ -251,6 +252,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
QTemporaryDir dir("tempXXXXXX");
dir.setAutoRemove(true);
QVERIFY(!dir.isValid());
+ QVERIFY(!dir.errorString().isEmpty());
QVERIFY(dir.path().isEmpty());
#endif
}
@@ -287,7 +289,11 @@ void tst_QTemporaryDir::stressTest()
for (int i = 0; i < iterations; ++i) {
QTemporaryDir dir(pattern);
dir.setAutoRemove(false);
- QVERIFY2(dir.isValid(), qPrintable(QString::fromLatin1("Failed to create #%1 under %2.").arg(i).arg(QDir::toNativeSeparators(pattern))));
+ QVERIFY2(dir.isValid(),
+ qPrintable(QString::fromLatin1("Failed to create #%1 under %2: %3.")
+ .arg(i)
+ .arg(QDir::toNativeSeparators(pattern))
+ .arg(dir.errorString())));
QVERIFY(!names.contains(dir.path()));
names.insert(dir.path());
}
diff --git a/tests/auto/corelib/io/qtextstream/BLACKLIST b/tests/auto/corelib/io/qtextstream/BLACKLIST
new file mode 100644
index 0000000000..bc3f118b33
--- /dev/null
+++ b/tests/auto/corelib/io/qtextstream/BLACKLIST
@@ -0,0 +1,2 @@
+[stillOpenWhenAtEnd]
+windows
diff --git a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
index db0136dd20..769a96ac64 100644
--- a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
+++ b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
@@ -177,6 +177,7 @@ void tst_QUrlQuery::constructing()
QVERIFY(copy.isEmpty());
QVERIFY(!copy.isDetached());
QVERIFY(copy == empty);
+ QCOMPARE(qHash(copy), qHash(empty));
QVERIFY(!(copy != empty));
copy = empty;
@@ -184,6 +185,7 @@ void tst_QUrlQuery::constructing()
copy = QUrlQuery();
QVERIFY(copy == empty);
+ QCOMPARE(qHash(copy), qHash(empty));
}
{
QUrlQuery copy(emptyQuery());
@@ -298,6 +300,7 @@ void tst_QUrlQuery::addRemove()
QVERIFY(query == original);
QVERIFY(!(query != original));
+ QCOMPARE(qHash(query), qHash(original));
}
{