diff --git a/src/plugins/qmldesigner/utils/filedownloader.cpp b/src/plugins/qmldesigner/utils/filedownloader.cpp index b5c735d87a8..20ba2b3eec9 100644 --- a/src/plugins/qmldesigner/utils/filedownloader.cpp +++ b/src/plugins/qmldesigner/utils/filedownloader.cpp @@ -258,18 +258,16 @@ void FileDownloader::doProbeUrl() QNetworkReply::connect(reply, &QNetworkReply::errorOccurred, this, - [this](QNetworkReply::NetworkError) { - QQmlData *data = QQmlData::get(this, false); - if (!data) { - qDebug() << Q_FUNC_INFO << "FileDownloader is nullptr."; - return; - } + [this](QNetworkReply::NetworkError code) { if (QQmlData::wasDeleted(this)) { qDebug() << Q_FUNC_INFO << "FileDownloader was deleted."; return; } + qDebug() << Q_FUNC_INFO << "Network error:" << code + << qobject_cast(sender())->errorString(); + m_available = false; emit availableChanged(); });