summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/foldernavigationwidget.cpp
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@nokia.com>2010-04-21 13:42:36 +0200
committerRobert Loehning <robert.loehning@nokia.com>2010-04-21 13:43:50 +0200
commitec688e5c62170553770e46c7f673ca965630bba7 (patch)
treeae4e91b212e88c63b78947ada3e5a3235ea82322 /src/plugins/projectexplorer/foldernavigationwidget.cpp
parentfa2d2717a911b0ce872de6161abcb14ca7b4f7fb (diff)
downloadqt-creator-ec688e5c62170553770e46c7f673ca965630bba7.tar.gz
Resurrecting the title and tooltip of FolderNavigationWidget
Diffstat (limited to 'src/plugins/projectexplorer/foldernavigationwidget.cpp')
-rw-r--r--src/plugins/projectexplorer/foldernavigationwidget.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index 70d73a40c3..97b4e42d16 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -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;
+ }
m_listView->setRootIndex(m_filterModel->mapFromSource(index));
+ const QDir current(QDir::cleanPath(newDirectory));
+ setCurrentTitle(current.dirName(), current.absolutePath());
return !directory.isEmpty();
}