From ce6556ed706e276853763388aaf880960f388d54 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 16 Apr 2025 13:37:00 +0200 Subject: [PATCH] PlainTextEdit: Comment out some no-op code to avoid warnings .../src/libs/utils/plaintextedit/widgettextcontrol.cpp:2064:13: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] .../src/libs/utils/plaintextedit/widgettextcontrol.cpp:2063:19: warning: unused variable 'window' [-Wunused-variable] Change-Id: Ic6dc6c369d694c4876d88e126f7103f91fa4745e Reviewed-by: David Schulz --- src/libs/utils/plaintextedit/widgettextcontrol.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/utils/plaintextedit/widgettextcontrol.cpp b/src/libs/utils/plaintextedit/widgettextcontrol.cpp index 3ea0fceee9c..f896815c54a 100644 --- a/src/libs/utils/plaintextedit/widgettextcontrol.cpp +++ b/src/libs/utils/plaintextedit/widgettextcontrol.cpp @@ -2059,10 +2059,12 @@ void WidgetTextControlPrivate::contextMenuEvent(const QPoint &screenPos, const Q return; menu->setAttribute(Qt::WA_DeleteOnClose); +/* if (auto *widget = qobject_cast(parent())) { if (auto *window = widget->window()->windowHandle()) ;// QMenuPrivate::get(menu)->topData()->initialScreen = window->screen(); } + */ menu->popup(screenPos); #endif