mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
match requested hash key url when populating batch-loaded script contents
This commit is contained in:
parent
a79541a83a
commit
f9747d8a44
1 changed files with 3 additions and 4 deletions
|
@ -44,7 +44,6 @@ void BatchLoader::start() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (const auto& rawURL : _urls) {
|
for (const auto& rawURL : _urls) {
|
||||||
QUrl url = expandScriptUrl(normalizeScriptURL(rawURL));
|
QUrl url = expandScriptUrl(normalizeScriptURL(rawURL));
|
||||||
|
|
||||||
|
@ -57,12 +56,12 @@ void BatchLoader::start() {
|
||||||
// anything.
|
// anything.
|
||||||
ScriptCacheSignalProxy* proxy = new ScriptCacheSignalProxy(scriptCache.data());
|
ScriptCacheSignalProxy* proxy = new ScriptCacheSignalProxy(scriptCache.data());
|
||||||
|
|
||||||
connect(proxy, &ScriptCacheSignalProxy::contentAvailable, this, [this](const QString& url, const QString& contents, bool isURL, bool success) {
|
connect(proxy, &ScriptCacheSignalProxy::contentAvailable, this, [this, rawURL](const QString& url, const QString& contents, bool isURL, bool success) {
|
||||||
if (isURL && success) {
|
if (isURL && success) {
|
||||||
_data.insert(url, contents);
|
_data.insert(rawURL, contents);
|
||||||
qCDebug(scriptengine) << "Loaded: " << url;
|
qCDebug(scriptengine) << "Loaded: " << url;
|
||||||
} else {
|
} else {
|
||||||
_data.insert(url, QString());
|
_data.insert(rawURL, QString());
|
||||||
qCDebug(scriptengine) << "Could not load: " << url;
|
qCDebug(scriptengine) << "Could not load: " << url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue