mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:25:52 +02:00
Fix CustomUrl
Fixed custom url so that hifi://domain/ works.
This commit is contained in:
parent
f829a5b323
commit
ec410d105b
1 changed files with 9 additions and 6 deletions
|
@ -931,7 +931,15 @@ void Menu::goTo() {
|
||||||
if (desiredDestination.startsWith(CUSTOM_URL_SCHEME + "//")) {
|
if (desiredDestination.startsWith(CUSTOM_URL_SCHEME + "//")) {
|
||||||
QStringList urlParts = desiredDestination.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts);
|
QStringList urlParts = desiredDestination.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts);
|
||||||
|
|
||||||
if (urlParts.count() > 1) {
|
if (urlParts.count() == 1) {
|
||||||
|
// location coordinates or place name
|
||||||
|
QString domain = urlParts[0];
|
||||||
|
goToDomain(domain);
|
||||||
|
// as there are no coordinates, go to 0,0,0
|
||||||
|
QString destination = "0,0,0";
|
||||||
|
goTo(destination);
|
||||||
|
}
|
||||||
|
else if (urlParts.count() > 1) {
|
||||||
// if url has 2 or more parts, the first one is domain name
|
// if url has 2 or more parts, the first one is domain name
|
||||||
QString domain = urlParts[0];
|
QString domain = urlParts[0];
|
||||||
|
|
||||||
|
@ -952,12 +960,7 @@ void Menu::goTo() {
|
||||||
// location orientation
|
// location orientation
|
||||||
goToOrientation(orientation);
|
goToOrientation(orientation);
|
||||||
}
|
}
|
||||||
} else if (urlParts.count() == 1) {
|
|
||||||
// location coordinates or place name
|
|
||||||
QString destination = urlParts[0];
|
|
||||||
goTo(destination);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
goToUser(gotoDialog.textValue());
|
goToUser(gotoDialog.textValue());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue