~ubuntu-branches/ubuntu/quantal/kdevplatform/quantal-proposed

« back to all changes in this revision

Viewing changes to plugins/git/gitplugin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Philip Muskovac
  • Date: 2011-01-12 16:35:32 UTC
  • mfrom: (0.3.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20110112163532-i22jhfmtvoq9oyjb
Tags: 1.1.90-0ubuntu1~ppa2
* New upstream release 
  - don't suggest removed l10n packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#include <interfaces/iruncontroller.h>
49
49
#include "stashmanagerdialog.h"
50
50
#include <KMessageBox>
 
51
#include <KStandardDirs>
51
52
#include "gitjob.h"
52
53
 
53
54
K_PLUGIN_FACTORY(KDevGitFactory, registerPlugin<GitPlugin>(); )
161
162
GitPlugin::GitPlugin( QObject *parent, const QVariantList & )
162
163
    : DistributedVersionControlPlugin(parent, KDevGitFactory::componentData()), m_oldVersion(false)
163
164
{
 
165
    if (KStandardDirs::findExe("git").isEmpty()) {
 
166
        m_hasError = true;
 
167
        m_errorDescription = "git is not installed";
 
168
        return;
 
169
    }
 
170
 
164
171
    KDEV_USE_EXTENSION_INTERFACE( KDevelop::IBasicVersionControl )
165
172
    KDEV_USE_EXTENSION_INTERFACE( KDevelop::IDistributedVersionControl )
166
173
 
 
174
    m_hasError = false;
167
175
    core()->uiController()->addToolView(i18n("Git"), dvcsViewFactory());
168
176
    setObjectName("Git");
169
177
    
1175
1183
{
1176
1184
    return new GitVcsLocationWidget(parent);
1177
1185
}
 
1186
 
 
1187
bool GitPlugin::hasError() const
 
1188
{
 
1189
    return m_hasError;
 
1190
}
 
1191
 
 
1192
QString GitPlugin::errorDescription() const
 
1193
{
 
1194
    return m_errorDescription;
 
1195
}