aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Gripsgard <marius@ubports.com>2020-08-15 00:16:05 +0200
committerMarius Gripsgard <marius@ubports.com>2020-08-15 00:16:05 +0200
commite21000a5758fa927310f4369a8cd3d06be8f9b03 (patch)
treeffad99a8dad9c1cf02061ad8013e15f9d20dd59e
parent30e3dc541966abfd2ac1436caec7cd4bebdf996e (diff)
parentb420ba136d169353204e853ccdfa2c4433a94a22 (diff)
downloadqmenumodel-e21000a5758fa927310f4369a8cd3d06be8f9b03.tar.gz
qmenumodel-e21000a5758fa927310f4369a8cd3d06be8f9b03.tar.bz2
qmenumodel-e21000a5758fa927310f4369a8cd3d06be8f9b03.zip
Merge branch 'xenial_-_patches' of https://github.com/z3ntu/qmenumodel
-rw-r--r--libqmenumodel/src/gtk/gtksimpleactionobserver.c1
-rw-r--r--tests/client/treetest.cpp8
2 files changed, 5 insertions, 4 deletions
diff --git a/libqmenumodel/src/gtk/gtksimpleactionobserver.c b/libqmenumodel/src/gtk/gtksimpleactionobserver.c
index 054b82f..14d37e0 100644
--- a/libqmenumodel/src/gtk/gtksimpleactionobserver.c
+++ b/libqmenumodel/src/gtk/gtksimpleactionobserver.c
@@ -18,6 +18,7 @@
*/
#include "gtksimpleactionobserver.h"
+#include "gtkactionobservable.h"
typedef GObjectClass GtkSimpleActionObserverClass;
diff --git a/tests/client/treetest.cpp b/tests/client/treetest.cpp
index 81399f7..3c2827b 100644
--- a/tests/client/treetest.cpp
+++ b/tests/client/treetest.cpp
@@ -75,25 +75,25 @@ private Q_SLOTS:
QCOMPARE(menu.rowCount(row3), 3);
QCOMPARE(menu.data(row3, QMenuModel::Label).toString(), QString("menu3"));
- QModelIndex row4 = row3.child(0, 0);
+ QModelIndex row4 = row3.model()->index(0, 0, row3);
QVERIFY(row4.isValid());
QCOMPARE(menu.rowCount(row4), 0);
QCOMPARE(menu.data(row4, QMenuModel::Depth).toInt(), 1);
QCOMPARE(menu.data(row4, QMenuModel::Label).toString(), QString("menu4"));
- QModelIndex row5 = row3.child(1, 0);
+ QModelIndex row5 = row3.model()->index(1, 0, row3);
QVERIFY(row5.isValid());
QCOMPARE(menu.rowCount(row5), 2);
QCOMPARE(menu.data(row5, QMenuModel::Depth).toInt(), 1);
QCOMPARE(menu.data(row5, QMenuModel::Label).toString(), QString("menu5"));
- QModelIndex row6 = row5.child(0, 0);
+ QModelIndex row6 = row5.model()->index(0, 0, row5);
QVERIFY(row6.isValid());
QCOMPARE(menu.rowCount(row6), 0);
QCOMPARE(menu.data(row6, QMenuModel::Depth).toInt(), 2);
QCOMPARE(menu.data(row6, QMenuModel::Label).toString(), QString("menu6"));
- QModelIndex row7 = row5.child(1, 0);
+ QModelIndex row7 = row5.model()->index(1, 0, row5);
QVERIFY(row7.isValid());
QCOMPARE(menu.rowCount(row7), 0);
QCOMPARE(menu.data(row7, QMenuModel::Depth).toInt(), 2);