Kaydet (Commit) bea99d01 authored tarafından Milian Wolff's avatar Milian Wolff Kaydeden (comit) Thorsten Behrens

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/48592Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 91ab6b4f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment