summaryrefslogtreecommitdiffabout
path: root/kabc/vcardparser/vcardline.cpp
Unidiff
Diffstat (limited to 'kabc/vcardparser/vcardline.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardparser/vcardline.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp
index 0972a35..8df2d32 100644
--- a/kabc/vcardparser/vcardline.cpp
+++ b/kabc/vcardparser/vcardline.cpp
@@ -61,61 +61,65 @@ VCardLine::~VCardLine()
61} 61}
62 62
63VCardLine& VCardLine::operator=( const VCardLine& line ) 63VCardLine& VCardLine::operator=( const VCardLine& line )
64{ 64{
65 if ( &line == this ) 65 if ( &line == this )
66 return *this; 66 return *this;
67 67
68 mParamMap = line.mParamMap; 68 mParamMap = line.mParamMap;
69 mValue = line.mValue; 69 mValue = line.mValue;
70 mIdentifier = line.mIdentifier; 70 mIdentifier = line.mIdentifier;
71 71
72 return *this; 72 return *this;
73} 73}
74 74
75void VCardLine::setIdentifier( const QString& identifier ) 75void VCardLine::setIdentifier( const QString& identifier )
76{ 76{
77 mIdentifier = identifier; 77 mIdentifier = identifier;
78} 78}
79 79
80QString VCardLine::identifier() const 80QString VCardLine::identifier() const
81{ 81{
82 return mIdentifier; 82 return mIdentifier;
83} 83}
84 84
85void VCardLine::setValue( const QString& value ) 85void VCardLine::setValueString( const QString& value )
86{ 86{
87 mValue.duplicate( value.data(), value.length() ); 87 setValueCString( value.utf8() );
88}
89void VCardLine::setValueCString( const QCString& value )
90{
91 mValue.duplicate( value.data(), value.length() );
88} 92}
89 93
90void VCardLine::setValue( const QByteArray& value ) 94void VCardLine::setValueBytes( const QByteArray& value )
91{ 95{
92 mValue = value; 96 mValue = value;
93} 97}
94 98
95QVariant VCardLine::value() const 99QString VCardLine::valueString() const
96{ 100{
97 return QVariant( QCString( mValue.data(), mValue.size()+1 ) ); 101 return QString::fromUtf8( mValue.data(), mValue.size() );
98} 102}
99 103
100QByteArray VCardLine::valueBytes() const 104QByteArray VCardLine::valueBytes() const
101{ 105{
102 return mValue; 106 return mValue;
103} 107}
104 108
105void VCardLine::setGroup( const QString& group ) 109void VCardLine::setGroup( const QString& group )
106{ 110{
107 if ( !d ) 111 if ( !d )
108 d = new VCardLinePrivate(); 112 d = new VCardLinePrivate();
109 113
110 d->mGroup = group; 114 d->mGroup = group;
111} 115}
112 116
113QString VCardLine::group() const 117QString VCardLine::group() const
114{ 118{
115 if ( d ) 119 if ( d )
116 return d->mGroup; 120 return d->mGroup;
117 else 121 else
118 return QString(); 122 return QString();
119} 123}
120 124
121bool VCardLine::hasGroup() const 125bool VCardLine::hasGroup() const