author | benmeyer <benmeyer> | 2002-09-30 14:46:34 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-09-30 14:46:34 (UTC) |
commit | d79ae2969e74b1caa8e562910715df4ffe1739b3 (patch) (unidiff) | |
tree | 1808d0d3747581ca999ec42b4bb029471a1aa199 /noncore/net | |
parent | 9965bd5c49ff2f22d640d132ac343fdec97b3fb4 (diff) | |
download | opie-d79ae2969e74b1caa8e562910715df4ffe1739b3.zip opie-d79ae2969e74b1caa8e562910715df4ffe1739b3.tar.gz opie-d79ae2969e74b1caa8e562910715df4ffe1739b3.tar.bz2 |
Fixed compiler warnings
-rw-r--r-- | noncore/net/networksetup/interface.cpp | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/interfaceinformationimp.h | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 15 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.h | 9 |
4 files changed, 21 insertions, 7 deletions
diff --git a/noncore/net/networksetup/interface.cpp b/noncore/net/networksetup/interface.cpp index b9b09ad..f6eed00 100644 --- a/noncore/net/networksetup/interface.cpp +++ b/noncore/net/networksetup/interface.cpp | |||
@@ -195,7 +195,7 @@ bool Interface::refresh(){ | |||
195 | long time = 0; | 195 | long time = 0; |
196 | // Grab the start time | 196 | // Grab the start time |
197 | // pid com state ppid pgrp session tty_nr tpgid flags | 197 | // pid com state ppid pgrp session tty_nr tpgid flags |
198 | int r = sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " | 198 | sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " |
199 | // minflt cminflt majflt cmajflt utime stime cutime cstime priority | 199 | // minflt cminflt majflt cmajflt utime stime cutime cstime priority |
200 | "%*u %*u %*u %*u %*u %*u %*d %*d %*d " | 200 | "%*u %*u %*u %*u %*u %*u %*d %*d %*d " |
201 | // nice 0 itrealvalue starttime | 201 | // nice 0 itrealvalue starttime |
diff --git a/noncore/net/networksetup/interfaceinformationimp.h b/noncore/net/networksetup/interfaceinformationimp.h index 6fc2384..c8a478e 100644 --- a/noncore/net/networksetup/interfaceinformationimp.h +++ b/noncore/net/networksetup/interfaceinformationimp.h | |||
@@ -18,9 +18,9 @@ private slots: | |||
18 | void refresh(); | 18 | void refresh(); |
19 | void restart(); | 19 | void restart(); |
20 | void advanced(); | 20 | void advanced(); |
21 | Interface *interface; | ||
22 | 21 | ||
23 | private: | 22 | private: |
23 | Interface *interface; | ||
24 | void updateInterface(); | 24 | void updateInterface(); |
25 | 25 | ||
26 | }; | 26 | }; |
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index 3c13143..ad9362f 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -2,6 +2,9 @@ | |||
2 | #include "addserviceimp.h" | 2 | #include "addserviceimp.h" |
3 | #include "interfaceinformationimp.h" | 3 | #include "interfaceinformationimp.h" |
4 | #include "interfacesetupimp.h" | 4 | #include "interfacesetupimp.h" |
5 | #include "interface.h" | ||
6 | #include "kprocess.h" | ||
7 | #include "module.h" | ||
5 | 8 | ||
6 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
7 | #include <qdir.h> | 10 | #include <qdir.h> |
@@ -50,12 +53,20 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
50 | loadModules(path); | 53 | loadModules(path); |
51 | getInterfaceList(); | 54 | getInterfaceList(); |
52 | serviceList->header()->hide(); | 55 | serviceList->header()->hide(); |
56 | |||
57 | |||
58 | Config cfg("NetworkSetup"); | ||
59 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); | ||
53 | } | 60 | } |
54 | 61 | ||
55 | /** | 62 | /** |
56 | * Deconstructor. Unload libraries and save. | 63 | * Deconstructor. Unload libraries and save profile list. |
57 | */ | 64 | */ |
58 | MainWindowImp::~MainWindowImp(){ | 65 | MainWindowImp::~MainWindowImp(){ |
66 | if(profiles.count() > 1){ | ||
67 | Config cfg("NetworkSetup"); | ||
68 | cfg.writeEntry("Profiles", profiles.join(" ")); | ||
69 | } | ||
59 | } | 70 | } |
60 | 71 | ||
61 | void MainWindowImp::loadModules(QString path){ | 72 | void MainWindowImp::loadModules(QString path){ |
@@ -252,7 +263,7 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
252 | if(macAddress == -1) | 263 | if(macAddress == -1) |
253 | macAddress = line.length(); | 264 | macAddress = line.length(); |
254 | if(hardwareName != -1) | 265 | if(hardwareName != -1) |
255 | i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11))); | 266 | i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName())); |
256 | // We have found an interface | 267 | // We have found an interface |
257 | //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1()); | 268 | //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1()); |
258 | interfaceNames.insert(i->getInterfaceName(), i); | 269 | interfaceNames.insert(i->getInterfaceName(), i); |
diff --git a/noncore/net/networksetup/mainwindowimp.h b/noncore/net/networksetup/mainwindowimp.h index 95ec2a1..0618dd2 100644 --- a/noncore/net/networksetup/mainwindowimp.h +++ b/noncore/net/networksetup/mainwindowimp.h | |||
@@ -2,12 +2,13 @@ | |||
2 | #define MAINWINOWIMP_H | 2 | #define MAINWINOWIMP_H |
3 | 3 | ||
4 | #include "mainwindow.h" | 4 | #include "mainwindow.h" |
5 | #include "module.h" | ||
6 | #include "interface.h" | ||
7 | #include "kprocess.h" | ||
8 | #include <qmap.h> | 5 | #include <qmap.h> |
6 | #include <qstringlist.h> | ||
9 | 7 | ||
8 | class Module; | ||
9 | class Interface; | ||
10 | class QLibrary; | 10 | class QLibrary; |
11 | class KProcess; | ||
11 | 12 | ||
12 | class MainWindowImp : public MainWindow { | 13 | class MainWindowImp : public MainWindow { |
13 | Q_OBJECT | 14 | Q_OBJECT |
@@ -45,6 +46,8 @@ private: | |||
45 | QMap<QListViewItem*, Interface*> interfaceItems; | 46 | QMap<QListViewItem*, Interface*> interfaceItems; |
46 | 47 | ||
47 | QMap<KProcess*, QString> threads; | 48 | QMap<KProcess*, QString> threads; |
49 | QStringList profiles; | ||
50 | |||
48 | }; | 51 | }; |
49 | 52 | ||
50 | #endif | 53 | #endif |