| 51 | } |
| 52 | |
| 53 | void testDFGrab() |
| 54 | { |
| 55 | if (!showSource("qrc:/manual/textures.qml")) |
| 56 | return; |
| 57 | |
| 58 | auto remoteView = ObjectBroker::object<RemoteViewInterface *>("com.kdab.GammaRay.ObjectInspector.texture.remoteView"); |
| 59 | QVERIFY(remoteView); |
| 60 | QSignalSpy frameSpy(remoteView, &RemoteViewInterface::frameUpdated); |
| 61 | QVERIFY(frameSpy.isValid()); |
| 62 | remoteView->setViewActive(true); |
| 63 | |
| 64 | QQuickItem *textItem = nullptr; |
| 65 | foreach (auto item, view()->rootObject()->findChildren<QQuickItem *>()) { |
| 66 | if (strcmp(item->metaObject()->className(), "QQuickText") == 0) |
| 67 | textItem = item; |
| 68 | } |
| 69 | QVERIFY(textItem); |
| 70 | Probe::instance()->selectObject(textItem, QPoint()); |
| 71 | |
| 72 | QVERIFY(frameSpy.wait() || frameSpy.size() >= 1); |
| 73 | const auto last = frameSpy.size() - 1; |
| 74 | const auto frame = frameSpy.at(last).at(0).value<RemoteViewFrame>(); |
| 75 | QVERIFY(frame.viewRect().height() > 0); |
| 76 | QVERIFY(frame.viewRect().width() > 0); |
| 77 | } |
| 78 | |
| 79 | void testShaderEffectSourceGrab() |
| 80 | { |
nothing calls this directly
no test coverage detected