OSDN Git Service

refactoring.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 5 May 2004 04:40:45 +0000 (04:40 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Wed, 5 May 2004 04:40:45 +0000 (04:40 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1022 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/kita.cpp
kita/src/kita.h
kita/src/kitathreadtabwidget.cpp
kita/src/kitathreadtabwidget.h
kita/src/part/kitathreadview.cpp
kita/src/part/kitathreadview.h

index 61c588f..997eed4 100644 (file)
@@ -119,8 +119,8 @@ KitaMainWindow::KitaMainWindow()
     connect( m_subjectTab, SIGNAL( loadBoardCompleted( const KURL& ) ),
              SLOT( setUrl( const KURL& ) ) );
 
-    connect( m_threadTab, SIGNAL( bookmarked( const Kita::Thread*, bool ) ),
-             SLOT( bookmark( const Kita::Thread*, bool ) ) );
+    connect( m_threadTab, SIGNAL( bookmarked( const QString&, bool ) ),
+             SLOT( bookmark( const QString&, bool ) ) );
 
     connect( m_urlLine, SIGNAL( returnPressed() ),
              SLOT( slotUrlLine() ) );
@@ -590,14 +590,14 @@ void KitaMainWindow::setUrl( const KURL& url )
     m_urlLine->setText( url.url() );
 }
 
-void KitaMainWindow::bookmark( const Kita::Thread* thread, bool on )
+void KitaMainWindow::bookmark( const QString& datURL, bool on )
 {
     FavoriteThreads* favorite = FavoriteThreads::getInstance();
 
     if ( on ) {
-        favorite->insert( thread->datURL() );
+        favorite->insert( datURL );
     } else {
-        favorite->remove( thread->datURL() );
+        favorite->remove( datURL );
     }
 }
 
index a068c57..424bae6 100644 (file)
@@ -113,7 +113,7 @@ private slots:
     void slotWriteSucceeded();
     void slotUrlLine();
     void setUrl( const KURL& url );
-    void bookmark( const Kita::Thread* thread, bool on );
+    void bookmark( const QString& datURL, bool on );
     void slotThread( const Kita::Thread* thread );
 
 private:
index 35b6821..869faf8 100644 (file)
@@ -139,8 +139,8 @@ void KitaThreadTabWidget::connectSignals( KitaThreadView* view )
              this, SIGNAL( thread( const Kita::Thread* ) ) );
     connect( view, SIGNAL( writeSucceeded() ),
              this, SIGNAL( writeSucceeded() ) );
-    connect( view, SIGNAL( bookmarked( const Kita::Thread*, bool ) ),
-             this, SIGNAL( bookmarked( const Kita::Thread*, bool ) ) );
+    connect( view, SIGNAL( bookmarked( const QString&, bool ) ),
+             this, SIGNAL( bookmarked( const QString&, bool ) ) );
     connect( view, SIGNAL( showThreadCompleted( const KURL& ) ),
              this, SIGNAL( showThreadCompleted( const KURL& ) ) );
     connect( view, SIGNAL( thread( const Kita::Thread* ) ),
index e28a169..573272b 100644 (file)
@@ -61,7 +61,7 @@ signals:
     void signalChangeStatusbar( const QString& );
     void thread( const Kita::Thread* );
     void writeSucceeded();
-    void bookmarked( const Kita::Thread*, bool on );
+    void bookmarked( const QString& datURL, bool on );
     void showThreadCompleted( const KURL& threadUrl );
     void sigHideSubject();    
 };
index d015600..02559ef 100644 (file)
@@ -385,7 +385,7 @@ void KitaThreadView::slotPostStarted( KIO::Job*, const Kita::PostInfo& info )
 
 void KitaThreadView::slotBookmarkButtonClicked( bool on )
 {
-    emit bookmarked( m_thread, on );
+    emit bookmarked( m_thread->datURL(), on );
 }
 
 void KitaThreadView::killJob()
index 8c100c4..0531116 100644 (file)
@@ -159,7 +159,7 @@ signals:
     void popupMenu( KXMLGUIClient*, const QPoint&, const KURL&, const QString&, mode_t );
     void thread( const Kita::Thread* );
     void writeSucceeded();
-    void bookmarked( const Kita::Thread*, bool on );
+    void bookmarked( const QString& datURL, bool on );
 };
 
 namespace Kita