From a6df2f5a403ed1d3e8794e26771ef38a86bd1656 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 2 Jul 2008 08:35:38 +0000 Subject: [PATCH] IMP 001989: multi selection in "Import" dialog boxes --- src/SUIT/SUIT_FileDlg.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/SUIT/SUIT_FileDlg.cxx b/src/SUIT/SUIT_FileDlg.cxx index ec7bc547f..784478eac 100755 --- a/src/SUIT/SUIT_FileDlg.cxx +++ b/src/SUIT/SUIT_FileDlg.cxx @@ -481,19 +481,19 @@ QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, bool showQuickDir, SUIT_FileValidator* validator ) { - SUIT_FileDlg* fd = new SUIT_FileDlg( parent, true, showQuickDir, true ); - fd->setMode( ExistingFiles ); + SUIT_FileDlg fd( parent, true, showQuickDir, true ); + fd.setMode( ExistingFiles ); if ( !caption.isEmpty() ) - fd->setCaption( caption ); + fd.setCaption( caption ); if ( !initial.isEmpty() ) { - fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug + fd.processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug } - fd->setFilters( filters ); + fd.setFilters( filters ); if ( validator ) - fd->setValidator( validator ); - fd->exec(); - QStringList filenames = fd->selectedFiles(); - delete fd; + fd.setValidator( validator ); + QStringList filenames; + if ( fd.exec() ) + filenames = fd.selectedFiles(); qApp->processEvents(); return filenames; } -- 2.39.2