diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2018-01-25 14:08:28 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-01-25 22:35:50 +0100 |
commit | bea99d013a0dea0c010a94425aef08c6711a669c (patch) | |
tree | eb462e88ba934e580a22be6e056ee54f138399bc /vcl | |
parent | 91ab6b4feda09e2ded45f716d8f283ced06971ad (diff) |
lo_kde5filepicker: cleanup main and add version and help options
This way users can figure out what this tool is about. Most notably,
you can run it now with `-h, --help` as one would expect.
Change-Id: If8dd3142bdcc96d2962a2647b2187d75666b9394
Reviewed-on: https://gerrit.libreoffice.org/48592
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx index c17236d281a0..d25af0afee70 100644 --- a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx +++ b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx @@ -21,14 +21,29 @@ #include "kde5_filepicker_ipc.hxx" #include <QApplication> +#include <QDebug> +#include <QCommandLineParser> -#include <iostream> +#include <config_version.h> int main(int argc, char** argv) { + QApplication::setOrganizationName("LibreOffice"); + QApplication::setOrganizationDomain("libreoffice.org"); QApplication::setApplicationName(QStringLiteral("lo_kde5filepicker")); - QApplication app(argc, argv); QApplication::setQuitOnLastWindowClosed(false); + QApplication::setApplicationVersion(LIBO_VERSION_DOTTED); + + QApplication app(argc, argv); + + QCommandLineParser parser; + parser.setApplicationDescription( + QObject::tr("Helper executable for LibreOffice KDE/Plasma integration.\n" + "Do not run this executable directly. Rather, use it indirectly via " + "the gtk3_kde5 VCL plugin (SAL_USE_VCLPLUGIN=gtk3_kde5).")); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); KDE5FilePicker filePicker; FilePickerIpc ipc(&filePicker); |