diff options
Diffstat (limited to 'src/app/qbs/parser/commandlineparser.cpp')
-rw-r--r-- | src/app/qbs/parser/commandlineparser.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/app/qbs/parser/commandlineparser.cpp b/src/app/qbs/parser/commandlineparser.cpp index 052f6b92f..5d3c14ebb 100644 --- a/src/app/qbs/parser/commandlineparser.cpp +++ b/src/app/qbs/parser/commandlineparser.cpp @@ -111,14 +111,9 @@ public: bool logTime; }; -CommandLineParser::CommandLineParser() : d(nullptr) -{ -} +CommandLineParser::CommandLineParser() = default; -CommandLineParser::~CommandLineParser() -{ - delete d; -} +CommandLineParser::~CommandLineParser() = default; void CommandLineParser::printHelp() const { @@ -309,8 +304,7 @@ QList<QVariantMap> CommandLineParser::buildConfigurations() const bool CommandLineParser::parseCommandLine(const QStringList &args) { - delete d; - d = new CommandLineParserPrivate; + d = std::make_unique<CommandLineParserPrivate>(); d->commandLine = args; try { d->doParse(); |