mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
trying to fix expandToLocalDataAbsolutePath
This commit is contained in:
parent
a6a2d24dda
commit
af42b5e93f
2 changed files with 4 additions and 6 deletions
|
@ -294,9 +294,9 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
|||
// lookupUrl.scheme() == URL_SCHEME_HTTPS ||
|
||||
lookupUrl.scheme() == URL_SCHEME_FILE) {
|
||||
_previousLookup.clear();
|
||||
QUrl domainUrl = PathUtils::expandToLocalDataAbsolutePath(lookupUrl);
|
||||
QUrl domainURL = PathUtils::expandToLocalDataAbsolutePath(lookupUrl);
|
||||
emit urlHandled(true);
|
||||
setDomainInfo(domainUrl, trigger);
|
||||
setDomainInfo(domainURL, trigger);
|
||||
DependencyManager::get<NodeList>()->getDomainHandler().setIsConnected(true);
|
||||
emit lookupResultsFinished();
|
||||
handlePath(DOMAIN_SPAWNING_POINT, LookupTrigger::Internal, false);
|
||||
|
|
|
@ -121,13 +121,11 @@ QUrl PathUtils::resourcesUrl(const QString& relativeUrl) {
|
|||
}
|
||||
|
||||
QUrl PathUtils::expandToLocalDataAbsolutePath(const QUrl& fileUrl) {
|
||||
QUrl url = fileUrl;
|
||||
QString path = fileUrl.path();
|
||||
if (path.startsWith("/~/")) {
|
||||
path.replace(0, 3, resourcesPath());
|
||||
url = QUrl::fromLocalFile(path);
|
||||
return resourcesUrl(path.mid(3));
|
||||
}
|
||||
return url;
|
||||
return fileUrl;
|
||||
}
|
||||
|
||||
const QString& PathUtils::qmlBaseUrl() {
|
||||
|
|
Loading…
Reference in a new issue