MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / data

Method data

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

Source from the content-addressed store, hash-verified

80 }
81
82 virtual QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const override
83 {
84 QVariant var = QIdentityProxyModel::data(proxyIndex, role);
85 int column = proxyIndex.column();
86 if(column == 0 && role == Qt::DecorationRole && m_parentWidget)
87 {
88 if(!var.isNull())
89 {
90 auto string = var.toString();
91 if(string == "warning")
92 {
93 return APPLICATION->getThemedIcon("status-yellow");
94 }
95 else if(string == "error")
96 {
97 return APPLICATION->getThemedIcon("status-bad");
98 }
99 }
100 return APPLICATION->getThemedIcon("status-good");
101 }
102 return var;
103 }
104private slots:
105 void widgetGone()
106 {

Callers 1

dataFunction · 0.45

Calls 3

dataFunction · 0.85
getThemedIconMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected