From 5b4205a19b000065308c5110696f9ada4df83499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 14 Aug 2023 18:20:47 +0200 Subject: [PATCH] Print some more help in yacreaderlibraryserver's description --- YACReaderLibraryServer/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/YACReaderLibraryServer/main.cpp b/YACReaderLibraryServer/main.cpp index 0437bd42..084f3850 100644 --- a/YACReaderLibraryServer/main.cpp +++ b/YACReaderLibraryServer/main.cpp @@ -127,8 +127,13 @@ int main(int argc, char **argv) #endif app.installTranslator(&translator); + auto settingsPath = YACReader::getSettingsPath() + "/" + QCoreApplication::applicationName() + ".ini"; + QCommandLineParser parser; - parser.setApplicationDescription(QCoreApplication::tr("\nYACReaderLibraryServer is the headless (no gui) version of YACReaderLibrary")); + parser.setApplicationDescription(QString(QCoreApplication::tr("\nYACReaderLibraryServer is the headless (no gui) version of YACReaderLibrary.\n\n" + "This appplication support persisten settings, to set them up edit this file %1\n" + "To learn about the available settings please check the documentation at https://raw.githubusercontent.com/YACReader/yacreader/develop/YACReaderLibraryServer/SETTINGS_README.md")) + .arg(settingsPath)); parser.addHelpOption(); const QCommandLineOption versionOption = parser.addVersionOption(); parser.addPositionalArgument("command", "The command to execute. [start, create-library, update-library, add-library, remove-library, list-libraries, set-port]"); @@ -146,7 +151,7 @@ int main(int argc, char **argv) return 0; } - QSettings *settings = new QSettings(YACReader::getSettingsPath() + "/" + QCoreApplication::applicationName() + ".ini", QSettings::IniFormat); + QSettings *settings = new QSettings(settingsPath, QSettings::IniFormat); settings->beginGroup("libraryConfig"); if (command == "start") {