|
|
@ -37,7 +37,9 @@ |
|
|
|
#if defined(Q_OS_WIN) |
|
|
|
#if defined(Q_OS_WIN) |
|
|
|
#include <Windows.h> |
|
|
|
#include <Windows.h> |
|
|
|
#include <Shellapi.h> |
|
|
|
#include <Shellapi.h> |
|
|
|
|
|
|
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) |
|
|
|
#include <QtWin> |
|
|
|
#include <QtWin> |
|
|
|
|
|
|
|
#endif |
|
|
|
#else |
|
|
|
#else |
|
|
|
#include <QMimeDatabase> |
|
|
|
#include <QMimeDatabase> |
|
|
|
#include <QMimeType> |
|
|
|
#include <QMimeType> |
|
|
@ -118,7 +120,11 @@ namespace |
|
|
|
if (FAILED(hr)) |
|
|
|
if (FAILED(hr)) |
|
|
|
return {}; |
|
|
|
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); |
|
|
|
QPixmap iconPixmap = QtWin::fromHICON(sfi.hIcon); |
|
|
|
|
|
|
|
#endif |
|
|
|
::DestroyIcon(sfi.hIcon); |
|
|
|
::DestroyIcon(sfi.hIcon); |
|
|
|
return iconPixmap; |
|
|
|
return iconPixmap; |
|
|
|
} |
|
|
|
} |
|
|
|