diff options
| author | Peter Penz <[email protected]> | 2010-05-19 19:25:04 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-05-19 19:25:04 +0000 |
| commit | bcaac21c4ec3d92c8c75f193e27364b4d7dd2321 (patch) | |
| tree | ff3f7fd39534949e17922d11ace895b1568fdf7d /src | |
| parent | a047333c0482249a12dca4e6a16c102684c785de (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/viewproperties.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
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 (<[email protected]>) * + * Copyright (C) 2006-2010 by Peter Penz (<[email protected]>) * * Copyright (C) 2006 by Aaron J. Seigo (<[email protected]>) * * * * 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 && |
