mirror of
https://github.com/chris2511/xca.git
synced 2026-09-14 11:06:19 +05:00
Fix wrong pointer type casting
Method event can get called with QChildEvent instead of QHelpEvent. Signed-off-by: Melg Eight <public.melg8@gmail.com>
This commit is contained in:
parent
72ab898db7
commit
4e1269974f
@ -39,10 +39,11 @@ class tipMenu : public QMenu
|
||||
tipMenu(QString n, QWidget *w) : QMenu(n, w) {}
|
||||
bool event (QEvent * e)
|
||||
{
|
||||
const QHelpEvent *helpEvent = static_cast <QHelpEvent *>(e);
|
||||
if (helpEvent->type() == QEvent::ToolTip && activeAction() &&
|
||||
|
||||
if (e->type() == QEvent::ToolTip && activeAction() &&
|
||||
activeAction()->toolTip() != activeAction()->text()) {
|
||||
QToolTip::showText(helpEvent->globalPos(),
|
||||
const QHelpEvent *helpEvent = static_cast <QHelpEvent *>(e);
|
||||
QToolTip::showText(helpEvent->globalPos(),
|
||||
activeAction()->toolTip());
|
||||
} else {
|
||||
QToolTip::hideText();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user