From 2d6920cce12fd2f1e0f62e37957d03ec2b9293d8 Mon Sep 17 00:00:00 2001 From: abd Date: Tue, 13 Feb 2007 15:16:46 +0000 Subject: [PATCH] Support old formats for separator of MODULECatalog.xml file paths --- .../SALOME_ModuleCatalog_impl.cxx | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index ed938bc8b..55dd3cede 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -43,7 +43,8 @@ static int MYDEBUG = 1; static int MYDEBUG = 1; #endif -static const char* SEPARATOR = "::"; +static const char* SEPARATOR = "::"; +static const char* OLD_SEPARATOR = ":"; //---------------------------------------------------------------------- // Function : SALOME_ModuleCatalogImpl @@ -110,9 +111,23 @@ SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv, CORBA: // Affect the _general_module_list and _general_path_list members // with the common catalog - QStringList dirList - = QStringList::split( SEPARATOR, _general_path, - false ); // skip empty entries + QStringList dirList; +#ifdef WNT + dirList = QStringList::split( SEPARATOR, _general_path, + false ); // skip empty entries +#else + //check for new format + int isNew = QString( _general_path ).contains(SEPARATOR); + if ( isNew > 0 ) { + //using new format + dirList = QStringList::split( SEPARATOR, _general_path, + false ); // skip empty entries + } else { + //support old format + dirList = QStringList::split( OLD_SEPARATOR, _general_path, + false ); // skip empty entries + } +#endif for ( int i = 0; i < dirList.count(); i++ ) { //QFileInfo fileInfo( dirList[ i ] ); -- 2.39.2