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/ktnefpropertyset.cpp | 54 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'ktnef/lib/ktnefpropertyset.cpp') diff --git a/ktnef/lib/ktnefpropertyset.cpp b/ktnef/lib/ktnefpropertyset.cpp index cf35362f..ec3ee2b5 100644 --- a/ktnef/lib/ktnefpropertyset.cpp +++ b/ktnef/lib/ktnefpropertyset.cpp @@ -28,9 +28,9 @@ KTNEFPropertySet::~KTNEFPropertySet() clear( true ); } -void KTNEFPropertySet::addProperty( int key, int type, const QVariant& value, const QVariant& name, bool overwrite ) +void KTNEFPropertySet::addProperty( int key, int type, const TQVariant& value, const TQVariant& name, bool overwrite ) { - QMap::ConstIterator it = properties_.find( key ); + TQMap::ConstIterator it = properties_.find( key ); if ( it != properties_.end() ) { if ( overwrite ) @@ -43,9 +43,9 @@ void KTNEFPropertySet::addProperty( int key, int type, const QVariant& value, co } -QString KTNEFPropertySet::findProp(int key, const QString& fallback, bool upper) +TQString KTNEFPropertySet::findProp(int key, const TQString& fallback, bool upper) { - QMap::Iterator it = properties_.find( key ); + TQMap::Iterator it = properties_.find( key ); if( properties_.end() != it ) return upper ? KTNEFProperty::formatValue( (*it)->value(), false ).upper() : KTNEFProperty::formatValue( (*it)->value(), false ); @@ -54,23 +54,23 @@ QString KTNEFPropertySet::findProp(int key, const QString& fallback, bool upper) } -QString KTNEFPropertySet::findNamedProp(const QString& name, const QString& fallback, bool upper) +TQString KTNEFPropertySet::findNamedProp(const TQString& name, const TQString& fallback, bool upper) { - for ( QMap::Iterator it = properties_.begin(); + for ( TQMap::Iterator it = properties_.begin(); it != properties_.end(); ++it ){ if ( (*it)->name().isValid() ){ - QString s; - if ( (*it)->name().type() == QVariant::String ) + TQString s; + if ( (*it)->name().type() == TQVariant::String ) s = (*it)->name().asString(); else - s = QString().sprintf( "0X%04X", (*it)->name().asUInt() ); + s = TQString().sprintf( "0X%04X", (*it)->name().asUInt() ); if( s.upper() == name.upper() ){ - QVariant value = ( *it )->value(); - if( value.type() == QVariant::List ){ + TQVariant value = ( *it )->value(); + if( value.type() == TQVariant::List ){ s = ""; - for ( QValueList::ConstIterator lit = value.listBegin(); + for ( TQValueList::ConstIterator lit = value.listBegin(); lit != value.listEnd(); ++lit ){ if( !s.isEmpty() ) @@ -88,21 +88,21 @@ QString KTNEFPropertySet::findNamedProp(const QString& name, const QString& fall } -QMap& KTNEFPropertySet::properties() +TQMap& KTNEFPropertySet::properties() { return properties_; } -const QMap& KTNEFPropertySet::properties() const +const TQMap& KTNEFPropertySet::properties() const { return properties_; } -QVariant KTNEFPropertySet::property( int key ) const +TQVariant KTNEFPropertySet::property( int key ) const { - QMap::ConstIterator it = properties_.find( key ); + TQMap::ConstIterator it = properties_.find( key ); if ( it == properties_.end() ) - return QVariant(); + return TQVariant(); else return ( *it )->value(); } @@ -111,18 +111,18 @@ void KTNEFPropertySet::clear( bool deleteAll ) { if ( deleteAll ) { - for ( QMap::ConstIterator it=properties_.begin(); it!=properties_.end(); ++it ) + for ( TQMap::ConstIterator it=properties_.begin(); it!=properties_.end(); ++it ) delete ( *it ); - for ( QMap::ConstIterator it=attributes_.begin(); it!=attributes_.end(); ++it ) + for ( TQMap::ConstIterator it=attributes_.begin(); it!=attributes_.end(); ++it ) delete ( *it ); } properties_.clear(); attributes_.clear(); } -void KTNEFPropertySet::addAttribute( int key, int type, const QVariant& value, bool overwrite ) +void KTNEFPropertySet::addAttribute( int key, int type, const TQVariant& value, bool overwrite ) { - QMap::ConstIterator it = attributes_.find( key ); + TQMap::ConstIterator it = attributes_.find( key ); if ( it != attributes_.end() ) { if ( overwrite ) @@ -130,25 +130,25 @@ void KTNEFPropertySet::addAttribute( int key, int type, const QVariant& value, b else return; } - KTNEFProperty *p = new KTNEFProperty( key, type, value, QVariant() ); + KTNEFProperty *p = new KTNEFProperty( key, type, value, TQVariant() ); attributes_[ p->key() ] = p; } -QMap& KTNEFPropertySet::attributes() +TQMap& KTNEFPropertySet::attributes() { return attributes_; } -const QMap& KTNEFPropertySet::attributes() const +const TQMap& KTNEFPropertySet::attributes() const { return attributes_; } -QVariant KTNEFPropertySet::attribute( int key ) const +TQVariant KTNEFPropertySet::attribute( int key ) const { - QMap::ConstIterator it = attributes_.find( key ); + TQMap::ConstIterator it = attributes_.find( key ); if ( it == attributes_.end() ) - return QVariant(); + return TQVariant(); else return ( *it )->value(); } -- cgit v1.2.3