aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-11-23 18:25:47 +0000
committerTarmac <>2012-11-23 18:25:47 +0000
commit68533d0fedf1bf3a0e6f45230e03222510dd6af6 (patch)
tree78bad3b47623221cdcaf871305f77c71462faa13 /tests
parent7cfd1a4cececa6a44aaa3c7c6b35f1886808467e (diff)
parentbdc349d16b6e88c64e6ad16513f33d71bf1a643d (diff)
downloadqmenumodel-68533d0fedf1bf3a0e6f45230e03222510dd6af6.tar.gz
qmenumodel-68533d0fedf1bf3a0e6f45230e03222510dd6af6.tar.bz2
qmenumodel-68533d0fedf1bf3a0e6f45230e03222510dd6af6.zip
Fixed QMenumodel behavior when the GMenuModel is destroyed.
Approved by Lars Uebernickel, PS Jenkins bot.
Diffstat (limited to 'tests')
-rw-r--r--tests/client/modeltest.cpp14
-rw-r--r--tests/script/menuscript.py3
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp
index 1b0ea95..8be92a6 100644
--- a/tests/client/modeltest.cpp
+++ b/tests/client/modeltest.cpp
@@ -25,6 +25,19 @@
#include <QtTest>
#include <QDebug>
+extern "C" {
+#include <gio/gio.h>
+}
+
+class TestMenuModel : public QMenuModel
+{
+public:
+ TestMenuModel(GMenuModel *other, QObject *parent=0)
+ : QMenuModel(other, parent)
+ {
+ }
+};
+
class ModelTest : public QObject
{
Q_OBJECT
@@ -247,7 +260,6 @@ private Q_SLOTS:
delete model;
}
-
};
QTEST_MAIN(ModelTest)
diff --git a/tests/script/menuscript.py b/tests/script/menuscript.py
index d30adc5..542308a 100644
--- a/tests/script/menuscript.py
+++ b/tests/script/menuscript.py
@@ -207,6 +207,9 @@ class ActionList(object):
if self._ownNameID:
Gio.bus_unown_name(self._ownNameID)
self._ownNameID = None
+
+ self._root = None
+ self._rootAction = None
self._restore()
def _onActionActivated(self, action, parameter):