aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 51087ae..e29e547 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -62,15 +62,15 @@ int main(int argc, char **argv)
// unfortunately, QCommandLineParser will only give us the unknown option
// names, so we need to build a list, add them as options, reparse, and then
// we get their values
- if(!parser.opts.isEmpty()) {
- int _argc = parser.opts.length() + 1;
+ if(!parser.unknownOptions.isEmpty()) {
+ int _argc = parser.unknownOptions.length() + 1;
const char *_argv[_argc];
// program_options requires 0 to be the program name, otherwise it seems to fail
_argv[0] = qUtf8Printable(instance.arguments().at(0));
for(int i = 1; i < _argc; ++i) {
- _argv[i] = qUtf8Printable(QString("--%1=%2").arg(parser.opts[i - 1].names().at(0), parser.value(parser.opts[i - 1])));
+ _argv[i] = qUtf8Printable(QString("--%1=%2").arg(parser.unknownOptions[i - 1].names().at(0), parser.value(parser.unknownOptions[i - 1])));
}
qDebug("Parsing command-line overrides: %s", config->parse(_argc, _argv) ? "ok" : "failed");