[Kita-svn] [2491] set const

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 7月 29日 (水) 20:13:15 JST


Revision: 2491
          http://sourceforge.jp/projects/kita/svn/view?view=rev&revision=2491
Author:   nogu
Date:     2009-07-29 20:13:15 +0900 (Wed, 29 Jul 2009)

Log Message:
-----------
set const

Modified Paths:
--------------
    kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp
    kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h

Modified: kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp	2009-07-29 11:09:56 UTC (rev 2490)
+++ kita/branches/KITA-KDE4/kita/src/libkita/threadindex.cpp	2009-07-29 11:13:15 UTC (rev 2491)
@@ -42,7 +42,7 @@
     m_config = config.copyTo(indexPath, 0);
 }
 
-QString ThreadIndex::getSubject()
+QString ThreadIndex::getSubject() const
 {
     return getSubjectPrivate();
 }
@@ -52,7 +52,7 @@
     setSubjectPrivate(str);
 }
 
-int ThreadIndex::getResNum()
+int ThreadIndex::getResNum() const
 {
     return getResNumPrivate();
 }
@@ -62,7 +62,7 @@
     setResNumPrivate(resNum);
 }
 
-int ThreadIndex::getReadNum()
+int ThreadIndex::getReadNum() const
 {
     return getReadNumPrivate(true);
 }
@@ -72,7 +72,7 @@
     setReadNumPrivate(readNum);
 }
 
-int ThreadIndex::getViewPos()
+int ThreadIndex::getViewPos() const
 {
     return getViewPosPrivate();
 }
@@ -92,7 +92,7 @@
 
 
 /* load thread information */  /* public */
-void ThreadIndex::loadIndex(Thread* thread, bool checkCached)
+void ThreadIndex::loadIndex(Thread* thread, bool checkCached) const
 {
     /* load read number */
     int readNum = getReadNumPrivate(checkCached);
@@ -158,7 +158,7 @@
 /*------------------------------------------------------------------*/
 
 /* private */
-QString ThreadIndex::getSubjectPrivate()
+QString ThreadIndex::getSubjectPrivate() const
 {
     return m_config->group("").readEntry("Subject");
 }
@@ -172,7 +172,7 @@
 /*-------*/
 
 /* private */
-int ThreadIndex::getResNumPrivate()
+int ThreadIndex::getResNumPrivate() const
 {
     int resNum = m_config->group("").readEntry("ResNum", 0);
 
@@ -195,7 +195,7 @@
 /*-------*/
 
 /* private */
-int ThreadIndex::getReadNumPrivate(bool checkCached)
+int ThreadIndex::getReadNumPrivate(bool checkCached) const
 {
     /* If cache does not exist, return 0 */
     if (checkCached) {
@@ -235,7 +235,7 @@
 /*-------*/
 
 /* private */
-int ThreadIndex::getViewPosPrivate()
+int ThreadIndex::getViewPosPrivate() const
 {
     return m_config->group("").readEntry("ViewPos", 0);
 }
@@ -249,7 +249,7 @@
 /*-------*/
 
 /* private */
-QList<int> ThreadIndex::getMarkListPrivate()
+QList<int> ThreadIndex::getMarkListPrivate() const
 {
     QList<int> default_value;
     return m_config->group("").readEntry("Mark", default_value);

Modified: kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h
===================================================================
--- kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h	2009-07-29 11:09:56 UTC (rev 2490)
+++ kita/branches/KITA-KDE4/kita/src/libkita/threadindex.h	2009-07-29 11:13:15 UTC (rev 2491)
@@ -32,40 +32,40 @@
 
         void setUrl(const KUrl& url);
 
-        QString getSubject();
+        QString getSubject() const;
         void setSubject(const QString& str);
 
-        int getResNum();
+        int getResNum() const;
         void setResNum(int resNum);
 
-        int getReadNum();
+        int getReadNum() const;
         void setReadNum(int readNum);
 
-        int getViewPos();
+        int getViewPos() const;
         void setViewPos(int viewPos);
 
         void setMarkList(const QList<int>& markList);
 
         /*---------------------------------*/
 
-        void loadIndex(Thread* thread, bool checkCached = true);
+        void loadIndex(Thread* thread, bool checkCached = true) const;
         void saveIndex(const Thread* thread);
 
     private:
 
-        QString getSubjectPrivate();
+        QString getSubjectPrivate() const;
         void setSubjectPrivate(const QString& str);
 
-        int getResNumPrivate();
+        int getResNumPrivate() const;
         void setResNumPrivate(int resNum);
 
-        int getReadNumPrivate(bool checkCached);
+        int getReadNumPrivate(bool checkCached) const;
         void setReadNumPrivate(int readNum);
 
-        int getViewPosPrivate();
+        int getViewPosPrivate() const;
         void setViewPosPrivate(int viewPos);
 
-        QList<int> getMarkListPrivate();
+        QList<int> getMarkListPrivate() const;
         void setMarkListPrivate(const QList<int>& markList);
 
         KUrl m_url;




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