aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel
diff options
context:
space:
mode:
Diffstat (limited to 'libqmenumodel')
-rw-r--r--libqmenumodel/QMenuModel/plugin.cpp5
-rw-r--r--libqmenumodel/src/qdbusobject.cpp5
2 files changed, 5 insertions, 5 deletions
diff --git a/libqmenumodel/QMenuModel/plugin.cpp b/libqmenumodel/QMenuModel/plugin.cpp
index 26650eb..ee05fff 100644
--- a/libqmenumodel/QMenuModel/plugin.cpp
+++ b/libqmenumodel/QMenuModel/plugin.cpp
@@ -17,10 +17,6 @@
* Renato Araujo Oliveira Filho <renato@canonical.com>
*/
-extern "C" {
-#include <glib-object.h>
-}
-
#include "plugin.h"
#include "qmenumodel.h"
#include "qdbusmenumodel.h"
@@ -31,7 +27,6 @@ extern "C" {
void QMenuModelQmlPlugin::registerTypes(const char *uri)
{
- g_type_init();
qmlRegisterUncreatableType<QMenuModel>(uri, 0, 1, "QMenuModel",
"QMenuModel is a interface");
qmlRegisterUncreatableType<QStateAction>(uri, 0, 1, "QStateAction",
diff --git a/libqmenumodel/src/qdbusobject.cpp b/libqmenumodel/src/qdbusobject.cpp
index 63be580..ba348ad 100644
--- a/libqmenumodel/src/qdbusobject.cpp
+++ b/libqmenumodel/src/qdbusobject.cpp
@@ -17,6 +17,10 @@
* Renato Araujo Oliveira Filho <renato@canonical.com>
*/
+extern "C" {
+#include <glib-object.h>
+}
+
#include "qdbusobject.h"
#include <QDebug>
@@ -73,6 +77,7 @@ QDBusObject::QDBusObject()
m_busType(DBusEnums::None),
m_status(DBusEnums::Disconnected)
{
+ g_type_init();
qRegisterMetaType<DBusEnums::ConnectionStatus>("DBusEnums::ConnectionStatus");
}