• Elvis Angelaccio's avatar
    Fix crash with blocking Open dialog · 0d16e7d0
    Elvis Angelaccio authored
    `QDialog::exec()` is bad and should not be used unless strictly necessary.
    The exec() call is blocking and anything can happen before it returns to the caller.
    
    The old workaround is to use a `QPointer` to guard the dialog.
    Yet there is a crash when calling `QCoreApplication::quit()` via dbus while the dialog is open.
    
    The proper fix is to call the dialog in a non-blocking way. Nowadays this is trivial thanks to C++11 lambdas.
    
    Differential Revision: D1786
    0d16e7d0
mainwindow.cpp 10.2 KB