MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / populateSolvers

Method populateSolvers

MiniZincIDE/preferencesdialog.cpp:288–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288void PreferencesDialog::populateSolvers()
289{
290 if (_solversPopulated) {
291 return;
292 }
293
294 _editingSolverIndex = -1;
295
296 auto& driver = MznDriver::get();
297 auto& solvers = driver.solvers();
298
299 ui->solvers_combo->clear();
300
301 for (auto& solver : solvers) {
302 ui->solvers_combo->addItem(solver->name + " " + solver->version);
303 }
304
305 if (solvers.empty()) {
306 ui->solvers_combo->addItem("(No solvers found)");
307 }
308
309 ui->solvers_combo->addItem("Add new...");
310
311 ui->solvers_tab->setEnabled(driver.isValid());
312
313 _solversPopulated = true;
314}
315
316bool PreferencesDialog::updateSolver()
317{

Callers

nothing calls this directly

Calls 2

isValidMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected