OSDN Git Service

fix: don't load thread.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sun, 22 Aug 2004 05:39:21 +0000 (05:39 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sun, 22 Aug 2004 05:39:21 +0000 (05:39 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1306 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/libkita/datinfo.cpp

index 6a87316..e8f1db9 100644 (file)
@@ -138,6 +138,11 @@ void DatInfo::deleteAccessJob()
         delete m_access;
         m_access = NULL;
     }
+    if ( m_access2 ) {
+        m_access2->killJob();
+        delete m_access2;
+        m_access2 = NULL;
+    }
 }
 
 /* copy raw lines to buffer */
@@ -292,8 +297,10 @@ bool DatInfo::updateCache( const QObject* parent )
    received new data              */      /* private  slot */
 void DatInfo::slotReceiveData( const QString& newLine )
 {
-
     int rescode = m_access->responseCode();
+    if ( m_access2 ) {
+        rescode = m_access2->responseCode();
+    }
 
     if ( rescode != 200 && rescode != 206 ) return ;
 
@@ -313,7 +320,7 @@ void DatInfo::slotFinishLoad()
 
     if ( m_readNum == 0 && m_access2 == NULL ) {
         if ( Account::isLogged() ) {
-            qDebug("offlaw access.\n");
+            initPrivate();
             m_access2 = new OfflawAccess( m_datURL );
             connect( m_access2, SIGNAL( receiveData( const QString& ) ),
                       SLOT( slotReceiveData( const QString& ) ) );