mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +02:00
Switched ScriptEditorWidget to NetworkAccessManager
This commit is contained in:
parent
602015be66
commit
9bcd4e7ac8
1 changed files with 2 additions and 2 deletions
|
@ -148,8 +148,8 @@ void ScriptEditorWidget::loadFile(const QString& scriptPath) {
|
||||||
disconnect(_scriptEngine, &ScriptEngine::finished, this, &ScriptEditorWidget::onScriptFinished);
|
disconnect(_scriptEngine, &ScriptEngine::finished, this, &ScriptEditorWidget::onScriptFinished);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QNetworkAccessManager* networkManager = new QNetworkAccessManager(this);
|
NetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
|
||||||
QNetworkReply* reply = networkManager->get(QNetworkRequest(url));
|
QNetworkReply* reply = networkAccessManager.get(QNetworkRequest(url));
|
||||||
qDebug() << "Downloading included script at" << scriptPath;
|
qDebug() << "Downloading included script at" << scriptPath;
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
|
QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
|
||||||
|
|
Loading…
Reference in a new issue