MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / initialize

Method initialize

launcher/ui/widgets/VersionSelectWidget.cpp:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void VersionSelectWidget::initialize(BaseVersionList* vlist, bool forceLoad)
109{
110 m_vlist = vlist;
111 m_proxyModel->setSourceModel(vlist);
112 listView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
113 listView->header()->setSectionResizeMode(resizeOnColumn, QHeaderView::Stretch);
114
115 if (!m_vlist->isLoaded() || forceLoad) {
116 loadList();
117 } else {
118 if (m_proxyModel->rowCount() == 0) {
119 listView->setEmptyMode(VersionListView::String);
120 }
121 preselect();
122 }
123}
124
125void VersionSelectWidget::closeEvent(QCloseEvent* event)
126{

Callers

nothing calls this directly

Calls 5

loadListFunction · 0.85
setSourceModelMethod · 0.45
isLoadedMethod · 0.45
rowCountMethod · 0.45
setEmptyModeMethod · 0.45

Tested by

no test coverage detected