Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95991

Improve qtdeclarative example assets

    XMLWordPrintable

Details

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes