From: Peter Penz Date: Wed, 19 May 2010 19:25:04 +0000 (+0000) Subject: Don't change the default view properties, if the view mode is changed on a remote... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/bcaac21c4ec3d92c8c75f193e27364b4d7dd2321?ds=sidebyside Don't change the default view properties, if the view mode is changed on a remote folder. BUG: 234852 svn path=/trunk/KDE/kdebase/apps/; revision=1128615 --- diff --git a/src/viewproperties.cpp b/src/viewproperties.cpp index 67f0634f2..1f78fa610 100644 --- a/src/viewproperties.cpp +++ b/src/viewproperties.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Peter Penz () * + * Copyright (C) 2006-2010 by Peter Penz () * * Copyright (C) 2006 by Aaron J. Seigo () * * * * This program is free software; you can redistribute it and/or modify * @@ -39,18 +39,6 @@ ViewProperties::ViewProperties(const KUrl& url) : m_autoSave(true), m_node(0) { - KUrl cleanUrl(url); - cleanUrl.cleanPath(); - m_filepath = cleanUrl.toLocalFile(); - - const QLatin1String fileName("/.directory"); - - if ((m_filepath.length() < 1) || !QDir::isAbsolutePath(m_filepath)) { - const QString file = destinationDir("global") + fileName; - m_node = new ViewPropertySettings(KSharedConfig::openConfig(file)); - return; - } - // We try and save it to a file in the directory being viewed. // If the directory is not writable by the user or the directory is not local, // we store the properties information in a local file. @@ -58,7 +46,8 @@ ViewProperties::ViewProperties(const KUrl& url) : const bool useGlobalViewProps = settings->globalViewProps(); if (useGlobalViewProps) { m_filepath = destinationDir("global"); - } else if (cleanUrl.isLocalFile()) { + } else if (url.isLocalFile()) { + m_filepath = url.toLocalFile(); const QFileInfo info(m_filepath); if (!info.isWritable()) { m_filepath = destinationDir("local") + m_filepath; @@ -67,7 +56,7 @@ ViewProperties::ViewProperties(const KUrl& url) : m_filepath = destinationDir("remote") + m_filepath; } - const QString file = m_filepath + fileName; + const QString file = m_filepath + QDir::separator() + QLatin1String(".directory"); m_node = new ViewPropertySettings(KSharedConfig::openConfig(file)); const bool useDefaultProps = !useGlobalViewProps &&