| 323 | } |
| 324 | |
| 325 | void testProblemReporting() |
| 326 | { |
| 327 | // TODO using this qml-file as testcase might stop working if qt decides to be |
| 328 | // smarter with out of view items in ListViews |
| 329 | QVERIFY(showSource(QStringLiteral("qrc:/manual/quickitemcreatedestroytest.qml"))); |
| 330 | |
| 331 | QVERIFY(ProblemCollector::instance()->isCheckerRegistered("com.kdab.GammaRay.QuickItemChecker")); |
| 332 | |
| 333 | ProblemCollector::instance()->requestScan(); |
| 334 | if (!isViewExposed()) { // if the CI fails to show the window, this isn't going to succeed |
| 335 | return; |
| 336 | } |
| 337 | |
| 338 | const auto &problems = ProblemCollector::instance()->problems(); |
| 339 | QVERIFY(std::any_of(problems.begin(), problems.end(), |
| 340 | [&](const Problem &p) { |
| 341 | return p.problemId.startsWith("com.kdab.GammaRay.QuickItemChecker") |
| 342 | && !p.object.isNull() |
| 343 | && p.description.contains("out of view") |
| 344 | && p.locations.size() > 0; |
| 345 | })); |
| 346 | } |
| 347 | |
| 348 | private: |
| 349 | QAbstractItemModel *itemModel; |
nothing calls this directly
no test coverage detected