Skip to content

Commit

Permalink
Improve logging in QWindowPrivate::forwardToPopup()
Browse files Browse the repository at this point in the history
Debugging output printed the return value of event->isAccepted() without
information what the value represents.

Add it.

Pick-to: 6.8 6.8.0
Change-Id: Ifbef69fed5d4aadd732c234c2ac74495560e65b6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
  • Loading branch information
ASpoerl committed Sep 24, 2024
1 parent 0423908 commit 5d02837
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/kernel/qwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2455,13 +2455,15 @@ const QWindow *QWindowPrivate::forwardToPopup(QEvent *event, const QWindow */*ac
ret = popupWindow;
}
qCDebug(lcPopup) << q << "forwarded" << event->type() << "to popup" << popupWindow
<< "handled?" << (ret != nullptr) << event->isAccepted();
<< "handled?" << (ret != nullptr)
<< "accepted?" << event->isAccepted();
return ret;
} else if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
if (QCoreApplication::sendEvent(popupWindow, event))
ret = popupWindow;
qCDebug(lcPopup) << q << "forwarded" << event->type() << "to popup" << popupWindow
<< "handled?" << (ret != nullptr) << event->isAccepted();
<< "handled?" << (ret != nullptr)
<< "accepted?" << event->isAccepted();
return ret;
}
}
Expand Down

0 comments on commit 5d02837

Please sign in to comment.