diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2021-03-01 19:45:16 -0500 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-03-17 19:18:06 +0100 |
commit | fda6d7629a7ebbcd1201a16e1be2bc21b1ca7dd9 (patch) | |
tree | 26efa61f01a0a4f2426c5b4132c166beac49bf0d /src/AvatarProvider.cpp | |
parent | Simplify regex (diff) | |
download | nheko-fda6d7629a7ebbcd1201a16e1be2bc21b1ca7dd9.tar.xz |
Switch readImage to take a reference instead of a pointer
There was nowhere that an actual pointer was passed, and I wanted to do references for something else.
Diffstat (limited to 'src/AvatarProvider.cpp')
-rw-r--r-- | src/AvatarProvider.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AvatarProvider.cpp b/src/AvatarProvider.cpp index 1834e040..f64f6859 100644 --- a/src/AvatarProvider.cpp +++ b/src/AvatarProvider.cpp @@ -35,7 +35,7 @@ resolve(const QString &avatarUrl, int size, QObject *receiver, AvatarCallback ca auto data = cache::image(cacheKey); if (!data.isNull()) { - pixmap = QPixmap::fromImage(utils::readImage(&data)); + pixmap = QPixmap::fromImage(utils::readImage(data)); avatar_cache.insert(cacheKey, pixmap); callback(pixmap); return; @@ -46,7 +46,7 @@ resolve(const QString &avatarUrl, int size, QObject *receiver, AvatarCallback ca &AvatarProxy::avatarDownloaded, receiver, [callback, cacheKey](QByteArray data) { - QPixmap pm = QPixmap::fromImage(utils::readImage(&data)); + QPixmap pm = QPixmap::fromImage(utils::readImage(data)); avatar_cache.insert(cacheKey, pm); callback(pm); }); |