Changeset 607 for trunk/src/gui
- Timestamp:
- Feb 26, 2010, 2:25:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/itemviews/qfileiconprovider.cpp
r561 r607 52 52 # include <commctrl.h> 53 53 # include <objbase.h> 54 #elif defined(Q_WS_PM) 55 # include <qt_os2.h> 54 56 #elif defined(Q_WS_MAC) 55 57 # include <private/qt_cocoa_helpers_mac_p.h> … … 429 431 } 430 432 } 433 #elif defined(Q_WS_PM) 434 { 435 UCHAR ioc_parm[2]; 436 BIOSPARAMETERBLOCK bpb; 437 ioc_parm[0] = 0; 438 ioc_parm[1] = info.absoluteFilePath().at(0).cell() - 'A'; 439 APIRET arc = DosDevIOCtl((HFILE) - 1, IOCTL_DISK, DSK_GETDEVICEPARAMS, 440 ioc_parm, sizeof(ioc_parm), NULL, 441 &bpb, sizeof(bpb), NULL); 442 443 if (arc == ERROR_NOT_SUPPORTED) 444 return d->getIcon(QStyle::SP_DriveNetIcon); 445 446 if (arc == NO_ERROR && bpb.bDeviceType != DEVTYPE_FIXED) { 447 if (bpb.fsDeviceAttr & 0x10) // floppy format 448 return d->getIcon(QStyle::SP_DriveFDIcon); 449 if (!(bpb.fsDeviceAttr & 0x08)) // partitionable removable 450 return d->getIcon(QStyle::SP_DriveCDIcon); 451 } 452 453 return d->getIcon(QStyle::SP_DriveHDIcon); 454 } 431 455 #else 432 456 return d->getIcon(QStyle::SP_DriveHDIcon);
Note:
See TracChangeset
for help on using the changeset viewer.