]> git.sesse.net Git - nageru/blobdiff - mainwindow.cpp
Hook up the exit menu.
[nageru] / mainwindow.cpp
index 9d0958208d2c742bc123d7f76ccf839b2244bda1..b6ac8bf1c45fba2ee652178178ebe8a93e4b526b 100644 (file)
@@ -35,6 +35,9 @@ MainWindow::MainWindow()
        global_mainwindow = this;
        ui->setupUi(this);
 
+       // The menus.
+       connect(ui->exit_action, &QAction::triggered, this, &MainWindow::exit_triggered);
+
        global_disk_space_estimator = new DiskSpaceEstimator(bind(&MainWindow::report_disk_space, this, _1, _2));
        disk_free_label = new QLabel(this);
        disk_free_label->setStyleSheet("QLabel {padding-right: 5px;}");
@@ -631,3 +634,8 @@ void MainWindow::report_disk_space(off_t free_bytes, double estimated_seconds_le
                        });
 }
 
+void MainWindow::exit_triggered()
+{
+       close();
+}
+