summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtTextEdit.cpp4
-rw-r--r--Swift/QtUI/QtTextEdit.h2
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);
};