From a460fa31529abb3bdd05306f60a696b5f89f5892 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 31 Jul 2019 09:19:23 +0200 Subject: [PATCH] Utils: Register CommandLine Needed e.g. in VCS support. Change-Id: I3a9d64526bc0bf60a77ab154408dfec94cc6ba75 Reviewed-by: Eike Ziller --- src/libs/utils/fileutils.cpp | 2 ++ src/libs/utils/fileutils.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index 363697c4fba..2edcf420bbc 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -74,6 +74,8 @@ namespace Utils { */ +CommandLine::CommandLine() = default; + CommandLine::CommandLine(const QString &executable) : m_executable(FilePath::fromString(executable)) {} diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h index c40ad2b3303..a4693ddf752 100644 --- a/src/libs/utils/fileutils.h +++ b/src/libs/utils/fileutils.h @@ -130,7 +130,7 @@ class QTCREATOR_UTILS_EXPORT CommandLine public: enum RawType { Raw }; - CommandLine() {} + CommandLine(); explicit CommandLine(const QString &executable); explicit CommandLine(const FilePath &executable); CommandLine(const QString &exe, const QStringList &args); @@ -300,3 +300,4 @@ template<> struct hash } // namespace std Q_DECLARE_METATYPE(Utils::FilePath) +Q_DECLARE_METATYPE(Utils::CommandLine)