From 446ccd6d58bf7942e2429df52104cd0042f4a99b Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 8 Oct 2010 09:43:26 +0000 Subject: [PATCH] Discouple "clicked()" signal from apply button to close of the standalone dialog. --- vlsisapd/src/configuration/src/ConfigurationDialog.cpp | 2 +- vlsisapd/src/configuration/src/ConfigurationWidget.cpp | 2 ++ .../src/vlsisapd/configuration/ConfigurationWidget.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/vlsisapd/src/configuration/src/ConfigurationDialog.cpp b/vlsisapd/src/configuration/src/ConfigurationDialog.cpp index ec256bbc..fc5a22ab 100644 --- a/vlsisapd/src/configuration/src/ConfigurationDialog.cpp +++ b/vlsisapd/src/configuration/src/ConfigurationDialog.cpp @@ -38,7 +38,7 @@ ConfigurationDialog::ConfigurationDialog(QWidget* parent): QDialog(parent) { setWindowTitle("Configure window"); ConfigurationWidget* confWidget = Configuration::get()->buildWidget(ConfigurationWidget::StandAlone); - connect(confWidget->getApplyButton() , SIGNAL(clicked()), this, SLOT(close())); + connect(confWidget , SIGNAL(checkOk()), this, SLOT(close())); connect(confWidget->getCancelButton(), SIGNAL(clicked()), this, SLOT(close())); connect(confWidget->getSaveButton() , SIGNAL(clicked()), this, SIGNAL(saveToFile())); diff --git a/vlsisapd/src/configuration/src/ConfigurationWidget.cpp b/vlsisapd/src/configuration/src/ConfigurationWidget.cpp index 90ee88f0..c1b5b132 100644 --- a/vlsisapd/src/configuration/src/ConfigurationWidget.cpp +++ b/vlsisapd/src/configuration/src/ConfigurationWidget.cpp @@ -206,6 +206,8 @@ namespace Cfg { if ( _log == NULL ) _log = new LogWidget(this); _log->updateLogs (); _log->exec (); + } else { + emit checkOk(); } } diff --git a/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationWidget.h b/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationWidget.h index eef97ea8..7fef8b7a 100644 --- a/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationWidget.h +++ b/vlsisapd/src/configuration/src/vlsisapd/configuration/ConfigurationWidget.h @@ -79,6 +79,7 @@ namespace Cfg { void applyClicked (); signals: void updateParameters (); + void checkOk (); private: unsigned int _flags; QFont _boldFont;