diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp index 407b4ee9b6..b6b50372ae 100644 --- a/src/gui/kernel/qscreen.cpp +++ b/src/gui/kernel/qscreen.cpp @@ -698,7 +698,7 @@ Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QScreen *screen) { const QDebugStateSaver saver(debug); debug.nospace(); - debug << "QScreen(" << (void *)screen; + debug << "QScreen(" << (const void *)screen; if (screen) { debug << ", name=" << screen->name(); if (debug.verbosity() > 2) { diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index e93e964c6b..89bd119564 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2508,7 +2508,7 @@ QDebug operator<<(QDebug debug, const QWindow *window) QDebugStateSaver saver(debug); debug.nospace(); if (window) { - debug << window->metaObject()->className() << '(' << (void *)window; + debug << window->metaObject()->className() << '(' << (const void *)window; if (!window->objectName().isEmpty()) debug << ", name=" << window->objectName(); if (debug.verbosity() > 2) { diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index 8646e699a9..ebb54735d4 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -2030,7 +2030,7 @@ QString FunctionNode::signature(bool values) const PropertyNode::FunctionRole PropertyNode::role(const FunctionNode* fn) const { for (int i=0; i<4; i++) { - if (functions_[i].contains((Node*)fn)) + if (functions_[i].contains(const_cast(fn))) return (FunctionRole) i; } return Notifier; diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 1ebf782edf..91641db60d 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -12861,7 +12861,7 @@ QDebug operator<<(QDebug debug, const QWidget *widget) const QDebugStateSaver saver(debug); debug.nospace(); if (widget) { - debug << widget->metaObject()->className() << '(' << (void *)widget; + debug << widget->metaObject()->className() << '(' << (const void *)widget; if (!widget->objectName().isEmpty()) debug << ", name=" << widget->objectName(); if (debug.verbosity() > 2) {