From 8b72e9216746c04e68a1c6498ac3396942fbebce Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 23 Jul 2019 10:17:57 +0200 Subject: 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 --- src/libs/utils/fileutils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libs/utils/fileutils.h') diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h index 4b5ce6dc48..4385d6f618 100644 --- a/src/libs/utils/fileutils.h +++ b/src/libs/utils/fileutils.h @@ -135,7 +135,9 @@ public: enum class MetaCharMode { Abort, Ignore }; CommandLine() {} + explicit CommandLine(const QString &executable); explicit CommandLine(const FilePath &executable); + CommandLine(const QString &exe, const QStringList &args); CommandLine(const FilePath &exe, const QStringList &args, MetaCharMode metaCharMode = MetaCharMode::Abort); -- cgit v1.2.1