diff libgui/src/m-editor/file-editor-tab.cc @ 15368:36ececf69385

avoid some GCC warnings in the libgui code * file-editor-interface.h, lexer-octave-gui.cc, main-window.cc, settings-dialog.cc, workspace-model.cc, workspace-view.cc: Avoid some shadowed variable, unused switch case, and C-style cast warnings.
author John W. Eaton <jwe@octave.org>
date Wed, 12 Sep 2012 20:32:57 -0400
parents 501a9cc2c68f
children eec0d1fcba4f
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc
+++ b/libgui/src/m-editor/file-editor-tab.cc
@@ -91,10 +91,10 @@
   _edit_area->autoCompleteFromAll ();
   _edit_area->setAutoCompletionSource(QsciScintilla::AcsAll);
 
-  QVBoxLayout *layout = new QVBoxLayout ();
-  layout->addWidget (_edit_area);
-  layout->setMargin (0);
-  setLayout (layout);
+  QVBoxLayout *edit_area_layout = new QVBoxLayout ();
+  edit_area_layout->addWidget (_edit_area);
+  edit_area_layout->setMargin (0);
+  setLayout (edit_area_layout);
 
   // connect modified signal
   connect (_edit_area, SIGNAL (modificationChanged (bool)),
@@ -158,13 +158,13 @@
 }
 
 void
-file_editor_tab::closeEvent (QCloseEvent *event)
+file_editor_tab::closeEvent (QCloseEvent *e)
 {
   if (_file_editor->get_main_window ()->is_closing ())
     {
       // close whole application: save file or not if modified
       check_file_modified ("Closing Octave", 0); // no cancel possible
-      event->accept ();
+      e->accept ();
     }
   else
     {
@@ -173,11 +173,11 @@
       if (check_file_modified ("Close File",
                                QMessageBox::Cancel) == QMessageBox::Cancel)
         {
-          event->ignore ();
+          e->ignore ();
         }
       else
         {
-          event->accept();
+          e->accept();
         }
     }
 }
@@ -197,18 +197,18 @@
   Q_UNUSED (state);
   if (margin == 1)
     {
-      unsigned int mask = _edit_area->markersAtLine (line);
+      unsigned int markers_mask = _edit_area->markersAtLine (line);
 
       if (state & Qt::ControlModifier)
         {
-          if (mask && (1 << bookmark))
+          if (markers_mask && (1 << bookmark))
             _edit_area->markerDelete(line,bookmark);
           else
             _edit_area->markerAdd(line,bookmark);
         }
       else
         {
-          if (mask && (1 << breakpoint))
+          if (markers_mask && (1 << breakpoint))
             {
               request_remove_breakpoint (line);
             }