MCPcopy Create free account
hub / github.com/MultiMC/Launcher / data

Method data

launcher/ui/pages/instance/VersionPage.cpp:61–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 }
60
61 virtual QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const override
62 {
63 QVariant var = QIdentityProxyModel::data(proxyIndex, role);
64 int column = proxyIndex.column();
65 if(column == 0 && role == Qt::DecorationRole && m_parentWidget)
66 {
67 if(!var.isNull())
68 {
69 auto string = var.toString();
70 if(string == "warning")
71 {
72 return APPLICATION->getThemedIcon("status-yellow");
73 }
74 else if(string == "error")
75 {
76 return APPLICATION->getThemedIcon("status-bad");
77 }
78 }
79 return APPLICATION->getThemedIcon("status-good");
80 }
81 return var;
82 }
83private slots:
84 void widgetGone()
85 {

Callers 2

lessThanMethod · 0.45
dataFunction · 0.45

Calls 3

dataFunction · 0.85
getThemedIconMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected