diff --git a/3rdparty/qt/5.5/private/qpaintbuffer_p.h b/3rdparty/qt/5.5/private/qpaintbuffer_p.h index e5089c9055..0681ae6254 100644 --- a/3rdparty/qt/5.5/private/qpaintbuffer_p.h +++ b/3rdparty/qt/5.5/private/qpaintbuffer_p.h @@ -320,10 +320,10 @@ class QPainterReplayer void processCommands(const QPaintBuffer &buffer, QPainter *painter, int begin, int end); protected: - QPaintBufferPrivate *d; + QPaintBufferPrivate *d = nullptr; QTransform m_world_matrix; - QPainter *painter; + QPainter *painter = nullptr; private: Q_DISABLE_COPY(QPainterReplayer) diff --git a/plugins/quickinspector/quickdecorationsdrawer.cpp b/plugins/quickinspector/quickdecorationsdrawer.cpp index 77f993f130..8af5f47ce7 100644 --- a/plugins/quickinspector/quickdecorationsdrawer.cpp +++ b/plugins/quickinspector/quickdecorationsdrawer.cpp @@ -355,6 +355,7 @@ void QuickDecorationsDrawer::drawGrid() QVector lines; lines.reserve((viewRect.width() / gridCellSize.width()) + (viewRect.height() / gridCellSize.height())); + // NOLINTNEXTLINE (clang-analyzer-security.FloatLoopCounter) for (qreal x = viewRect.left() + gridOffset.x(); x < viewRect.right(); x += gridCellSize.width()) { if (x < viewRect.left()) continue; @@ -363,6 +364,7 @@ void QuickDecorationsDrawer::drawGrid() QPointF(x, viewRect.bottom()) * m_renderInfo->zoom); } + // NOLINTNEXTLINE (clang-analyzer-security.FloatLoopCounter) for (qreal y = viewRect.top() + gridOffset.y(); y < viewRect.bottom(); y += gridCellSize.height()) { if (y < viewRect.top()) continue; diff --git a/plugins/wlcompositorinspector/logview.cpp b/plugins/wlcompositorinspector/logview.cpp index 1bf7805de4..0a17416045 100644 --- a/plugins/wlcompositorinspector/logview.cpp +++ b/plugins/wlcompositorinspector/logview.cpp @@ -445,6 +445,7 @@ class Timeline : public QScrollArea int startLine = drawRect.left() / linesSpacing - (rit - it) / m_zoom; // round the starting position so that we have nice numbers' int s = startLine; + // NOLINTNEXTLINE (clang-analyzer-security.FloatLoopCounter) for (qreal i = startLine * linesSpacing; i < drawRect.right(); i += linesSpacing, s++) { bool isStep = s % substeps == 0; painter.setPen(isStep ? palette.color(QPalette::Highlight) : palette.color(QPalette::Midlight)); @@ -461,6 +462,7 @@ class Timeline : public QScrollArea // draw the text after having drawn all the lines, so we're sure they don't go over it s = startLine; painter.setPen(palette.color(QPalette::Highlight)); + // NOLINTNEXTLINE (clang-analyzer-security.FloatLoopCounter) for (qreal i = startLine * linesSpacing; i < drawRect.right(); i += step / substeps, s++) { // krazy:exclude=postfixop bool isStep = s % substeps == 0; if (isStep) { diff --git a/tests/metaobjecttest.cpp b/tests/metaobjecttest.cpp index 9cf7a6def5..673cb385ce 100644 --- a/tests/metaobjecttest.cpp +++ b/tests/metaobjecttest.cpp @@ -64,6 +64,8 @@ private slots: } QVERIFY(prop); + if (!prop) return; // to silence clang-tidy + QCOMPARE(prop->name(), "priority"); QCOMPARE(prop->typeName(), "QThread::Priority"); @@ -87,6 +89,7 @@ private slots: } QVERIFY(prop); + if (!prop) return; // to silence clang-tidy QCOMPARE(prop->name(), "libraryPaths"); QCOMPARE(prop->typeName(), "QStringList"); QCOMPARE(prop->isReadOnly(), true); diff --git a/tests/quickinspectorpickingtest.cpp b/tests/quickinspectorpickingtest.cpp index 301246a1f4..db82c3b7d7 100644 --- a/tests/quickinspectorpickingtest.cpp +++ b/tests/quickinspectorpickingtest.cpp @@ -43,8 +43,9 @@ class QuickInspectorPickingTest : public QObject qputenv("GAMMARAY_ServerAddress", GAMMARAY_DEFAULT_LOCAL_TCP_URL); Hooks::installHooks(); Probe::startupHookReceived(); - // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) + // NOLINTNEXTLINE (clang-analyzer-cplusplus.NewDeleteLeaks) new ProbeCreator(ProbeCreator::Create); + // NOLINTNEXTLINE (clang-analyzer-cplusplus.NewDeleteLeaks) QTest::qWait(1); // event loop re-entry }