comparison 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
comparison
equal deleted inserted replaced
19649:4c1f638a381e 19650:709f3a77685d
491 //qDebug ("Figure::updateBoundingBox: internal=%d, bbox=[%g %g %g %g]", 491 //qDebug ("Figure::updateBoundingBox: internal=%d, bbox=[%g %g %g %g]",
492 // d->m_internal, d->m_bbox(0), d->m_bbox(1), d->m_bbox(2), d->m_bbox(3)); 492 // d->m_internal, d->m_bbox(0), d->m_bbox(1), d->m_bbox(2), d->m_bbox(3));
493 gh_manager::post_function (Figure::updateBoundingBoxHelper, d); 493 gh_manager::post_function (Figure::updateBoundingBoxHelper, d);
494 } 494 }
495 495
496 bool Figure::eventNotifyBefore (QObject* obj, QEvent* event) 496 bool Figure::eventNotifyBefore (QObject* obj, QEvent* ev)
497 { 497 {
498 if (! m_blockUpdates) 498 if (! m_blockUpdates)
499 { 499 {
500 if (obj == m_container) 500 if (obj == m_container)
501 { 501 {
502 // Do nothing... 502 // Do nothing...
503 } 503 }
504 else if (obj == m_menuBar) 504 else if (obj == m_menuBar)
505 { 505 {
506 switch (event->type ()) 506 switch (ev->type ())
507 { 507 {
508 case QEvent::ActionRemoved: 508 case QEvent::ActionRemoved:
509 { 509 {
510 QAction* a = dynamic_cast<QActionEvent*> (event)->action (); 510 QAction* a = dynamic_cast<QActionEvent*> (ev)->action ();
511 511
512 if (! a->isSeparator () 512 if (! a->isSeparator ()
513 && a->objectName () != "builtinMenu") 513 && a->objectName () != "builtinMenu")
514 updateMenuBar (); 514 updateMenuBar ();
515 } 515 }
518 break; 518 break;
519 } 519 }
520 } 520 }
521 else 521 else
522 { 522 {
523 switch (event->type ()) 523 switch (ev->type ())
524 { 524 {
525 case QEvent::Close: 525 case QEvent::Close:
526 event->ignore (); 526 ev->ignore ();
527 gh_manager::post_callback (m_handle, "closerequestfcn"); 527 gh_manager::post_callback (m_handle, "closerequestfcn");
528 return true; 528 return true;
529 default: 529 default:
530 break; 530 break;
531 } 531 }
533 } 533 }
534 534
535 return false; 535 return false;
536 } 536 }
537 537
538 void Figure::eventNotifyAfter (QObject* watched, QEvent* event) 538 void Figure::eventNotifyAfter (QObject* watched, QEvent* ev)
539 { 539 {
540 if (! m_blockUpdates) 540 if (! m_blockUpdates)
541 { 541 {
542 if (watched == m_container) 542 if (watched == m_container)
543 { 543 {
544 switch (event->type ()) 544 switch (ev->type ())
545 { 545 {
546 case QEvent::Resize: 546 case QEvent::Resize:
547 updateBoundingBox (true, UpdateBoundingBoxSize); 547 updateBoundingBox (true, UpdateBoundingBoxSize);
548 break; 548 break;
549 case QEvent::ChildAdded: 549 case QEvent::ChildAdded:
550 if (dynamic_cast<QChildEvent*> (event)->child 550 if (dynamic_cast<QChildEvent*> (ev)->child
551 ()->isWidgetType()) 551 ()->isWidgetType())
552 { 552 {
553 gh_manager::auto_lock lock; 553 gh_manager::auto_lock lock;
554 const figure::properties& fp = properties<figure> (); 554 const figure::properties& fp = properties<figure> ();
555 555
559 break; 559 break;
560 } 560 }
561 } 561 }
562 else if (watched == m_menuBar) 562 else if (watched == m_menuBar)
563 { 563 {
564 switch (event->type ()) 564 switch (ev->type ())
565 { 565 {
566 case QEvent::ActionAdded: 566 case QEvent::ActionAdded:
567 { 567 {
568 QAction* a = dynamic_cast<QActionEvent*> (event)->action (); 568 QAction* a = dynamic_cast<QActionEvent*> (ev)->action ();
569 569
570 if (! a->isSeparator () 570 if (! a->isSeparator ()
571 && a->objectName () != "builtinMenu") 571 && a->objectName () != "builtinMenu")
572 updateMenuBar (); 572 updateMenuBar ();
573 } 573 }
576 break; 576 break;
577 } 577 }
578 } 578 }
579 else 579 else
580 { 580 {
581 switch (event->type ()) 581 switch (ev->type ())
582 { 582 {
583 case QEvent::Move: 583 case QEvent::Move:
584 updateBoundingBox (false, UpdateBoundingBoxPosition); 584 updateBoundingBox (false, UpdateBoundingBoxPosition);
585 updateBoundingBox (true, UpdateBoundingBoxPosition); 585 updateBoundingBox (true, UpdateBoundingBoxPosition);
586 break; 586 break;