OSDN Git Service

reformat
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Fri, 2 Jul 2004 15:12:16 +0000 (15:12 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Fri, 2 Jul 2004 15:12:16 +0000 (15:12 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1214 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/libkita/access.cpp

index f922ceb..24a5e14 100644 (file)
@@ -39,15 +39,17 @@ QString Access::getcache()
 {
     QString cachePath = Kita::Cache::getPath( m_url );
     m_orgData = QString::null;
-  
-    if( cachePath != QString::null ){
-       QFile file( cachePath );
-       if ( file.open( IO_ReadOnly ) ){
-           m_orgData += file.readAll();
-           file.close();
-       }
+
+    if( cachePath != QString::null )
+    {
+        QFile file( cachePath );
+        if ( file.open( IO_ReadOnly ) )
+        {
+            m_orgData += file.readAll();
+            file.close();
+        }
     }
+
     return m_orgData;
 }
 
@@ -60,12 +62,13 @@ void Access::writeCacheData()
     m_orgData += m_threadData;
 
     QString cachePath = Kita::Cache::getPath( m_url );
-    if( cachePath != QString::null ){
-       FILE *fs = fopen( QFile::encodeName( cachePath ), "w" );
-       if ( !fs ) return ;
+    if( cachePath != QString::null )
+    {
+        FILE *fs = fopen( QFile::encodeName( cachePath ), "w" );
+        if ( !fs ) return ;
 
-       fwrite( m_orgData, m_orgData.length(), 1, fs );
-       fclose( fs );
+        fwrite( m_orgData, m_orgData.length(), 1, fs );
+        fclose( fs );
     }
 
     return ;
@@ -254,12 +257,12 @@ void Access::slotReceiveThreadData( KIO::Job*, const QByteArray& data )
     QString cstr( data );
 
     if( ( m_orgData != QString::null && responseCode() != 206 )
-       || ( m_firstReceive && cstr[0] != '\n' )
-       || ( m_orgData == QString::null && responseCode() != 200 )
-       ) m_invalidDataReceived = TRUE;
+            || ( m_firstReceive && cstr[0] != '\n' )
+            || ( m_orgData == QString::null && responseCode() != 200 )
+      ) m_invalidDataReceived = TRUE;
 
     if( m_invalidDataReceived ) return;
-    
+
     /* If this is the first call at resumption, remove LF at head. */
     if(m_firstReceive)
     {