mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Replace Qt Windows Extras features with native ones
This commit is contained in:
parent
a230228441
commit
102cc684dd
@ -37,7 +37,9 @@
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <Windows.h>
|
||||
#include <Shellapi.h>
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
#include <QtWin>
|
||||
#endif
|
||||
#else
|
||||
#include <QMimeDatabase>
|
||||
#include <QMimeType>
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user