author | kergoth <kergoth> | 2002-06-07 18:53:14 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-06-07 18:53:14 (UTC) |
commit | 640d964cfdc7467f6cacb513087cd3acda2c04f0 (patch) (unidiff) | |
tree | 9a784686c1795f8b1f81eb344598f3b549d43467 /library/network.cpp | |
parent | dfb9c76738bb68e235114c5ad43dbd26a59b98ab (diff) | |
download | opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.zip opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.gz opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.bz2 |
Backing out unintentional merge from TT branch.
-rw-r--r-- | library/network.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/network.cpp b/library/network.cpp index 7d51016..e6d2781 100644 --- a/library/network.cpp +++ b/library/network.cpp | |||
@@ -15,12 +15,13 @@ | |||
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #define QTOPIA_INTERNAL_LANGLIST | ||
21 | #include "qpe/network.h" | 22 | #include "qpe/network.h" |
22 | #include "qpe/networkinterface.h" | 23 | #include "qpe/networkinterface.h" |
23 | #include "qpe/global.h" | 24 | #include "qpe/global.h" |
24 | #include "qpe/config.h" | 25 | #include "qpe/config.h" |
25 | #include "qpe/resource.h" | 26 | #include "qpe/resource.h" |
26 | #include "qpe/qpeapplication.h" | 27 | #include "qpe/qpeapplication.h" |
@@ -415,20 +416,22 @@ NetworkInterface* Network::loadPlugin(const QString& type) | |||
415 | if ( !iface ) { | 416 | if ( !iface ) { |
416 | QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so"; | 417 | QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so"; |
417 | QLibrary lib(libfile); | 418 | QLibrary lib(libfile); |
418 | if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK ) | 419 | if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK ) |
419 | return 0; | 420 | return 0; |
420 | ifaces->insert(type,iface); | 421 | ifaces->insert(type,iface); |
421 | QString lang = getenv( "LANG" ); | 422 | QStringList langs = Global::languageList(); |
423 | for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { | ||
424 | QString lang = *it; | ||
422 | QTranslator * trans = new QTranslator(qApp); | 425 | QTranslator * trans = new QTranslator(qApp); |
423 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm"; | 426 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm"; |
424 | if ( trans->load( tfn )) | 427 | if ( trans->load( tfn )) |
425 | qApp->installTranslator( trans ); | 428 | qApp->installTranslator( trans ); |
426 | else | 429 | else |
427 | delete trans; | 430 | delete trans; |
428 | 431 | } | |
429 | } | 432 | } |
430 | return iface; | 433 | return iface; |
431 | #else | 434 | #else |
432 | return 0; | 435 | return 0; |
433 | #endif | 436 | #endif |
434 | } | 437 | } |