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

Improve qtdeclarative example assets

XMLWordPrintable

      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()
      

        1. examples.zip
          2.35 MB
          Mitch Curtis
        For Gerrit Dashboard: QTBUG-95991
        # Subject Branch Project Status CR V

            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

              Created:
              Updated:

                There are no open Gerrit changes