From 3d9751c55c32ba349353d354e83d49e74325f90d Mon Sep 17 00:00:00 2001 From: ikemo Date: Mon, 11 Jun 2007 14:41:51 +0000 Subject: [PATCH] remove unused. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1941 56b19765-1e22-0410-a548-a0f45d66c51a --- kita/src/bbs/bbsview.h | 3 -- kita/src/libkita/cache.cpp | 69 -------------------------------------------- kita/src/libkita/cache.h | 7 ----- kita/src/thread/domtree.cpp | 57 ++---------------------------------- kita/src/thread/domtree.h | 4 --- kita/src/thread/htmlpart.cpp | 6 ---- kita/src/thread/threadview.h | 3 -- 7 files changed, 3 insertions(+), 146 deletions(-) diff --git a/kita/src/bbs/bbsview.h b/kita/src/bbs/bbsview.h index 8a795bf..d0f1576 100644 --- a/kita/src/bbs/bbsview.h +++ b/kita/src/bbs/bbsview.h @@ -47,9 +47,6 @@ class KitaBBSView : public QWidget QColor m_backColor; QColor m_altColor; - QString getCategory( const QString& line ) const; - QString getBoardURL( const QString& line ) const; - bool isBoardURL( const QString& url ) const; QValueList getCategoryList( const QString& html ) const; void saveOpened(); diff --git a/kita/src/libkita/cache.cpp b/kita/src/libkita/cache.cpp index 7f6748f..fb63389 100644 --- a/kita/src/libkita/cache.cpp +++ b/kita/src/libkita/cache.cpp @@ -102,72 +102,3 @@ QString Cache::getSubjectPath( const KURL& url ) return path + "subject.txt"; } - - - -/*------------------------------------*/ -/* for Image files */ - - -/* public */ -QString Cache::getImgPath( const KURL& url ) -{ - return baseDir() + "image/" + subDir( url ) + "/" + getImgFileName( url ); -} - - -/* path for image index */ /* public */ -QString Cache::getImgIdxPath( const KURL& url ) -{ - return getImgPath( url ) + ".idx"; -} - - -/* private */ -QString Cache::subDir( const KURL& url ) -{ - QString host = url.host().lower(); - int l = host.length(); - for ( int i = 0; i < l; i++ ) { - if ( host[ i ].isLetter() && ( host[ i ] != 'w' ) ) { - return QString( host[ i ] ); - } - } - return "0"; -} - - -/* private */ -QString Cache::hashString( const KURL& url ) -{ - unsigned long hash = 0x00000000; - QCString u = url.url().latin1(); - for ( int i = u.length(); i--; ) { - hash = ( hash * 12211 + u[ i ] ) % 2147483563; - } - - QString ret; - ret.sprintf( "%08lx", hash ); - - return ret; -} - - -/* private */ -QString Cache::getImgBaseDir() -{ - QString basedir = baseDir() + "image/"; - return basedir; -} - - -/* private */ -QString Cache::getImgFileName( const KURL& url ) -{ - QString host = url.host().lower(); - host.replace( QChar( '.' ), QChar( '_' ) ); - - QString filename = url.fileName().lower(); - - return host + "_" + hashString( url ) + filename; -} diff --git a/kita/src/libkita/cache.h b/kita/src/libkita/cache.h index 2341894..1e8cef0 100644 --- a/kita/src/libkita/cache.h +++ b/kita/src/libkita/cache.h @@ -22,11 +22,6 @@ namespace Kita */ class Cache { - static QString subDir( const KURL& url ); - static QString hashString( const KURL& url ); - static QString getImgBaseDir(); - static QString getImgFileName( const KURL& src ); - public: static QString baseDir(); static QString serverDir( const KURL& url ); @@ -37,8 +32,6 @@ namespace Kita static QString getSettingPath( const KURL& url ); static QString getBBSHistoryPath( const KURL& url ); static QString getSubjectPath( const KURL& url ); - static QString getImgPath( const KURL& url ); - static QString getImgIdxPath( const KURL& url ); }; } diff --git a/kita/src/thread/domtree.cpp b/kita/src/thread/domtree.cpp index dec89ec..b91d788 100644 --- a/kita/src/thread/domtree.cpp +++ b/kita/src/thread/domtree.cpp @@ -330,57 +330,6 @@ void KitaDomTree::removeMae100() if ( !m_mae100.parentNode().isNull() ) m_mae100.parentNode().removeChild( m_mae100 ); } - -/* create & append comment node */ /* public */ -void KitaDomTree::createCommentNode( const QString& comment, const QString& idstr, - int beforeBR, - int afterBR, - bool binsert ) -{ - if ( m_hdoc == NULL ) return ; - - DOM::Element rootnode; - - rootnode = m_hdoc.createElement( "DIV" ); - { - for ( int i = 0; i < beforeBR; i++ ) - rootnode.appendChild( m_hdoc.createElement( "BR" ) ); - rootnode.setAttribute( "kita_type", "comment" ); - rootnode.setAttribute( "id", idstr ); - rootnode.appendChild( m_hdoc.createTextNode( comment ) ); - for ( int i = 0; i < afterBR; i++ ) - rootnode.appendChild( m_hdoc.createElement( "BR" ) ); - } - - if ( binsert ) { - if ( m_hdoc.body().firstChild() != NULL ) { - m_hdoc.body().insertBefore( rootnode, m_hdoc.body().firstChild() ); - return ; - } - } - - m_hdoc.body().appendChild( rootnode ); -} - - -/* create belt node */ /* public */ -void KitaDomTree::createBeltNode( const QString& idstr ) -{ - DOM::Element rootnode; - - QString style = "background-color: #CCCCCC; text-align: center"; - - rootnode = m_hdoc.createElement( "DIV" ); - { - rootnode.setAttribute( "style", style ); - rootnode.setAttribute( "id", idstr ); - rootnode.appendChild( m_hdoc.createElement( "BR" ) ); - } - - m_hdoc.body().appendChild( rootnode ); -} - - /*--------------------------------------------------------*/ /* private functions */ @@ -561,7 +510,7 @@ void KitaDomTree::createMae100() rootnode.setAttribute( "id", "mae100" ); rootnode.setAttribute( "style", style ); - /* ¼¡100 */ + /* ��100 */ QString tugi100 = Kita::utf8ToUnicode( KITAUTF8_TUGI100 ); appendANode( rootnode, "#tmp100", tugi100 ); @@ -581,14 +530,14 @@ void KitaDomTree::createMae100() /* */ rootnode.appendChild( m_hdoc.createElement( "BR" ) ); - /* Á°100 */ + /* �100 */ QString mae100 = Kita::utf8ToUnicode( KITAUTF8_MAE100 ); appendANode( rootnode, "#mae100", mae100 ); /* */ rootnode.appendChild( m_hdoc.createTextNode( " " ) ); - /* Á´ÉôÁ° */ + /* ���� */ QString zenbumae = Kita::utf8ToUnicode( KITAUTF8_ZENBUMAE ); appendANode( rootnode, "#maezenbu", zenbumae ); diff --git a/kita/src/thread/domtree.h b/kita/src/thread/domtree.h index eaad9ea..57130df 100644 --- a/kita/src/thread/domtree.h +++ b/kita/src/thread/domtree.h @@ -90,10 +90,6 @@ public: void appendMae100(); void removeMae100(); - void createCommentNode( const QString& comment, const QString& idstr, int beforeBR, int afterBR, bool binsert ); - void createBeltNode( const QString& idstr ); - - private: void appendANode( DOM::Element rootnode, const QString& linkstr, const QString& comment ); diff --git a/kita/src/thread/htmlpart.cpp b/kita/src/thread/htmlpart.cpp index 8e9c3f9..e1a012f 100644 --- a/kita/src/thread/htmlpart.cpp +++ b/kita/src/thread/htmlpart.cpp @@ -960,14 +960,9 @@ void KitaHTMLPart::showPopupMenu( const KURL& kurl ) ID_COPY_Link, ID_Copy_Str, ID_Abone_Word, - ID_Extract, ID_Search_Google, ID_Open_Browser, - ID_Show_Imgview, - ID_Mosaic, - ID_Del_Image, - /*-----------------*/ ID_Back_Link /* stay bottom */ }; @@ -1067,7 +1062,6 @@ void KitaHTMLPart::showPopupMenu( const KURL& kurl ) selectedStr.append( "..." ); } - popupMenu->insertItem( i18n( "Extract by '%1'" ).arg( selectedStr ), ID_Extract ); popupMenu->insertItem( i18n( "Add '%1' to abone list" ).arg( selectedStr ), ID_Abone_Word ); popupMenu->insertItem( i18n( "Search '%1' by Google" ).arg( selectedStr ), ID_Search_Google ); } diff --git a/kita/src/thread/threadview.h b/kita/src/thread/threadview.h index c7bfe70..b926aaf 100644 --- a/kita/src/thread/threadview.h +++ b/kita/src/thread/threadview.h @@ -62,9 +62,6 @@ public: void showStatusBar( QString info ); int getViewMode() { return m_viewmode; } - /* for preview and KitaNavi */ - KitaHTMLPart* getPart() { return m_threadPart; } - public slots: virtual void setFocus(); -- 2.11.0