diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/src/main.cpp b/src/main.cpp index 839aa43..58c0584 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,25 +26,29 @@ #include "Globals.h" #include "Dialog.h" -bool myLessThan(Session* a, Session* b) { - return *a < *b; +bool +myLessThan(Session* a, Session* b) +{ + return *a < *b; } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - QApplication a(argc, argv); + QApplication a(argc, argv); - VSessionHandler *vh = new VSessionHandler; - vh->setConfPath(etcPath); - vh->setFilterScript(filterScript + ".disabled"); - vh->setRunVmScript(runVmScript); + VSessionHandler *vh = new VSessionHandler; + vh->setConfPath(etcPath); + vh->setFilterScript(filterScript + ".disabled"); + vh->setRunVmScript(runVmScript); - /* read session files */ - QList<Session*> vsessions(vh->readXmlDir(vSessionPath)); + /* read session files */ + QList<Session*> vsessions(vh->readXmlDir(vSessionPath)); - Dialog *w = new Dialog; + Dialog *w = new Dialog; - if (vsessions.size()) { + if (vsessions.size()) + { // if (!(QFile::permissions(runVmScript) & QFile::ExeUser)) { // std::cerr << a.translate( // "Console", @@ -53,13 +57,13 @@ int main(int argc, char *argv[]) // << std::endl; // return EXIT_FAILURE; // } - qSort(vsessions.begin(), vsessions.end(), myLessThan); - w->addItems(vsessions); + qSort(vsessions.begin(), vsessions.end(), myLessThan); + w->addItems(vsessions); } - w->center(); - w->show(); + w->center(); + w->show(); - a.setActiveWindow(w); - return a.exec(); + a.setActiveWindow(w); + return a.exec(); } |