aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authortimoreo <timo.oreo34@gmail.com>2022-05-20 22:06:36 +0200
committertimoreo <timo.oreo34@gmail.com>2022-05-20 22:06:36 +0200
commit6542f5f15af31e493c9b46afb3a5b4b330cc9cee (patch)
tree9f90edefb60acbf32ea8097f4ef9a64bae2b588b /launcher
parent30b56dbcbd3bb7d61210405a469c7efb28581904 (diff)
downloadPrismLauncher-6542f5f15af31e493c9b46afb3a5b4b330cc9cee.tar.gz
PrismLauncher-6542f5f15af31e493c9b46afb3a5b4b330cc9cee.tar.bz2
PrismLauncher-6542f5f15af31e493c9b46afb3a5b4b330cc9cee.zip
Apply suggestions
Diffstat (limited to 'launcher')
-rw-r--r--launcher/modplatform/flame/PackManifest.cpp5
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.ui65
2 files changed, 38 insertions, 32 deletions
diff --git a/launcher/modplatform/flame/PackManifest.cpp b/launcher/modplatform/flame/PackManifest.cpp
index c78783a0..3217a756 100644
--- a/launcher/modplatform/flame/PackManifest.cpp
+++ b/launcher/modplatform/flame/PackManifest.cpp
@@ -82,12 +82,13 @@ bool Flame::File::parseFromBytes(const QByteArray& bytes)
// this is probably a mod, dunno what else could modpacks download
targetFolder = "mods";
}
- if(!obj.contains("downloadUrl") || obj["downloadUrl"].isNull() || !obj["downloadUrl"].isString() || obj["downloadUrl"].toString().isEmpty()){
+ QString rawUrl = Json::ensureString(obj, "downloadUrl");
+
+ if(rawUrl.isEmpty()){
//either there somehow is an emtpy string as a link, or it's null either way it's invalid
//soft failing
return false;
}
- QString rawUrl = Json::requireString(obj, "downloadUrl");
url = QUrl(rawUrl, QUrl::TolerantMode);
if (!url.isValid()) {
throw JSONValidationError(QString("Invalid URL: %1").arg(rawUrl));
diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.ui b/launcher/ui/pages/modplatform/flame/FlamePage.ui
index b337d672..4c7a6495 100644
--- a/launcher/ui/pages/modplatform/flame/FlamePage.ui
+++ b/launcher/ui/pages/modplatform/flame/FlamePage.ui
@@ -6,26 +6,39 @@
<rect>
<x>0</x>
<y>0</y>
- <width>1989</width>
+ <width>2445</width>
<height>685</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="1">
- <widget class="QPushButton" name="searchButton">
- <property name="text">
- <string>Search</string>
- </property>
- </widget>
+ <item row="4" column="0" colspan="2">
+ <layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,0" rowminimumheight="0" columnminimumwidth="0,0,0">
+ <item row="0" column="2">
+ <widget class="QComboBox" name="versionSelectionBox"/>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Version selected:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QComboBox" name="sortByBox"/>
+ </item>
+ </layout>
</item>
- <item row="0" column="0">
+ <item row="1" column="0">
<widget class="QLineEdit" name="searchEdit">
<property name="placeholderText">
<string>Search and filter...</string>
</property>
</widget>
</item>
- <item row="2" column="0" colspan="2">
+ <item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<widget class="QListView" name="packView">
@@ -55,30 +68,22 @@
</item>
</layout>
</item>
- <item row="3" column="0" colspan="2">
- <layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,0" rowminimumheight="0" columnminimumwidth="0,0,0">
- <item row="0" column="2">
- <widget class="QComboBox" name="versionSelectionBox"/>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Version selected:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QComboBox" name="sortByBox"/>
- </item>
- </layout>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="searchButton">
+ <property name="text">
+ <string>Search</string>
+ </property>
+ </widget>
</item>
- <item row="1" column="0">
+ <item row="0" column="0">
<widget class="QLabel" name="label_2">
+ <property name="font">
+ <font>
+ <italic>true</italic>
+ </font>
+ </property>
<property name="text">
- <string>WARNING !! Curseforge is very unreliable and low quality. Some mod authors have disabled the ability for third party apps (like polymc) to download the mods, you may need to manually download some mods</string>
+ <string>WARNING: CurseForge's API is very unreliable and low quality. Also, some mod authors have disabled the ability for third party apps (like PolyMC) to download their mods. As such, you may need to manually download some mods to be able to use the modpack.</string>
</property>
</widget>
</item>