Changeset 1028
- Timestamp:
- Aug 26, 2011, 2:11:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/styles/qcommonstyle.cpp
r1021 r1028 90 90 #ifdef Q_WS_PM 91 91 # include <qt_os2.h> 92 # include <qfileiconprovider.h> 92 93 #endif 93 94 … … 5783 5784 #endif // Q_WS_MAC 5784 5785 5786 #if defined(Q_WS_PM) 5787 if (QApplication::desktopSettingsAware()) { 5788 // Take file/folder icons from QFileProvider as it knows how to get 5789 // them from the system theme (see QFileProvider::pmIcon()). 5790 switch (standardIcon) { 5791 case SP_FileIcon: 5792 case SP_FileLinkIcon: { 5793 QFileIconProvider fip; 5794 static char kernelFilePath[] = "?:\\OS2KRNL"; 5795 if (kernelFilePath[0] == '?') { 5796 ULONG bootDrive = 0; 5797 DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE, 5798 (PVOID)&bootDrive, sizeof(bootDrive)); 5799 kernelFilePath[0] = bootDrive + 'A' - 1; 5800 } 5801 return fip.icon(QFileInfo(QLatin1String(kernelFilePath))); 5802 } 5803 case SP_DirIcon: 5804 case SP_DirLinkIcon: 5805 case SP_DirClosedIcon: 5806 case SP_DirOpenIcon: { 5807 // TODO: Use WPS to get icons for open folders 5808 // (see see QFileProvider::pmIcon() again) 5809 QFileIconProvider fip; 5810 return fip.icon(QFileInfo(QLatin1String("\\"))); 5811 } 5812 default: 5813 break; 5814 } 5815 } 5816 #endif 5817 5785 5818 switch (standardIcon) { 5786 5819 #ifndef QT_NO_IMAGEFORMAT_PNG … … 6018 6051 case SP_DriveHDIcon: 6019 6052 case SP_DriveFDIcon: 6020 case SP_FileIcon:6021 case SP_FileLinkIcon:6022 case SP_DirLinkIcon:6023 case SP_DirClosedIcon:6024 6053 case SP_DesktopIcon: 6025 6054 case SP_ComputerIcon: 6026 case SP_DirOpenIcon:6027 6055 case SP_FileDialogNewFolder: 6028 6056 case SP_DirHomeIcon:
Note:
See TracChangeset
for help on using the changeset viewer.