diff options
Diffstat (limited to 'libqmenumodel')
-rw-r--r-- | libqmenumodel/src/qdbusmenumodel.cpp | 6 | ||||
-rw-r--r-- | libqmenumodel/src/qmenumodel.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libqmenumodel/src/qdbusmenumodel.cpp b/libqmenumodel/src/qdbusmenumodel.cpp index 070381f..d3369dd 100644 --- a/libqmenumodel/src/qdbusmenumodel.cpp +++ b/libqmenumodel/src/qdbusmenumodel.cpp @@ -99,9 +99,9 @@ void QDBusMenuModel::serviceVanish(GDBusConnection *) /*! \internal */ void QDBusMenuModel::serviceAppear(GDBusConnection *connection) { - GMenuModel *model = reinterpret_cast<GMenuModel*>(g_dbus_menu_model_get(connection, - busName().toUtf8().data(), - objectPath().toUtf8().data())); + GMenuModel *model = G_MENU_MODEL(g_dbus_menu_model_get(connection, + busName().toUtf8().data(), + objectPath().toUtf8().data())); setMenuModel(model); if (model == NULL) { stop(); diff --git a/libqmenumodel/src/qmenumodel.cpp b/libqmenumodel/src/qmenumodel.cpp index a45d647..3ae2e3e 100644 --- a/libqmenumodel/src/qmenumodel.cpp +++ b/libqmenumodel/src/qmenumodel.cpp @@ -68,7 +68,7 @@ void QMenuModel::setMenuModelImpl(GMenuModel *other) m_menuModel = other; if (m_menuModel) { - g_object_weak_ref(reinterpret_cast<GObject*>(m_menuModel), + g_object_weak_ref(G_OBJECT(m_menuModel), reinterpret_cast<GWeakNotify>(QMenuModel::onGMenuModelDestroyed), this); // this will trigger the menu load @@ -92,7 +92,7 @@ GMenuModel *QMenuModel::menuModel() const void QMenuModel::clearModel() { if (m_menuModel) { - g_object_weak_unref(reinterpret_cast<GObject*>(m_menuModel), + g_object_weak_unref(G_OBJECT(m_menuModel), reinterpret_cast<GWeakNotify>(QMenuModel::onGMenuModelDestroyed), this); g_signal_handler_disconnect(m_menuModel, m_signalChangedId); |