X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/21e0eb13ab19d5437288ba039c05d6865242d31d..080dc7d603d45ba0662aa731418993ddd45b5fe8:/src/app/main.cpp diff --git a/src/app/main.cpp b/src/app/main.cpp index d48ec09..e67abfb 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2010 Ixonos Plc. - * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl + * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl * * This file is part of ConfClerk. * @@ -38,16 +38,16 @@ int main(int argc, char *argv[]) QCoreApplication::setApplicationName("ConfClerk"); QCoreApplication::setApplicationVersion(VERSION); - QWidget* window = new MainWindow; + MainWindow window; // If we were started with the parameters confernceid and eventid, show the corresponding event (alarm) - if (argc == 3) { + if (argc >= 3) { QString conferenceIdStr = argv[1]; QString eventIdStr = argv[2]; - EventDialog dialog(conferenceIdStr.toInt(), eventIdStr.toInt(), window); + EventDialog dialog(conferenceIdStr.toInt(), eventIdStr.toInt(), &window); dialog.exec(); } - window->show(); + window.show(); return a.exec(); }