OSDN Git Service

now refactoring...
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 1 May 2003 11:36:18 +0000 (11:36 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 1 May 2003 11:36:18 +0000 (11:36 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@191 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/part/kitahtmlpart.h
kita/src/part/kitathreadview.cpp
kita/src/part/kitathreadview.h

index e8512da..9e8dd90 100644 (file)
@@ -29,6 +29,7 @@ public:
   int m_hitCount;
   QStringList m_prevQuery;
   QString m_contents;
+  int m_nextHit;
 
   KitaHTMLPart(QWidget *parent, const char *name = 0);
   ~KitaHTMLPart();
index d5055e1..0de3a44 100644 (file)
@@ -135,7 +135,7 @@ void KitaThreadView::slotShowThread(const Kita2ch::Board& board, const Kita2ch::
 {
   { //reset member variables associated with a thread.
     m_threadPart->m_prevQuery = "";
-    m_nextHit = 0;
+    m_threadPart->m_nextHit = 0;
     m_threadPart->m_hitCount = 0;
     m_writeResult = "";
     m_threadData = "";
@@ -391,19 +391,19 @@ void KitaThreadView::searchNext(const QStringList &query)
   if ( query.isEmpty() ) return;
   if ( ! HighLightButton->isOn() ) {
     HighLightButton->toggle();
-    m_nextHit = 0; //A next jump-search target reset to '0'.
+    m_threadPart->m_nextHit = 0; //A next jump-search target reset to '0'.
     // Process works asynchronusly. So Firstly, we don't do jump-search as a simple solution.
     return;
   }
   if ( query != m_threadPart->m_prevQuery ) {
     highLighten( true, query );
-    m_nextHit = 0; //A next jump-search target reset to '0'.
+    m_threadPart->m_nextHit = 0; //A next jump-search target reset to '0'.
     return;
   }
 
-  gotoAnchor( QString("highlighten%1").arg(m_nextHit)  );
-  ++m_nextHit;
-  if ( !( m_nextHit < m_threadPart->m_hitCount ) ) m_nextHit = 0;
+  gotoAnchor( QString("highlighten%1").arg(m_threadPart->m_nextHit)  );
+  ++(m_threadPart->m_nextHit);
+  if ( !( m_threadPart->m_nextHit < m_threadPart->m_hitCount ) ) m_threadPart->m_nextHit = 0;
 }
 
 void KitaThreadView::highLighten(bool yes, const QStringList &query)
@@ -423,7 +423,6 @@ void KitaThreadView::highLighten(bool yes, const QStringList &query)
 #endif
 //  m_threadPart->setUserStyleSheet( highlightCSS );
 
-
   if ( m_threadPart->m_prevQuery != query && !query.isEmpty() ) {
     m_threadPart->m_prevQuery = query;
     slotDisplayContents( m_threadPart->m_contents, m_thread.datURL() );
index 30c0d77..d9f7208 100644 (file)
@@ -84,7 +84,7 @@ private: // Private attributes
   KIO::Job * m_currentJob;
 //  QString m_contents;
   int m_labelMaxLength;
-  int m_nextHit;
+//  int m_nextHit;
   QValueStack<QPoint> m_pointStack;
 
   void insertSearchCombo();