summaryrefslogtreecommitdiffstats
path: root/api/gui/icons
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-11-14 00:16:04 +0100
committerPetr Mrázek <peterix@gmail.com>2017-11-14 00:16:04 +0100
commit322922e013d310ee4de2fef402d20b1be4f1e07a (patch)
tree19bada598c8e8fb68c4ce0183ea095a2e960c816 /api/gui/icons
parentfede712a26937c5c0815cb9ed62320a8611794eb (diff)
downloadMultiMC-322922e013d310ee4de2fef402d20b1be4f1e07a.tar
MultiMC-322922e013d310ee4de2fef402d20b1be4f1e07a.tar.gz
MultiMC-322922e013d310ee4de2fef402d20b1be4f1e07a.tar.lz
MultiMC-322922e013d310ee4de2fef402d20b1be4f1e07a.tar.xz
MultiMC-322922e013d310ee4de2fef402d20b1be4f1e07a.zip
NOISSUE add svg instance icon support
Diffstat (limited to 'api/gui/icons')
-rw-r--r--api/gui/icons/IconList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/gui/icons/IconList.cpp b/api/gui/icons/IconList.cpp
index aed96869..139fe5cf 100644
--- a/api/gui/icons/IconList.cpp
+++ b/api/gui/icons/IconList.cpp
@@ -261,7 +261,7 @@ void IconList::installIcons(const QStringList &iconFiles)
QString target = FS::PathCombine(m_dir.dirName(), fileinfo.fileName());
QString suffix = fileinfo.suffix();
- if (suffix != "jpeg" && suffix != "png" && suffix != "jpg" && suffix != "ico")
+ if (suffix != "jpeg" && suffix != "png" && suffix != "jpg" && suffix != "ico" && suffix != "svg")
continue;
if (!QFile::copy(file, target))
@@ -331,7 +331,7 @@ bool IconList::addIcon(const QString &key, const QString &name, const QString &p
{
// replace the icon even? is the input valid?
QIcon icon(path);
- if (!icon.availableSizes().size())
+ if (icon.isNull())
return false;
auto iter = name_index.find(key);
if (iter != name_index.end())