m_parser.process(*qApp);
const auto positionalArgs = m_parser.positionalArguments();
+ qDebug() << "ARGS" << positionalArgs;
QQmlApplicationEngine *engine = new QQmlApplicationEngine{this};
Q_CHECK_PTR(engine);
m_instances.insert(player);
- if (!positionalArgs.empty())
- player->setNextSource(QUrl::fromUserInput(positionalArgs[0]));
+ if (!positionalArgs.empty()) {
+ auto url =
+ QUrl::fromUserInput(positionalArgs[0], ".", QUrl::AssumeLocalFile);
+ qCDebug(imCategory) << "Parsed positional argument as" << url;
+ player->setNextSource(url);
+ }
TimeFormatter timeFormatter;
engine->rootContext()->setContextProperty("player", player);
engine->rootContext()->setContextProperty("timeFormatter", &timeFormatter);