m_changedProps = false;
}
+KUrl ViewProperties::mirroredDirectory()
+{
+ QString basePath = KGlobal::mainComponent().componentName();
+ basePath.append("/view_properties/");
+ return KUrl(KStandardDirs::locateLocal("data", basePath));
+}
+
QString ViewProperties::destinationDir(const QString& subDir) const
{
QString basePath = KGlobal::mainComponent().componentName();
*/
void save();
+ /**
+ * 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();
+
private:
/**
* Returns the destination directory path where the view
settings->setViewPropsTimestamp(QDateTime::currentDateTime());
// This is also a good chance to make a cleanup of all mirrored view properties:
- QString basePath = KGlobal::mainComponent().componentName();
- basePath.append("/view_properties/");
- const QString mirroredViewProps = KStandardDirs::locateLocal("data", basePath);
- KIO::NetAccess::del(mirroredViewProps, this);
+ const KUrl mirroredDir = ViewProperties::mirroredDirectory();
+ KIO::NetAccess::del(mirroredDir, this);
}
m_viewProps->save();
settings->setGlobalViewProps(true);
ViewProperties defaultProps(m_dolphinView->url());
defaultProps.setDirProperties(*m_viewProps);
- kDebug() << "saving global viewprops" << endl;
defaultProps.save();
settings->setGlobalViewProps(false);
}