Commit 4bc91288 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Properly parse commandline args when activating running instance

Use parser instead of trying to do it manually
parent 1125887b
Pipeline #176764 passed with stage
in 6 minutes and 48 seconds
......@@ -110,18 +110,14 @@ int main(int argc, char *argv[])
[kalendarApplication](const QStringList &arguments, const QString &workingDirectory) {
if (arguments.isEmpty()) {
auto args = arguments;
[kalendarApplication, &parser](const QStringList &arguments, const QString &workingDirectory) {
const QStringList args = parser.positionalArguments();
for (const auto &arg : args) {
Q_EMIT kalendarApplication->importCalendarFromFile(QUrl::fromUserInput(arg, workingDirectory, QUrl::AssumeLocalFile));
QQmlApplicationEngine engine;
QQmlDebuggingEnabler enabler;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment