From 338dff1f1306f05b08d294bc456c5a18a5f95f30 Mon Sep 17 00:00:00 2001 From: ikemo Date: Wed, 13 Jun 2007 13:59:32 +0000 Subject: [PATCH] remove unused logic. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1948 56b19765-1e22-0410-a548-a0f45d66c51a --- kita/src/thread/domtree.cpp | 19 +------------------ kita/src/thread/domtree.h | 3 --- kita/src/thread/htmlpart.cpp | 3 --- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/kita/src/thread/domtree.cpp b/kita/src/thread/domtree.cpp index 1fe2429..3ad6fc7 100644 --- a/kita/src/thread/domtree.cpp +++ b/kita/src/thread/domtree.cpp @@ -29,10 +29,6 @@ KitaDomTree::KitaDomTree( const DOM::HTMLDocument& hdoc, const KURL& datURL ) { - /* config */ - - /*-----------------------------*/ - m_hdoc = hdoc; m_bufSize = 0; m_bottomNum = 0; @@ -77,7 +73,6 @@ bool KitaDomTree::createResElement( int num ) m_titleElm.resize( m_bufSize ); m_bodyElm.resize( m_bufSize ); - m_resshown.resize( m_bufSize, FALSE ); m_resStatus.resize( m_bufSize, KITA_HTML_NOTPARSED ); m_coloredNum.resize( m_bufSize, FALSE ); } @@ -109,7 +104,6 @@ bool KitaDomTree::appendRes( int num ) m_hdoc.body().appendChild( m_titleElm[ num ] ); m_hdoc.body().appendChild( m_bodyElm[ num ] ); - m_resshown[ num ] = TRUE; if ( num > m_bottomNum ) m_bottomNum = num; @@ -130,9 +124,6 @@ void KitaDomTree::redraw( bool force ) m_datInfo->resetAbone(); for ( int i = 1; i <= readNum; i++ ) { - - if ( !m_resshown[ i ] ) continue; - QString titleHTML, bodyHTML; int oldStatus = m_resStatus[ i ]; m_resStatus[ i ] = m_datInfo->getHTML( i , TRUE, titleHTML, bodyHTML ); @@ -154,7 +145,7 @@ void KitaDomTree::changeColorOfAllResponsedNumber() { for ( int i = 1; i <= m_bottomNum; ++i ) { - if ( m_resshown[ i ] && m_datInfo->isResponsed( i ) ) changeColorOfNumber( i ); + if ( m_datInfo->isResponsed( i ) ) changeColorOfNumber( i ); } } @@ -165,12 +156,6 @@ void KitaDomTree::changeColorOfAllResponsedNumber() /* public information */ /* public */ -const bool KitaDomTree::isResShown( int num ) const -{ - return m_resshown[ QMIN( num, m_bufSize - 1 ) ]; -} - -/* public */ const int KitaDomTree::getBottomResNumber() const { return m_bottomNum; @@ -212,7 +197,6 @@ void KitaDomTree::appendKokoyon() if ( viewPos == 0 ) return ; int i = viewPos + 1; - while ( !m_resshown[ i ] && i <= readNum ) i++; if ( i <= readNum ) m_hdoc.body().insertBefore( m_kokoyon, m_titleElm[ i ] ); else m_hdoc.body().appendChild( m_kokoyon ); @@ -353,7 +337,6 @@ void KitaDomTree::changeColorOfNumber( int num ) if ( ! m_datInfo ) return ; if ( m_hdoc == NULL ) return ; if ( m_coloredNum[ num ] ) return ; - if ( !m_resshown[ num ] ) return ; m_coloredNum[ num ] = TRUE; DOM::Node node = m_titleElm[ num ]; diff --git a/kita/src/thread/domtree.h b/kita/src/thread/domtree.h index b69f072..2e8a3bf 100644 --- a/kita/src/thread/domtree.h +++ b/kita/src/thread/domtree.h @@ -38,10 +38,8 @@ class KitaDomTree then m_resshown[i] = FALSE. */ int m_templateNum; - int m_topNum; int m_bottomNum; int m_headerMaxNum; - QValueVector < bool > m_resshown; /* the res is shown */ QValueVector < int > m_resStatus; /* return val of DatInfo::getHTML(). See datinfo.h */ QValueVector < bool > m_coloredNum; /* colored number */ @@ -69,7 +67,6 @@ public: /* information */ - const bool isResShown( int num ) const; const int getBottomResNumber() const; /* header Node, footer Node, kokomadeyonda Node, etc... */ diff --git a/kita/src/thread/htmlpart.cpp b/kita/src/thread/htmlpart.cpp index d8f5c69..4c40011 100644 --- a/kita/src/thread/htmlpart.cpp +++ b/kita/src/thread/htmlpart.cpp @@ -528,9 +528,6 @@ bool KitaHTMLPart::gotoAnchor( const QString& anc, bool pushPosition ) /* is target valid ? */ if ( !Kita::DatManager::isResValid( m_datURL, res ) ) return FALSE; - /* Target is not shown. Maybe it is aboned. */ - while ( res > 1 && !m_domtree->isResShown( res ) ) res--; - ancstr = QString().setNum( res ); } -- 2.11.0