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

Method setData

launcher/ui/pages/modplatform/ModModel.cpp:93–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93bool ListModel::setData(const QModelIndex &index, const QVariant &value, int role)
94{
95 int pos = index.row();
96 if (pos >= modpacks.size() || pos < 0 || !index.isValid())
97 return false;
98
99 modpacks[pos] = value.value<ModPlatform::IndexedPack>();
100
101 return true;
102}
103
104void ListModel::requestModVersions(ModPlatform::IndexedPack const& current, QModelIndex index)
105{

Callers 6

setDataFunction · 0.45
setTextMethod · 0.45
setModelDataMethod · 0.45

Calls 2

sizeMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected