[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53315] Redundant conditional test in HoverToo
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #53315] Redundant conditional test in HoverToolButton::eventFilter of variable editor |
Date: |
Sat, 10 Mar 2018 05:32:51 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
URL:
<http://savannah.gnu.org/bugs/?53315>
Summary: Redundant conditional test in
HoverToolButton::eventFilter of variable editor
Project: GNU Octave
Submitted by: sebald
Submitted on: Sat 10 Mar 2018 10:32:49 AM UTC
Category: GUI
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Other
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
I just noticed in the code:
bool HoverToolButton::eventFilter (QObject *obj, QEvent *ev)
{
if (ev->type () == QEvent::HoverEnter)
emit hovered_signal ();
else if (ev->type () == QEvent::MouseButtonPress ||
ev->type () == QEvent::MouseButtonPress)
emit popup_shown_signal ();
return QToolButton::eventFilter (obj, ev);
}
has a redundant test for MouseButtonPress. I can't recall what I was thinking
at the time, but I'll look at this again at some point. The hover tool button
is the graph button that pops up a context menu. Maybe I was thinking the
second one should be "mouse double click" whatever expression is defined for
that event.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53315>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53315] Redundant conditional test in HoverToolButton::eventFilter of variable editor,
Dan Sebald <=