Showing the changes to interface/src/ui/ScriptEditorWidget.cpp (1 of 1 file). Show all
Unified · Split
| @@ -148,8 +148,8 @@ void ScriptEditorWidget::loadFile(const QString& scriptPath) { · 147 unmodified lines | |||
| 148 | disconnect(_scriptEngine, &ScriptEngine::finished, this, &ScriptEditorWidget::onScriptFinished); | 148 | disconnect(_scriptEngine, &ScriptEngine::finished, this, &ScriptEditorWidget::onScriptFinished); |
| 149 | } | 149 | } |
| 150 | } else { | 150 | } else { |
| 151 | QNetworkAccessManager* networkManager = new QNetworkAccessManager(this); | 151 | NetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); |
| 152 | QNetworkReply* reply = networkManager->get(QNetworkRequest(url)); | 152 | QNetworkReply* reply = networkAccessManager.get(QNetworkRequest(url)); |
| 153 | qDebug() << "Downloading included script at" << scriptPath; | 153 | qDebug() << "Downloading included script at" << scriptPath; |
| 154 | QEventLoop loop; | 154 | QEventLoop loop; |
| 155 | QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); | 155 | QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); |