src/gui/image/qicon.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 30 5dc02b23752f
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
   980         QIcon *cachedIcon  = new QIcon(new QIconLoaderEngine(name));
   980         QIcon *cachedIcon  = new QIcon(new QIconLoaderEngine(name));
   981         qtIconCache()->insert(name, cachedIcon);
   981         qtIconCache()->insert(name, cachedIcon);
   982         icon = *cachedIcon;
   982         icon = *cachedIcon;
   983     }
   983     }
   984 
   984 
   985     if (icon.availableSizes().isEmpty())
   985     // Note the qapp check is to allow lazy loading of static icons
       
   986     // Supporting fallbacks will not work for this case.
       
   987     if (qApp && icon.availableSizes().isEmpty())
   986         return fallback;
   988         return fallback;
   987 
   989 
   988     return icon;
   990     return icon;
   989 }
   991 }
   990 
   992