Index: trunk/BNC/bnc.pro
===================================================================
--- trunk/BNC/bnc.pro	(revision 3827)
+++ trunk/BNC/bnc.pro	(revision 3828)
@@ -2,6 +2,6 @@
 # Switch to debug configuration
 # -----------------------------
-CONFIG -= debug
-CONFIG += release
+CONFIG -= release
+CONFIG += debug
 
 
Index: trunk/BNC/teqcdlg.cpp
===================================================================
--- trunk/BNC/teqcdlg.cpp	(revision 3827)
+++ trunk/BNC/teqcdlg.cpp	(revision 3828)
@@ -105,5 +105,5 @@
   connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
 
-  _buttonOK = new QPushButton(tr("OK"), this);
+  _buttonOK = new QPushButton(tr("OK / Save"), this);
   connect(_buttonOK, SIGNAL(clicked()), this, SLOT(slotOK()));
 
@@ -133,5 +133,6 @@
 ////////////////////////////////////////////////////////////////////////////
 void teqcDlg::slotOK() {
-
+  // saveOptions();
+  done(0);
 }
 
@@ -141,2 +142,21 @@
   QWhatsThis::enterWhatsThisMode();
 }
+
+// Close Dialog gracefully
+////////////////////////////////////////////////////////////////////////////
+void teqcDlg::closeEvent(QCloseEvent* event) {
+
+  int iRet = QMessageBox::question(this, "Close", "Save Options?", 
+                                   QMessageBox::Yes, QMessageBox::No,
+                                   QMessageBox::Cancel);
+
+  if      (iRet == QMessageBox::Cancel) {
+    event->ignore();
+    return;
+  }
+  else if (iRet == QMessageBox::Yes) {
+    //    saveOptions();
+  }
+
+  QDialog::closeEvent(event);
+}
Index: trunk/BNC/teqcdlg.h
===================================================================
--- trunk/BNC/teqcdlg.h	(revision 3827)
+++ trunk/BNC/teqcdlg.h	(revision 3828)
@@ -45,4 +45,7 @@
     void slotWhatsThis();
 
+  protected:
+    virtual void closeEvent(QCloseEvent *);
+
   private:
    QComboBox*     _teqcRnxVersion;
