Skip to content

Commit 3f136b8

Browse files
committedJun 11, 2019
Use QgsApplication for test
1 parent b55f221 commit 3f136b8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎tests/src/core/testqobjectuniqueptr.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ void TestQObjectUniquePtr::testOperatorArrow()
106106

107107
void TestQObjectUniquePtr::testDeleteLater()
108108
{
109-
int argc;
110-
QCoreApplication ca( argc, nullptr );
111109
QObject *o = new QObject();
112110
QObject *o2 = new QObject();
113111

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

120118
obj2.reset();
121119

122-
connect( o, &QObject::destroyed, &ca, &QCoreApplication::quit );
123-
ca.exec();
120+
connect( o, &QObject::destroyed, QgsApplication::instance(), &QgsApplication::quit );
121+
QgsApplication::instance()->exec();
124122
QVERIFY( obj.isNull() );
125123
QVERIFY( obj2.isNull() );
126124
}

0 commit comments

Comments
 (0)