diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kbugbuster/backend | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbugbuster/backend')
47 files changed, 801 insertions, 801 deletions
diff --git a/kbugbuster/backend/bug.cpp b/kbugbuster/backend/bug.cpp index 4523652e..aaa61273 100644 --- a/kbugbuster/backend/bug.cpp +++ b/kbugbuster/backend/bug.cpp @@ -21,9 +21,9 @@ Bug::Bug( const Bug &other ) (*this) = other; } -Bug Bug::fromNumber( const QString &bugNumber ) +Bug Bug::fromNumber( const TQString &bugNumber ) { - return new BugImpl( QString::null, Person(), bugNumber, 0xFFFFFFFF, Normal, Person(), + return new BugImpl( TQString::null, Person(), bugNumber, 0xFFFFFFFF, Normal, Person(), Unconfirmed, Bug::BugMergeList() ); } @@ -37,7 +37,7 @@ Bug::~Bug() { } -QString Bug::severityLabel( Bug::Severity s ) +TQString Bug::severityLabel( Bug::Severity s ) { switch ( s ) { @@ -53,23 +53,23 @@ QString Bug::severityLabel( Bug::Severity s ) } } -QString Bug::severityToString( Bug::Severity s ) +TQString Bug::severityToString( Bug::Severity s ) { switch ( s ) { - case Critical: return QString::fromLatin1( "critical" ); - case Grave: return QString::fromLatin1( "grave" ); - case Major: return QString::fromLatin1( "major" ); - case Crash: return QString::fromLatin1( "crash" ); - case Normal: return QString::fromLatin1( "normal" ); - case Minor: return QString::fromLatin1( "minor" ); - case Wishlist: return QString::fromLatin1( "wishlist" ); + case Critical: return TQString::fromLatin1( "critical" ); + case Grave: return TQString::fromLatin1( "grave" ); + case Major: return TQString::fromLatin1( "major" ); + case Crash: return TQString::fromLatin1( "crash" ); + case Normal: return TQString::fromLatin1( "normal" ); + case Minor: return TQString::fromLatin1( "minor" ); + case Wishlist: return TQString::fromLatin1( "wishlist" ); default: kdWarning() << "Bug::severityToString invalid severity " << s << endl; - return QString::fromLatin1( "<invalid>" ); + return TQString::fromLatin1( "<invalid>" ); } } -Bug::Severity Bug::stringToSeverity( const QString &s, bool *ok ) +Bug::Severity Bug::stringToSeverity( const TQString &s, bool *ok ) { if ( ok ) *ok = true; @@ -88,14 +88,14 @@ Bug::Severity Bug::stringToSeverity( const QString &s, bool *ok ) return SeverityUndefined; } -QValueList<Bug::Severity> Bug::severities() +TQValueList<Bug::Severity> Bug::severities() { - QValueList<Severity> s; + TQValueList<Severity> s; s << Critical << Grave << Major << Crash << Normal << Minor << Wishlist; return s; } -QString Bug::statusLabel( Bug::Status s ) +TQString Bug::statusLabel( Bug::Status s ) { switch ( s ) { @@ -109,21 +109,21 @@ QString Bug::statusLabel( Bug::Status s ) } } -QString Bug::statusToString( Bug::Status s ) +TQString Bug::statusToString( Bug::Status s ) { switch ( s ) { - case Unconfirmed: return QString::fromLatin1( "unconfirmed" ); - case New: return QString::fromLatin1( "new" ); - case Assigned: return QString::fromLatin1( "assigned" ); - case Reopened: return QString::fromLatin1( "reopened" ); - case Closed: return QString::fromLatin1( "closed" ); + case Unconfirmed: return TQString::fromLatin1( "unconfirmed" ); + case New: return TQString::fromLatin1( "new" ); + case Assigned: return TQString::fromLatin1( "assigned" ); + case Reopened: return TQString::fromLatin1( "reopened" ); + case Closed: return TQString::fromLatin1( "closed" ); default: kdWarning() << "Bug::statusToString invalid status " << s << endl; - return QString::fromLatin1( "<invalid>" ); + return TQString::fromLatin1( "<invalid>" ); } } -Bug::Status Bug::stringToStatus( const QString &s, bool *ok ) +Bug::Status Bug::stringToStatus( const TQString &s, bool *ok ) { if ( ok ) *ok = true; @@ -140,15 +140,15 @@ Bug::Status Bug::stringToStatus( const QString &s, bool *ok ) return StatusUndefined; } -QString Bug::title() const +TQString Bug::title() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->title; } -void Bug::setTitle( QString title) +void Bug::setTitle( TQString title) { if ( m_impl ) m_impl->title = title; @@ -171,15 +171,15 @@ void Bug::setAge( uint age ) struct Person Bug::submitter() const { if ( !m_impl ) - return Person( QString::null, QString::null ); + return Person( TQString::null, TQString::null ); return m_impl->submitter; } -QString Bug::number() const +TQString Bug::number() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->number; } @@ -215,14 +215,14 @@ Bug::Status Bug::status() const return m_impl->status; } -QString Bug::severityAsString() const +TQString Bug::severityAsString() const { return severityToString( severity() ); } Person Bug::developerTODO() const { - return (m_impl == NULL) ? Person( QString::null, QString::null ) : + return (m_impl == NULL) ? Person( TQString::null, TQString::null ) : m_impl->developerTODO; } diff --git a/kbugbuster/backend/bug.h b/kbugbuster/backend/bug.h index 9a5ae8b6..406179c8 100644 --- a/kbugbuster/backend/bug.h +++ b/kbugbuster/backend/bug.h @@ -3,7 +3,7 @@ #include "person.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <ksharedptr.h> @@ -12,8 +12,8 @@ class BugImpl; class Bug { public: - typedef QValueList<Bug> List; - typedef QValueList<int> BugMergeList; + typedef TQValueList<Bug> List; + typedef TQValueList<int> BugMergeList; enum Severity { SeverityUndefined, Critical, Grave, Major, Crash, Normal, Minor, Wishlist }; @@ -26,30 +26,30 @@ public: Bug &operator=( const Bug &rhs ); ~Bug(); - static QString severityLabel( Severity s ); + static TQString severityLabel( Severity s ); /** Return string representation of severity. This function is symmetric to stringToSeverity(). */ - static QString severityToString( Severity s ); + static TQString severityToString( Severity s ); /** Return severity code of string representation. This function is symmetric to severityToString(). */ - static Severity stringToSeverity( const QString &, bool *ok = 0 ); + static Severity stringToSeverity( const TQString &, bool *ok = 0 ); - static QValueList<Severity> severities(); + static TQValueList<Severity> severities(); uint age() const; void setAge( uint days ); - QString title() const; - void setTitle( QString title ); + TQString title() const; + void setTitle( TQString title ); Person submitter() const; - QString number() const; + TQString number() const; Severity severity() const; void setSeverity( Severity severity ); - QString severityAsString() const; + TQString severityAsString() const; Person developerTODO() const; BugMergeList mergedWith() const; @@ -61,24 +61,24 @@ public: Status status() const; void setStatus( Status newStatus ); - static QString statusLabel( Status s ); + static TQString statusLabel( Status s ); /** Return string representation of status. This function is symmetric to stringToStatus(). */ - static QString statusToString( Status s ); + static TQString statusToString( Status s ); /** Return status code of string representation. This function is symmetric to statusToString(). */ - static Status stringToStatus( const QString &, bool *ok = 0 ); + static Status stringToStatus( const TQString &, bool *ok = 0 ); bool operator==( const Bug &rhs ); bool operator<( const Bug &rhs ) const; bool isNull() const { return m_impl == 0; } - static Bug fromNumber( const QString &bugNumber ); + static Bug fromNumber( const TQString &bugNumber ); private: BugImpl *impl() const { return m_impl; } diff --git a/kbugbuster/backend/bugcache.cpp b/kbugbuster/backend/bugcache.cpp index 0eb44c8c..a6ef25df 100644 --- a/kbugbuster/backend/bugcache.cpp +++ b/kbugbuster/backend/bugcache.cpp @@ -1,7 +1,7 @@ // (C) 2001, Cornelius Schumacher -#include <qstringlist.h> -#include <qfile.h> +#include <tqstringlist.h> +#include <tqfile.h> #include <ksimpleconfig.h> #include <kstandarddirs.h> @@ -14,7 +14,7 @@ #include "bugcache.h" -BugCache::BugCache( const QString &id ) +BugCache::BugCache( const TQString &id ) { mId = id; @@ -55,18 +55,18 @@ Package::List BugCache::loadPackageList() { Package::List pkgs; - QStringList packages = m_cachePackages->groupList(); - QStringList::ConstIterator it; + TQStringList packages = m_cachePackages->groupList(); + TQStringList::ConstIterator it; for( it = packages.begin(); it != packages.end(); ++it ) { if ((*it) == "<default>") continue; if ((*it).contains("/")) continue; m_cachePackages->setGroup(*it); - QString description = m_cachePackages->readEntry("description"); + TQString description = m_cachePackages->readEntry("description"); int numberOfBugs = m_cachePackages->readNumEntry("numberOfBugs"); Person maintainer = readPerson( m_cachePackages, "Maintainer"); - QStringList components = m_cachePackages->readListEntry("components"); + TQStringList components = m_cachePackages->readListEntry("components"); pkgs.append( Package( new PackageImpl( (*it), description, numberOfBugs, maintainer, components ) ) ); @@ -78,21 +78,21 @@ Package::List BugCache::loadPackageList() void BugCache::invalidatePackageList() { // Completely wipe out packages.cache - QStringList packages = m_cachePackages->groupList(); - QStringList::ConstIterator it; + TQStringList packages = m_cachePackages->groupList(); + TQStringList::ConstIterator it; for( it = packages.begin(); it != packages.end(); ++it ) { if ((*it) == "<default>") continue; m_cachePackages->deleteGroup(*it, true); } } -void BugCache::saveBugList( const Package &pkg, const QString &component, const Bug::List &bugs ) +void BugCache::saveBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ) { - QStringList bugList; + TQStringList bugList; Bug::List::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { - QString number = (*it).number(); + TQString number = (*it).number(); bugList.append( number ); m_cacheBugs->setGroup( number ); m_cacheBugs->writeEntry( "Title", (*it).title() ); @@ -113,7 +113,7 @@ void BugCache::saveBugList( const Package &pkg, const QString &component, const m_cachePackages->writeEntry( "bugList", bugList ); } -Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, bool disconnected ) +Bug::List BugCache::loadBugList( const Package &pkg, const TQString &component, bool disconnected ) { // kdDebug() << "Loading bug list for " << pkg.name() << endl; @@ -124,16 +124,16 @@ Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, b else m_cachePackages->setGroup( pkg.name() + "/" + component ); - QStringList bugs = m_cachePackages->readListEntry( "bugList" ); + TQStringList bugs = m_cachePackages->readListEntry( "bugList" ); // kdDebug() << " Bugs: " << (bugs.join(",")) << endl; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { if ( m_cacheBugs->hasGroup(*it) ) { m_cacheBugs->setGroup(*it); - QString title = m_cacheBugs->readEntry("Title"); + TQString title = m_cacheBugs->readEntry("Title"); if ( !title.isEmpty() ) // dunno how I ended up with an all empty bug in the cache { Person submitter = readPerson( m_cacheBugs, "Submitter" ); @@ -158,7 +158,7 @@ Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, b return bugList; } -void BugCache::invalidateBugList( const Package& pkg, const QString &component ) +void BugCache::invalidateBugList( const Package& pkg, const TQString &component ) { kdDebug() << "BugCache::invalidateBugList " << pkg.name() << " (" << component << ")" << endl; @@ -167,12 +167,12 @@ void BugCache::invalidateBugList( const Package& pkg, const QString &component ) if ( component.isEmpty() ) { m_cachePackages->setGroup( pkg.name() ); } else { - QString key = pkg.name() + "/" + component; + TQString key = pkg.name() + "/" + component; m_cachePackages->setGroup( key ); m_cachePackages->setGroup( pkg.name() + "/" + component ); } - m_cachePackages->writeEntry("bugList",QString::null); + m_cachePackages->writeEntry("bugList",TQString::null); } void BugCache::saveBugDetails( const Bug &bug, const BugDetails &details ) @@ -184,9 +184,9 @@ void BugCache::saveBugDetails( const Bug &bug, const BugDetails &details ) m_cacheBugs->writeEntry( "Compiler", details.compiler() ); m_cacheBugs->writeEntry( "OS", details.os() ); - QStringList senders; - QStringList texts; - QStringList dates; + TQStringList senders; + TQStringList texts; + TQStringList dates; BugDetailsPart::List parts = details.parts(); BugDetailsPart::List::ConstIterator it; @@ -220,15 +220,15 @@ BugDetails BugCache::loadBugDetails( const Bug &bug ) BugDetailsPart::List parts; - QStringList texts = m_cacheBugs->readListEntry( "Details" ); - QStringList senders = m_cacheBugs->readListEntry( "Senders" ); - QStringList dates = m_cacheBugs->readListEntry( "Dates" ); + TQStringList texts = m_cacheBugs->readListEntry( "Details" ); + TQStringList senders = m_cacheBugs->readListEntry( "Senders" ); + TQStringList dates = m_cacheBugs->readListEntry( "Dates" ); - QStringList::ConstIterator itTexts = texts.begin(); - QStringList::ConstIterator itSenders = senders.begin(); - QStringList::ConstIterator itDates = dates.begin(); + TQStringList::ConstIterator itTexts = texts.begin(); + TQStringList::ConstIterator itSenders = senders.begin(); + TQStringList::ConstIterator itDates = dates.begin(); while( itTexts != texts.end() ) { - QDateTime date = QDateTime::fromString( *itDates, Qt::ISODate ); + TQDateTime date = TQDateTime::fromString( *itDates, Qt::ISODate ); parts.append( BugDetailsPart( Person(*itSenders), date, *itTexts ) ); ++itTexts; @@ -240,10 +240,10 @@ BugDetails BugCache::loadBugDetails( const Bug &bug ) return BugDetails(); } - QString version = m_cacheBugs->readEntry( "Version" ); - QString source = m_cacheBugs->readEntry( "Source" ); - QString compiler = m_cacheBugs->readEntry( "Compiler" ); - QString os = m_cacheBugs->readEntry( "OS" ); + TQString version = m_cacheBugs->readEntry( "Version" ); + TQString source = m_cacheBugs->readEntry( "Source" ); + TQString compiler = m_cacheBugs->readEntry( "Compiler" ); + TQString os = m_cacheBugs->readEntry( "OS" ); return BugDetails( new BugDetailsImpl( version, source, compiler, os, parts ) ); @@ -259,28 +259,28 @@ void BugCache::clear() delete m_cachePackages; delete m_cacheBugs; - QFile f1( mCachePackagesFileName ); + TQFile f1( mCachePackagesFileName ); f1.remove(); - QFile f2( mCacheBugsFileName ); + TQFile f2( mCacheBugsFileName ); f2.remove(); init(); } -void BugCache::writePerson( KSimpleConfig *file, const QString &key, +void BugCache::writePerson( KSimpleConfig *file, const TQString &key, const Person &p ) { - QStringList values; + TQStringList values; values.append(p.name); values.append(p.email); file->writeEntry( key, values ); } -struct Person BugCache::readPerson( KSimpleConfig *file, const QString &key ) +struct Person BugCache::readPerson( KSimpleConfig *file, const TQString &key ) { struct Person p; - QStringList values = file->readListEntry(key); + TQStringList values = file->readListEntry(key); if ( values.count() > 0 ) p.name = values[0]; if ( values.count() > 1 ) diff --git a/kbugbuster/backend/bugcache.h b/kbugbuster/backend/bugcache.h index af1aed11..bef22493 100644 --- a/kbugbuster/backend/bugcache.h +++ b/kbugbuster/backend/bugcache.h @@ -10,16 +10,16 @@ class KSimpleConfig; class BugCache { public: - BugCache( const QString &id ); + BugCache( const TQString &id ); ~BugCache(); void savePackageList( const Package::List &pkgs ); Package::List loadPackageList(); void invalidatePackageList(); - void saveBugList( const Package &pkg, const QString &component, const Bug::List & ); - Bug::List loadBugList( const Package &pkg, const QString &component, bool disconnected ); - void invalidateBugList( const Package &pkg, const QString &component ); + void saveBugList( const Package &pkg, const TQString &component, const Bug::List & ); + Bug::List loadBugList( const Package &pkg, const TQString &component, bool disconnected ); + void invalidateBugList( const Package &pkg, const TQString &component ); void saveBugDetails( const Bug &bug, const BugDetails & ); BugDetails loadBugDetails( const Bug &bug ); @@ -31,17 +31,17 @@ class BugCache private: void init(); - void writePerson( KSimpleConfig *file, const QString &key, + void writePerson( KSimpleConfig *file, const TQString &key, const Person &p ); - struct Person readPerson (KSimpleConfig *file, const QString &key ); + struct Person readPerson (KSimpleConfig *file, const TQString &key ); - QString mId; + TQString mId; KSimpleConfig *m_cachePackages; KSimpleConfig *m_cacheBugs; - QString mCachePackagesFileName; - QString mCacheBugsFileName; + TQString mCachePackagesFileName; + TQString mCacheBugsFileName; }; #endif diff --git a/kbugbuster/backend/bugcommand.cpp b/kbugbuster/backend/bugcommand.cpp index 332c937d..ab61afae 100644 --- a/kbugbuster/backend/bugcommand.cpp +++ b/kbugbuster/backend/bugcommand.cpp @@ -4,19 +4,19 @@ #include "bugcommand.h" -QString BugCommand::name() +TQString BugCommand::name() { return i18n("Unknown"); } -QString BugCommand::details() +TQString BugCommand::details() { - return QString::null; + return TQString::null; } -BugCommand *BugCommand::load( KConfig *config, const QString &type ) +BugCommand *BugCommand::load( KConfig *config, const TQString &type ) { - QString bugNumber = config->group(); + TQString bugNumber = config->group(); // ### this sucks. we better let Bug implement proper persistance, // because this way of instantiating a bug object doesn't bring back // properties like title, package, etc. (Simon) @@ -40,7 +40,7 @@ BugCommand *BugCommand::load( KConfig *config, const QString &type ) } else if ( type == "Reply" ) { return new BugCommandReply( bug, config->readEntry( type ), config->readNumEntry("Recipient",Normal) ); } else if ( type == "ReplyPrivate" ) { - QStringList args = config->readListEntry( type ); + TQStringList args = config->readListEntry( type ); if ( args.count() != 2 ) return 0; return new BugCommandReplyPrivate( bug, *(args.at(0)), *(args.at(1)) ); } else { @@ -51,41 +51,41 @@ BugCommand *BugCommand::load( KConfig *config, const QString &type ) ///////////////////// Close ///////////////////// -QString BugCommandClose::controlString() const +TQString BugCommandClose::controlString() const { if (m_message.isEmpty()) { return "close " + m_bug.number(); } else { - return QString::null; + return TQString::null; } } -QString BugCommandClose::mailAddress() const +TQString BugCommandClose::mailAddress() const { kdDebug() << "BugCommandClose::mailAddress(): number: " << m_bug.number() << endl; if (m_message.isEmpty()) { - return QString::null; + return TQString::null; } else { return m_bug.number() + "-done@bugs.kde.org"; } } -QString BugCommandClose::mailText() const +TQString BugCommandClose::mailText() const { if (m_message.isEmpty()) { - return QString::null; + return TQString::null; } else { return m_message; } } -QString BugCommandClose::name() +TQString BugCommandClose::name() { return i18n("Close"); } -QString BugCommandClose::details() const +TQString BugCommandClose::details() const { return m_message; } @@ -97,12 +97,12 @@ void BugCommandClose::save( KConfig *config ) ///////////////////// Close Silently ///////////////////// -QString BugCommandCloseSilently::controlString() const +TQString BugCommandCloseSilently::controlString() const { return "done " + m_bug.number(); } -QString BugCommandCloseSilently::name() +TQString BugCommandCloseSilently::name() { return i18n("Close Silently"); } @@ -114,12 +114,12 @@ void BugCommandCloseSilently::save( KConfig *config ) ///////////////////// Reopen ///////////////////// -QString BugCommandReopen::controlString() const +TQString BugCommandReopen::controlString() const { return "reopen " + m_bug.number(); } -QString BugCommandReopen::name() +TQString BugCommandReopen::name() { return i18n("Reopen"); } @@ -131,17 +131,17 @@ void BugCommandReopen::save( KConfig *config ) ///////////////////// Retitle ///////////////////// -QString BugCommandRetitle::controlString() const +TQString BugCommandRetitle::controlString() const { return "retitle " + m_bug.number() + " " + m_title; } -QString BugCommandRetitle::name() +TQString BugCommandRetitle::name() { return i18n("Retitle"); } -QString BugCommandRetitle::details() const +TQString BugCommandRetitle::details() const { return m_title; } @@ -153,17 +153,17 @@ void BugCommandRetitle::save( KConfig *config ) ///////////////////// Merge ///////////////////// -QString BugCommandMerge::controlString() const +TQString BugCommandMerge::controlString() const { return "merge " + m_bugNumbers.join(" "); } -QString BugCommandMerge::name() +TQString BugCommandMerge::name() { return i18n("Merge"); } -QString BugCommandMerge::details() const +TQString BugCommandMerge::details() const { return m_bugNumbers.join(", "); } @@ -175,12 +175,12 @@ void BugCommandMerge::save( KConfig *config ) ///////////////////// Unmerge ///////////////////// -QString BugCommandUnmerge::controlString() const +TQString BugCommandUnmerge::controlString() const { return "unmerge " + m_bug.number(); } -QString BugCommandUnmerge::name() +TQString BugCommandUnmerge::name() { return i18n("Unmerge"); } @@ -192,7 +192,7 @@ void BugCommandUnmerge::save( KConfig *config ) ///////////////////// Reply ///////////////////// -QString BugCommandReply::mailAddress() const +TQString BugCommandReply::mailAddress() const { return m_bug.number() + "@bugs.kde.org"; #if 0 @@ -204,16 +204,16 @@ QString BugCommandReply::mailAddress() const case Quiet: return m_bug.number() + "-quiet@bugs.kde.org"; } - return QString::null; + return TQString::null; #endif } -QString BugCommandReply::mailText() const +TQString BugCommandReply::mailText() const { return m_message; } -QString BugCommandReply::name() +TQString BugCommandReply::name() { return i18n("Reply"); #if 0 @@ -225,11 +225,11 @@ QString BugCommandReply::name() case Quiet: return i18n("Reply (Quiet)"); } - return QString::null; + return TQString::null; #endif } -QString BugCommandReply::details() const +TQString BugCommandReply::details() const { return m_message; } @@ -244,29 +244,29 @@ void BugCommandReply::save( KConfig *config ) ///////////////////// Reply Private ///////////////////// -QString BugCommandReplyPrivate::mailAddress() const +TQString BugCommandReplyPrivate::mailAddress() const { return m_address; } -QString BugCommandReplyPrivate::mailText() const +TQString BugCommandReplyPrivate::mailText() const { return m_message; } -QString BugCommandReplyPrivate::name() +TQString BugCommandReplyPrivate::name() { return i18n("Private Reply"); } -QString BugCommandReplyPrivate::details() const +TQString BugCommandReplyPrivate::details() const { return m_message; } void BugCommandReplyPrivate::save( KConfig *config ) { - QStringList args; + TQStringList args; args << m_address; args << m_message; config->writeEntry( "ReplyPrivate", args ); @@ -274,17 +274,17 @@ void BugCommandReplyPrivate::save( KConfig *config ) ///////////////////// Severity ///////////////////// -QString BugCommandSeverity::controlString() const +TQString BugCommandSeverity::controlString() const { return "severity " + m_bug.number() + " " + m_severity.lower(); } -QString BugCommandSeverity::name() +TQString BugCommandSeverity::name() { return i18n("Severity"); } -QString BugCommandSeverity::details() const +TQString BugCommandSeverity::details() const { return m_severity; } @@ -296,17 +296,17 @@ void BugCommandSeverity::save( KConfig *config ) ///////////////////// Reassign ///////////////////// -QString BugCommandReassign::controlString() const +TQString BugCommandReassign::controlString() const { return "reassign " + m_bug.number() + " " + m_package; } -QString BugCommandReassign::name() +TQString BugCommandReassign::name() { return i18n("Reassign"); } -QString BugCommandReassign::details() const +TQString BugCommandReassign::details() const { return m_package; } diff --git a/kbugbuster/backend/bugcommand.h b/kbugbuster/backend/bugcommand.h index 96b9c85c..38b2513f 100644 --- a/kbugbuster/backend/bugcommand.h +++ b/kbugbuster/backend/bugcommand.h @@ -1,8 +1,8 @@ #ifndef BUGCOMMAND_H #define BUGCOMMAND_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include "bug.h" #include "package.h" @@ -18,21 +18,21 @@ class BugCommand { BugCommand( const Bug &bug, const Package &pkg ) : m_bug( bug ), m_package( pkg ) {} virtual ~BugCommand() {} - virtual QString controlString() const { return QString::null; } + virtual TQString controlString() const { return TQString::null; } - virtual QString mailAddress() const { return QString::null; } - virtual QString mailText() const { return QString::null; } + virtual TQString mailAddress() const { return TQString::null; } + virtual TQString mailText() const { return TQString::null; } Bug bug() const { return m_bug; } Package package() const { return m_package; } - virtual QString name(); - virtual QString details(); + virtual TQString name(); + virtual TQString details(); - virtual QString type() const { return QString::null; } + virtual TQString type() const { return TQString::null; } virtual void save( KConfig * ) = 0; - static BugCommand *load( KConfig *, const QString &type ); + static BugCommand *load( KConfig *, const TQString &type ); protected: Bug m_bug; @@ -41,22 +41,22 @@ class BugCommand { class BugCommandClose : public BugCommand { public: - BugCommandClose( const Bug &bug, const QString &message, const Package &pkg ) : + BugCommandClose( const Bug &bug, const TQString &message, const Package &pkg ) : BugCommand( bug, pkg ), m_message( message ) {} - QString controlString() const; - QString mailAddress() const; - QString mailText() const; + TQString controlString() const; + TQString mailAddress() const; + TQString mailText() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Close"); } + TQString type() const { return TQString::fromLatin1("Close"); } void save( KConfig * ); private: - QString m_message; + TQString m_message; }; class BugCommandCloseSilently : public BugCommand { @@ -64,11 +64,11 @@ class BugCommandCloseSilently : public BugCommand { BugCommandCloseSilently( const Bug &bug, const Package &pkg ) : BugCommand( bug, pkg ) {} - QString controlString() const; + TQString controlString() const; - QString name(); + TQString name(); - QString type() const { return QString::fromLatin1("CloseSilently"); } + TQString type() const { return TQString::fromLatin1("CloseSilently"); } void save( KConfig * ); }; @@ -78,49 +78,49 @@ class BugCommandReopen : public BugCommand { BugCommandReopen( const Bug &bug, const Package &pkg ) : BugCommand( bug, pkg ) {} - QString controlString() const; + TQString controlString() const; - QString name(); + TQString name(); - QString type() const { return QString::fromLatin1("Reopen"); } + TQString type() const { return TQString::fromLatin1("Reopen"); } void save( KConfig * ); }; class BugCommandRetitle : public BugCommand { public: - BugCommandRetitle( const Bug &bug, const QString &title, const Package &pkg ) : + BugCommandRetitle( const Bug &bug, const TQString &title, const Package &pkg ) : BugCommand( bug, pkg ), m_title( title ) {} - QString controlString() const; + TQString controlString() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Retitle"); } + TQString type() const { return TQString::fromLatin1("Retitle"); } void save( KConfig * ); private: - QString m_title; + TQString m_title; }; class BugCommandMerge : public BugCommand { public: - BugCommandMerge( const QStringList &bugNumbers, const Package &pkg ) : + BugCommandMerge( const TQStringList &bugNumbers, const Package &pkg ) : BugCommand( Bug(), pkg ), m_bugNumbers( bugNumbers ) {} - QString controlString() const; + TQString controlString() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Merge"); } + TQString type() const { return TQString::fromLatin1("Merge"); } void save( KConfig * ); private: - QStringList m_bugNumbers; + TQStringList m_bugNumbers; }; class BugCommandUnmerge : public BugCommand { @@ -128,90 +128,90 @@ class BugCommandUnmerge : public BugCommand { BugCommandUnmerge( const Bug &bug, const Package &pkg ) : BugCommand( bug, pkg ) {} - QString name(); + TQString name(); - QString type() const { return QString::fromLatin1("Unmerge"); } + TQString type() const { return TQString::fromLatin1("Unmerge"); } void save( KConfig * ); - QString controlString() const; + TQString controlString() const; }; class BugCommandReply : public BugCommand { public: - BugCommandReply( const Bug &bug, const QString &message, const int &recipient) : + BugCommandReply( const Bug &bug, const TQString &message, const int &recipient) : BugCommand( bug ), m_message( message ), m_recipient( recipient ) {} - QString mailAddress() const; - QString mailText() const; + TQString mailAddress() const; + TQString mailText() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Reply"); } + TQString type() const { return TQString::fromLatin1("Reply"); } void save( KConfig * ); private: - QString m_message; + TQString m_message; int m_recipient; }; class BugCommandReplyPrivate : public BugCommand { public: - BugCommandReplyPrivate( const Bug &bug, const QString &address, - const QString &message ) : + BugCommandReplyPrivate( const Bug &bug, const TQString &address, + const TQString &message ) : BugCommand( bug ), m_address( address ), m_message( message ) {} - QString mailAddress() const; - QString mailText() const; + TQString mailAddress() const; + TQString mailText() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("ReplyPrivate"); } + TQString type() const { return TQString::fromLatin1("ReplyPrivate"); } void save( KConfig * ); private: - QString m_address; - QString m_message; + TQString m_address; + TQString m_message; }; class BugCommandSeverity : public BugCommand { public: - BugCommandSeverity( const Bug &bug, const QString &severity, const Package &pkg ) : + BugCommandSeverity( const Bug &bug, const TQString &severity, const Package &pkg ) : BugCommand( bug, pkg ), m_severity( severity ) {} - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Severity"); } + TQString type() const { return TQString::fromLatin1("Severity"); } - QString controlString() const; + TQString controlString() const; void save( KConfig * ); private: - QString m_severity; + TQString m_severity; }; class BugCommandReassign : public BugCommand { public: - BugCommandReassign( const Bug &bug, const QString &package, const Package &pkg ) : + BugCommandReassign( const Bug &bug, const TQString &package, const Package &pkg ) : BugCommand( bug, pkg ), m_package( package ) {} - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Reassign"); } + TQString type() const { return TQString::fromLatin1("Reassign"); } - QString controlString() const; + TQString controlString() const; void save( KConfig * ); private: - QString m_package; + TQString m_package; }; #endif 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); diff --git a/kbugbuster/backend/bugdetails.h b/kbugbuster/backend/bugdetails.h index 08d20777..171847a7 100644 --- a/kbugbuster/backend/bugdetails.h +++ b/kbugbuster/backend/bugdetails.h @@ -5,7 +5,7 @@ #include "bugdetailspart.h" #include "bugdetailsimpl.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <ksharedptr.h> @@ -14,10 +14,10 @@ class BugDetailsImpl; class BugDetails { public: - typedef QValueList<BugDetails> List; + typedef TQValueList<BugDetails> List; struct Attachment { - QByteArray contents; - QString filename; + TQByteArray contents; + TQString filename; }; BugDetails(); @@ -26,17 +26,17 @@ public: BugDetails &operator=( const BugDetails &rhs ); ~BugDetails(); - QString version() const; - QString source() const; - QString compiler() const; - QString os() const; + TQString version() const; + TQString source() const; + TQString compiler() const; + TQString os() const; BugDetailsPart::List parts() const; - void addAttachmentDetails( const QValueList<BugDetailsImpl::AttachmentDetails>& attch ); - QValueList<BugDetailsImpl::AttachmentDetails> attachmentDetails() const; - QValueList<BugDetails::Attachment> extractAttachments() const; - static QValueList<BugDetails::Attachment> extractAttachments( const QString& text ); + void addAttachmentDetails( const TQValueList<BugDetailsImpl::AttachmentDetails>& attch ); + TQValueList<BugDetailsImpl::AttachmentDetails> attachmentDetails() const; + TQValueList<BugDetails::Attachment> extractAttachments() const; + static TQValueList<BugDetails::Attachment> extractAttachments( const TQString& text ); - QDateTime submissionDate() const; + TQDateTime submissionDate() const; int age() const; bool operator==( const BugDetails &rhs ); diff --git a/kbugbuster/backend/bugdetailsimpl.h b/kbugbuster/backend/bugdetailsimpl.h index df3e5d6d..5d6dc459 100644 --- a/kbugbuster/backend/bugdetailsimpl.h +++ b/kbugbuster/backend/bugdetailsimpl.h @@ -8,29 +8,29 @@ struct BugDetailsImpl : public KShared { public: - BugDetailsImpl( const QString &_version, const QString &_source, - const QString &_compiler, const QString &_os, + BugDetailsImpl( const TQString &_version, const TQString &_source, + const TQString &_compiler, const TQString &_os, const BugDetailsPart::List &_parts ) : version( _version ), source( _source ), compiler( _compiler ), os( _os ), parts( _parts ) {} struct AttachmentDetails { AttachmentDetails() { } - AttachmentDetails( const QString& descr, const QString& dt, - const QString& idf ) : description( descr ), + AttachmentDetails( const TQString& descr, const TQString& dt, + const TQString& idf ) : description( descr ), date( dt ), id( idf ) { } - QString description; - QString date; - QString id; + TQString description; + TQString date; + TQString id; }; - QString version; - QString source; - QString compiler; - QString os; + TQString version; + TQString source; + TQString compiler; + TQString os; BugDetailsPart::List parts; - QValueList<BugDetailsImpl::AttachmentDetails> attachments; + TQValueList<BugDetailsImpl::AttachmentDetails> attachments; }; #endif diff --git a/kbugbuster/backend/bugdetailsjob.cpp b/kbugbuster/backend/bugdetailsjob.cpp index 83599c1d..1218023d 100644 --- a/kbugbuster/backend/bugdetailsjob.cpp +++ b/kbugbuster/backend/bugdetailsjob.cpp @@ -29,7 +29,7 @@ void BugDetailsJob::start( const Bug &bug ) BugJob::start( bugUrl ); } -void BugDetailsJob::process( const QByteArray &data ) +void BugDetailsJob::process( const TQByteArray &data ) { BugDetails bugDetails; diff --git a/kbugbuster/backend/bugdetailsjob.h b/kbugbuster/backend/bugdetailsjob.h index e07ad3a2..5b6a8887 100644 --- a/kbugbuster/backend/bugdetailsjob.h +++ b/kbugbuster/backend/bugdetailsjob.h @@ -19,7 +19,7 @@ class BugDetailsJob : public BugJob void bugDetailsAvailable( const Bug &bug, const BugDetails &details ); protected: - virtual void process( const QByteArray &data ); + virtual void process( const TQByteArray &data ); private: Bug m_bug; diff --git a/kbugbuster/backend/bugdetailspart.h b/kbugbuster/backend/bugdetailspart.h index 483057c8..7e1cfe7b 100644 --- a/kbugbuster/backend/bugdetailspart.h +++ b/kbugbuster/backend/bugdetailspart.h @@ -1,21 +1,21 @@ #ifndef BUGDETAILSPART_H #define BUGDETAILSPART_H -#include <qvaluelist.h> -#include <qdatetime.h> +#include <tqvaluelist.h> +#include <tqdatetime.h> struct BugDetailsPart { - typedef QValueList<BugDetailsPart> List; + typedef TQValueList<BugDetailsPart> List; BugDetailsPart () {} - BugDetailsPart( const Person &_sender, const QDateTime &_date, - const QString &_text ) + BugDetailsPart( const Person &_sender, const TQDateTime &_date, + const TQString &_text ) : sender( _sender ), date( _date ), text( _text ) {} Person sender; - QDateTime date; - QString text; + TQDateTime date; + TQString text; }; #endif diff --git a/kbugbuster/backend/bugimpl.h b/kbugbuster/backend/bugimpl.h index 630105a1..7fefc53d 100644 --- a/kbugbuster/backend/bugimpl.h +++ b/kbugbuster/backend/bugimpl.h @@ -10,7 +10,7 @@ struct BugImpl : public KShared { public: - BugImpl( const QString &_title, const Person &_submitter, QString _number, + BugImpl( const TQString &_title, const Person &_submitter, TQString _number, uint _age, Bug::Severity _severity, Person _developerTODO, Bug::Status _status, const Bug::BugMergeList& _mergedWith ) : age( _age ), title( _title ), submitter( _submitter ), number( _number ), @@ -20,9 +20,9 @@ public: } uint age; - QString title; + TQString title; Person submitter; - QString number; + TQString number; Bug::Severity severity; Person developerTODO; Bug::Status status; diff --git a/kbugbuster/backend/bugjob.cpp b/kbugbuster/backend/bugjob.cpp index 6f32fb97..1d13913b 100644 --- a/kbugbuster/backend/bugjob.cpp +++ b/kbugbuster/backend/bugjob.cpp @@ -30,14 +30,14 @@ void BugJob::start( const KURL &url ) KIO::Job *job = KIO::get( url, true /*always 'reload=true', we have our own cache*/, false ); - connect( job, SIGNAL( result( KIO::Job * ) ), - this, SLOT( ioResult( KIO::Job * ) ) ); - connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - this, SLOT( ioData( KIO::Job *, const QByteArray & ) ) ); - connect( job, SIGNAL( infoMessage( KIO::Job *, const QString & ) ), - this, SLOT( ioInfoMessage( KIO::Job *, const QString & ) ) ); - connect( job, SIGNAL( percent( KIO::Job *, unsigned long ) ), - this, SLOT( ioInfoPercent( KIO::Job *, unsigned long ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( ioResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT( ioData( KIO::Job *, const TQByteArray & ) ) ); + connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString & ) ), + this, TQT_SLOT( ioInfoMessage( KIO::Job *, const TQString & ) ) ); + connect( job, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ), + this, TQT_SLOT( ioInfoPercent( KIO::Job *, unsigned long ) ) ); } void BugJob::ioResult( KIO::Job *job ) @@ -71,7 +71,7 @@ void BugJob::ioResult( KIO::Job *job ) delete this; } -void BugJob::ioData( KIO::Job *, const QByteArray &data ) +void BugJob::ioData( KIO::Job *, const TQByteArray &data ) { unsigned int start = m_data.size(); @@ -79,9 +79,9 @@ void BugJob::ioData( KIO::Job *, const QByteArray &data ) memcpy( m_data.data() + start, data.data(), data.size() ); } -void BugJob::ioInfoMessage( KIO::Job *, const QString &_text ) +void BugJob::ioInfoMessage( KIO::Job *, const TQString &_text ) { - QString text = _text; + TQString text = _text; emit infoMessage( text ); } diff --git a/kbugbuster/backend/bugjob.h b/kbugbuster/backend/bugjob.h index 2c439810..00ab7f8f 100644 --- a/kbugbuster/backend/bugjob.h +++ b/kbugbuster/backend/bugjob.h @@ -15,27 +15,27 @@ class BugJob : public KIO::Job BugServer *server() const { return mServer; } signals: - void infoMessage( const QString &text ); + void infoMessage( const TQString &text ); void infoPercent( unsigned long percent ); - void error( const QString &text ); + void error( const TQString &text ); void jobEnded( BugJob * ); protected: void start( const KURL &url /*, const KParts::URLArgs &args = KParts::URLArgs()*/ ); - virtual void process( const QByteArray &data ) = 0; + virtual void process( const TQByteArray &data ) = 0; private slots: void ioResult( KIO::Job *job ); - void ioData( KIO::Job *job, const QByteArray &data ); + void ioData( KIO::Job *job, const TQByteArray &data ); - void ioInfoMessage( KIO::Job *job, const QString &text ); + void ioInfoMessage( KIO::Job *job, const TQString &text ); void ioInfoPercent( KIO::Job *job, unsigned long percent ); private: - QByteArray m_data; + TQByteArray m_data; BugServer *mServer; }; diff --git a/kbugbuster/backend/buglistjob.cpp b/kbugbuster/backend/buglistjob.cpp index e1dea2f4..74fe5427 100644 --- a/kbugbuster/backend/buglistjob.cpp +++ b/kbugbuster/backend/buglistjob.cpp @@ -32,8 +32,8 @@ #include <kdebug.h> -#include <qbuffer.h> -#include <qregexp.h> +#include <tqbuffer.h> +#include <tqregexp.h> BugListJob::BugListJob( BugServer *server ) : BugJob( server ) @@ -44,7 +44,7 @@ BugListJob::~BugListJob() { } -void BugListJob::start( const Package &pkg, const QString &component ) +void BugListJob::start( const Package &pkg, const TQString &component ) { m_package = pkg; m_component = component; @@ -53,7 +53,7 @@ void BugListJob::start( const Package &pkg, const QString &component ) } -void BugListJob::process( const QByteArray &data ) +void BugListJob::process( const TQByteArray &data ) { Bug::List bugs; diff --git a/kbugbuster/backend/buglistjob.h b/kbugbuster/backend/buglistjob.h index 0260d3a0..4272325d 100644 --- a/kbugbuster/backend/buglistjob.h +++ b/kbugbuster/backend/buglistjob.h @@ -28,7 +28,7 @@ #include "package.h" #include "bug.h" -#include <qdom.h> +#include <tqdom.h> class BugListJob : public BugJob { @@ -37,17 +37,17 @@ class BugListJob : public BugJob BugListJob( BugServer * ); virtual ~BugListJob(); - void start( const Package &pkg, const QString &component ); + void start( const Package &pkg, const TQString &component ); protected: - void process( const QByteArray &data ); + void process( const TQByteArray &data ); signals: - void bugListAvailable( const Package &pkg, const QString &component, const Bug::List &bugs ); + void bugListAvailable( const Package &pkg, const TQString &component, const Bug::List &bugs ); protected: Package m_package; - QString m_component; + TQString m_component; }; diff --git a/kbugbuster/backend/bugmybugsjob.cpp b/kbugbuster/backend/bugmybugsjob.cpp index 92aa4448..87767a5b 100644 --- a/kbugbuster/backend/bugmybugsjob.cpp +++ b/kbugbuster/backend/bugmybugsjob.cpp @@ -33,8 +33,8 @@ #include <kdebug.h> -#include <qbuffer.h> -#include <qregexp.h> +#include <tqbuffer.h> +#include <tqregexp.h> BugMyBugsJob::BugMyBugsJob( BugServer *server ) : BugJob( server ) @@ -58,7 +58,7 @@ void BugMyBugsJob::start() BugJob::start( url ); } -void BugMyBugsJob::process( const QByteArray &data ) +void BugMyBugsJob::process( const TQByteArray &data ) { Bug::List bugs; diff --git a/kbugbuster/backend/bugmybugsjob.h b/kbugbuster/backend/bugmybugsjob.h index f51ee229..92685593 100644 --- a/kbugbuster/backend/bugmybugsjob.h +++ b/kbugbuster/backend/bugmybugsjob.h @@ -40,10 +40,10 @@ public: void start(); protected: - void process( const QByteArray &data ); + void process( const TQByteArray &data ); signals: - void bugListAvailable( const QString &label, const Bug::List &bugs ); + void bugListAvailable( const TQString &label, const Bug::List &bugs ); }; #endif diff --git a/kbugbuster/backend/bugserver.cpp b/kbugbuster/backend/bugserver.cpp index 0e6a70e6..768b76cd 100644 --- a/kbugbuster/backend/bugserver.cpp +++ b/kbugbuster/backend/bugserver.cpp @@ -49,10 +49,10 @@ void BugServer::init() { mCache = new BugCache( identifier() ); - QString commandsFile = locateLocal( "appdata", identifier() + "commands" ); + TQString commandsFile = locateLocal( "appdata", identifier() + "commands" ); mCommandsFile = new KSimpleConfig( commandsFile ); - QString bugzilla = mServerConfig.bugzillaVersion(); + TQString bugzilla = mServerConfig.bugzillaVersion(); if ( bugzilla == "KDE" ) mProcessor = new DomProcessor( this ); else if ( bugzilla == "2.10" ) mProcessor = new HtmlParser_2_10( this ); @@ -82,9 +82,9 @@ BugServerConfig &BugServer::serverConfig() return mServerConfig; } -QString BugServer::identifier() +TQString BugServer::identifier() { - QString id = mServerConfig.baseUrl().host(); + TQString id = mServerConfig.baseUrl().host(); return id; } @@ -102,7 +102,7 @@ KURL BugServer::packageListUrl() return url; } -KURL BugServer::bugListUrl( const Package &product, const QString &component ) +KURL BugServer::bugListUrl( const Package &product, const TQString &component ) { KURL url = mServerConfig.baseUrl(); @@ -132,7 +132,7 @@ KURL BugServer::bugLink( const Bug &bug ) return url; } -KURL BugServer::attachmentViewLink( const QString &id ) +KURL BugServer::attachmentViewLink( const TQString &id ) { KURL url = mServerConfig.baseUrl(); @@ -142,7 +142,7 @@ KURL BugServer::attachmentViewLink( const QString &id ) return url; } -KURL BugServer::attachmentEditLink( const QString &id ) +KURL BugServer::attachmentEditLink( const TQString &id ) { KURL url = mServerConfig.baseUrl(); @@ -152,7 +152,7 @@ KURL BugServer::attachmentEditLink( const QString &id ) return url; } -Bug::Status BugServer::bugStatus( const QString &str ) +Bug::Status BugServer::bugStatus( const TQString &str ) { if ( str == "UNCONFIRMED" ) { return Bug::Unconfirmed; @@ -173,7 +173,7 @@ Bug::Status BugServer::bugStatus( const QString &str ) } } -Bug::Severity BugServer::bugSeverity( const QString &str ) +Bug::Severity BugServer::bugSeverity( const TQString &str ) { if ( str == "critical" ) { return Bug::Critical; @@ -204,9 +204,9 @@ void BugServer::writeConfig( KConfig * /*config*/ ) bool BugServer::queueCommand( BugCommand *cmd ) { - // mCommands[bug] is a QPtrList. Get or create, set to autodelete, then append command. + // mCommands[bug] is a TQPtrList. Get or create, set to autodelete, then append command. mCommands[cmd->bug().number()].setAutoDelete( true ); - QPtrListIterator<BugCommand> cmdIt( mCommands[cmd->bug().number()] ); + TQPtrListIterator<BugCommand> cmdIt( mCommands[cmd->bug().number()] ); for ( ; cmdIt.current(); ++cmdIt ) if ( cmdIt.current()->type() == cmd->type() ) return false; @@ -214,10 +214,10 @@ bool BugServer::queueCommand( BugCommand *cmd ) return true; } -QPtrList<BugCommand> BugServer::queryCommands( const Bug &bug ) const +TQPtrList<BugCommand> BugServer::queryCommands( const Bug &bug ) const { CommandsMap::ConstIterator it = mCommands.find( bug.number() ); - if (it == mCommands.end()) return QPtrList<BugCommand>(); + if (it == mCommands.end()) return TQPtrList<BugCommand>(); else return *it; } @@ -227,14 +227,14 @@ bool BugServer::hasCommandsFor( const Bug &bug ) const return it != mCommands.end(); } -void BugServer::sendCommands( MailSender *mailer, const QString &senderName, - const QString &senderEmail, bool sendBCC, - const QString &recipient ) +void BugServer::sendCommands( MailSender *mailer, const TQString &senderName, + const TQString &senderEmail, bool sendBCC, + const TQString &recipient ) { // Disable mail commands for non-KDE servers if ( mServerConfig.baseUrl() != KURL( "http://bugs.kde.org" ) ) return; - QString controlText; + TQString controlText; // For each bug that has commands..... CommandsMap::ConstIterator it; @@ -242,7 +242,7 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, Bug bug; Package pkg; // And for each command.... - QPtrListIterator<BugCommand> cmdIt( *it ); + TQPtrListIterator<BugCommand> cmdIt( *it ); for ( ; cmdIt.current() ; ++cmdIt ) { BugCommand* cmd = cmdIt.current(); bug = cmd->bug(); @@ -257,8 +257,8 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, // implement message queueing for smtp MailSender *directMailer = mailer->clone(); #if 0 - connect( directMailer, SIGNAL( status( const QString & ) ), - this, SIGNAL( infoMessage( const QString & ) ) ); + connect( directMailer, TQT_SIGNAL( status( const TQString & ) ), + this, TQT_SIGNAL( infoMessage( const TQString & ) ) ); #endif if (!directMailer->send( senderName, senderEmail, cmd->mailAddress(), cmd->bug().title().prepend( "Re: " ), @@ -272,9 +272,9 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, mCommandsFile->deleteGroup( bug.number(), true ); // done, remove command mCache->invalidateBugDetails( bug ); if ( !pkg.isNull() ) { - mCache->invalidateBugList( pkg, QString::null ); // the status of the bug comes from the buglist... + mCache->invalidateBugList( pkg, TQString::null ); // the status of the bug comes from the buglist... - QStringList::ConstIterator it2; + TQStringList::ConstIterator it2; for (it2 = pkg.components().begin();it2 != pkg.components().end();++it2) { mCache->invalidateBugList( pkg, (*it2) ); // the status of the bug comes from the buglist... } @@ -297,7 +297,7 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, mCommands.clear(); } -void BugServer::clearCommands( const QString &bug ) +void BugServer::clearCommands( const TQString &bug ) { mCommands.remove( bug ); mCommandsFile->deleteGroup( bug, true ); @@ -309,12 +309,12 @@ bool BugServer::commandsPending() const else return false; } -QStringList BugServer::listCommands() const +TQStringList BugServer::listCommands() const { - QStringList result; + TQStringList result; CommandsMap::ConstIterator it; for(it = mCommands.begin(); it != mCommands.end(); ++it ) { - QPtrListIterator<BugCommand> cmdIt( *it ); + TQPtrListIterator<BugCommand> cmdIt( *it ); for ( ; cmdIt.current() ; ++cmdIt ) { BugCommand* cmd = cmdIt.current(); if (!cmd->controlString().isNull()) @@ -326,9 +326,9 @@ QStringList BugServer::listCommands() const return result; } -QStringList BugServer::bugsWithCommands() const +TQStringList BugServer::bugsWithCommands() const { - QStringList bugs; + TQStringList bugs; CommandsMap::ConstIterator it; for(it = mCommands.begin(); it != mCommands.end(); ++it ) { @@ -343,7 +343,7 @@ void BugServer::saveCommands() const CommandsMap::ConstIterator it; for(it = mCommands.begin(); it != mCommands.end(); ++it ) { mCommandsFile->setGroup( it.key() ); - QPtrListIterator<BugCommand> cmdIt( *it ); + TQPtrListIterator<BugCommand> cmdIt( *it ); for ( ; cmdIt.current() ; ++cmdIt ) { BugCommand* cmd = cmdIt.current(); cmd->save( mCommandsFile ); @@ -357,14 +357,14 @@ void BugServer::loadCommands() { mCommands.clear(); - QStringList bugs = mCommandsFile->groupList(); - QStringList::ConstIterator it; + TQStringList bugs = mCommandsFile->groupList(); + TQStringList::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { mCommandsFile->setGroup( *it ); - QMap<QString, QString> entries = mCommandsFile->entryMap ( *it ); - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString> entries = mCommandsFile->entryMap ( *it ); + TQMap<TQString, TQString>::ConstIterator it; for( it = entries.begin(); it != entries.end(); ++it ) { - QString type = it.key(); + TQString type = it.key(); BugCommand *cmd = BugCommand::load( mCommandsFile, type ); if ( cmd ) { mCommands[cmd->bug().number()].setAutoDelete(true); @@ -384,16 +384,16 @@ const Package::List &BugServer::packages() const return mPackages; } -void BugServer::setBugs( const Package &pkg, const QString &component, +void BugServer::setBugs( const Package &pkg, const TQString &component, const Bug::List &bugs ) { - QPair<Package, QString> pkg_key = QPair<Package, QString>(pkg, component); + QPair<Package, TQString> pkg_key = QPair<Package, TQString>(pkg, component); mBugs[ pkg_key ] = bugs; } -const Bug::List &BugServer::bugs( const Package &pkg, const QString &component ) +const Bug::List &BugServer::bugs( const Package &pkg, const TQString &component ) { - QPair<Package, QString> pkg_key = QPair<Package, QString>(pkg, component); + QPair<Package, TQString> pkg_key = QPair<Package, TQString>(pkg, component); return mBugs[ pkg_key ]; } diff --git a/kbugbuster/backend/bugserver.h b/kbugbuster/backend/bugserver.h index 3b534fa0..b2095569 100644 --- a/kbugbuster/backend/bugserver.h +++ b/kbugbuster/backend/bugserver.h @@ -23,7 +23,7 @@ #ifndef BUGSERVER_H #define BUGSERVER_H -#include <qstring.h> +#include <tqstring.h> #include <kurl.h> @@ -50,23 +50,23 @@ class BugServer void setServerConfig( const BugServerConfig & ); BugServerConfig &serverConfig(); - QString identifier(); + TQString identifier(); BugCache *cache() const { return mCache; } KURL packageListUrl(); - KURL bugListUrl( const Package &, const QString &component ); + KURL bugListUrl( const Package &, const TQString &component ); KURL bugDetailsUrl( const Bug & ); KURL bugLink( const Bug & ); - KURL attachmentViewLink( const QString &id ); - KURL attachmentEditLink( const QString &id ); + KURL attachmentViewLink( const TQString &id ); + KURL attachmentEditLink( const TQString &id ); - Bug::Status bugStatus( const QString & ); + Bug::Status bugStatus( const TQString & ); - Bug::Severity bugSeverity( const QString & ); + Bug::Severity bugSeverity( const TQString & ); Processor *processor() const; @@ -81,7 +81,7 @@ class BugServer /** Return all the commands for a given bug. */ - QPtrList<BugCommand> queryCommands( const Bug & ) const; + TQPtrList<BugCommand> queryCommands( const Bug & ) const; /** Return true if we have a least one command for this bug. */ @@ -89,13 +89,13 @@ class BugServer /** Send all commands (generate the mails). */ - void sendCommands( MailSender *, const QString &senderName, - const QString &senderEmail, bool sendBCC, - const QString &recipient ); + void sendCommands( MailSender *, const TQString &senderName, + const TQString &senderEmail, bool sendBCC, + const TQString &recipient ); /** Forget all commands for a given bug. */ - void clearCommands( const QString &bug ); + void clearCommands( const TQString &bug ); /** Return true if any command has been created. */ @@ -103,11 +103,11 @@ class BugServer /** List all pending commands. */ - QStringList listCommands() const; + TQStringList listCommands() const; /** Return numbers of all bugs having at least one command queued. */ - QStringList bugsWithCommands() const; + TQStringList bugsWithCommands() const; void saveCommands() const; void loadCommands(); @@ -115,9 +115,9 @@ class BugServer void setPackages( const Package::List & ); const Package::List &packages() const; - void setBugs( const Package &, const QString &component, + void setBugs( const Package &, const TQString &component, const Bug::List & ); - const Bug::List &bugs( const Package &, const QString &component ); + const Bug::List &bugs( const Package &, const TQString &component ); void setBugDetails( const Bug &, const BugDetails & ); const BugDetails &bugDetails( const Bug & ); @@ -133,13 +133,13 @@ class BugServer Package::List mPackages; // Map package -> list of bugs - typedef QMap< QPair<Package, QString>, Bug::List > BugListMap; + typedef TQMap< QPair<Package, TQString>, Bug::List > BugListMap; BugListMap mBugs; // Map bug -> bug details (i.e. contents of the report) - typedef QMap< Bug, BugDetails > BugDetailsMap; + typedef TQMap< Bug, BugDetails > BugDetailsMap; BugDetailsMap mBugDetails; // Map bug-number -> list of commands - typedef QMap< QString, QPtrList<BugCommand> > CommandsMap; + typedef TQMap< TQString, TQPtrList<BugCommand> > CommandsMap; CommandsMap mCommands; KSimpleConfig *mCommandsFile; diff --git a/kbugbuster/backend/bugserverconfig.cpp b/kbugbuster/backend/bugserverconfig.cpp index 0669c0ab..91be1f0c 100644 --- a/kbugbuster/backend/bugserverconfig.cpp +++ b/kbugbuster/backend/bugserverconfig.cpp @@ -37,7 +37,7 @@ BugServerConfig::BugServerConfig() mBugzillaVersion = "KDE"; } -BugServerConfig::BugServerConfig( const QString &name, const KURL &baseUrl ) +BugServerConfig::BugServerConfig( const TQString &name, const KURL &baseUrl ) : mName( name ), mBaseUrl( baseUrl ), mBugzillaVersion( "KDE" ) { } @@ -46,12 +46,12 @@ BugServerConfig::~BugServerConfig() { } -void BugServerConfig::setName( const QString &name ) +void BugServerConfig::setName( const TQString &name ) { mName = name; } -QString BugServerConfig::name() const +TQString BugServerConfig::name() const { return mName; } @@ -66,39 +66,39 @@ KURL BugServerConfig::baseUrl() const return mBaseUrl; } -void BugServerConfig::setUser( const QString &user ) +void BugServerConfig::setUser( const TQString &user ) { mUser = user; } -QString BugServerConfig::user() const +TQString BugServerConfig::user() const { return mUser; } -void BugServerConfig::setPassword( const QString &password ) +void BugServerConfig::setPassword( const TQString &password ) { mPassword = password; } -QString BugServerConfig::password() const +TQString BugServerConfig::password() const { return mPassword; } -void BugServerConfig::setBugzillaVersion( const QString &s ) +void BugServerConfig::setBugzillaVersion( const TQString &s ) { mBugzillaVersion = s; } -QString BugServerConfig::bugzillaVersion() const +TQString BugServerConfig::bugzillaVersion() const { return mBugzillaVersion; } -QStringList BugServerConfig::bugzillaVersions() +TQStringList BugServerConfig::bugzillaVersions() { - QStringList v; + TQStringList v; v << "2.10"; v << "2.14.2"; @@ -110,7 +110,7 @@ QStringList BugServerConfig::bugzillaVersions() return v; } -void BugServerConfig::readConfig( KConfig *cfg, const QString &name ) +void BugServerConfig::readConfig( KConfig *cfg, const TQString &name ) { mName = name; diff --git a/kbugbuster/backend/bugserverconfig.h b/kbugbuster/backend/bugserverconfig.h index 2c9be828..2868a791 100644 --- a/kbugbuster/backend/bugserverconfig.h +++ b/kbugbuster/backend/bugserverconfig.h @@ -24,8 +24,8 @@ #ifndef BUGSERVERCONFIG_H #define BUGSERVERCONFIG_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kurl.h> @@ -35,53 +35,53 @@ class BugServerConfig { public: BugServerConfig(); - BugServerConfig( const QString &name, const KURL &baseUrl ); + BugServerConfig( const TQString &name, const KURL &baseUrl ); ~BugServerConfig(); - void setName( const QString &name ); - QString name() const; + void setName( const TQString &name ); + TQString name() const; void setBaseUrl( const KURL &url ); KURL baseUrl() const; - void setUser( const QString &user ); - QString user() const; + void setUser( const TQString &user ); + TQString user() const; - void setPassword( const QString &password ); - QString password() const; + void setPassword( const TQString &password ); + TQString password() const; - void readConfig( KConfig *, const QString &name ); + void readConfig( KConfig *, const TQString &name ); void writeConfig( KConfig * ); - static QStringList bugzillaVersions(); + static TQStringList bugzillaVersions(); - void setBugzillaVersion( const QString & ); - QString bugzillaVersion() const; + void setBugzillaVersion( const TQString & ); + TQString bugzillaVersion() const; - void setRecentPackages( const QStringList &v ) { mRecentPackages = v; } - QStringList recentPackages() const { return mRecentPackages; } + void setRecentPackages( const TQStringList &v ) { mRecentPackages = v; } + TQStringList recentPackages() const { return mRecentPackages; } - void setCurrentPackage( const QString &v ) { mCurrentPackage = v; } - QString currentPackage() const { return mCurrentPackage; } + void setCurrentPackage( const TQString &v ) { mCurrentPackage = v; } + TQString currentPackage() const { return mCurrentPackage; } - void setCurrentComponent( const QString &v ) { mCurrentComponent = v; } - QString currentComponent() const { return mCurrentComponent; } + void setCurrentComponent( const TQString &v ) { mCurrentComponent = v; } + TQString currentComponent() const { return mCurrentComponent; } - void setCurrentBug( const QString &v ) { mCurrentBug = v; } - QString currentBug() const { return mCurrentBug; } + void setCurrentBug( const TQString &v ) { mCurrentBug = v; } + TQString currentBug() const { return mCurrentBug; } private: - QString mName; + TQString mName; KURL mBaseUrl; - QString mUser; - QString mPassword; + TQString mUser; + TQString mPassword; - QString mBugzillaVersion; + TQString mBugzillaVersion; - QStringList mRecentPackages; - QString mCurrentPackage; - QString mCurrentComponent; - QString mCurrentBug; + TQStringList mRecentPackages; + TQString mCurrentPackage; + TQString mCurrentComponent; + TQString mCurrentBug; }; #endif diff --git a/kbugbuster/backend/bugsystem.cpp b/kbugbuster/backend/bugsystem.cpp index 26432e08..c3dc0cdd 100644 --- a/kbugbuster/backend/bugsystem.cpp +++ b/kbugbuster/backend/bugsystem.cpp @@ -27,7 +27,7 @@ KStaticDeleter<BugSystem> bssd; BugSystem *BugSystem::s_self = 0; -QString BugSystem::mLastResponse; +TQString BugSystem::mLastResponse; BugSystem *BugSystem::self() { @@ -45,7 +45,7 @@ BugSystem::BugSystem() BugSystem::~BugSystem() { - QValueList<BugServer *>::ConstIterator it; + TQValueList<BugServer *>::ConstIterator it; for( it = mServerList.begin(); it != mServerList.end(); ++it ) { delete *it; } @@ -80,12 +80,12 @@ void BugSystem::retrievePackageList() emit packageListLoading(); PackageListJob *job = new PackageListJob( mServer ); - connect( job, SIGNAL( packageListAvailable( const Package::List & ) ), - this, SIGNAL( packageListAvailable( const Package::List & ) ) ); - connect( job, SIGNAL( packageListAvailable( const Package::List & ) ), - this, SLOT( setPackageList( const Package::List & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( loadingError( const QString & ) ) ); + connect( job, TQT_SIGNAL( packageListAvailable( const Package::List & ) ), + this, TQT_SIGNAL( packageListAvailable( const Package::List & ) ) ); + connect( job, TQT_SIGNAL( packageListAvailable( const Package::List & ) ), + this, TQT_SLOT( setPackageList( const Package::List & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( loadingError( const TQString & ) ) ); connectJob( job ); registerJob( job ); @@ -95,7 +95,7 @@ void BugSystem::retrievePackageList() } } -void BugSystem::retrieveBugList( const Package &pkg, const QString &component ) +void BugSystem::retrieveBugList( const Package &pkg, const TQString &component ) { kdDebug() << "BugSystem::retrieveBugList(): " << pkg.name() << endl; @@ -120,12 +120,12 @@ void BugSystem::retrieveBugList( const Package &pkg, const QString &component ) emit bugListLoading( pkg, component ); BugListJob *job = new BugListJob( mServer ); - connect( job, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ), - this, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ) ); - connect( job, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ), - this, SLOT( setBugList( const Package &, const QString &, const Bug::List & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( loadingError( const QString & ) ) ); + connect( job, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ), + this, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ) ); + connect( job, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ), + this, TQT_SLOT( setBugList( const Package &, const TQString &, const Bug::List & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( loadingError( const TQString & ) ) ); connectJob( job ); registerJob( job ); @@ -152,10 +152,10 @@ void BugSystem::retrieveMyBugsList() BugMyBugsJob *job = new BugMyBugsJob( mServer ); - connect( job, SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ), - this, SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( loadingError( const QString & ) ) ); + connect( job, TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ), + this, TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( loadingError( const TQString & ) ) ); connectJob( job ); registerJob( job ); @@ -184,12 +184,12 @@ void BugSystem::retrieveBugDetails( const Bug &bug ) emit bugDetailsLoading( bug ); BugDetailsJob *job = new BugDetailsJob( mServer ); - connect( job, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), - this, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ) ); - connect( job, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), - this, SLOT( setBugDetails( const Bug &, const BugDetails & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( bugDetailsLoadingError() ) ); + connect( job, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), + this, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ) ); + connect( job, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), + this, TQT_SLOT( setBugDetails( const Bug &, const BugDetails & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( bugDetailsLoadingError() ) ); connectJob( job ); registerJob( job ); @@ -201,12 +201,12 @@ void BugSystem::retrieveBugDetails( const Bug &bug ) void BugSystem::connectJob( BugJob *job ) { - connect( job, SIGNAL( infoMessage( const QString & ) ), - this, SIGNAL( infoMessage( const QString & ) ) ); - connect( job, SIGNAL( infoPercent( unsigned long ) ), - this, SIGNAL( infoPercent( unsigned long ) ) ); - connect( job, SIGNAL( jobEnded( BugJob * ) ), - SLOT( unregisterJob( BugJob * ) ) ); + connect( job, TQT_SIGNAL( infoMessage( const TQString & ) ), + this, TQT_SIGNAL( infoMessage( const TQString & ) ) ); + connect( job, TQT_SIGNAL( infoPercent( unsigned long ) ), + this, TQT_SIGNAL( infoPercent( unsigned long ) ) ); + connect( job, TQT_SIGNAL( jobEnded( BugJob * ) ), + TQT_SLOT( unregisterJob( BugJob * ) ) ); } void BugSystem::setPackageList( const Package::List &pkgs ) @@ -216,7 +216,7 @@ void BugSystem::setPackageList( const Package::List &pkgs ) mServer->cache()->savePackageList( pkgs ); } -void BugSystem::setBugList( const Package &pkg, const QString &component, const Bug::List &bugs ) +void BugSystem::setBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ) { mServer->setBugs( pkg, component, bugs ); mServer->cache()->saveBugList( pkg, component, bugs ); @@ -234,7 +234,7 @@ Package::List BugSystem::packageList() const return mServer->packages(); } -Package BugSystem::package( const QString &pkgname ) const +Package BugSystem::package( const TQString &pkgname ) const { Package::List::ConstIterator it; for( it = mServer->packages().begin(); it != mServer->packages().end(); ++it ) { @@ -243,7 +243,7 @@ Package BugSystem::package( const QString &pkgname ) const return Package(); } -Bug BugSystem::bug( const Package &pkg, const QString &component, const QString &number ) const +Bug BugSystem::bug( const Package &pkg, const TQString &component, const TQString &number ) const { Bug::List bugs = mServer->bugs( pkg, component ); @@ -259,7 +259,7 @@ void BugSystem::queueCommand( BugCommand *cmd ) if ( mServer->queueCommand( cmd ) ) emit commandQueued( cmd ); } -void BugSystem::clearCommands( const QString &bug ) +void BugSystem::clearCommands( const TQString &bug ) { mServer->clearCommands( bug ); @@ -268,9 +268,9 @@ void BugSystem::clearCommands( const QString &bug ) void BugSystem::clearCommands() { - QStringList bugs = mServer->bugsWithCommands(); + TQStringList bugs = mServer->bugsWithCommands(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { clearCommands( *it ); } @@ -278,42 +278,42 @@ void BugSystem::clearCommands() void BugSystem::sendCommands() { - QString recipient = KBBPrefs::instance()->mOverrideRecipient; + TQString recipient = KBBPrefs::instance()->mOverrideRecipient; bool sendBCC = KBBPrefs::instance()->mSendBCC; KEMailSettings emailSettings; - QString senderName = emailSettings.getSetting( KEMailSettings::RealName ); - QString senderEmail = emailSettings.getSetting( KEMailSettings::EmailAddress ); - QString smtpServer = emailSettings.getSetting( KEMailSettings::OutServer ); + TQString senderName = emailSettings.getSetting( KEMailSettings::RealName ); + TQString senderEmail = emailSettings.getSetting( KEMailSettings::EmailAddress ); + TQString smtpServer = emailSettings.getSetting( KEMailSettings::OutServer ); MailSender::MailClient client = (MailSender::MailClient)KBBPrefs::instance()->mMailClient; // ### connect to signals MailSender *mailer = new MailSender( client, smtpServer ); - connect( mailer, SIGNAL( status( const QString & ) ), - SIGNAL( infoMessage( const QString & ) ) ); + connect( mailer, TQT_SIGNAL( status( const TQString & ) ), + TQT_SIGNAL( infoMessage( const TQString & ) ) ); mServer->sendCommands( mailer, senderName, senderEmail, sendBCC, recipient ); } -void BugSystem::setServerList( const QValueList<BugServerConfig> &servers ) +void BugSystem::setServerList( const TQValueList<BugServerConfig> &servers ) { if ( servers.isEmpty() ) return; - QString currentServer; + TQString currentServer; if ( mServer ) currentServer = mServer->serverConfig().name(); else currentServer = KBBPrefs::instance()->mCurrentServer; killAllJobs(); - QValueList<BugServer *>::ConstIterator serverIt; + TQValueList<BugServer *>::ConstIterator serverIt; for( serverIt = mServerList.begin(); serverIt != mServerList.end(); ++serverIt ) { delete *serverIt; } mServerList.clear(); - QValueList<BugServerConfig>::ConstIterator cfgIt; + TQValueList<BugServerConfig>::ConstIterator cfgIt; for( cfgIt = servers.begin(); cfgIt != servers.end(); ++cfgIt ) { mServerList.append( new BugServer( *cfgIt ) ); } @@ -321,12 +321,12 @@ void BugSystem::setServerList( const QValueList<BugServerConfig> &servers ) setCurrentServer( currentServer ); } -QValueList<BugServer *> BugSystem::serverList() +TQValueList<BugServer *> BugSystem::serverList() { return mServerList; } -void BugSystem::setCurrentServer( const QString &name ) +void BugSystem::setCurrentServer( const TQString &name ) { killAllJobs(); @@ -347,9 +347,9 @@ void BugSystem::setCurrentServer( const QString &name ) } } -BugServer *BugSystem::findServer( const QString &name ) +BugServer *BugSystem::findServer( const TQString &name ) { - QValueList<BugServer *>::ConstIterator serverIt; + TQValueList<BugServer *>::ConstIterator serverIt; for( serverIt = mServerList.begin(); serverIt != mServerList.end(); ++serverIt ) { if ( (*serverIt)->serverConfig().name() == name ) return *serverIt; @@ -363,12 +363,12 @@ void BugSystem::saveQuery( const KURL &url ) mLastResponse += "\n\n"; } -void BugSystem::saveResponse( const QByteArray &response ) +void BugSystem::saveResponse( const TQByteArray &response ) { mLastResponse += response; } -QString BugSystem::lastResponse() +TQString BugSystem::lastResponse() { return mLastResponse; } @@ -376,14 +376,14 @@ QString BugSystem::lastResponse() void BugSystem::readConfig( KConfig *config ) { config->setGroup("Servers"); - QStringList servers = config->readListEntry( "Servers" ); + TQStringList servers = config->readListEntry( "Servers" ); - QValueList<BugServerConfig> serverList; + TQValueList<BugServerConfig> serverList; if ( servers.isEmpty() ) { serverList.append( BugServerConfig() ); } else { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = servers.begin(); it != servers.end(); ++it ) { BugServerConfig cfg; cfg.readConfig( config, *it ); @@ -396,9 +396,9 @@ void BugSystem::readConfig( KConfig *config ) void BugSystem::writeConfig( KConfig *config ) { - QValueList<BugServer *>::ConstIterator itServer; - QStringList servers; - QValueList<BugServer *> serverList = BugSystem::self()->serverList(); + TQValueList<BugServer *>::ConstIterator itServer; + TQStringList servers; + TQValueList<BugServer *> serverList = BugSystem::self()->serverList(); for( itServer = serverList.begin(); itServer != serverList.end(); ++itServer ) { BugServerConfig serverConfig = (*itServer)->serverConfig(); diff --git a/kbugbuster/backend/bugsystem.h b/kbugbuster/backend/bugsystem.h index c573698b..c5c37d18 100644 --- a/kbugbuster/backend/bugsystem.h +++ b/kbugbuster/backend/bugsystem.h @@ -8,10 +8,10 @@ #include <kurl.h> -#include <qobject.h> -#include <qptrlist.h> -#include <qmap.h> -#include <qpair.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqmap.h> +#include <tqpair.h> class KConfig; @@ -36,13 +36,13 @@ class BugSystem : public QObject /** BugSystem takes ownership of the BugServerConfig objects. */ - void setServerList( const QValueList<BugServerConfig> &servers ); - QValueList<BugServer *> serverList(); + void setServerList( const TQValueList<BugServerConfig> &servers ); + TQValueList<BugServer *> serverList(); - void setCurrentServer( const QString & ); + void setCurrentServer( const TQString & ); void retrievePackageList(); - void retrieveBugList( const Package &, const QString &component ); + void retrieveBugList( const Package &, const TQString &component ); void retrieveBugDetails( const Bug & ); /** @@ -57,7 +57,7 @@ class BugSystem : public QObject /** Forget all commands for a given bug. */ - void clearCommands( const QString &bug ); + void clearCommands( const TQString &bug ); /** Forget all commands for all bugs. */ @@ -72,44 +72,44 @@ class BugSystem : public QObject Package::List packageList() const; - Package package( const QString &pkgname ) const; - Bug bug( const Package &pkg, const QString &component, const QString &number ) const; + Package package( const TQString &pkgname ) const; + Bug bug( const Package &pkg, const TQString &component, const TQString &number ) const; static void saveQuery( const KURL &url ); - static void saveResponse( const QByteArray &d ); - static QString lastResponse(); + static void saveResponse( const TQByteArray &d ); + static TQString lastResponse(); void readConfig( KConfig * ); void writeConfig( KConfig * ); signals: void packageListAvailable( const Package::List &pkgs ); - void bugListAvailable( const Package &pkg, const QString &component, const Bug::List & ); - void bugListAvailable( const QString &label, const Bug::List & ); + void bugListAvailable( const Package &pkg, const TQString &component, const Bug::List & ); + void bugListAvailable( const TQString &label, const Bug::List & ); void bugDetailsAvailable( const Bug &, const BugDetails & ); void packageListLoading(); - void bugListLoading( const Package &, const QString &component ); - void bugListLoading( const QString &label ); + void bugListLoading( const Package &, const TQString &component ); + void bugListLoading( const TQString &label ); void bugDetailsLoading( const Bug & ); void packageListCacheMiss(); void bugListCacheMiss( const Package &package ); - void bugListCacheMiss( const QString &label ); + void bugListCacheMiss( const TQString &label ); void bugDetailsCacheMiss( const Bug & ); void bugDetailsLoadingError(); - void infoMessage( const QString &message ); + void infoMessage( const TQString &message ); void infoPercent( unsigned long percent ); void commandQueued( BugCommand * ); - void commandCanceled( const QString & ); + void commandCanceled( const TQString & ); - void loadingError( const QString &text ); + void loadingError( const TQString &text ); protected: - BugServer *findServer( const QString &name ); + BugServer *findServer( const TQString &name ); void registerJob( BugJob * ); @@ -122,7 +122,7 @@ class BugSystem : public QObject private slots: void setPackageList( const Package::List &pkgs ); - void setBugList( const Package &pkg, const QString &component, const Bug::List &bugs ); + void setBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ); void setBugDetails( const Bug &bug, const BugDetails &details ); private: @@ -130,13 +130,13 @@ class BugSystem : public QObject BugServer *mServer; - QValueList<BugServer *> mServerList; + TQValueList<BugServer *> mServerList; - QPtrList<BugJob> mJobs; + TQPtrList<BugJob> mJobs; static BugSystem *s_self; - static QString mLastResponse; + static TQString mLastResponse; }; #endif diff --git a/kbugbuster/backend/domprocessor.cpp b/kbugbuster/backend/domprocessor.cpp index 7643ca11..bfef2ca6 100644 --- a/kbugbuster/backend/domprocessor.cpp +++ b/kbugbuster/backend/domprocessor.cpp @@ -23,8 +23,8 @@ #include "domprocessor.h" -#include <qregexp.h> -#include <qstylesheet.h> +#include <tqregexp.h> +#include <tqstylesheet.h> #include <kdebug.h> #include <kmdcodec.h> @@ -44,15 +44,15 @@ DomProcessor::~DomProcessor() { } -KBB::Error DomProcessor::parsePackageList( const QByteArray &data, +KBB::Error DomProcessor::parsePackageList( const TQByteArray &data, Package::List &packages ) { - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( data ) ) { return KBB::Error( "Error parsing xml response for package list request." ); } - QDomElement bugzilla = doc.documentElement(); + TQDomElement bugzilla = doc.documentElement(); if ( bugzilla.isNull() ) { return KBB::Error( "No document in xml response." ); @@ -63,14 +63,14 @@ KBB::Error DomProcessor::parsePackageList( const QByteArray &data, return err; } -KBB::Error DomProcessor::parseBugList( const QByteArray &data, Bug::List &bugs ) +KBB::Error DomProcessor::parseBugList( const TQByteArray &data, Bug::List &bugs ) { - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( data ) ) { return KBB::Error( "Error parsing xml response for bug list request" ); } - QDomElement bugzilla = doc.documentElement(); + TQDomElement bugzilla = doc.documentElement(); if ( bugzilla.isNull() ) { return KBB::Error( "No document in xml response." ); @@ -81,23 +81,23 @@ KBB::Error DomProcessor::parseBugList( const QByteArray &data, Bug::List &bugs ) return err; } -KBB::Error DomProcessor::parseBugDetails( const QByteArray &data, +KBB::Error DomProcessor::parseBugDetails( const TQByteArray &data, BugDetails &bugDetails ) { - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( data ) ) { return KBB::Error( "Error parsing xml response for bug details request." ); } - QDomElement bugzilla = doc.documentElement(); + TQDomElement bugzilla = doc.documentElement(); if ( bugzilla.isNull() ) { return KBB::Error( "No document in xml response." ); } - QDomNode p; + TQDomNode p; for ( p = bugzilla.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement bug = p.toElement(); + TQDomElement bug = p.toElement(); if ( bug.tagName() != "bug" ) continue; KBB::Error err = parseDomBugDetails( bug, bugDetails ); @@ -109,24 +109,24 @@ KBB::Error DomProcessor::parseBugDetails( const QByteArray &data, } -KBB::Error DomProcessor::parseDomPackageList( const QDomElement &element, +KBB::Error DomProcessor::parseDomPackageList( const TQDomElement &element, Package::List &packages ) { - QDomNode p; + TQDomNode p; for ( p = element.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement bug = p.toElement(); + TQDomElement bug = p.toElement(); if ( bug.tagName() != "product" ) continue; - QString pkgName = bug.attribute( "name" ); + TQString pkgName = bug.attribute( "name" ); uint bugCount = 999; Person maintainer; - QString description; - QStringList components; + TQString description; + TQStringList components; - QDomNode n; + TQDomNode n; for( n = bug.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "descr" ) description= e.text().stripWhiteSpace(); if ( e.tagName() == "component" ) components += e.text().stripWhiteSpace(); } @@ -141,13 +141,13 @@ KBB::Error DomProcessor::parseDomPackageList( const QDomElement &element, return KBB::Error(); } -KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, +KBB::Error DomProcessor::parseDomBugList( const TQDomElement &topElement, Bug::List &bugs ) { - QDomElement element; + TQDomElement element; if ( topElement.tagName() != "querybugids" ) { - QDomNode buglist = topElement.namedItem( "querybugids" ); + TQDomNode buglist = topElement.namedItem( "querybugids" ); element = buglist.toElement(); if ( element.isNull() ) { return KBB::Error( "No querybugids element found." ); @@ -156,9 +156,9 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, element = topElement; } - QDomNode p; + TQDomNode p; for ( p = element.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement hit = p.toElement(); + TQDomElement hit = p.toElement(); kdDebug() << "DomProcessor::parseDomBugList(): tag: " << hit.tagName() << endl; @@ -166,20 +166,20 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, return KBB::Error( "Error: " + hit.text() ); } else if ( hit.tagName() != "hit" ) continue; - QString title; - QString submitterName; - QString submitterEmail; - QString bugNr; + TQString title; + TQString submitterName; + TQString submitterEmail; + TQString bugNr; Bug::Status status = Bug::StatusUndefined; Bug::Severity severity = Bug::SeverityUndefined; Person developerTodo; Bug::BugMergeList mergedList; uint age = 0xFFFFFFFF; - QDomNode n; + TQDomNode n; for ( n = hit.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "bugid" ) bugNr = e.text(); @@ -194,7 +194,7 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, else if ( e.tagName() == "severity" ) severity = Bug::stringToSeverity( e.text() ); else if ( e.tagName() == "creationdate" ) - age = ( QDateTime::fromString( e.text(), Qt::ISODate ) ).daysTo( QDateTime::currentDateTime() ); + age = ( TQDateTime::fromString( e.text(), Qt::ISODate ) ).daysTo( TQDateTime::currentDateTime() ); } Person submitter( submitterName, submitterEmail ); @@ -210,57 +210,57 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, return KBB::Error(); } -KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element, +KBB::Error DomProcessor::parseDomBugDetails( const TQDomElement &element, BugDetails &bugDetails ) { if ( element.tagName() != "bug" ) return KBB::Error( "No <bug> tag found" ); BugDetailsPart::List parts; - QValueList<BugDetailsImpl::AttachmentDetails> attachments; + TQValueList<BugDetailsImpl::AttachmentDetails> attachments; - QString versionXml; - QString osXml; + TQString versionXml; + TQString osXml; - QString version; - QString source; - QString compiler; - QString os; + TQString version; + TQString source; + TQString compiler; + TQString os; - QDomNode n; + TQDomNode n; for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "version" ) versionXml = e.text().stripWhiteSpace(); if ( e.tagName() == "op_sys" ) osXml = e.text().stripWhiteSpace(); if ( e.tagName() == "long_desc" ) { - QString encoding = e.attribute( "encoding" ); + TQString encoding = e.attribute( "encoding" ); Person sender; - QDateTime date; - QString text; + TQDateTime date; + TQString text; - QDomNode n2; + TQDomNode n2; for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) { - QDomElement e2 = n2.toElement(); + TQDomElement e2 = n2.toElement(); if ( e2.tagName() == "who" ) { sender = Person::parseFromString( e2.text() ); } else if ( e2.tagName() == "bug_when" ) { date = parseDate( e2.text().stripWhiteSpace() ); } else if ( e2.tagName() == "thetext" ) { - QString in; + TQString in; if ( encoding == "base64" ) { in = KCodecs::base64Decode( e2.text().latin1() ); } else { in = e2.text(); } - QString raw = QStyleSheet::escape( in ); + TQString raw = TQStyleSheet::escape( in ); if ( parts.isEmpty() ) { - QTextStream ts( &raw, IO_ReadOnly ); - QString line; + TQTextStream ts( &raw, IO_ReadOnly ); + TQString line; while( !( line = ts.readLine() ).isNull() ) { if ( parseAttributeLine( line, "Version", version ) ) continue; if ( parseAttributeLine( line, "Installed from", source ) ) continue; @@ -272,8 +272,8 @@ KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element, } else { text += raw; } - QString bugBaseURL = server()->serverConfig().baseUrl().htmlURL(); - text = "<pre>" + wrapLines( text ).replace( QRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ), + TQString bugBaseURL = server()->serverConfig().baseUrl().htmlURL(); + text = "<pre>" + wrapLines( text ).replace( TQRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ), "<a href=\"" + bugBaseURL + "/attachment.cgi?id=\\2&action=view\">\\1</a>" ) + "\n</pre>"; } } @@ -282,15 +282,15 @@ KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element, } if ( e.tagName() == "attachment" ) { - QString attachid, date, desc; - for( QDomNode node = e.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement e2 = node.toElement(); + TQString attachid, date, desc; + for( TQDomNode node = e.firstChild(); !node.isNull(); node = node.nextSibling() ) { + TQDomElement e2 = node.toElement(); if ( e2.tagName() == "attachid" ) { attachid = e2.text(); } else if ( e2.tagName() == "date" ) { date = e2.text().stripWhiteSpace(); } else if ( e2.tagName() == "desc" ) { - desc = "<pre>" + wrapLines( QStyleSheet::escape(e2.text()) ) + "\n</pre>"; + desc = "<pre>" + wrapLines( TQStyleSheet::escape(e2.text()) ) + "\n</pre>"; } } attachments.append( BugDetailsImpl::AttachmentDetails( desc, date, attachid ) ); @@ -313,7 +313,7 @@ void DomProcessor::setPackageListQuery( KURL &url ) url.setQuery( "?data=versiontable" ); } -void DomProcessor::setBugListQuery( KURL &url, const Package &product, const QString &component ) +void DomProcessor::setBugListQuery( KURL &url, const Package &product, const TQString &component ) { if ( server()->serverConfig().bugzillaVersion() == "Bugworld" ) { url.setFileName( "bugworld.cgi" ); @@ -321,7 +321,7 @@ void DomProcessor::setBugListQuery( KURL &url, const Package &product, const QSt url.setFileName( "xmlquery.cgi" ); } - QString user = server()->serverConfig().user(); + TQString user = server()->serverConfig().user(); if ( component.isEmpty() ) url.setQuery( "?user=" + user + "&product=" + product.name() ); @@ -338,18 +338,18 @@ void DomProcessor::setBugDetailsQuery( KURL &url, const Bug &bug ) url.setQuery( "?id=" + bug.number() ); } -QString DomProcessor::wrapLines( const QString &text ) +TQString DomProcessor::wrapLines( const TQString &text ) { int wrap = KBBPrefs::instance()->mWrapColumn; - QStringList lines = QStringList::split( '\n', text, true ); + TQStringList lines = TQStringList::split( '\n', text, true ); //kdDebug() << lines.count() << " lines." << endl; - QString out; + TQString out; bool removeBlankLines = true; - for ( QStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) + for ( TQStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) { - QString line = *it; + TQString line = *it; if ( removeBlankLines ) { if ( line.isEmpty() ) continue; @@ -358,7 +358,7 @@ QString DomProcessor::wrapLines( const QString &text ) //kdDebug() << "BugDetailsJob::processNode IN line='" << line << "'" << endl; - QString wrappedLine; + TQString wrappedLine; while ( line.length() > uint( wrap ) ) { int breakPoint = line.findRev( ' ', wrap ); @@ -380,14 +380,14 @@ QString DomProcessor::wrapLines( const QString &text ) return out; } -bool DomProcessor::parseAttributeLine( const QString &line, const QString &key, - QString &result ) +bool DomProcessor::parseAttributeLine( const TQString &line, const TQString &key, + TQString &result ) { if ( !result.isEmpty() ) return false; if ( !line.startsWith( key + ":" ) ) return false; - QString value = line.mid( key.length() + 1 ); + TQString value = line.mid( key.length() + 1 ); value = value.stripWhiteSpace(); result = value; @@ -395,9 +395,9 @@ bool DomProcessor::parseAttributeLine( const QString &line, const QString &key, return true; } -QDateTime DomProcessor::parseDate( const QString &dateStr ) +TQDateTime DomProcessor::parseDate( const TQString &dateStr ) { - QDateTime date = QDateTime::fromString( dateStr, Qt::ISODate ); + TQDateTime date = TQDateTime::fromString( dateStr, Qt::ISODate ); return date; } diff --git a/kbugbuster/backend/domprocessor.h b/kbugbuster/backend/domprocessor.h index 1553ae4a..a561cbea 100644 --- a/kbugbuster/backend/domprocessor.h +++ b/kbugbuster/backend/domprocessor.h @@ -31,7 +31,7 @@ #include <kurl.h> -#include <qdom.h> +#include <tqdom.h> class BugServer; @@ -41,25 +41,25 @@ class DomProcessor : public Processor DomProcessor( BugServer * ); virtual ~DomProcessor(); - KBB::Error parsePackageList( const QByteArray &data, + KBB::Error parsePackageList( const TQByteArray &data, Package::List &packages ); - KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs ); - KBB::Error parseBugDetails( const QByteArray &, BugDetails & ); + KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ); + KBB::Error parseBugDetails( const TQByteArray &, BugDetails & ); void setPackageListQuery( KURL & ); - void setBugListQuery( KURL &, const Package &, const QString &component ); + void setBugListQuery( KURL &, const Package &, const TQString &component ); void setBugDetailsQuery( KURL &, const Bug & ); protected: - virtual KBB::Error parseDomPackageList( const QDomElement &, + virtual KBB::Error parseDomPackageList( const TQDomElement &, Package::List & ); - virtual KBB::Error parseDomBugList( const QDomElement &, Bug::List & ); - virtual KBB::Error parseDomBugDetails( const QDomElement &, BugDetails & ); + virtual KBB::Error parseDomBugList( const TQDomElement &, Bug::List & ); + virtual KBB::Error parseDomBugDetails( const TQDomElement &, BugDetails & ); - QString wrapLines( const QString & ); - bool parseAttributeLine( const QString &line, const QString &key, - QString &result ); - QDateTime parseDate( const QString & ); + TQString wrapLines( const TQString & ); + bool parseAttributeLine( const TQString &line, const TQString &key, + TQString &result ); + TQDateTime parseDate( const TQString & ); }; #endif diff --git a/kbugbuster/backend/error.h b/kbugbuster/backend/error.h index e12bcf61..595c070c 100644 --- a/kbugbuster/backend/error.h +++ b/kbugbuster/backend/error.h @@ -28,14 +28,14 @@ namespace KBB { class Error { public: - Error( const QString &msg = QString::null ) : mMsg( msg ) {} + Error( const TQString &msg = TQString::null ) : mMsg( msg ) {} operator bool() { return !mMsg.isEmpty(); } - QString message() const { return mMsg; } + TQString message() const { return mMsg; } private: - QString mMsg; + TQString mMsg; }; } diff --git a/kbugbuster/backend/htmlparser.cpp b/kbugbuster/backend/htmlparser.cpp index 7e53c1bd..055b8d11 100644 --- a/kbugbuster/backend/htmlparser.cpp +++ b/kbugbuster/backend/htmlparser.cpp @@ -28,22 +28,22 @@ #include <kdebug.h> -#include <qbuffer.h> -#include <qregexp.h> -#include <qtextstream.h> +#include <tqbuffer.h> +#include <tqregexp.h> +#include <tqtextstream.h> -KBB::Error HtmlParser::parseBugList( const QByteArray &data, Bug::List &bugs ) +KBB::Error HtmlParser::parseBugList( const TQByteArray &data, Bug::List &bugs ) { - QBuffer buffer( data ); + TQBuffer buffer( data ); if ( !buffer.open( IO_ReadOnly ) ) { return KBB::Error( "Can't open buffer" ); } - QTextStream ts( &buffer ); + TQTextStream ts( &buffer ); mState = Idle; - QString line; + TQString line; while ( !( line = ts.readLine() ).isNull() ) { KBB::Error err = parseLine( line, bugs ); if ( err ) return err; @@ -52,19 +52,19 @@ KBB::Error HtmlParser::parseBugList( const QByteArray &data, Bug::List &bugs ) return KBB::Error(); } -KBB::Error HtmlParser::parsePackageList( const QByteArray &data, +KBB::Error HtmlParser::parsePackageList( const TQByteArray &data, Package::List &packages ) { init(); - QBuffer buffer( data ); + TQBuffer buffer( data ); if ( !buffer.open( IO_ReadOnly ) ) { return KBB::Error( "Can't open buffer" ); } - QTextStream ts( &buffer ); + TQTextStream ts( &buffer ); - QString line; + TQString line; while ( !( line = ts.readLine() ).isNull() ) { KBB::Error err = parseLine( line, packages ); if ( err ) return err; @@ -84,12 +84,12 @@ void HtmlParser::setPackageListQuery( KURL &url ) url.setFileName( "query.cgi" ); } -KBB::Error HtmlParser::parseLine( const QString &, Bug::List & ) +KBB::Error HtmlParser::parseLine( const TQString &, Bug::List & ) { return KBB::Error(); } -KBB::Error HtmlParser::parseLine( const QString &, Package::List & ) +KBB::Error HtmlParser::parseLine( const TQString &, Package::List & ) { return KBB::Error(); } @@ -98,20 +98,20 @@ void HtmlParser::processResult( Package::List & ) { } -QString HtmlParser::getAttribute( const QString &line, const QString &name ) +TQString HtmlParser::getAttribute( const TQString &line, const TQString &name ) { int pos1 = line.find( name + "=\"" ); - if ( pos1 < 1 ) return QString::null; + if ( pos1 < 1 ) return TQString::null; pos1 += name.length() + 2; int pos2 = line.find( "\"", pos1 ); - if ( pos2 < 1 ) return QString::null; + if ( pos2 < 1 ) return TQString::null; return line.mid( pos1, pos2 - pos1 ); } -bool HtmlParser::getCpts( const QString &line, QString &key, - QStringList &values ) +bool HtmlParser::getCpts( const TQString &line, TQString &key, + TQStringList &values ) { - if ( !line.contains( QRegExp( "\\s*cpts" ) ) ) return false; + if ( !line.contains( TQRegExp( "\\s*cpts" ) ) ) return false; // kdDebug() << "LINE: " << line << endl; int pos1 = line.find( "[" ); @@ -131,7 +131,7 @@ bool HtmlParser::getCpts( const QString &line, QString &key, if ( pos1 >= 0 ) pos2 = line.find( "'", ++pos1 ); while ( pos1 >= 0 && pos2 >= 0 ) { - QString value = line.mid( pos1, pos2 - pos1 ); + TQString value = line.mid( pos1, pos2 - pos1 ); // kdDebug() << " VALUE: " << value << endl; values.append( value ); @@ -143,16 +143,16 @@ bool HtmlParser::getCpts( const QString &line, QString &key, return true; } -KBB::Error HtmlParser_2_10::parseLine( const QString &line, Bug::List &bugs ) +KBB::Error HtmlParser_2_10::parseLine( const TQString &line, Bug::List &bugs ) { if ( line.startsWith( "<TR VALIGN" ) ) { // kdDebug() << "LINE: " << line << endl; - QRegExp re( "show_bug\\.cgi\\?id=(\\d+)" ); + TQRegExp re( "show_bug\\.cgi\\?id=(\\d+)" ); re.search( line ); - QString number = re.cap( 1 ); + TQString number = re.cap( 1 ); // kdDebug() << " NUMBER: " << number << endl; - QString summary; + TQString summary; int pos = line.findRev( "summary>" ); if ( pos >= 0 ) summary = line.mid( pos + 8 ); @@ -168,11 +168,11 @@ KBB::Error HtmlParser_2_10::parseLine( const QString &line, Bug::List &bugs ) return KBB::Error(); } -KBB::Error HtmlParser_2_10::parseLine( const QString &line, +KBB::Error HtmlParser_2_10::parseLine( const TQString &line, Package::List &packages ) { - QString package; - QStringList components; + TQString package; + TQStringList components; if ( getCpts( line, package, components ) ) { packages.append( Package( new PackageImpl( package, "", 0, Person(), @@ -190,7 +190,7 @@ void HtmlParser_2_14_2::init() mState = Idle; } -KBB::Error HtmlParser_2_14_2::parseLine( const QString &line, +KBB::Error HtmlParser_2_14_2::parseLine( const TQString &line, Package::List & ) { switch ( mState ) { @@ -199,8 +199,8 @@ KBB::Error HtmlParser_2_14_2::parseLine( const QString &line, break; case Components: { if ( line.startsWith( "function" ) ) mState = Finished; - QString key; - QStringList values; + TQString key; + TQStringList values; if ( getCpts( line, key, values ) ) { // kdDebug() << "KEY: " << key << " VALUES: " << values.join(",") << endl; if ( values.count() == 2 ) { @@ -217,7 +217,7 @@ KBB::Error HtmlParser_2_14_2::parseLine( const QString &line, void HtmlParser_2_14_2::processResult( Package::List &packages ) { - QMap<QString,QStringList>::ConstIterator it; + TQMap<TQString,TQStringList>::ConstIterator it; for ( it = mComponentsMap.begin(); it != mComponentsMap.end(); ++it ) { packages.append( Package( new PackageImpl( it.key(), "", 0, Person(), it.data() ) ) ); @@ -233,17 +233,17 @@ void HtmlParser_2_17_1::init() mState = Idle; } -KBB::Error HtmlParser_2_17_1::parseBugList( const QByteArray &data, Bug::List &bugs ) +KBB::Error HtmlParser_2_17_1::parseBugList( const TQByteArray &data, Bug::List &bugs ) { return RdfProcessor::parseBugList( data, bugs ); } -KBB::Error HtmlParser_2_17_1::parseLine( const QString & /*line*/, Bug::List &/*bugs*/ ) +KBB::Error HtmlParser_2_17_1::parseLine( const TQString & /*line*/, Bug::List &/*bugs*/ ) { return KBB::Error( "Not implemented" ); } -KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & ) +KBB::Error HtmlParser_2_17_1::parseLine( const TQString &line, Package::List & ) { switch ( mState ) { case Idle: @@ -254,18 +254,18 @@ KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & ) if ( line.contains( "onchange=\"selectProduct" ) ) mState = Products; break; case Components: { - if ( line.contains( QRegExp( "\\s*function" ) ) ) { + if ( line.contains( TQRegExp( "\\s*function" ) ) ) { mState = SearchProducts; } - QString key; - QStringList components; + TQString key; + TQStringList components; if ( getCpts( line, key, components ) ) { mComponents.append( components ); } } case Products: { if ( line.contains( "</select>" ) ) mState = Finished; - QString product = getAttribute( line, "value" ); + TQString product = getAttribute( line, "value" ); if ( !product.isEmpty() ) { kdDebug() << "PRODUCT: " << product << endl; mProducts.append( product ); @@ -282,8 +282,8 @@ KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & ) void HtmlParser_2_17_1::processResult( Package::List &packages ) { - QStringList::ConstIterator itProduct = mProducts.begin(); - QValueList<QStringList>::ConstIterator itComponents = mComponents.begin(); + TQStringList::ConstIterator itProduct = mProducts.begin(); + TQValueList<TQStringList>::ConstIterator itComponents = mComponents.begin(); while( itProduct != mProducts.end() && itComponents != mComponents.end() ) { packages.append( Package( new PackageImpl( *itProduct, "", 0, Person(), diff --git a/kbugbuster/backend/htmlparser.h b/kbugbuster/backend/htmlparser.h index ffb0a22a..b8ad2c6f 100644 --- a/kbugbuster/backend/htmlparser.h +++ b/kbugbuster/backend/htmlparser.h @@ -29,9 +29,9 @@ #include "error.h" #include "rdfprocessor.h" -#include <qstringlist.h> -#include <qvaluelist.h> -#include <qmap.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> +#include <tqmap.h> class HtmlParser : public RdfProcessor { @@ -44,8 +44,8 @@ class HtmlParser : public RdfProcessor HtmlParser( BugServer *s ) : RdfProcessor( s ), mState( Idle ) {} virtual ~HtmlParser() {} - KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs ); - KBB::Error parsePackageList( const QByteArray &data, + KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ); + KBB::Error parsePackageList( const TQByteArray &data, Package::List &packages ); void setPackageListQuery( KURL & ); @@ -53,14 +53,14 @@ class HtmlParser : public RdfProcessor protected: virtual void init(); - virtual KBB::Error parseLine( const QString &line, Bug::List &bugs ); - virtual KBB::Error parseLine( const QString &line, + virtual KBB::Error parseLine( const TQString &line, Bug::List &bugs ); + virtual KBB::Error parseLine( const TQString &line, Package::List &packages ); virtual void processResult( Package::List &packages ); - QString getAttribute( const QString &line, const QString &name ); - bool getCpts( const QString &line, QString &key, QStringList &values ); + TQString getAttribute( const TQString &line, const TQString &name ); + bool getCpts( const TQString &line, TQString &key, TQStringList &values ); }; @@ -70,8 +70,8 @@ class HtmlParser_2_10 : public HtmlParser HtmlParser_2_10( BugServer *s ) : HtmlParser( s ) {} protected: - KBB::Error parseLine( const QString &line, Bug::List &bugs ); - KBB::Error parseLine( const QString &line, Package::List &packages ); + KBB::Error parseLine( const TQString &line, Bug::List &bugs ); + KBB::Error parseLine( const TQString &line, Package::List &packages ); }; @@ -83,12 +83,12 @@ class HtmlParser_2_14_2 : public HtmlParser_2_10 protected: void init(); - KBB::Error parseLine( const QString &line, Package::List &packages ); + KBB::Error parseLine( const TQString &line, Package::List &packages ); void processResult( Package::List &packages ); private: - QMap<QString, QStringList> mComponentsMap; + TQMap<TQString, TQStringList> mComponentsMap; }; @@ -98,19 +98,19 @@ class HtmlParser_2_17_1 : public HtmlParser public: HtmlParser_2_17_1( BugServer *s ) : HtmlParser( s ) {} - KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs ); + KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ); protected: void init(); - KBB::Error parseLine( const QString &line, Bug::List &bugs ); - KBB::Error parseLine( const QString &line, Package::List &packages ); + KBB::Error parseLine( const TQString &line, Bug::List &bugs ); + KBB::Error parseLine( const TQString &line, Package::List &packages ); void processResult( Package::List &packages ); private: - QStringList mProducts; - QValueList<QStringList> mComponents; + TQStringList mProducts; + TQValueList<TQStringList> mComponents; }; #endif diff --git a/kbugbuster/backend/kbbprefs.cpp b/kbugbuster/backend/kbbprefs.cpp index 30f337ab..cfef3418 100644 --- a/kbugbuster/backend/kbbprefs.cpp +++ b/kbugbuster/backend/kbbprefs.cpp @@ -22,8 +22,8 @@ without including the source code for Qt in the source distribution. */ -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <klocale.h> #include <kdebug.h> @@ -54,7 +54,7 @@ KBBPrefs::KBBPrefs() : KConfigSkeleton() addItemBool("ShowVotes", mShowVoted, false); addItemInt("MinimumVotes", mMinVotes, 0); addItemBool("SendBCC",mSendBCC,false); - addItemString("OverrideRecipient",mOverrideRecipient,QString::null); + addItemString("OverrideRecipient",mOverrideRecipient,TQString::null); addItemInt("WrapColumn",mWrapColumn,90); @@ -103,13 +103,13 @@ void KBBPrefs::usrReadConfig() mMessageButtons.clear(); config()->setGroup("MessageButtons"); - QStringList buttonList = config()->readListEntry("ButtonList"); + TQStringList buttonList = config()->readListEntry("ButtonList"); if (buttonList.isEmpty()) { setMessageButtonsDefault(); } else { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = buttonList.begin(); it != buttonList.end(); ++it) { - QString text = config()->readEntry(*it); + TQString text = config()->readEntry(*it); mMessageButtons.insert(*it,text); } } @@ -120,8 +120,8 @@ void KBBPrefs::usrReadConfig() void KBBPrefs::usrWriteConfig() { config()->setGroup("MessageButtons"); - QStringList buttonList; - QMap<QString,QString>::ConstIterator it; + TQStringList buttonList; + TQMap<TQString,TQString>::ConstIterator it; for(it = mMessageButtons.begin();it != mMessageButtons.end();++it) { buttonList.append(it.key()); config()->writeEntry(it.key(),it.data()); diff --git a/kbugbuster/backend/kbbprefs.h b/kbugbuster/backend/kbbprefs.h index 64d7f20d..3c883e7e 100644 --- a/kbugbuster/backend/kbbprefs.h +++ b/kbugbuster/backend/kbbprefs.h @@ -24,7 +24,7 @@ #ifndef KBBPREFS_H #define KBBPREFS_H -#include <qmap.h> +#include <tqmap.h> #include <kconfigskeleton.h> @@ -54,29 +54,29 @@ class KBBPrefs : public KConfigSkeleton public: int mRecentPackagesCount; - QValueList<int> mSplitter1; - QValueList<int> mSplitter2; + TQValueList<int> mSplitter1; + TQValueList<int> mSplitter2; int mMailClient; bool mShowClosedBugs; bool mShowWishes; bool mSendBCC; - QString mOverrideRecipient; + TQString mOverrideRecipient; bool mShowVoted; int mMinVotes; int mWrapColumn; - QMap<QString,QString> mMessageButtons; + TQMap<TQString,TQString> mMessageButtons; int mMsgDlgWidth; int mMsgDlgHeight; - QValueList<int> mMsgDlgSplitter; + TQValueList<int> mMsgDlgSplitter; bool mDebugMode; - QString mCurrentServer; + TQString mCurrentServer; }; #endif diff --git a/kbugbuster/backend/mailsender.cpp b/kbugbuster/backend/mailsender.cpp index ec32405d..59f73db2 100644 --- a/kbugbuster/backend/mailsender.cpp +++ b/kbugbuster/backend/mailsender.cpp @@ -5,7 +5,7 @@ #include <unistd.h> #include <stdio.h> -#include <qtimer.h> +#include <tqtimer.h> #include <klocale.h> #include <kstandarddirs.h> @@ -19,7 +19,7 @@ #include "mailsender.h" #include "smtp.h" -MailSender::MailSender(MailClient client,const QString &smtpServer) : +MailSender::MailSender(MailClient client,const TQString &smtpServer) : m_client( client ), m_smtpServer( smtpServer ) { } @@ -33,13 +33,13 @@ MailSender *MailSender::clone() const return new MailSender(m_client,m_smtpServer); } -bool MailSender::send(const QString &fromName,const QString &fromEmail,const QString &to, - const QString &subject,const QString &body,bool bcc, - const QString &recipient) +bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const TQString &to, + const TQString &subject,const TQString &body,bool bcc, + const TQString &recipient) { - QString from( fromName ); + TQString from( fromName ); if ( !fromEmail.isEmpty() ) - from += QString::fromLatin1( " <%2>" ).arg( fromEmail ); + from += TQString::fromLatin1( " <%2>" ).arg( fromEmail ); kdDebug() << "MailSender::sendMail():\nFrom: " << from << "\nTo: " << to << "\nbccflag:" << bcc << "\nRecipient:" << recipient @@ -53,18 +53,18 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt bool needHeaders = true; - QString command = KStandardDirs::findExe(QString::fromLatin1("sendmail"), - QString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); - if (!command.isNull()) command += QString::fromLatin1(" -oi -t"); + TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"), + TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); + if (!command.isNull()) command += TQString::fromLatin1(" -oi -t"); else { - command = KStandardDirs::findExe(QString::fromLatin1("mail")); + command = KStandardDirs::findExe(TQString::fromLatin1("mail")); if (command.isNull()) return false; // give up - command.append(QString::fromLatin1(" -s ")); + command.append(TQString::fromLatin1(" -s ")); command.append(KProcess::quote(subject)); if (bcc) { - command.append(QString::fromLatin1(" -b ")); + command.append(TQString::fromLatin1(" -b ")); command.append(KProcess::quote(from)); } @@ -78,18 +78,18 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt if (!fd) { kdError() << "Unable to open a pipe to " << command << endl; - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); return false; } - QString textComplete; + TQString textComplete; if (needHeaders) { - textComplete += QString::fromLatin1("From: ") + from + '\n'; - textComplete += QString::fromLatin1("To: ") + to + '\n'; - if (bcc) textComplete += QString::fromLatin1("Bcc: ") + from + '\n'; - textComplete += QString::fromLatin1("Subject: ") + subject + '\n'; - textComplete += QString::fromLatin1("X-Mailer: KBugBuster") + '\n'; + textComplete += TQString::fromLatin1("From: ") + from + '\n'; + textComplete += TQString::fromLatin1("To: ") + to + '\n'; + if (bcc) textComplete += TQString::fromLatin1("Bcc: ") + from + '\n'; + textComplete += TQString::fromLatin1("Subject: ") + subject + '\n'; + textComplete += TQString::fromLatin1("X-Mailer: KBugBuster") + '\n'; } textComplete += '\n'; // end of headers textComplete += body; @@ -103,37 +103,37 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt if (!kapp->dcopClient()->isApplicationRegistered("kmail")) { KMessageBox::error(0,i18n("No running instance of KMail found.")); - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); return false; } emit status( i18n( "Passing mail to KDE email program..." ) ); if (!kMailOpenComposer(to,"", (bcc ? from : ""), subject,body,0,KURL())) { - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); return false; } } else if ( m_client == Direct ) { kdDebug() << "Sending Direct" << endl; - QStringList recipients; + TQStringList recipients; if ( !recipient.isEmpty() ) recipients << recipient; else recipients << to; - QString message = QString::fromLatin1( "From: " ) + from + - QString::fromLatin1( "\nTo: " ) + to + - QString::fromLatin1( "\nSubject: " ) + subject + - QString::fromLatin1( "\nX-Mailer: KBugBuster" ) + - QString::fromLatin1( "\n\n" ) + body; + TQString message = TQString::fromLatin1( "From: " ) + from + + TQString::fromLatin1( "\nTo: " ) + to + + TQString::fromLatin1( "\nSubject: " ) + subject + + TQString::fromLatin1( "\nX-Mailer: KBugBuster" ) + + TQString::fromLatin1( "\n\n" ) + body; Smtp *smtp = new Smtp( fromEmail, recipients, message, m_smtpServer ); - connect( smtp, SIGNAL( status( const QString & ) ), - this, SIGNAL( status( const QString & ) ) ); - connect( smtp, SIGNAL( success() ), - this, SLOT( smtpSuccess() ) ); - connect( smtp, SIGNAL( error( const QString &, const QString & ) ), - this, SLOT( smtpError( const QString &, const QString & ) ) ); + connect( smtp, TQT_SIGNAL( status( const TQString & ) ), + this, TQT_SIGNAL( status( const TQString & ) ) ); + connect( smtp, TQT_SIGNAL( success() ), + this, TQT_SLOT( smtpSuccess() ) ); + connect( smtp, TQT_SIGNAL( error( const TQString &, const TQString & ) ), + this, TQT_SLOT( smtpError( const TQString &, const TQString & ) ) ); smtp->insertChild( this ); // die when smtp dies } else { @@ -143,7 +143,7 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt if (m_client != Direct) { emit finished(); - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); } return true; @@ -158,13 +158,13 @@ void MailSender::smtpSuccess() emit finished(); } -void MailSender::smtpError(const QString &_command, const QString &_response) +void MailSender::smtpError(const TQString &_command, const TQString &_response) { if ( parent() != sender() || !parent()->inherits( "Smtp" ) ) return; - QString command = _command; - QString response = _response; + TQString command = _command; + TQString response = _response; Smtp *smtp = static_cast<Smtp *>( parent() ); smtp->removeChild( this ); @@ -176,18 +176,18 @@ void MailSender::smtpError(const QString &_command, const QString &_response) "response: %2" ).arg( command ).arg( response ) ); emit finished(); - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); } -int MailSender::kMailOpenComposer(const QString& arg0,const QString& arg1, - const QString& arg2,const QString& arg3,const QString& arg4,int arg5, +int MailSender::kMailOpenComposer(const TQString& arg0,const TQString& arg1, + const TQString& arg2,const TQString& arg3,const TQString& arg4,int arg5, const KURL& arg6) { int result = 0; - QByteArray data, replyData; - QCString replyType; - QDataStream arg( data, IO_WriteOnly ); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg( data, IO_WriteOnly ); arg << arg0; arg << arg1; arg << arg2; @@ -195,9 +195,9 @@ int MailSender::kMailOpenComposer(const QString& arg0,const QString& arg1, arg << arg4; arg << arg5; arg << arg6; - if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(QString,QString,QString,QString,QString,int,KURL)", data, replyType, replyData ) ) { + if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(TQString,TQString,TQString,TQString,TQString,int,KURL)", data, replyType, replyData ) ) { if ( replyType == "int" ) { - QDataStream _reply_stream( replyData, IO_ReadOnly ); + TQDataStream _reply_stream( replyData, IO_ReadOnly ); _reply_stream >> result; } else { kdDebug() << "kMailOpenComposer() call failed." << endl; diff --git a/kbugbuster/backend/mailsender.h b/kbugbuster/backend/mailsender.h index 06517f9c..5df42c2a 100644 --- a/kbugbuster/backend/mailsender.h +++ b/kbugbuster/backend/mailsender.h @@ -1,8 +1,8 @@ #ifndef MAILSENDER_H #define MAILSENDER_H -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> class KURL; class Smtp; @@ -13,7 +13,7 @@ class MailSender : public QObject public: enum MailClient { Sendmail = 0, KMail = 1, Direct = 2 }; - MailSender(MailClient,const QString &smtpServer=QString::null); + MailSender(MailClient,const TQString &smtpServer=TQString::null); virtual ~MailSender(); MailSender *clone() const; @@ -25,26 +25,26 @@ class MailSender : public QObject instead of 'to' . (this currently only works in for direct mail sending through SMTP. */ - bool send(const QString &fromName, const QString &fromEmail, - const QString &to,const QString &subject, - const QString &body,bool bcc=false, - const QString &recipient = QString::null); + bool send(const TQString &fromName, const TQString &fromEmail, + const TQString &to,const TQString &subject, + const TQString &body,bool bcc=false, + const TQString &recipient = TQString::null); signals: - void status( const QString &message ); + void status( const TQString &message ); void finished(); private slots: void smtpSuccess(); - void smtpError(const QString &command, const QString &response); + void smtpError(const TQString &command, const TQString &response); private: - int kMailOpenComposer(const QString& arg0,const QString& arg1, - const QString& arg2,const QString& arg3, - const QString& arg4,int arg5,const KURL& arg6); + int kMailOpenComposer(const TQString& arg0,const TQString& arg1, + const TQString& arg2,const TQString& arg3, + const TQString& arg4,int arg5,const KURL& arg6); MailClient m_client; - QString m_smtpServer; + TQString m_smtpServer; }; #endif diff --git a/kbugbuster/backend/package.cpp b/kbugbuster/backend/package.cpp index ae009397..bc9bb6fe 100644 --- a/kbugbuster/backend/package.cpp +++ b/kbugbuster/backend/package.cpp @@ -27,18 +27,18 @@ Package::~Package() { } -QString Package::name() const +TQString Package::name() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->name; } -QString Package::description() const +TQString Package::description() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->description; } @@ -59,10 +59,10 @@ Person Package::maintainer() const return m_impl->maintainer; } -const QStringList Package::components() const +const TQStringList Package::components() const { if ( !m_impl ) - return QStringList(); + return TQStringList(); return m_impl->components; } diff --git a/kbugbuster/backend/package.h b/kbugbuster/backend/package.h index 7b5c69a1..df0a119d 100644 --- a/kbugbuster/backend/package.h +++ b/kbugbuster/backend/package.h @@ -3,7 +3,7 @@ #include "person.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <ksharedptr.h> @@ -12,7 +12,7 @@ class PackageImpl; class Package { public: - typedef QValueList<Package> List; + typedef TQValueList<Package> List; Package(); Package( PackageImpl *impl ); @@ -20,11 +20,11 @@ public: Package &operator=( const Package &rhs ); ~Package(); - QString name() const; - QString description() const; + TQString name() const; + TQString description() const; uint numberOfBugs() const; Person maintainer() const; - const QStringList components() const; + const TQStringList components() const; bool isNull() const { return m_impl == 0; } diff --git a/kbugbuster/backend/packageimpl.h b/kbugbuster/backend/packageimpl.h index c60a1079..30fd00af 100644 --- a/kbugbuster/backend/packageimpl.h +++ b/kbugbuster/backend/packageimpl.h @@ -3,25 +3,25 @@ #include "person.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <kurl.h> #include <ksharedptr.h> struct PackageImpl : public KShared { public: - PackageImpl( const QString &_name, const QString &_description, + PackageImpl( const TQString &_name, const TQString &_description, uint _numberOfBugs, const Person &_maintainer, - const QStringList &_components ) + const TQStringList &_components ) : name( _name ), description( _description ),numberOfBugs( _numberOfBugs ), maintainer( _maintainer ), components(_components) {} - QString name; - QString description; + TQString name; + TQString description; uint numberOfBugs; Person maintainer; - QStringList components; + TQStringList components; }; #endif diff --git a/kbugbuster/backend/packagelistjob.cpp b/kbugbuster/backend/packagelistjob.cpp index 6b05badf..8ebf077e 100644 --- a/kbugbuster/backend/packagelistjob.cpp +++ b/kbugbuster/backend/packagelistjob.cpp @@ -32,8 +32,8 @@ #include <kdebug.h> #include <assert.h> -#include <qdom.h> -#include <qbuffer.h> +#include <tqdom.h> +#include <tqbuffer.h> PackageListJob::PackageListJob( BugServer *server ) : BugJob( server ) @@ -49,7 +49,7 @@ void PackageListJob::start() BugJob::start( server()->packageListUrl() ); } -void PackageListJob::process( const QByteArray &data ) +void PackageListJob::process( const TQByteArray &data ) { Package::List packages; KBB::Error err = server()->processor()->parsePackageList( data, packages ); diff --git a/kbugbuster/backend/packagelistjob.h b/kbugbuster/backend/packagelistjob.h index 0e1bca99..6267158a 100644 --- a/kbugbuster/backend/packagelistjob.h +++ b/kbugbuster/backend/packagelistjob.h @@ -29,7 +29,7 @@ #include "package.h" -#include <qdom.h> +#include <tqdom.h> class PackageListJob : public BugJob { @@ -41,7 +41,7 @@ class PackageListJob : public BugJob void start(); protected: - void process( const QByteArray &data ); + void process( const TQByteArray &data ); signals: void packageListAvailable( const Package::List &pkgs ); diff --git a/kbugbuster/backend/person.cpp b/kbugbuster/backend/person.cpp index a9f63be0..40cf72b7 100644 --- a/kbugbuster/backend/person.cpp +++ b/kbugbuster/backend/person.cpp @@ -2,7 +2,7 @@ #include "person.h" -Person::Person( const QString &fullName ) +Person::Person( const TQString &fullName ) { int emailPos = fullName.find( '<' ); if ( emailPos < 0 ) { @@ -13,7 +13,7 @@ Person::Person( const QString &fullName ) } } -QString Person::fullName(bool html) const +TQString Person::fullName(bool html) const { if( name.isEmpty() ) { @@ -35,11 +35,11 @@ QString Person::fullName(bool html) const } } -Person Person::parseFromString( const QString &_str ) +Person Person::parseFromString( const TQString &_str ) { Person res; - QString str = _str; + TQString str = _str; int ltPos = str.find( '<' ); if ( ltPos != -1 ) @@ -53,9 +53,9 @@ Person Person::parseFromString( const QString &_str ) } int atPos = str.find( '@' ); - int spacedAtPos = str.find( QString::fromLatin1( " at " ) ); + int spacedAtPos = str.find( TQString::fromLatin1( " at " ) ); if ( atPos == -1 && spacedAtPos != -1 ) - str.replace( spacedAtPos, 4, QString::fromLatin1( "@" ) ); + str.replace( spacedAtPos, 4, TQString::fromLatin1( "@" ) ); int spacePos = str.find( ' ' ); while ( spacePos != -1 ) diff --git a/kbugbuster/backend/person.h b/kbugbuster/backend/person.h index f29074f9..7f6da633 100644 --- a/kbugbuster/backend/person.h +++ b/kbugbuster/backend/person.h @@ -1,22 +1,22 @@ #ifndef __person_h__ #define __person_h__ -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> struct Person { Person() {} - Person( const QString &fullName ); - Person( const QString &_name, const QString &_email ) + Person( const TQString &fullName ); + Person( const TQString &_name, const TQString &_email ) : name( _name ), email( _email ) {} - QString name; - QString email; + TQString name; + TQString email; - QString fullName( bool html = false ) const; + TQString fullName( bool html = false ) const; - static Person parseFromString( const QString &str ); + static Person parseFromString( const TQString &str ); }; #endif diff --git a/kbugbuster/backend/processor.cpp b/kbugbuster/backend/processor.cpp index 332b4418..c030761d 100644 --- a/kbugbuster/backend/processor.cpp +++ b/kbugbuster/backend/processor.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qstylesheet.h> +#include <tqstylesheet.h> #include <kdebug.h> #include <kmdcodec.h> @@ -50,7 +50,7 @@ void Processor::setPackageListQuery( KURL &url ) url.setQuery( "?data=versiontable" ); } -void Processor::setBugListQuery( KURL &url, const Package &product, const QString &component ) +void Processor::setBugListQuery( KURL &url, const Package &product, const TQString &component ) { if ( mServer->serverConfig().bugzillaVersion() == "Bugworld" ) { url.setFileName( "bugworld.cgi" ); @@ -58,7 +58,7 @@ void Processor::setBugListQuery( KURL &url, const Package &product, const QStrin url.setFileName( "xmlquery.cgi" ); } - QString user = mServer->serverConfig().user(); + TQString user = mServer->serverConfig().user(); if ( component.isEmpty() ) url.setQuery( "?user=" + user + "&product=" + product.name() ); diff --git a/kbugbuster/backend/processor.h b/kbugbuster/backend/processor.h index cadaa407..8eee8ebf 100644 --- a/kbugbuster/backend/processor.h +++ b/kbugbuster/backend/processor.h @@ -41,15 +41,15 @@ class Processor BugServer *server() const { return mServer; } - virtual KBB::Error parseBugList( const QByteArray &data, + virtual KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ) = 0; - virtual KBB::Error parsePackageList( const QByteArray &data, + virtual KBB::Error parsePackageList( const TQByteArray &data, Package::List &packages ) = 0; - virtual KBB::Error parseBugDetails( const QByteArray &, BugDetails & ) = 0; + virtual KBB::Error parseBugDetails( const TQByteArray &, BugDetails & ) = 0; virtual void setPackageListQuery( KURL & ) = 0; virtual void setBugListQuery( KURL &, const Package &, - const QString &component ) = 0; + const TQString &component ) = 0; virtual void setBugDetailsQuery( KURL &, const Bug & ) = 0; private: diff --git a/kbugbuster/backend/rdfprocessor.cpp b/kbugbuster/backend/rdfprocessor.cpp index 89bb3402..3832e899 100644 --- a/kbugbuster/backend/rdfprocessor.cpp +++ b/kbugbuster/backend/rdfprocessor.cpp @@ -40,7 +40,7 @@ RdfProcessor::~RdfProcessor() { } -KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element, +KBB::Error RdfProcessor::parseDomBugList( const TQDomElement &element, Bug::List &bugs ) { if ( element.tagName() != "RDF" ) { @@ -48,22 +48,22 @@ KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element, return KBB::Error( "No RDF element found" ); } - QDomNodeList bugNodes = element.elementsByTagName( "bz:bug" ); + TQDomNodeList bugNodes = element.elementsByTagName( "bz:bug" ); for( uint i = 0; i < bugNodes.count(); ++i ) { - QString title; + TQString title; Person submitter; - QString bugNr; + TQString bugNr; Bug::Status status = Bug::StatusUndefined; Bug::Severity severity = Bug::SeverityUndefined; Person developerTodo; Bug::BugMergeList mergedList; - QDomNode hit = bugNodes.item( i ); + TQDomNode hit = bugNodes.item( i ); - QDomNode n; + TQDomNode n; for( n = hit.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "bz:id" ) { bugNr = e.text(); @@ -87,7 +87,7 @@ KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element, return KBB::Error(); } -void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const QString &component ) +void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const TQString &component ) { url.setFileName( "buglist.cgi" ); if ( component.isEmpty() ) @@ -97,7 +97,7 @@ void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const QSt if ( KBBPrefs::instance()->mShowVoted ) { url.addQueryItem( "field0-0-0", "votes" ); url.addQueryItem( "type0-0-0", "greaterthan" ); - QString num = QString::number( KBBPrefs::instance()->mMinVotes );; + TQString num = TQString::number( KBBPrefs::instance()->mMinVotes );; url.addQueryItem( "value0-0-0", num ); } } diff --git a/kbugbuster/backend/rdfprocessor.h b/kbugbuster/backend/rdfprocessor.h index 0e0bd780..18406323 100644 --- a/kbugbuster/backend/rdfprocessor.h +++ b/kbugbuster/backend/rdfprocessor.h @@ -31,9 +31,9 @@ class RdfProcessor : public DomProcessor RdfProcessor( BugServer * ); virtual ~RdfProcessor(); - KBB::Error parseDomBugList( const QDomElement &, Bug::List & ); + KBB::Error parseDomBugList( const TQDomElement &, Bug::List & ); - void setBugListQuery( KURL &, const Package &, const QString &component ); + void setBugListQuery( KURL &, const Package &, const TQString &component ); }; #endif diff --git a/kbugbuster/backend/smtp.cpp b/kbugbuster/backend/smtp.cpp index d54cafab..b297af20 100644 --- a/kbugbuster/backend/smtp.cpp +++ b/kbugbuster/backend/smtp.cpp @@ -9,26 +9,26 @@ #include "smtp.h" -#include <qtextstream.h> -#include <qsocket.h> -#include <qtimer.h> +#include <tqtextstream.h> +#include <tqsocket.h> +#include <tqtimer.h> #include <kapplication.h> #include <kmessagebox.h> #include <klocale.h> -Smtp::Smtp( const QString &from, const QStringList &to, - const QString &aMessage, - const QString &server, +Smtp::Smtp( const TQString &from, const TQStringList &to, + const TQString &aMessage, + const TQString &server, unsigned short int port ) { skipReadResponse = false; - mSocket = new QSocket( this ); - connect ( mSocket, SIGNAL( readyRead() ), - this, SLOT( readyRead() ) ); - connect ( mSocket, SIGNAL( connected() ), - this, SLOT( connected() ) ); - connect ( mSocket, SIGNAL( error(int) ), - this, SLOT( socketError(int) ) ); + mSocket = new TQSocket( this ); + connect ( mSocket, TQT_SIGNAL( readyRead() ), + this, TQT_SLOT( readyRead() ) ); + connect ( mSocket, TQT_SIGNAL( connected() ), + this, TQT_SLOT( connected() ) ); + connect ( mSocket, TQT_SIGNAL( error(int) ), + this, TQT_SLOT( socketError(int) ) ); message = aMessage; @@ -40,8 +40,8 @@ Smtp::Smtp( const QString &from, const QStringList &to, emit status( i18n( "Connecting to %1" ).arg( server ) ); mSocket->connectToHost( server, port ); - t = new QTextStream( mSocket ); - t->setEncoding(QTextStream::Latin1); + t = new TQTextStream( mSocket ); + t->setEncoding(TQTextStream::Latin1); } @@ -54,8 +54,8 @@ Smtp::~Smtp() } -void Smtp::send( const QString &from, const QStringList &to, - const QString &aMessage ) +void Smtp::send( const TQString &from, const TQStringList &to, + const TQString &aMessage ) { skipReadResponse = true; message = aMessage; @@ -86,19 +86,19 @@ void Smtp::socketError(int errorCode) { command = "CONNECT"; switch ( errorCode ) { - case QSocket::ErrConnectionRefused: + case TQSocket::ErrConnectionRefused: responseLine = i18n( "Connection refused." ); break; - case QSocket::ErrHostNotFound: + case TQSocket::ErrHostNotFound: responseLine = i18n( "Host Not Found." ); break; - case QSocket::ErrSocketRead: + case TQSocket::ErrSocketRead: responseLine = i18n( "Error reading socket." ); break; default: responseLine = i18n( "Internal error, unrecognized error." ); } - QTimer::singleShot( 0, this, SLOT(emitError()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(emitError()) ); } void Smtp::emitError() { @@ -141,13 +141,13 @@ void Smtp::readyRead() state = smtpBody; } else if ( state == smtpBody && responseLine[0] == '3' ) { command = "DATA"; - QString seperator = ""; + TQString seperator = ""; if (message[message.length() - 1] != '\n') seperator = "\r\n"; *t << message << seperator << ".\r\n"; state = smtpSuccess; } else if ( state == smtpSuccess && responseLine[0] == '2' ) { - QTimer::singleShot( 0, this, SIGNAL(success()) ); + TQTimer::singleShot( 0, this, TQT_SIGNAL(success()) ); } else if ( state == smtpQuit && responseLine[0] == '2' ) { command = "QUIT"; *t << "QUIT\r\n"; @@ -157,7 +157,7 @@ void Smtp::readyRead() } else if ( state == smtpClose ) { // we ignore it } else { // error occurred - QTimer::singleShot( 0, this, SLOT(emitError()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(emitError()) ); state = smtpClose; } @@ -168,7 +168,7 @@ void Smtp::readyRead() t = 0; delete mSocket; mSocket = 0; - QTimer::singleShot( 0, this, SLOT(deleteMe()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(deleteMe()) ); } } diff --git a/kbugbuster/backend/smtp.h b/kbugbuster/backend/smtp.h index d800cb77..b97e3b89 100644 --- a/kbugbuster/backend/smtp.h +++ b/kbugbuster/backend/smtp.h @@ -10,9 +10,9 @@ #ifndef SMTP_H #define SMTP_H -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> class QSocket; class QTextStream; @@ -22,17 +22,17 @@ class Smtp : public QObject Q_OBJECT public: - Smtp( const QString &from, const QStringList &to, const QString &message, - const QString &server, unsigned short int port = 25 ); + Smtp( const TQString &from, const TQStringList &to, const TQString &message, + const TQString &server, unsigned short int port = 25 ); ~Smtp(); - void send( const QString &, const QStringList &, const QString & ); + void send( const TQString &, const TQStringList &, const TQString & ); void quit(); signals: void success(); - void status( const QString & ); - void error( const QString &command, const QString &response ); + void status( const TQString & ); + void error( const TQString &command, const TQString &response ); private slots: void readyRead(); @@ -53,15 +53,15 @@ private: smtpClose }; - QString message; - QString from; - QStringList rcpt; - QSocket *mSocket; - QTextStream * t; + TQString message; + TQString from; + TQStringList rcpt; + TQSocket *mSocket; + TQTextStream * t; int state; - QString response, responseLine; + TQString response, responseLine; bool skipReadResponse; - QString command; + TQString command; }; #endif |