Commit ec688e5c authored by Robert Loehning's avatar Robert Loehning
Browse files

Resurrecting the title and tooltip of FolderNavigationWidget

parent fa2d2717
......@@ -224,8 +224,13 @@ bool FolderNavigationWidget::setCurrentDirectory(const QString &directory)
// Set the root path on the model instead of changing the top index
// of the view to cause the model to clean out its file watchers.
const QModelIndex index = m_fileSystemModel->setRootPath(newDirectory);
QTC_ASSERT(index.isValid(), return false)
if (!index.isValid()) {
setCurrentTitle(QString(), QString());
return false;
const QDir current(QDir::cleanPath(newDirectory));
setCurrentTitle(current.dirName(), current.absolutePath());
return !directory.isEmpty();
Supports Markdown
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