Removed all redundant QFileDialog calls to show() when exec() is already being called. The show() function is a non-blocking call to create a dialog window. exec() is a blocking call and is required to use the native windows file browser. Since all the file dialog callback functions are designed to be blocking anyway, the show() calls really shouldn't be there anyway. This fixes part of #332.
This commit is contained in:
parent
5f46fd098f
commit
5eb79dcf9d
|
@ -734,7 +734,6 @@ void GuiCheatsDialog_t::openCheatFile(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -806,7 +805,6 @@ void GuiCheatsDialog_t::saveCheatFile(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -1102,7 +1102,6 @@ void consoleWin_t::openROMFile(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -1186,7 +1185,6 @@ void consoleWin_t::loadNSF(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -1270,7 +1268,6 @@ void consoleWin_t::loadStateFrom(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -1361,7 +1358,6 @@ void consoleWin_t::saveStateAs(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -1809,7 +1805,6 @@ void consoleWin_t::loadGameGenieROM(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -1898,7 +1893,6 @@ void consoleWin_t::fdsLoadBiosFile(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -1975,7 +1969,6 @@ void consoleWin_t::emuCustomSpd(void)
|
|||
dialog.setIntRange( 1, 1000 );
|
||||
dialog.setIntValue( 100 );
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( QDialog::Accepted == ret )
|
||||
|
@ -2000,7 +1993,6 @@ void consoleWin_t::emuSetFrameAdvDelay(void)
|
|||
dialog.setIntRange( 0, 1000 );
|
||||
dialog.setIntValue( frameAdvance_Delay );
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( QDialog::Accepted == ret )
|
||||
|
@ -2021,7 +2013,6 @@ void consoleWin_t::setAutoFireOnFrames(void)
|
|||
dialog.setIntRange( 1, 30 );
|
||||
dialog.setIntValue( autoFireOnFrames );
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( QDialog::Accepted == ret )
|
||||
|
@ -2042,7 +2033,6 @@ void consoleWin_t::setAutoFireOffFrames(void)
|
|||
dialog.setIntRange( 1, 30 );
|
||||
dialog.setIntValue( autoFireOffFrames );
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( QDialog::Accepted == ret )
|
||||
|
@ -2108,7 +2098,6 @@ void consoleWin_t::recordMovieAs(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -1274,7 +1274,6 @@ void HexEditorDialog_t::pickForeGroundColor(void)
|
|||
QColorDialog dialog( this );
|
||||
|
||||
dialog.setOption( QColorDialog::DontUseNativeDialog, true );
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret == QDialog::Accepted )
|
||||
|
@ -1293,7 +1292,6 @@ void HexEditorDialog_t::pickBackGroundColor(void)
|
|||
QColorDialog dialog( this );
|
||||
|
||||
dialog.setOption( QColorDialog::DontUseNativeDialog, true );
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret == QDialog::Accepted )
|
||||
|
@ -1356,7 +1354,6 @@ void HexEditorDialog_t::saveRomFileAs(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -1826,7 +1823,6 @@ void QHexEdit::openGotoAddrDialog(void)
|
|||
dialog.setOkButtonText( tr("Go") );
|
||||
//dialog.setTextValue( tr("0") );
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( QDialog::Accepted == ret )
|
||||
|
@ -2680,7 +2676,6 @@ void QHexEdit::addBookMarkCB(void)
|
|||
dialog.setOkButtonText( tr("Add") );
|
||||
dialog.setTextValue( tr(stmp) );
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( QDialog::Accepted == ret )
|
||||
|
|
|
@ -369,7 +369,6 @@ void LuaControlDialog_t::openLuaScriptFile(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -510,7 +510,6 @@ void MoviePlayDialog_t::openMovie(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -385,7 +385,6 @@ void PaletteConfDialog_t::openPaletteFile(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -213,7 +213,6 @@ void PaletteEditorDialog_t::openPaletteFileDialog(void)
|
|||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -267,7 +266,6 @@ void PaletteEditorDialog_t::savePaletteFileDialog(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -548,7 +548,6 @@ void RamWatchDialog_t::openListCB(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -609,7 +608,6 @@ void RamWatchDialog_t::appendListCB(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -693,7 +691,6 @@ void RamWatchDialog_t::saveListAs(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -437,7 +437,6 @@ void TraceLoggerDialog_t::openLogFile(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
|
@ -791,7 +791,6 @@ bool iNesHeaderEditor_t::openFile(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
@ -845,7 +844,6 @@ void iNesHeaderEditor_t::saveFileAs(void)
|
|||
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog, !useNativeFileDialogVal);
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( ret )
|
||||
|
|
Loading…
Reference in New Issue