OSDN Git Service

refactoring.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Tue, 1 Mar 2005 13:56:59 +0000 (13:56 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Tue, 1 Mar 2005 13:56:59 +0000 (13:56 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1699 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/libkita/access.cpp

index 5784aa7..7c67010 100644 (file)
@@ -45,18 +45,21 @@ void Access::init()
 void Access::getcache()
 {
     QString orgData;
-    init();
 
+    // get cache path.
     QString cachePath = Kita::Cache::getPath( m_datURL );
+    if ( cachePath == QString::null ) {
+        return;
+    }
 
-    if ( cachePath != QString::null ) {
-        QFile file( cachePath );
-        if ( file.open( IO_ReadOnly ) ) {
-            orgData += file.readAll();
-            file.close();
-        }
+    // read cache file.
+    QFile file( cachePath );
+    if ( file.open( IO_ReadOnly ) ) {
+        orgData += file.readAll();
+        file.close();
     }
 
+    // set data size.
     if ( orgData == QString::null ) return ;
     m_dataSize = orgData.length();
 
@@ -73,6 +76,8 @@ void Access::getcache()
         break;
 
     default:
+        /* convert data stream into 2ch dat.
+        and emit receiveData SIGNAL.        */
         emitDatLineList( orgData );
         break;
     }