aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);