Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
E.g. modernise images, etc.
The following patch can be used to grab screenshots of all Qt Quick examples:
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index e9e817f745..812a0a504f 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -274,6 +274,12 @@ void tst_examples::sgexamples() component.completeCreate(); qApp->processEvents(); + + const QString safeDataTagFileName = QString::fromLatin1("%1-%2.png") + .arg(QTest::currentTestFunction()).arg(QTest::currentDataTag()).replace(QLatin1Char('/'), QLatin1Char('-')); + const QString screenshotPath = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(safeDataTagFileName); + QVERIFY2(window.grabWindow().save(screenshotPath), + qPrintable(QStringLiteral("Failed to save screenshot to ") + screenshotPath)); } void tst_examples::sgsnippets_data()
Attachments
Issue Links
- mentioned in
-
Page Loading...