]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
IMP 001989: multi selection in "Import" dialog boxes
authorvsr <vsr@opencascade.com>
Wed, 2 Jul 2008 08:35:38 +0000 (08:35 +0000)
committervsr <vsr@opencascade.com>
Wed, 2 Jul 2008 08:35:38 +0000 (08:35 +0000)
src/SUIT/SUIT_FileDlg.cxx

index ec7bc547f4c6648f7cc3ea2b4602ceb42f4c38fc..784478eace4718ad1d0bf1a81e86dbdef7d3ef2d 100755 (executable)
@@ -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;
 }