summaryrefslogtreecommitdiff
path: root/library/network.cpp
Side-by-side diff
Diffstat (limited to 'library/network.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/network.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/network.cpp b/library/network.cpp
index f2a673c..0bbbec1 100644
--- a/library/network.cpp
+++ b/library/network.cpp
@@ -374,75 +374,75 @@ bool Network::networkOnline()
return ns && ns->networkOnline();
}
/*!
\internal
*/
void Network::createServer(QObject* parent)
{
ns = new NetworkServer(parent);
}
/*!
\internal
*/
int Network::addStateWidgets(QWidget* parent)
{
int n=0;
QStringList l = Network::choices();
QVBoxLayout* vb = new QVBoxLayout(parent);
for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) {
Config cfg(*it,Config::File);
cfg.setGroup("Info");
QString type = cfg.readEntry("Type");
NetworkInterface* plugin = Network::loadPlugin(type);
cfg.setGroup("Properties");
if ( plugin ) {
QWidget* w;
if ( (w=plugin->addStateWidget(parent,cfg)) ) {
n++;
vb->addWidget(w);
}
}
}
return n;
}
static QDict<NetworkInterface> *ifaces;
/*!
\internal
*/
NetworkInterface* Network::loadPlugin(const QString& type)
{
#ifndef QT_NO_COMPONENT
if ( !ifaces ) ifaces = new QDict<NetworkInterface>;
NetworkInterface *iface = ifaces->find(type);
if ( !iface ) {
#ifdef Q_OS_MACX
- QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".dylib";
+ QString libfile = QPEApplication::qpeDir() + "plugins/network/lib" + type + ".dylib";
#else
- QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so";
+ QString libfile = QPEApplication::qpeDir() + "plugins/network/lib" + type + ".so";
#endif
QLibrary lib(libfile);
if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK )
return 0;
ifaces->insert(type,iface);
QStringList langs = Global::languageList();
for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) {
QString lang = *it;
QTranslator * trans = new QTranslator(qApp);
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/lib"+type+".qm";
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
}
}
return iface;
#else
return 0;
#endif
}
#include "network.moc"
#endif // QT_NO_COP