#if defined(Q_OS_BLACKBERRY)
#include <QtCore/private/qcore_unix_p.h>
+#include <QCoreApplication>
#include <unistd.h>
#include <errno.h>
return;
}
- ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
updateMeasurementSystem();
- QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
+ if (QCoreApplication::instance()) {
+ ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
+ QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
+ }
}
#endif