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
For Gerrit Dashboard: QTBUG-118667 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
516251,4 | Add QPixmapIconEngine::isNull() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
516725,3 | Add QPixmapIconEngine::isNull() | 6.6 | qt/qtbase | Status: MERGED | -1 | 0 |
516966,2 | Add QPixmapIconEngine::isNull() | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
523689,3 | QAbstractFileIconEngine: reimplement isNull() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
524144,2 | QAbstractFileIconEngine: reimplement isNull() | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
525169,2 | QAbstractFileIconEngine: reimplement isNull() | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
536179,1 | QAbstractFileIconEngine: reimplement isNull() | 6.6.1 | qt/qtbase | Status: ABANDONED | 0 | 0 |