mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Fix CI errors
This commit is contained in:
parent
f02d3ee606
commit
f6f46119a6
3 changed files with 10 additions and 9 deletions
|
@ -52,7 +52,7 @@ AvatarProvider::resolve(const QString &userId,
|
|||
|
||||
auto proxy = client_->fetchUserAvatar(avatars_[userId].url);
|
||||
|
||||
if (proxy == nullptr)
|
||||
if (proxy.isNull())
|
||||
return;
|
||||
|
||||
connect(proxy.data(),
|
||||
|
|
|
@ -581,7 +581,8 @@ ChatPage::updateOwnProfileInfo(const QUrl &avatar_url, const QString &display_na
|
|||
|
||||
if (avatar_url.isValid()) {
|
||||
auto proxy = client_->fetchUserAvatar(avatar_url);
|
||||
if (proxy == nullptr)
|
||||
|
||||
if (proxy.isNull())
|
||||
return;
|
||||
|
||||
proxy->setParent(this);
|
||||
|
|
|
@ -716,7 +716,7 @@ MatrixClient::fetchUserAvatar(const QUrl &avatarUrl)
|
|||
|
||||
if (url_parts.size() != 2) {
|
||||
qDebug() << "Invalid format for user avatar:" << avatarUrl.toString();
|
||||
return nullptr;
|
||||
return QSharedPointer<DownloadMediaProxy>();
|
||||
}
|
||||
|
||||
QUrlQuery query;
|
||||
|
@ -733,8 +733,8 @@ MatrixClient::fetchUserAvatar(const QUrl &avatarUrl)
|
|||
QNetworkRequest avatar_request(endpoint);
|
||||
|
||||
auto reply = get(avatar_request);
|
||||
auto proxy = QSharedPointer<DownloadMediaProxy>(
|
||||
new DownloadMediaProxy, [this](auto proxy) { proxy->deleteLater(); });
|
||||
auto proxy = QSharedPointer<DownloadMediaProxy>(new DownloadMediaProxy,
|
||||
[](auto proxy) { proxy->deleteLater(); });
|
||||
connect(reply, &QNetworkReply::finished, this, [reply, proxy, avatarUrl]() {
|
||||
reply->deleteLater();
|
||||
|
||||
|
@ -767,8 +767,8 @@ MatrixClient::downloadImage(const QUrl &url)
|
|||
QNetworkRequest image_request(url);
|
||||
|
||||
auto reply = get(image_request);
|
||||
auto proxy = QSharedPointer<DownloadMediaProxy>(
|
||||
new DownloadMediaProxy, [this](auto proxy) { proxy->deleteLater(); });
|
||||
auto proxy = QSharedPointer<DownloadMediaProxy>(new DownloadMediaProxy,
|
||||
[](auto proxy) { proxy->deleteLater(); });
|
||||
connect(reply, &QNetworkReply::finished, this, [reply, proxy]() {
|
||||
reply->deleteLater();
|
||||
|
||||
|
@ -799,8 +799,8 @@ MatrixClient::downloadFile(const QUrl &url)
|
|||
QNetworkRequest fileRequest(url);
|
||||
|
||||
auto reply = get(fileRequest);
|
||||
auto proxy = QSharedPointer<DownloadMediaProxy>(
|
||||
new DownloadMediaProxy, [this](auto proxy) { proxy->deleteLater(); });
|
||||
auto proxy = QSharedPointer<DownloadMediaProxy>(new DownloadMediaProxy,
|
||||
[](auto proxy) { proxy->deleteLater(); });
|
||||
connect(reply, &QNetworkReply::finished, this, [reply, proxy]() {
|
||||
reply->deleteLater();
|
||||
|
||||
|
|
Loading…
Reference in a new issue