Diffstat (limited to 'kabc/vcardparser/vcardline.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/vcardparser/vcardline.cpp | 14 |
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 | |||
@@ -73,37 +73,41 @@ VCardLine& VCardLine::operator=( const VCardLine& line ) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | void VCardLine::setIdentifier( const QString& identifier ) | 75 | void VCardLine::setIdentifier( const QString& identifier ) |
76 | { | 76 | { |
77 | mIdentifier = identifier; | 77 | mIdentifier = identifier; |
78 | } | 78 | } |
79 | 79 | ||
80 | QString VCardLine::identifier() const | 80 | QString VCardLine::identifier() const |
81 | { | 81 | { |
82 | return mIdentifier; | 82 | return mIdentifier; |
83 | } | 83 | } |
84 | 84 | ||
85 | void VCardLine::setValue( const QString& value ) | 85 | void VCardLine::setValueString( const QString& value ) |
86 | { | 86 | { |
87 | mValue.duplicate( value.data(), value.length() ); | 87 | setValueCString( value.utf8() ); |
88 | } | ||
89 | void VCardLine::setValueCString( const QCString& value ) | ||
90 | { | ||
91 | mValue.duplicate( value.data(), value.length() ); | ||
88 | } | 92 | } |
89 | 93 | ||
90 | void VCardLine::setValue( const QByteArray& value ) | 94 | void VCardLine::setValueBytes( const QByteArray& value ) |
91 | { | 95 | { |
92 | mValue = value; | 96 | mValue = value; |
93 | } | 97 | } |
94 | 98 | ||
95 | QVariant VCardLine::value() const | 99 | QString 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 | ||
100 | QByteArray VCardLine::valueBytes() const | 104 | QByteArray VCardLine::valueBytes() const |
101 | { | 105 | { |
102 | return mValue; | 106 | return mValue; |
103 | } | 107 | } |
104 | 108 | ||
105 | void VCardLine::setGroup( const QString& group ) | 109 | void VCardLine::setGroup( const QString& group ) |
106 | { | 110 | { |
107 | if ( !d ) | 111 | if ( !d ) |
108 | d = new VCardLinePrivate(); | 112 | d = new VCardLinePrivate(); |
109 | 113 | ||