radiohswidget/src/radiohswidgetprofilereader.cpp
changeset 33 11b6825f0862
parent 32 189d20c34778
child 41 3a6b55c6390c
--- a/radiohswidget/src/radiohswidgetprofilereader.cpp	Wed Jun 23 18:12:57 2010 +0300
+++ b/radiohswidget/src/radiohswidgetprofilereader.cpp	Tue Jul 06 14:16:27 2010 +0300
@@ -71,6 +71,9 @@
 RadioHsWidgetProfileReader::~RadioHsWidgetProfileReader()
 {
     LOG_METHOD;
+    XQSettingsKey radioRunningKey(XQSettingsKey::TargetPublishAndSubscribe,
+        KRadioPSUid, KRadioStartupKey);
+    mSettingsManager->stopMonitoring(radioRunningKey);
 }
 
 /*!
@@ -94,7 +97,7 @@
  */
 bool RadioHsWidgetProfileReader::isCurrentProfileOffline()
 {
-    LOG_METHOD;
+    LOG_METHOD_RET("%d");
     XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository,
         KCRUidProfileEngine.iUid, KProEngActiveProfile);
     // Read current value.
@@ -112,13 +115,7 @@
  */
 void RadioHsWidgetProfileReader::handleDeletedItem(const XQSettingsKey &key)
 {
-    LOG_METHOD;
-    // Profile information will be used for offline query.
-/*
-    if (key.uid() == KCRUidProfileEngine.iUid && key.key()
-        == KProEngActiveProfile) {
-    }
-*/
+    LOG_METHOD_ENTER;
     if (key.uid() == KRadioPSUid && key.key() == KRadioStartupKey) {
         LOG("KRadioStartupKey deleted");
         startMonitoringRadioRunningStatus();
@@ -137,14 +134,6 @@
 {
     LOG_SLOT_CALLER;
 
-    // Profile information will be used for offline query.
-    /*
-    if (key.uid() == KCRUidProfileEngine.iUid && key.key()
-        == KProEngActiveProfile) {
-        currentProfileStatus(value);
-    }
-    */
-    
     if (key.uid() == KRadioPSUid && key.key()
         == KRadioStartupKey) {
         LOG("KRadioStartupKey changed");
@@ -152,20 +141,6 @@
     }
 }
 
-/*
- Handling changes in profile information.
- 
- \param value
- */
-/*
-void RadioHsWidgetProfileReader::currentProfileStatus(QVariant value)
-{
-    if (value.canConvert(QVariant::Int)) {
-        emit profileChanged(value.toInt());
-    }
-}
-*/
-
 /*!
     Handling changes in radio running P&S key.
  
@@ -175,7 +150,7 @@
 void RadioHsWidgetProfileReader::radioRunningStatus(
     const QVariant &value)
 {
-    LOG_METHOD;
+    LOG_METHOD_ENTER;
     if (value.canConvert(QVariant::Int)) {
         mRadioStatus = value.toInt();
         // Notify the observer that radio is running.