aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/widgets
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-08-30 18:06:13 -0300
committerflow <flowlnlnln@gmail.com>2022-09-03 13:37:22 -0300
commit3b13e692d29c96f99b2c153dd2c7933070eb8479 (patch)
treea0296e12519a146ef8545622453dff23b19b552c /launcher/ui/widgets
parent0331f5a1eb3e9fa21e89fc7fd56fdd4e87f29e44 (diff)
downloadPrismLauncher-3b13e692d29c96f99b2c153dd2c7933070eb8479.tar.gz
PrismLauncher-3b13e692d29c96f99b2c153dd2c7933070eb8479.tar.bz2
PrismLauncher-3b13e692d29c96f99b2c153dd2c7933070eb8479.zip
feat: move resource pack images to QPixmapCache
This takes care of evicting entries when the cache gets too big for us, so we can add new entries without much worries. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/widgets')
-rw-r--r--launcher/ui/widgets/InfoFrame.cpp2
-rw-r--r--launcher/ui/widgets/InfoFrame.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/launcher/ui/widgets/InfoFrame.cpp b/launcher/ui/widgets/InfoFrame.cpp
index 97d0ba37..9e0553f8 100644
--- a/launcher/ui/widgets/InfoFrame.cpp
+++ b/launcher/ui/widgets/InfoFrame.cpp
@@ -105,7 +105,7 @@ static const QMap<QChar, QString> s_value_to_color = {
{'f', "#FFFFFF"}
};
-void InfoFrame::updateWithResourcePack(const ResourcePack& resource_pack)
+void InfoFrame::updateWithResourcePack(ResourcePack& resource_pack)
{
setName(resource_pack.name());
diff --git a/launcher/ui/widgets/InfoFrame.h b/launcher/ui/widgets/InfoFrame.h
index d914aa0c..70d15b1e 100644
--- a/launcher/ui/widgets/InfoFrame.h
+++ b/launcher/ui/widgets/InfoFrame.h
@@ -40,7 +40,7 @@ class InfoFrame : public QFrame {
void updateWithMod(Mod const& m);
void updateWithResource(Resource const& resource);
- void updateWithResourcePack(ResourcePack const& rp);
+ void updateWithResourcePack(ResourcePack& rp);
public slots:
void descriptionEllipsisHandler(QString link);