Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Dolphin Plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SDK
Dolphin Plugins
Commits
f72c3036
Commit
f72c3036
authored
Sep 18, 2020
by
Alexander Lohnau
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port away from KRun
parent
0bf959d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
git/fileviewgitplugin.cpp
git/fileviewgitplugin.cpp
+3
-4
git/fileviewgitplugin.h
git/fileviewgitplugin.h
+12
-0
svn/fileviewsvnplugin.cpp
svn/fileviewsvnplugin.cpp
+0
-1
No files found.
git/fileviewgitplugin.cpp
View file @
f72c3036
...
...
@@ -28,7 +28,6 @@
#include "pulldialog.h"
#include <KLocalizedString>
#include <KRun>
#include <KShell>
#include <KPluginFactory>
...
...
@@ -438,7 +437,7 @@ void FileViewGitPlugin::showLocalChanges()
{
Q_ASSERT
(
!
m_contextDir
.
isEmpty
());
KRun
::
runCommand
(
QLatin1String
(
"git difftool --dir-diff ."
),
nullptr
,
m_contextDir
);
runCommand
(
QLatin1String
(
"git difftool --dir-diff ."
)
);
}
void
FileViewGitPlugin
::
showDiff
(
const
QUrl
&
link
)
...
...
@@ -446,7 +445,7 @@ void FileViewGitPlugin::showDiff(const QUrl &link)
if
(
link
.
scheme
()
!=
QLatin1String
(
"rev"
))
{
return
;
}
KRun
::
runCommand
(
QStringLiteral
(
"git difftool --dir-diff %1^ %1"
).
arg
(
link
.
path
()),
nullptr
,
m_contextDir
);
runCommand
(
QStringLiteral
(
"git difftool --dir-diff %1^ %1"
).
arg
(
link
.
path
())
);
}
void
FileViewGitPlugin
::
log
()
...
...
@@ -522,7 +521,7 @@ void FileViewGitPlugin::merge()
{
Q_ASSERT
(
!
m_contextDir
.
isEmpty
());
KRun
::
runCommand
(
QStringLiteral
(
"git mergetool"
),
nullptr
,
m_contextDir
);
runCommand
(
QStringLiteral
(
"git mergetool"
)
);
}
void
FileViewGitPlugin
::
checkout
()
...
...
git/fileviewgitplugin.h
View file @
f72c3036
...
...
@@ -22,6 +22,9 @@
#define FILEVIEWGITPLUGIN_H
#include <Dolphin/KVersionControlPlugin>
#include <KIO/CommandLauncherJob>
#include <KJobUiDelegate>
#include <KDialogJobUiDelegate>
#include <KFileItem>
...
...
@@ -129,6 +132,15 @@ private:
//Current targets. m_contextItems is used if and only if m_contextDir is empty.
mutable
QString
m_contextDir
;
mutable
KFileItemList
m_contextItems
;
// Utility method, because the method call is the same except for the command
void
runCommand
(
const
QString
&
command
)
{
auto
*
job
=
new
KIO
::
CommandLauncherJob
(
command
);
job
->
setWorkingDirectory
(
m_currentDir
);
job
->
setUiDelegate
(
new
KDialogJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
nullptr
));
job
->
start
();
}
};
#endif // FILEVIEWGITPLUGIN_H
svn/fileviewsvnplugin.cpp
View file @
f72c3036
...
...
@@ -22,7 +22,6 @@
#include "fileviewsvnpluginsettings.h"
#include <KLocalizedString>
#include <KRun>
#include <KShell>
#include <KPluginFactory>
...
...
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