CMake: Mark qtdoc examples as warnings clean

Fix the few warnings in the examples that were discovered during the
test process.

Task-number: QTBUG-108448
Change-Id: I40b71f679eccd4e0ebbcc8362a7b65f017927d02
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2025-07-30 17:38:34 +02:00
parent 59dbbb39d2
commit 7f68699392
3 changed files with 8 additions and 0 deletions

View File

@ -2,3 +2,5 @@ set(QT_REPO_MODULE_VERSION "6.11.0")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1")
set(QT_REPO_EXAMPLES_WARNINGS_CLEAN TRUE)

View File

@ -93,6 +93,7 @@ void LightningItemModel::getLatestStrikeInfo(const QGeoCoordinate &searchCenter,
int LightningItemModel::rowCount(const QModelIndex &parent) const int LightningItemModel::rowCount(const QModelIndex &parent) const
{ {
Q_UNUSED(parent);
return m_data.size(); return m_data.size();
} }

View File

@ -7,7 +7,12 @@
#include <QGeoPolygon> #include <QGeoPolygon>
#include <QRandomGenerator> #include <QRandomGenerator>
#include <QThreadPool> #include <QThreadPool>
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wunused-but-set-variable")
QT_WARNING_DISABLE_GCC("-Wunused-but-set-variable")
#include "3rdparty/mapbox/earcut.h" #include "3rdparty/mapbox/earcut.h"
QT_WARNING_POP
using namespace Qt::StringLiterals; using namespace Qt::StringLiterals;