diff options
author | Vlad Voicu <vladv@rosedu.org> | 2012-01-28 01:28:22 (GMT) |
---|---|---|
committer | vlad <vlad@tyrion.(none)> | 2012-10-13 13:55:44 (GMT) |
commit | 3d6bc0b6181c6cdfc6c0a91960e9dac30ddfdba2 (patch) | |
tree | b5196fc36721783a02492061fbbc865338ed6863 /Swift/QtUI | |
parent | eca3a097403adbd85fe3b0cf366f29ecc37cacc6 (diff) | |
download | swift-contrib-3d6bc0b6181c6cdfc6c0a91960e9dac30ddfdba2.zip swift-contrib-3d6bc0b6181c6cdfc6c0a91960e9dac30ddfdba2.tar.bz2 |
Changed name from vector to List for PositionPairList
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtTextEdit.cpp | 4 | ||||
-rw-r--r-- | Swift/QtUI/QtTextEdit.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp index 2dabd7e..7e7683c 100644 --- a/Swift/QtUI/QtTextEdit.cpp +++ b/Swift/QtUI/QtTextEdit.cpp @@ -72,7 +72,7 @@ void QtTextEdit::underlineMisspells() { cursor.setCharFormat(normalFormat); std::string fragment = Q2PSTRING(cursor.selectedText()); checker_->checkFragment(fragment, misspelledPositions_); - for (PositionPairVector::iterator it = misspelledPositions_.begin(); it != misspelledPositions_.end(); ++it) { + for (PositionPairList::iterator it = misspelledPositions_.begin(); it != misspelledPositions_.end(); ++it) { if (textCursor().position() > boost::get<1>(*it)) { cursor.setPosition(boost::get<0>(*it), QTextCursor::MoveAnchor); cursor.setPosition(boost::get<1>(*it), QTextCursor::KeepAnchor); @@ -100,7 +100,7 @@ void QtTextEdit::handleReplaceMisspellWord(const QString& word, const boost::tup } boost::tuple<int, int> QtTextEdit::getWordFromCursor(int cursorPosition) { - for (PositionPairVector::iterator it = misspelledPositions_.begin(); it != misspelledPositions_.end(); ++it) { + for (PositionPairList::iterator it = misspelledPositions_.begin(); it != misspelledPositions_.end(); ++it) { if (cursorPosition >= boost::get<0>(*it) && cursorPosition <= boost::get<1>(*it)) { return *it; } diff --git a/Swift/QtUI/QtTextEdit.h b/Swift/QtUI/QtTextEdit.h index 76087c9..297312d 100644 --- a/Swift/QtUI/QtTextEdit.h +++ b/Swift/QtUI/QtTextEdit.h @@ -30,7 +30,7 @@ namespace Swift { void handleTextChanged(); private: SpellChecker *checker_; - PositionPairVector misspelledPositions_; + PositionPairList misspelledPositions_; void underlineMisspells(); boost::tuple<int,int> getWordFromCursor(int cursorPosition); }; |