From: akl Date: Wed, 22 Aug 2007 11:22:22 +0000 (+0000) Subject: Remove duplicates from a list of 'not found' libraries. X-Git-Tag: IMP_BR_4~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ccb5242ef79b318e7061c60347b4c3c05be05a6;p=tools%2Finstall.git Remove duplicates from a list of 'not found' libraries. --- diff --git a/src/SALOME_InstallWizard.cxx b/src/SALOME_InstallWizard.cxx index beec2a9..d74f059 100644 --- a/src/SALOME_InstallWizard.cxx +++ b/src/SALOME_InstallWizard.cxx @@ -1663,16 +1663,17 @@ void SALOME_InstallWizard::updateAvailableSpace() void SALOME_InstallWizard::checkFLibResult() { if ( checkFLibProc->normalExit() && checkFLibProc->exitStatus() == 1 ) { - QString notFoundLibs; + QStringList notFoundLibsList; + QString record = ""; while ( checkFLibProc->canReadLineStdout() ) { - notFoundLibs.append( checkFLibProc->readLineStdout() ); - if ( checkFLibProc->canReadLineStdout() ) - notFoundLibs.append( "\n" ); + record = checkFLibProc->readLineStdout(); + if ( !record.isEmpty() && !notFoundLibsList.contains( record ) ) + notFoundLibsList.append( record ); } QMessageBox::warning( this, tr( "Warning" ), tr( "The following libraries are absent on current system:\n" - "%1").arg( notFoundLibs ), + "%1").arg( notFoundLibsList.join( "\n" ) ), QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );