Mercurial > hg > octave-nkf
diff libgui/graphics/Figure.cc @ 19820:6b2d7a5dc62a gui-release
use xevent instead of ev to avoid shadowed warnings
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 23 Jan 2015 16:30:26 -0500 |
parents | af0399a5aae0 |
children | 2f4406e9dad6 |
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc +++ b/libgui/graphics/Figure.cc @@ -493,7 +493,7 @@ gh_manager::post_function (Figure::updateBoundingBoxHelper, d); } -bool Figure::eventNotifyBefore (QObject* obj, QEvent* ev) +bool Figure::eventNotifyBefore (QObject* obj, QEvent* xevent) { if (! m_blockUpdates) { @@ -503,11 +503,11 @@ } else if (obj == m_menuBar) { - switch (ev->type ()) + switch (xevent->type ()) { case QEvent::ActionRemoved: { - QAction* a = dynamic_cast<QActionEvent*> (ev)->action (); + QAction* a = dynamic_cast<QActionEvent*> (xevent)->action (); if (! a->isSeparator () && a->objectName () != "builtinMenu") @@ -520,10 +520,10 @@ } else { - switch (ev->type ()) + switch (xevent->type ()) { case QEvent::Close: - ev->ignore (); + xevent->ignore (); gh_manager::post_callback (m_handle, "closerequestfcn"); return true; default: @@ -535,19 +535,19 @@ return false; } -void Figure::eventNotifyAfter (QObject* watched, QEvent* ev) +void Figure::eventNotifyAfter (QObject* watched, QEvent* xevent) { if (! m_blockUpdates) { if (watched == m_container) { - switch (ev->type ()) + switch (xevent->type ()) { case QEvent::Resize: updateBoundingBox (true, UpdateBoundingBoxSize); break; case QEvent::ChildAdded: - if (dynamic_cast<QChildEvent*> (ev)->child + if (dynamic_cast<QChildEvent*> (xevent)->child ()->isWidgetType()) { gh_manager::auto_lock lock; @@ -561,11 +561,11 @@ } else if (watched == m_menuBar) { - switch (ev->type ()) + switch (xevent->type ()) { case QEvent::ActionAdded: { - QAction* a = dynamic_cast<QActionEvent*> (ev)->action (); + QAction* a = dynamic_cast<QActionEvent*> (xevent)->action (); if (! a->isSeparator () && a->objectName () != "builtinMenu") @@ -578,7 +578,7 @@ } else { - switch (ev->type ()) + switch (xevent->type ()) { case QEvent::Move: updateBoundingBox (false, UpdateBoundingBoxPosition);