svnno****@sourc*****
svnno****@sourc*****
2009年 7月 5日 (日) 10:57:23 JST
Revision: 2357 http://sourceforge.jp/projects/kita/svn/view?view=rev&revision=2357 Author: nogu Date: 2009-07-05 10:57:23 +0900 (Sun, 05 Jul 2009) Log Message: ----------- don't use TRUE and FALSE macros Modified Paths: -------------- kita/branches/KITA-KDE4/kita/src/bbsview.cpp kita/branches/KITA-KDE4/kita/src/boardview.cpp kita/branches/KITA-KDE4/kita/src/boardview.h kita/branches/KITA-KDE4/kita/src/domtree.cpp kita/branches/KITA-KDE4/kita/src/favoritelistview.cpp kita/branches/KITA-KDE4/kita/src/htmlpart.cpp kita/branches/KITA-KDE4/kita/src/kitaui/htmlview.cpp kita/branches/KITA-KDE4/kita/src/libkita/access.cpp kita/branches/KITA-KDE4/kita/src/libkita/account.cpp kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.h kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp kita/branches/KITA-KDE4/kita/src/libkita/datinfo.h kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp kita/branches/KITA-KDE4/kita/src/libkita/datmanager.h kita/branches/KITA-KDE4/kita/src/libkita/favoriteboards.cpp kita/branches/KITA-KDE4/kita/src/libkita/favoritethreads.cpp kita/branches/KITA-KDE4/kita/src/libkita/kita_misc.cpp kita/branches/KITA-KDE4/kita/src/libkita/thread.cpp kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h kita/branches/KITA-KDE4/kita/src/mainwindow.cpp kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui.h kita/branches/KITA-KDE4/kita/src/respopup.cpp kita/branches/KITA-KDE4/kita/src/threadlistview.cpp kita/branches/KITA-KDE4/kita/src/threadview.cpp kita/branches/KITA-KDE4/kita/src/viewmediator.cpp kita/branches/KITA-KDE4/kita/src/writedialogbase.ui.h kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp kita/branches/KITA-KDE4/kita/src/writeview.cpp kita/branches/KITA-KDE4/kita/src/writeview.h Modified: kita/branches/KITA-KDE4/kita/src/bbsview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/bbsview.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/bbsview.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -74,7 +74,7 @@ sizePolicy.setVerticalStretch( 0 ); sizePolicy.setHeightForWidth( SearchCombo->sizePolicy().hasHeightForWidth() ); SearchCombo->setSizePolicy( sizePolicy ); - SearchCombo->setEditable( TRUE ); + SearchCombo->setEditable( true ); SearchCombo->setMaxCount( 10 ); layout10->addWidget( SearchCombo ); spacer2 = new QSpacerItem( 467, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); @@ -82,9 +82,9 @@ KitaBBSViewBaseLayout->addLayout( layout10 ); m_boardList = new K3ListView( this ); - m_boardList->setRootIsDecorated( TRUE ); + m_boardList->setRootIsDecorated( true ); m_boardList->setTreeStepSize( 10 ); - m_boardList->setFullWidth( TRUE ); + m_boardList->setFullWidth( true ); KitaBBSViewBaseLayout->addWidget( m_boardList ); resize( QSize(600, 482).expandedTo(minimumSizeHint()) ); setAttribute( Qt::WA_WState_Polished ); @@ -92,7 +92,7 @@ m_boardList->setSorting( -1 ); m_boardList->addColumn( i18n( "board name" ) ); - m_boardList->header() ->setClickEnabled( FALSE ); + m_boardList->header() ->setClickEnabled( false ); /* default colors */ QPalette palette = m_boardList->viewport() ->palette(); @@ -131,12 +131,12 @@ QString tmpFile; QString url = Kita::Config::boardListUrl(); if ( ! KIO::NetAccess::download( url, tmpFile, NULL ) ) { - return FALSE; + return false; } QFile file( tmpFile ); if ( ! file.open( QIODevice::ReadOnly ) ) { - return FALSE; + return false; } QTextStream stream( &file ); @@ -165,7 +165,7 @@ QString boardName = category.boardNameList[ count ]; QString oldURL; int ret = Kita::BoardManager::enrollBoard( boardURL, boardName, oldURL, Kita::Board_Unknown, - TRUE /* test only */ + true /* test only */ ); if ( ret == Kita::Board_enrollNew ) { newBoards += boardName + " ( " + category.category_name + " ) " + boardURL + "\n"; @@ -219,11 +219,11 @@ QApplication::clipboard() ->setText( str , QClipboard::Selection ); } - if ( ret == QMessageBox::Cancel ) return FALSE; + if ( ret == QMessageBox::Cancel ) return false; } else if ( newBoards == QString::null && oldBoards == QString::null ) { QMessageBox::information( this, "Kita", i18n( "no new boards" ) ); - return FALSE; + return false; } // if moved URL exists. move files. @@ -280,7 +280,7 @@ logfile.close(); } - return TRUE; + return true; } void KitaBBSView::updateBoardList() @@ -577,7 +577,7 @@ for ( item = m_boardList->firstChild(); item; item = item->nextSibling() ) { QString categoryName = item->text( 0 ); if ( openedList.indexOf( categoryName ) != -1 ) { - item->setOpen( TRUE ); + item->setOpen( true ); } } } @@ -611,15 +611,15 @@ Q3ListViewItem* boardItem; for ( categoryItem = m_boardList->firstChild(); categoryItem; categoryItem = categoryItem->nextSibling() ) { - bool matched = FALSE; + bool matched = false; for ( boardItem = categoryItem->firstChild(); boardItem; boardItem = boardItem->nextSibling() ) { QString boardName = boardItem->text( 0 ); if ( boardName.contains( str ) ) { - boardItem->setVisible( TRUE ); - matched = TRUE; + boardItem->setVisible( true ); + matched = true; } else { - boardItem->setVisible( FALSE ); + boardItem->setVisible( false ); } } Modified: kita/branches/KITA-KDE4/kita/src/boardview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/boardview.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/boardview.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -61,7 +61,7 @@ { init(); m_parent = parent; - closeButton->setEnabled( TRUE ); + closeButton->setEnabled( true ); connect( subjectList, SIGNAL( contextMenuRequested( Q3ListViewItem*, const QPoint&, int ) ), SLOT( slotContextMenuRequested( Q3ListViewItem*, const QPoint&, int ) ) ); @@ -91,8 +91,8 @@ m_unreadNum = 0; m_readNum = 0; m_newNum = 0; - m_showOldLogs = FALSE; - m_enableSizeChange = FALSE; + m_showOldLogs = false; + m_enableSizeChange = false; } @@ -119,7 +119,7 @@ void KitaBoardView::toggleShowOldLogs() { m_showOldLogs = !m_showOldLogs; - loadBoard( m_boardURL, FALSE ); + loadBoard( m_boardURL, false ); } void KitaBoardView::loadThread( Q3ListViewItem* item ) @@ -144,7 +144,7 @@ { activateWindow(); topLevelWidget() ->raise(); - m_enableSizeChange = FALSE; + m_enableSizeChange = false; // reset member variables. // FIXME: FavoriteListView::update() @@ -197,14 +197,14 @@ break; } - subjectList->setSelected( subjectList->firstChild(), TRUE ); + subjectList->setSelected( subjectList->firstChild(), true ); subjectList->setFocus(); UpdateKindLabel(); /* restore column size */ loadLayout(); loadHeaderOnOff(); - m_enableSizeChange = TRUE; + m_enableSizeChange = true; } /* public slot */ /* virtual */ @@ -451,20 +451,20 @@ for ( int i = Col_Begin; i <= Col_End; i++ ) { if ( i != Col_Subject && i != Col_MarkOrder && i != Col_IDOrder ) { KAction* action = new KAction( s_colAttr[ i ].itemName, this ); - action->setCheckable( TRUE ); + action->setCheckable( true ); action->setChecked( subjectList->columnWidth( i ) != 0 ); action->setData( QVariant( i ) ); popup.addAction( action ); } } KAction* autoResizeAct = new KAction( i18n( "Auto Resize" ), this ); - autoResizeAct->setCheckable( TRUE ); + autoResizeAct->setCheckable( true ); autoResizeAct->setChecked( autoResize() ); popup.addAction( autoResizeAct ); QAction* action = popup.exec( mouseEvent->globalPos() ); if ( !action ) { - return TRUE; + return true; } if ( action == autoResizeAct ) { setAutoResize( !action->isChecked() ); @@ -474,9 +474,9 @@ showColumn( action->data().toInt() ); } saveHeaderOnOff(); - return TRUE; + return true; } else { - return FALSE; + return false; } } else { return subjectList->header() ->eventFilter( watched, e ); @@ -491,9 +491,9 @@ KConfigGroup group = config.group( "Column" ); for ( int i = Col_Begin; i <= Col_End; i++ ) { if ( subjectList->columnWidth( i ) != 0 ) { - group.writeEntry( s_colAttr[ i ].keyName, TRUE ); + group.writeEntry( s_colAttr[ i ].keyName, true ); } else { - group.writeEntry( s_colAttr[ i ].keyName, FALSE ); + group.writeEntry( s_colAttr[ i ].keyName, false ); } } } @@ -520,7 +520,7 @@ QString configPath = KStandardDirs::locateLocal( "appdata", "subjectview.conf" ); KConfig config( configPath ); - return config.group( "Column" ).readEntry( "AutoResize", TRUE ); + return config.group( "Column" ).readEntry( "AutoResize", true ); } void KitaBoardView::setAutoResize( bool flag ) Modified: kita/branches/KITA-KDE4/kita/src/boardview.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/boardview.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/boardview.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -39,7 +39,7 @@ virtual void setFocus(); void slotFocusSearchCombo(); void reloadSubject(); - void loadBoard( const KUrl& url, bool online = TRUE ); + void loadBoard( const KUrl& url, bool online = true ); void setFont( const QFont& font ); void slotUpdateSubject( const KUrl& url ); Modified: kita/branches/KITA-KDE4/kita/src/domtree.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/domtree.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/domtree.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -50,7 +50,7 @@ if ( num < m_bufSize && m_resStatus[ num ] != KITA_HTML_NOTPARSED ) { /* already parsed */ - return TRUE; + return true; } if ( num >= m_bufSize ) { @@ -60,16 +60,16 @@ m_titleElm.resize( m_bufSize ); m_bodyElm.resize( m_bufSize ); - m_resStatus.resize( m_bufSize, FALSE ); - m_coloredNum.resize( m_bufSize, FALSE ); + m_resStatus.resize( m_bufSize, false ); + m_coloredNum.resize( m_bufSize, false ); } /* cleate elements */ QString titleHTML, bodyHTML; - m_resStatus[ num ] = m_datInfo->getHTML( num, TRUE, titleHTML, bodyHTML ); + m_resStatus[ num ] = m_datInfo->getHTML( num, true, titleHTML, bodyHTML ); if ( m_resStatus[ num ] == KITA_HTML_NOTPARSED ) { - return FALSE; + return false; } m_titleElm[ num ] = m_hdoc.createElement( "DIV" ); @@ -82,7 +82,7 @@ m_bodyElm[ num ].setAttribute( "id", QString().setNum( num ) ); m_bodyElm[ num ].setInnerHTML( bodyHTML ); - return TRUE; + return true; } /* @@ -90,14 +90,14 @@ */ bool KitaDomTree::appendRes( int num ) { - if ( !createResElement( num ) ) return FALSE; + if ( !createResElement( num ) ) return false; m_hdoc.body().appendChild( m_titleElm[ num ] ); m_hdoc.body().appendChild( m_bodyElm[ num ] ); if ( num > m_bottomNum ) m_bottomNum = num; - return TRUE; + return true; } /* @@ -116,7 +116,7 @@ QString titleHTML, bodyHTML; int oldStatus = m_resStatus[ i ]; - m_resStatus[ i ] = m_datInfo->getHTML( i , TRUE, titleHTML, bodyHTML ); + m_resStatus[ i ] = m_datInfo->getHTML( i , true, titleHTML, bodyHTML ); if ( force || oldStatus != m_resStatus[ i ] ) { m_titleElm[ i ].setInnerHTML( titleHTML ); @@ -367,7 +367,7 @@ { if ( m_coloredNum[ num ] ) return ; - m_coloredNum[ num ] = TRUE; + m_coloredNum[ num ] = true; DOM::Node node = m_titleElm[ num ]; node = node.firstChild(); Modified: kita/branches/KITA-KDE4/kita/src/favoritelistview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/favoritelistview.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/favoritelistview.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -152,7 +152,7 @@ clipboard->setText( clipText , QClipboard::Clipboard ); clipboard->setText( clipText , QClipboard::Selection ); } else if ( action == removeFromFavoritesAct ) { - ViewMediator::getInstance()->bookmark( datURL, FALSE ); + ViewMediator::getInstance()->bookmark( datURL, false ); } } @@ -173,9 +173,9 @@ Q3ValueList<QString>::const_iterator it; for ( it = boardList.begin(); it != boardList.end(); ++it ) { - bool online = TRUE; + bool online = true; Q3PtrList<Kita::Thread> threadList; Q3PtrList<Kita::Thread> tmpList; - Kita::BoardManager::getThreadList( ( *it ), FALSE, online, threadList, tmpList ); + Kita::BoardManager::getThreadList( ( *it ), false, online, threadList, tmpList ); } } Modified: kita/branches/KITA-KDE4/kita/src/htmlpart.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/htmlpart.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/htmlpart.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -52,7 +52,7 @@ m_popup = NULL; m_domtree = NULL; m_datURL = QString::null; - m_updatedKokoyon = FALSE; + m_updatedKokoyon = false; clearPart(); createHTMLDocument(); @@ -82,7 +82,7 @@ Kita::DatManager::setViewPos( m_datURL, readNum ); } } - m_updatedKokoyon = FALSE; + m_updatedKokoyon = false; /* clear variables */ m_anchorStack.clear(); @@ -95,7 +95,7 @@ if ( m_mode == HTMLPART_MODE_MAINPART ) { /* This part is on the main thread view. */ /* tell Thread class that "thread is closed" */ - Kita::DatManager::setMainThreadOpened( m_datURL, FALSE ); + Kita::DatManager::setMainThreadOpened( m_datURL, false ); /* emit "deactivated all thread view" SIGNAL */ KUrl nullUrl(""); @@ -130,7 +130,7 @@ Kita::DatManager::createDatInfo( m_datURL ); /* tell Thread class that "thread is opend" */ - Kita::DatManager::setMainThreadOpened( m_datURL, TRUE ); + Kita::DatManager::setMainThreadOpened( m_datURL, true ); /* reset abone */ Kita::DatManager::resetAbone( m_datURL ); @@ -144,7 +144,7 @@ m_domtree = new KitaDomTree( htmlDocument(), m_datURL ); } - return TRUE; + return true; } @@ -176,8 +176,8 @@ text += style; text += "</style></head><body></body></html>"; - setJScriptEnabled( FALSE ); - setJavaEnabled( FALSE ); + setJScriptEnabled( false ); + setJavaEnabled( false ); /* Use dummy URL here, and protocol should be "file:". If protocol is "http:", local image files are not shown @@ -232,7 +232,7 @@ QApplication::setOverrideCursor( qc ); showResponses( 1, readNum ); - updateScreen( TRUE, FALSE ); + updateScreen( true, false ); QApplication::restoreOverrideCursor(); } @@ -331,17 +331,17 @@ m_centerNum = centerNum; m_jumpNumAfterLoading = 0; - if ( m_mode != HTMLPART_MODE_MAINPART ) return FALSE; - if ( !m_domtree ) return FALSE; - if ( Kita::DatManager::getReadNum( m_datURL ) == 0 ) return FALSE; + if ( m_mode != HTMLPART_MODE_MAINPART ) return false; + if ( !m_domtree ) return false; + if ( Kita::DatManager::getReadNum( m_datURL ) == 0 ) return false; int endNum = Kita::DatManager::getReadNum( m_datURL ); showResponses( 1, endNum ); - updateScreen( TRUE , FALSE ); - gotoAnchor( QString().setNum( m_centerNum ), FALSE ); + updateScreen( true , false ); + gotoAnchor( QString().setNum( m_centerNum ), false ); view() ->setFocus(); - return TRUE; + return true; } @@ -353,14 +353,14 @@ and slotFinishLoad(). */ /* public */ bool KitaHTMLPart::reload( int jumpNum ) { - if ( !m_domtree ) return FALSE; + if ( !m_domtree ) return false; if ( m_mode != HTMLPART_MODE_MAINPART ) { /* If this is not MainPart, then open MainPart. */ ViewMediator::getInstance()->openURL( m_datURL ); - return FALSE; + return false; } - m_firstReceive = TRUE; + m_firstReceive = true; if ( m_centerNum == 0 ) m_centerNum = m_domtree->getBottomResNumber(); m_jumpNumAfterLoading = jumpNum; @@ -368,7 +368,7 @@ Kita::DatManager::updateCache( m_datURL , this ); view() ->setFocus(); - return TRUE; + return true; } @@ -392,12 +392,12 @@ /* rendering */ if ( m_firstReceive || bottom + delta < readNum ) { showResponses( bottom + 1, readNum ); - updateScreen( TRUE, FALSE ); + updateScreen( true, false ); } if ( m_firstReceive && m_centerNum < readNum ) { - gotoAnchor( QString().setNum( m_centerNum ), FALSE ); - m_firstReceive = FALSE; + gotoAnchor( QString().setNum( m_centerNum ), false ); + m_firstReceive = false; } emit receiveData(); @@ -417,11 +417,11 @@ int shownNum = m_centerNum + 5000; showResponses( bottom + 1, shownNum ); - updateScreen( TRUE, FALSE ); + updateScreen( true, false ); // m_domtree->parseAllRes(); m_centerNum = 0; - if ( m_jumpNumAfterLoading ) gotoAnchor( QString().setNum( m_jumpNumAfterLoading ), FALSE ); + if ( m_jumpNumAfterLoading ) gotoAnchor( QString().setNum( m_jumpNumAfterLoading ), false ); m_jumpNumAfterLoading = 0; emit finishReload(); @@ -438,7 +438,7 @@ /* public */ bool KitaHTMLPart::gotoAnchor( const QString& anc, bool pushPosition ) { - if ( anc == QString::null ) return FALSE; + if ( anc == QString::null ) return false; if ( !m_domtree || m_mode == HTMLPART_MODE_POPUP ) return KHTMLPart::gotoAnchor( anc ); @@ -450,7 +450,7 @@ if ( res > 1 ) { /* is target valid ? */ - if ( !Kita::DatManager::isResValid( m_datURL, res ) ) return FALSE; + if ( !Kita::DatManager::isResValid( m_datURL, res ) ) return false; ancstr = QString().setNum( res ); } @@ -464,7 +464,7 @@ GotoAnchorEvent * e = new GotoAnchorEvent( ancstr ); QApplication::postEvent( this, e ); // Qt will delete it when done - return TRUE; + return true; } @@ -476,7 +476,7 @@ if ( m_mode != HTMLPART_MODE_MAINPART ) return ; int kokoyon = Kita::DatManager::getViewPos( m_datURL ); - gotoAnchor( QString().setNum( kokoyon ), FALSE ); + gotoAnchor( QString().setNum( kokoyon ), false ); } @@ -488,7 +488,7 @@ QString anc = m_anchorStack.last(); m_anchorStack.pop_back(); - gotoAnchor( anc , FALSE ); + gotoAnchor( anc , false ); } @@ -516,7 +516,7 @@ void KitaHTMLPart::slotClickGotoFooter() { if ( !m_domtree || m_mode != HTMLPART_MODE_MAINPART ) { - gotoAnchor( "footer", FALSE ); + gotoAnchor( "footer", false ); return ; } @@ -525,10 +525,10 @@ if ( readNum != bottom ) { showResponses( bottom + 1, readNum ); - updateScreen( TRUE, TRUE ); + updateScreen( true, true ); } - gotoAnchor( "footer", FALSE ); + gotoAnchor( "footer", false ); } @@ -550,7 +550,7 @@ /* public */ bool KitaHTMLPart::findText( const QString &query, bool reverse ) { - if ( m_mode != HTMLPART_MODE_MAINPART ) return FALSE; + if ( m_mode != HTMLPART_MODE_MAINPART ) return false; QRegExp regexp( query ); regexp.setCaseSensitivity( Qt::CaseInsensitive ); @@ -590,7 +590,7 @@ DOM::Range rg( m_findNode, m_findPos, m_findNode, m_findPos + matchLen ); setSelection( rg ); - return TRUE; + return true; } } else if ( m_findNode.nodeName().string() == "table" ) { @@ -656,11 +656,11 @@ m_findNode = next; if ( m_findNode.isNull() ) { m_findNode = NULL; - return FALSE; + return false; } } - return FALSE; + return false; } @@ -677,7 +677,7 @@ void KitaHTMLPart::showPopupMenu( const KUrl& kurl ) { QString url = kurl.prettyUrl(); - bool showppm = FALSE; + bool showppm = false; QString str; @@ -699,7 +699,7 @@ if ( m_domtree && ( m_mode == HTMLPART_MODE_MAINPART ) ) { - showppm = TRUE; + showppm = true; // back if ( !m_anchorStack.empty() ) { @@ -756,7 +756,7 @@ KAction* aboneWordAct = 0; if ( hasSelection() ) { if ( showppm ) popupMenu.addSeparator(); - showppm = TRUE; + showppm = true; copyStrAct = new KAction( i18n( "Copy" ), this ); popupMenu.addAction(copyStrAct); @@ -778,7 +778,7 @@ KAction* copyLinkAct = 0; if ( url != QString::null ) { if ( showppm ) popupMenu.addSeparator(); - showppm = TRUE; + showppm = true; openBrowserAct = new KAction( i18n( "Open with Web Browser" ), this ); popupMenu.addAction( openBrowserAct ); @@ -806,7 +806,7 @@ } else if ( action == openBrowserAct ) { KRun::runUrl( kurl, "text/html", view() ); } else if ( action == homeLinkAct ) { - gotoAnchor( "header", FALSE ); + gotoAnchor( "header", false ); } else if ( action == kokoLinkAct ) { slotGotoKokoyon(); } else if ( action == endLinkAct ) { @@ -820,7 +820,7 @@ == QMessageBox::Ok ) { Kita::AboneConfig::aboneWordList().append( selectedText() ); - redrawHTMLPart( m_datURL, FALSE ); + redrawHTMLPart( m_datURL, false ); } } else { QMenu* menu = action->menu(); @@ -830,7 +830,7 @@ return; } if ( menu == markSubMenu ) { - gotoAnchor( QString().setNum( menu->actions().indexOf( action ) ), FALSE ); + gotoAnchor( QString().setNum( menu->actions().indexOf( action ) ), false ); } else if ( menu == backSubMenu ) { for ( int i = 0; i < menu->actions().indexOf( action ); i++ ) m_anchorStack.pop_back(); @@ -873,10 +873,10 @@ if ( e->url().string() != QString::null ) kurl = KUrl( Kita::BoardManager::boardURL( m_datURL ), e->url().string() ); - m_pushctrl = m_pushmidbt = m_pushrightbt = FALSE; - if ( e->qmouseEvent() ->button() & Qt::RightButton ) m_pushrightbt = TRUE; - if ( e->qmouseEvent() ->modifiers() & Qt::ControlModifier ) m_pushctrl = TRUE; - if ( e->qmouseEvent() ->button() & Qt::MidButton ) m_pushmidbt = TRUE; + m_pushctrl = m_pushmidbt = m_pushrightbt = false; + if ( e->qmouseEvent() ->button() & Qt::RightButton ) m_pushrightbt = true; + if ( e->qmouseEvent() ->modifiers() & Qt::ControlModifier ) m_pushctrl = true; + if ( e->qmouseEvent() ->button() & Qt::MidButton ) m_pushmidbt = true; if ( e->url() != NULL ) { @@ -886,14 +886,14 @@ } clickAnchor( kurl ); - m_pushctrl = m_pushmidbt = m_pushrightbt = FALSE; + m_pushctrl = m_pushmidbt = m_pushrightbt = false; return ; } /* popup menu */ if ( m_pushrightbt ) { showPopupMenu( kurl ); - m_pushctrl = m_pushmidbt = m_pushrightbt = FALSE; + m_pushctrl = m_pushmidbt = m_pushrightbt = false; return ; } @@ -1012,7 +1012,7 @@ if ( m_mode == HTMLPART_MODE_POPUP ) { ViewMediator::getInstance()->openURL( urlin ); } else { - gotoAnchor( QString().setNum( refNum ), TRUE ); + gotoAnchor( QString().setNum( refNum ), true ); } } @@ -1060,7 +1060,7 @@ // mark KAction* markAct = new KAction( i18n( "Mark" ), this ); - markAct->setCheckable( TRUE ); + markAct->setCheckable( true ); markAct->setChecked( Kita::DatManager::isMarked( m_datURL, resNum ) ); popupMenu.addAction( markAct ); @@ -1151,9 +1151,9 @@ } else if ( action == setKokoYonAct ) { Kita::DatManager::setViewPos( m_datURL, resNum ); ViewMediator::getInstance()->updateBoardView( m_datURL ); - m_updatedKokoyon = TRUE; - updateScreen( TRUE, TRUE ); - gotoAnchor( QString().setNum( resNum ), FALSE ); + m_updatedKokoyon = true; + updateScreen( true, true ); + gotoAnchor( QString().setNum( resNum ), false ); } else if ( action == showBrowserAct ) { str = Kita::DatManager::threadURL( m_datURL ) + "/" + QString().setNum( resNum ); @@ -1166,7 +1166,7 @@ == QMessageBox::Ok ) { Kita::AboneConfig::aboneNameList().append( namestr ); - redrawHTMLPart( m_datURL, FALSE ); + redrawHTMLPart( m_datURL, false ); } } } @@ -1212,7 +1212,7 @@ == QMessageBox::Ok ) { Kita::AboneConfig::aboneIDList().append( strid ); - redrawHTMLPart( m_datURL, FALSE ); + redrawHTMLPart( m_datURL, false ); } } } @@ -1264,7 +1264,7 @@ /* public */ bool KitaHTMLPart::isPopupVisible() { - if ( !m_popup ) return FALSE; + if ( !m_popup ) return false; return m_popup->isVisible(); } @@ -1274,7 +1274,7 @@ { if ( m_popup ) delete m_popup; m_popup = NULL; - m_multiPopup = FALSE; + m_multiPopup = false; } @@ -1299,7 +1299,7 @@ void KitaHTMLPart::showPopupCore( const KUrl& url, const QString& innerHTML, QPoint point ) { slotDeletePopup(); - m_multiPopup = FALSE; + m_multiPopup = false; m_popup = new Kita::ResPopup( view() , url ); @@ -1318,10 +1318,10 @@ { if ( m_popup && m_popup->isVisible() ) { - m_multiPopup = TRUE; + m_multiPopup = true; m_popup->moveMouseAbove(); } else { - m_multiPopup = FALSE; + m_multiPopup = false; } return m_multiPopup; @@ -1332,9 +1332,9 @@ bool KitaHTMLPart::isMultiPopupMode() { if ( !m_popup ) { - m_multiPopup = FALSE; + m_multiPopup = false; } else if ( m_popup->isHidden() ) { - m_multiPopup = FALSE; + m_multiPopup = false; } return m_multiPopup; @@ -1346,10 +1346,10 @@ if ( m_popup ) { m_popup->hide(); } - m_multiPopup = FALSE; + m_multiPopup = false; } -/* return TRUE if this view is under mouse. */ /* private */ +/* return true if this view is under mouse. */ /* private */ bool KitaHTMLPart::isUnderMouse( int mrgwd, int mrght ) { QPoint pos = QCursor::pos(); @@ -1361,10 +1361,10 @@ if ( ( px < cx && cx < px + wd + mrgwd ) && ( py < cy && cy < py + ht + mrght ) ) { - return TRUE; + return true; } - return FALSE; + return false; } /* private slot */ @@ -1445,7 +1445,7 @@ if ( url.left( 7 ) == "mailto:" ) return ; /* Is Kita active now ? */ - if( ViewMediator::getInstance()->isKitaActive() == FALSE ) return; + if( ViewMediator::getInstance()->isKitaActive() == false ) return; /* get reference */ QString refstr; @@ -1495,7 +1495,7 @@ if ( url.left( 6 ) == "#abone" ) { int no = url.mid( 6 ).toInt(); - QString tmpstr = Kita::DatManager::getHtml( m_datURL, no, no, FALSE ); + QString tmpstr = Kita::DatManager::getHtml( m_datURL, no, no, false ); showPopup( m_datURL, tmpstr ); return ; } @@ -1554,7 +1554,7 @@ then show res popup. */ /* private */ bool KitaHTMLPart::showSelectedDigitPopup() { - if ( !hasSelection() ) return FALSE; + if ( !hasSelection() ) return false; QString linkstr; int refNum; @@ -1567,9 +1567,9 @@ if ( innerHTML != QString::null ) { showPopup( m_datURL, innerHTML ); startMultiPopup(); - return TRUE; + return true; } } - return FALSE; + return false; } Modified: kita/branches/KITA-KDE4/kita/src/kitaui/htmlview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/kitaui/htmlview.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/kitaui/htmlview.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -55,8 +55,8 @@ if ( y >= contentsHeight() - visibleHeight() ) { emit pushDown(); /* to KitaHTMLPart in order to call slotClickTugi100 */ - return TRUE; + return true; } - return FALSE; + return false; } Modified: kita/branches/KITA-KDE4/kita/src/libkita/access.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/access.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/access.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -111,8 +111,8 @@ /* init */ m_readNum = readNum; m_threadData.clear(); - m_firstReceive = FALSE; - m_invalidDataReceived = FALSE; + m_firstReceive = false; + m_invalidDataReceived = false; m_lastLine.clear(); /* set URL of data */ @@ -156,12 +156,12 @@ 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" ); } - return TRUE; + return true; } void Access::slotThreadResult( KJob* job ) @@ -202,7 +202,7 @@ if ( ( m_dataSize > 0 && responseCode() != 206 ) || ( m_firstReceive && data_tmp[ 0 ] != '\n' ) || ( m_dataSize == 0 && responseCode() != 200 ) - ) m_invalidDataReceived = TRUE; + ) m_invalidDataReceived = true; if ( m_invalidDataReceived ) return ; @@ -210,7 +210,7 @@ if ( m_firstReceive ) { data_tmp = data_tmp.mid( 1 ); } - m_firstReceive = FALSE; + m_firstReceive = false; emitDatLineList( data_tmp ); } @@ -224,8 +224,8 @@ QStringList datLineList; if ( dataStream.isEmpty() ) return ; - bool endIsLF = FALSE; - if ( dataStream.at( dataStream.length() - 1 ) == '\n' ) endIsLF = TRUE; + bool endIsLF = false; + if ( dataStream.at( dataStream.length() - 1 ) == '\n' ) endIsLF = true; /* split the stream */ m_lastLine += dataStream; @@ -372,7 +372,7 @@ kgetURL.addQueryItem( "sid", Account::getSessionID() ); m_threadData.clear(); - m_invalidDataReceived = FALSE; + m_invalidDataReceived = false; KIO::SlaveConfig::self() ->setConfigData( "http", KUrl( getURL ).host(), @@ -415,7 +415,7 @@ if ( ( m_dataSize > 0 && responseCode() != 206 ) || ( m_dataSize == 0 && responseCode() != 200 ) ) { - m_invalidDataReceived = TRUE; + m_invalidDataReceived = true; } if ( m_invalidDataReceived ) return ; Modified: kita/branches/KITA-KDE4/kita/src/libkita/account.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/account.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/account.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -35,7 +35,7 @@ } Account::Account() - : m_isLogged( FALSE ) + : m_isLogged( false ) {} Account::~Account() @@ -57,7 +57,7 @@ url.host(), "UserAgent", "DOLIB/1.00" ); - m_job = KIO::http_post( url, postData.toUtf8(), FALSE ); + m_job = KIO::http_post( url, postData.toUtf8(), false ); connect( m_job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), SLOT( slotReceiveData( KIO::Job*, const QByteArray& ) ) ); @@ -91,16 +91,16 @@ QRegExp regexp( "SESSION-ID=(.*)" ); if ( regexp.indexIn( str ) == -1 ) { m_sessionID = QString::null; - m_isLogged = FALSE; + m_isLogged = false; } else { QString value = regexp.cap( 1 ); QRegExp error( "^ERROR:p+$" ); if ( error.indexIn( value ) == -1 ) { - m_isLogged = TRUE; + m_isLogged = true; m_sessionID = value; } else { - m_isLogged = FALSE; + m_isLogged = false; m_sessionID = QString::null; } } Modified: kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -47,7 +47,7 @@ const QString& ext, int boardtype ) { - m_readIdx = FALSE; + m_readIdx = false; m_boardName = boardName; m_rootPath = rootPath; m_delimiter = delimiter; @@ -63,7 +63,7 @@ createKeys( keyHosts ); /* reset SETTING.TXT */ - setSettingLoaded( FALSE ); + setSettingLoaded( false ); } BoardData::~BoardData() @@ -415,7 +415,7 @@ Input: url: URL of board. - oldLogs: If TRUE, search cache and get list of pointer of old threads. + oldLogs: If true, search cache and get list of pointer of old threads. online: online or offline mode. Output: @@ -514,7 +514,7 @@ thread = Kita::Thread::getByURL( datURL ); if ( thread == NULL ) continue; - ThreadIndex::loadIndex( thread, datURL, FALSE ); + ThreadIndex::loadIndex( thread, datURL, false ); } if ( thread != NULL ) threadList.append( thread ); @@ -543,7 +543,7 @@ /* open subject.txt */ QString subjectPath = Cache::getSubjectPath( url ); QIODevice * device = KFilterDev::deviceForFile( subjectPath, "application/x-gzip" ); - if ( !device->open( QIODevice::ReadOnly ) ) return FALSE; + if ( !device->open( QIODevice::ReadOnly ) ) return false; Q3TextStream stream( device ); @@ -589,7 +589,7 @@ /* load index file */ if ( !bdata->readIdx() ) { - if ( cacheList.contains( fname ) ) ThreadIndex::loadIndex( thread, datURL, FALSE ); + if ( cacheList.contains( fname ) ) ThreadIndex::loadIndex( thread, datURL, false ); } /* update res num */ @@ -606,9 +606,9 @@ } device->close(); - bdata->setReadIdx( TRUE ); /* never read idx files again */ + bdata->setReadIdx( true ); /* never read idx files again */ - return TRUE; + return true; } /*---------------------------*/ @@ -643,7 +643,7 @@ * * "int type" is type of board. It could be "Kita::Board_Unknown". See also parseBoardURL(). * - * If "bool test" is TRUE, this function just checks if the board is enrolled (never enroll board). + * If "bool test" is true, this function just checks if the board is enrolled (never enroll board). * */ /* public */ /* static */ @@ -768,8 +768,8 @@ /* public */ /* static */ bool BoardManager::isEnrolled( const KUrl& url ) { - if ( getBoardData( url ) == NULL ) return FALSE; - return TRUE; + if ( getBoardData( url ) == NULL ) return false; + return true; } @@ -824,7 +824,7 @@ bool BoardManager::loadBBSHistory( const KUrl& url ) { BoardData * bdata = getBoardData( url ); - if ( bdata == NULL ) return FALSE; + if ( bdata == NULL ) return false; QStringList keyHosts(bdata->hostName()); @@ -843,10 +843,10 @@ bdata->createKeys( keyHosts ); file.close(); - return TRUE; + return true; } - return FALSE; + return false; } @@ -864,7 +864,7 @@ oldURL += "/"; newURL += "/"; - if ( oldURL == newURL ) return FALSE; + if ( oldURL == newURL ) return false; /* Is oldURL enrolled? */ BoardData* bdata = getBoardData( oldURL ); @@ -872,7 +872,7 @@ /* Is newURL enrolled? */ bdata = getBoardData( newURL ); - if ( bdata == NULL ) return FALSE; + if ( bdata == NULL ) return false; } @@ -908,15 +908,15 @@ bdata->createKeys( keyHosts ); /* reset BoardData */ - bdata->setReadIdx( FALSE ); - bdata->setSettingLoaded( FALSE ); + bdata->setReadIdx( false ); + bdata->setSettingLoaded( false ); /*---------------------------*/ /* move cache dir */ QDir qdir; - if ( ! qdir.exists( oldCachePath ) ) return TRUE; + if ( ! qdir.exists( oldCachePath ) ) return true; /* mkdir new server dir */ QString newCachePath = Cache::baseDir() + Cache::serverDir( bdata->basePath() ); @@ -973,5 +973,5 @@ KitaThreadInfo::replace( oldURL, newURL ); Kita::FavoriteBoards::replace( oldURL, newURL ); - return TRUE; + return true; } Modified: kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -49,7 +49,7 @@ class BoardData { QString m_boardName; - bool m_readIdx; /* If TRUE, idx file has been read. */ + bool m_readIdx; /* If true, idx file has been read. */ QString m_hostname; /* latest host name */ QString m_rootPath; @@ -152,7 +152,7 @@ /* BoardData */ static void clearBoardData(); static int enrollBoard( const KUrl& url, const QString& boardName, QString& oldURL, - int type = Board_Unknown, bool test = FALSE ); + int type = Board_Unknown, bool test = false ); static bool isEnrolled( const KUrl& url ); static BoardData* getBoardData( const KUrl& url ); Modified: kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -68,13 +68,13 @@ if ( !Kita::mkdir( cacheDir ) ) return ; initPrivate( - TRUE /* load cache */ + true /* load cache */ ); } DatInfo::~DatInfo() { - initPrivate( FALSE ); + initPrivate( false ); } @@ -82,18 +82,18 @@ /* Usually, don't call this. */ /* public */ void DatInfo::init() { - return initPrivate( TRUE ); + return initPrivate( true ); } -/* Init. If loadCache = TRUE, load data from cache. */ /* private */ +/* Init. If loadCache = true, load data from cache. */ /* private */ void DatInfo::initPrivate( bool loadCache ) { /* stop & delete dat loader */ deleteAccessJob(); /* init variables */ - m_broken = FALSE; - m_nowLoading = FALSE; + m_broken = false; + m_nowLoading = false; m_lastLine = QString::null; /* clear ResDatVec */ @@ -129,12 +129,12 @@ void DatInfo::resetResDat( RESDAT& resdat ) { resdat.num = 0; - resdat.parsed = FALSE; - resdat.broken = FALSE; + resdat.parsed = false; + resdat.broken = false; resdat.anclist.clear(); - resdat.checkAbone = FALSE; - resdat.abone = FALSE; - resdat.isResponsed = FALSE; + resdat.checkAbone = false; + resdat.abone = false; + resdat.isResponsed = false; } @@ -184,10 +184,10 @@ DatInfo emits the finishLoad signal to the parent object */ /* public */ bool DatInfo::updateCache( const QObject* parent ) { - if ( m_access == NULL ) return FALSE; - if ( m_nowLoading ) return FALSE; + if ( m_access == NULL ) return false; + if ( m_nowLoading ) return false; - m_nowLoading = TRUE; + m_nowLoading = true; connect( this, SIGNAL( receiveData() ), parent, SLOT( slotReceiveData() ) ); @@ -197,7 +197,7 @@ m_access->getupdate( m_thread->readNum() ); - return TRUE; + return true; } @@ -224,7 +224,7 @@ See also DatInfo::slotReceiveData() */ /* private */ bool DatInfo::copyOneLineToResDat( const QString& line ) { - if ( line == QString::null ) return FALSE; + if ( line == QString::null ) return false; /* update ReadNum */ const int num = m_thread->readNum() + 1; @@ -259,13 +259,13 @@ for ( int i = fromNum; i <= toNum; ++i ) { - if ( !checkAbonePrivate( i ) ) m_resDatVec[ i ].isResponsed = TRUE; + if ( !checkAbonePrivate( i ) ) m_resDatVec[ i ].isResponsed = true; } } } } - return TRUE; + return true; } @@ -279,7 +279,7 @@ /* re-try by offlaw.cgi */ if ( m_thread->readNum() == 0 && m_access2 == NULL && DatManager::is2chThread( m_datURL ) ) { if ( Account::isLogged() ) { - initPrivate( TRUE ); + initPrivate( true ); m_access2 = new OfflawAccess( m_datURL ); connect( m_access2, SIGNAL( receiveData( const QStringList& ) ), SLOT( slotReceiveData( const QStringList& ) ) ); @@ -289,7 +289,7 @@ } } /* finish loading session & emit signal to the parent object */ - m_nowLoading = FALSE; + m_nowLoading = false; emit finishLoad(); /* disconnect signals */ @@ -319,11 +319,11 @@ /* public */ bool DatInfo::deleteCache() { - if ( m_nowLoading ) return FALSE; + if ( m_nowLoading ) return false; - initPrivate( FALSE ); + initPrivate( false ); - return TRUE; + return true; } @@ -488,7 +488,7 @@ count ++; QString html; - getHTMLofOneRes( i, TRUE, html ); + getHTMLofOneRes( i, true, html ); retHTML += html; } } @@ -532,7 +532,7 @@ /* Note that this function checks Abone internally. */ /* public */ QString DatInfo::getTreeByRes( const int rootnum, int& count ) { - return getTreeByResPrivate( rootnum, FALSE, count ); + return getTreeByResPrivate( rootnum, false, count ); } /*---------------------------------------*/ @@ -548,7 +548,7 @@ /* Note that this function checks Abone internally. */ /* public */ QString DatInfo::getTreeByResReverse( const int rootnum, int& count ) { - return getTreeByResPrivate( rootnum, TRUE, count ); + return getTreeByResPrivate( rootnum, true, count ); } @@ -632,20 +632,20 @@ /* Check if No.num has anchors to No.target */ /* For exsample, if target = 4, and No.num have an anchor >>4, or >>2-6, etc., - then return TRUE. */ /* private */ + then return true. */ /* private */ bool DatInfo::checkRes( const int num, const int target ) { const int range = 20; - if ( !parseDat( num ) ) return FALSE; + if ( !parseDat( num ) ) return false; AncList& anclist = m_resDatVec[ num ].anclist; for ( AncList::iterator it = anclist.begin(); it != anclist.end(); ++it ) { if ( ( *it ).to - ( *it ).from > range ) continue; - if ( target >= ( *it ).from && target <= ( *it ).to ) return TRUE; + if ( target >= ( *it ).from && target <= ( *it ).to ) return true; } - return FALSE; + return false; } @@ -716,22 +716,22 @@ { if ( m_broken ) return m_broken; - if ( m_access == NULL ) return FALSE; + if ( m_access == NULL ) return false; int rescode = m_access->responseCode(); bool invalid = m_access->invalidDataReceived(); /* see also Access::slotReceiveThreadData() */ - if ( invalid && ( rescode == 200 || rescode == 206 ) ) return TRUE; + if ( invalid && ( rescode == 200 || rescode == 206 ) ) return true; /* maybe "Dat Ochi" */ - return FALSE; + return false; } /* public */ bool DatInfo::isResBroken( int num ) { - if ( !parseDat( num ) ) return FALSE; + if ( !parseDat( num ) ) return false; return m_resDatVec[ num ].broken; } @@ -739,11 +739,11 @@ /* ID = strid ? */ /* public */ bool DatInfo::checkID( const QString& strid, int num ) { - if ( !parseDat( num ) ) return FALSE; + if ( !parseDat( num ) ) return false; - if ( m_resDatVec[ num ].id == strid ) return TRUE; + if ( m_resDatVec[ num ].id == strid ) return true; - return FALSE; + return false; } @@ -753,27 +753,27 @@ bool checkOR /* AND or OR search */ ) { - if ( !parseDat( num ) ) return FALSE; + if ( !parseDat( num ) ) return false; QString str_text = m_resDatVec[ num ].bodyHTML; for ( QStringList::iterator it = stlist.begin(); it != stlist.end(); ++it ) { QRegExp regexp( ( *it ) ); -// regexp.setCaseSensitive( FALSE ); // TODO +// regexp.setCaseSensitive( false ); // TODO if ( checkOR ) { /* OR */ if ( str_text.indexOf( regexp, 0 ) != -1 ) { - return TRUE; + return true; } } else { /* AND */ - if ( str_text.indexOf( regexp, 0 ) == -1 ) return FALSE; + if ( str_text.indexOf( regexp, 0 ) == -1 ) return false; } } - if ( checkOR ) return FALSE; + if ( checkOR ) return false; - return TRUE; + return true; } @@ -796,7 +796,7 @@ /* private */ void DatInfo::resetAbonePrivate() { - for ( int i = 1; i < ( int ) m_resDatVec.size(); i++ ) m_resDatVec[ i ].checkAbone = FALSE; + for ( int i = 1; i < ( int ) m_resDatVec.size(); i++ ) m_resDatVec[ i ].checkAbone = false; m_aboneByID = ( ! Kita::AboneConfig::aboneIDList().empty() ); m_aboneByName = ( ! Kita::AboneConfig::aboneNameList().empty() ); @@ -817,12 +817,12 @@ /* private */ bool DatInfo::checkAbonePrivate( int num ) { - if ( !parseDat( num ) ) return FALSE; + if ( !parseDat( num ) ) return false; if ( m_resDatVec[ num ].checkAbone ) return m_resDatVec[ num ].abone; - m_resDatVec[ num ].checkAbone = TRUE; - bool checktmp = FALSE; + m_resDatVec[ num ].checkAbone = true; + bool checktmp = false; if ( m_aboneByID ) checktmp = checkAboneCore( m_resDatVec[ num ].id, Kita::AboneConfig::aboneIDList() ); @@ -848,7 +848,7 @@ for ( int i = refNum; i <= refNum2; i++ ) { if ( checkAbonePrivate( i ) ) { - checktmp = TRUE; + checktmp = true; break; } } @@ -870,12 +870,12 @@ it != strlist.end(); ++it ) { i = str.indexOf( ( *it ) ); if ( i != -1 ) { - return TRUE; + return true; } } } - return FALSE; + return false; } @@ -884,17 +884,17 @@ /* This function parses the raw data by Kita::parseResDat() */ /* private */ bool DatInfo::parseDat( int num ) { - if ( num <= 0 || m_thread->readNum() < num ) return FALSE; - if ( m_resDatVec[ num ].parsed ) return TRUE; + if ( num <= 0 || m_thread->readNum() < num ) return false; + if ( m_resDatVec[ num ].parsed ) return true; // qDebug("parseDat %d",num); QString subject = QString::null; Kita::parseResDat( m_resDatVec[ num ], subject ); if ( num == 1 && subject != QString::null ) m_thread->setThreadName( subject ); - if ( m_resDatVec[ num ].broken ) m_broken = TRUE; + if ( m_resDatVec[ num ].broken ) m_broken = true; - return TRUE; + return true; } bool DatInfo::isOpened() Modified: kita/branches/KITA-KDE4/kita/src/libkita/datinfo.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/datinfo.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/datinfo.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -159,7 +159,7 @@ /* HTML data */ int getHTML( int num, bool checkAbone, QString& titleHTML, QString& bodyHTML ); - QString getHTMLString( int startnum, int endnum, bool checkAbone = TRUE ); + QString getHTMLString( int startnum, int endnum, bool checkAbone = true ); QString getHtmlByID( const QString& strid, int &count ); QString getTreeByRes( const int rootnum, int& count ); QString getTreeByResReverse( const int rootnum, int& count ); @@ -189,7 +189,7 @@ private: - void initPrivate( bool loadCache = TRUE ); + void initPrivate( bool loadCache = true ); void resetResDat( RESDAT& resdat ); void increaseResDatVec( int delta ); void deleteAccessJob(); Modified: kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -43,9 +43,9 @@ bool DatManager::createDatInfo( const KUrl& url ) { if ( getDatInfo( url, - FALSE /* don't check the existence of cache */ - ) == NULL ) return FALSE; - return TRUE; + false /* don't check the existence of cache */ + ) == NULL ) return false; + return true; } @@ -67,9 +67,9 @@ If cache exists, create DatInfo and return its pointer. - If checkCached == TRUE and cache does not exist, return NULL. + If checkCached == true and cache does not exist, return NULL. - If checkCached == FALSE and cache does not exist, + If checkCached == false and cache does not exist, create DatInfo and return its pointer anyway. see also DatManager::searchDatInfo() and DatManager::createDatInfo() */ /* private */ @@ -172,7 +172,7 @@ bool DatManager::updateCache( const KUrl& url , const QObject* parent ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->updateCache( parent ); } @@ -202,13 +202,13 @@ { KUrl datURL = Kita::getDatURL( url ); Kita::Thread* thread = Kita::Thread::getByURLNew( datURL ); - if ( thread == NULL ) return FALSE; - if ( thread->readNum() == 0 ) return FALSE; + if ( thread == NULL ) return false; + if ( thread->readNum() == 0 ) return false; /* init DatInfo */ DatInfo * datInfo = searchDatInfo( datURL ); if ( datInfo ) { - if ( !datInfo->deleteCache() ) return FALSE; + if ( !datInfo->deleteCache() ) return false; } /* reset readNum & veiwPos */ @@ -223,7 +223,7 @@ /* delete log from "cache" */ KitaThreadInfo::removeThreadInfo( datURL.prettyUrl() ); - return TRUE; + return true; } @@ -231,7 +231,7 @@ bool DatManager::isLoadingNow( const KUrl& url ) { DatInfo * datInfo = searchDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->isLoadingNow(); } @@ -444,25 +444,25 @@ /* public */ bool DatManager::isThreadEnrolled( const KUrl& url ) { - if ( Kita::getDatURL( url ).isEmpty() ) return FALSE; + if ( Kita::getDatURL( url ).isEmpty() ) return false; - return TRUE; + return true; } /* public */ bool DatManager::is2chThread( const KUrl& url ) { - if ( BoardManager::type( url ) != Board_2ch ) return FALSE; - if ( Kita::getDatURL( url ).isEmpty() ) return FALSE; + if ( BoardManager::type( url ) != Board_2ch ) return false; + if ( Kita::getDatURL( url ).isEmpty() ) return false; QRegExp url_2ch( ".*\\.2ch\\.net" ); QRegExp url_bbspink( ".*\\.bbspink\\.com" ); if ( url_2ch.indexIn( url.host() ) != -1 - || url_bbspink.indexIn( url.host() ) != -1 ) return TRUE; + || url_bbspink.indexIn( url.host() ) != -1 ) return true; - return FALSE; + return false; } @@ -470,7 +470,7 @@ bool DatManager::isResValid( const KUrl& url, int num ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->isResValid( num ); } @@ -480,7 +480,7 @@ bool DatManager::isBroken( const KUrl& url ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->isBroken(); } @@ -489,7 +489,7 @@ bool DatManager::isResBroken( const KUrl& url, int num ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->isResBroken( num ); } @@ -500,7 +500,7 @@ bool DatManager::checkID( const KUrl& url, const QString& strid, int num ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->checkID( strid, num ); } @@ -513,7 +513,7 @@ ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->checkWord( strlist, num, checkOR ); } @@ -524,7 +524,7 @@ { KUrl datURL = Kita::getDatURL( url ); Kita::Thread* thread = Kita::Thread::getByURLNew( datURL ); - if ( thread == NULL ) return FALSE; + if ( thread == NULL ) return false; return thread->isMarked( num ); } @@ -545,7 +545,7 @@ bool DatManager::checkAbone( const KUrl& url, int num ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->checkAbone( num ); } @@ -565,7 +565,7 @@ bool DatManager::isMainThreadOpened( const KUrl& url ) { DatInfo * datInfo = getDatInfo( url ); - if ( datInfo == NULL ) return FALSE; + if ( datInfo == NULL ) return false; return datInfo->isOpened(); } Modified: kita/branches/KITA-KDE4/kita/src/libkita/datmanager.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/datmanager.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/datmanager.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -55,7 +55,7 @@ static const QString getCacheIndexPath( const KUrl& url ); /* HTML data */ - static QString getHtml( const KUrl& url, int startnum, int endnum, bool checkAbone = TRUE ); + static QString getHtml( const KUrl& url, int startnum, int endnum, bool checkAbone = true ); static QString getHtmlByID( const KUrl& url, const QString& strid, int &count ); static QString getTreeByRes( const KUrl& url, const int rootnum, int &count ); static QString getTreeByResReverse( const KUrl& url, const int rootnum, int &count ); @@ -95,7 +95,7 @@ private: - static DatInfo* getDatInfo( const KUrl& url, bool checkCached = TRUE ); + static DatInfo* getDatInfo( const KUrl& url, bool checkCached = true ); static DatInfo* searchDatInfo( const KUrl& url ); static DatInfo* enrollDatInfo( const KUrl& url, bool checkCached ); }; Modified: kita/branches/KITA-KDE4/kita/src/libkita/favoriteboards.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/favoriteboards.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/favoriteboards.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -59,8 +59,8 @@ instance->m_list.clear(); QDomDocument document; - if ( ! document.setContent( xml, TRUE ) ) { - return FALSE; + if ( ! document.setContent( xml, true ) ) { + return false; } QDomElement root = document.documentElement(); @@ -73,7 +73,7 @@ } node = node.nextSibling(); } - return TRUE; + return true; } void FavoriteBoards::processChildNode( QDomNode& node ) Modified: kita/branches/KITA-KDE4/kita/src/libkita/favoritethreads.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/favoritethreads.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/favoritethreads.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -66,9 +66,9 @@ bool FavoriteThreads::contains( const QString& datURL ) { if ( m_threadList.contains( datURL ) ) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -83,8 +83,8 @@ instance->m_threadList.clear(); QDomDocument document; - if ( ! document.setContent( xml, TRUE ) ) { - return FALSE; + if ( ! document.setContent( xml, true ) ) { + return false; } QDomElement root = document.documentElement(); @@ -98,7 +98,7 @@ } node = node.nextSibling(); } - return TRUE; + return true; } void FavoriteThreads::processThreadNode( QDomNode& node ) Modified: kita/branches/KITA-KDE4/kita/src/libkita/kita_misc.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/kita_misc.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/kita_misc.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -109,7 +109,7 @@ resdat.num = num; resdat.linestr = rawData; - resdat.parsed = FALSE; + resdat.parsed = false; parseResDat( resdat, subject ); createTitleHTML( resdat, titleHTML ); @@ -502,12 +502,12 @@ qdir = path; if ( !qdir.exists() ) { - if ( !qdir.mkdir( path ) ) return FALSE; + if ( !qdir.mkdir( path ) ) return false; } } } - return TRUE; + return true; } @@ -780,10 +780,10 @@ */ bool Kita::parseResDat( RESDAT& resdat, QString& subject ) { - if ( resdat.parsed ) return TRUE; + if ( resdat.parsed ) return true; - resdat.parsed = TRUE; - resdat.broken = FALSE; + resdat.parsed = true; + resdat.broken = false; resdat.anclist.clear(); /* search the staring positions of each section to split raw data. */ @@ -799,8 +799,8 @@ if ( section >= 5 ) { - resdat.broken = TRUE; - return TRUE; + resdat.broken = true; + return true; } sectionPos[ section ] = i + 2; @@ -810,8 +810,8 @@ /* broken data */ if ( section != 4 ) { - resdat.broken = TRUE; - return TRUE; + resdat.broken = true; + return true; } // qDebug("[%d] %d %d %d %d",section, sectionPos[1],sectionPos[2],sectionPos[3],sectionPos[4] ); @@ -835,7 +835,7 @@ /* subject */ subject = resdat.linestr.mid( sectionPos[ 4 ] ); - return TRUE; + return true; } @@ -976,10 +976,10 @@ const QChar *chpt = rawStr.unicode(); unsigned int length = rawStr.length(); - bool ancChain = FALSE; + bool ancChain = false; /* ancChain is chain for anchor. For examle, if anchor ">2" - appeared, ancChain is set to TRUE. Moreover, if next strings + 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 ">2=5" as follows: @@ -998,7 +998,7 @@ if ( chpt[ i + 1 ] == 'b' && chpt[ i + 2 ] == 'r' && chpt[ i + 3 ] == '>' ) { /* reset anchor chain */ - ancChain = FALSE; + ancChain = false; unsigned int i2 = i - startPos; if ( i > 0 && chpt[ i - 1 ] == ' ' ) i2--; /* remove space before <br> */ @@ -1084,7 +1084,7 @@ linkurl = "http://foo.com", pos (= length of cdat) = 13, - and return TRUE. + and return true. */ bool Kita::parseLink( @@ -1124,7 +1124,7 @@ prefix = "tps://"; scheme = "https://"; } else { - return FALSE; + return false; } pos = prefix.length(); @@ -1133,14 +1133,14 @@ && pos < length ) { retlinkstr += cdat[ pos++ ]; } - if ( pos > length ) return FALSE; + if ( pos > length ) return false; if ( retlinkstr != QString::null ) DatToText( retlinkstr, linkstr ); linkurl = scheme + linkstr; linkstr = prefix + linkstr; - return TRUE; + return true; } @@ -1155,7 +1155,7 @@ refNum[0] = 12, refNum[1] = 20, pos (= length of cdat ) = 9, - ret = TRUE; + ret = true; */ bool Kita::parseResAnchor( @@ -1177,17 +1177,17 @@ || ( c == 0x2212 ) || ( c == 0xFF0D ) /* UTF8: 0xEFBC8D */ ) { - return TRUE; + return true; } - return FALSE; + return false; } }; - bool ret = FALSE; + bool ret = false; int i; - if ( length == 0 ) return FALSE; + if ( length == 0 ) return false; linkstr = QString::null; refNum[ 0 ] = 0; @@ -1249,7 +1249,7 @@ refNum[ hyphen ] += c - '0'; } - ret = TRUE; + ret = true; } return ret; @@ -1272,7 +1272,7 @@ if ( !parseResAnchor( chpt + i, length - i, linkstr, refNum, pos ) ) { i += pos - 1; - return FALSE; + return false; } /* create anchor */ @@ -1294,7 +1294,7 @@ startPos = i + pos; i = startPos - 1; - return TRUE; + return true; } @@ -1407,13 +1407,13 @@ QRegExp url_www_2ch( "http://www\\.2ch\\.net/.*" ); QRegExp url_machibbs( "http://.*\\.machi\\.to/.*" ); - if ( url.isEmpty() ) return FALSE; + if ( url.isEmpty() ) return false; if ( url_2ch.indexIn( url ) == -1 && url_bbspink.indexIn( url ) == -1 - && url_machibbs.indexIn( url ) == -1 ) return FALSE; - if ( url_www_2ch.indexIn( url ) != -1 ) return FALSE; + && url_machibbs.indexIn( url ) == -1 ) return false; + if ( url_www_2ch.indexIn( url ) != -1 ) return false; - return TRUE; + return true; } QString Kita::fontToString( const QFont& font ) Modified: kita/branches/KITA-KDE4/kita/src/libkita/thread.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/thread.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/thread.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -104,22 +104,22 @@ { Q3ValueList< int >::iterator it; for ( it = m_markList.begin(); it != m_markList.end(); ++it ) { - if ( ( *it ) == num ) return TRUE; + if ( ( *it ) == num ) return true; } - return FALSE; + return false; } /* public */ bool Thread::setMark( int num, bool newStatus ) { bool status = isMarked( num ); - if ( status == newStatus ) return FALSE; + if ( status == newStatus ) return false; if ( newStatus ) m_markList += num; else m_markList.remove( num ); - return TRUE; + return true; } Modified: kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -56,7 +56,7 @@ { QString indexPath = Kita::Cache::getIndexPath( url ); KConfig config( indexPath ); - return getReadNumPrivate( url, config, TRUE ); + return getReadNumPrivate( url, config, true ); } void ThreadIndex::setReadNum( const KUrl& url, int readNum ) Modified: kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -46,7 +46,7 @@ /*---------------------------------*/ - static void loadIndex( Kita::Thread* thread, const KUrl& url, bool checkCached = TRUE ); + static void loadIndex( Kita::Thread* thread, const KUrl& url, bool checkCached = true ); static void saveIndex( const Kita::Thread* thread, const KUrl& url ); private: Modified: kita/branches/KITA-KDE4/kita/src/mainwindow.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/mainwindow.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/mainwindow.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -78,7 +78,7 @@ KGlobal::locale() ->insertCatalog( "kitapart" ); // accept dnd - setAcceptDrops( TRUE ); + setAcceptDrops( true ); // setup view, dock setupView(); Modified: kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -28,7 +28,7 @@ connect( nameAboneText, SIGNAL( textChanged() ), SLOT( slotTextChanged() ) ); connect( wordAboneText, SIGNAL( textChanged() ), SLOT( slotTextChanged() ) ); - m_changed = FALSE; + m_changed = false; } AbonePrefPage::~AbonePrefPage() @@ -36,7 +36,7 @@ void AbonePrefPage::slotTextChanged() { - m_changed = TRUE; + m_changed = true; emit changed(); } @@ -56,7 +56,7 @@ Kita::AboneConfig::setAboneWordList( wordList ); } - m_changed = FALSE; + m_changed = false; } #include "aboneprefpage.moc" Modified: kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -45,8 +45,8 @@ KitaPreferences::KitaPreferences( QWidget* parent ) : KConfigDialog( parent, "Kita Preferences", Kita::Config::self() ) { - enableButtonApply( FALSE ); - enableButton( Help, FALSE ); + enableButtonApply( false ); + enableButton( Help, false ); // this is the base class for your preferences dialog. it is now // a Treelist dialog.. but there are a number of other // possibilities (including Tab, Swallow, and just Plain) @@ -104,7 +104,7 @@ // login // write } - enableButtonApply( FALSE ); + enableButtonApply( false ); } void KitaPreferences::slotDefault() @@ -124,12 +124,12 @@ // write // debug } - enableButtonApply( TRUE ); + enableButtonApply( true ); } void KitaPreferences::slotChanged() { - enableButtonApply( TRUE ); + enableButtonApply( true ); } void KitaPreferences::slotOk() @@ -190,13 +190,13 @@ void Ui::UIPrefPage::reset() { - kcfg_AlwaysUseTab->setChecked( TRUE ); + kcfg_AlwaysUseTab->setChecked( true ); kcfg_MarkTime->setValue( 24 ); - kcfg_ShowMailAddress->setChecked( FALSE ); + kcfg_ShowMailAddress->setChecked( false ); kcfg_ShowNum->setValue( 100 ); kcfg_ListSortOrder->setButton( Kita::Config::EnumListSortOrder::Mark ); kcfg_PartMimeList->setText( "image/gif,image/jpeg,image/png,image/x-bmp" ); - kcfg_UsePart->setChecked( TRUE ); + kcfg_UsePart->setChecked( true ); } void Ui::UIPrefPage::slotEditFileAssociation() @@ -219,8 +219,8 @@ updateButtons(); - m_threadFontchanged = FALSE; - m_threadColorChanged = FALSE; + m_threadFontchanged = false; + m_threadColorChanged = false; // color threadColorButton->setColor( Kita::Config::threadColor() ); @@ -247,7 +247,7 @@ QFont threadFont = threadFontButton->font(); Kita::Config::setThreadFont( threadFont ); } - m_threadFontchanged = FALSE; + m_threadFontchanged = false; QFont popupFont = popupFontButton->font(); Kita::Config::setPopupFont( popupFont ); @@ -257,7 +257,7 @@ Kita::Config::setThreadColor( threadColorButton->color() ); Kita::Config::setThreadBackground( threadBackgroundColorButton->color() ); } - m_threadColorChanged = FALSE; + m_threadColorChanged = false; Kita::Config::setPopupColor( popupColorButton->color() ); Kita::Config::setPopupBackground( popupBackgroundColorButton->color() ); } @@ -271,7 +271,7 @@ threadFontButton->setText( Kita::fontToString( font ) ); threadFontButton->setFont( font ); - m_threadFontchanged = TRUE; + m_threadFontchanged = true; popupFontButton->setText( Kita::fontToString( font ) ); popupFontButton->setFont( font ); @@ -281,7 +281,7 @@ threadBackgroundColorButton->setColor( Qt::white ); popupColorButton->setColor( Qt::black ); popupBackgroundColorButton->setColor( Qt::yellow ); - m_threadColorChanged = TRUE; + m_threadColorChanged = true; } void Ui::FacePrefPage::updateButtons() @@ -303,11 +303,11 @@ { QFont threadFont = threadFontButton->font(); - if ( KFontDialog::getFont( threadFont, FALSE, this ) == QDialog::Accepted ) { + if ( KFontDialog::getFont( threadFont, false, this ) == QDialog::Accepted ) { threadFontButton->setText( Kita::fontToString( threadFont ) ); threadFontButton->setFont( threadFont ); emit changed(); - m_threadFontchanged = TRUE; + m_threadFontchanged = true; } } @@ -315,7 +315,7 @@ { QFont font = listFontButton->font(); - if ( KFontDialog::getFont( font, FALSE, this ) == QDialog::Accepted ) { + if ( KFontDialog::getFont( font, false, this ) == QDialog::Accepted ) { listFontButton->setText( Kita::fontToString( font ) ); listFontButton->setFont( font ); emit changed(); @@ -326,7 +326,7 @@ { QFont font = popupFontButton->font(); - if ( KFontDialog::getFont( font, FALSE, this ) == QDialog::Accepted ) { + if ( KFontDialog::getFont( font, false, this ) == QDialog::Accepted ) { popupFontButton->setText( Kita::fontToString( font ) ); popupFontButton->setFont( font ); emit changed(); @@ -335,5 +335,5 @@ void Ui::FacePrefPage::slotColorChanged() { - m_threadColorChanged = TRUE; + m_threadColorChanged = true; } Modified: kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -11,8 +11,8 @@ void Kita::WritePrefPage::DefaultSageCheckBoxToggled( bool on ) { if ( on ) { - kcfg_DefaultMail->setReadOnly( TRUE ); + kcfg_DefaultMail->setReadOnly( true ); } else { - kcfg_DefaultMail->setReadOnly( FALSE ); + kcfg_DefaultMail->setReadOnly( false ); } } Modified: kita/branches/KITA-KDE4/kita/src/respopup.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/respopup.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/respopup.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -76,8 +76,8 @@ if ( m_htmlPart ) { m_htmlPart->view() ->resize( maxwd, maxht ); - m_htmlPart->setJScriptEnabled( FALSE ); - m_htmlPart->setJavaEnabled( FALSE ); + m_htmlPart->setJScriptEnabled( false ); + m_htmlPart->setJavaEnabled( false ); m_htmlPart->begin( KUrl("file:/dummy.htm") ); m_htmlPart->write( text ); m_htmlPart->end(); Modified: kita/branches/KITA-KDE4/kita/src/threadlistview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/threadlistview.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/threadlistview.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -33,20 +33,20 @@ struct Col_Attr ThreadListView::s_colAttr[] = { // labelName, itemName, keyName, showDefault - { " ", I18N_NOOP( "Mark" ), "Col_Mark", TRUE }, - { "No.", I18N_NOOP( "ID" ), "Col_ID", TRUE }, - { " ", I18N_NOOP( "Icon" ), "Col_Icon", TRUE }, - { "Title", I18N_NOOP( "Subject" ), "Col_Subject", TRUE }, - { "ResNum", I18N_NOOP( "ResNum" ), "Col_ResNum", TRUE }, - { "ReadNum", I18N_NOOP( "ReadNum" ), "Col_ReadNum", TRUE }, - { "ViewPos", I18N_NOOP( "ViewPos" ), "Col_ViewPos", FALSE }, - { "Unread", I18N_NOOP( "Unread" ), "Col_Unread", TRUE }, - { "Since", I18N_NOOP( "Since" ), "Col_Since", TRUE }, - { "Thread's speed", I18N_NOOP( "Speed" ), "Col_Speed", TRUE }, - { "Board", I18N_NOOP( "Board" ), "Col_Board", FALSE }, - { "Dat URL", I18N_NOOP( "DatURL" ), "Col_DatURL", FALSE }, - { "Mark Order", I18N_NOOP( "MarkOrder" ), "Col_MarkOrder", FALSE }, - { "ID Order", I18N_NOOP( "IDOrder" ), "Col_IDOrder", FALSE } + { " ", I18N_NOOP( "Mark" ), "Col_Mark", true }, + { "No.", I18N_NOOP( "ID" ), "Col_ID", true }, + { " ", I18N_NOOP( "Icon" ), "Col_Icon", true }, + { "Title", I18N_NOOP( "Subject" ), "Col_Subject", true }, + { "ResNum", I18N_NOOP( "ResNum" ), "Col_ResNum", true }, + { "ReadNum", I18N_NOOP( "ReadNum" ), "Col_ReadNum", true }, + { "ViewPos", I18N_NOOP( "ViewPos" ), "Col_ViewPos", false }, + { "Unread", I18N_NOOP( "Unread" ), "Col_Unread", true }, + { "Since", I18N_NOOP( "Since" ), "Col_Since", true }, + { "Thread's speed", I18N_NOOP( "Speed" ), "Col_Speed", true }, + { "Board", I18N_NOOP( "Board" ), "Col_Board", false }, + { "Dat URL", I18N_NOOP( "DatURL" ), "Col_DatURL", false }, + { "Mark Order", I18N_NOOP( "MarkOrder" ), "Col_MarkOrder", false }, + { "ID Order", I18N_NOOP( "IDOrder" ), "Col_IDOrder", false } }; ThreadListView::ThreadListView( QWidget* parent ) @@ -61,11 +61,11 @@ for ( int i = Col_Begin; i <= Col_End; i++ ) { subjectList->addColumn( i18n( s_colAttr[ i ].labelName ) ); - if ( s_colAttr[ i ].showDefault != TRUE ) { + if ( s_colAttr[ i ].showDefault != true ) { hideColumn( i ); } } - header->setStretchEnabled( TRUE, Col_Subject ); + header->setStretchEnabled( true, Col_Subject ); connect( SearchCombo, SIGNAL( activated( int ) ), SLOT( slotSearchButton() ) ); @@ -89,7 +89,7 @@ clearSearch(); } else if ( list != m_prevquery ) { searchNew( list ); - HideButton->setDown( TRUE ); + HideButton->setDown( true ); } else { searchNext( list ); } @@ -112,7 +112,7 @@ K3ListViewItem* item = m_hitList[ m_nextHitIndex ]; subjectList->ensureItemVisible( item ); - subjectList->setSelected( item, TRUE ); + subjectList->setSelected( item, true ); m_nextHitIndex++; if ( m_nextHitIndex >= static_cast<unsigned>( m_hitList.size() ) ) @@ -148,7 +148,7 @@ while ( listIt.current() != 0 ) { K3ListViewItem * item = static_cast<K3ListViewItem *>( listIt.current() ); item->setPixmap( Col_Icon, 0 ); - item->setVisible( TRUE ); + item->setVisible( true ); ++listIt; } } @@ -159,9 +159,9 @@ while ( listIt.current() != 0 ) { K3ListViewItem * item = static_cast<K3ListViewItem *>( listIt.current() ); if ( on && ! item->pixmap( Col_Icon ) ) { - item->setVisible( FALSE ); + item->setVisible( false ); } else { - item->setVisible( TRUE ); + item->setVisible( true ); } ++listIt; } @@ -182,7 +182,7 @@ { Q3Header* header = subjectList->header(); subjectList->setColumnWidthMode( col, Q3ListView::Manual ); - header->setResizeEnabled( FALSE, col ); + header->setResizeEnabled( false, col ); subjectList->setColumnWidth( col, 0 ); } @@ -190,7 +190,7 @@ { Q3Header* header = subjectList->header(); subjectList->setColumnWidthMode( col, Q3ListView::Maximum ); - header->setResizeEnabled( TRUE, col ); + header->setResizeEnabled( true, col ); subjectList->adjustColumn( col ); } Modified: kita/branches/KITA-KDE4/kita/src/threadview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/threadview.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/threadview.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -65,29 +65,29 @@ layout2->setSpacing( 6 ); writeButton = new QToolButton( this ); - writeButton->setEnabled( FALSE ); + writeButton->setEnabled( false ); layout2->addWidget( writeButton ); SearchCombo = new QComboBox( this ); SearchCombo->setMinimumSize( QSize( 200, 0 ) ); - SearchCombo->setEditable( TRUE ); + SearchCombo->setEditable( true ); SearchCombo->setMaxVisibleItems( 10 ); SearchCombo->setMaxCount( 15 ); SearchCombo->setInsertPolicy( QComboBox::InsertAtTop ); - SearchCombo->setDuplicatesEnabled( FALSE ); + SearchCombo->setDuplicatesEnabled( false ); layout2->addWidget( SearchCombo ); HighLightButton = new QToolButton( this ); - HighLightButton->setCheckable( TRUE ); + HighLightButton->setCheckable( true ); layout2->addWidget( HighLightButton ); BookmarkButton = new QToolButton( this ); - BookmarkButton->setEnabled( FALSE ); - BookmarkButton->setCheckable( TRUE ); + BookmarkButton->setEnabled( false ); + BookmarkButton->setCheckable( true ); layout2->addWidget( BookmarkButton ); ReloadButton = new QToolButton( this ); - ReloadButton->setEnabled( FALSE ); + ReloadButton->setEnabled( false ); layout2->addWidget( ReloadButton ); gotoCombo = new QComboBox( this ); @@ -95,13 +95,13 @@ layout2->addWidget( gotoCombo ); deleteButton = new QToolButton( this ); - deleteButton->setEnabled( FALSE ); + deleteButton->setEnabled( false ); layout2->addWidget( deleteButton ); spacer2 = new QSpacerItem( 30, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout2->addItem( spacer2 ); closeButton = new QToolButton( this ); - closeButton->setEnabled( FALSE ); + closeButton->setEnabled( false ); layout2->addWidget( closeButton ); KitaThreadViewBaseLayout->addLayout( layout2 ); @@ -126,11 +126,11 @@ closeButton->setIcon( SmallIcon( "tab-close" ) ); } - setAcceptDrops( TRUE ); // DND Drop eneble: 2nd stage. - enable on "KitaThreadView" widget and disable on the others(child widgets of "KitaThreadView"). - threadFrame->setAcceptDrops( FALSE ); // don't treat Drop event on child. - m_threadPart->view() ->setAcceptDrops( FALSE ); // don't treat Drop event on child. + setAcceptDrops( true ); // DND Drop eneble: 2nd stage. - enable on "KitaThreadView" widget and disable on the others(child widgets of "KitaThreadView"). + threadFrame->setAcceptDrops( false ); // don't treat Drop event on child. + m_threadPart->view() ->setAcceptDrops( false ); // don't treat Drop event on child. -// m_threadPart->enableMetaRefresh( FALSE ); //disable <meta refresh="..."> // TODO +// m_threadPart->enableMetaRefresh( false ); //disable <meta refresh="..."> // TODO connect( deleteButton, SIGNAL( clicked() ), SLOT( slotDeleteButtonClicked() ) ); @@ -205,11 +205,11 @@ void KitaThreadView::updateButton() { - writeButton->setEnabled( TRUE ); - BookmarkButton->setEnabled( TRUE ); - ReloadButton->setEnabled( TRUE ); - deleteButton->setEnabled( TRUE ); - closeButton->setEnabled( TRUE ); + writeButton->setEnabled( true ); + BookmarkButton->setEnabled( true ); + ReloadButton->setEnabled( true ); + deleteButton->setEnabled( true ); + closeButton->setEnabled( true ); if ( HighLightButton->isChecked() ) { HighLightButton->toggle(); @@ -218,9 +218,9 @@ // don't emit SIGNAL( toggled() ) disconnect( BookmarkButton, SIGNAL( toggled( bool ) ), this, SLOT( slotBookmarkButtonClicked( bool ) ) ); if ( FavoriteThreads::getInstance() ->contains( m_datURL.prettyUrl() ) ) { - BookmarkButton->setChecked( TRUE ); + BookmarkButton->setChecked( true ); } else { - BookmarkButton->setChecked( FALSE ); + BookmarkButton->setChecked( false ); } connect( BookmarkButton, SIGNAL( toggled( bool ) ), SLOT( slotBookmarkButtonClicked( bool ) ) ); } @@ -314,7 +314,7 @@ m_viewmode = mode; /* reset search direction */ - m_revsearch = FALSE; + m_revsearch = false; } @@ -489,17 +489,17 @@ /* jump */ QString anc = str.mid( 1 ); - m_threadPart->gotoAnchor( anc, FALSE ); + m_threadPart->gotoAnchor( anc, false ); SearchCombo->setFocus(); return ; } - slotSearchPrivate( FALSE ); + slotSearchPrivate( false ); } /* public slot */ -void KitaThreadView::slotSearchNext() { slotSearchPrivate( FALSE ); } -void KitaThreadView::slotSearchPrev() { slotSearchPrivate( TRUE ); } +void KitaThreadView::slotSearchNext() { slotSearchPrivate( false ); } +void KitaThreadView::slotSearchPrev() { slotSearchPrivate( true ); } /* private */ void KitaThreadView::slotSearchPrivate( bool rev ) @@ -518,7 +518,7 @@ int ResNum = Kita::DatManager::getResNum( m_datURL ); for ( int i = 1; i <= ResNum; i++ ) { - if ( Kita::DatManager::checkWord( m_datURL, query, i, FALSE ) ) { + if ( Kita::DatManager::checkWord( m_datURL, query, i, false ) ) { /* if this is parent, then show all responses, and search */ if ( m_viewmode == VIEWMODE_MAINVIEW ) m_threadPart->showAll(); @@ -537,7 +537,7 @@ /* public slot */ void KitaThreadView::slotGobackAnchor() { m_threadPart->slotGobackAnchor(); } -void KitaThreadView::slotGotoHeader() { m_threadPart->gotoAnchor( "header", FALSE );} +void KitaThreadView::slotGotoHeader() { m_threadPart->gotoAnchor( "header", false );} void KitaThreadView::slotGotoFooter() { m_threadPart->slotClickGotoFooter(); } // vim:sw=2: @@ -546,14 +546,14 @@ { if ( index == gotoCombo->count() - 1 ) { // last - m_threadPart->gotoAnchor( "footer", FALSE ); + m_threadPart->gotoAnchor( "footer", false ); } else if ( index == 1 ) { // kokomade yonda - m_threadPart->gotoAnchor( "kokomade_yonda", FALSE ); + m_threadPart->gotoAnchor( "kokomade_yonda", false ); } else if ( index != 0 ) { QString numText = gotoCombo->itemText( index ); numText.truncate( numText.length() - 1 ); - m_threadPart->gotoAnchor( numText, FALSE ); + m_threadPart->gotoAnchor( numText, false ); } } Modified: kita/branches/KITA-KDE4/kita/src/viewmediator.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/viewmediator.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/viewmediator.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -94,9 +94,9 @@ { Q_ASSERT( m_mainWindow ); - if( m_mainWindow->isActiveWindow() ) return TRUE; + if( m_mainWindow->isActiveWindow() ) return true; - return FALSE; + return false; } void ViewMediator::updateBoardView( const KUrl& datURL ) Modified: kita/branches/KITA-KDE4/kita/src/writedialogbase.ui.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/writedialogbase.ui.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/writedialogbase.ui.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -13,9 +13,9 @@ if ( on ) { m_mailswap = mailLine->text(); mailLine->setText( "sage" ); - mailLine->setReadOnly( TRUE ); + mailLine->setReadOnly( true ); } else { - mailLine->setReadOnly( FALSE ); + mailLine->setReadOnly( false ); mailLine->setText( m_mailswap ); } } Modified: kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -133,14 +133,14 @@ /* disable all ok buttons. */ for( int i=0; i < max ; i++ ) { view = isWriteView( widget( i ) ); - if ( view ) view->slotEnableWriting( FALSE ); + if ( view ) view->slotEnableWriting( false ); } /* show current url page. */ view = findWriteView( url ); if ( view ) { if ( currentWidget() != view ) setCurrentWidget( view ); - view->slotEnableWriting( TRUE ); + view->slotEnableWriting( true ); } } Modified: kita/branches/KITA-KDE4/kita/src/writeview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/writeview.cpp 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/writeview.cpp 2009-07-05 01:57:23 UTC (rev 2357) @@ -94,7 +94,7 @@ /* setup labels and edit lines */ QFont font = Kita::Config::threadFont(); bodyText->setFont( font ); - bodyText->setTabChangesFocus( TRUE ); + bodyText->setTabChangesFocus( true ); boardNameLabel->setText( Kita::BoardManager::boardName( m_datURL ) ); @@ -106,7 +106,7 @@ // setup mail field & 'sage' checkbox if ( Kita::Config::defaultSage() ) { mailLine->setText( "sage" ); - sageBox->setChecked( TRUE ); + sageBox->setChecked( true ); } else { mailLine->setText( Kita::Config::defaultMail() ); } @@ -117,7 +117,7 @@ if ( host_2ch.indexIn( m_bbscgi.host() ) != -1 && Kita::Config::beMailAddress().length() > 0 && Kita::Config::beAuthCode().length() > 0 ) { - beBox->setChecked( TRUE ); + beBox->setChecked( true ); } /* setup AA */ @@ -132,8 +132,8 @@ // init thread name field. threadNameLine->setText( Kita::DatManager::threadName( m_datURL ) ); - threadNameLine->setReadOnly( TRUE ); - threadNameLine->setFrame( FALSE ); + threadNameLine->setReadOnly( true ); + threadNameLine->setFrame( false ); threadNameLine->setFocusPolicy( Qt::NoFocus ); } @@ -187,9 +187,9 @@ bool KitaWriteView::checkFields() { if ( body().length() == 0 ) { - return FALSE; + return false; } else { - return TRUE; + return true; } } @@ -376,7 +376,7 @@ str += " | " + QString().setNum( length ); lengthLabel->setText( str ); - return TRUE; + return true; } /* create posting message for 2ch */ /* private */ Modified: kita/branches/KITA-KDE4/kita/src/writeview.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/writeview.h 2009-07-05 01:30:38 UTC (rev 2356) +++ kita/branches/KITA-KDE4/kita/src/writeview.h 2009-07-05 01:57:23 UTC (rev 2357) @@ -103,9 +103,9 @@ if ( on ) { m_mailswap = mailLine->text(); mailLine->setText( "sage" ); - mailLine->setReadOnly( TRUE ); + mailLine->setReadOnly( true ); } else { - mailLine->setReadOnly( FALSE ); + mailLine->setReadOnly( false ); mailLine->setText( m_mailswap ); } }