summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2016-06-12 06:23:32 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-06-12 06:24:13 (GMT)
commite924f463845c7a2afb06f63f70785b4e0a7eb582 (patch)
tree40fa7146ce9e8fa11f7c4aff53d89b22e4d99953
parentce73e76861579826d2dc1f132fe548ffe1d1ff7d (diff)
let Qt handle QNetworkConfigurationManager deletion
-rw-r--r--keysmanager.cpp7
-rw-r--r--keysmanager.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/keysmanager.cpp b/keysmanager.cpp
index 7b7c234..46ed77e 100644
--- a/keysmanager.cpp
+++ b/keysmanager.cpp
@@ -466,10 +466,10 @@ KeysManager::KeysManager(QWidget *parent)
connect(this, SIGNAL(fontChanged(QFont)), s_kgpgEditor, SLOT(slotSetFont(QFont)));
- m_netnote = new QNetworkConfigurationManager;
- connect(m_netnote, &QNetworkConfigurationManager::onlineStateChanged, this, &KeysManager::toggleNetworkActions);
+ QNetworkConfigurationManager *netmgr = new QNetworkConfigurationManager(this);
+ connect(netmgr, &QNetworkConfigurationManager::onlineStateChanged, this, &KeysManager::toggleNetworkActions);
- toggleNetworkActions(m_netnote->isOnline());
+ toggleNetworkActions(netmgr->isOnline());
importSignatureKey->setEnabled(false);
stateChanged("empty_list");
@@ -479,7 +479,6 @@ KeysManager::KeysManager(QWidget *parent)
KeysManager::~KeysManager()
{
- delete m_netnote;
}
void KeysManager::slotGenerateKey()
diff --git a/keysmanager.h b/keysmanager.h
index 79e27c8..6a76002 100644
--- a/keysmanager.h
+++ b/keysmanager.h
@@ -37,7 +37,6 @@ class QAction;
class QEvent;
class QKeySequence;
class QLineEdit;
-class QNetworkConfigurationManager;
class QMenu;
class KeyServer;
@@ -291,7 +290,6 @@ private:
// react to network status changes
bool m_online;
- QNetworkConfigurationManager *m_netnote;
void toggleNetworkActions(bool online);
KStatusNotifierItem *m_trayicon;