All --

Just doing some testing to verify that my app works correctly in Windows and Mac, and just noticed that the following code in my mainwindow.cpp works exactly as I expect on my Mac (where I do my primary development), but the same code does not generate the dialog and throws the following error: "QDialog::exec: Recursive call detected" because the dialog isn't created. As this code was written a year ago I'm having trouble believing that I've missed this before but that's another story...

mainwindow.h
Qt Code:
  1. namespace Ui {
  2. class MainWindow;
  3. }
  4.  
  5. class MainWindow : public QMainWindow
  6. {
  7. Q_OBJECT
  8.  
  9. public:
  10. explicit MainWindow(QWidget *parent = 0);
  11. ~MainWindow();
  12.  
  13. RAOEntryDialog *RAO_Edit;
  14. };
To copy to clipboard, switch view to plain text mode 

mainwindow.cpp

Qt Code:
  1. //****************************************************************************
  2. void MainWindow::on_SurgePB_clicked()
  3. {
  4. //**********************************************
  5. //* Create a pop-up dialog to allow the user *
  6. //* to perform large-scale editing of period *
  7. //* and phase data related to RAOs... *
  8. //**********************************************
  9. if (!RAO_Edit)
  10. {
  11. RAO_Edit = new RAOEntryDialog(surgemodel, "SURGE", user, rig_id,
  12. rig_dataset, this);
  13.  
  14. connect(RAO_Edit, SIGNAL(edit_rao_signal(int)),
  15. this, SLOT(process_rao_edits(int)));
  16. }
  17.  
  18. RAO_Edit->exec();
  19.  
  20. }
To copy to clipboard, switch view to plain text mode 

If instead of the "if" statement I simply create the dialog then delete it after the "exec()" command it works fine - and that's probably a better way of preventing memory leaks anyway - but I was wondering if someone has a theory of why there's a different behavior on the different platforms (Windows 7 and Mac 10.7.5)

thanks!


Kodi