summaryrefslogtreecommitdiffstats
path: root/ktnef/lib/ktnefparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ktnef/lib/ktnefparser.cpp')
-rw-r--r--ktnef/lib/ktnefparser.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/ktnef/lib/ktnefparser.cpp b/ktnef/lib/ktnefparser.cpp
index e97ec8128..a73a1d547 100644
--- a/ktnef/lib/ktnefparser.cpp
+++ b/ktnef/lib/ktnefparser.cpp
@@ -40,11 +40,11 @@
typedef struct {
- Q_UINT16 type;
- Q_UINT16 tag;
+ TQ_UINT16 type;
+ TQ_UINT16 tag;
TQVariant value;
struct {
- Q_UINT32 type;
+ TQ_UINT32 type;
TQVariant value;
} name;
} MAPI_value;
@@ -52,12 +52,12 @@ typedef struct {
void clearMAPIName( MAPI_value& mapi );
void clearMAPIValue(MAPI_value& mapi, bool clearName = true);
TQString readMAPIString( TQDataStream& stream, bool isUnicode = false, bool align = true, int len = -1 );
-Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi);
+TQ_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi);
TQDateTime readTNEFDate( TQDataStream& stream );
TQString readTNEFAddress( TQDataStream& stream );
-TQByteArray readTNEFData( TQDataStream& stream, Q_UINT32 len );
-TQVariant readTNEFAttribute( TQDataStream& stream, Q_UINT16 type, Q_UINT32 len );
-TQDateTime formatTime( Q_UINT32 lowB, Q_UINT32 highB );
+TQByteArray readTNEFData( TQDataStream& stream, TQ_UINT32 len );
+TQVariant readTNEFAttribute( TQDataStream& stream, TQ_UINT16 type, TQ_UINT32 len );
+TQDateTime formatTime( TQ_UINT32 lowB, TQ_UINT32 highB );
TQString formatRecipient( const TQMap<int,KTNEFProperty*>& props );
//------------------------------------------------------------------------------------
@@ -112,8 +112,8 @@ void KTNEFParser::deleteDevice()
bool KTNEFParser::decodeMessage()
{
- Q_UINT32 i1, i2, off;
- Q_UINT16 u, tag, type;
+ TQ_UINT32 i1, i2, off;
+ TQ_UINT16 u, tag, type;
TQVariant value;
// read (type+name)
@@ -187,8 +187,8 @@ bool KTNEFParser::decodeMessage()
break;
case attMSGSTATUS:
{
- Q_UINT8 c;
- Q_UINT32 flag = 0;
+ TQ_UINT8 c;
+ TQ_UINT32 flag = 0;
d->stream_ >> c;
if ( c & fmsRead ) flag |= MSGFLAG_READ;
if ( !( c & fmsModified ) ) flag |= MSGFLAG_UNMODIFIED;
@@ -202,7 +202,7 @@ bool KTNEFParser::decodeMessage()
break;
case attRECIPTABLE:
{
- Q_UINT32 rows;
+ TQ_UINT32 rows;
TQValueList<TQVariant> recipTable;
d->stream_ >> rows;
for ( uint i=0; i<rows; i++ )
@@ -254,8 +254,8 @@ bool KTNEFParser::decodeMessage()
bool KTNEFParser::decodeAttachment()
{
- Q_UINT32 i;
- Q_UINT16 tag, type, u;
+ TQ_UINT32 i;
+ TQ_UINT16 tag, type, u;
TQVariant value;
TQString str;
@@ -328,9 +328,9 @@ void KTNEFParser::setDefaultExtractDir(const TQString& dirname)
bool KTNEFParser::parseDevice()
{
- Q_UINT16 u;
- Q_UINT32 i;
- Q_UINT8 c;
+ TQ_UINT16 u;
+ TQ_UINT32 i;
+ TQ_UINT8 c;
d->message_->clearAttachments();
if (d->current_)
@@ -405,7 +405,7 @@ bool KTNEFParser::extractAttachmentTo(KTNEFAttach *att, const TQString& dirname)
if ( !outfile )
return false;
- Q_UINT32 len = att->size(), sz(16384);
+ TQ_UINT32 len = att->size(), sz(16384);
int n(0);
char *buf = new char[sz];
bool ok(true);
@@ -465,7 +465,7 @@ void KTNEFParser::checkCurrent( int key )
d->current_ = new KTNEFAttach();
else
{
- if ( d->current_->attributes().contains( key ) )
+ if ( d->current_->attributes().tqcontains( key ) )
{
if (d->current_->offset() >= 0 )
{
@@ -478,7 +478,7 @@ void KTNEFParser::checkCurrent( int key )
// and/or content (using at most 32 bytes)
KMimeType::Ptr mimetype;
if ( !d->current_->fileName().isEmpty() )
- mimetype = KMimeType::findByPath( d->current_->fileName(), 0, true );
+ mimetype = KMimeType::tqfindByPath( d->current_->fileName(), 0, true );
if (!mimetype) return; // FIXME
if ( mimetype->name() == "application/octet-stream" && d->current_->size() > 0 )
{
@@ -486,7 +486,7 @@ void KTNEFParser::checkCurrent( int key )
TQByteArray buffer( QMIN( 32, d->current_->size() ) );
d->device_->at( d->current_->offset() );
d->device_->readBlock( buffer.data(), buffer.size() );
- mimetype = KMimeType::findByContent( buffer );
+ mimetype = KMimeType::tqfindByContent( buffer );
d->device_->at( oldOffset );
}
d->current_->setMimeTag( mimetype->name() );
@@ -521,7 +521,7 @@ void clearMAPIValue(MAPI_value& mapi, bool clearName)
clearMAPIName( mapi );
}
-TQDateTime formatTime( Q_UINT32 lowB, Q_UINT32 highB )
+TQDateTime formatTime( TQ_UINT32 lowB, TQ_UINT32 highB )
{
TQDateTime dt;
#if ( SIZEOF_UINT64_T == 8 )
@@ -580,27 +580,27 @@ TQString formatRecipient( const TQMap<int,KTNEFProperty*>& props )
TQDateTime readTNEFDate( TQDataStream& stream )
{
// 14-bytes long
- Q_UINT16 y, m, d, hh, mm, ss, dm;
+ TQ_UINT16 y, m, d, hh, mm, ss, dm;
stream >> y >> m >> d >> hh >> mm >> ss >> dm;
return TQDateTime( TQDate( y, m, d ), TQTime( hh, mm, ss ) );
}
TQString readTNEFAddress( TQDataStream& stream )
{
- Q_UINT16 totalLen, strLen, addrLen;
+ TQ_UINT16 totalLen, strLen, addrLen;
TQString s;
stream >> totalLen >> totalLen >> strLen >> addrLen;
s.append( readMAPIString( stream, false, false, strLen ) );
s.append( " <" );
s.append( readMAPIString( stream, false, false, addrLen ) );
s.append( ">" );
- Q_UINT8 c;
+ TQ_UINT8 c;
for ( int i=8+strLen+addrLen; i<totalLen; i++ )
stream >> c;
return s;
}
-TQByteArray readTNEFData( TQDataStream& stream, Q_UINT32 len )
+TQByteArray readTNEFData( TQDataStream& stream, TQ_UINT32 len )
{
TQByteArray array( len );
if ( len > 0 )
@@ -608,7 +608,7 @@ TQByteArray readTNEFData( TQDataStream& stream, Q_UINT32 len )
return array;
}
-TQVariant readTNEFAttribute( TQDataStream& stream, Q_UINT16 type, Q_UINT32 len )
+TQVariant readTNEFAttribute( TQDataStream& stream, TQ_UINT16 type, TQ_UINT32 len )
{
switch ( type )
{
@@ -624,18 +624,18 @@ TQVariant readTNEFAttribute( TQDataStream& stream, Q_UINT16 type, Q_UINT32 len )
TQString readMAPIString( TQDataStream& stream, bool isUnicode, bool align, int len_ )
{
- Q_UINT32 len;
+ TQ_UINT32 len;
char *buf = 0;
if ( len_ == -1 )
stream >> len;
else
len = len_;
- Q_UINT32 fullLen = len;
+ TQ_UINT32 fullLen = len;
if ( align )
ALIGN( fullLen, 4 );
buf = new char[ len ];
stream.readRawBytes( buf, len );
- Q_UINT8 c;
+ TQ_UINT8 c;
for ( uint i=len; i<fullLen; i++ )
stream >> c;
TQString res;
@@ -647,9 +647,9 @@ TQString readMAPIString( TQDataStream& stream, bool isUnicode, bool align, int l
return res;
}
-Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
+TQ_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
{
- Q_UINT32 d;
+ TQ_UINT32 d;
clearMAPIValue(mapi);
stream >> d;
@@ -696,7 +696,7 @@ Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
break;
case MAPI_TYPE_TIME:
{
- Q_UINT32 lowB, highB;
+ TQ_UINT32 lowB, highB;
stream >> lowB >> highB;
value = formatTime( lowB, highB );
}
@@ -726,7 +726,7 @@ Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
for (uint i=0;i<d;i++)
{
value.clear();
- Q_UINT32 len;
+ TQ_UINT32 len;
stream >> len;
value = TQByteArray( len );
if (len > 0)
@@ -734,7 +734,7 @@ Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
int fullLen = len;
ALIGN(fullLen, 4);
stream.readRawBytes(value.asByteArray().data(), len);
- Q_UINT8 c;
+ TQ_UINT8 c;
for ( int i=len; i<fullLen; i++ )
stream >> c;
}
@@ -754,7 +754,7 @@ Q_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
bool KTNEFParser::readMAPIProperties( TQMap<int,KTNEFProperty*>& props, KTNEFAttach *attach )
{
- Q_UINT32 n;
+ TQ_UINT32 n;
MAPI_value mapi;
KTNEFProperty *p;
TQMap<int,KTNEFProperty*>::ConstIterator it;
@@ -792,7 +792,7 @@ bool KTNEFParser::readMAPIProperties( TQMap<int,KTNEFProperty*>& props, KTNEFAtt
int len = data.size();
ALIGN( len, 4 );
d->device_->at( d->device_->at()-len );
- Q_UINT32 interface_ID;
+ TQ_UINT32 interface_ID;
d->stream_ >> interface_ID;
if ( interface_ID == MAPI_IID_IMessage )
{