Qnx: Check if QCoreApplication::instance() exists before using QSocketNotifier
Change-Id: I9f00314ea1ef73b87bc56ca1f8fcf859c9cd1824 Reviewed-by: Bernd Weimer <bweimer@rim.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
This commit is contained in:
parent
bf9691d9b7
commit
5e59215ac6
@ -49,6 +49,7 @@
|
|||||||
|
|
||||||
#if defined(Q_OS_BLACKBERRY)
|
#if defined(Q_OS_BLACKBERRY)
|
||||||
#include <QtCore/private/qcore_unix_p.h>
|
#include <QtCore/private/qcore_unix_p.h>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -114,9 +115,11 @@ void QQNXLocaleData::readPPSLocale()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
|
|
||||||
updateMeasurementSystem();
|
updateMeasurementSystem();
|
||||||
|
if (QCoreApplication::instance()) {
|
||||||
|
ppsNotifier = new QSocketNotifier(ppsFd, QSocketNotifier::Read, this);
|
||||||
QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
|
QObject::connect(ppsNotifier, SIGNAL(activated(int)), this, SLOT(updateMeasurementSystem()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user