mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
force address bar lookup through handleLookupString
This commit is contained in:
parent
ab7df8679d
commit
93ff34baaa
2 changed files with 6 additions and 4 deletions
|
@ -410,8 +410,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
this, &Application::changeDomainHostname);
|
this, &Application::changeDomainHostname);
|
||||||
|
|
||||||
// when -url in command line, teleport to location
|
// when -url in command line, teleport to location
|
||||||
qDebug() << getCmdOption(argc, constArgv, "-url");
|
addressManager.handleLookupString(getCmdOption(argc, constArgv, "-url"));
|
||||||
addressManager.handleUrl(QUrl(getCmdOption(argc, constArgv, "-url")));
|
|
||||||
|
|
||||||
// call the OAuthWebviewHandler static getter so that its instance lives in our thread
|
// call the OAuthWebviewHandler static getter so that its instance lives in our thread
|
||||||
OAuthWebViewHandler::getInstance();
|
OAuthWebViewHandler::getInstance();
|
||||||
|
@ -3923,7 +3922,9 @@ void Application::uploadAttachment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::openUrl(const QUrl& url) {
|
void Application::openUrl(const QUrl& url) {
|
||||||
if (!AddressManager::getInstance().handleUrl(url)) {
|
if (url.scheme() == HIFI_URL_SCHEME) {
|
||||||
|
AddressManager::getInstance().handleLookupString(url.toString());
|
||||||
|
} else {
|
||||||
// address manager did not handle - ask QDesktopServices to handle
|
// address manager did not handle - ask QDesktopServices to handle
|
||||||
QDesktopServices::openUrl(url);
|
QDesktopServices::openUrl(url);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ public:
|
||||||
static QString pathForPositionAndOrientation(const glm::vec3& position, bool hasOrientation = false,
|
static QString pathForPositionAndOrientation(const glm::vec3& position, bool hasOrientation = false,
|
||||||
const glm::quat& orientation = EMPTY_QUAT);
|
const glm::quat& orientation = EMPTY_QUAT);
|
||||||
|
|
||||||
bool handleUrl(const QUrl& lookupUrl);
|
|
||||||
void handleLookupString(const QString& lookupString);
|
void handleLookupString(const QString& lookupString);
|
||||||
void attemptPlaceNameLookup(const QString& lookupString);
|
void attemptPlaceNameLookup(const QString& lookupString);
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -45,6 +44,8 @@ signals:
|
||||||
private:
|
private:
|
||||||
const JSONCallbackParameters& apiCallbackParameters();
|
const JSONCallbackParameters& apiCallbackParameters();
|
||||||
|
|
||||||
|
bool handleUrl(const QUrl& lookupUrl);
|
||||||
|
|
||||||
bool handleNetworkAddress(const QString& lookupString);
|
bool handleNetworkAddress(const QString& lookupString);
|
||||||
bool handleRelativeViewpoint(const QString& pathSubsection);
|
bool handleRelativeViewpoint(const QString& pathSubsection);
|
||||||
bool handleUsername(const QString& lookupString);
|
bool handleUsername(const QString& lookupString);
|
||||||
|
|
Loading…
Reference in a new issue