Use categories for Tutorials page

Instead of adding the category into the title with "Help: ..." etc, use
the actual categorized view that we already use for examples and
marketplace. Set the corresponding meta data in the manifest file and
read it also for tutorials.

Change-Id: Id9081518c1c0afee8d080af3ca8a5dca5cdde775
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Eike Ziller
2023-07-13 16:23:53 +02:00
parent ed35f78197
commit c43a2ee1c4
5 changed files with 251 additions and 77 deletions

View File

@@ -325,6 +325,21 @@ static bool isValidExampleOrDemo(ExampleItem *item)
return ok || debugExamples();
}
// ordered list of "known" categories
// TODO this should be defined in the manifest
Q_GLOBAL_STATIC_WITH_ARGS(QStringList,
defaultOrder,
{QStringList() << "Application Examples"
<< "Desktop"
<< "Mobile"
<< "Embedded"
<< "Graphics"
<< "Input/Output"
<< "Connectivity"
<< "Networking"
<< "Positioning & Location"
<< "Internationalization"});
void ExamplesViewController::updateExamples()
{
QString examplesInstallPath;
@@ -366,9 +381,10 @@ void ExamplesViewController::updateExamples()
}
}
const bool sortIntoCategories = qtVersion >= *minQtVersionForCategories;
const bool sortIntoCategories = !m_isExamples || qtVersion >= *minQtVersionForCategories;
const QStringList order = m_isExamples ? *defaultOrder : QStringList();
const QList<std::pair<Section, QList<ExampleItem *>>> sections
= getCategories(items, sortIntoCategories);
= getCategories(items, sortIntoCategories, order, m_isExamples);
for (int i = 0; i < sections.size(); ++i) {
m_view->addSection(sections.at(i).first,
static_container_cast<ListItem *>(sections.at(i).second));

View File

@@ -215,7 +215,8 @@ static QList<ExampleItem *> parseTutorials(QXmlStreamReader *reader, const FileP
QXmlStreamAttributes attributes = reader->attributes();
item->name = attributes.value(QLatin1String("name")).toString();
const QString projectPath = attributes.value(QLatin1String("projectPath")).toString();
item->projectPath = projectsOffset / projectPath;
item->projectPath = projectPath.isEmpty() ? FilePath()
: projectsOffset / projectPath;
item->hasSourceCode = !projectPath.isEmpty();
item->imageUrl = Utils::StyleHelper::dpiSpecificImageFile(
attributes.value(QLatin1String("imageUrl")).toString());
@@ -239,6 +240,8 @@ static QList<ExampleItem *> parseTutorials(QXmlStreamReader *reader, const FileP
} else if (reader->name() == QLatin1String("tags")) {
item->tags = reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement)
.split(QLatin1Char(','));
} else if (reader->name() == QLatin1String("meta")) {
item->metaData = parseMeta(reader);
}
break;
case QXmlStreamReader::EndElement:
@@ -301,21 +304,6 @@ expected_str<QList<ExampleItem *>> parseExamples(const QByteArray &manifestData,
return items;
}
// ordered list of "known" categories
// TODO this should be defined in the manifest
Q_GLOBAL_STATIC_WITH_ARGS(QList<QString>,
defaultOrder,
{QStringList() << "Application Examples"
<< "Desktop"
<< "Mobile"
<< "Embedded"
<< "Graphics"
<< "Input/Output"
<< "Connectivity"
<< "Networking"
<< "Positioning & Location"
<< "Internationalization"});
static bool sortByHighlightedAndName(ExampleItem *first, ExampleItem *second)
{
if (first->isHighlighted && !second->isHighlighted)
@@ -326,7 +314,9 @@ static bool sortByHighlightedAndName(ExampleItem *first, ExampleItem *second)
}
QList<std::pair<Core::Section, QList<ExampleItem *>>> getCategories(const QList<ExampleItem *> &items,
bool sortIntoCategories)
bool sortIntoCategories,
const QStringList &defaultOrder,
bool restrictRows)
{
static const QString otherDisplayName = Tr::tr("Other", "Category for all other examples");
const bool useCategories = sortIntoCategories
@@ -365,14 +355,17 @@ QList<std::pair<Core::Section, QList<ExampleItem *>>> getCategories(const QList<
} else {
// All original items have been copied into a category or other, delete.
qDeleteAll(items);
static const int defaultOrderSize = defaultOrder->size();
static const int defaultOrderSize = defaultOrder.size();
int index = 0;
const auto end = categoryMap.constKeyValueEnd();
for (auto it = categoryMap.constKeyValueBegin(); it != end; ++it) {
// order "known" categories as wanted, others come afterwards
const int defaultIndex = defaultOrder->indexOf(it->first);
const int defaultIndex = defaultOrder.indexOf(it->first);
const int priority = defaultIndex >= 0 ? defaultIndex : (index + defaultOrderSize);
categories.append({{it->first, priority, /*maxRows=*/index == 0 ? 2 : 1}, it->second});
const std::optional<int> maxRows = restrictRows
? std::make_optional<int>(index == 0 ? 2 : 1)
: std::nullopt;
categories.append({{it->first, priority, maxRows}, it->second});
++index;
}
if (!other.isEmpty())

View File

@@ -45,7 +45,10 @@ QTSUPPORT_TEST_EXPORT Utils::expected_str<QList<ExampleItem *>> parseExamples(
bool examples);
QTSUPPORT_TEST_EXPORT QList<std::pair<Core::Section, QList<ExampleItem *>>> getCategories(
const QList<ExampleItem *> &items, bool sortIntoCategories);
const QList<ExampleItem *> &items,
bool sortIntoCategories,
const QStringList &defaultOrder,
bool restrictRows);
} // namespace QtSupport::Internal

View File

@@ -1,196 +1,337 @@
<?xml version="1.0" encoding="utf-8"?>
<instructionals module="Qt">
<tutorials>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/creator-build-example-application.html" projectPath="" name="Help: Building and Running an Example">
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/creator-build-example-application.html" projectPath="" name="Building and Running an Example">
<description><![CDATA[Testing that your installation is successful by opening an existing example application project.]]></description>
<tags>qt creator,build,compile,help</tags>
<meta>
<entry name="category">Help</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/creator-writing-program.html" projectPath="" name="Help: Creating a Qt Widget-Based Application">
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/creator-writing-program.html" projectPath="" name="Creating a Qt Widget-Based Application">
<description><![CDATA[Using Qt Creator to create a small Qt application, Text Finder.]]></description>
<tags>qt creator,qt designer,widgets,c++,text,help</tags>
<meta>
<entry name="category">Help</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtwidgets/qtwidgets-tutorials-notepad-example.html" projectPath="" name="Help: Getting Started Programming with Qt Widgets">
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtwidgets/qtwidgets-tutorials-notepad-example.html" projectPath="" name="Getting Started Programming with Qt Widgets">
<description><![CDATA[Developing Qt applications using C++ and the Qt Widgets module.]]></description>
<tags>qt,qt creator,qt designer,widgets,c++,help</tags>
<meta>
<entry name="category">Help</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/qtcreator-transitions-example.html" projectPath="" name="Help: Creating a Qt Quick Application">
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/qtcreator-transitions-example.html" projectPath="" name="Creating a Qt Quick Application">
<description><![CDATA[Using basic QML types and learning about basic concepts of Qt Quick.]]></description>
<tags>qt creator,qt quick,qml,states,transitions,help</tags>
<meta>
<entry name="category">Help</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/qtcreator-accelbubble-example.html" projectPath="" name="Help: Creating a Mobile Qt Application">
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/qtcreator-accelbubble-example.html" projectPath="" name="Creating a Mobile Qt Application">
<description><![CDATA[Developing Qt Quick applications for Android and iOS devices.]]></description>
<tags>qt creator,qml,android,ios,controls,help</tags>
<meta>
<entry name="category">Help</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtdoc/qtdoc-tutorials-alarms-example.html" projectPath="" name="Help: Getting Started Programming with Qt Quick">
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtdoc/qtdoc-tutorials-alarms-example.html" projectPath="" name="Getting Started Programming with Qt Quick">
<description><![CDATA[Developing Qt Quick applications using Qt Quick and Qt Quick Controls.]]></description>
<tags>qt quick,controls,tumbler,help</tags>
<meta>
<entry name="category">Help</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubehOx3dod5-1A.webp" difficulty="" projectPath="" name="Learning: Qt Creator - UI Tour and the Welcome screen" isVideo="true" videoUrl="https://www.youtube.com/watch?v=hOx3dod5-1A" videoLength="3:21">
<tutorial imageUrl=":qtsupport/images/icons/youtubehOx3dod5-1A.webp" difficulty="" projectPath="" name="Qt Creator - UI Tour and the Welcome screen" isVideo="true" videoUrl="https://www.youtube.com/watch?v=hOx3dod5-1A" videoLength="3:21">
<description><![CDATA[The parts of the Qt Creator UI and the Welcome mode.]]></description>
<tags>qt creator,learning,ui,welcome,2023</tags>
<meta>
<entry name="category">Learning</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeFTSvDmcAgPI.webp" difficulty="" projectPath="" name="Learning: Qt Creator - Create a new project" isVideo="true" videoUrl="https://www.youtube.com/watch?v=FTSvDmcAgPI" videoLength="3:21">
<tutorial imageUrl=":qtsupport/images/icons/youtubeFTSvDmcAgPI.webp" difficulty="" projectPath="" name="Qt Creator - Create a new project" isVideo="true" videoUrl="https://www.youtube.com/watch?v=FTSvDmcAgPI" videoLength="3:21">
<description><![CDATA[Creating a Qt Widgets application project.]]></description>
<tags>qt creator,learning,projects,qt widgets,2023</tags>
<meta>
<entry name="category">Learning</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeLnVjI0I7cKs.webp" difficulty="" projectPath="" name="Learning: Qt Creator - Design and Edit Modes" isVideo="true" videoUrl="https://www.youtube.com/watch?v=LnVjI0I7cKs" videoLength="4:34">
<tutorial imageUrl=":qtsupport/images/icons/youtubeLnVjI0I7cKs.webp" difficulty="" projectPath="" name="Qt Creator - Design and Edit Modes" isVideo="true" videoUrl="https://www.youtube.com/watch?v=LnVjI0I7cKs" videoLength="4:34">
<description><![CDATA[Developing a Qt Widgets application.]]></description>
<tags>qt creator,learning,qt designer,coding,2023</tags>
<meta>
<entry name="category">Learning</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeEhJ1eV_6RH8.webp" difficulty="" projectPath="" name="Learning: Qt Creator - Debugging" isVideo="true" videoUrl="https://www.youtube.com/watch?v=EhJ1eV_6RH8" videoLength="3:22">
<tutorial imageUrl=":qtsupport/images/icons/youtubeEhJ1eV_6RH8.webp" difficulty="" projectPath="" name="Qt Creator - Debugging" isVideo="true" videoUrl="https://www.youtube.com/watch?v=EhJ1eV_6RH8" videoLength="3:22">
<description><![CDATA[Debugging a Qt Widgets application.]]></description>
<tags>qt creator,learning,debugging,2023</tags>
<meta>
<entry name="category">Learning</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube1tSpq5OLkYI.webp" difficulty="" projectPath="" name="Online: How to set up and deploy an application using Qt for Device Creation" isVideo="true" videoUrl="https://youtu.be/1tSpq5OLkYI" videoLength="5:48">
<tutorial imageUrl=":qtsupport/images/icons/youtube1tSpq5OLkYI.webp" difficulty="" projectPath="" name="How to set up and deploy an application using Qt for Device Creation" isVideo="true" videoUrl="https://youtu.be/1tSpq5OLkYI" videoLength="5:48">
<description><![CDATA[Using Qt Creator to deploy applications to an embedded device.]]></description>
<tags>qt creator,embedded,device creation,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube9xqhq9nDiOg.webp" difficulty="" projectPath="" name="Online: Qt SCXML and State Machine Tooling in Qt Creator" isVideo="true" videoUrl="https://youtu.be/9xqhq9nDiOg" videoLength="4:53">
<tutorial imageUrl=":qtsupport/images/icons/youtube9xqhq9nDiOg.webp" difficulty="" projectPath="" name="Qt SCXML and State Machine Tooling in Qt Creator" isVideo="true" videoUrl="https://youtu.be/9xqhq9nDiOg" videoLength="4:53">
<description><![CDATA[Creating state machines.]]></description>
<tags>qt creator,SCXML,video</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube9BcAYDlpuT8.webp" difficulty="" projectPath="" name="Online: Using C++ Models in QML - To-do List" isVideo="true" videoUrl="https://www.youtube.com/watch?v=9BcAYDlpuT8" videoLength="49:48">
<tutorial imageUrl=":qtsupport/images/icons/youtube9BcAYDlpuT8.webp" difficulty="" projectPath="" name="Using C++ Models in QML - To-do List" isVideo="true" videoUrl="https://www.youtube.com/watch?v=9BcAYDlpuT8" videoLength="49:48">
<description><![CDATA[Creating and using a C++ model in QML.]]></description>
<tags>qt creator,qt quick,c++,video</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubezAqSiIGdj8M.webp" difficulty="" projectPath="" name="Online: Qt Creator - Meet Qt Creator" isVideo="true" videoUrl="https://youtu.be/zAqSiIGdj8M" videoLength="2:06">
<tutorial imageUrl=":qtsupport/images/icons/youtubezAqSiIGdj8M.webp" difficulty="" projectPath="" name="Qt Creator - Meet Qt Creator" isVideo="true" videoUrl="https://youtu.be/zAqSiIGdj8M" videoLength="2:06">
<description><![CDATA[Overview of Qt Creator.]]></description>
<tags>qt creator,video</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeR6zWLfHIYJw.webp" difficulty="" projectPath="" name="Online: Qt Creator - Examples" isVideo="true" videoUrl="https://www.youtube.com/watch?v=R6zWLfHIYJw" videoLength="9:29">
<tutorial imageUrl=":qtsupport/images/icons/youtubeR6zWLfHIYJw.webp" difficulty="" projectPath="" name="Qt Creator - Examples" isVideo="true" videoUrl="https://www.youtube.com/watch?v=R6zWLfHIYJw" videoLength="9:29">
<description><![CDATA[Using Qt Creator tutorials and examples to develop Qt applications.]]></description>
<tags>qt creator,video,2018</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeuuhmSZxK1mk.webp" difficulty="" projectPath="" name="Online: Qt Creator - Introduction to Qt Quick Controls" isVideo="true" videoUrl="https://www.youtube.com/watch?v=uuhmSZxK1mk" videoLength="7:09">
<tutorial imageUrl=":qtsupport/images/icons/youtubeuuhmSZxK1mk.webp" difficulty="" projectPath="" name="Qt Creator - Introduction to Qt Quick Controls" isVideo="true" videoUrl="https://www.youtube.com/watch?v=uuhmSZxK1mk" videoLength="7:09">
<description><![CDATA[Using Qt Quick Controls to develop Qt Quick applications.]]></description>
<tags>qt creator,qt quick,controls,video,2018</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeY-MM-9FigTc.webp" difficulty="" projectPath="" name="Online: Debugging inside Qt Creator" isVideo="true" videoUrl="https://youtu.be/Y-MM-9FigTc" videoLength="21:54">
<tutorial imageUrl=":qtsupport/images/icons/youtubeY-MM-9FigTc.webp" difficulty="" projectPath="" name="Debugging inside Qt Creator" isVideo="true" videoUrl="https://youtu.be/Y-MM-9FigTc" videoLength="21:54">
<description><![CDATA[Debugging applications in Qt Creator.]]></description>
<tags>qt creator,debugging,2021</tags>
<tags>qt creator,debugging,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubexNIz78IPBu0.webp" difficulty="" projectPath="" name="Online: How to do translations with Qt Linguist" isVideo="true" videoUrl="https://youtu.be/xNIz78IPBu0" videoLength="9:14">
<tutorial imageUrl=":qtsupport/images/icons/youtubexNIz78IPBu0.webp" difficulty="" projectPath="" name="How to do translations with Qt Linguist" isVideo="true" videoUrl="https://youtu.be/xNIz78IPBu0" videoLength="9:14">
<description><![CDATA[Preparing applications for translation, translating them with Qt Linguist, and using the translations in apps.]]></description>
<tags>qt creator,qt linguist,translation,2021</tags>
<tags>qt creator,qt linguist,translation,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube-xhiVA0P4yk.webp" difficulty="" projectPath="" name="Online: Qt Windows Online Installer walkthrough" isVideo="true" videoUrl="https://youtu.be/-xhiVA0P4yk" videoLength="6:17">
<tutorial imageUrl=":qtsupport/images/icons/youtube-xhiVA0P4yk.webp" difficulty="" projectPath="" name="Qt Windows Online Installer walkthrough" isVideo="true" videoUrl="https://youtu.be/-xhiVA0P4yk" videoLength="6:17">
<description><![CDATA[Downloading and installing Qt with the options that you want.]]></description>
<tags>qt,installation,online installer,modules,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeYJfFwDBOvqk.webp" difficulty="" projectPath="" name="Online: How to install and set up Qt for Device Creation on Linux" isVideo="true" videoUrl="https://youtu.be/YJfFwDBOvqk" videoLength="6:52">
<tutorial imageUrl=":qtsupport/images/icons/youtubeYJfFwDBOvqk.webp" difficulty="" projectPath="" name="How to install and set up Qt for Device Creation on Linux" isVideo="true" videoUrl="https://youtu.be/YJfFwDBOvqk" videoLength="6:52">
<description><![CDATA[Downloading and installing Qt Device Creation with the options that you want.]]></description>
<tags>embedded,installation,device creation,2021</tags>
<tags>embedded,installation,device creation,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubejbx3Oq1Q4gY.webp" difficulty="" projectPath="" name="Online: Creating a simple widget app" isVideo="true" videoUrl="https://youtu.be/jbx3Oq1Q4gY" videoLength="6:08">
<tutorial imageUrl=":qtsupport/images/icons/youtubejbx3Oq1Q4gY.webp" difficulty="" projectPath="" name="Creating a simple widget app" isVideo="true" videoUrl="https://youtu.be/jbx3Oq1Q4gY" videoLength="6:08">
<description><![CDATA[Creating a simple widget-based application and running it on your development machine using Qt Creator 5.0.]]></description>
<tags>qt creator,widgets,2021</tags>
<tags>qt creator,widgets,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube2RvhhEAZQxM.webp" difficulty="" projectPath="" name="Online: Qt Widgets or Qt Quick" isVideo="true" videoUrl="https://youtu.be/2RvhhEAZQxM" videoLength="5:00">
<tutorial imageUrl=":qtsupport/images/icons/youtube2RvhhEAZQxM.webp" difficulty="" projectPath="" name="Qt Widgets or Qt Quick" isVideo="true" videoUrl="https://youtu.be/2RvhhEAZQxM" videoLength="5:00">
<description><![CDATA[Learning the differences between Qt Widgets and Qt Quick and making the right choice for your application needs.]]></description>
<tags>qt quick,widgets,ui,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeDRFz0Tll4G8.webp" difficulty="" projectPath="" name="Online: How to install and set up Qt for MCUs" isVideo="true" videoUrl="https://youtu.be/DRFz0Tll4G8" videoLength="8:29">
<tutorial imageUrl=":qtsupport/images/icons/youtubeDRFz0Tll4G8.webp" difficulty="" projectPath="" name="How to install and set up Qt for MCUs" isVideo="true" videoUrl="https://youtu.be/DRFz0Tll4G8" videoLength="8:29">
<description><![CDATA[Downloading and installing Qt for MCUs with the options that you want.]]></description>
<tags>qt,mcus,video,STM32H750B-DISCOVERY,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeBkgjJfxYN20.webp" difficulty="" projectPath="" name="Online: How to build your first 'Qt for MCUs' application" isVideo="true" videoUrl="https://youtu.be/BkgjJfxYN20" videoLength="21:54">
<tutorial imageUrl=":qtsupport/images/icons/youtubeBkgjJfxYN20.webp" difficulty="" projectPath="" name="How to build your first 'Qt for MCUs' application" isVideo="true" videoUrl="https://youtu.be/BkgjJfxYN20" videoLength="21:54">
<description><![CDATA[Building your first application for the NXP IMXRT1050 device.]]></description>
<tags>qtformcus,mcus,qt,video,NXP IMXRT1050-EVKB,2020</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubemn-JmXIMCqk.webp" difficulty="" projectPath="" name="Online: How to create a simple application with Qt for MCUs" isVideo="true" videoUrl="https://youtu.be/mn-JmXIMCqk" videoLength="5:16">
<tutorial imageUrl=":qtsupport/images/icons/youtubemn-JmXIMCqk.webp" difficulty="" projectPath="" name="How to create a simple application with Qt for MCUs" isVideo="true" videoUrl="https://youtu.be/mn-JmXIMCqk" videoLength="5:16">
<description><![CDATA[Creating a simple Qt for MCUs application and running it on your development machine using Qt Creator 5.0.]]></description>
<tags>qtformcus,mcus,qt,video,2021</tags>
<meta>
<entry name="category">Online</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeKo3DuCgFamo.webp" difficulty="" projectPath="" name="Talk: Custom Qt Creator Wizards" isVideo="true" videoUrl="https://www.youtube.com/watch?v=Ko3DuCgFamo" videoLength="27:21">
<tutorial imageUrl=":qtsupport/images/icons/youtubeKo3DuCgFamo.webp" difficulty="" projectPath="" name="Custom Qt Creator Wizards" isVideo="true" videoUrl="https://www.youtube.com/watch?v=Ko3DuCgFamo" videoLength="27:21">
<description><![CDATA[Adding custom file and project creation wizards to Qt Creator.]]></description>
<tags>qt creator,wizard,talk,2015</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeDP0lMoLVneY.webp" difficulty="" projectPath="" name="Talk: Extending Qt Creator" isVideo="true" videoUrl="http://www.youtube.com/watch?v=DP0lMoLVneY" videoLength="59:49">
<tutorial imageUrl=":qtsupport/images/icons/youtubeDP0lMoLVneY.webp" difficulty="" projectPath="" name="Extending Qt Creator" isVideo="true" videoUrl="http://www.youtube.com/watch?v=DP0lMoLVneY" videoLength="59:49">
<description><![CDATA[Customizing Qt Creator to fit your own or your customers' purposes.]]></description>
<tags>qt creator,configuration,talk,2013</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubePzV2MYRAUYQ.webp" difficulty="" projectPath="" name="Talk: How to create a plugin for Qt Creator" isVideo="true" videoUrl="https://youtu.be/PzV2MYRAUYQ" videoLength="55:37">
<tutorial imageUrl=":qtsupport/images/icons/youtubePzV2MYRAUYQ.webp" difficulty="" projectPath="" name="How to create a plugin for Qt Creator" isVideo="true" videoUrl="https://youtu.be/PzV2MYRAUYQ" videoLength="55:37">
<description><![CDATA[Adding plugins to Qt Creator.]]></description>
<tags>qt creator,plugins,talk,2019</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeTiJiF0MOOFc.webp" difficulty="" projectPath="" name="Talk: Qt Creator - Using the QML Profiler" isVideo="true" videoUrl="https://www.youtube.com/watch?v=TiJiF0MOOFc" videoLength="55:12">
<tutorial imageUrl=":qtsupport/images/icons/youtubeTiJiF0MOOFc.webp" difficulty="" projectPath="" name="Qt Creator - Using the QML Profiler" isVideo="true" videoUrl="https://www.youtube.com/watch?v=TiJiF0MOOFc" videoLength="55:12">
<description><![CDATA[Monitoring the performance of a Qt Quick application.]]></description>
<tags>qt quick,qt creator,qml profiler,talk,2014</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeG0AbgVHGdXI.webp" difficulty="" projectPath="" name="Talk: The CPU Usage Analyzer for Device Creation" isVideo="true" videoUrl="https://www.youtube.com/watch?v=G0AbgVHGdXI" videoLength="22:30">
<tutorial imageUrl=":qtsupport/images/icons/youtubeG0AbgVHGdXI.webp" difficulty="" projectPath="" name="The CPU Usage Analyzer for Device Creation" isVideo="true" videoUrl="https://www.youtube.com/watch?v=G0AbgVHGdXI" videoLength="22:30">
<description><![CDATA[Using the Linux perf tool to generate data for code analysis.]]></description>
<tags>qt creator,cpu usage analyzer,perf,embedded,device creation,talk,2015</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeX0kEkB0ewyw.webp" difficulty="" projectPath="" name="Talk: Qt SCXML - State Machines Made Easier" isVideo="true" videoUrl="https://youtu.be/X0kEkB0ewyw" videoLength="42:22">
<tutorial imageUrl=":qtsupport/images/icons/youtubeX0kEkB0ewyw.webp" difficulty="" projectPath="" name="Qt SCXML - State Machines Made Easier" isVideo="true" videoUrl="https://youtu.be/X0kEkB0ewyw" videoLength="42:22">
<description><![CDATA[Using the Qt SCXML module and Qt Creator SCXML editor.]]></description>
<tags>qt creator,scxml,talk,2016</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubev4glCQt2jE0.webp" difficulty="" projectPath="" name="Talk: Effective Multi-Platform Development with Qt Creator, QBS, and QEMU" isVideo="true" videoUrl="https://www.youtube.com/watch?v=v4glCQt2jE0" videoLength="19:08">
<tutorial imageUrl=":qtsupport/images/icons/youtubev4glCQt2jE0.webp" difficulty="" projectPath="" name="Effective Multi-Platform Development with Qt Creator, QBS, and QEMU" isVideo="true" videoUrl="https://www.youtube.com/watch?v=v4glCQt2jE0" videoLength="19:08">
<description><![CDATA[Using Qt Creator, Qbs, and QEMU for application development.]]></description>
<tags>qt creator,qbs,qemu,talk,2015</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeT_13aX5NTPk.webp" difficulty="" projectPath="" name="Talk: Qt for iOS - A to Z" isVideo="true" videoUrl="https://youtu.be/T_13aX5NTPk" videoLength="1:00:13">
<tutorial imageUrl=":qtsupport/images/icons/youtubeT_13aX5NTPk.webp" difficulty="" projectPath="" name="Qt for iOS - A to Z" isVideo="true" videoUrl="https://youtu.be/T_13aX5NTPk" videoLength="1:00:13">
<description><![CDATA[Developing Qt applications for iOS.]]></description>
<tags>qt creator,ios,talk,2016</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubehrKz63Q_Rf0.webp" difficulty="" projectPath="" name="Talk: Qt Creator for Bare Metal Development" isVideo="true" videoUrl="http://www.youtube.com/watch?v=hrKz63Q_Rf0" videoLength="9:35">
<tutorial imageUrl=":qtsupport/images/icons/youtubehrKz63Q_Rf0.webp" difficulty="" projectPath="" name="Qt Creator for Bare Metal Development" isVideo="true" videoUrl="http://www.youtube.com/watch?v=hrKz63Q_Rf0" videoLength="9:35">
<description><![CDATA[Developing Qt Applications for Bare Metal devices.]]></description>
<tags>qt creator,baremetal,talk,2013</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeWIRRoPxIerc.webp" difficulty="" projectPath="" name="Talk: The Curse of Choice - An Overview of GUI Technologies in Qt" isVideo="true" videoUrl="https://youtu.be/WIRRoPxIerc" videoLength="40:45">
<tutorial imageUrl=":qtsupport/images/icons/youtubeWIRRoPxIerc.webp" difficulty="" projectPath="" name="The Curse of Choice - An Overview of GUI Technologies in Qt" isVideo="true" videoUrl="https://youtu.be/WIRRoPxIerc" videoLength="40:45">
<description><![CDATA[Overview of UI technologies that can be used with Qt.]]></description>
<tags>qt quick,ui,widgets,talk,2016</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubesRihJdZFuCg.webp" difficulty="" projectPath="" name="Talk: Code Once Deploy Everywhere: How Qt is ideal for cross-platform development" isVideo="true" videoUrl="https://youtu.be/sRihJdZFuCg" videoLength="42:37">
<tutorial imageUrl=":qtsupport/images/icons/youtubesRihJdZFuCg.webp" difficulty="" projectPath="" name="Code Once Deploy Everywhere: How Qt is ideal for cross-platform development" isVideo="true" videoUrl="https://youtu.be/sRihJdZFuCg" videoLength="42:37">
<description><![CDATA[Using Qt Creator for cross-platform development.]]></description>
<tags>qt creator,talk,2019</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeW3WC-VpKdGQ.webp" difficulty="" projectPath="" name="Talk: WEBASM with Qt - Qt for WebAssembly" isVideo="true" videoUrl="https://youtu.be/W3WC-VpKdGQ" videoLength="27:50">
<tutorial imageUrl=":qtsupport/images/icons/youtubeW3WC-VpKdGQ.webp" difficulty="" projectPath="" name="WEBASM with Qt - Qt for WebAssembly" isVideo="true" videoUrl="https://youtu.be/W3WC-VpKdGQ" videoLength="27:50">
<description><![CDATA[Running Qt applications on the Web using Qt for WebAssembly.]]></description>
<tags>qt creator,webassembly,emscripten,talk,2019</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeqclquZ99ZVQ.webp" difficulty="" projectPath="" name="Talk: How to Develop with Qt for Multiple Screen Resolutions and Platforms and Best Practices for an Efficient App Lifecycle with Qt" isVideo="true" videoUrl="https://youtu.be/qclquZ99ZVQ" videoLength="27:44">
<tutorial imageUrl=":qtsupport/images/icons/youtubeqclquZ99ZVQ.webp" difficulty="" projectPath="" name="How to Develop with Qt for Multiple Screen Resolutions and Platforms and Best Practices for an Efficient App Lifecycle with Qt" isVideo="true" videoUrl="https://youtu.be/qclquZ99ZVQ" videoLength="27:44">
<description><![CDATA[Best practices for an efficient app lifecycle.]]></description>
<tags>qt,qt quick,screen resolution,ui,talk,2016</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeB0X5FOev9Lw.webp" difficulty="" projectPath="" name="Talk: Qt Designer tutorial: Integrate custom widgets" isVideo="true" videoUrl="https://youtu.be/B0X5FOev9Lw" videoLength="27:07">
<tutorial imageUrl=":qtsupport/images/icons/youtubeB0X5FOev9Lw.webp" difficulty="" projectPath="" name="Qt Designer tutorial: Integrate custom widgets" isVideo="true" videoUrl="https://youtu.be/B0X5FOev9Lw" videoLength="27:07">
<description><![CDATA[Integrating custom widgets into Qt Designer.]]></description>
<tags>qt designer,widgets,ui,talk,2019</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube3o2Wo4YzlII.webp" difficulty="" projectPath="" name="Talk: Android &amp; iOS - Put Your App on a Diet" isVideo="true" videoUrl="https://www.youtube.com/watch?v=3o2Wo4YzlII" videoLength="23:41">
<tutorial imageUrl=":qtsupport/images/icons/youtube3o2Wo4YzlII.webp" difficulty="" projectPath="" name="Android &amp; iOS - Put Your App on a Diet" isVideo="true" videoUrl="https://www.youtube.com/watch?v=3o2Wo4YzlII" videoLength="23:41">
<description><![CDATA[Making Android and iOS apps smaller.]]></description>
<tags>android,ios,talk,2017</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubev_ynSET9FHU.webp" difficulty="" projectPath="" name="Talk: LTTng for full stack tracing" isVideo="true" videoUrl="https://youtu.be/v_ynSET9FHU" videoLength="25:46">
<tutorial imageUrl=":qtsupport/images/icons/youtubev_ynSET9FHU.webp" difficulty="" projectPath="" name="LTTng for full stack tracing" isVideo="true" videoUrl="https://youtu.be/v_ynSET9FHU" videoLength="25:46">
<description><![CDATA[Using tracing and profiling to optimize the startup time of apps.]]></description>
<tags>qt creator,qml profiler,ctf viewer,lttng,talk,2019</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeau3brB7lNms.webp" difficulty="" projectPath="" name="Talk: No Limits - How to Make a More Complicated Mobile Business App" isVideo="true" videoUrl="https://www.youtube.com/watch?v=au3brB7lNms" videoLength="23:33">
<tutorial imageUrl=":qtsupport/images/icons/youtubeau3brB7lNms.webp" difficulty="" projectPath="" name="No Limits - How to Make a More Complicated Mobile Business App" isVideo="true" videoUrl="https://www.youtube.com/watch?v=au3brB7lNms" videoLength="23:33">
<description><![CDATA[Creating mobile business apps using Qt Quick Controls 2.]]></description>
<tags>android,ios,qt quick,controls,talk,2017</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeECA8_oLT0ZE.webp" difficulty="" projectPath="" name="Talk: Qt &amp; Yocto, an ECU development workflow" isVideo="true" videoUrl="https://youtu.be/ECA8_oLT0ZE" videoLength="29:08">
<tutorial imageUrl=":qtsupport/images/icons/youtubeECA8_oLT0ZE.webp" difficulty="" projectPath="" name="Qt &amp; Yocto, an ECU development workflow" isVideo="true" videoUrl="https://youtu.be/ECA8_oLT0ZE" videoLength="29:08">
<description><![CDATA[Using Qt Creator kits and Yocto when developing for embedded devices.]]></description>
<tags>qt creator,kits,yocto,embedded,talk,2019</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube1w0ak9RNNWY.webp" difficulty="" projectPath="" name="Talk: Qt Creator in Space" isVideo="true" videoUrl="https://youtu.be/1w0ak9RNNWY" videoLength="28:05">
<tutorial imageUrl=":qtsupport/images/icons/youtube1w0ak9RNNWY.webp" difficulty="" projectPath="" name="Qt Creator in Space" isVideo="true" videoUrl="https://youtu.be/1w0ak9RNNWY" videoLength="28:05">
<description><![CDATA[Creating and maintaining a portfolio of Qt Creator plugins.]]></description>
<tags>qt creator,plugins,video,2021</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubenmvurCcsWos.webp" difficulty="" projectPath="" name="Talk: All You Need to Get Your App Done with Qt for Android" isVideo="true" videoUrl="https://youtu.be/nmvurCcsWos" videoLength="24:11">
<tutorial imageUrl=":qtsupport/images/icons/youtubenmvurCcsWos.webp" difficulty="" projectPath="" name="All You Need to Get Your App Done with Qt for Android" isVideo="true" videoUrl="https://youtu.be/nmvurCcsWos" videoLength="24:11">
<description><![CDATA[Developing an Android app using Qt for Android.]]></description>
<tags>android,talk,2021</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubetnZo9umrPtg.webp" difficulty="" projectPath="" name="Talk: Styling a Qt Quick Controls Desktop Application" isVideo="true" videoUrl="https://youtu.be/tnZo9umrPtg" videoLength="29:40">
<tutorial imageUrl=":qtsupport/images/icons/youtubetnZo9umrPtg.webp" difficulty="" projectPath="" name="Styling a Qt Quick Controls Desktop Application" isVideo="true" videoUrl="https://youtu.be/tnZo9umrPtg" videoLength="29:40">
<description><![CDATA[Styling Qt Quick Controls using the styling API.]]></description>
<tags>qt quick,controls,styling,ui,talk,2021</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubepN0pRBUqrrc.webp" difficulty="" projectPath="" name="Talk: The New Property Bindings: Making C++ more QMLish" isVideo="true" videoUrl="https://youtu.be/pN0pRBUqrrc" videoLength="29:54">
<tutorial imageUrl=":qtsupport/images/icons/youtubepN0pRBUqrrc.webp" difficulty="" projectPath="" name="The New Property Bindings: Making C++ more QMLish" isVideo="true" videoUrl="https://youtu.be/pN0pRBUqrrc" videoLength="29:54">
<description><![CDATA[Using the Qt 6 property system in pure C++ and mixed C++/QML applications.]]></description>
<tags>qt,c++,qml,talk,2021</tags>
<meta>
<entry name="category">Talk</entry>
</meta>
</tutorial>
</tutorials>
</instructionals>

View File

@@ -140,6 +140,27 @@ void tst_Examples::parsing_data()
<< FilePath("examples") << QString() << FilePaths() << FilePath() << FilePaths() << Example
<< /*hasSourceCode=*/false << false << /*isHighlighted=*/true << ""
<< "" << QStringList() << MetaData() << QStringList{"Featured"};
QTest::addRow("tutorial with category")
<< QByteArray(R"raw(
<tutorials>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtcreator/doc/dummytutorial.html" projectPath="" name="A tutorial">
<description><![CDATA[A dummy tutorial.]]></description>
<tags>qt creator,build,compile,help</tags>
<meta>
<entry name="category">Help</entry>
</meta>
</tutorial>
</tutorials>
)raw") << /*isExamples=*/false
<< "A tutorial"
<< "A dummy tutorial."
<< ":qtsupport/images/icons/tutorialicon.png"
<< QStringList{"qt creator", "build", "compile", "help"} << FilePath()
<< "qthelp://org.qt-project.qtcreator/doc/dummytutorial.html" << FilePaths() << FilePath()
<< FilePaths() << Tutorial << /*hasSourceCode=*/false << /*isVideo=*/false
<< /*isHighlighted=*/false << QString() << QString() << QStringList()
<< MetaData({{"category", {"Help"}}}) << QStringList("Help");
}
void tst_Examples::parsing()
@@ -175,8 +196,8 @@ void tst_Examples::parsing()
QCOMPARE(item.platforms, expected.platforms);
QCOMPARE(item.metaData, expected.metaData);
const QList<std::pair<Section, QList<ExampleItem *>>> resultCategories = getCategories(*result,
true);
const QList<std::pair<Section, QList<ExampleItem *>>> resultCategories
= getCategories(*result, true, {}, true);
QCOMPARE(resultCategories.size(), categories.size());
for (int i = 0; i < resultCategories.size(); ++i) {
QCOMPARE(resultCategories.at(i).first.name, categories.at(i));