QDict<Thread>* Thread::m_threadDict = 0;
Thread::Thread( const KURL& datURL )
- : m_datURL( datURL ), m_threadName( 0 ) , m_resNum( 0 ), m_readNum( 0 ), m_viewPos( 0 ), m_isOpened( 0 )
+ : m_datURL( datURL ), m_threadName( 0 ) , m_resNum( 0 ), m_readNum( 0 ), m_viewPos( 0 ), m_isOpened( 0 )
{}
Thread::~Thread()
void Thread::setThreadName( QString threadName )
{
/* remove space */
- QRegExp qrx(" +$");
+ QRegExp qrx( " +$" );
threadName.replace( qrx, "" );
/* unescape */
threadName.replace( "<", "<" ).replace( ">", ">" ).replace( "&", "&" );
-
+
m_threadName = threadName;
}
{
QValueList< int >::iterator it;
for ( it = m_markList.begin(); it != m_markList.end(); ++it ) {
- if( ( *it ) == num ) return TRUE;
+ if ( ( *it ) == num ) return TRUE;
}
return FALSE;
bool Thread::setMark( int num, bool newStatus )
{
bool status = isMarked( num );
- if( status == newStatus ) return FALSE;
+ if ( status == newStatus ) return FALSE;
- if( newStatus ) m_markList += num;
+ if ( newStatus ) m_markList += num;
else m_markList.remove( num );
return TRUE;
void Thread::replace( const QString& fromURL, const QString& toURL )
{
- if( m_threadDict == NULL ) return;
+ if ( m_threadDict == NULL ) return ;
QDictIterator<Kita::Thread> it( *m_threadDict );
- for( ; it.current(); ++it ) {
+ for ( ; it.current(); ++it ) {
QString url = it.currentKey();
Kita::Thread* thread = it.current();
if ( url.find( fromURL ) == 0 ) {