Ticket #191: qfileiconprovider.diff
File qfileiconprovider.diff, 1.1 KB (added by , 13 years ago) |
---|
-
qfileiconprovider.cpp
339 339 QByteArray path = QDir::toNativeSeparators( 340 340 QDir::cleanPath(fileInfo.absoluteFilePath())).toLocal8Bit(); 341 341 HPOINTER hicon = WinLoadFileIcon(path, FALSE); 342 343 if (hicon == NULLHANDLE) { 344 // QPixmap::fromPmHPOINTER fails on "SysPointers" 345 // for now we load the icon of the root directory 346 #if 0 347 if (fileInfo.isDir()) 348 hicon = WinQuerySysPointer(HWND_DESKTOP, SPTR_FOLDER, FALSE); 349 else if (fileInfo.isExecutable()) 350 hicon = WinQuerySysPointer(HWND_DESKTOP, SPTR_PROGRAM, FALSE); 351 else 352 hicon = WinQuerySysPointer(HWND_DESKTOP, SPTR_FILE, FALSE); 353 #else 354 hicon = WinLoadFileIcon("\\", FALSE); 355 #endif 356 } 357 358 342 359 if (hicon != NULLHANDLE) { 343 360 // we're requesting the system (shared) icon handle which should be 344 361 // always the same for the given file until the icon is changed, so use