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

Method setSuggestedPack

launcher/ui/dialogs/NewInstanceDialog.cpp:181–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void NewInstanceDialog::setSuggestedPack(const QString& name, InstanceTask* task)
182{
183 creationTask.reset(task);
184
185 ui->instNameTextBox->setPlaceholderText(name);
186 importVersion.clear();
187
188 if (!task) {
189 ui->iconButton->setIcon(APPLICATION->icons()->getIcon("default"));
190 importIcon = false;
191 }
192
193 auto allowOK = task && !instName().isEmpty();
194 m_buttons->button(QDialogButtonBox::Ok)->setEnabled(allowOK);
195}
196
197void NewInstanceDialog::setSuggestedPack(const QString& name, QString version, InstanceTask* task)
198{

Callers 15

updateStateMethod · 0.80
suggestCurrentMethod · 0.80
suggestCurrentMethod · 0.80
onSelectionChangedMethod · 0.80
suggestCurrentMethod · 0.80
onSelectionChangedMethod · 0.80
suggestCurrentMethod · 0.80
selectVersionMethod · 0.80
suggestCurrentMethod · 0.80
onSelectionChangedMethod · 0.80
onSelectionChangedMethod · 0.80

Calls 7

getIconMethod · 0.80
iconsMethod · 0.80
isEmptyMethod · 0.80
setEnabledMethod · 0.80
resetMethod · 0.45
clearMethod · 0.45
setIconMethod · 0.45

Tested by

no test coverage detected