mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #7947 from nextcloud/backport/7943/stable-3.16
[stable-3.16] gui/tray: Do not generate JPEG images in async image response for macOS
This commit is contained in:
commit
7bbcd8ec60
@ -12,12 +12,13 @@
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include "asyncimageresponse.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
#include "asyncimageresponse.h"
|
||||
#include "usermodel.h"
|
||||
#include "accountmanager.h"
|
||||
|
||||
AsyncImageResponse::AsyncImageResponse(const QString &id, const QSize &requestedSize)
|
||||
{
|
||||
@ -135,6 +136,12 @@ void AsyncImageResponse::slotProcessNetworkReply()
|
||||
} else {
|
||||
processNextImage();
|
||||
}
|
||||
#ifdef Q_OS_MACOS
|
||||
// NOTE: We are facing issues with JPEGs at the moment on macOS with our Qt 6.8.2-based release.
|
||||
// Do not create previews for JPEGs to prevent crashing.
|
||||
} else if (imageData.startsWith(QByteArrayLiteral("\xFF\xD8")) && imageData.endsWith(QByteArrayLiteral("\xFF\xD9"))) {
|
||||
processNextImage();
|
||||
#endif
|
||||
} else {
|
||||
setImageAndEmitFinished(QImage::fromData(imageData));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user