From: Michael Schuster Date: Sat, 6 Jun 2020 18:04:48 +0000 (+0200) Subject: Improve command line version info and help display to streamline gui and cmd X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~177^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=221e5c5fc4a96c1aa94188d5fa084ab5d07a457e;p=nextcloud-desktop.git Improve command line version info and help display to streamline gui and cmd Signed-off-by: Michael Schuster --- diff --git a/src/gui/application.cpp b/src/gui/application.cpp index be5c098fe..65539b9b5 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -68,9 +68,9 @@ namespace { static const char optionsC[] = "Options:\n" - " -h --help : show this help screen.\n" - " --version : show version information.\n" - " --logwindow : open a window to show log output.\n" + " --help, -h : show this help screen.\n" + " --version, -v : show version information.\n" + " --logwindow, -l : open a window to show log output.\n" " --logfile : write log output to file .\n" " --logdir : write each sync log output in a new file\n" " in folder .\n" @@ -495,7 +495,7 @@ void Application::parseOptions(const QStringList &options) _debugMode = true; } else if (option == QLatin1String("--background")) { _backgroundMode = true; - } else if (option == QLatin1String("--version")) { + } else if (option == QLatin1String("--version") || option == QLatin1String("-v")) { _versionOnly = true; } else { showHint("Unrecognized option '" + option.toStdString() + "'"); diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 5ad0c4363..6e0e2760f 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -565,7 +565,10 @@ QString Theme::versionSwitchOutput() const stream << "Git revision " << GIT_SHA1 << endl; #endif stream << "Using Qt " << qVersion() << ", built against Qt " << QT_VERSION_STR << endl; - stream << "Using Qt platform plugin '" << QGuiApplication::platformName() << "'" << endl; + + if(!QGuiApplication::platformName().isEmpty()) + stream << "Using Qt platform plugin '" << QGuiApplication::platformName() << "'" << endl; + stream << "Using '" << QSslSocket::sslLibraryVersionString() << "'" << endl; stream << "Running on " << Utility::platformName() << ", " << QSysInfo::currentCpuArchitecture() << endl; return helpText;