Fix SEGV on ESC in chart settings

If you press ESC on the chart settings (not add chart) dialog
then the dialog is closed and deleted, causing a SEGV. This
patch overrides reject() to ensure the dialog is just hidden.
This commit is contained in:
Mark Liversedge
2012-12-01 13:12:33 +00:00
parent cf01e23428
commit 4bfc223c0d
2 changed files with 9 additions and 0 deletions

View File

@@ -60,3 +60,9 @@ ChartSettings::closeEvent(QCloseEvent* event)
event->ignore();
hide();
}
void
ChartSettings::reject()
{
hide();
}

View File

@@ -34,6 +34,9 @@ class ChartSettings : public QDialog
ChartSettings(QWidget *parent, QWidget *contents);
void closeEvent(QCloseEvent* event);
public slots:
void reject();
private:
QPushButton *btnOK;