forked from qt-creator/qt-creator
Vcs: Introduce IVersionControl::unmanagedFiles()
... and use it in VcsManager::promptToAdd(). This is purely a refactoring. The different IVersionControl subclasses can (and should) override the naive base class implementation in the future. Change-Id: Ifdf49852a98f53a95dad1a89131243b21052bc66 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "iversioncontrol.h"
|
||||
#include "vcsmanager.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -147,6 +148,14 @@ IVersionControl::~IVersionControl()
|
||||
delete m_topicCache;
|
||||
}
|
||||
|
||||
QStringList IVersionControl::unmanagedFiles(const QString &workingDir,
|
||||
const QStringList &filePaths) const
|
||||
{
|
||||
return Utils::filtered(filePaths, [wd = QDir(workingDir), this](const QString &f) {
|
||||
return !managesFile(wd.path(), wd.relativeFilePath(f));
|
||||
});
|
||||
}
|
||||
|
||||
IVersionControl::OpenSupportMode IVersionControl::openSupportMode(const QString &fileName) const
|
||||
{
|
||||
Q_UNUSED(fileName)
|
||||
|
||||
Reference in New Issue
Block a user