From d5d4d4e19005b3e2368afbb5bb070e804fe78b0a Mon Sep 17 00:00:00 2001 From: ikemo Date: Mon, 2 Jun 2003 12:37:01 +0000 Subject: [PATCH] refactoring... git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@308 56b19765-1e22-0410-a548-a0f45d66c51a --- kita/src/favoritelistview.cpp | 2 +- kita/src/favoritelistview.h | 2 +- kita/src/kita.cpp | 4 ++-- kita/src/kitasubjectview.cpp | 6 +++--- kita/src/kitasubjectview.h | 2 +- kita/src/part/kitathreadpart.cpp | 2 +- kita/src/part/kitathreadview.cpp | 6 +++--- kita/src/part/kitathreadview.h | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/kita/src/favoritelistview.cpp b/kita/src/favoritelistview.cpp index 18a549b..528b305 100644 --- a/kita/src/favoritelistview.cpp +++ b/kita/src/favoritelistview.cpp @@ -82,7 +82,7 @@ void FavoriteListView::loadThread( QListViewItem* item ) const Kita::Thread& thread = it.data(); if( thread.datURL().prettyURL() == item->text( Row_DatURL ) ) { - emit signalShowThread( *(thread.getBoard()), thread); + emit signalShowThread( thread ); } } } diff --git a/kita/src/favoritelistview.h b/kita/src/favoritelistview.h index eb91917..15a8cd2 100644 --- a/kita/src/favoritelistview.h +++ b/kita/src/favoritelistview.h @@ -29,7 +29,7 @@ public: private slots: void loadThread( QListViewItem* item ); signals: - void signalShowThread(const Kita::Board& board, const Kita::Thread& thread); + void signalShowThread( const Kita::Thread& thread ); }; #endif diff --git a/kita/src/kita.cpp b/kita/src/kita.cpp index c127f89..0f11120 100644 --- a/kita/src/kita.cpp +++ b/kita/src/kita.cpp @@ -78,8 +78,8 @@ KitaMainWindow::KitaMainWindow() this, SLOT(changeStatusbar(const QString&))); connect(m_boardView, SIGNAL(clicked(const Kita::Board&)), m_subjectView, SLOT(loadBoard(const Kita::Board&))); - connect(m_subjectView, SIGNAL(signalShowThread(const Kita::Board&, const Kita::Thread&)), - m_threadView, SLOT(slotShowThread(const Kita::Board&, const Kita::Thread&))); + connect(m_subjectView, SIGNAL(signalShowThread( const Kita::Thread&) ), + m_threadView, SLOT(slotShowThread( const Kita::Thread&) ) ); connect(m_threadView, SIGNAL( thread(const Kita::Thread& ) ), SLOT( updateThreadCache( const Kita::Thread& ) ) ); connect( m_threadView, SIGNAL( thread( const Kita::Thread& ) ), m_subjectView, SLOT( updateThread( const Kita::Thread& ) ) ); diff --git a/kita/src/kitasubjectview.cpp b/kita/src/kitasubjectview.cpp index 2bb93af..e7f54a5 100644 --- a/kita/src/kitasubjectview.cpp +++ b/kita/src/kitasubjectview.cpp @@ -68,8 +68,8 @@ KitaSubjectView::KitaSubjectView(QWidget *parent, const char *name) connect(this, SIGNAL(signalSubjectListClicked(QListViewItem*)), subjectList, SIGNAL(clicked(QListViewItem*))); connect( HideButton, SIGNAL( toggled(bool) ), SLOT( slotHideButton(bool) ) ); connect( m_subjectTab, SIGNAL( currentChanged(QWidget*) ), SLOT( slotCurrentChanged(QWidget*) ) ); - connect( m_favoriteListView, SIGNAL( signalShowThread( const Kita::Board&, const Kita::Thread& ) ), - SIGNAL( signalShowThread( const Kita::Board&, const Kita::Thread& ) ) ); + connect( m_favoriteListView, SIGNAL( signalShowThread( const Kita::Thread& ) ), + SIGNAL( signalShowThread( const Kita::Thread& ) ) ); } KitaSubjectView::~KitaSubjectView() @@ -87,7 +87,7 @@ void KitaSubjectView::loadThread(QListViewItem* item) QString datName = item->text(Row_DatName); KURL datURL = m_board.url(); datURL.addPath("/dat/" + datName); - emit signalShowThread(m_board, Kita::Thread(m_board, datURL)); + emit signalShowThread( Kita::Thread(m_board, datURL) ); } void KitaSubjectView::loadBoard(const Kita::Board& board) diff --git a/kita/src/kitasubjectview.h b/kita/src/kitasubjectview.h index f0e9c03..80edae0 100644 --- a/kita/src/kitasubjectview.h +++ b/kita/src/kitasubjectview.h @@ -57,7 +57,7 @@ private slots: signals: void loadBoardCompleted(const KURL&); - void signalShowThread(const Kita::Board& board, const Kita::Thread& thread); + void signalShowThread( const Kita::Thread& thread ); void signalSubjectListClicked(QListViewItem* item); }; diff --git a/kita/src/part/kitathreadpart.cpp b/kita/src/part/kitathreadpart.cpp index 4a30915..734baa0 100644 --- a/kita/src/part/kitathreadpart.cpp +++ b/kita/src/part/kitathreadpart.cpp @@ -100,7 +100,7 @@ bool KitaThreadPart::openURL( const KURL& _url ) this, SLOT( slotOpenURLResult() ) ); Kita::Board board( m_url.upURL().upURL() ); - m_threadview->slotShowThread( board, Kita::Thread( board, m_url ) ); + m_threadview->slotShowThread( Kita::Thread( board, m_url ) ); emit started( 0 ); return true; } diff --git a/kita/src/part/kitathreadview.cpp b/kita/src/part/kitathreadview.cpp index e3f688a..9bb7fb1 100644 --- a/kita/src/part/kitathreadview.cpp +++ b/kita/src/part/kitathreadview.cpp @@ -128,7 +128,7 @@ void KitaThreadView::slotDOMNodeActivated(const DOM::Node &node) } // end of Anchor tags. } -void KitaThreadView::slotShowThread(const Kita::Board& board, const Kita::Thread& thread) +void KitaThreadView::slotShowThread( const Kita::Thread& thread ) { { //reset member variables associated with a thread. m_threadPart->setPrevQuery(""); @@ -140,7 +140,7 @@ void KitaThreadView::slotShowThread(const Kita::Board& board, const Kita::Thread m_threadPart->clearPosition(); } - m_board = board; + m_board = *(thread.getBoard()); m_thread = thread; if ( m_thread.datURL().protocol() != "k2ch" ) { KIO::SlaveConfig::self()->setConfigData("http", m_thread.datURL().host() , @@ -458,7 +458,7 @@ void KitaThreadView::slotOpenURLRequest(const KURL& url, const KParts::URLArgs& void KitaThreadView::slotReloadButton() { - slotShowThread(m_board, m_thread); + slotShowThread( m_thread ); } KURL KitaThreadView::filterReadCGI(const KURL& url) diff --git a/kita/src/part/kitathreadview.h b/kita/src/part/kitathreadview.h index 17b1eae..114a550 100644 --- a/kita/src/part/kitathreadview.h +++ b/kita/src/part/kitathreadview.h @@ -59,7 +59,7 @@ public slots: void slotWriteButtonClicked(); void slotCanceled(KIO::Job* job); void slotShowErrorDialog(const QString& input, const KURL& urlOfInput = 0); - void slotShowThread(const Kita::Board& board, const Kita::Thread& thread); + void slotShowThread( const Kita::Thread& thread ); void setFont( const QFont& font ); protected slots: -- 2.11.0