aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-05 17:37:24 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-05 17:37:24 +0100
commit1a3fbaf22975b1f130998841adb3109b8a543513 (patch)
tree109aa71f6594d3b0c8aa33adbe264be9f41034df
parentcfe13fdc741ae02b473cb30b36f94e3b01f1dad2 (diff)
downloadqtmips-1a3fbaf22975b1f130998841adb3109b8a543513.tar.gz
qtmips-1a3fbaf22975b1f130998841adb3109b8a543513.tar.bz2
qtmips-1a3fbaf22975b1f130998841adb3109b8a543513.zip
Make slots in NewDialog private
-rw-r--r--qtmips_gui/newdialog.cpp16
-rw-r--r--qtmips_gui/newdialog.h8
2 files changed, 12 insertions, 12 deletions
diff --git a/qtmips_gui/newdialog.cpp b/qtmips_gui/newdialog.cpp
index cc23e2f..d17d0c4 100644
--- a/qtmips_gui/newdialog.cpp
+++ b/qtmips_gui/newdialog.cpp
@@ -34,6 +34,14 @@ NewDialog::~NewDialog() {
// Settings is freed by parent
}
+void NewDialog::closeEvent(QCloseEvent *) {
+ load_settings(); // Reset from settings
+ // Close main window if not already configured
+ MainWindow *prnt = (MainWindow*)parent();
+ if (!prnt->configured())
+ prnt->close();
+}
+
void NewDialog::cancel() {
this->close();
}
@@ -88,14 +96,6 @@ void NewDialog::set_custom_preset() {
ui->preset_custom->setChecked(true);
}
-void NewDialog::closeEvent(QCloseEvent *) {
- load_settings(); // Reset from settings
- // Close main window if not already configured
- MainWindow *prnt = (MainWindow*)parent();
- if (!prnt->configured())
- prnt->close();
-}
-
#define LOAD_BUTTON(NAME, DEF) ui->NAME->setChecked(settings->value(#NAME, DEF).toBool())
#define LOAD_LINE(NAME, DEF) ui->NAME->setText(settings->value(#NAME, DEF).toString())
diff --git a/qtmips_gui/newdialog.h b/qtmips_gui/newdialog.h
index 1e266a1..f69bea1 100644
--- a/qtmips_gui/newdialog.h
+++ b/qtmips_gui/newdialog.h
@@ -14,16 +14,16 @@ public:
NewDialog(QWidget *parent, QSettings *settings);
~NewDialog();
-public slots:
+protected:
+ void closeEvent(QCloseEvent *);
+
+private slots:
void cancel();
void create();
void browse_elf();
void preset(bool);
void set_custom_preset();
-protected:
- void closeEvent(QCloseEvent *);
-
private:
Ui::NewDialog *ui;
QSettings *settings;