| 92 | } |
| 93 | |
| 94 | void DebugConsoleTest::topLevelTest() |
| 95 | { |
| 96 | DebugConsoleModel model; |
| 97 | QCOMPARE(model.rowCount(QModelIndex()), 4); |
| 98 | QCOMPARE(model.columnCount(QModelIndex()), 2); |
| 99 | QFETCH(int, row); |
| 100 | QFETCH(int, column); |
| 101 | const QModelIndex index = model.index(row, column, QModelIndex()); |
| 102 | QTEST(index.isValid(), "expectedValid"); |
| 103 | if (index.isValid()) { |
| 104 | QVERIFY(!model.parent(index).isValid()); |
| 105 | QVERIFY(model.data(index, Qt::DisplayRole).isValid()); |
| 106 | QCOMPARE(model.data(index, Qt::DisplayRole).userType(), int(QMetaType::QString)); |
| 107 | for (int i = Qt::DecorationRole; i <= Qt::UserRole; i++) { |
| 108 | QVERIFY(!model.data(index, i).isValid()); |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | #if KWIN_BUILD_X11 |
| 114 | void DebugConsoleTest::testX11Window() |