mirror of
https://github.com/overte-org/overte.git
synced 2025-08-14 16:59:40 +02:00
remove some debug prints, fix serverless to servered domain transition
This commit is contained in:
parent
07f5399326
commit
e36f39781b
3 changed files with 6 additions and 15 deletions
|
@ -3037,14 +3037,12 @@ bool Application::importFromZIP(const QString& filePath) {
|
|||
}
|
||||
|
||||
void Application::setServersEnabled(bool serversEnabled) {
|
||||
qDebug() << "QQQQ serversEnabled =" << serversEnabled;
|
||||
if (_serversEnabled != serversEnabled) {
|
||||
_serversEnabled = serversEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
bool Application::visitServerlessDomain(const QString& urlString) {
|
||||
qDebug() << "QQQQ visit serverless domain" << urlString;
|
||||
DependencyManager::get<AddressManager>()->handleLookupString(urlString);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,6 @@ QUrl AddressManager::currentAddress(bool domainOnly) const {
|
|||
hifiURL.setPath(currentPath());
|
||||
}
|
||||
|
||||
qDebug() << "QQQQ currentAddress --> " << hifiURL.toString();
|
||||
return hifiURL;
|
||||
}
|
||||
|
||||
|
@ -83,7 +82,6 @@ QUrl AddressManager::currentFacingAddress() const {
|
|||
hifiURL.setPath(currentFacingPath());
|
||||
}
|
||||
|
||||
qDebug() << "QQQQ currentFacingAddress --> " << hifiURL.toString();
|
||||
return hifiURL;
|
||||
}
|
||||
|
||||
|
@ -99,10 +97,8 @@ QUrl AddressManager::currentShareableAddress(bool domainOnly) const {
|
|||
hifiURL.setPath(currentPath());
|
||||
}
|
||||
|
||||
qDebug() << "QQQQ currentShareableAddress --> " << hifiURL.toString();
|
||||
return hifiURL;
|
||||
} else {
|
||||
qDebug() << "QQQQ currentShareableAddress --> " << currentAddress(domainOnly).toString();
|
||||
return currentAddress(domainOnly);
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +109,6 @@ QUrl AddressManager::currentFacingShareableAddress() const {
|
|||
hifiURL.setPath(currentFacingPath());
|
||||
}
|
||||
|
||||
qDebug() << "QQQQ currentFacingShareableAddress --> " << hifiURL.toString();
|
||||
return hifiURL;
|
||||
}
|
||||
|
||||
|
@ -153,7 +148,6 @@ void AddressManager::storeCurrentAddress() {
|
|||
auto url = currentAddress();
|
||||
|
||||
if (url.scheme() == "file" || url.scheme() == "http" || url.scheme() == "https" || !url.host().isEmpty()) {
|
||||
qDebug() << "QQQQ setting address in settings to " << url.toString();
|
||||
currentAddressHandle.set(url);
|
||||
} else {
|
||||
qCWarning(networking) << "Ignoring attempt to save current address with an empty host" << url;
|
||||
|
@ -223,8 +217,6 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
|||
static QString URL_TYPE_PLACE = "place";
|
||||
static QString URL_TYPE_NETWORK_ADDRESS = "network_address";
|
||||
|
||||
qDebug() << "QQQQ handleUrl: " << lookupUrl.toString();
|
||||
|
||||
if (lookupUrl.scheme() == HIFI_URL_SCHEME) {
|
||||
|
||||
emit setServersEnabled(true);
|
||||
|
@ -308,7 +300,6 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
|||
return true;
|
||||
|
||||
} else if (lookupUrl.scheme() == "http" || lookupUrl.scheme() == "https" || lookupUrl.scheme() == "file") {
|
||||
qDebug() << "QQQQ file or http before serverless domain" << lookupUrl.toString();
|
||||
_previousLookup.clear();
|
||||
QUrl domainUrl = PathUtils::expandToAppAbsolutePath(lookupUrl);
|
||||
emit setServersEnabled(false);
|
||||
|
@ -329,7 +320,6 @@ bool isPossiblePlaceName(QString possiblePlaceName) {
|
|||
const QRegExp PLACE_NAME_REGEX = QRegExp("^[0-9A-Za-z](([0-9A-Za-z]|-(?!-))*[^\\W_]$|$)");
|
||||
result = PLACE_NAME_REGEX.indexIn(possiblePlaceName) == 0;
|
||||
}
|
||||
qDebug() << "QQQQ isPossiblePlaceName: " << possiblePlaceName << " " << result;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -347,7 +337,6 @@ void AddressManager::handleLookupString(const QString& lookupString, bool fromSu
|
|||
}
|
||||
|
||||
lookupURL = QUrl(sanitizedString);
|
||||
qDebug() << "QQQQ handleLookupString: " << lookupString << " " << lookupURL.toString();
|
||||
|
||||
handleUrl(lookupURL, fromSuggestions ? Suggestions : UserInput);
|
||||
}
|
||||
|
@ -405,7 +394,6 @@ void AddressManager::goToAddressFromObject(const QVariantMap& dataObject, const
|
|||
QVariantMap domainObject = rootMap[LOCATION_API_DOMAIN_KEY].toMap();
|
||||
|
||||
if (!domainObject.isEmpty()) {
|
||||
// XXX serverless domain URL ?
|
||||
const QString DOMAIN_NETWORK_ADDRESS_KEY = "network_address";
|
||||
const QString DOMAIN_NETWORK_PORT_KEY = "network_port";
|
||||
const QString DOMAIN_ICE_SERVER_ADDRESS_KEY = "ice_server_address";
|
||||
|
|
|
@ -165,7 +165,7 @@ void DomainHandler::setSocketAndID(const QUrl& serverlessDomainURL,
|
|||
if (_serverlessDomainURL != QUrl()) {
|
||||
setIsConnected(true);
|
||||
}
|
||||
emit serverlessDomainChanged("");
|
||||
emit serverlessDomainChanged(_serverlessDomainURL.toString());
|
||||
}
|
||||
|
||||
if (hostname != _hostname) {
|
||||
|
@ -198,6 +198,11 @@ void DomainHandler::setSocketAndID(const QUrl& serverlessDomainURL,
|
|||
|
||||
void DomainHandler::setIceServerHostnameAndID(const QString& iceServerHostname, const QUuid& id) {
|
||||
|
||||
if (_serverlessDomainURL != QUrl()) {
|
||||
_serverlessDomainURL = QUrl();
|
||||
emit serverlessDomainChanged("");
|
||||
}
|
||||
|
||||
if (_iceServerSockAddr.getAddress().toString() != iceServerHostname || id != _pendingDomainID) {
|
||||
// re-set the domain info to connect to new domain
|
||||
hardReset();
|
||||
|
|
Loading…
Reference in a new issue