]> cloud.milkyroute.net Git - dolphin.git/commitdiff
update to changes in class KGlobal (kdelibs)
authorPeter Penz <peter.penz19@gmail.com>
Tue, 30 Jan 2007 19:31:37 +0000 (19:31 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Tue, 30 Jan 2007 19:31:37 +0000 (19:31 +0000)
svn path=/trunk/playground/utils/dolphin/; revision=628641

src/dolphinmainwindow.cpp
src/dolphinsettings.cpp
src/viewproperties.cpp

index e4fcc6a9718980df6d237c54a35f878942afa134..fa98354804d88d4098bf49965d842b05835e5f62 100644 (file)
@@ -324,7 +324,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
 \r
     // TODO: I assume there will be a generic way in KDE 4 to store the docks\r
     // of the main window. In the meantime they are stored manually:\r
-    QString filename = KStandardDirs::locateLocal("data", KGlobal::instance()->instanceName());\r
+    QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName());\r
     filename.append("/panels_layout");\r
     QFile file(filename);\r
     if (file.open(QIODevice::WriteOnly)) {\r
@@ -924,8 +924,7 @@ void DolphinMainWindow::loadSettings()
     // TODO: I assume there will be a generic way in KDE 4 to restore the docks\r
     // of the main window. In the meantime they are restored manually (see also\r
     // DolphinMainWindow::closeEvent() for more details):\r
-    QString filename = KStandardDirs::locateLocal("data", KGlobal::instance()->instanceName());\r
-    filename.append("/panels_layout");\r
+    QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName());   filename.append("/panels_layout");\r
     QFile file(filename);\r
     if (file.open(QIODevice::ReadOnly)) {\r
         QByteArray data = file.readAll();\r
index ed8259d741c963355c7f536ac69cfb4cd14a20e5..1b7bd9d590aa152dc4735dfad875c791a08cf5fa 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <kbookmark.h>
 #include <kbookmarkmanager.h>
+#include <kcomponentdata.h>
 #include <kicontheme.h>
 #include <kinstance.h>
 #include <klocale.h>
@@ -63,7 +64,7 @@ KBookmark DolphinSettings::bookmark(int index) const
 
 KBookmarkManager* DolphinSettings::bookmarkManager() const
 {
-    QString basePath = KGlobal::instance()->instanceName();
+    QString basePath = KGlobal::mainComponent().componentName();
     basePath.append("/bookmarks.xml");
     const QString file = KStandardDirs::locateLocal("data", basePath);
 
@@ -76,7 +77,7 @@ void DolphinSettings::save()
     m_iconsModeSettings->writeConfig();
     m_detailsModeSettings->writeConfig();
 
-    QString basePath = KGlobal::instance()->instanceName();
+    QString basePath = KGlobal::mainComponent().componentName();
     basePath.append("/bookmarks.xml");
     const QString file = KStandardDirs::locateLocal( "data", basePath);
 
index c0343350d62a4eef66582a5e7d97b16f4f811b31..bbcb5927c3b440efe67e98ee3f71a74b3d38069b 100644 (file)
@@ -23,6 +23,7 @@
 #include <QDateTime>
 #include <QFile>
 
+#include <kcomponentdata.h>
 #include <klocale.h>
 #include <kstandarddirs.h>
 #include <kurl.h>
@@ -178,7 +179,7 @@ void ViewProperties::save()
 
 QString ViewProperties::destinationDir(const QString& subDir) const
 {
-    QString basePath = KGlobal::instance()->instanceName();
+    QString basePath = KGlobal::mainComponent().componentName();
     basePath.append("/view_properties/").append(subDir);
     return KStandardDirs::locateLocal("data", basePath);
 }