void KitaMainWindow::bookmark( const Kita::Thread& thread, bool on )
{
- Kita::Thread* t = new Kita::Thread( thread.getBoard(), thread.datURL(), thread.name(), thread.resNum() );
+ Kita::Thread* t = new Kita::Thread( thread.boardName(), thread.datURL(), thread.name(), thread.resNum() );
FavoriteThreads* favorite = FavoriteThreads::getInstance();
if( on ) {
m_inThread = false;
m_threadParser->endElement( namespaceURI, localName, qName );
Kita::Thread thread = m_threadParser->getThread();
- m_threadList.append( new Kita::Thread( *(thread.getBoard()), thread.datURL(), thread.name(), thread.resNum() ) );
+ m_threadList.append( new Kita::Thread( thread.boardName(), thread.datURL(), thread.name(), thread.resNum() ) );
delete m_threadParser;
m_threadParser = 0;
{
}
+Thread::Thread( const QString& boardName, const KURL& datURL, const QString& threadName, int resNum )
+ : m_datURL( datURL ), m_threadName( threadName ), m_resNum( resNum )
+{
+ m_board = new Board( datToBoard( datURL.url() ), boardName );
+}
+
Thread::Thread(const Board& board, const KURL& datURL, const QString threadName, int resNum)
: m_datURL(datURL), m_threadName(threadName), m_resNum(resNum)
{
m_board = new Board( board.url(), board.name() );
}
-Thread::Thread(const Board* board, const KURL& datURL, const QString threadName, int resNum)
- : m_datURL(datURL), m_threadName(threadName), m_resNum(resNum)
-{
- m_datID = m_datURL.filename().section(".", 0, 0);
- m_board = new Board( board->url(), board->name() );
-}
-
Thread::Thread( const KURL& datURL, const QString& threadName, int resNum )
: m_datURL( datURL ), m_threadName( threadName ), m_resNum( resNum ), m_board( 0 )
{
void ThreadAccess::slotRedirection(KIO::Job *, const KURL & newURL)
{
kdDebug() << "Redirected to newURL: " << newURL.url() << endl;
- m_thread = Kita::Thread( m_thread.getBoard(), newURL);
+ m_thread = Kita::Thread( m_thread.boardName(), newURL);
emit redirection( newURL.url() );
}
instance = new ThreadFactory();
}
- Thread* new_thread = new Thread( thread.getBoard(), thread.datURL(), thread.name(), thread.resNum() );
+ Thread* new_thread = new Thread( thread.boardName(), thread.datURL(), thread.name(), thread.resNum() );
instance->m_dict.insert( thread.datURL().url(), new_thread );
}
public:
Thread();
Thread( const Thread& obj );
+ Thread( const QString& boardName, const KURL& datURL, const QString& threadName = QString::null, int resNum = 0 );
Thread(const Board& board, const KURL& datURL, const QString threadName = QString::null, int resNum = 0);
- 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();
Thread& operator=( const Thread& obj );
const QString& name() const;
void setName(const QString& name) { m_threadName = name; }
void setResNum(int resNum) { m_resNum = resNum; }
- const Board* getBoard() const { return m_board; }
const QString& boardName() const;
const QString boardURL() const;
const QString boardID() const;