Skip to content

Commit

Permalink
Cleanup dbus interface destructions
Browse files Browse the repository at this point in the history
  • Loading branch information
rainemak committed Jun 19, 2017
1 parent 8ad283f commit 6f8d606
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions connectionagentplugin/declarativeconnectionagent.cpp
Expand Up @@ -28,7 +28,7 @@

DeclarativeConnectionAgent::DeclarativeConnectionAgent(QObject *parent):
QObject(parent),
connManagerInterface(0)
connManagerInterface(nullptr)
{
connectiondWatcher = new QDBusServiceWatcher(CONND_SERVICE,QDBusConnection::sessionBus(),
QDBusServiceWatcher::WatchForRegistration |
Expand All @@ -48,10 +48,8 @@ DeclarativeConnectionAgent::~DeclarativeConnectionAgent()

void DeclarativeConnectionAgent::connectToConnectiond(QString)
{
if (connManagerInterface) {
delete connManagerInterface;
connManagerInterface = 0;
}
connManagerInterface = nullptr;

if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(CONND_SERVICE)) {
qDebug() << Q_FUNC_INFO << QString("connection service not available").arg(CONND_SERVICE);
Expand Down Expand Up @@ -143,10 +141,8 @@ void DeclarativeConnectionAgent::onUserInputRequested(const QString &service, co

void DeclarativeConnectionAgent::connectiondUnregistered(QString)
{
if (connManagerInterface) {
delete connManagerInterface;
connManagerInterface = 0;
}
connManagerInterface = nullptr;
}

void DeclarativeConnectionAgent::startTethering(const QString &type)
Expand Down

0 comments on commit 6f8d606

Please sign in to comment.