Skip to content

Commit 7c0a917

Browse files
Daniel LangeDaniel Lange
Daniel Lange
authored and
Daniel Lange
committed
Fix --version option
parser.addVersionOption() cannot be overridden, the option needs to be made explicit
1 parent 25c7de6 commit 7c0a917

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/cli.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ struct CliParameters {
5454
QCommandLineParser parser;
5555
parser.setApplicationDescription( "Klogg log viewer" );
5656
const auto helpOption = parser.addHelpOption();
57-
const auto versionOption = parser.addVersionOption();
57+
58+
const QCommandLineOption versionOption("version", "Displays version information");
59+
parser.addOption(versionOption);
5860

5961
const QCommandLineOption multiInstanceOption(
6062
QStringList() << "m"

0 commit comments

Comments
 (0)