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 | 148 | disconnect(_scriptEngine, &ScriptEngine::finished, this, &ScriptEditorWidget::onScriptFinished); |
| 149 | 149 | } |
| 150 | 150 | } else { |
| 151 | − QNetworkAccessManager* networkManager = new QNetworkAccessManager(this); | |
| 152 | − QNetworkReply* reply = networkManager->get(QNetworkRequest(url)); | |
| 151 | + NetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); | |
| 152 | + QNetworkReply* reply = networkAccessManager.get(QNetworkRequest(url)); | |
| 153 | 153 | qDebug() << "Downloading included script at" << scriptPath; |
| 154 | 154 | QEventLoop loop; |
| 155 | 155 | QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); |