-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 3 | ||||
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 1 |
4 files changed, 2 insertions, 6 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index 4a088cb..f9ca83b 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -69,44 +69,43 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
69 | currentProfileLabel->setText(line); | 69 | currentProfileLabel->setText(line); |
70 | break; | 70 | break; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | file.close(); | 73 | file.close(); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Deconstructor. Save profiles. Delete loaded libraries. | 78 | * Deconstructor. Save profiles. Delete loaded libraries. |
79 | */ | 79 | */ |
80 | MainWindowImp::~MainWindowImp(){ | 80 | MainWindowImp::~MainWindowImp(){ |
81 | qDebug("Deleting main window"); | ||
82 | // Save profiles. | 81 | // Save profiles. |
83 | Config cfg("NetworkSetup"); | 82 | Config cfg("NetworkSetup"); |
84 | cfg.setGroup("General"); | 83 | cfg.setGroup("General"); |
85 | cfg.writeEntry("Profiles", profiles.join(" ")); | 84 | cfg.writeEntry("Profiles", profiles.join(" ")); |
86 | 85 | ||
87 | // Delete all interfaces that don't have owners. | 86 | // Delete all interfaces that don't have owners. |
88 | QMap<Interface*, QListViewItem*>::Iterator iIt; | 87 | QMap<Interface*, QListViewItem*>::Iterator iIt; |
89 | for( iIt = items.begin(); iIt != items.end(); ++iIt ){ | 88 | for( iIt = items.begin(); iIt != items.end(); ++iIt ){ |
90 | if(iIt.key()->getModuleOwner() == NULL) | 89 | if(iIt.key()->getModuleOwner() == NULL) |
91 | delete iIt.key(); | 90 | delete iIt.key(); |
92 | } | 91 | } |
93 | 92 | ||
94 | // Delete Modules and Libraries | 93 | // Delete Modules and Libraries |
95 | QMap<Module*, QLibrary*>::Iterator it; | 94 | QMap<Module*, QLibrary*>::Iterator it; |
96 | for( it = libraries.begin(); it != libraries.end(); ++it ){ | 95 | for( it = libraries.begin(); it != libraries.end(); ++it ){ |
97 | delete it.key(); | 96 | delete it.key(); |
97 | // I wonder why I can't delete the libraries | ||
98 | //delete it.data(); | 98 | //delete it.data(); |
99 | } | 99 | } |
100 | qDebug("Done deleting main window"); | ||
101 | } | 100 | } |
102 | 101 | ||
103 | /** | 102 | /** |
104 | * Load all modules that are found in the path | 103 | * Load all modules that are found in the path |
105 | * @param path a directory that is scaned for any plugins that can be loaded | 104 | * @param path a directory that is scaned for any plugins that can be loaded |
106 | * and attempts to load them | 105 | * and attempts to load them |
107 | */ | 106 | */ |
108 | void MainWindowImp::loadModules(QString path){ | 107 | void MainWindowImp::loadModules(QString path){ |
109 | //qDebug(path.latin1()); | 108 | //qDebug(path.latin1()); |
110 | QDir d(path); | 109 | QDir d(path); |
111 | if(!d.exists()) | 110 | if(!d.exists()) |
112 | return; | 111 | return; |
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index 3363b8a..bf2589e 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp | |||
@@ -6,25 +6,24 @@ | |||
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qprogressbar.h> | 7 | #include <qprogressbar.h> |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * Constructor, find all of the possible interfaces | 10 | * Constructor, find all of the possible interfaces |
11 | */ | 11 | */ |
12 | WLANModule::WLANModule() : Module() { | 12 | WLANModule::WLANModule() : Module() { |
13 | } | 13 | } |
14 | 14 | ||
15 | /** | 15 | /** |
16 | */ | 16 | */ |
17 | WLANModule::~WLANModule(){ | 17 | WLANModule::~WLANModule(){ |
18 | qDebug("Deleting module"); | ||
19 | Interface *i; | 18 | Interface *i; |
20 | for ( i=list.first(); i != 0; i=list.next() ) | 19 | for ( i=list.first(); i != 0; i=list.next() ) |
21 | delete i; | 20 | delete i; |
22 | } | 21 | } |
23 | 22 | ||
24 | /** | 23 | /** |
25 | * Change the current profile | 24 | * Change the current profile |
26 | */ | 25 | */ |
27 | void WLANModule::setProfile(QString newProfile){ | 26 | void WLANModule::setProfile(QString newProfile){ |
28 | profile = newProfile; | 27 | profile = newProfile; |
29 | } | 28 | } |
30 | 29 | ||
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 4a088cb..f9ca83b 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -69,44 +69,43 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
69 | currentProfileLabel->setText(line); | 69 | currentProfileLabel->setText(line); |
70 | break; | 70 | break; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | file.close(); | 73 | file.close(); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Deconstructor. Save profiles. Delete loaded libraries. | 78 | * Deconstructor. Save profiles. Delete loaded libraries. |
79 | */ | 79 | */ |
80 | MainWindowImp::~MainWindowImp(){ | 80 | MainWindowImp::~MainWindowImp(){ |
81 | qDebug("Deleting main window"); | ||
82 | // Save profiles. | 81 | // Save profiles. |
83 | Config cfg("NetworkSetup"); | 82 | Config cfg("NetworkSetup"); |
84 | cfg.setGroup("General"); | 83 | cfg.setGroup("General"); |
85 | cfg.writeEntry("Profiles", profiles.join(" ")); | 84 | cfg.writeEntry("Profiles", profiles.join(" ")); |
86 | 85 | ||
87 | // Delete all interfaces that don't have owners. | 86 | // Delete all interfaces that don't have owners. |
88 | QMap<Interface*, QListViewItem*>::Iterator iIt; | 87 | QMap<Interface*, QListViewItem*>::Iterator iIt; |
89 | for( iIt = items.begin(); iIt != items.end(); ++iIt ){ | 88 | for( iIt = items.begin(); iIt != items.end(); ++iIt ){ |
90 | if(iIt.key()->getModuleOwner() == NULL) | 89 | if(iIt.key()->getModuleOwner() == NULL) |
91 | delete iIt.key(); | 90 | delete iIt.key(); |
92 | } | 91 | } |
93 | 92 | ||
94 | // Delete Modules and Libraries | 93 | // Delete Modules and Libraries |
95 | QMap<Module*, QLibrary*>::Iterator it; | 94 | QMap<Module*, QLibrary*>::Iterator it; |
96 | for( it = libraries.begin(); it != libraries.end(); ++it ){ | 95 | for( it = libraries.begin(); it != libraries.end(); ++it ){ |
97 | delete it.key(); | 96 | delete it.key(); |
97 | // I wonder why I can't delete the libraries | ||
98 | //delete it.data(); | 98 | //delete it.data(); |
99 | } | 99 | } |
100 | qDebug("Done deleting main window"); | ||
101 | } | 100 | } |
102 | 101 | ||
103 | /** | 102 | /** |
104 | * Load all modules that are found in the path | 103 | * Load all modules that are found in the path |
105 | * @param path a directory that is scaned for any plugins that can be loaded | 104 | * @param path a directory that is scaned for any plugins that can be loaded |
106 | * and attempts to load them | 105 | * and attempts to load them |
107 | */ | 106 | */ |
108 | void MainWindowImp::loadModules(QString path){ | 107 | void MainWindowImp::loadModules(QString path){ |
109 | //qDebug(path.latin1()); | 108 | //qDebug(path.latin1()); |
110 | QDir d(path); | 109 | QDir d(path); |
111 | if(!d.exists()) | 110 | if(!d.exists()) |
112 | return; | 111 | return; |
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 3363b8a..bf2589e 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -6,25 +6,24 @@ | |||
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qprogressbar.h> | 7 | #include <qprogressbar.h> |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * Constructor, find all of the possible interfaces | 10 | * Constructor, find all of the possible interfaces |
11 | */ | 11 | */ |
12 | WLANModule::WLANModule() : Module() { | 12 | WLANModule::WLANModule() : Module() { |
13 | } | 13 | } |
14 | 14 | ||
15 | /** | 15 | /** |
16 | */ | 16 | */ |
17 | WLANModule::~WLANModule(){ | 17 | WLANModule::~WLANModule(){ |
18 | qDebug("Deleting module"); | ||
19 | Interface *i; | 18 | Interface *i; |
20 | for ( i=list.first(); i != 0; i=list.next() ) | 19 | for ( i=list.first(); i != 0; i=list.next() ) |
21 | delete i; | 20 | delete i; |
22 | } | 21 | } |
23 | 22 | ||
24 | /** | 23 | /** |
25 | * Change the current profile | 24 | * Change the current profile |
26 | */ | 25 | */ |
27 | void WLANModule::setProfile(QString newProfile){ | 26 | void WLANModule::setProfile(QString newProfile){ |
28 | profile = newProfile; | 27 | profile = newProfile; |
29 | } | 28 | } |
30 | 29 | ||