aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/qmenumodel.cpp
diff options
context:
space:
mode:
authorNick Dedekind <nicholas.dedekind@gmail.com>2013-08-09 09:01:43 +0100
committerNick Dedekind <nicholas.dedekind@gmail.com>2013-08-09 09:01:43 +0100
commitdb47d077dcd9ee6761de828c9194d3fa2331f9ea (patch)
tree975f0986c94118a4f7903a2836689489c3653bda /libqmenumodel/src/qmenumodel.cpp
parent9be29519eb308eae8a2fafe7441324a53220726b (diff)
downloadqmenumodel-db47d077dcd9ee6761de828c9194d3fa2331f9ea.tar.gz
qmenumodel-db47d077dcd9ee6761de828c9194d3fa2331f9ea.tar.bz2
qmenumodel-db47d077dcd9ee6761de828c9194d3fa2331f9ea.zip
moved events to separate file.
Diffstat (limited to 'libqmenumodel/src/qmenumodel.cpp')
-rw-r--r--libqmenumodel/src/qmenumodel.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/libqmenumodel/src/qmenumodel.cpp b/libqmenumodel/src/qmenumodel.cpp
index 2b1397a..e77419f 100644
--- a/libqmenumodel/src/qmenumodel.cpp
+++ b/libqmenumodel/src/qmenumodel.cpp
@@ -25,11 +25,11 @@ extern "C" {
#include "qmenumodel.h"
#include "menunode.h"
#include "converter.h"
+#include "qmenumodelevents.h"
+
#include <QCoreApplication>
#include <QThread>
-const QEvent::Type MenuModelEvent::eventType = static_cast<QEvent::Type>(QEvent::registerEventType());
-
/*!
\qmltype QMenuModel
\brief The QMenuModel class implements the base list model for menus
@@ -303,19 +303,3 @@ bool QMenuModel::hasLink(MenuNode *node, int row, const QString &linkType) const
MenuNode *child = node->child(row);
return (child && (child->linkType() == linkType));
}
-
-MenuModelEvent::MenuModelEvent(GMenuModel* _model)
- : QEvent(MenuModelEvent::eventType),
- model(_model)
-{
- if (model) {
- g_object_ref(model);
- }
-}
-
-MenuModelEvent::~MenuModelEvent()
-{
- if (model) {
- g_object_unref(model);
- }
-}