Print some more help in yacreaderlibraryserver's description

This commit is contained in:
Luis Ángel San Martín 2023-08-14 18:20:47 +02:00
parent 42f2771b3f
commit 5b4205a19b

View File

@ -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") {