Skip to content

Commit

Permalink
gui/tray: Do not generate JPEG images in async image response for macOS
Browse files Browse the repository at this point in the history
We are seeing libjpeg related crashes in our packaged version for macOS.
Until we are able to resolve this in the packaging, do not generate
JPEG-based images

Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Feb 28, 2025
1 parent 5414712 commit 8aba22d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/tray/asyncimageresponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <QSvgRenderer>

#include "asyncimageresponse.h"
#include "usermodel.h"

AsyncImageResponse::AsyncImageResponse(const QString &id, const QSize &requestedSize)
{
Expand Down Expand Up @@ -135,6 +134,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));
}
Expand Down

0 comments on commit 8aba22d

Please sign in to comment.