aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/qdbusobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libqmenumodel/src/qdbusobject.cpp')
-rw-r--r--libqmenumodel/src/qdbusobject.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libqmenumodel/src/qdbusobject.cpp b/libqmenumodel/src/qdbusobject.cpp
index 929aec0..5a5a14b 100644
--- a/libqmenumodel/src/qdbusobject.cpp
+++ b/libqmenumodel/src/qdbusobject.cpp
@@ -78,6 +78,7 @@ QDBusObject::QDBusObject()
m_busType(DBusEnums::None),
m_status(DBusEnums::Disconnected)
{
+ g_type_init();
qRegisterMetaType<DBusEnums::ConnectionStatus>("DBusEnums::ConnectionStatus");
}
@@ -100,7 +101,7 @@ void QDBusObject::setBusType(DBusEnums::BusType type)
if (m_status != DBusEnums::Disconnected)
disconnect();
m_busType = type;
- busTypeChanged(m_busType);
+ Q_EMIT busTypeChanged(m_busType);
}
}
@@ -115,7 +116,7 @@ void QDBusObject::setBusName(const QString &busName)
if (m_status != DBusEnums::Disconnected)
disconnect();
m_busName = busName;
- busNameChanged(m_busName);
+ Q_EMIT busNameChanged(m_busName);
}
}
@@ -130,7 +131,7 @@ void QDBusObject::setObjectPath(const QString &objectPath)
if (m_status != DBusEnums::Disconnected)
disconnect();
m_objectPath = objectPath;
- objectPathChanged(m_objectPath);
+ Q_EMIT objectPathChanged(m_objectPath);
}
}
@@ -138,7 +139,7 @@ void QDBusObject::setStatus(DBusEnums::ConnectionStatus status)
{
if (m_status != status) {
m_status = status;
- statusChanged(m_status);
+ Q_EMIT statusChanged(m_status);
}
}
@@ -180,8 +181,8 @@ void QDBusObject::onServiceAppeared(GDBusConnection *connection, const gchar *,
{
QDBusObject *self = reinterpret_cast<QDBusObject*>(data);
- self->setStatus(DBusEnums::Connected);
self->serviceAppear(connection);
+ self->setStatus(DBusEnums::Connected);
}
void QDBusObject::onServiceVanished(GDBusConnection *connection, const gchar *, gpointer data)