X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/6c60bf0ad54258976d9dcbd6586b26c65d8d4b78..305ecd86f9cdfd7d4e3e96fb5b7f3daab72c6ba5:/src/views/viewproperties.cpp diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index 19aca4583..83958ad00 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -20,7 +20,6 @@ #include "viewproperties.h" -#include "rolesaccessor.h" #include "dolphin_directoryviewpropertysettings.h" #include "dolphin_generalsettings.h" @@ -67,6 +66,10 @@ ViewProperties::ViewProperties(const KUrl& url) : m_filePath = url.toLocalFile(); const QFileInfo info(m_filePath); if (!info.isWritable() || !isPartOfHome(m_filePath)) { +#ifdef Q_OS_WIN + // m_filePath probably begins with C:/ - the colon is not a valid character for paths though + m_filePath = QDir::separator() + m_filePath.remove(QLatin1Char(':')); +#endif m_filePath = destinationDir("local") + m_filePath; } } else { @@ -289,6 +292,19 @@ QList ViewProperties::visibleRoles() const return roles; } +void ViewProperties::setHeaderColumnWidths(const QList& widths) +{ + if (m_node->headerColumnWidths() != widths) { + m_node->setHeaderColumnWidths(widths); + update(); + } +} + +QList ViewProperties::headerColumnWidths() const +{ + return m_node->headerColumnWidths(); +} + void ViewProperties::setDirProperties(const ViewProperties& props) { setViewMode(props.viewMode()); @@ -299,6 +315,7 @@ void ViewProperties::setDirProperties(const ViewProperties& props) setSortOrder(props.sortOrder()); setSortFoldersFirst(props.sortFoldersFirst()); setVisibleRoles(props.visibleRoles()); + setHeaderColumnWidths(props.headerColumnWidths()); } void ViewProperties::setAutoSaveEnabled(bool autoSave)