OSDN Git Service

Use `//' style comments
[kita/kita.git] / src / writeview.cpp
index 2d567ad..ffb7315 100644 (file)
@@ -59,7 +59,7 @@ WriteView::WriteView(WriteTabWidget* parent, const KUrl& url)
 
 void WriteView::initUI()
 {
-    /* connect signals */
+    // connect signals
     connect(buttonOk, SIGNAL(clicked()),
              SLOT(slotPostMessage()));
 
@@ -72,10 +72,10 @@ void WriteView::initUI()
     connect(bodyText, SIGNAL(textChanged()),
              SLOT(slotBodyTextChanged()));
 
-    /* setup preview view */
+    // setup preview view
     qtw->setCurrentIndex(0);
 
-    /* setup labels and edit lines */
+    // setup labels and edit lines
     QFont font = GlobalConfig::threadFont();
     bodyText->setFont(font);
     bodyText->setTabChangesFocus(true);
@@ -105,7 +105,7 @@ void WriteView::initUI()
         beBox->setChecked(true);
     }
 
-    /* setup AA */
+    // setup AA
     faceCombo->clear();
     faceCombo->setFont(GlobalConfig::threadFont());
     faceCombo->addItem("");
@@ -215,10 +215,10 @@ void WriteView::slotPostMessage()
     list.append(name);
     GlobalConfig::setNameCompletionList(list);
 
-    /* build post message */
+    // build post message
     QString postStr = buildPostMessage();
 
-    /* referrer */
+    // referrer
     BoardDatabase db(m_datUrl);
     QString refStr = db.boardUrl();
 
@@ -228,7 +228,7 @@ void WriteView::slotPostMessage()
     job->addMetaData("content-type", "Content-type: application/x-www-form-urlencoded");
     job->addMetaData("referrer", refStr);
 
-    /* 2ch.net cookie modify */
+    // 2ch.net cookie modify
     if (m_bbstype == Board_2ch && beBox->isChecked()) {
         QString cookie = "Cookie: ";
         QString BeMailAddress = AccountConfig::beMailAddress();
@@ -243,7 +243,7 @@ void WriteView::slotPostMessage()
     connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)),
              this, SLOT(slotRecieveData(KIO::Job*, const QByteArray&)));
 
-    /* slotPostFinished() is called when done. */
+    // slotPostFinished() is called when done.
     connect(job, SIGNAL(result(KJob*)),
              this, SLOT(slotPostFinished(KJob*)));
 
@@ -296,13 +296,13 @@ void WriteView::processPostFinished()
 
     case K2ch_True:
 
-        /* save log */
+        // save log
         logPostMessage();
 
-        /* clear message */
+        // clear message
         setMessage(QString());
 
-        /* reload thread */
+        // reload thread
         ViewMediator::getInstance()->openThread(m_datUrl);
 
         m_parent->slotCloseCurrentTab();
@@ -318,7 +318,7 @@ void WriteView::processPostFinished()
 
         break;
 
-        /* eat cookie, then re-post message */
+        // eat cookie, then re-post message
     case K2ch_Cookie:
 
         if (KMessageBox::questionYesNo(0,
@@ -354,7 +354,7 @@ bool WriteView::slotBodyTextChanged()
     int length
         = QTextCodec::codecForName("Shift_JIS")->fromUnicode(body()).length();
 
-    /* replace '\n' -> " <br> ", '>' -> "&lt;", and etc. */
+    // replace '\n' -> " <br> ", '>' -> "&lt;", and etc.
     length += ((body().count('\n')) * 5
                 + (body().count('>')) * 3
                 + (body().count('<')) * 3
@@ -398,7 +398,7 @@ void WriteView::logPostMessage()
 /* get result code from 2ch tag or title. */  /* private */
 int WriteView::resultCode(const QString& response) const
 {
-    /* see also libkita/kita-utf8.h */
+    // see also libkita/kita-utf8.h
     QString errstr = QString::fromUtf8(KITAUTF8_WRITEERROR);
     QString truestr = QString::fromUtf8(KITAUTF8_WRITETRUE);
     QString ckstr = QString::fromUtf8(KITAUTF8_WRITECOOKIE);
@@ -407,7 +407,7 @@ int WriteView::resultCode(const QString& response) const
     int pos = regexp.indexIn(response);
 
     if (pos != -1) {
-        /* get code from 2ch tag */
+        // get code from 2ch tag
         QString k2ch_X = regexp.cap(1);
 
         if (k2ch_X == "true") return K2ch_True;
@@ -418,7 +418,7 @@ int WriteView::resultCode(const QString& response) const
 
         return K2ch_Unknown;
     } else {
-        /* get code from title */
+        // get code from title
         QString title = resultTitle(response);
         if (title.isEmpty()) return K2ch_Unknown;
 
@@ -426,7 +426,7 @@ int WriteView::resultCode(const QString& response) const
         if (title.contains(truestr)) return K2ch_True;
         if (title.contains(ckstr)) return K2ch_Cookie;
 
-        /* for Flash CGI */
+        // for Flash CGI
         if (m_bbstype == Board_FlashCGI) {
             if (title.contains("ERROR!!")) {
                 return K2ch_Error;
@@ -435,7 +435,7 @@ int WriteView::resultCode(const QString& response) const
             }
         }
 
-        /* for JBBS.  adhoc... */
+        // for JBBS.  adhoc...
         if (m_bbstype == Board_JBBS) {
 
             // x-euc-jp & euc-jp