--- a/phoneplugins/infowidgetplugin/infowidget/src/infowidgetnetworkhandler.cpp Wed Jun 23 18:12:20 2010 +0300
+++ b/phoneplugins/infowidgetplugin/infowidget/src/infowidgetnetworkhandler.cpp Tue Jul 06 14:15:47 2010 +0300
@@ -37,12 +37,10 @@
InfoWidgetNetworkHandler::InfoWidgetNetworkHandler()
*/
InfoWidgetNetworkHandler::InfoWidgetNetworkHandler(QObject *parent)
- :
- QObject(parent),
+ :QObject(parent),
m_nwSession(NULL)
{
DPRINT;
-
if (!createSession()) {
DCRITICAL << ": session creation failed!";
}
@@ -54,7 +52,6 @@
InfoWidgetNetworkHandler::~InfoWidgetNetworkHandler()
{
DPRINT;
-
// Disable MCN setting,
// display client is being deleted
disableMcn();
@@ -87,14 +84,6 @@
}
/*!
- InfoWidgetNetworkHandler::sessionExists()
-*/
-bool InfoWidgetNetworkHandler::sessionExists()
-{
- return !m_nwSession.isNull();
-}
-
-/*!
InfoWidgetNetworkHandler::suspend()
*/
void InfoWidgetNetworkHandler::suspend()
@@ -220,17 +209,18 @@
bool InfoWidgetNetworkHandler::isOnline() const
{
bool online(false);
-
- switch (networkRegistrationStatus()) {
- case ENWRegisteredBusy: // Fall through
- case ENWRegisteredOnHomeNetwork: // Fall through
- case ENWRegisteredRoaming:
- online = true;
- break;
- default:
- break;
+
+ if (!m_nwSession.isNull()) {
+ switch (networkRegistrationStatus()) {
+ case ENWRegisteredBusy: // Fall through
+ case ENWRegisteredOnHomeNetwork: // Fall through
+ case ENWRegisteredRoaming:
+ online = true;
+ break;
+ default:
+ break;
+ }
}
-
DPRINT << ": online: " << online;
return online;
}