From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ktnef/lib/ktnefproperty.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'ktnef/lib/ktnefproperty.cpp') diff --git a/ktnef/lib/ktnefproperty.cpp b/ktnef/lib/ktnefproperty.cpp index 3845b8d88..df04a388d 100644 --- a/ktnef/lib/ktnefproperty.cpp +++ b/ktnef/lib/ktnefproperty.cpp @@ -17,14 +17,14 @@ #include "ktnef/ktnefproperty.h" #include "mapi.h" -#include +#include #include KTNEFProperty::KTNEFProperty() { } -KTNEFProperty::KTNEFProperty( int key_, int type_, const QVariant& value_, const QVariant& name_ ) +KTNEFProperty::KTNEFProperty( int key_, int type_, const TQVariant& value_, const TQVariant& name_ ) : _key( key_ ), _type( type_ ), _value( value_ ), _name( name_ ) { } @@ -34,11 +34,11 @@ KTNEFProperty::KTNEFProperty( const KTNEFProperty& p ) { } -QString KTNEFProperty::keyString() +TQString KTNEFProperty::keyString() { if ( _name.isValid() ) { - if ( _name.type() == QVariant::String ) + if ( _name.type() == TQVariant::String ) return _name.asString(); else return mapiNamedTagString( _name.asUInt(), _key ); @@ -47,38 +47,38 @@ QString KTNEFProperty::keyString() return mapiTagString( _key ); } -QString KTNEFProperty::formatValue( const QVariant& value, bool beautify ) +TQString KTNEFProperty::formatValue( const TQVariant& value, bool beautify ) { - if ( value.type() == QVariant::ByteArray ) + if ( value.type() == TQVariant::ByteArray ) { // check the first bytes (up to 8) if they are // printable characters - QByteArray arr = value.toByteArray(); + TQByteArray arr = value.toByteArray(); bool printable = true; for ( int i=QMIN( arr.size(), 8 )-1; i>=0 && printable; i-- ) printable = ( isprint( arr[ i ] ) != 0 ); if ( !printable ) { - QString s; + TQString s; uint i; uint txtCount = beautify ? QMIN( arr.size(), 32 ) : arr.size(); for ( i=0; i < txtCount; ++i ) { - s.append( QString().sprintf( "%02X", ( uchar )arr[ i ] ) ); + s.append( TQString().sprintf( "%02X", ( uchar )arr[ i ] ) ); if( beautify ) s.append( " " ); } if ( i < arr.size() ) - s.append( "... (size=" + QString::number( arr.size() ) + ")" ); + s.append( "... (size=" + TQString::number( arr.size() ) + ")" ); return s; } } - //else if ( value.type() == QVariant::DateTime ) + //else if ( value.type() == TQVariant::DateTime ) // return value.toDateTime().toString(); return value.toString(); } -QString KTNEFProperty::valueString() +TQString KTNEFProperty::valueString() { return formatValue( _value ); } @@ -89,11 +89,11 @@ int KTNEFProperty::key() const int KTNEFProperty::type() const { return _type; } -QVariant KTNEFProperty::value() const +TQVariant KTNEFProperty::value() const { return _value; } -QVariant KTNEFProperty::name() const +TQVariant KTNEFProperty::name() const { return _name; } bool KTNEFProperty::isVector() const -{ return ( _value.type() == QVariant::List ); } +{ return ( _value.type() == TQVariant::List ); } -- cgit v1.2.1