aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ReviewMessageBox.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-02 13:14:19 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-02 13:14:19 +0300
commit7ac2a23bc8083f0320d73af32f62ad97a407557b (patch)
treefc4004dacb288ebefce9420099cc29f67383d41a /launcher/ui/dialogs/ReviewMessageBox.cpp
parentf8adb508ab0152af76829e0fdee92b451dcc1acf (diff)
parentb51f1f1d41a6153c37b1d61a04df8ece5004cc27 (diff)
downloadPrismLauncher-7ac2a23bc8083f0320d73af32f62ad97a407557b.tar.gz
PrismLauncher-7ac2a23bc8083f0320d73af32f62ad97a407557b.tar.bz2
PrismLauncher-7ac2a23bc8083f0320d73af32f62ad97a407557b.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into catpacks
Diffstat (limited to 'launcher/ui/dialogs/ReviewMessageBox.cpp')
-rw-r--r--launcher/ui/dialogs/ReviewMessageBox.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/ReviewMessageBox.cpp b/launcher/ui/dialogs/ReviewMessageBox.cpp
index 7b2df278..7b33765f 100644
--- a/launcher/ui/dialogs/ReviewMessageBox.cpp
+++ b/launcher/ui/dialogs/ReviewMessageBox.cpp
@@ -40,7 +40,8 @@ void ReviewMessageBox::appendResource(ResourceInformation&& info)
auto filenameItem = new QTreeWidgetItem(itemTop);
filenameItem->setText(0, tr("Filename: %1").arg(info.filename));
- itemTop->insertChildren(0, { filenameItem });
+ auto childIndx = 0;
+ itemTop->insertChildren(childIndx++, { filenameItem });
if (!info.custom_file_path.isEmpty()) {
auto customPathItem = new QTreeWidgetItem(itemTop);
@@ -49,7 +50,31 @@ void ReviewMessageBox::appendResource(ResourceInformation&& info)
itemTop->insertChildren(1, { customPathItem });
itemTop->setIcon(1, QIcon(APPLICATION->getThemedIcon("status-yellow")));
- itemTop->setToolTip(1, tr("This file will be downloaded to a folder location different from the default, possibly due to its loader requiring it."));
+ itemTop->setToolTip(
+ childIndx++,
+ tr("This file will be downloaded to a folder location different from the default, possibly due to its loader requiring it."));
+ }
+
+ auto providerItem = new QTreeWidgetItem(itemTop);
+ providerItem->setText(0, tr("Provider: %1").arg(info.provider));
+
+ itemTop->insertChildren(childIndx++, { providerItem });
+
+ if (!info.required_by.isEmpty()) {
+ auto requiredByItem = new QTreeWidgetItem(itemTop);
+ if (info.required_by.length() == 1) {
+ requiredByItem->setText(0, tr("Required by: %1").arg(info.required_by.back()));
+ } else {
+ requiredByItem->setText(0, tr("Required by:"));
+ auto i = 0;
+ for (auto req : info.required_by) {
+ auto reqItem = new QTreeWidgetItem(requiredByItem);
+ reqItem->setText(0, req);
+ reqItem->insertChildren(i++, { reqItem });
+ }
+ }
+
+ itemTop->insertChildren(childIndx++, { requiredByItem });
}
ui->modTreeWidget->addTopLevelItem(itemTop);