Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7
-
None
-
5a5c96c65 (dev), 9a08abf41 (6.6), e3e07f4c6 (tqtc/lts-6.5), 2bccacab2 (dev), 83d87c956 (6.6), 64d874c45 (tqtc/lts-6.5)
Description
During my cleanup of the icon stuff within QCommon/Fusion style I found that QFile::addIcon() with an invalid filename creates a non-null QIcon instance even if the filename is not found.
QIcon icon; icon.addFile("non-existing-icon.png"); if (icon.isNull()) qDebug() << "Null icon!" << icon; else qDebug() << "Valid icon!" << icon;
I'm not quite sure if this is by accident or a simple oversight. I would expect that this results in a null QIcon.
Attachments
Issue Links
- resulted in
-
QTBUG-119797 [Reg 6.5.3 -> 6.6.1]QFileIconProvider.icon of a file only give general file icon
- Closed
-
QTBUG-119038 Cleanup QIconEngine for Qt7
- Reported