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