Diffstat (limited to 'libopie2/opiepim/core/opimxrefmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimxrefmanager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/opimxrefmanager.cpp b/libopie2/opiepim/core/opimxrefmanager.cpp index d49f5f5..965f542 100644 --- a/libopie2/opiepim/core/opimxrefmanager.cpp +++ b/libopie2/opiepim/core/opimxrefmanager.cpp | |||
@@ -1,56 +1,58 @@ | |||
1 | #include "opimxrefmanager.h" | 1 | #include "opimxrefmanager.h" |
2 | 2 | ||
3 | 3 | ||
4 | OPimXRefManager::OPimXRefManager() { | 4 | OPimXRefManager::OPimXRefManager() { |
5 | } | 5 | } |
6 | OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) { | 6 | OPimXRefManager::OPimXRefManager( const OPimXRefManager& ref) { |
7 | m_list = ref.m_list; | 7 | m_list = ref.m_list; |
8 | } | 8 | } |
9 | OPimXRefManager::~OPimXRefManager() { | ||
10 | } | ||
9 | OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) { | 11 | OPimXRefManager &OPimXRefManager::operator=( const OPimXRefManager& ref) { |
10 | m_list = ref.m_list; | 12 | m_list = ref.m_list; |
11 | return *this; | 13 | return *this; |
12 | } | 14 | } |
13 | bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) { | 15 | bool OPimXRefManager::operator==( const OPimXRefManager& /*ref*/) { |
14 | // if ( m_list == ref.m_list ) return true; | 16 | // if ( m_list == ref.m_list ) return true; |
15 | 17 | ||
16 | return false; | 18 | return false; |
17 | } | 19 | } |
18 | void OPimXRefManager::add( const OPimXRef& ref) { | 20 | void OPimXRefManager::add( const OPimXRef& ref) { |
19 | m_list.append( ref ); | 21 | m_list.append( ref ); |
20 | } | 22 | } |
21 | void OPimXRefManager::remove( const OPimXRef& ref) { | 23 | void OPimXRefManager::remove( const OPimXRef& ref) { |
22 | m_list.remove( ref ); | 24 | m_list.remove( ref ); |
23 | } | 25 | } |
24 | void OPimXRefManager::replace( const OPimXRef& ref) { | 26 | void OPimXRefManager::replace( const OPimXRef& ref) { |
25 | m_list.remove( ref ); | 27 | m_list.remove( ref ); |
26 | m_list.append( ref ); | 28 | m_list.append( ref ); |
27 | } | 29 | } |
28 | void OPimXRefManager::clear() { | 30 | void OPimXRefManager::clear() { |
29 | m_list.clear(); | 31 | m_list.clear(); |
30 | } | 32 | } |
31 | QStringList OPimXRefManager::apps()const { | 33 | QStringList OPimXRefManager::apps()const { |
32 | OPimXRef::ValueList::ConstIterator it; | 34 | OPimXRef::ValueList::ConstIterator it; |
33 | QStringList list; | 35 | QStringList list; |
34 | 36 | ||
35 | QString str; | 37 | QString str; |
36 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { | 38 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { |
37 | str = (*it).partner( OPimXRef::One ).appName(); | 39 | str = (*it).partner( OPimXRef::One ).appName(); |
38 | if ( !list.contains( str ) ) list << str; | 40 | if ( !list.contains( str ) ) list << str; |
39 | 41 | ||
40 | str = (*it).partner( OPimXRef::Two ).appName(); | 42 | str = (*it).partner( OPimXRef::Two ).appName(); |
41 | if ( !list.contains( str ) ) list << str; | 43 | if ( !list.contains( str ) ) list << str; |
42 | } | 44 | } |
43 | return list; | 45 | return list; |
44 | } | 46 | } |
45 | OPimXRef::ValueList OPimXRefManager::list()const { | 47 | OPimXRef::ValueList OPimXRefManager::list()const { |
46 | return m_list; | 48 | return m_list; |
47 | } | 49 | } |
48 | OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{ | 50 | OPimXRef::ValueList OPimXRefManager::list( const QString& appName )const{ |
49 | OPimXRef::ValueList list; | 51 | OPimXRef::ValueList list; |
50 | OPimXRef::ValueList::ConstIterator it; | 52 | OPimXRef::ValueList::ConstIterator it; |
51 | 53 | ||
52 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { | 54 | for ( it = m_list.begin(); it != m_list.end(); ++it ) { |
53 | if ( (*it).containsString( appName ) ) | 55 | if ( (*it).containsString( appName ) ) |
54 | list.append( (*it) ); | 56 | list.append( (*it) ); |
55 | } | 57 | } |
56 | 58 | ||