aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perforce
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-07-23 10:17:57 +0200
committerhjk <hjk@qt.io>2019-07-23 15:51:45 +0000
commit8b72e9216746c04e68a1c6498ac3396942fbebce (patch)
treec8742f1cf932ec3fae5a3f6476b390dbeb06ec9e /src/plugins/perforce
parent80716610c5f4deb32af15f1189363bf2ebffa41e (diff)
Utils: Add CommandLine convenience constructors
... taking a QString for the executable. This weakens the very explicit QString -> FileName conversion via the named constructors for the special case of constructing a CommandLine. I think that's worthwhile here, as it reduces the noise on the caller site under circumstance where the nature of the thing is obvious. Change-Id: I27b4a73639728893d053b2e7ba65cb745f0ffe83 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r--src/plugins/perforce/perforceplugin.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp
index 0fb4c09b39..b7c0be4bed 100644
--- a/src/plugins/perforce/perforceplugin.cpp
+++ b/src/plugins/perforce/perforceplugin.cpp
@@ -996,8 +996,7 @@ PerforceResponse PerforcePlugin::synchronousProcess(const QString &workingDir,
}
}
process.setTimeOutMessageBoxEnabled(true);
- const SynchronousProcessResponse sp_resp = process.run(
- CommandLine{FilePath::fromString(settings().p4BinaryPath()), args});
+ const SynchronousProcessResponse sp_resp = process.run({settings().p4BinaryPath(), args});
PerforceResponse response;
response.error = true;
@@ -1119,7 +1118,7 @@ PerforceResponse PerforcePlugin::runP4Cmd(const QString &workingDir,
actualArgs.append(args);
if (flags & CommandToWindow)
- VcsOutputWindow::appendCommand(workingDir, {FilePath::fromString(settings().p4BinaryPath()), actualArgs});
+ VcsOutputWindow::appendCommand(workingDir, {settings().p4BinaryPath(), actualArgs});
if (flags & ShowBusyCursor)
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));