OSDN Git Service

search text by insensitive
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 26 Nov 2003 15:34:16 +0000 (15:34 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 26 Nov 2003 15:34:16 +0000 (15:34 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@564 56b19765-1e22-0410-a548-a0f45d66c51a

ChangeLog
kita/src/kitasubjectview.cpp
kita/src/part/kitahtmlpart.cpp

index e86dec5..ddb5fc4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2003-11-26  Hideki Ikemoto  <ikemo@users.sourceforge.jp>
 
        * write kakiko to $KDEHOME/share/apps/kita/log.txt
+       * search text by case insensitive.
 
 2003-11-24  Hideki Ikemoto  <ikemo@users.sourceforge.jp>
 
index a7a6f8d..c74717f 100644 (file)
@@ -200,7 +200,7 @@ void KitaSubjectView::searchAll(const QStringList &query)
 
     QStringList::const_iterator queryIt = query.begin();
     for( ; queryIt != query.end(); ++queryIt ) {
-      if( item->text(Row_Subject).contains(*queryIt) ) {
+      if( item->text( Row_Subject ).contains( *queryIt, false ) ) {
         item->setPixmap(Row_Icon, SmallIcon("find") );
         m_hitList.append(item);
         break;
index 7e34c2b..33183a0 100644 (file)
@@ -77,9 +77,10 @@ void KitaHTMLPart::highLightenNodes( DOM::NodeList nodes, const QStringList &que
        int pos = 1;
        QString message = *it_msg;
        if( message.at(0) == '<' ) continue;
-       while ( (pos = (*it_msg).find(*it, pos)) != -1 ) {
+       while ( (pos = (*it_msg).find(*it, pos, false)) != -1 ) {
          QString replace = QString("<font class=\"highlight\" id=\"highlighten%2\">").arg( m_hitCount );
-         replace += *it;
+//       replace += *it;
+          replace += message.mid( pos, (*it).length() );
          replace += "</font>";
          message.replace(pos, (*it).length(), replace);
          pos += replace.length();