- QString render = args.at(0);
- args.takeFirst();
- QString profile = args.at(0);
- args.takeFirst();
- QString rendermodule = args.at(0);
- args.takeFirst();
- QString player = args.at(0);
- args.takeFirst();
- QString src = args.at(0);
- args.takeFirst();
- QString dest = args.at(0);
- args.takeFirst();
+ if (args.at(0).startsWith("in="))
+ in = args.takeFirst().section('=', -1).toInt();
+ if (args.at(0).startsWith("out="))
+ out = args.takeFirst().section('=', -1).toInt();
+ if (args.at(0).startsWith("preargs="))
+ preargs = args.takeFirst().section('=', 1).split(' ', QString::SkipEmptyParts);
+
+ QString render = args.takeFirst();
+ QString profile = args.takeFirst();
+ QString rendermodule = args.takeFirst();
+ QString player = args.takeFirst();
+ QByteArray srcString = args.takeFirst().toUtf8();
+ QUrl srcurl = QUrl::fromEncoded(srcString);
+ QString src = srcurl.path();
+ // The QUrl path() strips the consumer: protocol, so re-add it if necessary
+ if (srcString.startsWith("consumer:"))
+ src.prepend("consumer:");
+ QUrl desturl = QUrl::fromEncoded(args.takeFirst().toUtf8());
+ QString dest = desturl.path();