OSDN Git Service

reformat
[kita/kita.git] / kita / src / libkita / thread.cpp
index cc39bc8..5c2fc5d 100644 (file)
@@ -18,7 +18,7 @@ using namespace Kita;
 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()
@@ -39,12 +39,12 @@ const QString& Thread::threadName() const
 void Thread::setThreadName( QString threadName )
 {
     /* remove space */
-    QRegExp qrx(" +$");    
+    QRegExp qrx( " +$" );
     threadName.replace( qrx, "" );
 
     /* unescape */
     threadName.replace( "&lt;", "<" ).replace( "&gt;", ">" ).replace( "&amp;", "&" );
-    
+
     m_threadName = threadName;
 }
 
@@ -115,7 +115,7 @@ bool Thread::isMarked( int num )
 {
     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;
@@ -125,9 +125,9 @@ bool Thread::isMarked( int num )
 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;
@@ -163,9 +163,9 @@ Thread* Thread::getByURLNew( const KURL& datURL )
 
 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 ) {