diff libgui/graphics/Figure.cc @ 19650:709f3a77685d gui-release

avoid shadowed variable warnings in libgui sources * BaseControl.cc, BaseControl.h, Container.cc, ContextMenu.cc, Figure.cc, FigureWindow.cc, GLCanvas.cc, GenericEventNotify.h, Menu.cc, MouseModeActionGroup.cc, Panel.cc, TextEdit.cc, TextEdit.h, ToolBar.cc: Rename local variables to avoid shadowing class members or functions.
author John W. Eaton <jwe@octave.org>
date Fri, 23 Jan 2015 14:53:10 -0500
parents 1f8ce7be9c00
children af0399a5aae0
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc	Fri Jan 23 14:37:43 2015 -0500
+++ b/libgui/graphics/Figure.cc	Fri Jan 23 14:53:10 2015 -0500
@@ -493,7 +493,7 @@
   gh_manager::post_function (Figure::updateBoundingBoxHelper, d);
 }
 
-bool Figure::eventNotifyBefore (QObject* obj, QEvent* event)
+bool Figure::eventNotifyBefore (QObject* obj, QEvent* ev)
 {
   if (! m_blockUpdates)
     {
@@ -503,11 +503,11 @@
 	}
       else if (obj == m_menuBar)
 	{
-	  switch (event->type ())
+	  switch (ev->type ())
 	    {
 	    case QEvent::ActionRemoved:
 		{
-		  QAction* a = dynamic_cast<QActionEvent*> (event)->action ();
+		  QAction* a = dynamic_cast<QActionEvent*> (ev)->action ();
 
 		  if (! a->isSeparator ()
 		      && a->objectName () != "builtinMenu")
@@ -520,10 +520,10 @@
 	}
       else
 	{
-	  switch (event->type ())
+	  switch (ev->type ())
 	    {
 	    case QEvent::Close:
-	      event->ignore ();
+	      ev->ignore ();
 	      gh_manager::post_callback (m_handle, "closerequestfcn");
 	      return true;
 	    default:
@@ -535,19 +535,19 @@
   return false;
 }
 
-void Figure::eventNotifyAfter (QObject* watched, QEvent* event)
+void Figure::eventNotifyAfter (QObject* watched, QEvent* ev)
 {
   if (! m_blockUpdates)
     {
       if (watched == m_container)
         {
-	  switch (event->type ())
+	  switch (ev->type ())
 	    {
 	    case QEvent::Resize:
 	      updateBoundingBox (true, UpdateBoundingBoxSize);
 	      break;
 	    case QEvent::ChildAdded:
-	      if (dynamic_cast<QChildEvent*> (event)->child
+	      if (dynamic_cast<QChildEvent*> (ev)->child
 		  ()->isWidgetType())
 		{
 		  gh_manager::auto_lock lock;
@@ -561,11 +561,11 @@
         }
       else if (watched == m_menuBar)
         {
-	  switch (event->type ())
+	  switch (ev->type ())
 	    {
 	    case QEvent::ActionAdded:
 		{
-		  QAction* a = dynamic_cast<QActionEvent*> (event)->action ();
+		  QAction* a = dynamic_cast<QActionEvent*> (ev)->action ();
 
 		  if (! a->isSeparator ()
                       && a->objectName () != "builtinMenu")
@@ -578,7 +578,7 @@
         }
       else
         {
-	  switch (event->type ())
+	  switch (ev->type ())
 	    {
 	    case QEvent::Move:
 	      updateBoundingBox (false, UpdateBoundingBoxPosition);