mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
revert f9747d8a
(rawURL) + apply alternative approach for aligning batch-loaded script URLs
This commit is contained in:
parent
f9747d8a44
commit
d749f243c6
2 changed files with 6 additions and 3 deletions
|
@ -44,6 +44,7 @@ void BatchLoader::start() {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
for (const auto& rawURL : _urls) {
|
||||
QUrl url = expandScriptUrl(normalizeScriptURL(rawURL));
|
||||
|
||||
|
@ -56,12 +57,12 @@ void BatchLoader::start() {
|
|||
// anything.
|
||||
ScriptCacheSignalProxy* proxy = new ScriptCacheSignalProxy(scriptCache.data());
|
||||
|
||||
connect(proxy, &ScriptCacheSignalProxy::contentAvailable, this, [this, rawURL](const QString& url, const QString& contents, bool isURL, bool success) {
|
||||
connect(proxy, &ScriptCacheSignalProxy::contentAvailable, this, [this](const QString& url, const QString& contents, bool isURL, bool success) {
|
||||
if (isURL && success) {
|
||||
_data.insert(rawURL, contents);
|
||||
_data.insert(url, contents);
|
||||
qCDebug(scriptengine) << "Loaded: " << url;
|
||||
} else {
|
||||
_data.insert(rawURL, QString());
|
||||
_data.insert(url, QString());
|
||||
qCDebug(scriptengine) << "Could not load: " << url;
|
||||
}
|
||||
|
||||
|
|
|
@ -1187,6 +1187,8 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac
|
|||
thisURL = resolvePath(file);
|
||||
}
|
||||
|
||||
thisURL = expandScriptUrl(normalizeScriptURL(ResourceManager::normalizeURL(thisURL)));
|
||||
|
||||
if (!_includedURLs.contains(thisURL)) {
|
||||
if (!isStandardLibrary && !currentSandboxURL.isEmpty() && (thisURL.scheme() == "file") &&
|
||||
(currentSandboxURL.scheme() != "file" ||
|
||||
|
|
Loading…
Reference in a new issue