[Kita-svn] [2375] replace NULL with 0

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 7月 7日 (火) 00:07:43 JST


Revision: 2375
          http://sourceforge.jp/projects/kita/svn/view?view=rev&revision=2375
Author:   nogu
Date:     2009-07-07 00:07:43 +0900 (Tue, 07 Jul 2009)

Log Message:
-----------
replace NULL with 0

Modified Paths:
--------------
    kita/branches/KITA-KDE4/kita/src/bbsview.cpp
    kita/branches/KITA-KDE4/kita/src/boardtabwidget.cpp
    kita/branches/KITA-KDE4/kita/src/boardview.cpp
    kita/branches/KITA-KDE4/kita/src/domtree.cpp
    kita/branches/KITA-KDE4/kita/src/htmlpart.cpp
    kita/branches/KITA-KDE4/kita/src/kitaui/tabwidgetbase.cpp
    kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp
    kita/branches/KITA-KDE4/kita/src/libkita/cache.cpp
    kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp
    kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp
    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/threadinfo.cpp
    kita/branches/KITA-KDE4/kita/src/respopup.cpp
    kita/branches/KITA-KDE4/kita/src/threadtabwidget.cpp
    kita/branches/KITA-KDE4/kita/src/threadview.cpp
    kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp
    kita/branches/KITA-KDE4/kita/src/writeview.cpp

Modified: kita/branches/KITA-KDE4/kita/src/bbsview.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/bbsview.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/bbsview.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -127,7 +127,7 @@
 
     QString tmpFile;
     QString url = Kita::Config::boardListUrl();
-    if ( ! KIO::NetAccess::download( url, tmpFile, NULL ) ) {
+    if ( ! KIO::NetAccess::download( url, tmpFile, 0 ) ) {
         return false;
     }
 
@@ -308,7 +308,7 @@
 
     // clear list
     m_boardList->clear();
-    m_favorites = NULL;
+    m_favorites = 0;
 
     QString configPath = KStandardDirs::locateLocal( "appdata", "board_list" );
     KConfig config( configPath );
@@ -350,7 +350,7 @@
     QString boardURL = "http://jbbs.livedoor.jp/computer/18420/" ;
     QString boardName = i18n( "Kita Board" );
     QString oldURL;
-    new Kita::ListViewItem( m_boardList, NULL, boardName, boardURL );
+    new Kita::ListViewItem( m_boardList, 0, boardName, boardURL );
     Kita::BoardManager::enrollBoard( boardURL, boardName, oldURL );
 
     loadExtBoard();

Modified: kita/branches/KITA-KDE4/kita/src/boardtabwidget.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/boardtabwidget.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/boardtabwidget.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -82,7 +82,7 @@
 KitaBoardView* KitaBoardTabWidget::findView( const KUrl& boardURL )
 {
     int max = count() - 1;
-    if ( max <= 0 ) return NULL;
+    if ( max <= 0 ) return 0;
     int i = 0;
 
     while ( i < max ) {
@@ -91,7 +91,7 @@
         i++;
     }
 
-    return NULL;
+    return 0;
 }
 
 
@@ -108,7 +108,7 @@
 /* private */
 KitaBoardView* KitaBoardTabWidget::isSubjectView( QWidget* w )
 {
-    KitaBoardView * view = NULL;
+    KitaBoardView * view = 0;
     if ( w ) {
         if ( w->inherits( "KitaBoardView" ) ) view = static_cast< KitaBoardView* >( w );
     }

Modified: kita/branches/KITA-KDE4/kita/src/boardview.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/boardview.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/boardview.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -248,7 +248,7 @@
             }
 
             Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-            if ( thread == NULL ) return ;
+            if ( thread == 0 ) return ;
             int id = item->text( Col_ID ).toInt();
             int order = item->text( Col_IDOrder ).toInt();
             updateListViewItem( item, datURL, current, id, order );
@@ -310,7 +310,7 @@
     } else { /* normal */
 
         item->setText( Col_MarkOrder, QString::number( Thread_Normal ) );
-        item->setPixmap( Col_Mark, NULL );
+        item->setPixmap( Col_Mark, 0 );
     }
 
     // no effect: m_unreadNum, m_readNum, m_newNum, markOrder

Modified: kita/branches/KITA-KDE4/kita/src/domtree.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/domtree.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/domtree.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -45,7 +45,7 @@
 bool KitaDomTree::createResElement( int num )
 {
     Q_ASSERT( num > 0 );
-    Q_ASSERT( m_datInfo != NULL );
+    Q_ASSERT( m_datInfo != 0 );
 
     if ( num < m_bufSize && m_resStatus[ num ] != KITA_HTML_NOTPARSED ) {
         /* already parsed */
@@ -104,7 +104,7 @@
  */
 void KitaDomTree::redraw( bool force )
 {
-    Q_ASSERT( m_datInfo != NULL );
+    Q_ASSERT( m_datInfo != 0 );
 
     int readNum = m_datInfo->getReadNum();
 
@@ -151,7 +151,7 @@
  */
 void KitaDomTree::appendFooterAndHeader()
 {
-    Q_ASSERT( m_datInfo != NULL );
+    Q_ASSERT( m_datInfo != 0 );
 
     int readNum = m_datInfo->getReadNum();
     if ( !readNum ) return ;
@@ -168,7 +168,7 @@
  */
 void KitaDomTree::appendKokoyon()
 {
-    Q_ASSERT( m_datInfo != NULL );
+    Q_ASSERT( m_datInfo != 0 );
 
     int readNum = m_datInfo->getReadNum();
     if ( !readNum ) return ;
@@ -226,7 +226,7 @@
 
     /* '1-', '101-' などのリンクを作成 */
     for ( int num = 1; num < readNum ; num += 100 ) {
-        if ( node == NULL ) {
+        if ( node == 0 ) {
             QString href = QString( "#%1" ).arg( num );
             QString linkStr = QString( "%1-" ).arg( num );
 
@@ -236,7 +236,7 @@
         } else {
             // 既にリンクが作られている場合は飛ばす
             node = node.nextSibling();
-            if ( node != NULL ) node = node.nextSibling();
+            if ( node != 0 ) node = node.nextSibling();
         }
     }
 
@@ -255,7 +255,7 @@
  */
 void KitaDomTree::updateFooter( DOM::Element& footerElement )
 {
-    Q_ASSERT( m_datInfo != NULL );
+    Q_ASSERT( m_datInfo != 0 );
 
     DOM::Element backupElement;
     int readNum = m_datInfo->getReadNum();
@@ -268,7 +268,7 @@
 
     /* '1-', '101-' などのリンクを作成 */
     for ( int num = 1; num < readNum ; num += 100 ) {
-        if ( node == NULL ) {
+        if ( node == 0 ) {
             QString href = QString( "#%1" ).arg( num );
             QString linkStr = QString( "%1-" ).arg( num );
 
@@ -278,7 +278,7 @@
         } else {
             // 既にリンクが作られている場合は飛ばす
             node = node.nextSibling();
-            if ( node != NULL ) node = node.nextSibling();
+            if ( node != 0 ) node = node.nextSibling();
         }
     }
 

Modified: kita/branches/KITA-KDE4/kita/src/htmlpart.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/htmlpart.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/htmlpart.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -47,8 +47,8 @@
         : KHTMLPart( new KitaHTMLView( this, parent ) )
 {
     m_mode = HTMLPART_MODE_MAINPART;
-    m_popup = NULL;
-    m_domtree = NULL;
+    m_popup = 0;
+    m_domtree = 0;
     m_datURL.clear();
     m_updatedKokoyon = false;
 
@@ -71,7 +71,7 @@
 
     /* delete KitaDomTree */
     delete m_domtree;
-    m_domtree = NULL;
+    m_domtree = 0;
 
     /* update ViewPos */
     if ( m_mode == HTMLPART_MODE_MAINPART && !m_updatedKokoyon && !m_datURL.isEmpty() ) {
@@ -291,7 +291,7 @@
 /* redraw screen  */
 void KitaHTMLPart::redrawHTMLPart( const KUrl& datURL, bool force )
 {
-    if ( m_domtree == NULL ) return ;
+    if ( m_domtree == 0 ) return ;
     if ( m_datURL != datURL ) return ;
 
     m_domtree->redraw( force );
@@ -504,8 +504,8 @@
 {
     DOM::Node node;
     node = nodeUnderMouse();
-    while ( node != NULL && node.nodeName().string() != "div" ) node = node.parentNode();
-    if ( node == NULL ) return QString();
+    while ( node != 0 && node.nodeName().string() != "div" ) node = node.parentNode();
+    if ( node == 0 ) return QString();
 
     return static_cast<DOM::Element>( node ).getAttribute( "id" ).string();
 }
@@ -538,7 +538,7 @@
 /* private */
 void KitaHTMLPart::findTextInit()
 {
-    m_findNode = NULL;
+    m_findNode = 0;
     m_findPos = -1;
     m_find_y = 0;
 }
@@ -611,7 +611,7 @@
 
             DOM::Node tmpnode = m_findNode.previousSibling();
 
-            if ( tmpnode != NULL ) {
+            if ( tmpnode != 0 ) {
 
                 QRect qr = tmpnode.getRect();
                 if ( reverse ) m_find_y -= qr.bottom() - qr.top();
@@ -653,7 +653,7 @@
 
         m_findNode = next;
         if ( m_findNode.isNull() ) {
-            m_findNode = NULL;
+            m_findNode = 0;
             return false;
         }
     }
@@ -876,7 +876,7 @@
     if ( e->qmouseEvent() ->modifiers() & Qt::ControlModifier ) m_pushctrl = true;
     if ( e->qmouseEvent() ->button() & Qt::MidButton ) m_pushmidbt = true;
 
-    if ( e->url() != NULL ) {
+    if ( e->url() != 0 ) {
 
         if ( e->url().string().at( 0 ) == '#' ) { /* anchor */
             kurl = m_datURL;
@@ -1271,7 +1271,7 @@
 void KitaHTMLPart::slotDeletePopup()
 {
     delete m_popup;
-    m_popup = NULL;
+    m_popup = 0;
     m_multiPopup = false;
 }
 

Modified: kita/branches/KITA-KDE4/kita/src/kitaui/tabwidgetbase.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/kitaui/tabwidgetbase.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/kitaui/tabwidgetbase.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -62,14 +62,14 @@
     /* romove parts */
     if ( m_manager && !( m_manager->parts().isEmpty() ) ) {
         KParts::Part * part;
-        while ( ( part = m_manager->parts().first() ) != NULL ) {
+        while ( ( part = m_manager->parts().first() ) != 0 ) {
             m_manager->removePart( part );
             removePage( part->widget() );
             delete part;
         }
     }
     delete m_manager;
-    m_manager = NULL;
+    m_manager = 0;
 
     /* remove widgets which don't belong to parts */
     QWidget* view = currentWidget();
@@ -83,8 +83,8 @@
 /* public slot  */
 void KitaTabWidgetBase::slotCurrentChanged( QWidget * w )
 {
-    if ( m_manager == NULL ) return ;
-    if ( w == NULL ) return ;
+    if ( m_manager == 0 ) return ;
+    if ( w == 0 ) return ;
     w->activateWindow();
     w->setFocus();
 
@@ -118,7 +118,7 @@
 /* protected */ /* virtual */
 void KitaTabWidgetBase::deleteWidget( QWidget* w )
 {
-    if ( w == NULL ) return ;
+    if ( w == 0 ) return ;
 
     removePage( w );
     KParts::Part* part = findPartFromWidget( w );
@@ -130,18 +130,18 @@
 /* protected */
 KParts::Part* KitaTabWidgetBase::findPartFromWidget( QWidget* w )
 {
-    if ( w == NULL ) return NULL;
-    if ( m_manager == NULL ) return NULL;
-    if ( m_manager->parts().isEmpty() ) return NULL;
+    if ( w == 0 ) return 0;
+    if ( m_manager == 0 ) return 0;
+    if ( m_manager->parts().isEmpty() ) return 0;
 
     KParts::Part *part;
     QList<KParts::Part*>::const_iterator it = m_manager->parts().begin();
-    while ( ( part = ( *it ) ) != NULL ) {
+    while ( ( part = ( *it ) ) != 0 ) {
         if ( part->widget() == w ) return part;
         ++it;
     }
 
-    return NULL;
+    return 0;
 }
 
 /*------------------------------------*/

Modified: kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/boardmanager.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -301,10 +301,10 @@
 
 /* BoardManager */
 
-QTextCodec* Kita::BoardManager::m_cp932Codec = NULL; // FIXME
-QTextCodec* Kita::BoardManager::m_eucJpCodec = NULL;
+QTextCodec* Kita::BoardManager::m_cp932Codec = 0;
+QTextCodec* Kita::BoardManager::m_eucJpCodec = 0;
 BoardDataList Kita::BoardManager::m_boardDataList;
-BoardData* Kita::BoardManager::m_previousBoardData = NULL;
+BoardData* Kita::BoardManager::m_previousBoardData = 0;
 QString Kita::BoardManager::m_previousBoardURL;
 
 
@@ -323,7 +323,7 @@
 const QString BoardManager::boardURL( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     return bdata->basePath();
 }
@@ -344,7 +344,7 @@
 const QString BoardManager::boardRoot( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     return bdata->hostName() + bdata->rootPath();
 }
@@ -353,7 +353,7 @@
 const QString BoardManager::boardPath( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     return bdata->bbsPath();
 }
@@ -362,7 +362,7 @@
 const QString BoardManager::ext( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     return bdata->ext();
 }
@@ -371,7 +371,7 @@
 const QString BoardManager::boardID( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     return bdata->bbsPath().mid( 1 ); /* remove "/" */
 }
@@ -381,7 +381,7 @@
 const QString BoardManager::subjectURL( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     return bdata->basePath() + "subject.txt";
 }
@@ -391,7 +391,7 @@
 const QString BoardManager::boardName( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     return bdata->boardName();
 }
@@ -401,7 +401,7 @@
 int BoardManager::type( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return Board_Unknown;
+    if ( bdata == 0 ) return Board_Unknown;
 
     return bdata->type();
 }
@@ -456,7 +456,7 @@
     /*-------------------------*/
 
     BoardData* bdata = getBoardData( url );
-    if ( bdata == NULL ) return ;
+    if ( bdata == 0 ) return ;
 
     /* download subject.txt */
     if ( online ) {
@@ -470,7 +470,7 @@
                 "UserAgent",
                 QString( "Monazilla/1.00 (Kita/%1)" ).arg( "0.200.0" ) );
         QString subjectPath = Cache::getSubjectPath( url );
-        KIO::NetAccess::download( subjectURL( url ), subjectPath, NULL );
+        KIO::NetAccess::download( subjectURL( url ), subjectPath, 0 );
     }
 
     /* open and read subject.txt */
@@ -511,14 +511,14 @@
 
             /* read idx file */
             Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-            if ( thread == NULL ) {
+            if ( thread == 0 ) {
 
                 thread = Kita::Thread::getByURL( datURL );
-                if ( thread == NULL ) continue;
+                if ( thread == 0 ) continue;
                 ThreadIndex::loadIndex( thread, datURL, false );
             }
 
-            if ( thread != NULL ) threadList.append( thread );
+            if ( thread != 0 ) threadList.append( thread );
         }
     }
 }
@@ -622,7 +622,7 @@
         delete( *it );
 
     m_boardDataList.clear();
-    m_previousBoardData = NULL;
+    m_previousBoardData = 0;
     m_previousBoardURL.clear();
 }
 
@@ -769,7 +769,7 @@
 /* public */ /* static */
 bool BoardManager::isEnrolled( const KUrl& url )
 {
-    if ( getBoardData( url ) == NULL ) return false;
+    if ( getBoardData( url ) == 0 ) return false;
     return true;
 }
 
@@ -777,11 +777,11 @@
 /* public */ /* static */
 BoardData* BoardManager::getBoardData( const KUrl& url )
 {
-    if ( url.isEmpty() ) return NULL;
+    if ( url.isEmpty() ) return 0;
     QString urlstr = url.prettyUrl();
 
     /* cache */
-    if ( m_previousBoardData != NULL && m_previousBoardURL == urlstr ) return m_previousBoardData;
+    if ( m_previousBoardData != 0 && m_previousBoardURL == urlstr ) return m_previousBoardData;
 
     for ( BoardDataList::Iterator it = m_boardDataList.begin(); it != m_boardDataList.end(); ++it ) {
 
@@ -799,7 +799,7 @@
         }
     }
 
-    return NULL;
+    return 0;
 }
 
 
@@ -825,7 +825,7 @@
 bool BoardManager::loadBBSHistory( const KUrl& url )
 {
     BoardData * bdata = getBoardData( url );
-    if ( bdata == NULL ) return false;
+    if ( bdata == 0 ) return false;
 
     QStringList keyHosts(bdata->hostName());
 
@@ -869,11 +869,11 @@
 
     /* Is oldURL enrolled? */
     BoardData* bdata = getBoardData( oldURL );
-    if ( bdata == NULL ) {
+    if ( bdata == 0 ) {
 
         /* Is newURL enrolled? */
         bdata = getBoardData( newURL );
-        if ( bdata == NULL ) return false;
+        if ( bdata == 0 ) return false;
     }
 
 

Modified: kita/branches/KITA-KDE4/kita/src/libkita/cache.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/cache.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/cache.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -32,7 +32,7 @@
 {
     /* Is board enrolled ? */
     BoardData * bdata = BoardManager::getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     QString root = bdata->hostName() + bdata->rootPath();
 
@@ -44,7 +44,7 @@
 {
     /* Is board enrolled ? */
     BoardData * bdata = BoardManager::getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     QString bbs = bdata->bbsPath();
 

Modified: kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/datinfo.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -43,11 +43,11 @@
 
     /* get the pointer of Thread class */
     m_thread = Kita::Thread::getByURLNew( m_datURL );
-    if ( m_thread == NULL ) {
+    if ( m_thread == 0 ) {
 
         /* create Thread */
         m_thread = Kita::Thread::getByURL( m_datURL );
-        if ( m_thread == NULL ) return ;
+        if ( m_thread == 0 ) return ;
 
         /* read idx file */
         ThreadIndex::loadIndex( m_thread, m_datURL );
@@ -156,12 +156,12 @@
     if ( m_access ) {
         m_access->killJob();
         delete m_access;
-        m_access = NULL;
+        m_access = 0;
     }
     if ( m_access2 ) {
         m_access2->killJob();
         delete m_access2;
-        m_access2 = NULL;
+        m_access2 = 0;
     }
 }
 
@@ -186,7 +186,7 @@
    DatInfo emits the finishLoad signal to the parent object  */ /* public */
 bool DatInfo::updateCache( const QObject* parent )
 {
-    if ( m_access == NULL ) return false;
+    if ( m_access == 0 ) return false;
     if ( m_nowLoading ) return false;
 
     m_nowLoading = true;
@@ -279,7 +279,7 @@
     ThreadIndex::saveIndex( m_thread, m_datURL );
 
     /* re-try by offlaw.cgi */
-    if ( m_thread->readNum() == 0 && m_access2 == NULL && DatManager::is2chThread( m_datURL ) ) {
+    if ( m_thread->readNum() == 0 && m_access2 == 0 && DatManager::is2chThread( m_datURL ) ) {
         if ( Account::isLogged() ) {
             initPrivate( true );
             m_access2 = new OfflawAccess( m_datURL );
@@ -303,7 +303,7 @@
 /* public */
 int DatInfo::getResponseCode()
 {
-    if ( m_access == NULL ) return 0;
+    if ( m_access == 0 ) return 0;
 
     return m_access->responseCode();
 }
@@ -312,7 +312,7 @@
 /* public */
 int DatInfo::getServerTime()
 {
-    if ( m_access == NULL ) return 0;
+    if ( m_access == 0 ) return 0;
 
     return m_access->serverTime();
 }
@@ -345,7 +345,7 @@
        It will cause deadlock , because
        Kita::Access::stopJob() calls KitaHTMLPart::slotFinishLoad() back,
        then KitaHTMLPart::slotFinishLoad() calls another functions in DatInfo. */
-    if ( m_access == NULL ) return ;
+    if ( m_access == 0 ) return ;
     if ( ! m_nowLoading ) return ;
 
     m_access->stopJob();
@@ -694,7 +694,7 @@
 /* public */
 int DatInfo::getDatSize()
 {
-    if ( m_access == NULL ) return 0;
+    if ( m_access == 0 ) return 0;
 
     return m_access->dataSize();
 }
@@ -718,7 +718,7 @@
 {
     if ( m_broken ) return m_broken;
 
-    if ( m_access == NULL ) return false;
+    if ( m_access == 0 ) return false;
 
     int rescode = m_access->responseCode();
     bool invalid = m_access->invalidDataReceived();

Modified: kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/datmanager.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -44,7 +44,7 @@
 {
     if ( getDatInfo( url,
                      false /* don't check the existence of cache */
-                   ) == NULL ) return false;
+                   ) == 0 ) return false;
     return true;
 }
 
@@ -67,7 +67,7 @@
  
    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 0.
  
    If checkCached == false and cache does not exist,
    create DatInfo and return its pointer anyway.
@@ -78,7 +78,7 @@
 {
     /* search */
     DatInfo * datInfo = searchDatInfo( url );
-    if ( datInfo != NULL ) return datInfo;
+    if ( datInfo != 0 ) return datInfo;
 
     /* create and enroll instance */
     return enrollDatInfo( url, checkCached );
@@ -90,8 +90,8 @@
 DatInfo* DatManager::searchDatInfo( const KUrl& url )
 {
     KUrl datURL = Kita::getDatURL( url );
-    if ( datURL.isEmpty() ) return NULL; /* This url is not enrolled in BoardManager. */
-    if ( m_datInfoList.isEmpty() ) return NULL;
+    if ( datURL.isEmpty() ) return 0; /* This url is not enrolled in BoardManager. */
+    if ( m_datInfoList.isEmpty() ) return 0;
 
     int i = 0;
     DatInfoList::Iterator it;
@@ -113,7 +113,7 @@
         }
     }
 
-    return NULL;
+    return 0;
 }
 
 
@@ -122,7 +122,7 @@
 DatInfo* DatManager::enrollDatInfo( const KUrl& url, bool checkCached )
 {
     KUrl datURL = Kita::getDatURL( url );
-    if ( datURL.isEmpty() ) return NULL; /* This url is not enrolled in BoardManager. */
+    if ( datURL.isEmpty() ) return 0; /* This url is not enrolled in BoardManager. */
 
     /* create DatInfo & read cached data */
     DatInfo* datInfo = new DatInfo( datURL );
@@ -131,7 +131,7 @@
     /* If cache does not exist, delete DatInfo here. */
     if ( checkCached && datInfo->getReadNum() == 0 ) {
         delete datInfo;
-        return NULL;
+        return 0;
     }
 
     m_datInfoList.prepend( datInfo );
@@ -142,7 +142,7 @@
         DatInfoList::Iterator it;
         for ( it = m_datInfoList.at( DMANAGER_MAXQUEUE ); it != m_datInfoList.end(); ++it ) {
 
-            if ( ( *it ) == NULL ) continue;
+            if ( ( *it ) == 0 ) continue;
             DatInfo* deleteInfo = ( *it );
         }
     }
@@ -171,7 +171,7 @@
 bool DatManager::updateCache( const KUrl& url , const QObject* parent )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->updateCache( parent );
 }
@@ -181,7 +181,7 @@
 int DatManager::getResponseCode( const KUrl& url )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return 0;
+    if ( datInfo == 0 ) return 0;
 
     return datInfo->getResponseCode();
 }
@@ -190,7 +190,7 @@
 int DatManager::getServerTime( const KUrl& url )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return 0;
+    if ( datInfo == 0 ) return 0;
 
     return datInfo->getServerTime();
 }
@@ -201,7 +201,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread == NULL ) return false;
+    if ( thread == 0 ) return false;
     if ( thread->readNum() == 0 ) return false;
 
     /* init DatInfo */
@@ -230,7 +230,7 @@
 bool DatManager::isLoadingNow( const KUrl& url )
 {
     DatInfo * datInfo = searchDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->isLoadingNow();
 }
@@ -240,7 +240,7 @@
 void DatManager::stopLoading( const KUrl& url )
 {
     DatInfo * datInfo = searchDatInfo( url );
-    if ( datInfo == NULL ) return ;
+    if ( datInfo == 0 ) return ;
 
     return datInfo->stopLoading();
 }
@@ -253,7 +253,7 @@
 QString DatManager::getDat( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getDat( num );
 }
@@ -264,7 +264,7 @@
 QString DatManager::getId( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getId( num );
 }
@@ -274,7 +274,7 @@
 QString DatManager::getPlainName( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getPlainName( num );
 }
@@ -284,7 +284,7 @@
 QString DatManager::getPlainBody( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getPlainBody( num );
 }
@@ -294,7 +294,7 @@
 QString DatManager::getPlainTitle( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getPlainTitle( num );
 }
@@ -305,7 +305,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread != NULL ) return thread->threadName();
+    if ( thread != 0 ) return thread->threadName();
 
     return QString();
 }
@@ -336,7 +336,7 @@
 QString DatManager::getHtml( const KUrl& url, int startnum, int endnum, bool checkAbone )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getHTMLString( startnum, endnum, checkAbone );
 }
@@ -347,7 +347,7 @@
 QString DatManager::getHtmlByID( const KUrl& url, const QString& strid, int &count )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getHtmlByID( strid, count );
 }
@@ -358,7 +358,7 @@
 QString DatManager::getTreeByRes( const KUrl& url, const int rootnum, int &count )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getTreeByRes( rootnum, count );
 }
@@ -367,7 +367,7 @@
 QString DatManager::getTreeByResReverse( const KUrl& url, const int rootnum, int &count )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return QString();
+    if ( datInfo == 0 ) return QString();
 
     return datInfo->getTreeByResReverse( rootnum, count );
 }
@@ -378,7 +378,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread != NULL ) return thread->resNum();
+    if ( thread != 0 ) return thread->resNum();
 
     return 0;
 }
@@ -389,7 +389,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread != NULL ) return thread->readNum();
+    if ( thread != 0 ) return thread->readNum();
 
     return 0;
 }
@@ -400,7 +400,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread != NULL ) return thread->viewPos();
+    if ( thread != 0 ) return thread->viewPos();
 
     return 0;
 }
@@ -411,7 +411,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread != NULL ) thread->setViewPos( num );
+    if ( thread != 0 ) thread->setViewPos( num );
 
     /* save idx */
     Kita::ThreadIndex::setViewPos( url, num );
@@ -425,7 +425,7 @@
 int DatManager::getDatSize( const KUrl& url )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return 0;
+    if ( datInfo == 0 ) return 0;
 
     return datInfo->getDatSize();
 }
@@ -434,7 +434,7 @@
 int DatManager::getNumByID( const KUrl& url, const QString& strid )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return 0;
+    if ( datInfo == 0 ) return 0;
 
     return datInfo->getNumByID( strid );
 }
@@ -469,7 +469,7 @@
 bool DatManager::isResValid( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->isResValid( num );
 }
@@ -479,7 +479,7 @@
 bool DatManager::isBroken( const KUrl& url )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->isBroken();
 }
@@ -488,7 +488,7 @@
 bool DatManager::isResBroken( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->isResBroken( num );
 }
@@ -499,7 +499,7 @@
 bool DatManager::checkID( const KUrl& url, const QString& strid, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->checkID( strid, num );
 }
@@ -512,7 +512,7 @@
                           )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->checkWord( strlist, num, checkOR );
 }
@@ -523,7 +523,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread == NULL ) return false;
+    if ( thread == 0 ) return false;
 
     return thread->isMarked( num );
 }
@@ -534,7 +534,7 @@
 {
     KUrl datURL = Kita::getDatURL( url );
     Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
-    if ( thread == NULL ) return ;
+    if ( thread == 0 ) return ;
 
     if ( thread->setMark( num, mark ) ) Kita::ThreadIndex::setMarkList( url, thread->markList() );
 }
@@ -544,7 +544,7 @@
 bool DatManager::checkAbone( const KUrl& url, int num )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->checkAbone( num );
 }
@@ -554,7 +554,7 @@
 void DatManager::resetAbone( const KUrl& url )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return ;
+    if ( datInfo == 0 ) return ;
 
     datInfo->resetAbone();
 }
@@ -564,7 +564,7 @@
 bool DatManager::isMainThreadOpened( const KUrl& url )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return false;
+    if ( datInfo == 0 ) return false;
 
     return datInfo->isOpened();
 }
@@ -572,7 +572,7 @@
 void DatManager::setMainThreadOpened( const KUrl& url, bool isOpened )
 {
     DatInfo * datInfo = getDatInfo( url );
-    if ( datInfo == NULL ) return;
+    if ( datInfo == 0 ) return;
 
     datInfo->setIsOpened( isOpened );
 }

Modified: kita/branches/KITA-KDE4/kita/src/libkita/favoriteboards.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/favoriteboards.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/favoriteboards.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -122,7 +122,7 @@
 
 void FavoriteBoards::replace( QString fromURL, QString toURL )
 {
-    if ( FavoriteBoards::getInstance() == NULL ) return ;
+    if ( FavoriteBoards::getInstance() == 0 ) return ;
     Q3ValueList<KUrl>& boardList = FavoriteBoards::getInstance() ->m_list;
     for ( Q3ValueList<KUrl>::iterator it = boardList.begin(); it != boardList.end(); ++it ) {
         QString url = ( *it ).url();

Modified: kita/branches/KITA-KDE4/kita/src/libkita/favoritethreads.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/favoritethreads.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/favoritethreads.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -168,7 +168,7 @@
 
 void FavoriteThreads::replace( QString fromURL, QString toURL )
 {
-    if ( FavoriteThreads::getInstance() == NULL ) return ;
+    if ( FavoriteThreads::getInstance() == 0 ) return ;
     Q3ValueList<FavoriteThreadItem>& threadList = FavoriteThreads::getInstance() ->m_threadList;
     Q3ValueList<FavoriteThreadItem>::iterator it;
     for ( it = threadList.begin(); it != threadList.end(); ++it ) {

Modified: kita/branches/KITA-KDE4/kita/src/libkita/kita_misc.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/kita_misc.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/kita_misc.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -32,9 +32,9 @@
 
 namespace Kita
 {
-    static QTextCodec* qcpCodec = NULL;
-    static QTextCodec* utf8Codec = NULL;
-    static QTextCodec* eucCodec = NULL;
+    static QTextCodec* qcpCodec = 0;
+    static QTextCodec* utf8Codec = 0;
+    static QTextCodec* eucCodec = 0;
 
     static QString m_weekstr[ 7 ];
     static QString m_colonstr;
@@ -383,7 +383,7 @@
 
     /* Is board enrolled ? */
     BoardData* bdata = Kita::BoardManager::getBoardData( url );
-    if ( bdata == NULL ) return QString();
+    if ( bdata == 0 ) return QString();
 
     QString urlstr = url.prettyUrl();
 

Modified: kita/branches/KITA-KDE4/kita/src/libkita/thread.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/thread.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/thread.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -143,14 +143,14 @@
 /* static & public */
 Thread* Thread::getByURLNew( const KUrl& datURL )
 {
-    if ( m_threadDict == NULL ) return NULL;
+    if ( m_threadDict == 0 ) return 0;
 
     return m_threadDict->find( datURL.prettyUrl() );
 }
 
 void Thread::replace( const QString& fromURL, const QString& toURL )
 {
-    if ( m_threadDict == NULL ) return ;
+    if ( m_threadDict == 0 ) return ;
     Q3DictIterator<Kita::Thread> it( *m_threadDict );
     for ( ; it.current(); ++it ) {
         QString url = it.currentKey();

Modified: kita/branches/KITA-KDE4/kita/src/libkita/threadinfo.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/threadinfo.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/libkita/threadinfo.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -51,7 +51,7 @@
 {
     QMap<QString, int>::Iterator it;
     KitaThreadInfo* instance = KitaThreadInfo::getInstance();
-    if ( instance == NULL ) return ;
+    if ( instance == 0 ) return ;
 
     for ( it = instance->m_readDict.begin(); it != instance->m_readDict.end(); ++it ) {
         QString url = it.key();

Modified: kita/branches/KITA-KDE4/kita/src/respopup.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/respopup.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/respopup.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -32,7 +32,7 @@
                     )
     {
         m_url = url;
-        m_htmlPart = NULL;
+        m_htmlPart = 0;
 
         m_htmlPart = new KitaHTMLPart( this );
         m_htmlPart->setup( HTMLPART_MODE_POPUP , url );

Modified: kita/branches/KITA-KDE4/kita/src/threadtabwidget.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/threadtabwidget.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/threadtabwidget.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -136,7 +136,7 @@
     KUrl datURL = Kita::ParseMisc::parseURLonly( url );
 
     int max = count();
-    if ( max == 0 ) return NULL;
+    if ( max == 0 ) return 0;
     int i = 0;
 
     while ( i < max ) {
@@ -152,14 +152,14 @@
         i++;
     }
 
-    return NULL;
+    return 0;
 }
 
 
 /* private */
 KitaThreadView* KitaThreadTabWidget::isThreadView( QWidget* w )
 {
-    KitaThreadView * view = NULL;
+    KitaThreadView * view = 0;
     if ( w ) {
         if ( w->inherits( "KitaThreadView" ) ) view = static_cast< KitaThreadView* >( w );
     }

Modified: kita/branches/KITA-KDE4/kita/src/threadview.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/threadview.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/threadview.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -163,7 +163,7 @@
 
     if ( m_threadPart ) {
         delete m_threadPart;
-        m_threadPart = NULL;
+        m_threadPart = 0;
     }
 }
 

Modified: kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/writetabwidget.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -94,10 +94,10 @@
 KitaWriteView* KitaWriteTabWidget::findWriteView( const KUrl& url )
 {
     KUrl datURL = Kita::getDatURL( url );
-    if ( datURL.isEmpty() ) return NULL;
+    if ( datURL.isEmpty() ) return 0;
 
     int max = count();
-    if ( max == 0 ) return NULL;
+    if ( max == 0 ) return 0;
 
     for( int i=0; i < max; i++ ) {
         KitaWriteView * view = isWriteView( widget ( i ) );
@@ -106,14 +106,14 @@
         }
     }
 
-    return NULL;
+    return 0;
 }
 
 
 /* private */
 KitaWriteView* KitaWriteTabWidget::isWriteView( QWidget* w )
 {
-    KitaWriteView * view = NULL;
+    KitaWriteView * view = 0;
     if ( w ) {
         if ( w->inherits( "KitaWriteView" ) ) view = static_cast< KitaWriteView* >( w );
     }
@@ -151,7 +151,7 @@
 {
     KitaWriteView * view = isWriteView( w );
 
-    if ( view == NULL ) return ;
+    if ( view == 0 ) return ;
 
     if ( view->body().length() ) {
         if ( QMessageBox::warning( this, "Kita",

Modified: kita/branches/KITA-KDE4/kita/src/writeview.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/writeview.cpp	2009-07-06 14:04:08 UTC (rev 2374)
+++ kita/branches/KITA-KDE4/kita/src/writeview.cpp	2009-07-06 15:07:43 UTC (rev 2375)
@@ -47,7 +47,7 @@
 
 /*--------------------------------------------------------------------*/
 
-QCp932Codec* KitaWriteView::m_cp932Codec = NULL;
+QCp932Codec* KitaWriteView::m_cp932Codec = 0;
 
 /*
 




Kita-svn メーリングリストの案内
Back to archive index