summaryrefslogtreecommitdiffstats
path: root/kbugbuster/backend/bugdetails.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbugbuster/backend/bugdetails.cpp')
-rw-r--r--kbugbuster/backend/bugdetails.cpp70
1 files changed, 35 insertions, 35 deletions
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 <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kmdcodec.h>
#include <kmessagebox.h>
-#include <qregexp.h>
+#include <tqregexp.h>
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<BugDetailsImpl::AttachmentDetails> BugDetails::attachmentDetails() const
+TQValueList<BugDetailsImpl::AttachmentDetails> BugDetails::attachmentDetails() const
{
if ( m_impl )
return m_impl->attachments;
else
- return QValueList<BugDetailsImpl::AttachmentDetails>();
+ return TQValueList<BugDetailsImpl::AttachmentDetails>();
}
-void BugDetails::addAttachmentDetails( const QValueList<BugDetailsImpl::AttachmentDetails>& attch )
+void BugDetails::addAttachmentDetails( const TQValueList<BugDetailsImpl::AttachmentDetails>& attch )
{
if ( m_impl )
m_impl->attachments = attch;
}
-QValueList<BugDetails::Attachment> BugDetails::extractAttachments() const
+TQValueList<BugDetails::Attachment> BugDetails::extractAttachments() const
{
- QValueList<BugDetails::Attachment> lst;
+ TQValueList<BugDetails::Attachment> lst;
if ( !m_impl )
return lst;
BugDetailsPart::List parts = m_impl->parts;
@@ -118,15 +118,15 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments() const
//#define DEBUG_EXTRACT
-QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString& text )
+TQValueList<BugDetails::Attachment> BugDetails::extractAttachments( const TQString& text )
{
- QValueList<BugDetails::Attachment> lst;
- QStringList lines = QStringList::split( '\n', text );
+ TQValueList<BugDetails::Attachment> 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::Attachment> 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( "<br />" ) )
line = line.left( line.length() - 6 );
while ( !line.isEmpty() && line[0] == ' ' )
@@ -161,11 +161,11 @@ QValueList<BugDetails::Attachment> 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( "<br />" ) )
header = header.left( header.length() - 6 );
if ( header[0] == ' ' )
@@ -182,7 +182,7 @@ QValueList<BugDetails::Attachment> 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::Attachment> 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( "</tt>" ) )
line = line.left( line.length() - 5 );
if ( line.endsWith( "<br />" ) ) // necessary for the boundary check
@@ -226,12 +226,12 @@ QValueList<BugDetails::Attachment> 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 <br and />
}
- contents = contents.replace( QRegExp("<br */>"), QString::null );
+ contents = contents.replace( TQRegExp("<br */>"), TQString::null );
#ifdef DEBUG_EXTRACT
kdDebug() << "BugDetails::extractAttachments contents=***\n" << contents << "\n***" << endl;
#endif
@@ -243,7 +243,7 @@ QValueList<BugDetails::Attachment> 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);