Changeset 4d8493b


Ignore:
Timestamp:
05/28/13 20:23:49 (9 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
955f76e
Parents:
5130dc7
Message:

Made sure the mainwindow is destroyed properly and the sql database is closed.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/app/main.cpp

    r5130dc7 r4d8493b  
    3939    QCoreApplication::setApplicationVersion(VERSION);
    4040
    41     QWidget* window = new MainWindow;
     41    MainWindow window;
    4242
    4343    // If we were started with the parameters confernceid and eventid, show the corresponding event (alarm)
     
    4545        QString conferenceIdStr = argv[1];
    4646        QString eventIdStr = argv[2];
    47         EventDialog dialog(conferenceIdStr.toInt(), eventIdStr.toInt(), window);
     47        EventDialog dialog(conferenceIdStr.toInt(), eventIdStr.toInt(), &window);
    4848        dialog.exec();
    4949    }
    50     window->show();
     50    window.show();
    5151
    5252    return a.exec();
  • src/gui/mainwindow.cpp

    r5130dc7 r4d8493b  
    128128
    129129
     130MainWindow::~MainWindow() {
     131    sqlEngine->close();
     132}
     133
     134
    130135void MainWindow::on_aboutAction_triggered()
    131136{
  • src/gui/mainwindow.h

    r5130dc7 r4d8493b  
    3636public:
    3737    MainWindow(QWidget *parent = 0);
     38    ~MainWindow();
    3839signals:
    3940    void conferenceRemoved();
Note: See TracChangeset for help on using the changeset viewer.