[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kphotoalbum/annotation_map_2] Map: Fix compilation issues with KConfigGroup.
From:       Johannes Zarl <johannes () zarl ! at>
Date:       2014-11-28 15:07:07
Message-ID: E1XuN8V-0004Ep-EY () scm ! kde ! org
[Download RAW message or body]

Git commit 4a3317a004793af2d3f936dd149243b56b38dee6 by Johannes Zarl.
Committed on 23/10/2014 at 15:33.
Pushed by johanneszarl into branch 'annotation_map_2'.

Fix compilation issues with KConfigGroup.

M  +7    -5    Map/MapView.cpp
M  +0    -4    Map/MapView.h

http://commits.kde.org/kphotoalbum/4a3317a004793af2d3f936dd149243b56b38dee6

diff --git a/Map/MapView.cpp b/Map/MapView.cpp
index 1f74972..c2b4475 100644
--- a/Map/MapView.cpp
+++ b/Map/MapView.cpp
@@ -58,8 +58,8 @@ Map::MapView::MapView(QWidget *parent) : QWidget(parent)
     }
 
     // ... then we try to set the (probably) saved settings
-    m_configGroup = KGlobal::config()->group(QString::fromUtf8("MapView"));
-    m_mapWidget->readSettingsFromGroup(&m_configGroup);
+    KConfigGroup configGroup = KGlobal::config()->group(QString::fromUtf8("MapView"));
+    m_mapWidget->readSettingsFromGroup(&configGroup);
 
     // Add the item model for the coordinates display
     m_modelHelper = new MapMarkerModelHelper();
@@ -95,9 +95,11 @@ void Map::MapView::zoomToMarkers()
 
 void Map::MapView::saveSettings()
 {
-   m_mapWidget->saveSettingsToGroup(&m_configGroup);
-   m_configGroup.config()->sync();
-   KMessageBox::information(this, i18n("Settings saved"), i18n("Map view"));
+    KSharedConfigPtr config = KGlobal::config();
+    KConfigGroup configGroup = config->group(QString::fromUtf8("MapView"));
+    m_mapWidget->saveSettingsToGroup(&configGroup);
+    config->sync();
+    KMessageBox::information(this, i18n("Settings saved"), i18n("Map view"));
 }
 
 // vi:expandtab:tabstop=4 shiftwidth=4:
diff --git a/Map/MapView.h b/Map/MapView.h
index 05b83ae..81b4006 100644
--- a/Map/MapView.h
+++ b/Map/MapView.h
@@ -27,9 +27,6 @@
 #include <libkgeomap/geocoordinates.h>
 #include <libkgeomap/itemmarkertiler.h>
 
-// KDE classes
-class KConfigGroup;
-
 namespace Map
 {
     class MapMarkerModelHelper;
@@ -53,7 +50,6 @@ private:
     KGeoMap::KGeoMapWidget *m_mapWidget;
     KGeoMap::ItemMarkerTiler* m_itemMarkerTiler;
     MapMarkerModelHelper *m_modelHelper;
-    KConfigGroup m_configGroup;
 };
 
 }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic