equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
63 # include <private/qt_x11_p.h> |
63 # include <private/qt_x11_p.h> |
64 #endif |
64 #endif |
65 |
65 |
66 #ifndef SHGFI_ADDOVERLAYS |
66 #ifndef SHGFI_ADDOVERLAYS |
67 # define SHGFI_ADDOVERLAYS 0x000000020 |
67 # define SHGFI_ADDOVERLAYS 0x000000020 |
|
68 # define SHGFI_OVERLAYINDEX 0x000000040 |
68 #endif |
69 #endif |
69 |
70 |
70 QT_BEGIN_NAMESPACE |
71 QT_BEGIN_NAMESPACE |
71 |
72 |
72 /*! |
73 /*! |
246 unsigned long val = 0; |
247 unsigned long val = 0; |
247 |
248 |
248 //Get the small icon |
249 //Get the small icon |
249 #ifndef Q_OS_WINCE |
250 #ifndef Q_OS_WINCE |
250 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
251 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
251 sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS); |
252 sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX); |
252 #else |
253 #else |
253 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
254 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
254 sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_SYSICONINDEX); |
255 sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_SYSICONINDEX); |
255 #endif |
256 #endif |
256 if (val) { |
257 if (val) { |
285 } |
286 } |
286 |
287 |
287 //Get the big icon |
288 //Get the big icon |
288 #ifndef Q_OS_WINCE |
289 #ifndef Q_OS_WINCE |
289 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
290 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
290 sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS); |
291 sizeof(SHFILEINFO), SHGFI_ICON|SHGFI_LARGEICON|SHGFI_SYSICONINDEX|SHGFI_ADDOVERLAYS|SHGFI_OVERLAYINDEX); |
291 #else |
292 #else |
292 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
293 val = SHGetFileInfo((const wchar_t *)QDir::toNativeSeparators(fileInfo.filePath()).utf16(), 0, &info, |
293 sizeof(SHFILEINFO), SHGFI_LARGEICON|SHGFI_SYSICONINDEX); |
294 sizeof(SHFILEINFO), SHGFI_LARGEICON|SHGFI_SYSICONINDEX); |
294 #endif |
295 #endif |
295 if (val) { |
296 if (val) { |