\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
// 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
#include <kbookmark.h>
#include <kbookmarkmanager.h>
+#include <kcomponentdata.h>
#include <kicontheme.h>
#include <kinstance.h>
#include <klocale.h>
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);
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);
#include <QDateTime>
#include <QFile>
+#include <kcomponentdata.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kurl.h>
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);
}