summaryrefslogtreecommitdiffabout
path: root/kabc/vcardparser/vcardline.cpp
Unidiff
Diffstat (limited to 'kabc/vcardparser/vcardline.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/vcardparser/vcardline.cpp12
1 files changed, 8 insertions, 4 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
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{
87 setValueCString( value.utf8() );
88}
89void VCardLine::setValueCString( const QCString& value )
86{ 90{
87 mValue.duplicate( value.data(), value.length() ); 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