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

Method check_code

MiniZincIDE/mainwindow.cpp:2480–2491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2478}
2479
2480void MainWindow::check_code()
2481{
2482 auto sc = getCurrentSolverConfig();
2483 if (!MznDriver::get().isValid() || !ui->actionRun->isEnabled() ||
2484 !curEditor || (!curEditor->filepath.isEmpty() && !curEditor->filepath.endsWith(".mzn")) ||
2485 !sc) {
2486 return;
2487 }
2488 auto contents = curEditor->document()->toPlainText();
2489 auto wd = QFileInfo(curEditor->filepath).absolutePath();
2490 code_checker->start(contents, *sc, wd);
2491}
2492
2493void MainWindow::setTheme(const Theme& theme, bool dark)
2494{

Callers

nothing calls this directly

Calls 2

isValidMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected