From 82815ba52216c846d0cc7e72f77a8c7216072c8e Mon Sep 17 00:00:00 2001 From: ikemo Date: Thu, 1 May 2003 11:36:18 +0000 Subject: [PATCH] now refactoring... git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@191 56b19765-1e22-0410-a548-a0f45d66c51a --- kita/src/part/kitahtmlpart.h | 1 + kita/src/part/kitathreadview.cpp | 13 ++++++------- kita/src/part/kitathreadview.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kita/src/part/kitahtmlpart.h b/kita/src/part/kitahtmlpart.h index e8512da..9e8dd90 100644 --- a/kita/src/part/kitahtmlpart.h +++ b/kita/src/part/kitahtmlpart.h @@ -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(); diff --git a/kita/src/part/kitathreadview.cpp b/kita/src/part/kitathreadview.cpp index d5055e1..0de3a44 100644 --- a/kita/src/part/kitathreadview.cpp +++ b/kita/src/part/kitathreadview.cpp @@ -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() ); diff --git a/kita/src/part/kitathreadview.h b/kita/src/part/kitathreadview.h index 30c0d77..d9f7208 100644 --- a/kita/src/part/kitathreadview.h +++ b/kita/src/part/kitathreadview.h @@ -84,7 +84,7 @@ private: // Private attributes KIO::Job * m_currentJob; // QString m_contents; int m_labelMaxLength; - int m_nextHit; +// int m_nextHit; QValueStack m_pointStack; void insertSearchCombo(); -- 2.11.0