void KitaMainWindow::bookmark( const Kita::Thread& thread, bool on )
{
- Kita::Thread* t = new Kita::Thread( thread.datURL(), thread.name(), thread.resNum() );
+ Kita::Thread* t = new Kita::Thread( thread.datURL(), thread.name() );
+ KitaThreadInfo::setResNum( thread.datURL(), thread.resNum() );
FavoriteThreads* favorite = FavoriteThreads::getInstance();
if( on ) {
Kita::Board::setName( Kita::datToBoard( datURL.url() ), m_board->name() );
Kita::Thread* thread = new Kita::Thread( datURL.url(),
- item->text( Row_Subject ),
- item->text( Row_Read ).toInt() );
+ item->text( Row_Subject ) );
+ KitaThreadInfo::setResNum( datURL.url(), item->text( Row_Read ).toInt() );
emit signalShowThread( *thread );
}
#include <qdict.h>
#include "kita_misc.h"
+#include "threadinfo.h"
#include "qcp932codec.h"
KURL datURL = m_boardURL;
datURL.addPath("/dat/" + fname);
Kita::Board::setName( datToBoard( datURL.url() ), name() );
- Kita::Thread* thread = new Kita::Thread( datURL.url(), subject, num.toInt());
+ Kita::Thread* thread = new Kita::Thread( datURL.url(), subject );
+ KitaThreadInfo::setResNum( datURL.url(), num.toInt() );
threadList.append(thread);
}
}
#include <kdebug.h>
+#include "threadinfo.h"
+
FavoriteThreads* FavoriteThreads::instance = 0;
FavoriteThreads::FavoriteThreads()
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(), thread.resNum() ) );
+ m_threadList.append( new Kita::Thread( thread.datURL(), thread.name() ) );
+ KitaThreadInfo::setResNum( thread.datURL(), thread.resNum() );
delete m_threadParser;
m_threadParser = 0;
{
}
-Thread::Thread( const QString& datURL, const QString& threadName, int resNum )
+Thread::Thread( const QString& datURL, const QString& threadName )
: m_datURL( datURL ), m_threadName( threadName )
{
- setResNum( resNum );
}
Thread::Thread( const Thread& obj )
m_boardParser->endElement( namespaceURI, localName, qName );
} else if( localName == "thread" ) {
m_inThread = false;
- m_thread = Kita::Thread( m_datUrlStr, m_threadName, m_resNum );
+ m_thread = Kita::Thread( m_datUrlStr, m_threadName );
+ KitaThreadInfo::setResNum( m_datUrlStr, m_resNum );
m_isValid = true;
// create thread;
} else if( localName == "daturl" ) {
instance = new ThreadFactory();
}
- Thread* new_thread = new Thread( thread.datURL(), thread.name(), thread.resNum() );
+ Thread* new_thread = new Thread( thread.datURL(), thread.name() );
+ KitaThreadInfo::setResNum( thread.datURL(), thread.resNum() );
instance->m_dict.insert( thread.datURL(), new_thread );
}
QString m_datURL;
QString m_threadName;
public:
+ Thread( const QString& datURL, const QString& threadName = QString::null );
Thread();
- Thread( const QString& datURL, const QString& threadName = QString::null, int resNum = 0 );
Thread( const Thread& obj );
~Thread();
Thread& operator=( const Thread& obj );