[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenox/konq-embed/kdesrc/khtml/patches
From: Eva Brucherseifer <eva () kde ! org>
Date: 2006-03-10 15:05:37
Message-ID: 1142003137.871850.13359.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 517294 by eva:
fix findNext patch (added find reverse patch)
M +7 -17 findNext.patch
--- trunk/kdenox/konq-embed/kdesrc/khtml/patches/findNext.patch #517293:517294
@@ -1,6 +1,6 @@
---- ./khtml_part.cpp
-+++ khtml/khtml_part.cpp
-@@ -2824,7 +2834,7 @@ bool KHTMLPart::initFindNode( bool selec
+--- khtml_part.cpp.1 2006-03-10 16:04:07.000000000 +0100
++++ khtml_part.cpp 2006-03-10 16:03:35.000000000 +0100
+@@ -2850,7 +2850,7 @@
// Old method (its API limits the available features - remove in KDE-4)
bool KHTMLPart::findTextNext( const QString &str, bool forward, bool caseSensitive, \
bool isRegExp ) {
@@ -9,26 +9,16 @@
return false;
while(1)
{
-@@ -2848,18 +2858,37 @@ bool KHTMLPart::findTextNext( const QStr
- {
- DOMString nodeText = d->m_findNode->nodeValue();
- DOMStringImpl *t = nodeText.implementation();
- QConstString s(t->s, t->l);
-
- int matchLen = 0;
- if ( isRegExp ) {
- QRegExp matcher( str );
- matcher.setCaseSensitive( caseSensitive );
- d->m_findPos = matcher.search(s.string(), d->m_findPos+1);
- if ( d->m_findPos != -1 )
+@@ -2869,7 +2869,26 @@
matchLen = matcher.matchedLength();
}
else {
+- d->m_findPos = s.string().find(str, d->m_findPos+1, caseSensitive);
+ if (forward)
- d->m_findPos = s.string().find(str, d->m_findPos+1, caseSensitive);
++ d->m_findPos = s.string().find(str, d->m_findPos+1, \
caseSensitive); + else
+ {
-+ qDebug( "index %d in reverse search of '%s' for '%s'", \
d->m_findPos, s.string().latin1(), str.latin1() ); ++ //qDebug( "index \
%d in reverse search of '%s' for '%s'", d->m_findPos, s.string().latin1(), \
str.latin1() ); + if (0 < d->m_findPos)
+ // the standard case: we are in the middle of searching a node
+ d->m_findPos = s.string().findRev(str, d->m_findPos-1, \
caseSensitive);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic