mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-06 05:24:13 -04:00
Allows printing version with -v when an instance is already running
Fixes #1362 by checking if the -v argument was used when deciding whether to print the "keepassxc is already running" error message
This commit is contained in:
parent
c5cd4b6783
commit
c19df0130b
1 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ int main(int argc, char** argv)
|
||||||
"handle");
|
"handle");
|
||||||
|
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
parser.addVersionOption();
|
QCommandLineOption versionOption = parser.addVersionOption();
|
||||||
parser.addOption(configOption);
|
parser.addOption(configOption);
|
||||||
parser.addOption(keyfileOption);
|
parser.addOption(keyfileOption);
|
||||||
parser.addOption(pwstdinOption);
|
parser.addOption(pwstdinOption);
|
||||||
|
@ -105,7 +105,7 @@ int main(int argc, char** argv)
|
||||||
parser.process(app);
|
parser.process(app);
|
||||||
const QStringList fileNames = parser.positionalArguments();
|
const QStringList fileNames = parser.positionalArguments();
|
||||||
|
|
||||||
if (app.isAlreadyRunning()) {
|
if (app.isAlreadyRunning() && !parser.isSet(versionOption)) {
|
||||||
if (!fileNames.isEmpty()) {
|
if (!fileNames.isEmpty()) {
|
||||||
app.sendFileNamesToRunningInstance(fileNames);
|
app.sendFileNamesToRunningInstance(fileNames);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue