OSDN Git Service

refactoring.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sun, 19 Sep 2004 17:44:39 +0000 (17:44 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Sun, 19 Sep 2004 17:44:39 +0000 (17:44 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1385 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/part/kita2ch.cpp
kita/src/part/kitawritedialog.cpp

index 05fa49c..ed601a4 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "libkita/qcp932codec.h"
 #include "libkita/thread.h"
-#include "libkita/account.h"
 
 using namespace Kita;
 
@@ -103,9 +102,6 @@ QString PostInfo::postStr()
     ( ret += "&bbs=" ) += bbs;
     ( ret += "&key=" ) += key;
     ( ret += "&time=" ) += time;
-    if ( Account::isLogged() ) {
-        ( ret += "&sid=" ) += KURL::encode_string( Account::getSessionID() );
-    }
 
     return ret;
 }
index f104998..91fa45f 100644 (file)
@@ -18,6 +18,8 @@
 #include "libkita/parsemisc.h"
 #include "libkita/signalcollection.h"
 #include "libkita/board.h"
+#include "libkita/account.h"
+#include "libkita/kita_misc.h"
 
 #include <ksqueezedtextlabel.h>
 #include <klocale.h>
@@ -170,6 +172,11 @@ void KitaWriteDialog::postMessage()
 
     //int mib = QTextCodec::codecForName("CP932")->mibEnum();
     QString postStr = m_postInfo.postStr();
+    if ( Kita::is2ch( bbscgi ) && Kita::Account::isLogged() ) {
+        postStr += "&sid=";
+        postStr += KURL::encode_string( Kita::Account::getSessionID() );
+    }
+
 
     kdDebug() << "query: " << postStr << endl;
     m_array.resize( 0 );
@@ -334,7 +341,7 @@ void KitaWriteDialog::slotShowErrorDialog( const QString& input, const KURL& )
             postMessage();
         }
         break;
-       
+
     default:
         break;
     }