OSDN Git Service

reformat.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 9 Oct 2004 11:29:55 +0000 (11:29 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sat, 9 Oct 2004 11:29:55 +0000 (11:29 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1427 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/libkita/board.cpp

index 7e2ad0e..508b56c 100644 (file)
@@ -53,41 +53,41 @@ const QPtrList<Thread> Board::getThreadList( const QString& boardURL )
     QPtrList<Thread> threadList;
 
     /* get all obtained threads list */
-    if( boardURL == "http://virtual/obtained/" ){
-
-       QDictIterator<Kita::Board> it( *m_boardDict );
-       for ( ; it.current(); ++it ) {
-
-           /* get the cache dir */
-           QString boardUrl = it.currentKey() + "dat/";
-           QString cdir = Cache::getPath( boardUrl + "dummy.dat" );
-           int i = cdir.findRev( "dummy.dat");
-           cdir.truncate( i );
-           
-           /* get the file names */
-           QDir d( cdir );
-           if ( d.exists() ){
-               QStringList flist = d.entryList( "*.dat" );
-               for( QStringList::iterator it = flist.begin();  it != flist.end(); ++it ){
-                   if( (*it) == QString::null ) continue;
-
-                   QString datURL = boardUrl + (*it);
-
-                   /* get the name of the thread from the dat file */
-                   QString subject = DatManager::threadName( datURL );  
-
-                   if( subject == QString::null ) Kita::Thread::setName( datURL, "?" );
-                   int rnum = KitaThreadInfo::readNum( datURL );
-                   if( KitaThreadInfo::resNum( datURL ) < rnum ) KitaThreadInfo::setResNum( datURL, rnum  );
-                   Kita::Thread* thread = Kita::Thread::getByURL( datURL );
-                   threadList.append( thread );
-               }
-           }
-       }
-       
-       return threadList;      
+    if ( boardURL == "http://virtual/obtained/" ) {
+
+        QDictIterator<Kita::Board> it( *m_boardDict );
+        for ( ; it.current(); ++it ) {
+
+            /* get the cache dir */
+            QString boardUrl = it.currentKey() + "dat/";
+            QString cdir = Cache::getPath( boardUrl + "dummy.dat" );
+            int i = cdir.findRev( "dummy.dat" );
+            cdir.truncate( i );
+
+            /* get the file names */
+            QDir d( cdir );
+            if ( d.exists() ) {
+                QStringList flist = d.entryList( "*.dat" );
+                for ( QStringList::iterator it = flist.begin(); it != flist.end(); ++it ) {
+                    if ( ( *it ) == QString::null ) continue;
+
+                    QString datURL = boardUrl + ( *it );
+
+                    /* get the name of the thread from the dat file */
+                    QString subject = DatManager::threadName( datURL );
+
+                    if ( subject == QString::null ) Kita::Thread::setName( datURL, "?" );
+                    int rnum = KitaThreadInfo::readNum( datURL );
+                    if ( KitaThreadInfo::resNum( datURL ) < rnum ) KitaThreadInfo::setResNum( datURL, rnum );
+                    Kita::Thread* thread = Kita::Thread::getByURL( datURL );
+                    threadList.append( thread );
+                }
+            }
+        }
+
+        return threadList;
     }
-    
+
 
     KIO::SlaveConfig::self() ->setConfigData( "http",
             KURL( boardURL ).host() ,