mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-13 16:30:29 -05: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
@ -96,7 +96,7 @@ int main(int argc, char** argv)
|
||||
"handle");
|
||||
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
QCommandLineOption versionOption = parser.addVersionOption();
|
||||
parser.addOption(configOption);
|
||||
parser.addOption(keyfileOption);
|
||||
parser.addOption(pwstdinOption);
|
||||
@ -105,7 +105,7 @@ int main(int argc, char** argv)
|
||||
parser.process(app);
|
||||
const QStringList fileNames = parser.positionalArguments();
|
||||
|
||||
if (app.isAlreadyRunning()) {
|
||||
if (app.isAlreadyRunning() && !parser.isSet(versionOption)) {
|
||||
if (!fileNames.isEmpty()) {
|
||||
app.sendFileNamesToRunningInstance(fileNames);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user