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

Method initialize

launcher/ui/widgets/VersionSelectWidget.cpp:71–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void VersionSelectWidget::initialize(BaseVersionList *vlist)
72{
73 m_vlist = vlist;
74 m_proxyModel->setSourceModel(vlist);
75 listView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
76 listView->header()->setSectionResizeMode(resizeOnColumn, QHeaderView::Stretch);
77
78 if (!m_vlist->isLoaded())
79 {
80 loadList();
81 }
82 else
83 {
84 if (m_proxyModel->rowCount() == 0)
85 {
86 listView->setEmptyMode(VersionListView::String);
87 }
88 preselect();
89 }
90}
91
92void VersionSelectWidget::closeEvent(QCloseEvent * event)
93{

Callers

nothing calls this directly

Calls 4

setSourceModelMethod · 0.80
setEmptyModeMethod · 0.80
isLoadedMethod · 0.45
rowCountMethod · 0.45

Tested by

no test coverage detected