TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG -= app_bundle debug_and_release
-DESTDIR=.
+CONFIG += console
+DESTDIR = ./
QT -= gui
wince*: {
LIBS += coredll.lib
SOURCES += signalbug.cpp
# This app is testdata for tst_qobject
-target.path = $$[QT_INSTALL_TESTS]/tst_qobject
+target.path = $$[QT_INSTALL_TESTS]/tst_qobject/$$TARGET
INSTALLS += target
{
Q_OBJECT
private slots:
+ void initTestCase();
void disconnect();
void connectByName();
void connectSignalsToSignalsWithDefaultArguments();
int ReceiverObject::sequence = 0;
+void tst_QObject::initTestCase()
+{
+ const QString testDataDir = QFileInfo(QFINDTESTDATA("signalbug")).absolutePath();
+ QVERIFY2(QDir::setCurrent(testDataDir), qPrintable("Could not chdir to " + testDataDir));
+}
+
void tst_QObject::disconnect()
{
SenderObject *s = new SenderObject;
{
QProcess proc;
// signalbug helper app should always be next to this test binary
- proc.start(QCoreApplication::applicationDirPath() + "/signalbug");
+ const QString path = QStringLiteral("signalbug/signalbug");
+ proc.start(path);
+ QVERIFY2(proc.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, proc.errorString())));
QVERIFY(proc.waitForFinished());
QVERIFY(proc.exitStatus() == QProcess::NormalExit);
QCOMPARE(proc.exitCode(), 0);