Fix no newlines warnings. Patch by Peter Oberndorfer
[kdevelopdvcssupport.git] / plugins / git / gitplugin.cpp
blob90b4ec3b0ed093cb62a0d812fd702f02ca91effb
1 /***************************************************************************
2 * Copyright 2008 Evgeniy Ivanov <powerfox@kde.ru> *
3 * *
4 * This program is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU General Public License as *
6 * published by the Free Software Foundation; either version 2 of *
7 * the License or (at your option) version 3 or any later version *
8 * accepted by the membership of KDE e.V. (or its successor approved *
9 * by the membership of KDE e.V.), which shall act as a proxy *
10 * defined in Section 14 of version 3 of the license. *
11 * *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19 ***************************************************************************/
21 #include "gitplugin.h"
23 #include <KPluginFactory>
24 #include <KPluginLoader>
25 #include <klocalizedstring.h>
26 #include <kaboutdata.h>
27 #include <QDebug>
29 #include <interfaces/icore.h>
30 #include <interfaces/iprojectcontroller.h>
31 #include <interfaces/iproject.h>
33 #include <vcs/vcsjob.h>
34 #include <vcs/vcsrevision.h>
35 #include <vcs/dvcs/dvcsjob.h>
37 #include "gitexecutor.h"
39 K_PLUGIN_FACTORY(KDevGitFactory, registerPlugin<GitPlugin>(); )
40 K_EXPORT_PLUGIN(KDevGitFactory(KAboutData("kdevgit","kdevgit",ki18n("Git"),"0.1",ki18n("A plugin to support git version control systems"), KAboutData::License_GPL)))
42 GitPlugin::GitPlugin( QObject *parent, const QVariantList & )
43 : DistributedVersionControlPlugin(parent, KDevGitFactory::componentData())
45 KDEV_USE_EXTENSION_INTERFACE( KDevelop::IBasicVersionControl )
46 KDEV_USE_EXTENSION_INTERFACE( KDevelop::IDistributedVersionControl )
48 core()->uiController()->addToolView(i18n("Git"), DistributedVersionControlPlugin::d->m_factory);
50 QString EasterEgg = i18n("Thanks for the translation! Have a nice day, mr. translator!");
51 Q_UNUSED(EasterEgg)
53 setXMLFile("kdevgit.rc");
55 DistributedVersionControlPlugin::d->m_exec = new GitExecutor(this);
58 GitPlugin::~GitPlugin()
60 delete DistributedVersionControlPlugin::d;
63 KDevelop::VcsJob*
64 GitPlugin::log(const KUrl& localLocation,
65 const KDevelop::VcsRevision& rev,
66 unsigned long limit)
68 Q_UNUSED(limit)
69 Q_UNUSED(rev)
71 DVCSjob* job = d->m_exec->log(localLocation);
72 return job;
75 KDevelop::VcsJob*
76 GitPlugin::log(const KUrl& localLocation,
77 const KDevelop::VcsRevision& rev,
78 const KDevelop::VcsRevision& limit)
80 Q_UNUSED(limit)
81 return log(localLocation, rev, 0);
84 // #include "gitplugin.moc"