[Libreoffice-commits] core.git: vcl/unx

Milian Wolff milian.wolff at kdab.com
Thu Jan 25 21:36:14 UTC 2018


 vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit bea99d013a0dea0c010a94425aef08c6711a669c
Author: Milian Wolff <milian.wolff at kdab.com>
Date:   Thu Jan 25 14:08:28 2018 +0100

    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 at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

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);


More information about the Libreoffice-commits mailing list