diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-03-13 16:16:52 +0200 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2020-03-19 12:31:46 +0200 |
commit | 559a6b4ed5b23fee084929f9f62fabe223294f49 (patch) | |
tree | 863a38c697a5e59805cb076a21aa95fa01c3a858 /src/sdk/installerbase.cpp | |
parent | 8878f49cc00a5dcd0a8acd89cd5c9d8b89505941 (diff) |
Add short versions of CLI options
Add single or couple letter short options and two letter short commands.
Single letter short options can be passed in a single joined form, for
instance '-dg'.
Also change CLI options constant string literals type to QLatin1String
as we would have to use this as a wrapper anyway wherever the constants
would be used, causing quite long and verbose statements.
Task-number: QTIFW-1634
Change-Id: I17e80c9a657d934687d2b7e87fcecddffa1b9b21
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/sdk/installerbase.cpp')
-rw-r--r-- | src/sdk/installerbase.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index 3cc5db5a5..8a3d18327 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -66,14 +66,14 @@ int InstallerBase::run() return EXIT_FAILURE; } - if (m_parser.isSet(QLatin1String(CommandLineOptions::ShowVirtualComponents))) { + if (m_parser.isSet(CommandLineOptions::scShowVirtualComponentsLong)) { QFont f; f.setItalic(true); QInstaller::PackageManagerCore::setVirtualComponentsFont(f); } QString controlScript; - if (m_parser.isSet(QLatin1String(CommandLineOptions::Script))) { - controlScript = m_parser.value(QLatin1String(CommandLineOptions::Script)); + if (m_parser.isSet(CommandLineOptions::scScriptLong)) { + controlScript = m_parser.value(CommandLineOptions::scScriptLong); if (!QFileInfo(controlScript).exists()) { qCDebug(QInstaller::lcInstallerInstallLog) << "Script file does not exist."; return false; @@ -144,8 +144,8 @@ int InstallerBase::run() #ifdef ENABLE_SQUISH int squishPort = 11233; - if (m_parser.isSet(QLatin1String(CommandLineOptions::SquishPort))) { - squishPort = m_parser.value(QLatin1String(CommandLineOptions::SquishPort)).toInt(); + if (m_parser.isSet(CommandLineOptions::scSquishPortLong)) { + squishPort = m_parser.value(CommandLineOptions::scSquishPortLong).toInt(); } if (squishPort != 0) { if (Squish::allowAttaching(squishPort)) |