| 469 | } |
| 470 | |
| 471 | void IDE::openFile(const QString& fileName0) |
| 472 | { |
| 473 | QStringList fileNames; |
| 474 | if (fileName0.isEmpty()) { |
| 475 | fileNames = QFileDialog::getOpenFileNames(nullptr, tr("Open File"), getLastPath(), "MiniZinc Files (*.mzn *.dzn *.fzn *.json *.mzp *.mzc *.mpc);;Other (*)"); |
| 476 | if (!fileNames.isEmpty()) { |
| 477 | setLastPath(QFileInfo(fileNames.last()).absolutePath() + fileDialogSuffix); |
| 478 | } |
| 479 | } else { |
| 480 | fileNames << fileName0; |
| 481 | } |
| 482 | if (!fileNames.isEmpty()) { |
| 483 | MainWindow* mw = new MainWindow(fileNames); |
| 484 | mw->show(); |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | void IDE::help() |
| 489 | { |