diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 5 | ||||
| -rw-r--r-- | src/dolphinsettings.cpp | 5 | ||||
| -rw-r--r-- | src/viewproperties.cpp | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e4fcc6a97..fa9835480 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -324,7 +324,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) // TODO: I assume there will be a generic way in KDE 4 to store the docks
// of the main window. In the meantime they are stored manually:
- QString filename = KStandardDirs::locateLocal("data", KGlobal::instance()->instanceName());
+ QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName());
filename.append("/panels_layout");
QFile file(filename);
if (file.open(QIODevice::WriteOnly)) {
@@ -924,8 +924,7 @@ void DolphinMainWindow::loadSettings() // TODO: I assume there will be a generic way in KDE 4 to restore the docks
// of the main window. In the meantime they are restored manually (see also
// DolphinMainWindow::closeEvent() for more details):
- QString filename = KStandardDirs::locateLocal("data", KGlobal::instance()->instanceName());
- filename.append("/panels_layout");
+ QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName()); filename.append("/panels_layout");
QFile file(filename);
if (file.open(QIODevice::ReadOnly)) {
QByteArray data = file.readAll();
diff --git a/src/dolphinsettings.cpp b/src/dolphinsettings.cpp index ed8259d74..1b7bd9d59 100644 --- a/src/dolphinsettings.cpp +++ b/src/dolphinsettings.cpp @@ -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); diff --git a/src/viewproperties.cpp b/src/viewproperties.cpp index c0343350d..bbcb5927c 100644 --- a/src/viewproperties.cpp +++ b/src/viewproperties.cpp @@ -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); } |
