diff options
author | flow <thiagodonato300@gmail.com> | 2022-05-07 20:16:55 -0300 |
---|---|---|
committer | flow <thiagodonato300@gmail.com> | 2022-05-07 20:16:55 -0300 |
commit | 2fbb7be23bb31d0c5007a0500ad2a5d3a51f644e (patch) | |
tree | 0a0510063947918b34dfd73e23f02cb997e57028 /launcher/ui/pages/modplatform/ImportPage.cpp | |
parent | f7f39854f83002f528c6f05a67f6a3b0500a8038 (diff) | |
download | PrismLauncher-2fbb7be23bb31d0c5007a0500ad2a5d3a51f644e.tar.gz PrismLauncher-2fbb7be23bb31d0c5007a0500ad2a5d3a51f644e.tar.bz2 PrismLauncher-2fbb7be23bb31d0c5007a0500ad2a5d3a51f644e.zip |
fix: filter based on MIME type instead of plaintext suffix
Suffixes are unreliable in different locales, while MIME types are more
standarized.
Diffstat (limited to 'launcher/ui/pages/modplatform/ImportPage.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/ImportPage.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/launcher/ui/pages/modplatform/ImportPage.cpp b/launcher/ui/pages/modplatform/ImportPage.cpp index 487bf77b..1b53dd40 100644 --- a/launcher/ui/pages/modplatform/ImportPage.cpp +++ b/launcher/ui/pages/modplatform/ImportPage.cpp @@ -143,7 +143,8 @@ void ImportPage::setUrl(const QString& url) void ImportPage::on_modpackBtn_clicked() { - const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Choose modpack"), modpackUrl(), tr("Zip (*.zip)")); + auto filter = QMimeDatabase().mimeTypeForName("application/zip").filterString(); + const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Choose modpack"), modpackUrl(), filter); if (url.isValid()) { if (url.isLocalFile()) |