tst_qobject: Enable build with CMake

Change-Id: Ia2b324d0e5aa88ea9a71bb040a740f359e11f2ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Fabian Kosmale 2020-08-24 15:50:23 +02:00
parent 0871a7b5a2
commit f325bac02e
3 changed files with 3 additions and 2 deletions

View File

@ -24,7 +24,7 @@ if(TARGET Qt::Gui)
add_subdirectory(qmimedata)
endif()
if(TARGET Qt::Network AND NOT ANDROID AND NOT UIKIT)
# add_subdirectory(qobject) # special case
add_subdirectory(qobject)
endif()
if(QT_FEATURE_private_tests AND NOT ANDROID AND NOT UIKIT)
add_subdirectory(qsharedmemory)

View File

@ -17,3 +17,4 @@ qt_add_test(tst_qobject
## Scopes:
#####################################################################
add_subdirectory(signalbug)
add_dependencies(tst_qobject signalbug_helper) # special case

View File

@ -2976,7 +2976,7 @@ void tst_QObject::recursiveSignalEmission()
#else
QProcess proc;
// signalbug helper app should always be next to this test binary
const QString path = QStringLiteral("signalbug_helper");
const QString path = QCoreApplication::applicationDirPath() + QDir::separator() + QStringLiteral("signalbug_helper");
proc.start(path);
QVERIFY2(proc.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, proc.errorString())));
QVERIFY(proc.waitForFinished());