summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings
Unidiff
Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindow/mainwindowimp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
index fb7d7c9..5f23aea 100644
--- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
@@ -267,49 +267,49 @@ void MainWindowImp::getAllInterfaces()
267 * and attempts to load them 267 * and attempts to load them
268 */ 268 */
269void MainWindowImp::loadModules(const QString &path) 269void MainWindowImp::loadModules(const QString &path)
270{ 270{
271#ifdef DEBUG 271#ifdef DEBUG
272 odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl; 272 odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl;
273#endif 273#endif
274 QDir d(path); 274 QDir d(path);
275 if(!d.exists()) 275 if(!d.exists())
276 return; 276 return;
277 277
278 QString lang = ::getenv("LANG"); 278 QString lang = ::getenv("LANG");
279 // Don't want sym links 279 // Don't want sym links
280 d.setFilter( QDir::Files | QDir::NoSymLinks ); 280 d.setFilter( QDir::Files | QDir::NoSymLinks );
281 const QFileInfoList *list = d.entryInfoList(); 281 const QFileInfoList *list = d.entryInfoList();
282 QFileInfoListIterator it( *list ); 282 QFileInfoListIterator it( *list );
283 QFileInfo *fi; 283 QFileInfo *fi;
284 while ( (fi=it.current()) ) 284 while ( (fi=it.current()) )
285 { 285 {
286 if(fi->fileName().contains(".so")) 286 if(fi->fileName().contains(".so"))
287 { 287 {
288 /* if loaded install translation */ 288 /* if loaded install translation */
289 if( loadPlugin(path + "/" + fi->fileName()) != 0l ){ 289 if( loadPlugin(path + "/" + fi->fileName()) != 0l ){
290 QTranslator *trans = new QTranslator(qApp); 290 QTranslator *trans = new QTranslator(qApp);
291 QString fn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+ fi->fileName().left( fi->fileName().find(".") )+".qm"; 291 QString fn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+ fi->fileName().left( fi->fileName().find(".") )+".qm";
292 if( trans->load( fn ) ) 292 if( trans->load( fn ) )
293 qApp->installTranslator( trans ); 293 qApp->installTranslator( trans );
294 else 294 else
295 delete trans; 295 delete trans;
296 } 296 }
297 odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl; 297 odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl;
298 } 298 }
299 ++it; 299 ++it;
300 } 300 }
301} 301}
302 302
303/** 303/**
304 * Attempt to load a function and resolve a function. 304 * Attempt to load a function and resolve a function.
305 * @param pluginFileName - the name of the file in which to attempt to load 305 * @param pluginFileName - the name of the file in which to attempt to load
306 * @param resolveString - function pointer to resolve 306 * @param resolveString - function pointer to resolve
307 * @return pointer to the function with name resolveString or NULL 307 * @return pointer to the function with name resolveString or NULL
308 */ 308 */
309Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString) 309Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString)
310{ 310{
311#ifdef DEBUG 311#ifdef DEBUG
312 odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl; 312 odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl;
313#endif 313#endif
314 QLibrary *lib = new QLibrary(pluginFileName); 314 QLibrary *lib = new QLibrary(pluginFileName);
315 void *functionPointer = lib->resolve(resolveString); 315 void *functionPointer = lib->resolve(resolveString);