mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #574 from ctrlaltdavid/fix/url-parameter
Fix --url command line parameter to work with both "=" and " "
This commit is contained in:
commit
7a25376131
1 changed files with 8 additions and 5 deletions
|
@ -3939,12 +3939,15 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
|
|||
|
||||
qCDebug(interfaceapp) << "HMD:" << hasHMD << ", Hand Controllers: " << hasHandControllers << ", Using HMD: " << isUsingHMDAndHandControllers;
|
||||
|
||||
// when --url in command line, teleport to location
|
||||
const QString HIFI_URL_COMMAND_LINE_KEY = "--url";
|
||||
int urlIndex = arguments().indexOf(HIFI_URL_COMMAND_LINE_KEY);
|
||||
QString addressLookupString;
|
||||
if (urlIndex != -1) {
|
||||
QUrl url(arguments().value(urlIndex + 1));
|
||||
|
||||
// when --url in command line, teleport to location
|
||||
QCommandLineParser parser;
|
||||
QCommandLineOption urlOption("url", "", "value");
|
||||
parser.addOption(urlOption);
|
||||
parser.parse(arguments());
|
||||
if (parser.isSet(urlOption)) {
|
||||
QUrl url = QUrl(parser.value(urlOption));
|
||||
if (url.scheme() == URL_SCHEME_HIFIAPP) {
|
||||
Setting::Handle<QVariant>("startUpApp").set(url.path());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue