summaryrefslogtreecommitdiff
authortille <tille>2003-05-22 15:10:21 (UTC)
committer tille <tille>2003-05-22 15:10:21 (UTC)
commit00cbc1e933f90fe67f53928472567ddf4a17eabd (patch) (side-by-side diff)
treef5e0d34303afcc688a0ad38be5e5489f6f0c8a6f
parent273857932d4d4af9bf78bfca92f2986163e5f4f6 (diff)
downloadopie-00cbc1e933f90fe67f53928472567ddf4a17eabd.zip
opie-00cbc1e933f90fe67f53928472567ddf4a17eabd.tar.gz
opie-00cbc1e933f90fe67f53928472567ddf4a17eabd.tar.bz2
pppplugin
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 7e24cda..56bbd2c 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -236,24 +236,25 @@ void MainWindowImp::loadModules(const QString &path){
// Don't want sym links
d.setFilter( QDir::Files | QDir::NoSymLinks );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
QFileInfo *fi;
while ( (fi=it.current()) ) {
#ifdef QWS
if(fi->fileName().contains(".so")){
#else
if(fi->fileName().contains(".so") && fi->fileName().contains("networksettings_")){
#endif
loadPlugin(path + "/" + fi->fileName());
+ qDebug("loaded plugin: >%s< ",QString(path + "/" + fi->fileName()).latin1());
}
++it;
}
}
/**
* Attempt to load a function and resolve a function.
* @param pluginFileName - the name of the file in which to attempt to load
* @param resolveString - function pointer to resolve
* @return pointer to the function with name resolveString or NULL
*/
Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString){
@@ -278,27 +279,25 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
#endif
delete lib;
return NULL;
}
// Store for deletion later
libraries.insert(object, lib);
return object;
#else
QLibrary *lib = loader->library(pluginFileName);
if( !lib || !lib->hasSymbol(resolveString) ){
-#ifdef DEBUG
qDebug(QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1());
-#endif
return NULL;
}
// Try to get an object.
Module *object = ((Module* (*)()) lib->symbol(resolveString))();
if(object == NULL){
#ifdef DEBUG
qDebug("MainWindowImp: Couldn't create object, but did load library!");
#endif
return NULL;
}
#ifdef DEBUG
qDebug("MainWindowImp::loadPlugin:: Found object, storing.");
@@ -332,24 +331,25 @@ void MainWindowImp::addClicked(){
AddConnectionImp addNewConnection(this, "AddConnectionImp", true);
addNewConnection.addConnections(list);
addNewConnection.showMaximized();
if(QDialog::Accepted == addNewConnection.exec()){
QListViewItem *item = addNewConnection.registeredServicesList->currentItem();
if(!item)
return;
for( it = libraries.begin(); it != libraries.end(); ++it ){
if(it.key()){
Interface *i = (it.key())->addNewInterface(item->text(0));
if(i){
+ qDebug("iface name %s",i->getInterfaceName().latin1());
interfaceNames.insert(i->getInterfaceName(), i);
updateInterface(i);
}
}
}
}
}
/**
* Prompt the user to see if they really want to do this.
* If they do then remove from the list and unload.
*/