mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 19:03:12 +02:00
load json from indicated file to populate serverless domain
This commit is contained in:
parent
aa91000bb7
commit
abc467b919
4 changed files with 11 additions and 10 deletions
|
@ -1087,6 +1087,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
|
||||
|
||||
connect(addressManager.data(), &AddressManager::setServersEnabled, this, &Application::setServersEnabled);
|
||||
connect(addressManager.data(), &AddressManager::loadServerlessDomain, this, &Application::loadServerlessDomain);
|
||||
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount);
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, [](){
|
||||
|
@ -2967,6 +2968,12 @@ bool Application::visitServerlessDomain(const QString& urlString) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void Application::loadServerlessDomain(QUrl domainURL) {
|
||||
resettingDomain();
|
||||
domainChanged("");
|
||||
importJSONFromURL(domainURL.toString());
|
||||
}
|
||||
|
||||
bool Application::importImage(const QString& urlString) {
|
||||
qCDebug(interfaceapp) << "An image file has been dropped in";
|
||||
QString filepath(urlString);
|
||||
|
|
|
@ -393,6 +393,7 @@ public slots:
|
|||
void setPreferredCursor(const QString& cursor);
|
||||
|
||||
void setServersEnabled(bool enableServers);
|
||||
void loadServerlessDomain(QUrl domainURL);
|
||||
|
||||
private slots:
|
||||
void onDesktopRootItemCreated(QQuickItem* qmlContext);
|
||||
|
|
|
@ -292,20 +292,13 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
|||
emit lookupResultsFinished();
|
||||
return true;
|
||||
|
||||
} else if (lookupUrl.scheme() == "http" || lookupUrl.scheme() == "https") {
|
||||
} else if (lookupUrl.scheme() == "http" || lookupUrl.scheme() == "https" || lookupUrl.scheme() == "file") {
|
||||
|
||||
qDebug() << "QQQQ do http before serverless domain" << lookupUrl.toString();
|
||||
emit setServersEnabled(false);
|
||||
emit loadServerlessDomain(lookupUrl);
|
||||
emit lookupResultsFinished();
|
||||
return true;
|
||||
|
||||
} else if (lookupUrl.scheme() == "file") {
|
||||
|
||||
qDebug() << "QQQQ load serverless domain " << lookupUrl.toString();
|
||||
emit setServersEnabled(false);
|
||||
emit lookupResultsFinished();
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -417,7 +417,7 @@ signals:
|
|||
void goForwardPossible(bool isPossible);
|
||||
|
||||
void setServersEnabled(bool serversEnabled);
|
||||
|
||||
void loadServerlessDomain(QUrl domainURL);
|
||||
|
||||
protected:
|
||||
AddressManager();
|
||||
|
|
Loading…
Reference in a new issue