From 102cc684dd0eb5591b6f973ea3f4cf3ead547427 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Fri, 19 Mar 2021 10:28:40 +0300 Subject: [PATCH] Replace Qt Windows Extras features with native ones --- src/gui/torrentcontentmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/torrentcontentmodel.cpp b/src/gui/torrentcontentmodel.cpp index 28b072a78..0f661baef 100644 --- a/src/gui/torrentcontentmodel.cpp +++ b/src/gui/torrentcontentmodel.cpp @@ -37,7 +37,9 @@ #if defined(Q_OS_WIN) #include #include +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) #include +#endif #else #include #include @@ -118,7 +120,11 @@ namespace if (FAILED(hr)) return {}; +#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) + auto iconPixmap = QPixmap::fromImage(QImage::fromHICON(sfi.hIcon)); +#else QPixmap iconPixmap = QtWin::fromHICON(sfi.hIcon); +#endif ::DestroyIcon(sfi.hIcon); return iconPixmap; }