datURL.addPath( "/dat/" + datName );
Kita::Board::setName( Kita::datToBoard( datURL.url() ), m_board->name() );
- Kita::Thread* thread = new Kita::Thread( datURL.url(),
- item->text( Row_Subject ) );
+ Kita::Thread::setName( datURL.url(), item->text( Row_Subject ) );
+ Kita::Thread* thread = Kita::Thread::getByURL( datURL.url() );
KitaThreadInfo::setResNum( datURL.url(), item->text( Row_Read ).toInt() );
emit signalShowThread( thread );
if ( regexp.search( url.url() ) == -1 ) {
emit openURLRequest( url, args );
} else {
- Kita::Thread* thread = new Kita::Thread( url.url() );
+ Kita::Thread* thread = Kita::Thread::getByURL( url.url() );
showThreadWithNewTab( thread );
}
}
KURL datURL = m_boardURL;
datURL.addPath("/dat/" + fname);
Kita::Board::setName( datToBoard( datURL.url() ), name() );
- Kita::Thread* thread = new Kita::Thread( datURL.url(), subject );
+ Kita::Thread::setName( datURL.url(), subject );
+ Kita::Thread* thread = Kita::Thread::getByURL( datURL.url() );
KitaThreadInfo::setResNum( datURL.url(), num.toInt() );
threadList.append(thread);
}
m_inThread = false;
m_threadParser->endElement( namespaceURI, localName, qName );
Kita::Thread thread = m_threadParser->getThread();
- m_threadList.append( new Kita::Thread( thread.datURL(), thread.name() ) );
+ Kita::Thread::setName( thread.datURL(), thread.name() );
+ m_threadList.append( Kita::Thread::getByURL( thread.datURL() ) );
KitaThreadInfo::setResNum( thread.datURL(), thread.resNum() );
delete m_threadParser;
class Thread
{
- public:
Thread( const QString& datURL, const QString& threadName = QString::null );
Thread();
+ friend class ThreadAccess;
+ friend class ThreadXmlParser;
+ public:
~Thread();
const QString& datURL() const;
connect( m_threadview, SIGNAL( showThreadCompleted( const KURL& ) ),
this, SLOT( slotOpenURLResult() ) );
- m_threadview->showThread( new Kita::Thread( m_url.url() ) );
+ m_threadview->showThread( Kita::Thread::getByURL( m_url.url() ) );
emit started( 0 );
return true;
}