[Cmake-commits] CMake branch, next, updated. v2.8.12-4753-g635b94d

Brad King brad.king at kitware.com
Fri Nov 1 12:59:13 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  635b94d0da0fe81c84e241eca9c845b02dea727a (commit)
       via  82baceaa6077b2d07d2dca68e1c39ff4c6c88dfc (commit)
      from  cdce5905bfb6207197b5186b2d570d7d207a6829 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=635b94d0da0fe81c84e241eca9c845b02dea727a
commit 635b94d0da0fe81c84e241eca9c845b02dea727a
Merge: cdce590 82bacea
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 1 12:59:12 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 1 12:59:12 2013 -0400

    Merge topic 'cmake-gui-warning' into next
    
    82bacea cmake-gui: Rename local variable to avoid shadowing a member


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82baceaa6077b2d07d2dca68e1c39ff4c6c88dfc
commit 82baceaa6077b2d07d2dca68e1c39ff4c6c88dfc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 1 12:56:43 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 1 12:56:43 2013 -0400

    cmake-gui: Rename local variable to avoid shadowing a member
    
    Address warnings:
    
     Source/QtDialog/CMakeSetupDialog.cxx:1233:15:
     warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]
     Source/QtDialog/CMakeSetupDialog.cxx:1260:15:
     warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]
    
    by renaming the local variable to 'textCursor'.

diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index a4dfdc9..a7665c8 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -1230,7 +1230,7 @@ void CMakeSetupDialog::doOutputFindNext(bool directionForward)
 
   QString search = this->FindHistory.front();
 
-  QTextCursor cursor = this->Output->textCursor();
+  QTextCursor textCursor = this->Output->textCursor();
   QTextDocument* document = this->Output->document();
   QTextDocument::FindFlags flags;
   if (!directionForward)
@@ -1238,67 +1238,67 @@ void CMakeSetupDialog::doOutputFindNext(bool directionForward)
     flags |= QTextDocument::FindBackward;
     }
 
-  cursor = document->find(search, cursor, flags);
+  textCursor = document->find(search, textCursor, flags);
 
-  if (cursor.isNull())
+  if (textCursor.isNull())
     {
     // first search found nothing, wrap around and search again
-    cursor = this->Output->textCursor();
-    cursor.movePosition(directionForward ? QTextCursor::Start
-                                         : QTextCursor::End);
-    cursor = document->find(search, cursor, flags);
+    textCursor = this->Output->textCursor();
+    textCursor.movePosition(directionForward ? QTextCursor::Start
+                                             : QTextCursor::End);
+    textCursor = document->find(search, textCursor, flags);
     }
 
-  if (cursor.hasSelection())
+  if (textCursor.hasSelection())
     {
-    this->Output->setTextCursor(cursor);
+    this->Output->setTextCursor(textCursor);
     }
 }
 
 void CMakeSetupDialog::doOutputErrorNext()
 {
-  QTextCursor cursor = this->Output->textCursor();
+  QTextCursor textCursor = this->Output->textCursor();
   bool atEnd = false;
 
   // move cursor out of current error-block
-  if (cursor.blockCharFormat() == this->ErrorFormat)
+  if (textCursor.blockCharFormat() == this->ErrorFormat)
     {
-    atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+    atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
     }
 
   // move cursor to next error-block
-  while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd)
+  while (textCursor.blockCharFormat() != this->ErrorFormat && !atEnd)
     {
-    atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+    atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
     }
 
   if (atEnd)
     {
     // first search found nothing, wrap around and search again
-    atEnd = !cursor.movePosition(QTextCursor::Start);
+    atEnd = !textCursor.movePosition(QTextCursor::Start);
 
     // move cursor to next error-block
-    while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd)
+    while (textCursor.blockCharFormat() != this->ErrorFormat && !atEnd)
       {
-      atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+      atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
       }
     }
 
   if (!atEnd)
     {
-    cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+    textCursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
 
     QTextCharFormat selectionFormat;
     selectionFormat.setBackground(Qt::yellow);
-    QTextEdit::ExtraSelection extraSelection = {cursor, selectionFormat};
+    QTextEdit::ExtraSelection extraSelection = {textCursor, selectionFormat};
     this->Output->setExtraSelections(QList<QTextEdit::ExtraSelection>()
                                      << extraSelection);
 
     // make the whole error-block visible
-    this->Output->setTextCursor(cursor);
+    this->Output->setTextCursor(textCursor);
 
     // remove the selection to see the extraSelection
-    cursor.setPosition(cursor.anchor());
-    this->Output->setTextCursor(cursor);
+    textCursor.setPosition(textCursor.anchor());
+    this->Output->setTextCursor(textCursor);
     }
 }

-----------------------------------------------------------------------

Summary of changes:
 Source/QtDialog/CMakeSetupDialog.cxx |   44 +++++++++++++++++-----------------
 1 files changed, 22 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list