OSDN Git Service

refactoring...
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 2 Jun 2003 12:37:01 +0000 (12:37 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 2 Jun 2003 12:37:01 +0000 (12:37 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@308 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/favoritelistview.cpp
kita/src/favoritelistview.h
kita/src/kita.cpp
kita/src/kitasubjectview.cpp
kita/src/kitasubjectview.h
kita/src/part/kitathreadpart.cpp
kita/src/part/kitathreadview.cpp
kita/src/part/kitathreadview.h

index 18a549b..528b305 100644 (file)
@@ -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 );
     }
   }
 }
index eb91917..15a8cd2 100644 (file)
@@ -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
index c127f89..0f11120 100644 (file)
@@ -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& ) ) );
index 2bb93af..e7f54a5 100644 (file)
@@ -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)
index f0e9c03..80edae0 100644 (file)
@@ -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);
 };
 
index 4a30915..734baa0 100644 (file)
@@ -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;
 }
index e3f688a..9bb7fb1 100644 (file)
@@ -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)
index 17b1eae..114a550 100644 (file)
@@ -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: