-rw-r--r-- | noncore/net/networksetup/interfacesetupimp.cpp | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/interfacesetupimp.h | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 13 | ||||
-rw-r--r-- | noncore/net/networksetup/networksetup.pro | 6 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlan.pro | 6 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 9 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.h | 3 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfacesetupimp.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfacesetupimp.h | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 13 | ||||
-rw-r--r-- | noncore/settings/networksettings/networksetup.pro | 6 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlan.pro | 6 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 9 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.h | 3 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 7 |
16 files changed, 38 insertions, 58 deletions
diff --git a/noncore/net/networksetup/interfacesetupimp.cpp b/noncore/net/networksetup/interfacesetupimp.cpp index 1327726..a8731a9 100644 --- a/noncore/net/networksetup/interfacesetupimp.cpp +++ b/noncore/net/networksetup/interfacesetupimp.cpp @@ -37,9 +37,9 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac void InterfaceSetupImp::accept(){ if(!saveSettings()) return; interfaces->write(); - close(true); + QDialog::accept(); } /** * Save the settings for the current Interface. diff --git a/noncore/net/networksetup/interfacesetupimp.h b/noncore/net/networksetup/interfacesetupimp.h index 7df0d46..a0bec32 100644 --- a/noncore/net/networksetup/interfacesetupimp.h +++ b/noncore/net/networksetup/interfacesetupimp.h @@ -10,9 +10,9 @@ class InterfaceSetupImp : public InterfaceSetup { Q_OBJECT public: InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = FALSE, WFlags fl = 0); - + protected slots: void accept(); public slots: diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index c86acdc..4a088cb 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp @@ -77,9 +77,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par /**
* Deconstructor. Save profiles. Delete loaded libraries.
*/
MainWindowImp::~MainWindowImp(){
- qDebug("start Saving mainwindow");
+ qDebug("Deleting main window");
// Save profiles.
Config cfg("NetworkSetup");
cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
@@ -89,16 +89,16 @@ MainWindowImp::~MainWindowImp(){ for( iIt = items.begin(); iIt != items.end(); ++iIt ){
if(iIt.key()->getModuleOwner() == NULL)
delete iIt.key();
}
-
+
// Delete Modules and Libraries
QMap<Module*, QLibrary*>::Iterator it;
for( it = libraries.begin(); it != libraries.end(); ++it ){
delete it.key();
- delete it.data();
+ //delete it.data();
}
- qDebug("done Saving mainwindow");
+ qDebug("Done deleting main window");
}
/**
* Load all modules that are found in the path
@@ -243,20 +243,19 @@ void MainWindowImp::configureClicked(){ QTabWidget *tabWidget = NULL;
QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget);
if(moduleConfigure != NULL){
if(tabWidget != NULL){
- InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true);
+ InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
configure->setProfile(currentProfile);
tabWidget->insertTab(configure, "TCP/IP");
-
}
moduleConfigure->showMaximized();
moduleConfigure->show();
return;
}
}
- InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true);
+ InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
configure->setProfile(currentProfile);
configure->showMaximized();
configure->show();
}
diff --git a/noncore/net/networksetup/networksetup.pro b/noncore/net/networksetup/networksetup.pro index f09db93..7299cc6 100644 --- a/noncore/net/networksetup/networksetup.pro +++ b/noncore/net/networksetup/networksetup.pro @@ -1,8 +1,8 @@ -DESTDIR = $(OPIEDIR)/bin +#DESTDIR = $(OPIEDIR)/bin TEMPLATE = app -#CONFIG = qt warn_on debug -CONFIG = qt warn_on release +CONFIG = qt warn_on debug +#CONFIG = qt warn_on release HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include diff --git a/noncore/net/networksetup/wlan/wlan.pro b/noncore/net/networksetup/wlan/wlan.pro index 432a096..814a0b4 100644 --- a/noncore/net/networksetup/wlan/wlan.pro +++ b/noncore/net/networksetup/wlan/wlan.pro @@ -1,8 +1,8 @@ TEMPLATE = lib -CONFIG += qt warn_on release -#CONFIG += qt warn_on debug -DESTDIR = $(OPIEDIR)/plugins/networksetup +#CONFIG += qt warn_on release +CONFIG += qt warn_on debug +#DESTDIR = $(OPIEDIR)/plugins/networksetup HEADERS = wlanimp.h wlanmodule.h wextensions.h SOURCES = wlanimp.cpp wlanmodule.cpp wextensions.cpp INCLUDEPATH += $(OPIEDIR)/include ../ DEPENDPATH += $(OPIEDIR)/include diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 94c7518..45952b9 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp @@ -15,9 +15,9 @@ #include <qradiobutton.h> #include <qcheckbox.h> #include <qregexp.h> -WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name, Qt::WDestructiveClose){ +WLANImp::WLANImp( QWidget* parent, const char* name, bool modal, WFlags fl):WLAN(parent, name, modal, fl){ config = new Config("wireless"); readConfig(); } @@ -100,8 +100,9 @@ bool WLANImp::writeConfig() config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); + return true; return writeWirelessOpts( ); } /** @@ -111,14 +112,8 @@ void WLANImp::accept() if ( writeConfig() ) QDialog::accept(); } -void WLANImp::done ( int r ) -{ - QDialog::done ( r ); - close ( ); -} - bool WLANImp::writeWirelessOpts( QString scheme ) { qWarning( "WLANImp::writeWirelessOpts entered." ); QString prev = "/etc/pcmcia/wireless.opts"; diff --git a/noncore/net/networksetup/wlan/wlanimp.h b/noncore/net/networksetup/wlan/wlanimp.h index 22ce143..59b7c59 100644 --- a/noncore/net/networksetup/wlan/wlanimp.h +++ b/noncore/net/networksetup/wlan/wlanimp.h @@ -8,14 +8,13 @@ class WLANImp : public WLAN { Q_OBJECT public: - WLANImp( QWidget* parent = 0, const char* name = 0); + WLANImp( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~WLANImp( ); protected: void accept(); - void done ( int r ); private: void readConfig(); bool writeConfig(); diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index 7507c54..3363b8a 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp @@ -14,8 +14,9 @@ WLANModule::WLANModule() : Module() { /** */ WLANModule::~WLANModule(){ + qDebug("Deleting module"); Interface *i; for ( i=list.first(); i != 0; i=list.next() ) delete i; } @@ -56,9 +57,9 @@ bool WLANModule::isOwner(Interface *i){ * @param tabWidget a pointer to the tab widget that this configure has. * @return QWidget* pointer to the tab widget in this modules configure. */ QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ - WLANImp *wlanconfig = new WLANImp(0, "WlanConfig"); + WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); (*tabWidget) = wlanconfig->tabWidget; return wlanconfig; } @@ -87,12 +88,8 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ info->signalProgressBar->setProgress(signal); info->noiseProgressBar->setProgress(noise); info->qualityProgressBar->setProgress(quality); info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); - //WlanInfo info (0, "wireless info", true); - //info.show(); - //return NULL; - return info; } /** diff --git a/noncore/settings/networksettings/interfacesetupimp.cpp b/noncore/settings/networksettings/interfacesetupimp.cpp index 1327726..a8731a9 100644 --- a/noncore/settings/networksettings/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfacesetupimp.cpp @@ -37,9 +37,9 @@ InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interfac void InterfaceSetupImp::accept(){ if(!saveSettings()) return; interfaces->write(); - close(true); + QDialog::accept(); } /** * Save the settings for the current Interface. diff --git a/noncore/settings/networksettings/interfacesetupimp.h b/noncore/settings/networksettings/interfacesetupimp.h index 7df0d46..a0bec32 100644 --- a/noncore/settings/networksettings/interfacesetupimp.h +++ b/noncore/settings/networksettings/interfacesetupimp.h @@ -10,9 +10,9 @@ class InterfaceSetupImp : public InterfaceSetup { Q_OBJECT public: InterfaceSetupImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = FALSE, WFlags fl = 0); - + protected slots: void accept(); public slots: diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index c86acdc..4a088cb 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp @@ -77,9 +77,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par /**
* Deconstructor. Save profiles. Delete loaded libraries.
*/
MainWindowImp::~MainWindowImp(){
- qDebug("start Saving mainwindow");
+ qDebug("Deleting main window");
// Save profiles.
Config cfg("NetworkSetup");
cfg.setGroup("General");
cfg.writeEntry("Profiles", profiles.join(" "));
@@ -89,16 +89,16 @@ MainWindowImp::~MainWindowImp(){ for( iIt = items.begin(); iIt != items.end(); ++iIt ){
if(iIt.key()->getModuleOwner() == NULL)
delete iIt.key();
}
-
+
// Delete Modules and Libraries
QMap<Module*, QLibrary*>::Iterator it;
for( it = libraries.begin(); it != libraries.end(); ++it ){
delete it.key();
- delete it.data();
+ //delete it.data();
}
- qDebug("done Saving mainwindow");
+ qDebug("Done deleting main window");
}
/**
* Load all modules that are found in the path
@@ -243,20 +243,19 @@ void MainWindowImp::configureClicked(){ QTabWidget *tabWidget = NULL;
QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget);
if(moduleConfigure != NULL){
if(tabWidget != NULL){
- InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true);
+ InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
configure->setProfile(currentProfile);
tabWidget->insertTab(configure, "TCP/IP");
-
}
moduleConfigure->showMaximized();
moduleConfigure->show();
return;
}
}
- InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true);
+ InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
configure->setProfile(currentProfile);
configure->showMaximized();
configure->show();
}
diff --git a/noncore/settings/networksettings/networksetup.pro b/noncore/settings/networksettings/networksetup.pro index f09db93..7299cc6 100644 --- a/noncore/settings/networksettings/networksetup.pro +++ b/noncore/settings/networksettings/networksetup.pro @@ -1,8 +1,8 @@ -DESTDIR = $(OPIEDIR)/bin +#DESTDIR = $(OPIEDIR)/bin TEMPLATE = app -#CONFIG = qt warn_on debug -CONFIG = qt warn_on release +CONFIG = qt warn_on debug +#CONFIG = qt warn_on release HEADERS = mainwindowimp.h addconnectionimp.h interface.h interfaceinformationimp.h interfacesetupimp.h interfaces.h defaultmodule.h kprocctrl.h module.h kprocess.h SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp interface.cpp interfaceinformationimp.cpp interfacesetupimp.cpp kprocctrl.cpp kprocess.cpp interfaces.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include diff --git a/noncore/settings/networksettings/wlan/wlan.pro b/noncore/settings/networksettings/wlan/wlan.pro index 432a096..814a0b4 100644 --- a/noncore/settings/networksettings/wlan/wlan.pro +++ b/noncore/settings/networksettings/wlan/wlan.pro @@ -1,8 +1,8 @@ TEMPLATE = lib -CONFIG += qt warn_on release -#CONFIG += qt warn_on debug -DESTDIR = $(OPIEDIR)/plugins/networksetup +#CONFIG += qt warn_on release +CONFIG += qt warn_on debug +#DESTDIR = $(OPIEDIR)/plugins/networksetup HEADERS = wlanimp.h wlanmodule.h wextensions.h SOURCES = wlanimp.cpp wlanmodule.cpp wextensions.cpp INCLUDEPATH += $(OPIEDIR)/include ../ DEPENDPATH += $(OPIEDIR)/include diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 94c7518..45952b9 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -15,9 +15,9 @@ #include <qradiobutton.h> #include <qcheckbox.h> #include <qregexp.h> -WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name, Qt::WDestructiveClose){ +WLANImp::WLANImp( QWidget* parent, const char* name, bool modal, WFlags fl):WLAN(parent, name, modal, fl){ config = new Config("wireless"); readConfig(); } @@ -100,8 +100,9 @@ bool WLANImp::writeConfig() config->writeEntry( "dot11WEPDefaultKey0", keyLineEdit0->text() ); config->writeEntry( "dot11WEPDefaultKey1", keyLineEdit1->text() ); config->writeEntry( "dot11WEPDefaultKey2", keyLineEdit2->text() ); config->writeEntry( "dot11WEPDefaultKey3", keyLineEdit3->text() ); + return true; return writeWirelessOpts( ); } /** @@ -111,14 +112,8 @@ void WLANImp::accept() if ( writeConfig() ) QDialog::accept(); } -void WLANImp::done ( int r ) -{ - QDialog::done ( r ); - close ( ); -} - bool WLANImp::writeWirelessOpts( QString scheme ) { qWarning( "WLANImp::writeWirelessOpts entered." ); QString prev = "/etc/pcmcia/wireless.opts"; diff --git a/noncore/settings/networksettings/wlan/wlanimp.h b/noncore/settings/networksettings/wlan/wlanimp.h index 22ce143..59b7c59 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.h +++ b/noncore/settings/networksettings/wlan/wlanimp.h @@ -8,14 +8,13 @@ class WLANImp : public WLAN { Q_OBJECT public: - WLANImp( QWidget* parent = 0, const char* name = 0); + WLANImp( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~WLANImp( ); protected: void accept(); - void done ( int r ); private: void readConfig(); bool writeConfig(); diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 7507c54..3363b8a 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp @@ -14,8 +14,9 @@ WLANModule::WLANModule() : Module() { /** */ WLANModule::~WLANModule(){ + qDebug("Deleting module"); Interface *i; for ( i=list.first(); i != 0; i=list.next() ) delete i; } @@ -56,9 +57,9 @@ bool WLANModule::isOwner(Interface *i){ * @param tabWidget a pointer to the tab widget that this configure has. * @return QWidget* pointer to the tab widget in this modules configure. */ QWidget *WLANModule::configure(Interface *, QTabWidget **tabWidget){ - WLANImp *wlanconfig = new WLANImp(0, "WlanConfig"); + WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", false, Qt::WDestructiveClose); (*tabWidget) = wlanconfig->tabWidget; return wlanconfig; } @@ -87,12 +88,8 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){ info->signalProgressBar->setProgress(signal); info->noiseProgressBar->setProgress(noise); info->qualityProgressBar->setProgress(quality); info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); - //WlanInfo info (0, "wireless info", true); - //info.show(); - //return NULL; - return info; } /** |