diff --git a/plugins/reviewboard/reviewboardplugin.cpp b/plugins/reviewboard/reviewboardplugin.cpp index 0cd48b5e2e..22020d1edc 100644 --- a/plugins/reviewboard/reviewboardplugin.cpp +++ b/plugins/reviewboard/reviewboardplugin.cpp @@ -1,85 +1,85 @@ /* * This file is part of KDevelop * Copyright 2010 Aleix Pol Gonzalez * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "reviewboardplugin.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "reviewpatchdialog.h" #include "reviewboardjobs.h" using namespace KDevelop; K_PLUGIN_FACTORY(KDevReviewBoardFactory, registerPlugin(); ) K_EXPORT_PLUGIN(KDevReviewBoardFactory(KAboutData("kdevreviewboard","kdevreviewboard", ki18n("ReviewBoard Support"), "0.1", ki18n("Deal with the ReviewBoard Patches"), KAboutData::License_GPL))) ReviewBoardPlugin::ReviewBoardPlugin ( QObject* parent, const QVariantList& ) : IPlugin ( KDevReviewBoardFactory::componentData(), parent ) { KDEV_USE_EXTENSION_INTERFACE( KDevelop::IPatchExporter ) } ReviewBoardPlugin::~ReviewBoardPlugin() {} void ReviewBoardPlugin::exportPatch(IPatchSource::Ptr source) { ReviewPatchDialog d; IProject* p = ICore::self()->projectController()->findProjectForUrl(source->baseDir()); if(p) { KConfigGroup versionedConfig = p->projectConfiguration()->group("ReviewBoard"); d.setServer(versionedConfig.readEntry("server", KUrl("https://git.reviewboard.kde.org"))); d.setUsername(versionedConfig.readEntry("username", QString())); } int ret = d.exec(); if(ret==KDialog::Accepted) { ReviewBoard::NewRequest* job=new ReviewBoard::NewRequest(d.server(), source->file(), d.repository(), d.baseDir()); bool corr = job->exec(); if(corr) { KUrl url=d.server(); url.setUserInfo(QString()); QString requrl = QString("%1/r/%2/").arg(url.prettyUrl()).arg(job->requestId()); KMessageBox::information(0, i18n("You can find the new request at:
%1
", requrl), - QString(), QString(), KMessageBox::AllowLink); + QString(), QString(), KMessageBox::Option::AllowLink); } else { KMessageBox::error(0, job->errorText()); } } }