diff options
Diffstat (limited to 'kbugbuster/backend/bugsystem.cpp')
-rw-r--r-- | kbugbuster/backend/bugsystem.cpp | 118 |
1 files changed, 59 insertions, 59 deletions
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(); |