forked from qt-creator/qt-creator
VcsInfo: Remove unneeded c'tor and operator==
Change-Id: I6b2a797290854bd34abc6680d5377749678ef687 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -44,16 +44,6 @@ class VcsManagerPrivate
|
||||
public:
|
||||
class VcsInfo {
|
||||
public:
|
||||
VcsInfo() = default;
|
||||
VcsInfo(IVersionControl *vc, const QString &tl) :
|
||||
versionControl(vc), topLevel(tl)
|
||||
{ }
|
||||
|
||||
bool operator == (const VcsInfo &other) const
|
||||
{
|
||||
return versionControl == other.versionControl && topLevel == other.topLevel;
|
||||
}
|
||||
|
||||
IVersionControl *versionControl = nullptr;
|
||||
QString topLevel;
|
||||
};
|
||||
@@ -99,7 +89,7 @@ public:
|
||||
QString tmpDir = dir;
|
||||
const QChar slash = QLatin1Char('/');
|
||||
while (tmpDir.count() >= topLevel.count() && !tmpDir.isEmpty()) {
|
||||
m_cachedMatches.insert(tmpDir, VcsInfo(vc, topLevel));
|
||||
m_cachedMatches.insert(tmpDir, {vc, topLevel});
|
||||
// if no vc was found, this might mean we're inside a repo internal directory (.git)
|
||||
// Cache only input directory, not parents
|
||||
if (!vc)
|
||||
|
Reference in New Issue
Block a user