author | mickeyl <mickeyl> | 2004-02-21 12:25:50 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-21 12:25:50 (UTC) |
commit | 6155f1be5c19fc51a4929c9e173f9e5a24d193e6 (patch) (unidiff) | |
tree | c18ca863f82a559c60728f922519ac696387ec53 /libopie2/opiepim/core/opimxref.cpp | |
parent | a570c2824fcecaf1c278e1b5a592fa14cc0647f8 (diff) | |
download | opie-6155f1be5c19fc51a4929c9e173f9e5a24d193e6.zip opie-6155f1be5c19fc51a4929c9e173f9e5a24d193e6.tar.gz opie-6155f1be5c19fc51a4929c9e173f9e5a24d193e6.tar.bz2 |
the usual cosmetics
Diffstat (limited to 'libopie2/opiepim/core/opimxref.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimxref.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libopie2/opiepim/core/opimxref.cpp b/libopie2/opiepim/core/opimxref.cpp index 85d3345..f58ebb5 100644 --- a/libopie2/opiepim/core/opimxref.cpp +++ b/libopie2/opiepim/core/opimxref.cpp | |||
@@ -23,55 +23,61 @@ | |||
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | #include <opie2/opimxref.h> | 29 | #include "opimxref.h" |
30 | 30 | ||
31 | namespace Opie { | 31 | namespace Opie { |
32 | 32 | ||
33 | OPimXRef::OPimXRef( const OPimXRefPartner& one, const OPimXRefPartner& two ) | 33 | OPimXRef::OPimXRef( const OPimXRefPartner& one, const OPimXRefPartner& two ) |
34 | : m_partners(2) | 34 | : m_partners(2) |
35 | { | 35 | { |
36 | m_partners[0] = one; | 36 | m_partners[0] = one; |
37 | m_partners[1] = two; | 37 | m_partners[1] = two; |
38 | } | 38 | } |
39 | OPimXRef::OPimXRef() | 39 | OPimXRef::OPimXRef():m_partners(2) |
40 | : m_partners(2) | ||
41 | { | 40 | { |
42 | 41 | ||
43 | } | 42 | } |
43 | |||
44 | OPimXRef::OPimXRef( const OPimXRef& ref) { | 44 | OPimXRef::OPimXRef( const OPimXRef& ref) { |
45 | *this = ref; | 45 | *this = ref; |
46 | } | 46 | } |
47 | |||
47 | OPimXRef::~OPimXRef() { | 48 | OPimXRef::~OPimXRef() { |
48 | } | 49 | } |
50 | |||
49 | OPimXRef &OPimXRef::operator=( const OPimXRef& ref) { | 51 | OPimXRef &OPimXRef::operator=( const OPimXRef& ref) { |
50 | m_partners = ref.m_partners; | 52 | m_partners = ref.m_partners; |
51 | m_partners.detach(); | 53 | m_partners.detach(); |
52 | 54 | ||
53 | return* this; | 55 | return *this; |
54 | } | 56 | } |
57 | |||
55 | bool OPimXRef::operator==( const OPimXRef& oper ) { | 58 | bool OPimXRef::operator==( const OPimXRef& oper ) { |
56 | if ( m_partners == oper.m_partners ) return true; | 59 | if ( m_partners == oper.m_partners ) return true; |
57 | 60 | ||
58 | return false; | 61 | return false; |
59 | } | 62 | } |
60 | OPimXRefPartner OPimXRef::partner( enum Partners par) const{ | 63 | OPimXRefPartner OPimXRef::partner( enum Partners par) const{ |
61 | return m_partners[par]; | 64 | return m_partners[par]; |
62 | } | 65 | } |
66 | |||
63 | void OPimXRef::setPartner( enum Partners par, const OPimXRefPartner& part) { | 67 | void OPimXRef::setPartner( enum Partners par, const OPimXRefPartner& part) { |
64 | m_partners[par] = part; | 68 | m_partners[par] = part; |
65 | } | 69 | } |
70 | |||
66 | bool OPimXRef::containsString( const QString& string ) const{ | 71 | bool OPimXRef::containsString( const QString& string ) const{ |
67 | if ( m_partners[One].service() == string || | 72 | if ( m_partners[One].service() == string || |
68 | m_partners[Two].service() == string ) return true; | 73 | m_partners[Two].service() == string ) return true; |
69 | 74 | ||
70 | return false; | 75 | return false; |
71 | } | 76 | } |
77 | |||
72 | bool OPimXRef::containsUid( int uid ) const{ | 78 | bool OPimXRef::containsUid( int uid ) const{ |
73 | if ( m_partners[One].uid() == uid || | 79 | if ( m_partners[One].uid() == uid || |
74 | m_partners[Two].uid() == uid ) return true; | 80 | m_partners[Two].uid() == uid ) return true; |
75 | 81 | ||
76 | return false; | 82 | return false; |
77 | } | 83 | } |