mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 12:24:01 +02:00
Merge branch 'serverless-domains' of github.com:sethalves/hifi into serverless-domains
This commit is contained in:
commit
2d9b4c496c
4 changed files with 6 additions and 6 deletions
|
@ -302,7 +302,7 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
|
|||
|
||||
} else if (lookupUrl.scheme() == "http" || lookupUrl.scheme() == "https" || lookupUrl.scheme() == "file") {
|
||||
_previousLookup.clear();
|
||||
QUrl domainUrl = PathUtils::expandToAppAbsolutePath(lookupUrl);
|
||||
QUrl domainUrl = PathUtils::expandToLocalDataAbsolutePath(lookupUrl);
|
||||
emit setServersEnabled(false);
|
||||
setDomainInfo(domainUrl, QString(), 0, trigger);
|
||||
DependencyManager::get<NodeList>()->getDomainHandler().setIsConnected(true);
|
||||
|
|
|
@ -29,7 +29,7 @@ void FileResourceRequest::doSend() {
|
|||
if (_url.scheme() == URL_SCHEME_QRC) {
|
||||
filename = ":/" + _url.path();
|
||||
} else {
|
||||
filename = PathUtils::expandToAppAbsolutePath(_url).toLocalFile();
|
||||
filename = PathUtils::expandToLocalDataAbsolutePath(_url).toLocalFile();
|
||||
// sometimes on windows, we see the toLocalFile() return null,
|
||||
// in this case we will attempt to simply use the url as a string
|
||||
if (filename.isEmpty()) {
|
||||
|
|
|
@ -120,13 +120,13 @@ QUrl PathUtils::resourcesUrl(const QString& relativeUrl) {
|
|||
return QUrl(resourcesUrl() + relativeUrl);
|
||||
}
|
||||
|
||||
QUrl PathUtils::expandToAppAbsolutePath(const QUrl& fileUrl) {
|
||||
QUrl PathUtils::expandToLocalDataAbsolutePath(const QUrl& fileUrl) {
|
||||
QUrl url = fileUrl;
|
||||
QString path = fileUrl.path();
|
||||
if (path.startsWith("/~/")) {
|
||||
path.replace(0, 3, getAppLocalDataPath());
|
||||
url = QUrl(path);
|
||||
qDebug() << "QQQQ expandToAppAbsolutePath: " << fileUrl << url;
|
||||
url = QUrl::fromLocalFile(path);
|
||||
qDebug() << "QQQQ expandToLocalDataAbsolutePath: " << fileUrl << url;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
static QUrl resourcesUrl(const QString& relative);
|
||||
static const QString& resourcesPath();
|
||||
static const QString& qmlBaseUrl();
|
||||
static QUrl expandToAppAbsolutePath(const QUrl& fileUrl);
|
||||
static QUrl expandToLocalDataAbsolutePath(const QUrl& fileUrl);
|
||||
static QUrl qmlUrl(const QString& relative);
|
||||
#ifdef DEV_BUILD
|
||||
static const QString& projectRootPath();
|
||||
|
|
Loading…
Reference in a new issue