MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / SetCategory

Method SetCategory

plugins/twitch/category-selection.cpp:119–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void TwitchCategorySelection::SetCategory(const TwitchCategory &id)
120{
121 // If the list is populated already try to find id ...
122 int index = findData(id.id);
123 if (index != -1) {
124 setCurrentIndex(index);
125 return;
126 }
127
128 if (id.id == -1) {
129 setCurrentIndex(-1);
130 return;
131 }
132
133 // ... otherwise just add a dummy entry with the category name
134 addItem(QString::fromStdString(id.name), id.id);
135 setCurrentIndex(findData(id.id));
136}
137
138void TwitchCategorySelection::SelectionChanged(int index)
139{

Callers 2

UpdateEntryDataMethod · 0.80
UpdateEntryDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected