diff options
author | Lincoln Ramsay <lincoln.ramsay@nokia.com> | 2011-12-07 15:31:04 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-07 07:03:48 +0100 |
commit | 19cd6c6744c5886da37de83b79b58ee3059e5998 (patch) | |
tree | 7d4c4df1827df6cf24952507c174c064c5a697af /src/plugins/sensors | |
parent | 82644f8405291a55d52f9e874a3e0bcf313ac98f (diff) |
Don't qFatal!
Just warn and keep running. No sensor data will come but that's much better
than killing the process that was running.
Change-Id: I7cfe999450b3abf429a06b71448b63cc2626615c
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'src/plugins/sensors')
-rw-r--r-- | src/plugins/sensors/simulator/simulatorcommon.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/sensors/simulator/simulatorcommon.cpp b/src/plugins/sensors/simulator/simulatorcommon.cpp index 6fb84204..9b298382 100644 --- a/src/plugins/sensors/simulator/simulatorcommon.cpp +++ b/src/plugins/sensors/simulator/simulatorcommon.cpp @@ -61,8 +61,10 @@ SensorsConnection::SensorsConnection(QObject *parent) QtMobility::qt_registerSensorTypes(); mConnection = new Connection(Connection::Client, "QtSimulator_Mobility_ServerName1.3.0.0", 0xbeef+1, Version(1,0,0,0), this); mWorker = mConnection->connectToServer(Connection::simulatorHostName(true), 0xbeef+1); - if (!mWorker) - qFatal("Could not connect to server"); + if (!mWorker) { + qWarning("QtSensors simulator backend could not connect to the simulator!"); + return; + } mWorker->addReceiver(this); mWorker->call("setRequestsSensors"); } |