[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Small Bug in Sonnet::Filter
From: Fredy Yanardi <fyanardi () gmail ! com>
Date: 2007-09-11 20:05:55
Message-ID: 200709112005.55355.fyanardi () gmail ! com
[Download RAW message or body]
Hi all,
I just found a problem in Sonnet::Filter that is causing words not fetched
correctly in Sonnet's Backgroundchecker. The problem is when iterating a word
in nextWord() method, if current iterator position exceeds word length, an
end of word is returned. But I think the method should be returning current
word. By changing a line in this method, this problem seems to be solved.
Here I also attach a diff to make it clear what's changed.
Any problem with this?
Best Regards,
Fredy Yanardi
["sonnet_filter.diff" (text/x-diff)]
Index: kdecore/sonnet/filter.cpp
===================================================================
--- kdecore/sonnet/filter.cpp (revision 710627)
+++ kdecore/sonnet/filter.cpp (working copy)
@@ -126,7 +126,7 @@
++m_currentPosition;
//Test if currentPosition exists, otherwise go out
if( m_currentPosition >= m_buffer.length())
- return Filter::end();
+ return Word( foundWord, start );
currentChar = m_buffer.at( m_currentPosition );
}
if ( shouldBeSkipped( allUppercase, runTogether, foundWord ) )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic