diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2013-11-28 14:20:46 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-11-28 15:06:22 +0100 |
commit | 630e5356580cb7befd719556a5ed1326e5bb2954 (patch) | |
tree | f1ff341499789725b83271fd257a066e01095451 /src/plugins/coreplugin/vcsmanager.cpp | |
parent | 7d266c648efc90871201c63c3119d8437f8cebe6 (diff) | |
download | qt-creator-630e5356580cb7befd719556a5ed1326e5bb2954.tar.gz |
VcsManager: Clear topLevel directory when necessary
Clear the topLevelDirectory when being asked to find the version
control system responsible for directory "".
Change-Id: I8806ebff1200f0fc936715ffab94acf1f10cb386
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/coreplugin/vcsmanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/vcsmanager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index 239145c57f..2d4789e9e5 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -233,8 +233,11 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input { typedef QPair<QString, IVersionControl *> StringVersionControlPair; typedef QList<StringVersionControlPair> StringVersionControlPairs; - if (inputDirectory.isEmpty()) + if (inputDirectory.isEmpty()) { + if (topLevelDirectory) + topLevelDirectory->clear(); return 0; + } // Make sure we an absolute path: const QString directory = QDir(inputDirectory).absolutePath(); |