From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kbugbuster/backend/bugdetails.cpp | 70 +++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'kbugbuster/backend/bugdetails.cpp') diff --git a/kbugbuster/backend/bugdetails.cpp b/kbugbuster/backend/bugdetails.cpp index ec512d79..d1ce4666 100644 --- a/kbugbuster/backend/bugdetails.cpp +++ b/kbugbuster/backend/bugdetails.cpp @@ -2,11 +2,11 @@ #include "bugdetails.h" #include "bugdetailsimpl.h" -#include +#include #include #include #include -#include +#include BugDetails::BugDetails() { @@ -32,46 +32,46 @@ BugDetails::~BugDetails() { } -QString BugDetails::version() const +TQString BugDetails::version() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->version; } -QString BugDetails::source() const +TQString BugDetails::source() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->source; } -QString BugDetails::compiler() const +TQString BugDetails::compiler() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->compiler; } -QString BugDetails::os() const +TQString BugDetails::os() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->os; } -QDateTime BugDetails::submissionDate() const +TQDateTime BugDetails::submissionDate() const { - if ( !m_impl ) return QDateTime(); + if ( !m_impl ) return TQDateTime(); if ( m_impl->parts.count() > 0 ) { return m_impl->parts.last().date; } - return QDateTime(); + return TQDateTime(); } int BugDetails::age() const @@ -79,7 +79,7 @@ int BugDetails::age() const if ( !m_impl ) return 0; - return submissionDate().daysTo( QDateTime::currentDateTime() ); + return submissionDate().daysTo( TQDateTime::currentDateTime() ); } BugDetailsPart::List BugDetails::parts() const @@ -90,23 +90,23 @@ BugDetailsPart::List BugDetails::parts() const return m_impl->parts; } -QValueList BugDetails::attachmentDetails() const +TQValueList BugDetails::attachmentDetails() const { if ( m_impl ) return m_impl->attachments; else - return QValueList(); + return TQValueList(); } -void BugDetails::addAttachmentDetails( const QValueList& attch ) +void BugDetails::addAttachmentDetails( const TQValueList& attch ) { if ( m_impl ) m_impl->attachments = attch; } -QValueList BugDetails::extractAttachments() const +TQValueList BugDetails::extractAttachments() const { - QValueList lst; + TQValueList lst; if ( !m_impl ) return lst; BugDetailsPart::List parts = m_impl->parts; @@ -118,15 +118,15 @@ QValueList BugDetails::extractAttachments() const //#define DEBUG_EXTRACT -QValueList BugDetails::extractAttachments( const QString& text ) +TQValueList BugDetails::extractAttachments( const TQString& text ) { - QValueList lst; - QStringList lines = QStringList::split( '\n', text ); + TQValueList lst; + TQStringList lines = TQStringList::split( '\n', text ); #ifdef DEBUG_EXTRACT kdDebug() << k_funcinfo << lines.count() << " lines." << endl; #endif - QString boundary; - for ( QStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) + TQString boundary; + for ( TQStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) { #ifdef DEBUG_EXTRACT kdDebug() << "Line: " << *it << endl; @@ -137,9 +137,9 @@ QValueList BugDetails::extractAttachments( const QString //kdDebug() << "BugDetails::extractAttachments going back, looking for empty or boundary=" << boundary << endl; #endif // Rewind until last empty line - QStringList::Iterator rit = it; + TQStringList::Iterator rit = it; for ( ; rit != lines.begin() ; --rit ) { - QString line = *rit; + TQString line = *rit; if ( line.endsWith( "
" ) ) line = line.left( line.length() - 6 ); while ( !line.isEmpty() && line[0] == ' ' ) @@ -161,11 +161,11 @@ QValueList BugDetails::extractAttachments( const QString break; } // Forward until next empty line (end of headers) - and parse filename - QString filename; - QString encoding; + TQString filename; + TQString encoding; rit = it; for ( ; rit != lines.end() ; ++rit ) { - QString header = *rit; + TQString header = *rit; if ( header.endsWith( "
" ) ) header = header.left( header.length() - 6 ); if ( header[0] == ' ' ) @@ -182,7 +182,7 @@ QValueList BugDetails::extractAttachments( const QString #endif // Taken from libkdenetwork/kmime_headers.cpp int pos=header.find("filename=", 0, false); - QString fn; + TQString fn; if(pos>-1) { pos+=9; fn=header.mid(pos, header.length()-pos); @@ -212,10 +212,10 @@ QValueList BugDetails::extractAttachments( const QString if ( it == lines.end() ) break; // Read encoded contents - QString contents; + TQString contents; for ( ; it != lines.end() ; ++it ) { - QString line = *it; + TQString line = *it; if ( line.endsWith( "" ) ) line = line.left( line.length() - 5 ); if ( line.endsWith( "
" ) ) // necessary for the boundary check @@ -226,12 +226,12 @@ QValueList BugDetails::extractAttachments( const QString break; if ( line == boundary+"--" ) // end of last attachment { - boundary = QString::null; + boundary = TQString::null; break; } contents += line; // no newline, because of linebreaking between
} - contents = contents.replace( QRegExp("
"), QString::null ); + contents = contents.replace( TQRegExp("
"), TQString::null ); #ifdef DEBUG_EXTRACT kdDebug() << "BugDetails::extractAttachments contents=***\n" << contents << "\n***" << endl; #endif @@ -243,7 +243,7 @@ QValueList BugDetails::extractAttachments( const QString //KCodecs::uudecode( contents.local8Bit(), a.contents /*out*/ ); KMessageBox::information( 0, i18n("Attachment %1 could not be decoded.\nEncoding: %2").arg(filename).arg(encoding) ); #ifdef DEBUG_EXTRACT - kdDebug() << "Result: ***\n" << QCString( a.contents.data(), a.contents.size()+1 ) << "\n*+*" << endl; + kdDebug() << "Result: ***\n" << TQCString( a.contents.data(), a.contents.size()+1 ) << "\n*+*" << endl; #endif a.filename = filename; lst.append(a); -- cgit v1.2.1