From d693a8914c7e8fa0c91df58802b4bb469b4b7a93 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 10 Jul 2012 18:45:28 +0200 Subject: Fix small problems with tst_QProcess Remember to register the metatype where we use it, so we don't depend on another test being run previously. And skip the setWorkingDirectory test completely on Unix. I don't know why it needs to be skipped, but if we're not going to verify anything, don't even try to do anything. This saves us one memory leak at least. Change-Id: I22e151cc3fa7b4e976972aca8978b88b263d9bee Reviewed-by: Mitch Curtis Reviewed-by: Jason McDonald Reviewed-by: Rohan McGovern --- tests/auto/corelib/io/qprocess/tst_qprocess.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp index 0ffaca14b5..0c020fbe66 100644 --- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp +++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp @@ -2122,12 +2122,12 @@ void tst_QProcess::setWorkingDirectory() #ifdef Q_OS_WINCE QSKIP("Windows CE does not support working directory logic"); #endif - process = new QProcess; - process->setWorkingDirectory("test"); - process->start("testSetWorkingDirectory/testSetWorkingDirectory"); #ifndef Q_OS_WIN QSKIP("setWorkingDirectory will chdir before starting the process on unices"); #endif + process = new QProcess; + process->setWorkingDirectory("test"); + process->start("testSetWorkingDirectory/testSetWorkingDirectory"); QVERIFY(process->waitForFinished()); QByteArray workingDir = process->readAllStandardOutput(); @@ -2184,6 +2184,7 @@ void tst_QProcess::invalidProgramString() //----------------------------------------------------------------------------- void tst_QProcess::onlyOneStartedSignal() { + qRegisterMetaType("QProcess::ExitStatus"); QProcess process; QSignalSpy spyStarted(&process, SIGNAL(started())); -- cgit v1.2.3