add dynamic settings load

fix setTray() function
This commit is contained in:
arcan1s
2014-08-07 17:06:52 +04:00
parent 4e027ec19f
commit 516c4b5a22
12 changed files with 246 additions and 205 deletions

View File

@ -242,7 +242,7 @@ private:
/**
* @brief NetctlProfile class
*/
NetctlProfile *netctlProfile;
NetctlProfile *netctlProfile = nullptr;
/**
* @brief show debug messages
*/
@ -250,7 +250,7 @@ private:
/**
* @brief directory with interfaces. Default is "/sys/class/net/"
*/
QDir *ifaceDirectory;
QDir *ifaceDirectory = nullptr;
/**
* @brief prefered interface for WiFi. Default is ""
*/

View File

@ -95,7 +95,7 @@ private:
/**
* @brief directory which contains profiles. Default is "/etc/netctl"
*/
QDir *profileDirectory;
QDir *profileDirectory = nullptr;
/**
* @brief path to sudo command. Default is "/usr/bin/kdesu"
*/

View File

@ -129,11 +129,11 @@ private:
/**
* @brief Netctl class
*/
Netctl *netctlCommand;
Netctl *netctlCommand = nullptr;
/**
* @brief NetctlProfile class
*/
NetctlProfile *netctlProfile;
NetctlProfile *netctlProfile = nullptr;
/**
* @brief show debug messages
*/

View File

@ -78,10 +78,8 @@ Netctl::~Netctl()
{
if (debug) qDebug() << "[Netctl]" << "[~Netctl]";
if (netctlProfile != 0)
delete netctlProfile;
if (ifaceDirectory != 0)
delete ifaceDirectory;
if (netctlProfile != nullptr) delete netctlProfile;
if (ifaceDirectory != nullptr) delete ifaceDirectory;
}

View File

@ -59,8 +59,7 @@ NetctlProfile::~NetctlProfile()
{
if (debug) qDebug() << "[NetctlProfile]" << "[~NetctlProfile]";
if (profileDirectory != 0)
delete profileDirectory;
if (profileDirectory != nullptr) delete profileDirectory;
}

View File

@ -79,10 +79,8 @@ WpaSup::~WpaSup()
{
if (debug) qDebug() << "[WpaSup]" << "[~WpaSup]";
if (netctlCommand != 0)
delete netctlCommand;
if (netctlProfile != 0)
delete netctlProfile;
if (netctlCommand != nullptr) delete netctlCommand;
if (netctlProfile != nullptr) delete netctlProfile;
}