QString datName = item->text(Row_DatName);
KURL datURL = m_board.url();
datURL.addPath("/dat/" + datName);
- emit signalShowThread(m_board, Kita::Thread(datURL));
+ emit signalShowThread(m_board, Kita::Thread(m_board, datURL));
}
void KitaSubjectView::loadBoard(const Kita::Board& board)
KURL datURL = m_boardURL;
datURL.addPath("/dat/" + fname);
- Kita::Thread* thread = new Kita::Thread(datURL, subject, num.toInt());
+ Kita::Thread* thread = new Kita::Thread(*this, datURL, subject, num.toInt());
m_threadList.append(thread);
}
}
m_boardID = m_board->id();
}
+/*
Thread::Thread(const KURL& datURL, const QString threadName, int resNum)
: m_datURL(datURL), m_threadName(threadName), m_resNum(resNum), m_board( 0 )
{
m_datID = m_datURL.filename().section(".", 0, 0);
m_boardID = KURL(datURL, "..").fileName();
-}
+}*/
Thread::~Thread()
{
- delete m_board;
+// crash!!!
+// delete m_board;
}
const KURL& Thread::datURL() const
public:
Thread();
Thread(const Board& board, const KURL& datURL, const QString threadName = QString::null, int resNum = 0);
- Thread(const KURL& datURL, const QString threadName = QString::null, int resNum = 0);
+// Thread(const KURL& datURL, const QString threadName = QString::null, int resNum = 0);
~Thread();
const KURL& datURL() const;
const KURL url() const;
m_url = _url;
emit setWindowCaption( m_url.url() );
connect( m_threadview, SIGNAL( showThreadCompleted(const KURL&) ),
- this, SLOT( slotOpenURLResult() ) );
- m_threadview->slotShowThread( Kita::Board(m_url.upURL().upURL()) , Kita::Thread(m_url) );
+ this, SLOT( slotOpenURLResult() ) );
+
+ Kita::Board board( m_url.upURL().upURL() );
+ m_threadview->slotShowThread( board, Kita::Thread( board, m_url ) );
emit started( 0 );
return true;
}
void KitaThreadView::slotRedirection(KIO::Job *, const KURL & newURL)
{
printf(" Redirected to newURL: %s\n", newURL.url().latin1() );
- m_thread = Kita::Thread(newURL);
+ m_thread = Kita::Thread(m_board, newURL);
emit setLocationBarURL(newURL.url());
}
KActionCollection * collection = client->actionCollection();
KAction * action;
action = new KAction( i18n("goback anchor"), SmallIcon("idea"), KShortcut(), m_threadPart, SLOT( gobackAnchor() ), collection, "goback_anchor" );
- printf(" KitaThreadView::slotPopupMenu() %p\n", action);
+// printf(" KitaThreadView::slotPopupMenu() %p\n", action);
emit popupMenu(client, global, url, mimeType, mode);
}