diff options
author | Ahmad Samir <[email protected]> | 2025-01-01 17:03:54 +0200 |
---|---|---|
committer | Ahmad Samir <[email protected]> | 2025-01-15 13:28:16 +0200 |
commit | 185cba6e95a006d2548f20599f84390e5a3ad653 (patch) | |
tree | 6dc7754b561b0744cb7b72acde50e979da978b99 /examples/widgets | |
parent | a10acaca0887541207ad5607680d7864d317cf4b (diff) |
Replace qdebug.h includes in public headers with forward-declarations
qdebug.h includes many Qt and STL headers, so if you include a Qt header
you get all those transitive includes, which may affect build time.
- Where appropriate use the printf-like syntax of qDebug() and co.,
these don't need the QDebug streaming operators
- qfloat16 is used in an inline member function, so include it
explicitly
[ChangeLog][Potentially Source Incompatible Changes] Various Qt public
headers don't include QDebug any more; if you need QDebug's streaming
you'll have to include it in your code.
Task-number: QTBUG-132439
Pick-to: 6.9
Change-Id: I750587e17a3b38fa226cd3af8eaccc8da580f436
Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'examples/widgets')
-rw-r--r-- | examples/widgets/graphicsview/chip/chip.cpp | 1 | ||||
-rw-r--r-- | examples/widgets/itemviews/editabletreemodel/mainwindow.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/examples/widgets/graphicsview/chip/chip.cpp b/examples/widgets/graphicsview/chip/chip.cpp index c1a539eddba..c67c5beb2e4 100644 --- a/examples/widgets/graphicsview/chip/chip.cpp +++ b/examples/widgets/graphicsview/chip/chip.cpp @@ -6,6 +6,7 @@ #include <QGraphicsSceneMouseEvent> #include <QPainter> #include <QStyleOptionGraphicsItem> +#include <QVarLengthArray> Chip::Chip(const QColor &color, int x, int y) { diff --git a/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp b/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp index cf88932cdb0..75d7eb7e73c 100644 --- a/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp +++ b/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp @@ -4,6 +4,7 @@ #include "mainwindow.h" #include "treemodel.h" +#include <QDebug> #include <QFile> using namespace Qt::StringLiterals; |