Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop
Commits
00b4beed
Commit
00b4beed
authored
Nov 11, 2012
by
Milian Wolff
Browse files
Gracefully handle the case where the git plugin is disabled.
BUG: 278252
parent
b867b9b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
providers/kdeprovider/kdeproviderwidget.cpp
View file @
00b4beed
...
...
@@ -34,6 +34,7 @@
#include "kdeprojectsreader.h"
#include <QSortFilterProxyModel>
#include <KFilterProxySearchLine>
#include <KMessageBox>
using
namespace
KDevelop
;
...
...
@@ -95,6 +96,10 @@ VcsJob* KDEProviderWidget::createWorkingCopy(const KUrl& destinationDirectory)
return
0
;
IPlugin
*
plugin
=
ICore
::
self
()
->
pluginController
()
->
pluginForExtension
(
"org.kdevelop.IBasicVersionControl"
,
"kdevgit"
);
if
(
!
plugin
)
{
KMessageBox
::
error
(
0
,
i18n
(
"The Git plugin could not be loaded which is required to download a KDE project."
),
i18n
(
"KDE Provider Error"
));
return
0
;
}
IBasicVersionControl
*
vcIface
=
plugin
->
extension
<
IBasicVersionControl
>
();
VcsJob
*
ret
=
vcIface
->
createWorkingCopy
(
extractLocation
(
pos
.
data
(
KDEProjectsModel
::
VcsLocationRole
).
toMap
()),
destinationDirectory
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment