Commit 745c58be authored by hjk's avatar hjk

core: use Core::Id for IVersionControl::id()

Change-Id: I54e17c91c3e2a69d598ed485235dbf7ec62b4615
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent f6a14440
......@@ -53,9 +53,9 @@ QString BazaarControl::displayName() const
return tr("Bazaar");
}
QString BazaarControl::id() const
Core::Id BazaarControl::id() const
{
return QLatin1String(VcsBase::Constants::VCS_ID_BAZAAR);
return VcsBase::Constants::VCS_ID_BAZAAR;
}
bool BazaarControl::managesDirectory(const QString &directory, QString *topLevel) const
......
......@@ -54,7 +54,7 @@ public:
explicit BazaarControl(BazaarClient *bazaarClient);
QString displayName() const;
QString id() const;
Core::Id id() const;
bool managesDirectory(const QString &filename, QString *topLevel = 0) const;
bool isConfigured() const;
......
......@@ -34,6 +34,7 @@
#define IVERSIONCONTROL_H
#include "core_global.h"
#include "id.h"
#include <QtCore/QObject>
#include <QtCore/QString>
......@@ -64,7 +65,7 @@ public:
virtual ~IVersionControl() {}
virtual QString displayName() const = 0;
virtual QString id() const = 0;
virtual Id id() const = 0;
/*!
* Returns whether files in this directory should be managed with this
......
......@@ -51,9 +51,9 @@ QString CVSControl::displayName() const
return QLatin1String("cvs");
}
QString CVSControl::id() const
Core::Id CVSControl::id() const
{
return QLatin1String(VcsBase::Constants::VCS_ID_CVS);
return VcsBase::Constants::VCS_ID_CVS;
}
bool CVSControl::isConfigured() const
......
......@@ -44,10 +44,11 @@ class CVSPlugin;
class CVSControl : public Core::IVersionControl
{
Q_OBJECT
public:
explicit CVSControl(CVSPlugin *plugin);
QString displayName() const;
QString id() const;
Core::Id id() const;
bool managesDirectory(const QString &directory, QString *topLevel = 0) const;
......
......@@ -57,9 +57,9 @@ QString GitVersionControl::displayName() const
return QLatin1String("git");
}
QString GitVersionControl::id() const
Core::Id GitVersionControl::id() const
{
return QLatin1String(VcsBase::Constants::VCS_ID_GIT);
return VcsBase::Constants::VCS_ID_GIT;
}
bool GitVersionControl::isConfigured() const
......
......@@ -48,7 +48,7 @@ public:
explicit GitVersionControl(GitClient *plugin);
QString displayName() const;
QString id() const;
Core::Id id() const;
bool managesDirectory(const QString &directory, QString *topLevel) const;
......
......@@ -53,9 +53,9 @@ QString MercurialControl::displayName() const
return tr("Mercurial");
}
QString MercurialControl::id() const
Core::Id MercurialControl::id() const
{
return QLatin1String(VcsBase::Constants::VCS_ID_MERCURIAL);
return VcsBase::Constants::VCS_ID_MERCURIAL;
}
bool MercurialControl::managesDirectory(const QString &directory, QString *topLevel) const
......
......@@ -54,7 +54,7 @@ public:
explicit MercurialControl(MercurialClient *mercurialClient);
QString displayName() const;
QString id() const;
Core::Id id() const;
bool managesDirectory(const QString &filename, QString *topLevel = 0) const;
bool isConfigured() const;
bool supportsOperation(Operation operation) const;
......
......@@ -53,9 +53,9 @@ QString PerforceVersionControl::displayName() const
return QLatin1String("perforce");
}
QString PerforceVersionControl::id() const
Core::Id PerforceVersionControl::id() const
{
return QLatin1String(VcsBase::Constants::VCS_ID_PERFORCE);
return VcsBase::Constants::VCS_ID_PERFORCE;
}
bool PerforceVersionControl::isConfigured() const
......
......@@ -47,7 +47,7 @@ public:
explicit PerforceVersionControl(PerforcePlugin *plugin);
QString displayName() const;
QString id() const;
Core::Id id() const;
bool managesDirectory(const QString &directory, QString *topLevel = 0) const;
......
......@@ -51,9 +51,9 @@ QString SubversionControl::displayName() const
return QLatin1String("subversion");
}
QString SubversionControl::id() const
Core::Id SubversionControl::id() const
{
return QLatin1String(VcsBase::Constants::VCS_ID_SUBVERSION);
return VcsBase::Constants::VCS_ID_SUBVERSION;
}
bool SubversionControl::isConfigured() const
......
......@@ -47,7 +47,7 @@ class SubversionControl : public Core::IVersionControl
public:
explicit SubversionControl(SubversionPlugin *plugin);
QString displayName() const;
QString id() const;
Core::Id id() const;
bool managesDirectory(const QString &directory, QString *topLevel = 0) const;
......
......@@ -93,7 +93,7 @@ bool VcsConfigurationPage::isComplete() const
void VcsConfigurationPage::openConfiguration()
{
Core::ICore *core = Core::ICore::instance();
core->showOptionsDialog(VcsBase::Constants::VCS_SETTINGS_CATEGORY, d->m_versionControl->id());
core->showOptionsDialog(VcsBase::Constants::VCS_SETTINGS_CATEGORY, d->m_versionControl->id().toString());
}
} // namespace VcsBase
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment