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

Function main

MiniZincIDE/main.cpp:16–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#include "mainwindow.h"
15
16int main(int argc, char *argv[])
17{
18 IDE a(argc, argv);
19 QStringList args = QApplication::arguments();
20 QStringList files;
21 bool hadProject = false;
22 for (int i=1; i<args.size(); i++) {
23 if (args[i].endsWith(".mzp")) {
24 MainWindow* mw = new MainWindow(args[i]);
25 mw->show();
26 hadProject = true;
27 } else {
28 files << args[i];
29 }
30 }
31 if (!hadProject) {
32 MainWindow* w = new MainWindow(files);
33 w->show();
34 }
35#ifdef Q_OS_MAC
36 a.setQuitOnLastWindowClosed(false);
37#endif
38 return a.exec();
39}

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected