From e0db2259cc26cab12c6f1131b82dd867c454a3ff Mon Sep 17 00:00:00 2001 From: benmeyer Date: Fri, 08 Nov 2002 16:16:11 +0000 Subject: Code Optimizations --- (limited to 'noncore/net/networksetup/wlan') diff --git a/noncore/net/networksetup/wlan/infoimp.h b/noncore/net/networksetup/wlan/infoimp.h index 5311bea..8f7f0d6 100644 --- a/noncore/net/networksetup/wlan/infoimp.h +++ b/noncore/net/networksetup/wlan/infoimp.h @@ -4,7 +4,7 @@ #include "info.h" class QTimer; -class WExtensions; +//class WExtensions; class WlanInfoImp : public WlanInfo { Q_OBJECT diff --git a/noncore/net/networksetup/wlan/wextensions.cpp b/noncore/net/networksetup/wlan/wextensions.cpp index eb6fc42..6335ebc 100644 --- a/noncore/net/networksetup/wlan/wextensions.cpp +++ b/noncore/net/networksetup/wlan/wextensions.cpp @@ -16,8 +16,7 @@ /** * Constructor. Sets hasWirelessExtensions */ -WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false){ - interface = interfaceName; +WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false), interface(interfaceName) { fd = socket( AF_INET, SOCK_DGRAM, 0 ); if(fd == -1) return; diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 689eae2..d4b4af9 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp @@ -44,7 +44,7 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W /** * Change the profile for both wireless settings and network settings. */ -void WLANImp::setProfile(QString &profile){ +void WLANImp::setProfile(const QString &profile){ interfaceSetup->setProfile(profile); parseSettingFile(); } diff --git a/noncore/net/networksetup/wlan/wlanimp.h b/noncore/net/networksetup/wlan/wlanimp.h index f88e550..df599af 100644 --- a/noncore/net/networksetup/wlan/wlanimp.h +++ b/noncore/net/networksetup/wlan/wlanimp.h @@ -13,7 +13,7 @@ class WLANImp : public WLAN { public: WLANImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = FALSE, WFlags fl = 0 ); - void setProfile(QString &profile); + void setProfile(const QString &profile); protected: void accept(); diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index b14fc0a..3979e60 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp @@ -26,7 +26,7 @@ WLANModule::~WLANModule(){ /** * Change the current profile */ -void WLANModule::setProfile(QString newProfile){ +void WLANModule::setProfile(const QString &newProfile){ profile = newProfile; } @@ -94,7 +94,7 @@ QList WLANModule::getInterfaces(){ * by possibleNewInterfaces(); * @return Interface* NULL if it was unable to be created. */ -Interface *WLANModule::addNewInterface(QString ){ +Interface *WLANModule::addNewInterface(const QString &){ // We can't add a 802.11 interface, either the hardware will be there // or it wont. return NULL; diff --git a/noncore/net/networksetup/wlan/wlanmodule.h b/noncore/net/networksetup/wlan/wlanmodule.h index a81ccff..3a54de6 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.h +++ b/noncore/net/networksetup/wlan/wlanmodule.h @@ -12,15 +12,15 @@ public: WLANModule(); ~WLANModule(); - virtual void setProfile(QString newProfile); - virtual bool isOwner(Interface *); - virtual QWidget *configure(Interface *i); - virtual QWidget *information(Interface *i); - virtual QList getInterfaces(); - virtual void possibleNewInterfaces(QMap &){}; - virtual Interface *addNewInterface(QString name); - virtual bool remove(Interface* i); - virtual QString getPixmapName(Interface* i); + void setProfile(const QString &newProfile); + bool isOwner(Interface *); + QWidget *configure(Interface *i); + QWidget *information(Interface *i); + QList getInterfaces(); + void possibleNewInterfaces(QMap &){}; + Interface *addNewInterface(const QString &name); + bool remove(Interface* i); + QString getPixmapName(Interface* i); private: QList list; -- cgit v0.9.0.2