Commit 979a1a70 authored by Robert Loehning's avatar Robert Loehning

Fixed display of root path and Windows paths in FolderNavigationWidget.

parent bfa80c41
......@@ -230,7 +230,8 @@ bool FolderNavigationWidget::setCurrentDirectory(const QString &directory)
}
m_listView->setRootIndex(m_filterModel->mapFromSource(index));
const QDir current(QDir::cleanPath(newDirectory));
setCurrentTitle(current.dirName(), current.absolutePath());
setCurrentTitle(current.dirName(),
QDir::toNativeSeparators(current.absolutePath()));
return !directory.isEmpty();
}
......@@ -267,8 +268,10 @@ void FolderNavigationWidget::openItem(const QModelIndex &srcIndex)
editorManager->openEditor(m_fileSystemModel->filePath(srcIndex));
}
void FolderNavigationWidget::setCurrentTitle(const QString &dirName, const QString &fullPath)
void FolderNavigationWidget::setCurrentTitle(QString dirName, const QString &fullPath)
{
if (dirName.isEmpty())
dirName = fullPath;
m_title->setText(dirName);
m_title->setToolTip(fullPath);
}
......
......@@ -81,7 +81,7 @@ protected:
virtual void contextMenuEvent(QContextMenuEvent *ev);
private:
void setCurrentTitle(const QString &dirName, const QString &fullPath);
void setCurrentTitle(QString dirName, const QString &fullPath);
bool setCurrentDirectory(const QString &directory);
void openItem(const QModelIndex &srcIndex);
QModelIndex currentItem() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment