summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/networksetup/interface.cpp16
-rw-r--r--noncore/net/networksetup/interface.h4
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp3
-rw-r--r--noncore/settings/networksettings/interface.cpp16
-rw-r--r--noncore/settings/networksettings/interface.h4
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp3
6 files changed, 22 insertions, 24 deletions
diff --git a/noncore/net/networksetup/interface.cpp b/noncore/net/networksetup/interface.cpp
index 1e01da4..a84b91f 100644
--- a/noncore/net/networksetup/interface.cpp
+++ b/noncore/net/networksetup/interface.cpp
@@ -12,5 +12,5 @@
#include <stdlib.h>
-Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), status(newSatus), attached(false), hardareName("Unknown"), moduleOwner(NULL), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"), dhcp(false){
+Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), status(newSatus), attached(false), hardwareName("Unknown"), moduleOwner(NULL), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"), dhcp(false){
refresh();
}
@@ -44,5 +44,5 @@ void Interface::setAttached(bool isAttached){
*/
void Interface::setHardwareName(QString name){
- hardareName = name;
+ hardwareName = name;
emit(updateInterface(this));
};
@@ -67,5 +67,5 @@ void Interface::start(){
return;
- int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(interfaceName).latin1());
+ int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1());
// See if it was successfull...
if(ret != 0)
@@ -84,5 +84,5 @@ void Interface::stop(){
return;
- int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(interfaceName).latin1());
+ int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1());
if(ret != 0)
return;
@@ -120,6 +120,6 @@ bool Interface::refresh(){
}
- QString fileName = QString("/tmp/%1_ifconfig_info").arg(interfaceName);
- int ret = system(QString("%1 %2 > %3").arg(IFCONFIG).arg(interfaceName).arg(fileName).latin1());
+ QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name());
+ int ret = system(QString("%1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1());
if(ret != 0){
qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1());
@@ -178,5 +178,5 @@ bool Interface::refresh(){
// See if we have
- QString dhcpFile(QString(dhcpDirectory+"/dhcpcd-%1.info").arg(interfaceName));
+ QString dhcpFile(QString(dhcpDirectory+"/dhcpcd-%1.info").arg(this->name()));
// If there is no DHCP information then exit now with no errors.
if(!QFile::exists(dhcpFile)){
@@ -210,5 +210,5 @@ bool Interface::refresh(){
// Get the pid of the deamond
- dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(interfaceName));
+ dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name()));
file.setName(dhcpFile);
if (!file.open(IO_ReadOnly)){
diff --git a/noncore/net/networksetup/interface.h b/noncore/net/networksetup/interface.h
index 980171a..7943fd6 100644
--- a/noncore/net/networksetup/interface.h
+++ b/noncore/net/networksetup/interface.h
@@ -25,5 +25,5 @@ public:
virtual void setAttached(bool isAttached=false);
- virtual QString getHardwareName(){ return hardareName; };
+ virtual QString getHardwareName(){ return hardwareName; };
virtual void setHardwareName(QString name="Unknown");
@@ -52,5 +52,5 @@ private:
bool attached;
QString interfaceName;
- QString hardareName;
+ QString hardwareName;
Module *moduleOwner;
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp
index 117bac1..a446d29 100644
--- a/noncore/net/networksetup/mainwindowimp.cpp
+++ b/noncore/net/networksetup/mainwindowimp.cpp
@@ -329,7 +329,6 @@ void MainWindowImp::jobDone(KProcess *process){
// It was an interface we already had.
else{
- i = interfaceNames[interfaceName];
if(fileName != TEMP_ALL)
- i->setStatus(true);
+ (interfaceNames[interfaceName])->setStatus(true);
}
}
diff --git a/noncore/settings/networksettings/interface.cpp b/noncore/settings/networksettings/interface.cpp
index 1e01da4..a84b91f 100644
--- a/noncore/settings/networksettings/interface.cpp
+++ b/noncore/settings/networksettings/interface.cpp
@@ -12,5 +12,5 @@
#include <stdlib.h>
-Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), status(newSatus), attached(false), hardareName("Unknown"), moduleOwner(NULL), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"), dhcp(false){
+Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), status(newSatus), attached(false), hardwareName("Unknown"), moduleOwner(NULL), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"), dhcp(false){
refresh();
}
@@ -44,5 +44,5 @@ void Interface::setAttached(bool isAttached){
*/
void Interface::setHardwareName(QString name){
- hardareName = name;
+ hardwareName = name;
emit(updateInterface(this));
};
@@ -67,5 +67,5 @@ void Interface::start(){
return;
- int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(interfaceName).latin1());
+ int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1());
// See if it was successfull...
if(ret != 0)
@@ -84,5 +84,5 @@ void Interface::stop(){
return;
- int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(interfaceName).latin1());
+ int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1());
if(ret != 0)
return;
@@ -120,6 +120,6 @@ bool Interface::refresh(){
}
- QString fileName = QString("/tmp/%1_ifconfig_info").arg(interfaceName);
- int ret = system(QString("%1 %2 > %3").arg(IFCONFIG).arg(interfaceName).arg(fileName).latin1());
+ QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name());
+ int ret = system(QString("%1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1());
if(ret != 0){
qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1());
@@ -178,5 +178,5 @@ bool Interface::refresh(){
// See if we have
- QString dhcpFile(QString(dhcpDirectory+"/dhcpcd-%1.info").arg(interfaceName));
+ QString dhcpFile(QString(dhcpDirectory+"/dhcpcd-%1.info").arg(this->name()));
// If there is no DHCP information then exit now with no errors.
if(!QFile::exists(dhcpFile)){
@@ -210,5 +210,5 @@ bool Interface::refresh(){
// Get the pid of the deamond
- dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(interfaceName));
+ dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name()));
file.setName(dhcpFile);
if (!file.open(IO_ReadOnly)){
diff --git a/noncore/settings/networksettings/interface.h b/noncore/settings/networksettings/interface.h
index 980171a..7943fd6 100644
--- a/noncore/settings/networksettings/interface.h
+++ b/noncore/settings/networksettings/interface.h
@@ -25,5 +25,5 @@ public:
virtual void setAttached(bool isAttached=false);
- virtual QString getHardwareName(){ return hardareName; };
+ virtual QString getHardwareName(){ return hardwareName; };
virtual void setHardwareName(QString name="Unknown");
@@ -52,5 +52,5 @@ private:
bool attached;
QString interfaceName;
- QString hardareName;
+ QString hardwareName;
Module *moduleOwner;
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 117bac1..a446d29 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -329,7 +329,6 @@ void MainWindowImp::jobDone(KProcess *process){
// It was an interface we already had.
else{
- i = interfaceNames[interfaceName];
if(fileName != TEMP_ALL)
- i->setStatus(true);
+ (interfaceNames[interfaceName])->setStatus(true);
}
}