┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2014-10-01 12:34:49 +0200
committerEmmanuel Pescosta <[email protected]>2014-10-01 12:34:49 +0200
commit6a09781a3b99bbca2b2c66ee3041208a02ead0ca (patch)
tree1a0f7b311086acee40d82be6a88f2fab6d6bb343 /src/views
parent1d590aa7d50bcf955e3356a09dcaa88e1989aa3a (diff)
Ported Dolphin away from KStandardDirs
removed unused mirroredDirectory method REVIEW: 120194
Diffstat (limited to 'src/views')
-rw-r--r--src/views/viewproperties.cpp19
-rw-r--r--src/views/viewproperties.h9
2 files changed, 7 insertions, 21 deletions
diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp
index 46c836274..95c44bc84 100644
--- a/src/views/viewproperties.cpp
+++ b/src/views/viewproperties.cpp
@@ -25,7 +25,6 @@
#include <KComponentData>
#include <KLocale>
-#include <KStandardDirs>
#include <KUrl>
#include <KDebug>
#include <KGlobal>
@@ -34,6 +33,7 @@
#include <QDate>
#include <QFile>
#include <QFileInfo>
+#include <QStandardPaths>
namespace {
const int AdditionalInfoViewPropertiesVersion = 1;
@@ -364,7 +364,8 @@ void ViewProperties::update()
void ViewProperties::save()
{
kDebug() << "Saving view-properties to" << m_filePath;
- KStandardDirs::makeDir(m_filePath);
+ QDir dir;
+ dir.mkpath(m_filePath);
m_node->setVersion(CurrentViewPropertiesVersion);
m_node->writeConfig();
m_changedProps = false;
@@ -378,9 +379,10 @@ bool ViewProperties::exist() const
QString ViewProperties::destinationDir(const QString& subDir) const
{
- QString basePath = KGlobal::mainComponent().componentName();
- basePath.append("/view_properties/").append(subDir);
- return KStandardDirs::locateLocal("data", basePath);
+ QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
+ path.append(KGlobal::mainComponent().componentName());
+ path.append("/view_properties/").append(subDir);
+ return path;
}
QString ViewProperties::viewModePrefix() const
@@ -471,10 +473,3 @@ QString ViewProperties::directoryHashForUrl(const KUrl& url)
hashString.replace('/', '-');
return hashString;
}
-
-KUrl ViewProperties::mirroredDirectory()
-{
- QString basePath = KGlobal::mainComponent().componentName();
- basePath.append("/view_properties/");
- return KUrl(KStandardDirs::locateLocal("data", basePath));
-}
diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h
index 69b507f1b..d794edf65 100644
--- a/src/views/viewproperties.h
+++ b/src/views/viewproperties.h
@@ -164,15 +164,6 @@ private:
*/
static QString directoryHashForUrl(const KUrl& url);
- /**
- * Returns the URL of the directory, where the mirrored view properties
- * are stored into. Mirrored view properties are used if:
- * - there is no write access for storing the view properties into
- * the original directory
- * - for non local directories
- */
- static KUrl mirroredDirectory();
-
Q_DISABLE_COPY(ViewProperties)
private: