summaryrefslogtreecommitdiffstats
path: root/application/dialogs/IconPickerDialog.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2019-05-31 21:52:58 +0200
committerPetr Mrázek <peterix@gmail.com>2019-05-31 21:53:58 +0200
commit3470a3df966100d4f1ea6488892ac048118a3131 (patch)
treefc0f649f4bba0859f7f38d2b81876fd52a8266a2 /application/dialogs/IconPickerDialog.cpp
parent61913daaf3b21960de13340a6069bc3daca8744a (diff)
downloadMultiMC-3470a3df966100d4f1ea6488892ac048118a3131.tar
MultiMC-3470a3df966100d4f1ea6488892ac048118a3131.tar.gz
MultiMC-3470a3df966100d4f1ea6488892ac048118a3131.tar.lz
MultiMC-3470a3df966100d4f1ea6488892ac048118a3131.tar.xz
MultiMC-3470a3df966100d4f1ea6488892ac048118a3131.zip
NOISSUE improve icon handling while importing and exporting instances
Now it handles formats other than png.
Diffstat (limited to 'application/dialogs/IconPickerDialog.cpp')
-rw-r--r--application/dialogs/IconPickerDialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/application/dialogs/IconPickerDialog.cpp b/application/dialogs/IconPickerDialog.cpp
index 7727aa49..7f930717 100644
--- a/application/dialogs/IconPickerDialog.cpp
+++ b/application/dialogs/IconPickerDialog.cpp
@@ -25,6 +25,7 @@
#include "groupview/InstanceDelegate.h"
#include "icons/IconList.h"
+#include "icons/IconUtils.h"
#include <DesktopServices.h>
IconPickerDialog::IconPickerDialog(QWidget *parent)
@@ -103,8 +104,8 @@ void IconPickerDialog::addNewIcon()
//: The title of the select icons open file dialog
QString selectIcons = tr("Select Icons");
//: The type of icon files
- QStringList fileNames = QFileDialog::getOpenFileNames(this, selectIcons, QString(),
- tr("Icons") + "(*.png *.jpg *.jpeg *.ico *.svg *.gif)");
+ auto filter = IconUtils::getIconFilter();
+ QStringList fileNames = QFileDialog::getOpenFileNames(this, selectIcons, QString(), tr("Icons %1").arg(filter));
MMC->icons()->installIcons(fileNames);
}