mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
use QPixmapIconEngine for icons with png as suffix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
20d5777046
commit
4a1190e17a
1 changed files with 9 additions and 3 deletions
|
@ -722,10 +722,16 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
|
|||
if (fileName.isEmpty())
|
||||
return;
|
||||
if (!d) {
|
||||
const QFileInfo info(fileName);
|
||||
const QString suffix = info.suffix().toLower();
|
||||
|
||||
if (suffix == QLatin1String("png")) {
|
||||
d = new QIconPrivate();
|
||||
d->engine = new QPixmapIconEngine();
|
||||
}
|
||||
|
||||
#if !defined (QT_NO_LIBRARY)
|
||||
QFileInfo info(fileName);
|
||||
QString suffix = info.suffix();
|
||||
if (!suffix.isEmpty()) {
|
||||
if (!d && !suffix.isEmpty()) {
|
||||
if (QIconEnginePlugin *plugin = qobject_cast<QIconEnginePlugin*>(iconloader()->instance(suffix))) {
|
||||
if (QIconEngine *engine = plugin->create(fileName)) {
|
||||
d = new QIconPrivate();
|
||||
|
|
Loading…
Add table
Reference in a new issue