修订版 | d20191dd4850a88be3fd85fe8235ada24bc5011d (tree) |
---|---|
时间 | 2007-07-21 22:53:44 |
作者 | ikemo <ikemo@56b1...> |
Commiter | ikemo |
refactoring.
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@2036 56b19765-1e22-0410-a548-a0f45d66c51a
@@ -63,7 +63,7 @@ void FavoriteThreads::remove( const QString& datURL ) | ||
63 | 63 | |
64 | 64 | bool FavoriteThreads::contains( const QString& datURL ) |
65 | 65 | { |
66 | - if ( getInstance() ->m_threadList.contains( datURL ) ) { | |
66 | + if ( m_threadList.contains( datURL ) ) { | |
67 | 67 | return true; |
68 | 68 | } else { |
69 | 69 | return false; |
@@ -1,12 +1,12 @@ | ||
1 | 1 | /*************************************************************************** |
2 | -* Copyright (C) 2004 by Kita Developers * | |
3 | -* ikemo@users.sourceforge.jp * | |
4 | -* * | |
5 | -* This program is free software; you can redistribute it and/or modify * | |
6 | -* it under the terms of the GNU General Public License as published by * | |
7 | -* the Free Software Foundation; either version 2 of the License, or * | |
8 | -* (at your option) any later version. * | |
9 | -***************************************************************************/ | |
2 | + * Copyright (C) 2004 by Kita Developers * | |
3 | + * ikemo@users.sourceforge.jp * | |
4 | + * * | |
5 | + * This program is free software; you can redistribute it and/or modify * | |
6 | + * it under the terms of the GNU General Public License as published by * | |
7 | + * the Free Software Foundation; either version 2 of the License, or * | |
8 | + * (at your option) any later version. * | |
9 | + ***************************************************************************/ | |
10 | 10 | |
11 | 11 | #ifndef FAVORITETHREADS_H |
12 | 12 | #define FAVORITETHREADS_H |
@@ -21,8 +21,8 @@ | ||
21 | 21 | class QDomNode; |
22 | 22 | |
23 | 23 | /** |
24 | -@author Hideki Ikemoto | |
25 | -*/ | |
24 | + *@author Hideki Ikemoto | |
25 | + */ | |
26 | 26 | class FavoriteThreadItem |
27 | 27 | { |
28 | 28 | public: |
@@ -38,21 +38,24 @@ class FavoriteThreads | ||
38 | 38 | { |
39 | 39 | static FavoriteThreads* instance; |
40 | 40 | QValueList<FavoriteThreadItem> m_threadList; |
41 | + | |
41 | 42 | FavoriteThreads(); |
42 | 43 | ~FavoriteThreads(); |
44 | + | |
43 | 45 | const QValueList<FavoriteThreadItem> threadList() const; |
46 | + static void processThreadNode( QDomNode& node ); | |
47 | + | |
44 | 48 | public: |
45 | 49 | static FavoriteThreads* getInstance(); |
50 | + | |
46 | 51 | void insert( const QString& datURL ); |
47 | 52 | void remove( const QString& datURL ); |
48 | - static bool contains( const QString& datURL ); | |
53 | + bool contains( const QString& datURL ); | |
49 | 54 | const QString toXML() const; |
50 | 55 | static bool readFromXML( const QString& xml ); |
51 | - static void processThreadNode( QDomNode& node ); | |
52 | 56 | static void replace( QString fromURL, QString toURL ); |
53 | - // FIXME: use Iterator | |
54 | 57 | static QString getDatURL( int i ); |
55 | -static int count() { return getInstance() ->m_threadList.count(); } | |
58 | + static int count() { return getInstance() ->m_threadList.count(); } | |
56 | 59 | }; |
57 | 60 | |
58 | 61 | #endif |