aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libqmenumodel/QMenuModel/plugin.cpp5
-rw-r--r--libqmenumodel/src/qdbusobject.cpp5
-rw-r--r--tests/client/actiongrouptest.cpp5
-rw-r--r--tests/client/menuchangestest.cpp5
-rw-r--r--tests/client/modeltest.cpp5
-rw-r--r--tests/client/servicetest.cpp5
6 files changed, 5 insertions, 25 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");
}
diff --git a/tests/client/actiongrouptest.cpp b/tests/client/actiongrouptest.cpp
index 958ddc7..116bd44 100644
--- a/tests/client/actiongrouptest.cpp
+++ b/tests/client/actiongrouptest.cpp
@@ -17,10 +17,6 @@
* Renato Araujo Oliveira Filho <renato@canonical.com>
*/
-extern "C" {
-#include <glib-object.h>
-}
-
#include "qdbusmenumodel.h"
#include "qdbusactiongroup.h"
#include "dbusmenuscript.h"
@@ -42,7 +38,6 @@ private:
private Q_SLOTS:
void initTestCase()
{
- g_type_init();
Q_ASSERT(m_script.connect());
}
diff --git a/tests/client/menuchangestest.cpp b/tests/client/menuchangestest.cpp
index bc7dcbd..2015582 100644
--- a/tests/client/menuchangestest.cpp
+++ b/tests/client/menuchangestest.cpp
@@ -17,10 +17,6 @@
* Renato Araujo Oliveira Filho <renato@canonical.com>
*/
-extern "C" {
-#include <glib-object.h>
-}
-
#include "qdbusmenumodel.h"
#include "dbusmenuscript.h"
@@ -39,7 +35,6 @@ private:
private Q_SLOTS:
void initTestCase()
{
- g_type_init();
Q_ASSERT(m_script.connect());
}
diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp
index 542b38a..9f6ee76 100644
--- a/tests/client/modeltest.cpp
+++ b/tests/client/modeltest.cpp
@@ -17,10 +17,6 @@
* Renato Araujo Oliveira Filho <renato@canonical.com>
*/
-extern "C" {
-#include <glib-object.h>
-}
-
#include "qdbusmenumodel.h"
#include "dbusmenuscript.h"
@@ -39,7 +35,6 @@ private:
private Q_SLOTS:
void initTestCase()
{
- g_type_init();
Q_ASSERT(m_script.connect());
}
diff --git a/tests/client/servicetest.cpp b/tests/client/servicetest.cpp
index d34ba79..a8b0c2a 100644
--- a/tests/client/servicetest.cpp
+++ b/tests/client/servicetest.cpp
@@ -17,10 +17,6 @@
* Renato Araujo Oliveira Filho <renato@canonical.com>
*/
-extern "C" {
-#include <glib-object.h>
-}
-
#include "qdbusmenumodel.h"
#include "dbusmenuscript.h"
@@ -46,7 +42,6 @@ private:
private Q_SLOTS:
void initTestCase()
{
- g_type_init();
Q_ASSERT(m_script.connect());
}