summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-02 14:54:47 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-02 14:54:47 (GMT)
commit8ada96a39f181fe372489c784539d19700590ee7 (patch)
tree7177afd2ae93c57d71747163c030e7a49c0d802c /Source
parentf61bbf1b90f940f64f4b1e7b5040c734461ba058 (diff)
parent82baceaa6077b2d07d2dca68e1c39ff4c6c88dfc (diff)
downloadCMake-8ada96a39f181fe372489c784539d19700590ee7.zip
CMake-8ada96a39f181fe372489c784539d19700590ee7.tar.gz
CMake-8ada96a39f181fe372489c784539d19700590ee7.tar.bz2
Merge topic 'cmake-gui-warning'
82bacea cmake-gui: Rename local variable to avoid shadowing a member
Diffstat (limited to 'Source')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx44
1 files changed, 22 insertions, 22 deletions
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);
}
}