OSDN Git Service

Use `//' style comments
authornogu <nogu@users.sourceforge.jp>
Wed, 17 Feb 2010 13:51:52 +0000 (22:51 +0900)
committernogu <nogu@users.sourceforge.jp>
Wed, 17 Feb 2010 13:51:52 +0000 (22:51 +0900)
27 files changed:
src/bbsview.cpp
src/boardview.cpp
src/domtree.cpp
src/htmlpart.cpp
src/kitaui/htmlview.cpp
src/kitaui/tabwidgetbase.cpp
src/libkita/access.cpp
src/libkita/boarddata.cpp
src/libkita/boarddatabase.cpp
src/libkita/cache.cpp
src/libkita/datinfo.cpp
src/libkita/datmanager.cpp
src/libkita/flashcgi.cpp
src/libkita/jbbs.cpp
src/libkita/k2ch.cpp
src/libkita/kita_misc.cpp
src/libkita/machibbs.cpp
src/libkita/parser.cpp
src/libkita/postdata.cpp
src/libkita/thread.cpp
src/libkita/threadindex.cpp
src/mainwindow.cpp
src/respopup.cpp
src/threadtabwidget.cpp
src/threadview.cpp
src/writetabwidget.cpp
src/writeview.cpp

index 64d71e9..073901b 100644 (file)
@@ -54,7 +54,7 @@ struct Kita::Category
 
 BBSView::BBSView(QWidget *parent) : QWidget(parent), m_favorites(0)
 {
-    /* copied from Base class */
+    // copied from Base class
     bbsViewBaseLayout = new QVBoxLayout(this); 
 
     layout10 = new QHBoxLayout(0); 
@@ -72,7 +72,7 @@ BBSView::BBSView(QWidget *parent) : QWidget(parent), m_favorites(0)
     m_boardList->setRootIsDecorated(true);
     bbsViewBaseLayout->addWidget(m_boardList);
     resize(QSize(600, 482).expandedTo(minimumSizeHint()));
-    /* copy end */
+    // copy end
 
     m_boardList->setHeaderLabel(i18nc("@title:column", "Board Name"));
     m_boardList->header()->setClickable(false);
@@ -133,7 +133,7 @@ bool BBSView::downloadBoardList()
     QList<Category> categoryList = getCategoryList(html);
     QList<Category>::iterator it;
 
-    /* Are there new boards or moved boards ? */
+    // Are there new boards or moved boards?
     QString newBoards;
     QString oldBoards;
     for (it = categoryList.begin(); it != categoryList.end(); ++it) {
@@ -167,7 +167,7 @@ bool BBSView::downloadBoardList()
 
     const int maxNewBoard = 64;
 
-    /* show new board names */
+    // show new board names
     if (!newBoards.isEmpty() && newBoards.count("\n") < maxNewBoard) {
 
         QStringList boardList = newBoards.split('\n');
@@ -176,7 +176,7 @@ bool BBSView::downloadBoardList()
                                       boardList, "Kita");
     }
 
-    /* show moved board names */
+    // show moved board names
     if (!oldBoards.isEmpty()) {
 
         QStringList boardList = oldBoards.split('\n');
@@ -218,7 +218,7 @@ bool BBSView::downloadBoardList()
         db.moveBoard(oldUrl, newUrl);
     }
 
-    /* save config */
+    // save config
     QString configPath = KStandardDirs::locateLocal("appdata", "board_list");
     KConfig config(configPath);
     for (it = categoryList.begin(); it != categoryList.end(); ++it) {
index 5a79d33..c3ae1f2 100644 (file)
@@ -119,7 +119,7 @@ void BoardView::loadBoard(const KUrl& url, bool online)
     m_readNum = 0;
     m_newNum = 0;
 
-    /* get list of pointers of Thread classes */
+    // get list of pointers of Thread classes
     QList<Thread*> oldLogList;
     QList<Thread*> threadList;
     BoardDatabase db(m_boardUrl);
@@ -168,7 +168,7 @@ void BoardView::loadBoard(const KUrl& url, bool online)
     subjectList->setFocus();
     updateKindLabel();
 
-    /* restore column size */
+    // restore column size
     loadLayout();
     loadHeaderOnOff();
     m_enableSizeChange = true;
@@ -273,26 +273,26 @@ void BoardView::updateRow(int row, const KUrl& datUrl,
     subjectList->item(row, ColumnSpeed)
         ->setText(QString(" %1 ").arg(speed, 0, 'f', 2));
 
-    /* set mark order */
+    // set mark order
     QTableWidgetItem *item = subjectList->item(row, ColumnMark);
     int orderValue;
-    if (!id) { /* old thread */
+    if (!id) { // old thread
         orderValue = ThreadOld;
     } else if (readNum > 0 && (resNum > readNum || resNum > viewPos)) {
-        /* There are new responses. */
+        // There are new responses.
         item->setIcon(QIcon(SmallIcon("unread")));
         m_unreadNum++;
         orderValue = ThreadHasUnread;
-    } else if (readNum > 0) { /* Cache exists */
+    } else if (readNum > 0) { // Cache exists
         item->setIcon(QIcon(SmallIcon("read")));
         m_readNum++;
         orderValue = (viewPos > 1000) ? ThreadReaded : ThreadRead;
     } else if (since.secsTo(current) < 3600 * GlobalConfig::markTime()) {
-        /* new thread */
+        // new thread
         item->setIcon(QIcon(SmallIcon("newthread")));
         m_newNum++;
         orderValue = ThreadNew;
-    } else { /* normal */
+    } else { // normal
         item->setIcon(QIcon());
         orderValue = ThreadNormal;
     }
@@ -300,7 +300,7 @@ void BoardView::updateRow(int row, const KUrl& datUrl,
 
     // no effect: m_unreadNum, m_readNum, m_newNum, markOrder
     if (datManager.isMainThreadOpened() && resNum == readNum) {
-        /* opened */
+        // opened
         subjectList->item(row, ColumnMark)->setIcon(QIcon(SmallIcon("open")));
     }
 }
index 6bf804e..f6b3a07 100644 (file)
@@ -28,13 +28,13 @@ DomTree::DomTree(const DOM::HTMLDocument& hdoc, const KUrl& datUrl)
     m_bufSize = 0;
     m_bottomNum = 0;
 
-    /* create the nodes of footer, header, etc. */
+    // create the nodes of footer, header, etc.
     createKokoyon();
     createFooter();
     createHeader();
 
-    /* get pointer of DatInfo */
-    /* Note that m_datURL is already locked in the HTMLPart. */
+    // get pointer of DatInfo
+    // Note that m_datURL is already locked in the HTMLPart.
     m_datInfo = DatManager(datUrl).getDatInfoPointer();
 }
 
@@ -50,12 +50,12 @@ bool DomTree::createResElement(int num)
     Q_ASSERT(m_datInfo != 0);
 
     if (num < m_bufSize && m_resStatus[ num ] != HTML_NOTPARSED) {
-        /* already parsed */
+        // already parsed
         return true;
     }
 
     if (num >= m_bufSize) {
-        /* resize buffer size */
+        // resize buffer size
         if (m_bufSize == 0) m_bufSize = 100;
         while (num >= m_bufSize) m_bufSize += 500;
 
@@ -73,7 +73,7 @@ bool DomTree::createResElement(int num)
         }
     }
 
-    /* cleate elements */
+    // cleate elements
     QString titleHTML, bodyHTML;
     m_resStatus[ num ] = m_datInfo->getHTML(num, true, titleHTML, bodyHTML);
 
@@ -118,7 +118,7 @@ void DomTree::redraw(bool force)
 
     int readNum = m_datInfo->getReadNum();
 
-    /* don't forget to reset abone here... */
+    // don't forget to reset abone here...
     m_datInfo->resetAbone();
 
     for (int i = 1; i <= readNum; i++) {
@@ -226,16 +226,16 @@ void DomTree::updateHeader(DOM::Element& headerElement)
     DOM::Element backupElement1, backupElement2, backupElement3;
     int readNum = m_datInfo->getReadNum();
 
-    /* remove <a href="#tosaigo"> and <BR> */
-    backupElement1 = headerElement.removeChild(headerElement.lastChild()); /* BR */
-    backupElement2 = headerElement.removeChild(headerElement.lastChild()); /* BR */
-    backupElement3 = headerElement.removeChild(headerElement.lastChild()); /* "#tosaigo" */
+    // remove <a href="#tosaigo"> and <BR>
+    backupElement1 = headerElement.removeChild(headerElement.lastChild()); // BR
+    backupElement2 = headerElement.removeChild(headerElement.lastChild()); // BR
+    backupElement3 = headerElement.removeChild(headerElement.lastChild()); // "#tosaigo"
 
-    DOM::Node node = headerElement.firstChild(); /* node is now "#kokomade_yonda" */
-    node = node.nextSibling(); /* " " */
+    DOM::Node node = headerElement.firstChild(); // node is now "#kokomade_yonda"
+    node = node.nextSibling(); // " "
     node = node.nextSibling();
 
-    /* '1-', '101-' などのリンクを作成 */
+    // '1-', '101-' などのリンクを作成
     for (int num = 1; num < readNum ; num += 100) {
         if (node == 0) {
             QString href = QString("#%1").arg(num);
@@ -251,10 +251,10 @@ void DomTree::updateHeader(DOM::Element& headerElement)
         }
     }
 
-    /* restore <a href="#tosaigo"> and <BR> */
-    headerElement.appendChild(backupElement3); /* "#tosaigo" */
-    headerElement.appendChild(backupElement2); /* BR */
-    headerElement.appendChild(backupElement1); /* BR */
+    // restore <a href="#tosaigo"> and <BR>
+    headerElement.appendChild(backupElement3); // "#tosaigo"
+    headerElement.appendChild(backupElement2); // BR
+    headerElement.appendChild(backupElement1); // BR
 }
 
 /* 
@@ -271,13 +271,13 @@ void DomTree::updateFooter(DOM::Element& footerElement)
     DOM::Element backupElement;
     int readNum = m_datInfo->getReadNum();
 
-    backupElement = footerElement.removeChild(footerElement.lastChild()); /* "#tosaigo" */
+    backupElement = footerElement.removeChild(footerElement.lastChild()); // "#tosaigo"
 
-    DOM::Node node = footerElement.firstChild(); /* node is now "#kokomade_yonda" */
-    node = node.nextSibling(); /* " " */
+    DOM::Node node = footerElement.firstChild(); // node is now "#kokomade_yonda"
+    node = node.nextSibling(); // " "
     node = node.nextSibling();
 
-    /* '1-', '101-' などのリンクを作成 */
+    // '1-', '101-' などのリンクを作成
     for (int num = 1; num < readNum ; num += 100) {
         if (node == 0) {
             QString href = QString("#%1").arg(num);
@@ -293,7 +293,7 @@ void DomTree::updateFooter(DOM::Element& footerElement)
         }
     }
 
-    footerElement.appendChild(backupElement); /* "#tosaigo" */
+    footerElement.appendChild(backupElement); // "#tosaigo"
 }
 
 /*
index e088bd1..d85fee2 100644 (file)
@@ -68,12 +68,12 @@ void HTMLPart::clearPart()
 {
     slotDeletePopup();
 
-    /* delete DomTree */
+    // delete DomTree
     delete m_domtree;
     m_domtree = 0;
 
     DatManager datManager(m_datUrl);
-    /* update ViewPos */
+    // update ViewPos
     if (m_mode == HTMLPART_MODE_MAINPART && !m_updatedKokoyon
             && !m_datUrl.isEmpty()) {
         int readNum = datManager.getReadNum();
@@ -83,24 +83,24 @@ void HTMLPart::clearPart()
     }
     m_updatedKokoyon = false;
 
-    /* clear variables */
+    // clear variables
     m_anchorStack.clear();
     m_centerNum = 0;
     m_jumpNumAfterLoading = 0;
     findTextInit();
 
-    if (!m_datUrl.isEmpty()) {  /* This part is opened. */
-        /* This part is on the main thread view. */
+    if (!m_datUrl.isEmpty()) {  // This part is opened.
+        // This part is on the main thread view.
         if (m_mode == HTMLPART_MODE_MAINPART) {
 
-            /* tell Thread class that "thread is closed" */
+            // tell Thread class that "thread is closed"
             datManager.setMainThreadOpened(false);
 
-            /* emit "deactivated all thread view" SIGNAL */
+            // emit "deactivated all thread view" SIGNAL
             KUrl nullUrl("");
             ViewMediator::getInstance()->changeWriteTab(nullUrl);
 
-            /*  update subject tab. */
+            //  update subject tab.
         }
     }
 
@@ -121,25 +121,25 @@ bool HTMLPart::setup(int mode, const KUrl& url)
     m_mode = mode;
 
     if (m_mode == HTMLPART_MODE_MAINPART) {
-        /* This part is on the main thread view. */
+        // This part is on the main thread view.
         DatManager datManager(m_datUrl);
-        /* create DatInfo explicitly to open new thread.   */
-        /* Usually, DatInfo is NOT created if ReadNum == 0.*/
-        /* See also DatManager::createDatInfo() and        */
-        /*          DatManager::getDatInfo().              */
+        // create DatInfo explicitly to open new thread.
+        // Usually, DatInfo is NOT created if ReadNum == 0.
+        // See also DatManager::createDatInfo() and
+        //          DatManager::getDatInfo().
         datManager.createDatInfo();
 
-        /* tell Thread class that "thread is opened" */
+        // tell Thread class that "thread is opened"
         datManager.setMainThreadOpened(true);
 
-        /* reset abone */
+        // reset abone
         datManager.resetAbone();
     }
 
-    /* create HTML Document */
+    // create HTML Document
     createHTMLDocument();
 
-    /* create DOM manager */
+    // create DOM manager
     if (m_mode == HTMLPART_MODE_MAINPART) {
         m_domtree = new DomTree(htmlDocument(), m_datUrl);
     }
@@ -151,7 +151,7 @@ bool HTMLPart::setup(int mode, const KUrl& url)
 /* private */
 void HTMLPart::connectSignals()
 {
-    /* popup */
+    // popup
     connect(this, SIGNAL(onURL(const QString&)), SLOT(slotOnUrl(const QString&)));
 
     connect(view(), SIGNAL(leave()), SLOT(slotLeave()));
@@ -164,7 +164,7 @@ void HTMLPart::connectSignals()
 /* private */
 void HTMLPart::createHTMLDocument()
 {
-    /* style */
+    // style
     QString style = QString("body { font-size: %1pt; font-family: \"%2\"; color: %3; background-color: %4; }")
                     .arg(GlobalConfig::threadFont().pointSize())
                     .arg(GlobalConfig::threadFont().family())
@@ -179,10 +179,9 @@ void HTMLPart::createHTMLDocument()
     setJScriptEnabled(false);
     setJavaEnabled(false);
 
-    /* Use dummy URL here, and protocol should be "file:".
-       If protocol is "http:", local image files are not shown
-       (for security reasons ?).
-     */
+    // Use dummy URL here, and protocol should be "file:".
+    // If protocol is "http:", local image files are not shown
+    // (for security reasons?).
     begin(KUrl("file:/dummy.htm"));
     write(text);
     end();
@@ -248,19 +247,19 @@ void HTMLPart::updateScreen(bool showHeaderEtc, bool clock)
         return ;
     }
 
-    /* show clock cursor */
+    // show clock cursor
     if (clock) {
         QCursor qc; qc.setShape(Qt::WaitCursor);
         QApplication::setOverrideCursor(qc);
     }
 
-    /* show header, footer, and kokomadeyonda, etc. */
+    // show header, footer, and kokomadeyonda, etc.
     if (showHeaderEtc) {
         m_domtree->appendKokoyon();
         m_domtree->appendFooterAndHeader();
     }
 
-    /* change color of number of the res which is responsed. */
+    // change color of number of the res which is responsed.
     if (m_mode == HTMLPART_MODE_MAINPART) {
 
         if (GlobalConfig::checkResponsed()) {
@@ -268,13 +267,13 @@ void HTMLPart::updateScreen(bool showHeaderEtc, bool clock)
         }
     }
 
-    /* update display */
+    // update display
     htmlDocument().applyChanges();
     view()->layout();
     view()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
     view()->setFocus();
 
-    /* restore cursor */
+    // restore cursor
     if (clock) {
         QApplication::restoreOverrideCursor();
     }
@@ -360,7 +359,7 @@ bool HTMLPart::reload(int jumpNum)
 {
     if (!m_domtree) return false;
     if (m_mode != HTMLPART_MODE_MAINPART) {
-        /* If this is not MainPart, then open MainPart.  */
+        // If this is not MainPart, then open MainPart.
         ViewMediator::getInstance()->openUrl(m_datUrl);
         return false;
     }
@@ -369,7 +368,7 @@ bool HTMLPart::reload(int jumpNum)
     if (m_centerNum == 0) m_centerNum = m_domtree->getBottomResNumber();
     m_jumpNumAfterLoading = jumpNum;
 
-    /* DatManager will call back slotReceiveData and slotFinishLoad. */
+    // DatManager will call back slotReceiveData and slotFinishLoad.
     DatManager(m_datUrl).updateCache(this);
     view() ->setFocus();
 
@@ -391,10 +390,10 @@ void HTMLPart::slotReceiveData()
     int readNum = DatManager(m_datUrl).getReadNum();
     int bottom = m_domtree->getBottomResNumber();
 
-    /* parsing */
+    // parsing
     parseResponses(bottom + 1, readNum);
 
-    /* rendering */
+    // rendering
     if (m_firstReceive || bottom + delta < readNum) {
         showResponses(bottom + 1, readNum);
         updateScreen(true, false);
@@ -455,7 +454,7 @@ bool HTMLPart::gotoAnchor(const QString& anc, bool pushPosition)
 
     if (res > 1) {
 
-        /* is target valid ? */
+        // is target valid?
         if (!DatManager(m_datUrl).isResValid(res))
             return false;
 
@@ -465,9 +464,9 @@ bool HTMLPart::gotoAnchor(const QString& anc, bool pushPosition)
     if (res == 1) ancstr = "header";
     if (pushPosition) pushCurrentPosition();
 
-    /* KHTMLPart::gotoAnchor() will fail if the thread is not shown. */
-    /* So KHTMLPart::gotoAnchor() should be called via custom event. */
-    /* See also HTMLPart::customEvent() */
+    // KHTMLPart::gotoAnchor() will fail if the thread is not shown.
+    // So KHTMLPart::gotoAnchor() should be called via custom event.
+    // See also HTMLPart::customEvent()
     GotoAnchorEvent * e = new GotoAnchorEvent(ancstr);
     QApplication::postEvent(this, e);  // Qt will delete it when done
 
@@ -562,13 +561,13 @@ bool HTMLPart::findText(const QString &query, bool reverse)
     QRegExp regexp(query);
     regexp.setCaseSensitivity(Qt::CaseInsensitive);
 
-    /* init */
+    // init
     if (m_findNode.isNull()) {
 
         m_findNode = htmlDocument().body();
         m_find_y = 0;
 
-        /* move to the last child node */
+        // move to the last child node
         if (reverse) {
             while (!m_findNode.lastChild().isNull()) m_findNode = m_findNode.lastChild();
             m_find_y = view() ->contentsHeight();
@@ -580,7 +579,7 @@ bool HTMLPart::findText(const QString &query, bool reverse)
         if (m_findNode.nodeType() == DOM::Node::TEXT_NODE
                 || m_findNode.nodeType() == DOM::Node::CDATA_SECTION_NODE) {
 
-            /* find the word in the current node */
+            // find the word in the current node
             DOM::DOMString nodeText = m_findNode.nodeValue();
             QString nodestr = nodeText.string();
             if (reverse && m_findPos != -1) nodestr.resize(m_findPos);
@@ -588,7 +587,7 @@ bool HTMLPart::findText(const QString &query, bool reverse)
             if (reverse) m_findPos = nodestr.lastIndexOf(regexp, m_findPos);
             else m_findPos = nodestr.indexOf(regexp, m_findPos + 1);
 
-            /* scroll & select & return */
+            // scroll & select & return
             if (m_findPos != -1) {
                 int matchLen = regexp.matchedLength();
 
@@ -628,12 +627,12 @@ bool HTMLPart::findText(const QString &query, bool reverse)
             }
         }
 
-        /*------------------------*/
+        //------------------------
 
         m_findPos = -1;
         DOM::Node next;
 
-        /* move to the next node */
+        // move to the next node
         if (!reverse) {
 
             next = m_findNode.firstChild();
@@ -646,7 +645,7 @@ bool HTMLPart::findText(const QString &query, bool reverse)
                 }
             }
         }
-        /* revearse */
+        // revearse
         else {
 
             next = m_findNode.lastChild();
@@ -688,18 +687,18 @@ void HTMLPart::showPopupMenu(const KUrl& kurl)
 
     QString str;
 
-    /* If selected Text is composed of only digits, then show res popup. */
+    // If selected Text is composed of only digits, then show res popup.
     if (!m_pushctrl && showSelectedDigitPopup()) return ;
 
-    /*-----------------------------------*/
-    /* create menu items                 */
+    //-----------------------------------
+    // create menu items                 
 
     KMenu popupMenu(view());
     KMenu* backSubMenu = 0;
     KMenu* markSubMenu = 0;
 
-    /*------*/
-    /* jump */
+    //------
+    // jump
     KAction* homeLinkAct = 0;
     KAction* kokoLinkAct = 0;
     KAction* endLinkAct = 0;
@@ -880,7 +879,7 @@ void HTMLPart::customEvent(QEvent * e)
 /* protected */
 void HTMLPart::khtmlMousePressEvent(khtml::MousePressEvent* e)
 {
-    emit mousePressed(); /* to ThreadView to focus this view. */
+    emit mousePressed(); // to ThreadView to focus this view.
 
     KUrl kurl;
     if (!e->url().string().isEmpty()) {
@@ -895,7 +894,7 @@ void HTMLPart::khtmlMousePressEvent(khtml::MousePressEvent* e)
 
     if (e->url() != 0) {
 
-        if (e->url().string().at(0) == '#') { /* anchor */
+        if (e->url().string().at(0) == '#') { // anchor
             kurl = m_datUrl;
             kurl.setRef(e->url().string().mid(1)) ;
         }
@@ -905,7 +904,7 @@ void HTMLPart::khtmlMousePressEvent(khtml::MousePressEvent* e)
         return ;
     }
 
-    /* popup menu */
+    // popup menu
     if (m_pushrightbt) {
         showPopupMenu(kurl);
         m_pushctrl = m_pushmidbt = m_pushrightbt = false;
@@ -939,28 +938,28 @@ void HTMLPart::clickAnchor(const KUrl& urlin)
     QString refstr;
     KUrl datUrl = getDatUrl(urlin , refstr);
 
-    /*--------------------*/
-    /* Ctrl + right click */
+    //--------------------
+    // Ctrl + right click
     if (m_pushctrl && m_pushrightbt) {
         showPopupMenu(urlin);
         return ;
     }
 
-    /*--------------------------------*/
-    /* If this is not anchor, then    */
-    /* emit openURLRequest and return */
+    //--------------------------------
+    // If this is not anchor, then
+    // emit openURLRequest and return
 
     if (datUrl.host() != m_datUrl.host() || datUrl.path() != m_datUrl.path()) {
 
-        /* right click */
+        // right click
         if (m_pushrightbt) {
 
-            /* start multi-popup mode or show popup menu */
+            // start multi-popup mode or show popup menu
             if (!startMultiPopup()) showPopupMenu(urlin);
 
             return ;
         }
-        /* right click */
+        // right click
 
         ViewMediator::getInstance()->openUrl(urlin);
         return ;
@@ -968,37 +967,37 @@ void HTMLPart::clickAnchor(const KUrl& urlin)
 
     if (refstr.isEmpty()) return ;
 
-    /*---------------------------*/
-    /* show popupmenu for #write */
+    //---------------------------
+    // show popupmenu for #write
 
     if (refstr.left(5) == "write") {
         showWritePopupMenu(refstr);
         return ;
     }
 
-    /*----------------------------*/
-    /* extract responses by ID    */
+    //----------------------------
+    // extract responses by ID
 
     if (refstr.left(5) == "idpop") {
         showIdPopup(refstr);
         return ;
     }
 
-    /*---------------------------*/
-    /* show popupmenu for #bepop */
+    //---------------------------
+    // show popupmenu for #bepop
 
     if (refstr.left(5) == "bepop") {
         showBePopupMenu(refstr);
         return ;
     }
 
-    /*-------------------------*/
-    /* start multi-popup mdde  */
+    //-------------------------
+    // start multi-popup mdde
     if (m_pushrightbt && startMultiPopup()) return ;
 
 
-    /*----------------------------*/
-    /* next 100 ,before 100 ,etc. */
+    //----------------------------
+    // next 100 ,before 100 ,etc.
     if (m_mode == HTMLPART_MODE_MAINPART) {
         if (refstr.left(7) == "tosaigo") {
             slotClickGotoFooter();
@@ -1006,8 +1005,8 @@ void HTMLPart::clickAnchor(const KUrl& urlin)
         }
     }
 
-    /*-------------------------------*/
-    /* open Kita Navi or goto anchor */
+    //-------------------------------
+    // open Kita Navi or goto anchor
 
     int refNum, refNum2;
 
@@ -1044,7 +1043,7 @@ void HTMLPart::showWritePopupMenu(const QString& refstr)
     DatManager datManager(m_datUrl);
     QString namestr = datManager.getPlainName(resNum);
 
-    /* show res tree */
+    // show res tree
     if (m_pushrightbt) {
         int num;
         QString htmlstr = datManager.getTreeByRes(resNum, num);
@@ -1056,8 +1055,8 @@ void HTMLPart::showWritePopupMenu(const QString& refstr)
         return ;
     }
 
-    /*---------------------*/
-    /* create popup menu */
+    //---------------------
+    // create popup menu
     QString plainStr;
 
     KMenu popupMenu(view());
@@ -1205,7 +1204,7 @@ void HTMLPart::showIdPopup(const QString& refstr)
                     .replace("%2B", "+")
                     .replace("%2F", "/");
 
-    /* popup */
+    // popup
     if (m_pushrightbt) {
         int num;
         QString htmlstr = DatManager(m_datUrl).getHtmlById(strid, num);
@@ -1399,7 +1398,7 @@ void HTMLPart::slotLeave()
 
     hidePopup();
 
-    /* emit signal to have parent hide this if this is popup . */
+    // emit signal to have parent hide this if this is popup.
     if (m_mode == HTMLPART_MODE_POPUP && !isUnderMouse(0, 0)) {
         emit hideChildPopup();
     }
@@ -1414,7 +1413,7 @@ void HTMLPart::slotVSliderReleased()
 
     hidePopup();
 
-    /* emit signal to have parent hide this if this is popup . */
+    // emit signal to have parent hide this if this is popup.
     if (m_mode == HTMLPART_MODE_POPUP && !isUnderMouse(mrg, 0)) {
         emit hideChildPopup();
     }
@@ -1430,7 +1429,7 @@ void HTMLPart::slotHSliderReleased()
 
     hidePopup();
 
-    /* emit signal to have parent hide this if this is popup . */
+    // emit signal to have parent hide this if this is popup.
     if (m_mode == HTMLPART_MODE_POPUP && !isUnderMouse(0, mrg)) {
         emit hideChildPopup();
     }
@@ -1443,7 +1442,7 @@ void HTMLPart::slotHideChildPopup()
 {
     hidePopup();
 
-    /* emit signal to have parent hide this if this is popup . */
+    // emit signal to have parent hide this if this is popup.
     if (m_mode == HTMLPART_MODE_POPUP && !isUnderMouse(0, 0)) {
         emit hideChildPopup();
     }
@@ -1454,11 +1453,11 @@ void HTMLPart::slotHideChildPopup()
 /* This slot is called when mouse moves onto the URL */ /* private slot */
 void HTMLPart::slotOnUrl(const QString& url)
 {
-    /* config */
+    // config
 
-    const int maxpopup = 10;  /* max number of responses shown in the popup window */
+    const int maxpopup = 10; // max number of responses shown in the popup window
 
-    /*----------------------------*/
+    //----------------------------
 
     if (isMultiPopupMode()) return ;
 
@@ -1467,10 +1466,10 @@ void HTMLPart::slotOnUrl(const QString& url)
     if (url.isEmpty()) return ;
     if (url.left(7) == "mailto:") return ;
 
-    /* Is Kita active now ? */
+    // Is Kita active now?
     if(ViewMediator::getInstance()->isActive() == false) return;
 
-    /* get reference */
+    // get reference
     QString refstr;
     KUrl datUrl = m_datUrl;
     if (url.at(0) == '#') {
@@ -1480,8 +1479,8 @@ void HTMLPart::slotOnUrl(const QString& url)
     }
 
     DatManager datManager(m_datUrl);
-    /*------------------------*/
-    /* id popup               */
+    //------------------------
+    // id popup
 
     if (url.left(6) == "#idpop") {
         int num = datManager.getNumById(url.mid(6));
@@ -1498,8 +1497,8 @@ void HTMLPart::slotOnUrl(const QString& url)
     }
 
 
-    /*------------------------*/
-    /* show reffered num      */
+    //------------------------
+    // show reffered num
 
     if (refstr.left(5) == "write") {
         int no = refstr.mid(5).toInt();
@@ -1517,8 +1516,8 @@ void HTMLPart::slotOnUrl(const QString& url)
     }
 
 
-    /*------------------------*/
-    /* abone                  */
+    //------------------------
+    // abone
 
     if (url.left(6) == "#abone") {
         int no = url.mid(6).toInt();
@@ -1527,15 +1526,15 @@ void HTMLPart::slotOnUrl(const QString& url)
         return ;
     }
 
-    /*-------------------------*/
-    /* popup for anchor        */
+    //-------------------------
+    // popup for anchor
 
     QString innerHTML;
     int refNum;
     int refNum2;
 
     int i = refstr.indexOf("-");
-    if (i != -1) { /* >>refNum-refNum2 */
+    if (i != -1) { // >>refNum-refNum2
 
         refNum = refstr.left(i).toInt();
         refNum2 = refstr.mid(i + 1).toInt();
@@ -1545,32 +1544,32 @@ void HTMLPart::slotOnUrl(const QString& url)
             if (refNum2 - refNum > maxpopup - 1) refNum2 = refNum + maxpopup - 1;
         }
 
-    } else { /* >>refNum */
+    } else { // >>refNum
         refNum = refstr.toInt();
         refNum2 = refNum;
     }
 
     DatManager localDatManager(datUrl);
-    /* another thread ? */
+    // another thread?
     if (datUrl.host() != m_datUrl.host() || datUrl.path() != m_datUrl.path()) {
 
-        /* get board name */
+        // get board name
         BoardDatabase db(datUrl);
         QString boardName = db.boardName();
         if (!boardName.isEmpty()) innerHTML += '[' + boardName + "] ";
 
-        /* If idx file of datURL is not read, thread name cannot be obtained.
-           so, create DatInfo if cache exists, and read idx file in DatInfo::DatInfo(). */
+        // If idx file of datURL is not read, thread name cannot be obtained.
+        // so, create DatInfo if cache exists, and read idx file in DatInfo::DatInfo().
         localDatManager.getDatInfoPointer();
 
-        /* get thread Name */
+        // get thread Name
         QString subName = localDatManager.threadName();
         if (!subName.isEmpty()) innerHTML += subName + "<br><br>";
 
         if (!refNum) refNum = refNum2 = 1;
     }
 
-    /* get HTML and show it */
+    // get HTML and show it
     if (!refNum) return ;
     innerHTML += localDatManager.getHtml(refNum, refNum2);
 
index 1c3e83f..02366c3 100644 (file)
@@ -39,7 +39,7 @@ void HTMLView::keyPressEvent(QKeyEvent* e)
 /* protected */
 void HTMLView::wheelEvent(QWheelEvent * e)
 {
-    if (e->delta() < 0) { /* scroll down */
+    if (e->delta() < 0) { // scroll down
         if (emitPushDown()) return ;
     }
 
@@ -52,7 +52,7 @@ bool HTMLView::emitPushDown()
     int y = contentsY();
 
     if (y >= contentsHeight() - visibleHeight()) {
-        emit pushDown(); /* to HTMLPart in order to call slotClickTugi100 */
+        emit pushDown(); // to HTMLPart in order to call slotClickTugi100
         return true;
     }
 
index 12199f6..22d2de0 100644 (file)
@@ -30,7 +30,7 @@ TabWidgetBase::TabWidgetBase(QWidget* parent) : KTabWidget(parent)
     setupActions();
 
     if (parent) {
-        /* setup part manager */
+        // setup part manager
         m_manager = new KParts::PartManager(parent, this);
         m_manager->addManagedTopLevelWidget(parent);
     } else {
@@ -41,7 +41,7 @@ TabWidgetBase::TabWidgetBase(QWidget* parent) : KTabWidget(parent)
 
 TabWidgetBase::~TabWidgetBase()
 {
-    /* remove parts */
+    // remove parts
     if (m_manager && !(m_manager->parts().isEmpty())) {
         KParts::Part * part;
         while ((part = m_manager->parts().first()) != 0) {
@@ -53,7 +53,7 @@ TabWidgetBase::~TabWidgetBase()
     delete m_manager;
     m_manager = 0;
 
-    /* remove widgets which don't belong to parts */
+    // remove widgets which don't belong to parts
     QWidget* view = currentWidget();
     while (count() > 0 && view) {
         removePage(view);
index 2e6d265..63b1aeb 100644 (file)
@@ -68,7 +68,7 @@ void Access::getcache()
     switch (m_bbstype) {
 
     case Board_2ch:
-    case Board_MachiBBS:  /* Machi BBS's data is already parsed as 2ch dat. */
+    case Board_MachiBBS:  // Machi BBS's data is already parsed as 2ch dat.
 
         {
             QString tmpData = K2ch().datToUnicode(orgData);
@@ -78,8 +78,8 @@ void Access::getcache()
         break;
 
     default:
-        /* convert data stream into 2ch dat.
-        and emit receiveData SIGNAL.        */
+        // convert data stream into 2ch dat.
+        // and emit receiveData SIGNAL.
         emitDatLineList(orgData);
         break;
     }
@@ -102,7 +102,7 @@ void Access::writeCacheData()
         QDataStream out(&file);
         out << m_threadData;
     }
-    m_threadData.clear(); /* clear baffer */
+    m_threadData.clear(); // clear baffer
 
     return ;
 }
@@ -110,14 +110,14 @@ void Access::writeCacheData()
 /* update cache file */ /* public */
 bool Access::getupdate(int readNum)
 {
-    /* init */
+    // init
     m_readNum = readNum;
     m_threadData.clear();
     m_firstReceive = false;
     m_invalidDataReceived = false;
     m_lastLine.clear();
 
-    /* set URL of data */
+    // set URL of data
     QString getUrl;
     switch (m_bbstype) {
 
@@ -130,7 +130,7 @@ bool Access::getupdate(int readNum)
 
     case Board_JBBS:
         getUrl = getThreadUrl(m_datUrl);
-        getUrl.replace("read.cgi", "rawmode.cgi");  /* adhoc... */
+        getUrl.replace("read.cgi", "rawmode.cgi");  // adhoc...
                if (m_readNum > 0)
             getUrl += '/' + QString::number(m_readNum + 1) + '-';
         break;
@@ -139,13 +139,13 @@ bool Access::getupdate(int readNum)
         getUrl = m_datUrl.prettyUrl();
     }
 
-    /* set UserAgent */
+    // set UserAgent
     const QString useragent = QString("Monazilla/1.00 (Kita/%1)").arg(VERSION);
     KIO::SlaveConfig::self() ->setConfigData("http",
             KUrl(getUrl).host(),
             "UserAgent", useragent);
 
-    /* create new job */
+    // create new job
     KIO::TransferJob* job
         = KIO::get(getUrl, KIO::Reload, KIO::HideProgressInfo);
     m_currentJob = job;
@@ -157,11 +157,11 @@ bool Access::getupdate(int readNum)
     // use 'HTTP-Headers' metadata.
     job->addMetaData("PropagateHttpHeader", "true");
 
-    /* resume */
+    // resume
     if (m_bbstype != Board_MachiBBS
             && m_bbstype != Board_JBBS
             && m_dataSize > 0) {
-        m_firstReceive = true; /* remove first char (i.e. \n). see also slotReceiveThreadData() */
+        m_firstReceive = true; // remove first char (i.e. \n). see also slotReceiveThreadData()
         job->addMetaData("resume", QString::number(m_dataSize - 1));
         job->addMetaData("AllowCompressedPage", "false");
     }
@@ -203,7 +203,7 @@ void Access::slotReceiveThreadData(KIO::Job*, const QByteArray& data)
         return ;
     }
 
-    /* check if received data is invalid (or broken). */
+    // check if received data is invalid (or broken).
     if ((m_dataSize > 0 && responseCode() != 206)
             || (m_firstReceive && data_tmp[ 0 ] != '\n')
             || (m_dataSize == 0 && responseCode() != 200))
@@ -211,7 +211,7 @@ void Access::slotReceiveThreadData(KIO::Job*, const QByteArray& data)
 
     if (m_invalidDataReceived) return ;
 
-    /* If this is the first call at resumption, remove LF(\n) at head. */
+    // If this is the first call at resumption, remove LF(\n) at head.
     if (m_firstReceive) {
         data_tmp = data_tmp.mid(1);
     }
@@ -232,12 +232,12 @@ void Access::emitDatLineList(const QByteArray& dataStream)
     bool endIsLF = false;
     if (dataStream.at(dataStream.length() - 1) == '\n') endIsLF = true;
 
-    /* split the stream */
+    // split the stream
     m_lastLine += dataStream;
     lineList = m_lastLine.split('\n');
     m_lastLine.clear();
 
-    /* save the last line */
+    // save the last line
     if (!endIsLF) {
 
         QList<QByteArray>::iterator lastit = lineList.end();
@@ -249,9 +249,9 @@ void Access::emitDatLineList(const QByteArray& dataStream)
         }
     }
 
-    /* filtering */
+    // filtering
 
-    /* convert lines into 2ch dat */
+    // convert lines into 2ch dat
     int count = lineList.count();
     for (int i = 0; i < count ; ++i) {
 
@@ -261,7 +261,7 @@ void Access::emitDatLineList(const QByteArray& dataStream)
             QByteArray ba;
             int nextNum = m_readNum + 1;
 
-            /* convert line */
+            // convert line
             switch (m_bbstype) {
 
             case Board_MachiBBS:
@@ -298,7 +298,7 @@ void Access::emitDatLineList(const QByteArray& dataStream)
 
             if (line2.isEmpty()) continue;
 
-            /* add abone lines */
+            // add abone lines
             const char aboneStr[] = "abone<><><>abone<>";
             while (nextNum > m_readNum + 1) {
                 datLineList += aboneStr;
@@ -306,7 +306,7 @@ void Access::emitDatLineList(const QByteArray& dataStream)
                 ++m_readNum;
             }
 
-            /* save line */
+            // save line
             if (m_bbstype == Board_MachiBBS) m_threadData += ba + '\n';
             else m_threadData += lineList[ i ] + '\n';
             ++m_readNum;
@@ -315,7 +315,7 @@ void Access::emitDatLineList(const QByteArray& dataStream)
         }
     }
 
-    /* call DatInfo::slotReceiveData() */
+    // call DatInfo::slotReceiveData()
     emit receiveData(datLineList);
 }
 
@@ -328,7 +328,7 @@ void Access::killJob()
 
 void Access::stopJob()
 {
-    if (m_currentJob) m_currentJob->kill(); /* emit result signal */
+    if (m_currentJob) m_currentJob->kill(); // emit result signal
 }
 
 int Access::serverTime()
@@ -357,7 +357,7 @@ int Access::responseCode()
     QStringList dateStrList = headerList.filter(regexp);
     if (dateStrList.isEmpty() || regexp.indexIn(dateStrList[0]) == -1) {
         // invalid response
-        if (m_bbstype == Board_JBBS) return 200; /* adhoc... */
+        if (m_bbstype == Board_JBBS) return 200; // adhoc...
         return 0;
     } else {
         return regexp.cap(1).toInt();
@@ -404,7 +404,7 @@ QString OfflawAccess::get()
     // use 'HTTP-Headers' metadata.
     job->addMetaData("PropagateHttpHeader", "true");
 
-    return QString(); /* dummy */
+    return QString(); // dummy
 }
 
 void OfflawAccess::slotThreadResult(KIO::Job* job)
index 5cfd523..f03226d 100644 (file)
@@ -26,14 +26,14 @@ BoardData::BoardData(const QString& boardName,
 : m_boardName(boardName), m_readIdx(false), m_rootPath(rootPath),
     m_delimiter(delimiter), m_bbsPath(bbsPath), m_ext(ext), m_type(boardtype)
 {
-    /* set hostname and create URL of board */
+    // set hostname and create URL of board
     setHostName(hostname);
 
-    /* create default key */
+    // create default key
     QStringList keyHosts(m_hostname);
     createKeys(keyHosts);
 
-    /* reset SETTING.TXT */
+    // reset SETTING.TXT
     setSettingLoaded(false);
 }
 
@@ -46,16 +46,16 @@ void BoardData::setHostName(const QString& hostName)
 {
     m_hostname = hostName;
 
-    /* m_basePath = (hostname)/(rootPath)/(bbsPath)/ */
+    // m_basePath = (hostname)/(rootPath)/(bbsPath)/
     m_basePath = m_hostname + m_rootPath + m_bbsPath + '/';
 
     switch (m_type) {
 
-    case Board_MachiBBS:  /* m_cgiBasePath = (hostname)/(rootPath)/(delimiter)?BBS=(bbsPath) */
+    case Board_MachiBBS: // m_cgiBasePath = (hostname)/(rootPath)/(delimiter)?BBS=(bbsPath)
         m_cgiBasePath = m_hostname + m_rootPath + m_delimiter + "?BBS=" + m_bbsPath.mid(1);
         break;
 
-        /* m_cgiBasePath = (hostname)/(rootPath)/(delimiter)/(bbsPath)/ */
+        // m_cgiBasePath = (hostname)/(rootPath)/(delimiter)/(bbsPath)/
     default:
         m_cgiBasePath = m_hostname + m_rootPath + m_delimiter + m_bbsPath + '/';
         break;
@@ -215,14 +215,14 @@ void BoardData::setTitleImgUrl(const KUrl& url)
 /* create keys of DB */ /* public */
 void BoardData::createKeys(const QStringList& keyHostList)
 {
-    /* reset keys */
+    // reset keys
     m_keyBasePathList.clear();
     m_keyCgiBasePathList.clear();
     m_keyHostList.clear();
 
     m_keyHostList = keyHostList;
 
-    /* m_basePath = (hostname)/(rootPath)/(bbsPath)/ */
+    // m_basePath = (hostname)/(rootPath)/(bbsPath)/
     for (int i = 0; i < m_keyHostList.count(); ++i) {
         if (m_keyHostList[ i ].length() > 0)
             m_keyBasePathList += m_keyHostList[ i ] + m_rootPath + m_bbsPath + '/';
@@ -230,13 +230,13 @@ void BoardData::createKeys(const QStringList& keyHostList)
 
     switch (m_type) {
 
-    case Board_MachiBBS:  /* m_cgiBasePath = (hostname)/(rootPath)/(delimiter)?BBS=(bbsPath) */
+    case Board_MachiBBS: // m_cgiBasePath = (hostname)/(rootPath)/(delimiter)?BBS=(bbsPath)
         for (int i = 0; i < m_keyHostList.count(); ++i)
             m_keyCgiBasePathList += m_keyHostList[ i ] + m_rootPath + m_delimiter
                                     + "?BBS=" + m_bbsPath.mid(1);
         break;
 
-        /* m_cgiBasePath = (hostname)/(rootPath)/(delimiter)/(bbsPath)/ */
+        // m_cgiBasePath = (hostname)/(rootPath)/(delimiter)/(bbsPath)/
     default:
         for (int i = 0; i < m_keyHostList.count(); ++i)
             m_keyCgiBasePathList += m_keyHostList[ i ] + m_rootPath + m_delimiter + m_bbsPath + '/';
index 081f2c2..6e0e002 100644 (file)
@@ -86,7 +86,7 @@ QString BoardDatabase::ext()
 QString BoardDatabase::boardId()
 {
     BoardData * bdata = getBoardData();
-    return (bdata == 0) ? QString() : bdata->bbsPath().mid(1); /* remove "/" */
+    return (bdata == 0) ? QString() : bdata->bbsPath().mid(1); // remove "/"
 }
 
 /* (hostname)/(rootPath)/(bbsPath)/subject.txt */ /* public */
@@ -140,12 +140,12 @@ void BoardDatabase::getThreadList(
     threadList.clear();
     oldLogList.clear();
 
-    /* get all obtained threads list from cache */
+    // get all obtained threads list from cache
     if (m_url.prettyUrl() == "http://virtual/obtained/") {
 
         QStringList bbslist = allBoardUrlList();
 
-        /* search all cache dirs */
+        // search all cache dirs
         QString thread;
         foreach (thread, bbslist) {
             getCachedThreadList(thread, threadList);
@@ -154,15 +154,15 @@ void BoardDatabase::getThreadList(
         return ;
     }
 
-    /*-------------------------*/
+    //-------------------------
 
     BoardData* bdata = getBoardData();
     if (bdata == 0) return ;
 
-    /* download subject.txt */
+    // download subject.txt
     if (online) {
 
-        /* make directory */
+        // make directory
         Cache cache(m_url);
         QString cacheDir = cache.getDirPath();
         if (!QDir::root().mkpath(cacheDir)) return;
@@ -175,10 +175,10 @@ void BoardDatabase::getThreadList(
         KIO::NetAccess::download(subjectUrl(), subjectPath, 0);
     }
 
-    /* open and read subject.txt */
+    // open and read subject.txt
     readSubjectTxt(bdata, threadList);
 
-    /* get old logs */
+    // get old logs
     if (oldLogs) {
 
         QList<Thread*> tmpList;
@@ -201,7 +201,7 @@ void BoardDatabase::getCachedThreadList(const KUrl& url,
     QDir d(cacheDir);
     if (d.exists()) {
 
-        /* get all file names */
+        // get all file names
         QString ext = getBoardData(url)->ext();
         QString boardUrl = getBoardData(url)->basePath();
         QStringList filter('*' + ext);
@@ -212,7 +212,7 @@ void BoardDatabase::getCachedThreadList(const KUrl& url,
 
             QString datUrl = boardUrl + "dat/" + file;
 
-            /* read idx file */
+            // read idx file
             Thread* thread = Thread::getByUrlNew(datUrl);
             if (thread == 0) {
 
@@ -232,7 +232,7 @@ void BoardDatabase::getCachedThreadList(const KUrl& url,
 /* open subject.txt and get list of Thread classes */ /* private */
 bool BoardDatabase::readSubjectTxt(BoardData* bdata, QList<Thread*>& threadList)
 {
-    /* get all names of cached files to read idx.  */
+    // get all names of cached files to read idx.
     QStringList cacheList;
     if (!bdata->readIdx()) {
         Cache cache(m_url);
@@ -245,7 +245,7 @@ bool BoardDatabase::readSubjectTxt(BoardData* bdata, QList<Thread*>& threadList)
         }
     }
 
-    /* open subject.txt */
+    // open subject.txt
     Cache cache(m_url);
     QString subjectPath = cache.getSubjectPath();
     QIODevice * device = KFilterDev::deviceForFile(subjectPath, "application/x-gzip");
@@ -283,7 +283,7 @@ bool BoardDatabase::readSubjectTxt(BoardData* bdata, QList<Thread*>& threadList)
             QString subject = regexp.cap(2);
             QString num = regexp.cap(3);
 
-            /* get pointer of Thread class */
+            // get pointer of Thread class
             QString datUrl = boardUrl() + "dat/" + fname;
             Thread* thread = Thread::getByUrl(datUrl);
             ThreadIndex threadIndex(datUrl);
@@ -291,10 +291,10 @@ bool BoardDatabase::readSubjectTxt(BoardData* bdata, QList<Thread*>& threadList)
                 threadList.append(thread);
             }
 
-            /* set thread name */
+            // set thread name
             thread->setThreadName(subject);
 
-            /* load index file */
+            // load index file
             if (!bdata->readIdx()) {
 
                 if (cacheList.contains(fname)) {
@@ -302,9 +302,9 @@ bool BoardDatabase::readSubjectTxt(BoardData* bdata, QList<Thread*>& threadList)
                 }
             }
 
-            /* update res num */
+            // update res num
             int newNum = num.toInt();
-            if (thread->readNum()) { /* cache exists */
+            if (thread->readNum()) { // cache exists
                 int oldNum = thread->resNum();
 
                 if (newNum > oldNum) {
@@ -316,7 +316,7 @@ bool BoardDatabase::readSubjectTxt(BoardData* bdata, QList<Thread*>& threadList)
     }
 
     device->close();
-    bdata->setReadIdx(true); /* never read idx files again */
+    bdata->setReadIdx(true); // never read idx files again
 
     return true;
 }
@@ -370,7 +370,7 @@ int BoardDatabase::recordBoard(const QString& boardName, QString& oldUrl, int ty
 
     if (type == Board_Unknown) return Board_recordFailed;
 
-    /* check if the board is recorded or moved. */
+    // check if the board is recorded or moved.
     BoardData *data;
     foreach (data, m_boardDataList) {
 
@@ -379,20 +379,20 @@ int BoardDatabase::recordBoard(const QString& boardName, QString& oldUrl, int ty
                 && data->bbsPath() == bbsPath) {
 
             if (data->hostName() == hostname
-                    && data->rootPath() == rootPath) { /* recorded */
+                    && data->rootPath() == rootPath) { // recorded
                 return Board_recordRecorded;
-            } else { /* moved */
+            } else { // moved
                 oldUrl = data->basePath();
                 return Board_recordMoved;
             }
         }
     }
 
-    /* test only */
+    // test only
     if (test)
         return Board_recordNew;
 
-    /* record new board */
+    // record new board
     BoardData* bdata = new BoardData(boardName, hostname, rootPath, delimiter, bbsPath, ext, type);
     m_boardDataList.append(bdata);
 
@@ -419,7 +419,7 @@ int BoardDatabase::parseBoardUrl(
     bbsPath.clear();
     ext.clear();
 
-    /* decide type */
+    // decide type
     if (type == Board_Unknown) {
 
         if (m_url.host().contains("machi.to"))
@@ -430,17 +430,17 @@ int BoardDatabase::parseBoardUrl(
             type = Board_2ch;
     }
 
-    /* parse */
+    // parse
     switch (type) {
 
-    case Board_MachiBBS:     /* MACHI : http:// *.machi.to/(bbsPath)/ */
+    case Board_MachiBBS:     // MACHI : http:// *.machi.to/(bbsPath)/
 
         delimiter = "/bbs/read.pl";
         bbsPath = m_url.fileName();
         ext = ".cgi";
         break;
 
-    case Board_JBBS:   /* JBBS : http://jbbs.livedoor.jp/(bbsPath)/ */
+    case Board_JBBS:   // JBBS : http://jbbs.livedoor.jp/(bbsPath)/
 
         delimiter = "/bbs/read.cgi";
         bbsPath = m_url.prettyUrl().remove(hostname);
@@ -448,7 +448,7 @@ int BoardDatabase::parseBoardUrl(
         ext = ".cgi";
         break;
 
-    case Board_FlashCGI:  /* test for Flash CGI/Mini Thread  */
+    case Board_FlashCGI:  // test for Flash CGI/Mini Thread
 
         delimiter = "/test/read.cgi";
         bbsPath = m_url.fileName();
@@ -458,7 +458,7 @@ int BoardDatabase::parseBoardUrl(
         ext = ".dat";
         break;
 
-    default:   /* 2ch : http://(hostname)/(rootPath)/(bbsPath)/ */
+    default:   // 2ch : http://(hostname)/(rootPath)/(bbsPath)/
 
         delimiter = "/test/read.cgi";
         bbsPath = m_url.fileName();
@@ -470,7 +470,7 @@ int BoardDatabase::parseBoardUrl(
         break;
     }
 
-    /* For example, if bbsPath = "linux/", then m_bbsPath = "/linux" */
+    // For example, if bbsPath = "linux/", then m_bbsPath = "/linux"
     const QRegExp exp("/$");
     rootPath.remove(exp);
     bbsPath.remove(exp);
@@ -495,7 +495,7 @@ BoardData* BoardDatabase::getBoardData(const KUrl& url)
         return 0;
     QString urlstr = url.prettyUrl();
 
-    /* cache */
+    // cache
     if (m_previousBoardData != 0 && m_previousBoardUrl == urlstr)
         return m_previousBoardData;
 
@@ -507,7 +507,7 @@ BoardData* BoardDatabase::getBoardData(const KUrl& url)
             if (urlstr.contains(data->keyBasePathList()[i])
                     || urlstr.contains(data->keyCgiBasePathList()[i])) {
 
-                /* cache */
+                // cache
                 m_previousBoardData = data;
                 m_previousBoardUrl = urlstr;
 
@@ -588,20 +588,20 @@ bool BoardDatabase::moveBoard(const KUrl& fromUrl, const KUrl& toUrl)
 
     if (oldUrl == newUrl) return false;
 
-    /* Is oldURL recorded? */
+    // Is oldURL recorded?
     BoardData* bdata = getBoardData(oldUrl);
     if (bdata == 0) {
 
-        /* Is newURL recorded? */
+        // Is newURL recorded?
         bdata = getBoardData(newUrl);
         if (bdata == 0) return false;
     }
 
 
-    /*---------------------------*/
-    /* update BoardData */
+    //---------------------------
+    // update BoardData
 
-    /* get the path of old cache */
+    // get the path of old cache
     bdata->setHostName(oldhost);
     QStringList keyHosts = bdata->keyHostList();
     keyHosts.removeOne(oldhost);
@@ -610,18 +610,17 @@ bool BoardDatabase::moveBoard(const KUrl& fromUrl, const KUrl& toUrl)
     Cache cache(bdata->basePath());
     QString oldCachePath = cache.getDirPath();
 
-    /* update URL */
+    // update URL
     bdata->setHostName(newhost);
 
-    /* update keys */
-    /* The order of keyHosts will be like this:
-       
-      newhost      
-      oldhost      
-      foohost1
-      foohost2
-      
-    */
+    // update keys
+    // The order of keyHosts will be like this:
+    //   
+    //  newhost      
+    //  oldhost      
+    //  foohost1
+    //  foohost2
+    //  
     keyHosts = bdata->keyHostList();
     keyHosts.removeOne(oldhost);
     keyHosts.prepend(oldhost);
@@ -629,42 +628,42 @@ bool BoardDatabase::moveBoard(const KUrl& fromUrl, const KUrl& toUrl)
     keyHosts.prepend(newhost);
     bdata->createKeys(keyHosts);
 
-    /* reset BoardData */
+    // reset BoardData
     bdata->setReadIdx(false);
     bdata->setSettingLoaded(false);
 
 
-    /*---------------------------*/
-    /* move cache dir */
+    //---------------------------
+    // move cache dir
 
     QDir qdir;
     if (! qdir.exists(oldCachePath)) return true;
 
-    /* mkdir new server dir */
+    // mkdir new server dir
     Cache newCache(bdata->basePath());
     QString newCachePath = Cache::baseDir() + newCache.serverDir();
     QDir::root().mkpath(newCachePath);
 
-    /* backup old dir */
+    // backup old dir
     newCachePath += newCache.boardDir();
     if (qdir.exists (newCachePath)) {
         QString bkupPath = newCachePath;
-        bkupPath.truncate(bkupPath.length() - 1); /* remove '/' */
+        bkupPath.truncate(bkupPath.length() - 1); // remove '/'
         bkupPath +=
             '.' + QString::number(QDateTime::currentDateTime().toTime_t());
         qdir.rename(newCachePath, bkupPath);
     }
 
-    /* move cache dir */
+    // move cache dir
     if (qdir.exists(oldCachePath)) {
         qdir.rename(oldCachePath, newCachePath);
     } else
         QDir::root().mkpath(newCachePath);
 
-    /* make old dir */
+    // make old dir
     if (! qdir.exists(oldCachePath)) {
         QDir::root().mkpath(oldCachePath);
-        /* create BBS_MOVED */
+        // create BBS_MOVED
         QString movedPath = oldCachePath + "/BBS_MOVED";
         QFile file(movedPath);
         if (file.open(QIODevice::WriteOnly)) {
@@ -674,8 +673,8 @@ bool BoardDatabase::moveBoard(const KUrl& fromUrl, const KUrl& toUrl)
         file.close();
     }
 
-    /*---------------------------*/
-    /* update BBSHISTRY */
+    //---------------------------
+    // update BBSHISTRY
 
     Cache historyCache(bdata->basePath());
     QFile file(historyCache.getBBSHistoryPath());
@@ -693,8 +692,8 @@ bool BoardDatabase::moveBoard(const KUrl& fromUrl, const KUrl& toUrl)
     }
 
 
-    /*---------------------------*/
-    /* update other information */
+    //---------------------------
+    // update other information
     FavoriteThreads::replace(oldUrl, newUrl);
     Thread::replace(oldUrl, newUrl);
     ThreadInfo::replace(oldUrl, newUrl);
index cc63b63..9cffa16 100644 (file)
@@ -32,7 +32,7 @@ QString Cache::baseDir()
 
 QString Cache::serverDir() const
 {
-    /* Is board recorded ? */
+    // Is board recorded?
     BoardDatabase db(m_url);
     BoardData * bdata = db.getBoardData();
     if (bdata == 0) return QString();
@@ -45,7 +45,7 @@ QString Cache::serverDir() const
 
 QString Cache::boardDir() const
 {
-    /* Is board recorded ? */
+    // Is board recorded?
     BoardDatabase db(m_url);
     BoardData * bdata = db.getBoardData();
     if (bdata == 0) return QString();
index 51b29cf..e4427af 100644 (file)
@@ -42,33 +42,33 @@ DatInfo::DatInfo(const KUrl& url) : m_threadIndex(m_datUrl),
     QString refstr;
     m_datUrl = getDatUrl(url, refstr);
     m_threadIndex = ThreadIndex(m_datUrl);
-    /* get the pointer of Thread class */
+    // get the pointer of Thread class
     m_thread = Thread::getByUrlNew(m_datUrl);
     if (m_thread == 0) {
 
-        /* create Thread */
+        // create Thread
         m_thread = Thread::getByUrl(m_datUrl);
         if (m_thread == 0) return ;
 
-        /* read idx file */
+        // read idx file
         m_threadIndex.loadIndex(m_thread);
     }
 
     m_thread = Thread::getByUrl(m_datUrl);
 
-    /* japanese strings */
+    // japanese strings
     m_spacestr = QString::fromUtf8(KITAUTF8_ZENSPACE);
-    m_framestr1 = QString::fromUtf8(KITAUTF8_FRAME1); /* |  */
-    m_framestr2 = QString::fromUtf8(KITAUTF8_FRAME2); /* |- */
-    m_framestr3 = QString::fromUtf8(KITAUTF8_FRAME3); /* L  */
+    m_framestr1 = QString::fromUtf8(KITAUTF8_FRAME1); // |
+    m_framestr2 = QString::fromUtf8(KITAUTF8_FRAME2); // |-
+    m_framestr3 = QString::fromUtf8(KITAUTF8_FRAME3); // L
 
-    /* make directory */
+    // make directory
     Cache cache(m_datUrl);
     QString cacheDir = cache.getDirPath();
     if (!QDir::root().mkpath(cacheDir)) return ;
 
     initPrivate(
-        true /* load cache */
+        true // load cache
    );
 }
 
@@ -88,22 +88,22 @@ void DatInfo::init()
 /* Init. If loadCache = true, load data from cache. */ /* private */
 void DatInfo::initPrivate(bool loadCache)
 {
-    /* stop & delete dat loader */
+    // stop & delete dat loader
     deleteAccessJob();
 
-    /* init variables */
+    // init variables
     m_broken = false;
     m_nowLoading = false;
     m_lastLine.clear();
 
-    /* clear ResDatVec */
+    // clear ResDatVec
     m_resDatVec.clear();
     increaseResDatVec(RESDAT_DEFAULTSIZE);
 
-    /* reset Abone */
+    // reset Abone
     resetAbonePrivate();
 
-    /* create dat loader */
+    // create dat loader
     m_access = new Access(m_datUrl);
 
     connect(m_access, SIGNAL(receiveData(const QStringList&)),
@@ -112,15 +112,15 @@ void DatInfo::initPrivate(bool loadCache)
 
     if (!loadCache) return ;
 
-    /* reset ReadNum before loading cache. */
-    /* ReadNum & subject are updated by Access::getcache() */
+    // reset ReadNum before loading cache.
+    // ReadNum & subject are updated by Access::getcache()
     m_thread->setReadNum(0);
 
-    /* get dat from cahce  */
-    /* slotReceiveData() is called from Access::getcache() */
+    // get dat from cahce
+    // slotReceiveData() is called from Access::getcache()
     m_access->getcache();
 
-    /* save up-to-date thread information */
+    // save up-to-date thread information
     m_threadIndex.saveIndex(m_thread);
 }
 
@@ -216,7 +216,7 @@ void DatInfo::slotReceiveData(const QStringList& lineList)
 
     if (rescode != 200 && rescode != 206) return ;
 
-    /* copy lines to buffer */
+    // copy lines to buffer
     int count = lineList.count();
     for (int i = 0; i < count ; ++i)
         copyOneLineToResDat(lineList[ i ]);
@@ -231,28 +231,28 @@ bool DatInfo::copyOneLineToResDat(const QString& line)
 {
     if (line.isEmpty()) return false;
 
-    /* update ReadNum */
+    // update ReadNum
     const int num = m_thread->readNum() + 1;
     m_thread->setReadNum(num);
 
-    /* If resdat vector is short, then resize the vector. */
+    // If resdat vector is short, then resize the vector.
     while ((int) m_resDatVec.size() <= num)
         increaseResDatVec(RESDAT_DELTA);
 
-    /* reset ResDat */
+    // reset ResDat
     RESDAT& resdat = m_resDatVec[ num ];
     resetResDat(resdat);
 
     resdat.num = num;
     resdat.linestr = line;
 
-    /* get subject */
+    // get subject
     if (num == 1) parseDat(num);
 
-    /* search all responses which are responsed by this line. */
+    // search all responses which are responsed by this line.
     if (GlobalConfig::checkResponsed()) {
 
-        if (parseDat(num) && !checkAbonePrivate(num)) { /* parse line here to get AncList */
+        if (parseDat(num) && !checkAbonePrivate(num)) { // parse line here to get AncList
 
             const int maxRange = 10;
 
@@ -279,10 +279,10 @@ bool DatInfo::copyOneLineToResDat(const QString& line)
    finished loading new dat */      /* private  slot */
 void DatInfo::slotFinishLoad()
 {
-    /* save thread information */
+    // save thread information
     m_threadIndex.saveIndex(m_thread);
 
-    /* re-try by offlaw.cgi */
+    // re-try by offlaw.cgi
     DatManager datManager(m_datUrl);
     if (m_thread->readNum() == 0 && m_access2 == 0
             && datManager.is2chThread()) {
@@ -296,11 +296,11 @@ void DatInfo::slotFinishLoad()
             return ;
         }
     }
-    /* finish loading session & emit signal to the parent object */
+    // finish loading session & emit signal to the parent object
     m_nowLoading = false;
     emit finishLoad();
 
-    /* disconnect signals */
+    // disconnect signals
     disconnect(SIGNAL(receiveData()));
     disconnect(SIGNAL(finishLoad()));
 }
@@ -344,10 +344,10 @@ bool DatInfo::isLoadingNow() const
 void DatInfo::stopLoading() const
 {
 
-    /* Don't lock the mutex here !!!
-       It will cause deadlock , because
-       Access::stopJob() calls HTMLPart::slotFinishLoad() back,
-       then HTMLPart::slotFinishLoad() calls another functions in DatInfo. */
+    // Don't lock the mutex here !!!
+    // It will cause deadlock , because
+    // Access::stopJob() calls HTMLPart::slotFinishLoad() back,
+    // then HTMLPart::slotFinishLoad() calls another functions in DatInfo.
     if (m_access == 0)
         return;
     if (!m_nowLoading)
@@ -586,7 +586,7 @@ QString DatInfo::getTreeByResCore(int rootnum,
 
     if (!reverse) {
 
-        /* collect responses that have anchor to rootnum */
+        // collect responses that have anchor to rootnum
         for (int i = rootnum + 1; i <= m_thread->readNum(); i++) {
             if (checkAbonePrivate(i)) continue;
             if (checkRes(i, rootnum)) {
@@ -595,7 +595,7 @@ QString DatInfo::getTreeByResCore(int rootnum,
             }
         }
 
-    } else { /* collect responses for which rootnum has anchors */
+    } else { // collect responses for which rootnum has anchors
 
         AncList& anclist = m_resDatVec[ rootnum ].anclist;
         for (AncList::iterator it = anclist.begin(); it != anclist.end(); ++it) {
@@ -607,21 +607,21 @@ QString DatInfo::getTreeByResCore(int rootnum,
         }
     }
 
-    /* make HTML document */
+    // make HTML document
     if (count) {
 
         for (QStringList::iterator it = strlists.begin(); it != strlists.end(); ++it) {
             QString tmpstr;
-            if ((*it) == strlists.last()) tmpstr = m_framestr3;  /* 'L' */
-            else tmpstr = m_framestr2;  /* '|-' */
+            if ((*it) == strlists.last()) tmpstr = m_framestr3;  // 'L'
+            else tmpstr = m_framestr2;  // '|-'
 
             retstr += prestr + tmpstr + "<a href=\"#" + (*it) + "\">&gt;&gt;" + (*it) + "</a><br>";
 
-            /* call myself recursively */
+            // call myself recursively
             int tmpnum;
             tmpstr = prestr;
-            if ((*it) == strlists.last()) tmpstr += m_spacestr + m_spacestr + m_spacestr; /* "   " */
-            else tmpstr += m_framestr1 + m_spacestr; /* "| " */
+            if ((*it) == strlists.last()) tmpstr += m_spacestr + m_spacestr + m_spacestr; // "   "
+            else tmpstr += m_framestr1 + m_spacestr; // "| "
             retstr += getTreeByResCore((*it).toInt(), reverse, tmpnum, tmpstr);
             count += tmpnum;
         }
@@ -731,10 +731,10 @@ bool DatInfo::isBroken() const
     int rescode = m_access->responseCode();
     bool invalid = m_access->invalidDataReceived();
 
-    /* see also Access::slotReceiveThreadData() */
+    // see also Access::slotReceiveThreadData()
     if (invalid && (rescode == 200 || rescode == 206)) return true;
 
-    /* maybe "Dat Ochi" */
+    // maybe "Dat Ochi"
     return false;
 }
 
@@ -771,11 +771,11 @@ bool DatInfo::checkWord(const QStringList& stlist,   /* list of keywords */
         QRegExp regexp((*it));
         regexp.setCaseSensitivity(Qt::CaseInsensitive);
 
-        if (checkOr) { /* OR */
+        if (checkOr) { // OR
             if (str_text.indexOf(regexp, 0) != -1) {
                 return true;
             }
-        } else { /* AND */
+        } else { // AND
             if (str_text.indexOf(regexp, 0) == -1) return false;
         }
     }
@@ -858,7 +858,7 @@ bool DatInfo::checkAbonePrivate(int num)
             int refNum = (*it).from;
             int refNum2 = (*it).to;
 
-            /* I don't want to enter loop... */
+            // I don't want to enter loop...
             if (refNum >= num) continue;
             if (refNum2 >= num) refNum2 = num - 1;
 
@@ -945,23 +945,23 @@ void DatInfo::createTitleHtml(RESDAT& resdat, QString& titleHtml)
 
     if (useTableTag) titleHtml += "<table class=\"res_title\"><tr>";
 
-    /* res number */
+    // res number
     if (useTableTag) titleHtml += "<td class=\"res_title_number\">";
     titleHtml += "<a href=\"#write" + QString::number(resdat.num) + "\">";
     titleHtml += QString::number(resdat.num);
     titleHtml += "</a> ";
 
-    /* name & mail address */
+    // name & mail address
     if (useTableTag) titleHtml += "<td class=\"res_title_name\">";
     titleHtml += "<b>" + QString::fromUtf8(KITAUTF8_NAME);
 
-    /* show name with mail address */
+    // show name with mail address
     if (showMailAddress) {
 
         titleHtml += resdat.nameHTML;
         if (!resdat.address.isEmpty()) titleHtml += " [" + resdat.address + ']';
 
-    } else { /* don't show mail address */
+    } else { // don't show mail address
 
         if (resdat.address.isEmpty()) {
 
@@ -980,12 +980,12 @@ void DatInfo::createTitleHtml(RESDAT& resdat, QString& titleHtml)
 
     titleHtml += "</b> ";
 
-    /* date */
+    // date
     if (useTableTag) titleHtml += "<td class=\"res_title_date\">";
     titleHtml += QString::fromUtf8(KITAUTF8_COLON) + resdat.date;
     if (useTableTag) titleHtml += "</td>";
 
-    /* ID */
+    // ID
     if (!resdat.id.isEmpty()) {
 
         if (useTableTag) titleHtml += "<td class=\"res_title_id\">";
@@ -994,7 +994,7 @@ void DatInfo::createTitleHtml(RESDAT& resdat, QString& titleHtml)
         if (useTableTag) titleHtml += "</td>";
     }
 
-    /* BE */
+    // BE
     if (!resdat.be.isEmpty()) {
 
         if (useTableTag) titleHtml += "<td class=\"res_title_be\">";
@@ -1002,7 +1002,7 @@ void DatInfo::createTitleHtml(RESDAT& resdat, QString& titleHtml)
         if (useTableTag) titleHtml += "</td>";
     }
 
-    /* host */
+    // host
     if (!resdat.host.isEmpty()) {
 
         if (useTableTag) titleHtml += "<td class=\"res_title_host\">";
index bd77e98..da285f8 100644 (file)
@@ -76,8 +76,8 @@ DatInfo * DatManager::getDatInfoPointer() const
 
 DatInfo* DatManager::getDatInfo(bool checkCached) const
 {
-    /* search */
-    /* create and record instance */
+    // search
+    // create and record instance
     return (m_searchDatInfo != 0)
         ? m_searchDatInfo : recordDatInfo(checkCached);
 }
@@ -88,7 +88,7 @@ DatInfo* DatManager::getDatInfo(bool checkCached) const
 DatInfo* DatManager::searchDatInfo() const
 {
     if (m_datUrl.isEmpty())
-        return 0; /* This url is not recorded in BoardManager. */
+        return 0; // This url is not recorded in BoardManager.
     if (m_datInfoList.isEmpty())
         return 0;
 
@@ -102,7 +102,7 @@ DatInfo* DatManager::searchDatInfo() const
 
         if (m_datUrl == datInfo->url()) {
 
-            /* LRU */
+            // LRU
             if (i) {
                 m_datInfoList.erase(it);
                 m_datInfoList.prepend(datInfo);
@@ -122,13 +122,13 @@ DatInfo* DatManager::searchDatInfo() const
 DatInfo* DatManager::recordDatInfo(bool checkCached) const
 {
     if (m_datUrl.isEmpty())
-        return 0; /* This url is not recorded in BoardManager. */
+        return 0; // This url is not recorded in BoardManager.
 
-    /* create DatInfo & read cached data */
+    // create DatInfo & read cached data
     DatInfo* datInfo = new DatInfo(m_datUrl);
 
-    /* Does cache exist ? */
-    /* If cache does not exist, delete DatInfo here. */
+    // Does cache exist?
+    // If cache does not exist, delete DatInfo here.
     if (checkCached && datInfo->getReadNum() == 0) {
         delete datInfo;
         return 0;
@@ -136,7 +136,7 @@ DatInfo* DatManager::recordDatInfo(bool checkCached) const
 
     m_datInfoList.prepend(datInfo);
 
-    /* delete the all old instances (LRU algorithm)*/
+    // delete the all old instances (LRU algorithm)
     if (m_datInfoList.count() > DMANAGER_MAXQUEUE) {
         for (int i = DMANAGER_MAXQUEUE; i < m_datInfoList.count(); i++) {
             DatInfo* deleteInfo = m_datInfoList.at(i);
@@ -194,23 +194,23 @@ bool DatManager::deleteCache() const
     if (thread->readNum() == 0)
         return false;
 
-    /* init DatInfo */
+    // init DatInfo
     if (m_searchDatInfo && !m_searchDatInfo->deleteCache()) {
         return false;
     }
 
-    /* reset readNum & veiwPos */
+    // reset readNum & veiwPos
     thread->setReadNum(0);
     thread->setViewPos(0);
 
-    /* delete cache */
+    // delete cache
     Cache cache(m_datUrl);
     QString cachePath = cache.getPath();
     QString indexPath = cache.getIndexPath();
     QFile::remove(indexPath);
     QFile::remove(cachePath);
 
-    /* delete log from "cache" */
+    // delete log from "cache"
     ThreadInfo::removeThreadInfo(m_datUrl.prettyUrl());
     return true;
 }
@@ -351,11 +351,11 @@ void DatManager::setViewPos(int num) const
     if (thread != 0)
         thread->setViewPos(num);
 
-    /* save idx */
+    // save idx
     ThreadIndex threadIndex(m_url);
     threadIndex.setViewPos(num);
 
-    /* save "cache" */
+    // save "cache"
     ThreadInfo::setReadNum(m_datUrl.prettyUrl(), num);
 }
 
index 1533521..64d3ad4 100644 (file)
@@ -21,7 +21,7 @@ QString FlashCGI::buildPostStr(const PostData& data)
     QString ret;
     int mib = m_writeCodec->mibEnum();
 
-    (ret += "submit=") += "%8f%91%82%ab%8d%9e%82%de";  /* kakikomu */
+    (ret += "submit=") += "%8f%91%82%ab%8d%9e%82%de";  // kakikomu
     (ret += "&FROM=") += encodeString(data.name(), mib);
     (ret += "&mail=") += encodeString(data.mail(), mib);
     (ret += "&MESSAGE=") += encodeString(data.body(), mib);
index 2be7396..92069b7 100644 (file)
@@ -26,7 +26,7 @@ QString JBBS::buildPostStr(const PostData& data)
     QString ret;
     int mib = m_writeCodec->mibEnum();
 
-    ret += "submit=%8f%91%82%ab%8d%9e%82%de";  /* kakikomu */
+    ret += "submit=%8f%91%82%ab%8d%9e%82%de";  // kakikomu
     ret += "&NAME=" + encodeString(data.name(), mib);
     ret += "&MAIL=" + encodeString(data.mail(), mib);
     ret += "&MESSAGE=" + encodeString(data.body(), mib).replace(';', "%3B");
index 9a2f38f..e69750a 100644 (file)
@@ -22,22 +22,22 @@ QString K2ch::buildPostStr(const PostData& data)
 
     int mib = m_writeCodec->mibEnum();
 
-    ret += "submit=%8f%91%82%ab%8d%9e%82%de";  /* kakikomu */
+    ret += "submit=%8f%91%82%ab%8d%9e%82%de";  // kakikomu
 
-    /* from, mail, message, bbs */
+    // from, mail, message, bbs
     ret += "&FROM=" + encodeString(data.name(), mib);
     ret += "&mail=" + encodeString(data.mail(), mib);
     ret += "&MESSAGE=" + encodeString(data.body(), mib);
     ret += "&bbs=" + data.boardId();
     ret += "&tepo=don";
 
-    /* key */
+    // key
     ret += "&key=" + data.threadId();
 
-    /* time */
+    // time
     ret += "&time=" + QString::number(data.serverTime());
 
-    /* login */
+    // login
     if (!data.sessionId().isEmpty()) {
         ret += "&sid=" + data.sessionId();
     }
index 2ee3016..171794f 100644 (file)
@@ -64,7 +64,7 @@ QString Kita::getWriteUrl(const KUrl& m_datUrl)
     int m_bbstype = db.type();
     QString m_bbscgi;
 
-    /* set path of bbs.cgi */
+    // set path of bbs.cgi
     switch (m_bbstype) {
 
     case Board_JBBS: {
@@ -138,27 +138,27 @@ QString Kita::convertUrl(
 
     if (url.isEmpty()) return QString();
 
-    /* cache */
+    // cache
     if (m_prevConvMode == mode && m_prevConvUrl == url.prettyUrl()) {
 
         refstr = m_prevConvRefstr;
         return m_prevConvNewUrl;
     }
 
-    /* Is board recorded ? */
+    // Is board recorded?
     BoardDatabase db(url);
     BoardData* bdata = db.getBoardData();
     if (bdata == 0) return QString();
 
     QString urlstr = url.prettyUrl();
 
-    /* get thread & reference */
+    // get thread & reference
     QString thread;
     QString refBase;
 
     if (urlstr.contains("/dat/")) {
 
-        /* url = (hostname)/(rootPath)/(bbsPath)/dat/(thread_ID).(ext)#(refBase)  */
+        // url = (hostname)/(rootPath)/(bbsPath)/dat/(thread_ID).(ext)#(refBase)
         thread = url.fileName().remove(bdata->ext());
         refBase = url.ref();
     } else if (urlstr.contains(bdata->delimiter())) {
@@ -166,15 +166,15 @@ QString Kita::convertUrl(
         QString tmpstr;
         switch (bdata->type()) {
 
-            /* machi BBS */
-            /* ex.) If url = http://kanto.machi.to/bbs/read.pl?BBS=kana&KEY=1096716679 ,
-               then, thread = 1096716679                                */
+            // machi BBS
+            // ex.) If url = http://kanto.machi.to/bbs/read.pl?BBS=kana&KEY=1096716679 ,
+            //   then, thread = 1096716679
         case Board_MachiBBS:
             thread = url.queryItem("KEY");
             refBase.clear();
             break;
 
-            /* url = (hostname)/(rootPath)/(delimiter)/(bbsPath)/(thread_ID)/(refBase) */
+            // url = (hostname)/(rootPath)/(delimiter)/(bbsPath)/(thread_ID)/(refBase)
         default:
             tmpstr = urlstr.section(bdata->delimiter() + bdata->bbsPath(), 1, 1);
             thread = tmpstr.section('/', 1, 1);
@@ -191,7 +191,7 @@ QString Kita::convertUrl(
         else refstr = refBase;
     }
 
-    /* create new URL */
+    // create new URL
     QString newUrl;
     if (mode == URLMODE_DAT) newUrl = bdata->basePath() + "dat/" + thread + bdata->ext();
     else {
@@ -209,7 +209,7 @@ QString Kita::convertUrl(
         }
     }
 
-    /* cache */
+    // cache
     m_prevConvMode = mode;
     m_prevConvUrl = url.prettyUrl();
     m_prevConvNewUrl = newUrl;
@@ -226,7 +226,7 @@ QString Kita::convertUrl(
  */
 QString Kita::datToOfflaw(const KUrl& datUrl)
 {
-    /* TODO: not tested. */
+    // TODO: not tested.
     KUrl url(datUrl);
     QString root = url.host();
 
@@ -338,7 +338,7 @@ QString Kita::ParseMachiBBSOneLine(const QString& inputLine, int& nextNum)
     QRegExp regexp3("<dt>(\\d*) .*<font color=\"#......\"><b> (.*) </b></font> .* (..../../..).* (..:..:..) ID:([^<]*) <font size=.>\\[ ([^ ]*) \\]</font><br><dd>(.*)");
     QRegExp regexp4("<dt>(\\d*) .*<a href=\"mailto:(.*)\"><b> (.*) </B></a> .* (..../../..).* (..:..:..) ID:([^<]*) <font size=.>\\[ ([^ ]*) \\]</font><br><dd>(.*)");
 
-    /* abone */
+    // abone
     QRegExp regexp5("<dt>(\\d*) .*<br><dd>.*");
 
 
@@ -382,14 +382,14 @@ QString Kita::ParseMachiBBSOneLine(const QString& inputLine, int& nextNum)
         host = regexp4.cap(7);
         message = regexp4.cap(8);
 
-    } else if (regexp5.indexIn(m_machiLine) != -1) { /* abone */
+    } else if (regexp5.indexIn(m_machiLine) != -1) { // abone
 
         num = regexp5.cap(1).toInt();
         m_machiLine.clear();
         if (num == nextNum) return "abone<><><>abone<>";
         else return QString();
 
-    } else if (title_regexp.indexIn(m_machiLine) != -1) { /* get title */
+    } else if (title_regexp.indexIn(m_machiLine) != -1) { // get title
 
         m_machiSubject = title_regexp.cap(1);
         m_machiLine.clear();
@@ -431,11 +431,11 @@ QString Kita::ParseJBBSOneLine(const QString& line, int& nextNum)
 
     if (num < nextNum) return QString();
 
-    /* remove tag */
+    // remove tag
     QRegExp rex("<[^<]*>");
     name.remove(rex);
 
-    /* remove week */
+    // remove week
     rex = QRegExp("\\(.*\\)");
     date.remove(rex);
 
@@ -464,7 +464,7 @@ QString Kita::ParseFlashCGIOneLine(const QString& line)
     QString id = list[ 6 ];
     QString host = list[ 7 ];
 
-    /* remove tag */
+    // remove tag
     QRegExp rex("<[^<]*>");
     name.remove(rex);
 
index 4a313c0..0cba335 100644 (file)
@@ -21,7 +21,7 @@ QString MachiBBS::buildPostStr(const PostData& data)
     QString ret;
     int mib = m_writeCodec->mibEnum();
 
-    (ret += "submit=") += "%8f%91%82%ab%8d%9e%82%de";  /* kakikomu */
+    (ret += "submit=") += "%8f%91%82%ab%8d%9e%82%de";  // kakikomu
     (ret += "&NAME=") += encodeString(data.name(), mib);
     (ret += "&MAIL=") += encodeString(data.mail(), mib);
     (ret += "&MESSAGE=") += encodeString(data.body(), mib);
index 6ad8971..4f3f020 100644 (file)
@@ -96,20 +96,20 @@ void Parser::datToText(
 
         case '<':
 
-            /* " <br> " */
+            // " <br> "
             if (chpt[ i + 1 ] == 'b' && chpt[ i + 2 ] == 'r' && chpt[ i + 3 ] == '>') {
 
                 unsigned int i2 = i - startPos;
-                if (i > 0 && chpt[ i - 1 ] == ' ') i2--; /* remove space before <br> */
+                if (i > 0 && chpt[ i - 1 ] == ' ') i2--; // remove space before <br>
                 text += rawData.mid(startPos, i2) + '\n';
                 startPos = i + 4;
-                if (chpt[ startPos ] == ' ') startPos++; /* remove space after <br> */
+                if (chpt[ startPos ] == ' ') startPos++; // remove space after <br>
                 i = startPos - 1;
             }
 
-            /*----------------------------------------*/
+            //----------------------------------------
 
-            /* remove HTML tags <[^>]*>  */
+            // remove HTML tags <[^>]*>
             else {
 
                 if (i - startPos) text += rawData.mid(startPos, i - startPos);
@@ -119,11 +119,11 @@ void Parser::datToText(
 
             break;
 
-            /*----------------------------------*/
+            //----------------------------------
 
         case '&':
 
-            /* special char */
+            // special char
             {
                 QString tmpstr;
                 tmpstr = parseSpecialChar(chpt + i, pos);
@@ -168,11 +168,11 @@ static bool parseResAnchor(
         static bool isHYPHEN(unsigned short c)
         {
 
-            /* UTF-16 */
+            // UTF-16
             if (c == '-'
                     || (c >= 0x2010 && c <= 0x2015)
                     || (c == 0x2212)
-                    || (c == 0xFF0D)          /* UTF8: 0xEFBC8D */
+                    || (c == 0xFF0D)          // UTF8: 0xEFBC8D
               ) {
                 return true;
             }
@@ -190,13 +190,13 @@ static bool parseResAnchor(
     refNum[ 1 ] = 0;
     pos = 0;
 
-    /* check '>' twice */
+    // check '>' twice
     for (int i = 0; i < 2; i++) {
 
         if (cdat[ pos ].unicode() == UTF16_BRACKET) {
             linkstr += cdat[ pos ];
             pos++;
-        } else if (cdat[ pos ] == '&' && cdat[ pos + 1 ] == 'g'  /* &gt; */
+        } else if (cdat[ pos ] == '&' && cdat[ pos + 1 ] == 'g'  // &gt;
                     && cdat[ pos + 2 ] == 't' && cdat[ pos + 3 ] == ';') {
             linkstr += '>';
             pos += 4;
@@ -204,7 +204,7 @@ static bool parseResAnchor(
 
     }
 
-    /* check ',' */
+    // check ','
     if (!pos) {
         if (cdat[ pos ] == ',' || cdat[ pos ].unicode() == UTF16_COMMA) {
             linkstr += ',';
@@ -212,7 +212,7 @@ static bool parseResAnchor(
         }
     }
 
-    /* check '=' */
+    // check '='
     if (!pos) {
         if (cdat[ pos ] == '=' || cdat[ pos ].unicode() == UTF16_EQ) {
             linkstr += '=';
@@ -220,7 +220,7 @@ static bool parseResAnchor(
         }
     }
 
-    /* check digits */
+    // check digits
     int hyphen = 0;
 
     for (int i = 0 ; i < KITA_RESDIGIT + 1 && pos < length ; i++, pos++) {
@@ -271,7 +271,7 @@ static void parseName(const QString& rawStr, RESDAT& resdat)
     unsigned int length = resdat.name.length();
     resdat.nameHTML.clear();
 
-    /* anchor */
+    // anchor
     while (parseResAnchor(chpt + i, length - i, linkstr, refNum, pos)) {
 
         linkurl = QString("#%1").arg(refNum[ 0 ]);
@@ -290,7 +290,7 @@ static void parseName(const QString& rawStr, RESDAT& resdat)
         i += pos;
     }
 
-    /* non-digits strings */
+    // non-digits strings
     if (i < length) {
 
         resdat.nameHTML += "<span class=\"name_noaddr\">";
@@ -329,7 +329,7 @@ static void parseDateId(const QString& rawStr, RESDAT& resdat)
     }
     resdat.date = rawStr.left(pos);
 
-    /* id */
+    // id
     if (chpt[ pos ] == 'I' && chpt[ pos + 1 ] == 'D') {
         pos += 3;
         startpos = pos;
@@ -342,7 +342,7 @@ static void parseDateId(const QString& rawStr, RESDAT& resdat)
 
     if (pos >= length) return ;
 
-    /* be */
+    // be
     if (chpt[ pos ] == 'B' && chpt[ pos + 1 ] == 'E') {
         pos += 3;
         startpos = pos;
@@ -358,7 +358,7 @@ static void parseDateId(const QString& rawStr, RESDAT& resdat)
 
     if (pos >= length) return ;
 
-    /* host */
+    // host
     if (chpt[ pos ] == 'H' && chpt[ pos + 1 ] == 'O') {
         pos += 5;
         startpos = pos;
@@ -393,7 +393,7 @@ static bool parseLink(
 )
 {
 
-    /*-----------------------------*/
+    //-----------------------------
 
     linkstr.clear();
     linkurl.clear();
@@ -451,14 +451,14 @@ static bool createResAnchor(const QString &rawStr, RESDAT& resdat,
     unsigned int pos;
     unsigned int length = rawStr.length();
 
-    /* parse anchor */
+    // parse anchor
     if (!parseResAnchor(chpt + i, length - i, linkstr, refNum, pos)) {
 
         i += pos - 1;
         return false;
     }
 
-    /* create anchor */
+    // create anchor
     resdat.bodyHTML += rawStr.mid(startPos, i - startPos);
     linkurl = QString("#%1").arg(refNum[ 0 ]);
     if (refNum[ 1 ]) linkurl += QString("-%1").arg(refNum[ 1 ]);
@@ -467,7 +467,7 @@ static bool createResAnchor(const QString &rawStr, RESDAT& resdat,
     resdat.bodyHTML += linkstr;
     resdat.bodyHTML += "</a>";
 
-    /* add anchor to ancList */
+    // add anchor to ancList
     ANCNUM anctmp;
     if (refNum[ 1 ] < refNum[ 0 ]) refNum[ 1 ] = refNum[ 0 ];
     anctmp.from = refNum[ 0 ];
@@ -498,42 +498,41 @@ static void parseBody(const QString &rawStr, RESDAT& resdat)
 
     bool ancChain = false;
 
-    /* ancChain is chain for anchor. For examle, if anchor "&gt;2"
-       appeared, ancChain is set to true. Moreover, if next strings
-       are "=5", anchor for 5 is also set. Thus, we can obtain anchors
-       for strings "&gt;2=5" as follows:
-
-       <a href="#2">&gt;2</a><a href="#5">=5</a>
-    */
+    // ancChain is chain for anchor. For examle, if anchor "&gt;2"
+    // appeared, ancChain is set to true. Moreover, if next strings
+    // are "=5", anchor for 5 is also set. Thus, we can obtain anchors
+    // for strings "&gt;2=5" as follows:
+    //
+    //  <a href="#2">&gt;2</a><a href="#5">=5</a>
 
     int offset = 0;
-    if (chpt[ 0 ] == ' ') offset = 1; /* remove one space after <> */
+    if (chpt[ 0 ] == ' ') offset = 1; // remove one space after <>
     for (unsigned int i = startPos = offset ; i < length ; i++) {
 
         switch (chpt[ i ].unicode()) {
 
         case '<':
 
-            /* " <br> " */
+            // " <br> "
             if (chpt[ i + 1 ] == 'b' && chpt[ i + 2 ] == 'r' && chpt[ i + 3 ] == '>') {
 
-                /* reset anchor chain */
+                // reset anchor chain
                 ancChain = false;
 
                 unsigned int i2 = i - startPos;
-                if (i > 0 && chpt[ i - 1 ] == ' ') i2--; /* remove space before <br> */
+                if (i > 0 && chpt[ i - 1 ] == ' ') i2--; // remove space before <br>
                 resdat.bodyHTML += rawStr.mid(startPos, i2);
 
                 resdat.bodyHTML += "<br>";
 
                 startPos = i + 4;
-                if (chpt[ startPos ] == ' ') startPos++; /* remove space after <br> */
+                if (chpt[ startPos ] == ' ') startPos++; // remove space after <br>
                 i = startPos - 1;
             }
 
-            /*----------------------------------------*/
+            //----------------------------------------
 
-            /* remove HTML tags <[^>]*>  */
+            // remove HTML tags <[^>]*>
             else {
 
                 if (i - startPos) resdat.bodyHTML += rawStr.mid(startPos, i - startPos);
@@ -543,9 +542,9 @@ static void parseBody(const QString &rawStr, RESDAT& resdat)
 
             break;
 
-            /*----------------------------------------*/
+            //----------------------------------------
 
-        case 'h':     /* "http://" or "ttp://" or "tp:" */
+        case 'h':     // "http://" or "ttp://" or "tp:"
         case 't':
             {
                 unsigned int pos = 0;
@@ -562,25 +561,25 @@ static void parseBody(const QString &rawStr, RESDAT& resdat)
 
             break;
 
-            /*----------------------------------*/
+            //----------------------------------
 
         case '&':
 
-            /* &gt; */
+            // &gt;
             if (chpt[ i + 1 ] == 'g' && chpt[ i + 2 ] == 't' && chpt[ i + 3 ] == ';')
                 ancChain = createResAnchor(rawStr, resdat, chpt, i, startPos);
 
             break;
 
-            /*----------------------------------------*/
+            //----------------------------------------
 
-            /* unicode '>'  */
+            // unicode '>'
         case UTF16_BRACKET:
 
             ancChain = createResAnchor(rawStr, resdat, chpt, i, startPos);
             break;
 
-            /*----------------------------------*/
+            //----------------------------------
 
         default:
 
@@ -615,14 +614,14 @@ bool Parser::parseResDat(RESDAT& resdat, QString& subject)
     resdat.broken = false;
     resdat.anclist.clear();
 
-    /* search the staring positions of each section to split raw data. */
+    // search the staring positions of each section to split raw data.
     const QChar *chpt = resdat.linestr.unicode();
     unsigned int length = resdat.linestr.length();
     unsigned int section = 0;
     unsigned int sectionPos[ 5 ];
     for (unsigned int i = 0 ; i < length ; i++) {
 
-        /* sections are splitted by "<>" */
+        // sections are splitted by "<>"
         if (chpt[ i ] == '<' && chpt[ i + 1 ] == '>') {
             section++;
 
@@ -636,7 +635,7 @@ bool Parser::parseResDat(RESDAT& resdat, QString& subject)
         }
     }
 
-    /* broken data */
+    // broken data
     if (section != 4) {
         resdat.broken = true;
         return true;
@@ -644,23 +643,23 @@ bool Parser::parseResDat(RESDAT& resdat, QString& subject)
 
     //    qDebug("[%d] %d %d %d %d",section, sectionPos[1],sectionPos[2],sectionPos[3],sectionPos[4]);
 
-    /* name */
+    // name
     length = sectionPos[ 1 ] - 2 ;
     parseName(resdat.linestr.mid(0, length), resdat);
 
-    /* mail */
+    // mail
     length = sectionPos[ 2 ] - 2 - sectionPos[ 1 ];
     datToText(resdat.linestr.mid(sectionPos[ 1 ], length), resdat.address);
 
-    /* date, ID, host  */
+    // date, ID, host
     length = sectionPos[ 3 ] - 2 - sectionPos[ 2 ];
     parseDateId(resdat.linestr.mid(sectionPos[ 2 ], length), resdat);
 
-    /* body */
+    // body
     length = sectionPos[ 4 ] - 2 - sectionPos[ 3 ];
     parseBody(resdat.linestr.mid(sectionPos[ 3 ], length), resdat);
 
-    /* subject */
+    // subject
     subject = resdat.linestr.mid(sectionPos[ 4 ]);
 
     return true;
index ffb81f8..9c57c77 100644 (file)
@@ -25,7 +25,7 @@ PostData::PostData(const KUrl& datUrl, const QString& name, const QString& mail,
     DatManager datManager(m_datUrl);
     m_threadId = datManager.threadId();
     m_serverTime = datManager.getServerTime();
-    /* login */
+    // login
     if (datManager.is2chThread() && Account::isLogged()) {
         m_sessionId = KUrl::toPercentEncoding(Account::getSessionId());
     } 
index ae541a3..55251c6 100644 (file)
@@ -38,11 +38,11 @@ const QString& Thread::threadName() const
 void Thread::setThreadName(const QString& name)
 {
     QString threadName = name;
-    /* remove space */
+    // remove space
     QRegExp qrx(" +$");
     threadName.remove(qrx);
 
-    /* unescape */
+    // unescape
     threadName.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", "&");
 
     m_threadName = threadName;
index 5cfe8a3..171b35d 100644 (file)
@@ -91,12 +91,12 @@ void ThreadIndex::setMarkList(const QList<int>& markList)
 void ThreadIndex::loadIndex(Thread* thread, bool checkCached) const
 {
     KConfig config(m_indexPath);
-    /* load read number */
+    // load read number
     int readNum = getReadNumPrivate(config, checkCached);
-    if (readNum == 0) return ;  /* cache does not exist. */
+    if (readNum == 0) return ;  // cache does not exist.
     thread->setReadNum(readNum);
 
-    /* load thread name */
+    // load thread name
     QString subject = getSubjectPrivate(config);
     if (subject.isEmpty() && !thread->threadName().isEmpty()) {
         subject = thread->threadName();
@@ -106,15 +106,15 @@ void ThreadIndex::loadIndex(Thread* thread, bool checkCached) const
     if (subject.isEmpty()) thread->setThreadName("?");
     else thread->setThreadName(subject);
 
-    /* load res number */
+    // load res number
     thread->setResNum(getResNumPrivate(config));
 
-    /* load view pos */
+    // load view pos
     thread->setViewPos(getViewPosPrivate(config));
     if (thread->viewPos() > thread->readNum())
         thread->setReadNum(thread->viewPos());
 
-    /* load mark */
+    // load mark
     thread->setMarkList(getMarkListPrivate(config));
 }
 
@@ -123,28 +123,28 @@ void ThreadIndex::loadIndex(Thread* thread, bool checkCached) const
 /* save thread information */  /* public */
 void ThreadIndex::saveIndex(const Thread* thread)
 {
-    /* If readNum == 0, delete idx file */
+    // If readNum == 0, delete idx file
     if (thread->readNum() == 0) {
         QFile::remove(m_indexPath);
     }
     KConfig config(m_indexPath);
 
-    /* save thread name */
+    // save thread name
     setSubjectPrivate(config, thread->threadName());
 
-    /* save res number */
+    // save res number
     setResNumPrivate(config, thread->resNum());
 
-    /* save read number */
+    // save read number
     setReadNumPrivate(config, thread->readNum());
 
-    /* save view pos */
+    // save view pos
     setViewPosPrivate(config, thread->viewPos());
 
-    /* save mark */
+    // save mark
     setMarkListPrivate(config, thread->markList());
 
-    /* save "cache" */
+    // save "cache"
     KUrl datUrl = getDatUrl(m_url);
     int num = (thread->viewPos() ? thread->viewPos() : thread->readNum());
     ThreadInfo::setReadNum(datUrl.prettyUrl(), num);
@@ -172,7 +172,7 @@ int ThreadIndex::getResNumPrivate(KConfig& config) const
 {
     int resNum = config.group("").readEntry("ResNum", 0);
 
-    /* use obsoleted "cache" file */
+    // use obsoleted "cache" file
     if (!resNum) {
         KUrl datUrl = getDatUrl(m_url);
         resNum = ThreadInfo::readNum(datUrl.prettyUrl());
@@ -194,7 +194,7 @@ void ThreadIndex::setResNumPrivate(KConfig& config, int resNum)
 /* private */
 int ThreadIndex::getReadNumPrivate(KConfig& config, bool checkCached) const
 {
-    /* If cache does not exist, return 0 */
+    // If cache does not exist, return 0
     if (checkCached) {
         Cache cache(m_url);
         QString path = cache.getPath();
@@ -207,10 +207,10 @@ int ThreadIndex::getReadNumPrivate(KConfig& config, bool checkCached) const
 
     if (!readNum) {
 
-        /* use ViewPos instead of ReadNum. */
+        // use ViewPos instead of ReadNum.
         readNum = config.group("").readEntry("ViewPos", 0);
 
-        /* use obsoleted "cache" file */
+        // use obsoleted "cache" file
         if (!readNum) {
             KUrl datUrl = getDatUrl(m_url);
             readNum = ThreadInfo::readNum(datUrl.prettyUrl());
index 1d74b07..f6ca421 100644 (file)
@@ -360,7 +360,7 @@ void MainWindow::setupView()
 
     setCentralWidget(mainWidget);
 
-    /* write dock */
+    // write dock
     m_writeTab = new WriteTabWidget(0);
     ViewMediator::getInstance()->setWriteTabWidget(m_writeTab);
 }
index 01eaf44..5240bd3 100644 (file)
@@ -102,14 +102,14 @@ void ResPopup::adjustSize()
         QRect qr = curnode.getRect();
         int tmpwd = qr.right() - qr.left();
 
-        /*----------------------------------*/
+        //----------------------------------
 
         if (curnode.nodeType() == DOM::Node::TEXT_NODE) {
             if (xx == 0) xx = qr.left();
             width += tmpwd;
         }
 
-        /*----------------------------------*/
+        //----------------------------------
 
         else if (curnode.nodeName().string() == "div") {
             if (leftmrg == 0) leftmrg = qr.left();
@@ -117,7 +117,7 @@ void ResPopup::adjustSize()
             xx = 0;
         }
 
-        /*----------------------------------*/
+        //----------------------------------
 
         else if (curnode.nodeName().string() == "br") {
             width = 0;
@@ -125,12 +125,12 @@ void ResPopup::adjustSize()
         }
 
 
-        /*----------------------------------*/
+        //----------------------------------
 
         if (leftmrg + xx + width > maxwidth) maxwidth = leftmrg + xx + width;
         if (qr.bottom() > maxheight) maxheight = qr.bottom();
 
-        /* move to the next node */
+        // move to the next node
         DOM::Node next = curnode.firstChild();
 
         if (next.isNull()) next = curnode.nextSibling();
@@ -166,11 +166,11 @@ void ResPopup::adjustPos(const QPoint& point)
         POS_RightDown
     };
 
-    /* config */
+    // config
 
     const int mrg = 16;
 
-    /*----------------------------*/
+    //----------------------------
 
     if (!m_htmlPart) return ;
 
@@ -276,11 +276,11 @@ void ResPopup::adjustPos(const QPoint& point)
 /* move mouse pointer above the popup frame */  /* public */
 void ResPopup::moveMouseAbove()
 {
-    /* config */
+    // config
 
     const int mrg = 10;
 
-    /*-------------------------------*/
+    //-------------------------------
 
     QPoint pos = QCursor::pos();
     int cx = pos.x(), cy = pos.y();
index 831e435..bfb8452 100644 (file)
@@ -37,7 +37,7 @@ ThreadTabWidget::ThreadTabWidget(QWidget* parent) : TabWidgetBase(parent)
 
     setupActions();
 
-    /* default view */
+    // default view
     createView(i18nc("@title:tab", "Thread"));
 }
 
@@ -69,11 +69,11 @@ void ThreadTabWidget::slotShowMainThread(const KUrl& url)
         setCurrentWidget(view);
 
         if (view->threadUrl().isEmpty()) {
-            /* Show on the default view */
+            // Show on the default view
             view->showThread(datUrl, jumpNum);
         } else {
-            /* The view is already shown */
-            /* TODO: jump to jumpNum after reloading */
+            // The view is already shown
+            // TODO: jump to jumpNum after reloading
 
             view->slotReloadButton(jumpNum);
         }
@@ -139,7 +139,7 @@ ThreadView* ThreadTabWidget::findMainView(const KUrl& url)
             if (view->getViewMode() == VIEWMODE_MAINVIEW) {
 
                 if (view->datUrl() == datUrl
-                        || view->datUrl().isEmpty()  /* default view */
+                        || view->datUrl().isEmpty()  // default view
                   ) return view;
             }
         }
@@ -187,7 +187,7 @@ void ThreadTabWidget::deleteWidget(QWidget* w)
         ViewMediator::getInstance()->setMainStatus(QString());
         ViewMediator::getInstance()->setMainUrlLine(KUrl());
 
-        /* default view */
+        // default view
         ThreadView * threadView = createView(i18nc("@title:tab", "Thread"));
 
         if (threadView) {
@@ -350,8 +350,8 @@ void ThreadTabWidget::contextMenuEvent(QContextMenuEvent* e)
          popup.addAction(act);
     }
     popup.exec(e->globalPos());
-/*    KActionCollection * collection = client->actionCollection();
-    KAction* action;
-    action = new KAction(i18n("goback anchor"), SmallIcon("idea"), KShortcut(), m_threadPart, SLOT(gobackAnchor()), collection, "goback_anchor");
-    emit popupMenu(client, global, url, mimeType, mode);*/ // TODO
+//    KActionCollection * collection = client->actionCollection();
+//    KAction* action;
+//    action = new KAction(i18n("goback anchor"), SmallIcon("idea"), KShortcut(), m_threadPart, SLOT(gobackAnchor()), collection, "goback_anchor");
+//    emit popupMenu(client, global, url, mimeType, mode); // TODO
 }
index 6003843..09e7697 100644 (file)
@@ -40,7 +40,7 @@ ThreadView::ThreadView(ThreadTabWidget* parent)
 {
     m_parent = parent;
 
-    /* copied from Base class */
+    // copied from Base class
     setFocusPolicy(Qt::ClickFocus);
     threadViewBaseLayout = new QVBoxLayout(this); 
 
@@ -98,7 +98,7 @@ ThreadView::ThreadView(ThreadTabWidget* parent)
     threadViewBaseLayout->addWidget(threadFrame);
     resize(QSize(870, 480).expandedTo(minimumSizeHint()));
     setAttribute(Qt::WA_WState_Polished);
-    /* copy end */
+    // copy end
 
     m_threadPart = new HTMLPart(threadFrame);
     QHBoxLayout* aLayout = new QHBoxLayout(threadFrame);
@@ -279,21 +279,21 @@ void ThreadView::setFocus()
 /*-------*/
 void ThreadView::setup(const KUrl& datUrl, int mode)
 {
-    /* config. */
+    // config.
 
-    /*---------------------------------------*/
-    /* setup                                 */
+    //---------------------------------------
+    // setup
 
     m_datUrl = getDatUrl(datUrl);
 
-    /* setup HTMLPart */
+    // setup HTMLPart
     int partMode = HTMLPART_MODE_MAINPART;
     m_threadPart->setup(partMode, m_datUrl);
 
-    /* mode. Mode is defined in threadview.h */
+    // mode. Mode is defined in threadview.h
     m_viewmode = mode;
 
-    /* reset search direction */
+    // reset search direction
     m_revsearch = false;
 }
 
@@ -304,7 +304,7 @@ void ThreadView::setup(const KUrl& datUrl, int mode)
 /*--------------------------------------------------------*/
 void ThreadView::showThread(const KUrl& datUrl, int num)
 {
-    /* If this widget is not parent, then do nothing. */
+    // If this widget is not parent, then do nothing.
     if (m_viewmode != VIEWMODE_MAINVIEW) return ;
 
     if (num == 0) num = DatManager(datUrl).getViewPos();
@@ -313,14 +313,14 @@ void ThreadView::showThread(const KUrl& datUrl, int num)
     topLevelWidget() ->raise();
     activateWindow();
 
-    /* setup */
+    // setup
     setup(datUrl, VIEWMODE_MAINVIEW);
 
-    /* get log from cahce */
+    // get log from cahce
     m_rescode = 200;
     if (!m_threadPart->load(num)) showStatusBar("");
 
-    /* update data */
+    // update data
     slotUpdateInfo();
     slotReloadButton();
 }
@@ -345,13 +345,13 @@ void ThreadView::slotReloadButton(int jumpNum)
 /* stop loading the thread           */ /* public slot */
 void ThreadView::slotStopLoading()
 {
-    /* hide popup */
+    // hide popup
     if (m_threadPart->isPopupVisible()) {
         m_threadPart->slotDeletePopup();
         return ;
     }
 
-    /* unforcus search combo */
+    // unforcus search combo
     if (searchCombo->hasFocus()) {
         setFocus();
         return ;
@@ -387,7 +387,7 @@ void ThreadView::showStatusBar(const QString &information)
         if (broken)
             info += " " + i18nc("@info:status", "This thread is broken.");
 
-        /* show status bar,caption, url  */
+        // show status bar,caption, url
         infostr = datManager.threadName() +
             QString(" [Total: %1 New: %2] %3 k").arg(resNum)
             .arg(resNum - viewPos).arg(datSize / 1024)
@@ -419,7 +419,7 @@ void ThreadView::slotUpdateInfo()
     m_rescode = datManager.getResponseCode();
     m_serverTime = datManager.getServerTime();
 
-    /* uptate information */
+    // uptate information
     BoardDatabase db(m_datUrl);
     setSubjectLabel(db.boardName(), datManager.threadName() + QString(" (%1)")
                      .arg(datManager.getReadNum()), db.boardUrl());
@@ -439,7 +439,7 @@ void ThreadView::slotUpdateInfo()
 
     showStatusBar("");
 
-    emit showThreadCompleted(); /* to ThreadPart */
+    emit showThreadCompleted(); // to ThreadPart
 }
 
 
@@ -450,12 +450,12 @@ void ThreadView::slotUpdateInfo()
 /*------------------------*/  /* private slots */
 void ThreadView::slotSearchButton()
 {
-    if (m_datUrl.isEmpty()) return ; /* Nothing is shown on the screen.*/
+    if (m_datUrl.isEmpty()) return ; // Nothing is shown on the screen.
 
     QString str = searchCombo->currentText();
     if (str.at(0) == ':') {
 
-        /* show res popup */
+        // show res popup
         if (str.at(1) == 'p') {
             int refNum = str.mid(2).toInt();
             QPoint pos = mapToGlobal(searchCombo->pos());
@@ -463,14 +463,14 @@ void ThreadView::slotSearchButton()
             m_threadPart->slotShowResPopup(pos , refNum, refNum);
             return ;
         }
-        /* find by find dialog */
+        // find by find dialog
         else if (str.at(1) == 'f') {
             KAction * act = static_cast< KAction* >(m_threadPart->action("find"));
             if (act) act->trigger();
             return ;
         }
 
-        /* jump */
+        // jump
         QString anc = str.mid(1);
         m_threadPart->gotoAnchor(anc, false);
         searchCombo->setFocus();
@@ -487,9 +487,9 @@ void ThreadView::slotSearchPrev() { slotSearchPrivate(true); }
 /* private */
 void ThreadView::slotSearchPrivate(bool rev)
 {
-    if (m_datUrl.isEmpty()) return ; /* Nothing is shown on the screen.*/
+    if (m_datUrl.isEmpty()) return ; // Nothing is shown on the screen.
 
-    /* jump */
+    // jump
     QString str = searchCombo->currentText();
     if (str.isEmpty()) return ;
     if (str.isEmpty()) return ;
@@ -504,7 +504,7 @@ void ThreadView::slotSearchPrivate(bool rev)
 
         if (datManager.checkWord(query, i, false)) {
 
-            /* if this is parent, then show all responses, and search */
+            // if this is parent, then show all responses, and search
             if (m_viewmode == VIEWMODE_MAINVIEW) m_threadPart->showAll();
 
             insertSearchCombo();
index d903a13..df53107 100644 (file)
@@ -55,7 +55,7 @@ void WriteTabWidget::openWriteView(const KUrl& url,
 //        return ;
     }
 
-    /* view exists */
+    // view exists
     WriteView* view = findWriteView(url);
     if (view) {
         if (view->body().length()) {
@@ -64,17 +64,17 @@ void WriteTabWidget::openWriteView(const KUrl& url,
                     == KMessageBox::No) return;
         }
 
-        /* clear */
+        // clear
         view->setMessage(resStr);
         setCurrentWidget(view);
         return ;
     }
 
     // TODO: refactoring.
-    /* create new write view & add it to tab */
+    // create new write view & add it to tab
     QString threadName;
 
-    /* write res */
+    // write res
     WriteView* new_dlg;
     threadName = DatManager(url).threadName();
     new_dlg = new WriteView(this, url);
@@ -119,13 +119,13 @@ void WriteTabWidget::slotChangeWriteTab(const KUrl& url)
     int max = count();
     if (max == 0) return ;
 
-    /* disable all ok buttons. */
+    // disable all ok buttons.
     for(int i=0; i < max ; i++) {
         view = isWriteView(widget(i));
         if (view) view->slotEnableWriting(false);
     }
 
-    /* show current url page. */
+    // show current url page.
     view = findWriteView(url);
     if (view) {
         if (currentWidget() != view) setCurrentWidget(view);
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