Skip to content

Commit

Permalink
Use QgsApplication for test
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 11, 2019
1 parent b55f221 commit 3f136b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/src/core/testqobjectuniqueptr.cpp
Expand Up @@ -106,8 +106,6 @@ void TestQObjectUniquePtr::testOperatorArrow()

void TestQObjectUniquePtr::testDeleteLater()
{
int argc;
QCoreApplication ca( argc, nullptr );
QObject *o = new QObject();
QObject *o2 = new QObject();

Expand All @@ -119,8 +117,8 @@ void TestQObjectUniquePtr::testDeleteLater()

obj2.reset();

connect( o, &QObject::destroyed, &ca, &QCoreApplication::quit );
ca.exec();
connect( o, &QObject::destroyed, QgsApplication::instance(), &QgsApplication::quit );
QgsApplication::instance()->exec();
QVERIFY( obj.isNull() );
QVERIFY( obj2.isNull() );
}
Expand Down

0 comments on commit 3f136b8

Please sign in to comment.