diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-10-24 10:50:33 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-11-16 15:11:15 +0000 |
commit | 4432ba4949647917d0fc3fb2ef73f9737a7c2431 (patch) | |
tree | e36f48e90f7019ad0ecfb7046638cebf3410930e /src/app/config-ui | |
parent | a0c61e70eeefbf9d6c632a94d29bcc2a7e97b7d7 (diff) |
STL compatibility: use empty() instead of isEmpty()
This is a simple find and replace with manual sanity check.
Change-Id: Iab6d46dcc3be246d1650aae2b1730f933b717be8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/app/config-ui')
-rw-r--r-- | src/app/config-ui/commandlineparser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/app/config-ui/commandlineparser.cpp b/src/app/config-ui/commandlineparser.cpp index 5c5606442..b05d84343 100644 --- a/src/app/config-ui/commandlineparser.cpp +++ b/src/app/config-ui/commandlineparser.cpp @@ -52,12 +52,12 @@ static QString settingsDirOption() { return QLatin1String("--settings-dir"); } void CommandLineParser::parse(const QStringList &commandLine) { m_commandLine = commandLine; - Q_ASSERT(!m_commandLine.isEmpty()); + Q_ASSERT(!m_commandLine.empty()); m_command = QFileInfo(m_commandLine.takeFirst()).fileName(); m_helpRequested = false; m_settingsDir.clear(); - if (m_commandLine.isEmpty()) + if (m_commandLine.empty()) return; const QString &arg = m_commandLine.front(); if (arg == helpOptionShort() || arg == helpOptionLong()) { @@ -68,7 +68,7 @@ void CommandLineParser::parse(const QStringList &commandLine) assignOptionArgument(settingsDirOption(), m_settingsDir); } - if (!m_commandLine.isEmpty()) + if (!m_commandLine.empty()) complainAboutExtraArguments(); } @@ -92,7 +92,7 @@ QString CommandLineParser::usageString() const void CommandLineParser::assignOptionArgument(const QString &option, QString &argument) { - if (m_commandLine.isEmpty()) + if (m_commandLine.empty()) throwError(Tr::tr("Option '%1' needs an argument.").arg(option)); argument = m_commandLine.takeFirst(); if (argument.isEmpty()) |