diff options
author | Ryan Cao <70191398+ryanccn@users.noreply.github.com> | 2022-11-19 23:59:30 +0800 |
---|---|---|
committer | Ryan Cao <70191398+ryanccn@users.noreply.github.com> | 2022-11-19 23:59:30 +0800 |
commit | 1f6b8f9d2bddd73e6cfd9d430ef9e37d1910adff (patch) | |
tree | 59a3a99c2680f44128ef7da88a1a19852a944a21 /launcher/ui/dialogs | |
parent | a33b8049238329fa97545c0b2db5bb8c2f7545c6 (diff) | |
download | PrismLauncher-1f6b8f9d2bddd73e6cfd9d430ef9e37d1910adff.tar.gz PrismLauncher-1f6b8f9d2bddd73e6cfd9d430ef9e37d1910adff.tar.bz2 PrismLauncher-1f6b8f9d2bddd73e6cfd9d430ef9e37d1910adff.zip |
fix instance IDs and resource pack imports
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/ImportResourcePackDialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/ImportResourcePackDialog.cpp b/launcher/ui/dialogs/ImportResourcePackDialog.cpp index ef76445c..4fe28540 100644 --- a/launcher/ui/dialogs/ImportResourcePackDialog.cpp +++ b/launcher/ui/dialogs/ImportResourcePackDialog.cpp @@ -7,6 +7,7 @@ #include "Application.h" #include "InstanceList.h" +#include <InstanceList.h> #include "ui/instanceview/InstanceDelegate.h" ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(parent), ui(new Ui::ImportResourcePackDialog) @@ -40,7 +41,7 @@ ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(pa void ImportResourcePackDialog::activated(QModelIndex index) { - selectedInstanceKey = index.data(Qt::UserRole).toString(); + selectedInstanceKey = index.data(InstanceList::InstanceIDRole).toString(); accept(); } @@ -49,7 +50,7 @@ void ImportResourcePackDialog::selectionChanged(QItemSelection selected, QItemSe if (selected.empty()) return; - QString key = selected.first().indexes().first().data(Qt::UserRole).toString(); + QString key = selected.first().indexes().first().data(InstanceList::InstanceIDRole).toString(); if (!key.isEmpty()) { selectedInstanceKey = key; } |