mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Change -P command line option to -p
Flags should be lowercase by default for consistency
This commit is contained in:
parent
7b7ff9c474
commit
19ad3ac7f1
|
@ -66,13 +66,13 @@ int main(int argc, char *argv[])
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
parser.addVersionOption();
|
parser.addVersionOption();
|
||||||
parser.addPositionalArgument("uri", QObject::tr("Tox URI to parse"));
|
parser.addPositionalArgument("uri", QObject::tr("Tox URI to parse"));
|
||||||
parser.addOption(QCommandLineOption("P", QObject::tr("Starts new instance and loads specified profile."), QObject::tr("profile")));
|
parser.addOption(QCommandLineOption("p", QObject::tr("Starts new instance and loads specified profile."), QObject::tr("profile")));
|
||||||
parser.process(a);
|
parser.process(a);
|
||||||
|
|
||||||
Settings::getInstance(); // Build our Settings singleton as soon as QApplication is ready, not before
|
Settings::getInstance(); // Build our Settings singleton as soon as QApplication is ready, not before
|
||||||
if (parser.isSet("P"))
|
if (parser.isSet("p"))
|
||||||
{
|
{
|
||||||
QString profile = parser.value("P");
|
QString profile = parser.value("p");
|
||||||
if (QDir(Settings::getSettingsDirPath()).exists(profile + ".tox"))
|
if (QDir(Settings::getSettingsDirPath()).exists(profile + ".tox"))
|
||||||
{
|
{
|
||||||
qDebug() << "Setting profile to" << profile;
|
qDebug() << "Setting profile to" << profile;
|
||||||
|
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qWarning() << "Error: -P profile" << profile + ".tox" << "doesn't exist";
|
qWarning() << "Error: -p profile" << profile + ".tox" << "doesn't exist";
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user