Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
#include <QtCore/QtCore>
#include <QtTest/QtTest>
+#include <unistd.h>
+
class tst_QCoreApplication: public QObject
{
Q_OBJECT
void reexec();
void execAfterExit();
void eventLoopExecAfterExit();
+ void postRoutine();
};
class EventSpy : public QObject
QCOMPARE(loop.exec(), 0);
}
+void TestPostRoutine()
+{
+ ::usleep(1000);
+ // deadlock test
+ qRemovePostRoutine(TestPostRoutine);
+}
+
+void tst_QCoreApplication::postRoutine()
+{
+ qAddPostRoutine(TestPostRoutine);
+}
+
static void createQObjectOnDestruction()
{
// Make sure that we can create a QObject after the last QObject has been