src/hbutils/document/hbdocumentloader_p.cpp
changeset 2 06ff229162e9
parent 1 f7ac710697a9
child 5 627c4a0fd0e7
equal deleted inserted replaced
1:f7ac710697a9 2:06ff229162e9
   279     return hbInstance->libraryPaths();
   279     return hbInstance->libraryPaths();
   280 }
   280 }
   281 
   281 
   282 QString HbDocumentLoaderPluginManager::pluginFileNameFilter() const
   282 QString HbDocumentLoaderPluginManager::pluginFileNameFilter() const
   283 {
   283 {
   284 #if defined(Q_OS_LINUX)
   284 #if defined(Q_OS_MAC)
   285     return QString("*.so");
       
   286 #elif defined(Q_OS_MAC)
       
   287     return QString("*.dylib");
   285     return QString("*.dylib");
   288 #elif defined(Q_OS_WIN32)
   286 #elif defined(Q_OS_WIN32)
   289     return QString("*plugin.dll");
   287     return QString("*plugin.dll");
   290 #else
   288 #elif defined(Q_OS_SYMBIAN)
   291     return QString("*.qtplugin");
   289     return QString("*.qtplugin");
       
   290 #else
       
   291     return QString("*.so");
   292 #endif
   292 #endif
   293 }
   293 }
   294 
   294 
   295 void HbDocumentLoaderPluginManager::scanPlugins()
   295 void HbDocumentLoaderPluginManager::scanPlugins()
   296 {
   296 {
   335 {
   335 {
   336     // check the exising plug-ins
   336     // check the exising plug-ins
   337     foreach( QPluginLoader *loader, mPlugins ) {
   337     foreach( QPluginLoader *loader, mPlugins ) {
   338         const QFileInfo fileInfo( loader->fileName() );
   338         const QFileInfo fileInfo( loader->fileName() );
   339         QString compareName;
   339         QString compareName;
   340 #ifdef Q_OS_LINUX
   340 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
   341         compareName.append( "lib" );
   341         compareName.append( "lib" );
   342 #endif
   342 #endif
   343         compareName.append( plugin );
   343         compareName.append( plugin );
   344         if ( fileInfo.baseName() == compareName ) {
   344         if ( fileInfo.baseName() == compareName ) {
   345             return loader;
   345             return loader;
   347     }
   347     }
   348 
   348 
   349     // not found -> try to find it.
   349     // not found -> try to find it.
   350     const QStringList pathList = pluginPathList();
   350     const QStringList pathList = pluginPathList();
   351     QString fileNameFilter;
   351     QString fileNameFilter;
   352 #ifdef Q_OS_LINUX
   352 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
   353     fileNameFilter.append( "lib" );
   353     fileNameFilter.append( "lib" );
   354 #endif
   354 #endif
   355     fileNameFilter.append( plugin );
   355     fileNameFilter.append( plugin );
   356     fileNameFilter.append( "*" );
   356     fileNameFilter.append( "*" );
   357 
   357