MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / id

Function id

launcher/ui/dialogs/InstallLoaderDialog.cpp:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31#include "ui/widgets/VersionSelectWidget.h"
32
33class InstallLoaderPage : public VersionSelectWidget, public BasePage {
34 Q_OBJECT
35 public:
36 InstallLoaderPage(const QString& id, const QString& iconName, const QString& name, const Version& oldestVersion, PackProfile* profile)
37 : VersionSelectWidget(nullptr), uid(id), iconName(iconName), name(name)
38 {
39 const QString minecraftVersion = profile->getComponentVersion("net.minecraft");
40 setEmptyString(tr("No versions are currently available for Minecraft %1").arg(minecraftVersion));
41 setExactIfPresentFilter(BaseVersionList::ParentVersionRole, minecraftVersion);
42
43 if (oldestVersion != Version() && Version(minecraftVersion) < oldestVersion)
44 setExactFilter(BaseVersionList::ParentVersionRole, "AAA");
45
46 if (const QString currentVersion = profile->getComponentVersion(id); !currentVersion.isNull())
47 setCurrentVersion(currentVersion);
48 }
49
50 QString id() const override { return uid; }
51 QString displayName() const override { return name; }
52 QIcon icon() const override { return QIcon::fromTheme(iconName); }
53

Callers 1

setResourceMetadataMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected