diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-10-20 13:06:11 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2016-10-21 13:04:40 +0000 |
commit | 28325aa446e59cfc428ed48e7a29a64cfd006431 (patch) | |
tree | 58a67dbbdb31cee7178b25025c8f3022efb932d0 /src/plugins/cvs | |
parent | 768eb4e52ecf5da9b25c05828c666d28560d735d (diff) | |
download | qt-creator-28325aa446e59cfc428ed48e7a29a64cfd006431.tar.gz |
VCS: Add a way to filter out files/directories that belong to a VCS
Change-Id: I4dcbe6242cfe327e3b72d3dd550309be45e326a9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cvs')
-rw-r--r-- | src/plugins/cvs/cvscontrol.cpp | 7 | ||||
-rw-r--r-- | src/plugins/cvs/cvscontrol.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/cvs/cvscontrol.cpp b/src/plugins/cvs/cvscontrol.cpp index c277557d16..22f09bdff5 100644 --- a/src/plugins/cvs/cvscontrol.cpp +++ b/src/plugins/cvs/cvscontrol.cpp @@ -33,6 +33,7 @@ #include <vcsbase/vcscommand.h> #include <utils/fileutils.h> +#include <utils/hostosinfo.h> #include <utils/qtcassert.h> #include <QFileInfo> @@ -54,6 +55,12 @@ Core::Id CvsControl::id() const return Core::Id(VcsBase::Constants::VCS_ID_CVS); } +bool CvsControl::isVcsFileOrDirectory(const Utils::FileName &fileName) const +{ + return fileName.toFileInfo().isDir() + && fileName.fileName().compare("CVS", Utils::HostOsInfo::fileNameCaseSensitivity()); +} + bool CvsControl::isConfigured() const { const Utils::FileName binary = m_plugin->client()->vcsBinary(); diff --git a/src/plugins/cvs/cvscontrol.h b/src/plugins/cvs/cvscontrol.h index 5e2c2a6a1b..1bc093b788 100644 --- a/src/plugins/cvs/cvscontrol.h +++ b/src/plugins/cvs/cvscontrol.h @@ -42,6 +42,8 @@ public: QString displayName() const final; Core::Id id() const final; + bool isVcsFileOrDirectory(const Utils::FileName &fileName) const final; + bool managesDirectory(const QString &directory, QString *topLevel = 0) const final; bool managesFile(const QString &workingDirectory, const QString &fileName) const final; |