diff options
Diffstat (limited to 'kpackage/pkgInterface.cpp')
-rw-r--r-- | kpackage/pkgInterface.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/kpackage/pkgInterface.cpp b/kpackage/pkgInterface.cpp index eeb6f74..7382ff5 100644 --- a/kpackage/pkgInterface.cpp +++ b/kpackage/pkgInterface.cpp @@ -39,7 +39,7 @@ extern Opts *opts; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -param::param(const QString &nameP, bool initP, bool invertP, const QString &flagP) +param::param(const TQString &nameP, bool initP, bool invertP, const TQString &flagP) { name = nameP; init = initP; @@ -48,7 +48,7 @@ param::param(const QString &nameP, bool initP, bool invertP, const QString &fla flagA = ""; } -param::param(const QString &nameP, bool initP, bool invertP, const QString &flagP, const QString &flagAP ) +param::param(const TQString &nameP, bool initP, bool invertP, const TQString &flagP, const TQString &flagAP ) { name = nameP; init = initP; @@ -64,7 +64,7 @@ param::~param() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -pkgInterface::pkgInterface( ) : QObject(), new_pict(), updated_pict() +pkgInterface::pkgInterface( ) : TQObject(), new_pict(), updated_pict() { packageLoc = 0; @@ -100,14 +100,14 @@ void pkgInterface::setMenu(KActionCollection*, bool ) } ////////////////////////////////////////////////////////////////////////////// -QStringList pkgInterface::depends(const QString &, int ) {return 0;} +TQStringList pkgInterface::depends(const TQString &, int ) {return 0;} -QString pkgInterface::doUninstall(int, const QString &, bool &) {return 0;} -QString pkgInterface::doInstall(int, const QString &, bool &) {return 0;} +TQString pkgInterface::doUninstall(int, const TQString &, bool &) {return 0;} +TQString pkgInterface::doInstall(int, const TQString &, bool &) {return 0;} //////////////////////////////////////////////////////////////////////////// -bool pkgInterface::ifExe(QString exe) { +bool pkgInterface::ifExe(TQString exe) { if (!KGlobal::dirs()->findExe( exe ).isNull()) { return TRUE; } else { @@ -118,12 +118,12 @@ bool pkgInterface::ifExe(QString exe) { } -void pkgInterface::listPackages(QPtrList<packageInfo> *pki) +void pkgInterface::listPackages(TQPtrList<packageInfo> *pki) { listInstalledPackages(pki); if (packageLoc) { for (cacheObj *cp = packageLoc->first(); cp != 0; cp = packageLoc->next()) { - QString s = getDir(cp); + TQString s = getDir(cp); if (!s.isEmpty()) listDir(pki, s, cp->location, cp->subdirs); } @@ -133,20 +133,20 @@ void pkgInterface::listPackages(QPtrList<packageInfo> *pki) void pkgInterface::smerge(packageInfo *) { } -void pkgInterface::listDir(QPtrList<packageInfo> *pki, const QString &fname, const QString &dir, bool subdirs) +void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, const TQString &dir, bool subdirs) { // fname - path to directory or cached remote infromation file // dir - url of directory - QString name, size, rfile; + TQString name, size, rfile; packageInfo *p; - QString sline( queryMsg + fname ); + TQString sline( queryMsg + fname ); kpackage->setStatus(sline); kdDebug() << "listDir fn=" << fname << " dir=" << dir << endl; - QDir d(fname,packagePattern); + TQDir d(fname,packagePattern); if (subdirs) d.setMatchAllDirs( TRUE ); // list contains subdirs @@ -155,16 +155,16 @@ void pkgInterface::listDir(QPtrList<packageInfo> *pki, const QString &fname, con if (d.exists()) { if ( d.isReadable() ) { - QString pn; + TQString pn; const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); // create list iterator - QFileInfo *fi; // pointer for traversing + TQFileInfo *fi; // pointer for traversing while ( (fi=it.current()) ) { // for each entry... if ( fi->isDir() ) { // entry is a subdir - if ( fi->fileName() != QString::fromLatin1(".") && - fi->fileName() != QString::fromLatin1("..") ) + if ( fi->fileName() != TQString::fromLatin1(".") && + fi->fileName() != TQString::fromLatin1("..") ) { // not current dir and not parent dir // -> recursive call: @@ -197,13 +197,13 @@ void pkgInterface::listDir(QPtrList<packageInfo> *pki, const QString &fname, con } } else { // directory is not readable - kdDebug() << QString("WARNING: directory '%1' not readable (will be ignored) !\n").arg(d.absPath() ) << endl; + kdDebug() << TQString("WARNING: directory '%1' not readable (will be ignored) !\n").arg(d.absPath() ) << endl; } } else { - QFile f(fname); + TQFile f(fname); if ( f.open(IO_ReadOnly) ) { - QTextStream t( &f ); - QString name; + TQTextStream t( &f ); + TQString name; while ( !t.eof() ) { name = t.readLine(); if (!t.eof() ) { @@ -222,13 +222,13 @@ void pkgInterface::listDir(QPtrList<packageInfo> *pki, const QString &fname, con } } -packageInfo *pkgInterface::collectDir(const QString &name, const QString &size, const QString &dir) +packageInfo *pkgInterface::collectDir(const TQString &name, const TQString &size, const TQString &dir) { kdDebug() << "collectDir " << name << " " << size << " " << dir << endl; - QString n,v; + TQString n,v; if (parseName(name, &n, &v)) { - QMap<QString, QString> a; + TQMap<TQString, TQString> a; a.insert("group", "NEW"); a.insert("name", n); @@ -245,17 +245,17 @@ packageInfo *pkgInterface::collectDir(const QString &name, const QString &size, return 0; } -QString pkgInterface::getPackList(cacheObj *cp) +TQString pkgInterface::getPackList(cacheObj *cp) { - QString tmpf; + TQString tmpf; int res; - QString url = cp->location; + TQString url = cp->location; kdDebug() << "pkgInterface::getPackList " << url << " " << cp->cacheFile << "\n"; if ((res = cacheObj::newDCache(url, cp->cacheFile, tmpf))) { if (res < 0) return 0; - unlink(QFile::encodeName(tmpf)); + unlink(TQFile::encodeName(tmpf)); if (kpkg) kpackage->setStatus(i18n("Starting Kio")); @@ -263,9 +263,9 @@ QString pkgInterface::getPackList(cacheObj *cp) if (kio.download(url, tmpf)) { if (kpkg) kpackage->setStatus(i18n("Kio finished")); - QFileInfo f(tmpf); + TQFileInfo f(tmpf); if (!(f.exists() && f.size() > 0)) { - unlink(QFile::encodeName(tmpf)); + unlink(TQFile::encodeName(tmpf)); return ""; } else { return tmpf; @@ -280,18 +280,18 @@ QString pkgInterface::getPackList(cacheObj *cp) } } -QString pkgInterface::getDir(cacheObj *cp) { +TQString pkgInterface::getDir(cacheObj *cp) { int res; - QString tmpDir; - QString url = cp->location; + TQString tmpDir; + TQString url = cp->location; if ((res = cacheObj::newDCache(url, cp->cacheFile, tmpDir))) { if (res < 0) - return QString::null; + return TQString::null; Kiod kiod; if (kiod.listDir(url,tmpDir, cp->subdirs)) { - QFileInfo fi (tmpDir); + TQFileInfo fi (tmpDir); CacheList cl (fi.dirPath()); cl.append (fi.fileName()); cl.write(); @@ -299,7 +299,7 @@ QString pkgInterface::getDir(cacheObj *cp) { } else { KpMsgE(i18n("Cannot read folder %1").arg(url),FALSE); unlink(tmpDir.ascii()); - return QString::null; + return TQString::null; } } else { return tmpDir; @@ -309,19 +309,19 @@ QString pkgInterface::getDir(cacheObj *cp) { ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::provMap(const QString &p) +TQString pkgInterface::provMap(const TQString &p) { // kdDebug() << "provMap=>" << p << endl; return p; } ////////////////////////////////////////////////////////////////////////////// -QStringList pkgInterface::verify(packageInfo *, const QStringList &files) +TQStringList pkgInterface::verify(packageInfo *, const TQStringList &files) { int p = 0; uint c = 0; - QStringList errorlist; - QDir d; + TQStringList errorlist; + TQDir d; if (hostName.isEmpty()) { @@ -330,7 +330,7 @@ QStringList pkgInterface::verify(packageInfo *, const QStringList &files) kpackage->setStatus(i18n("Verifying")); kpackage->setPercent(0); - for( QStringList::ConstIterator it = files.begin(); + for( TQStringList::ConstIterator it = files.begin(); it != files.end(); it++) { @@ -352,17 +352,17 @@ QStringList pkgInterface::verify(packageInfo *, const QStringList &files) } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::uninstall(int uninstallFlags, packageInfo *p, bool &test) +TQString pkgInterface::uninstall(int uninstallFlags, packageInfo *p, bool &test) { - QString packs( p->getProperty("name")); + TQString packs( p->getProperty("name")); return doUninstall(uninstallFlags, packs, test); } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::uninstall(int uninstallFlags, QPtrList<packageInfo> *p, bool &test) +TQString pkgInterface::uninstall(int uninstallFlags, TQPtrList<packageInfo> *p, bool &test) { - QString packs; + TQString packs; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { @@ -373,21 +373,21 @@ QString pkgInterface::uninstall(int uninstallFlags, QPtrList<packageInfo> *p, bo } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::install(int installFlags, packageInfo *p, bool &test) +TQString pkgInterface::install(int installFlags, packageInfo *p, bool &test) { - QString fname = p->fetchFilename(); + TQString fname = p->fetchFilename(); return doInstall(installFlags, fname, test); } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::install(int installFlags, QPtrList<packageInfo> *p, bool &test) +TQString pkgInterface::install(int installFlags, TQPtrList<packageInfo> *p, bool &test) { - QString packs = ""; + TQString packs = ""; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { - QString fname = i->fetchFilename(); + TQString fname = i->fetchFilename(); if (!fname.isEmpty()) { packs += fname; packs += " "; @@ -397,7 +397,7 @@ QString pkgInterface::install(int installFlags, QPtrList<packageInfo> *p, bool & } ////////////////////////////////////////////////////////////////////////////// -QStringList pkgInterface::listInstalls(const QStringList &packs, bool , bool &cancel) +TQStringList pkgInterface::listInstalls(const TQStringList &packs, bool , bool &cancel) { cancel = FALSE; return packs; @@ -405,10 +405,10 @@ QStringList pkgInterface::listInstalls(const QStringList &packs, bool , bool &c ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::setOptions(int flags, QPtrList<param> ¶ms) +TQString pkgInterface::setOptions(int flags, TQPtrList<param> ¶ms) { int i; - QString s; + TQString s; param *p; i = 0; @@ -423,12 +423,12 @@ QString pkgInterface::setOptions(int flags, QPtrList<param> ¶ms) return s; } - QStringList pkgInterface::readApt() + TQStringList pkgInterface::readApt() { return 0; } - void pkgInterface::writeApt(const QStringList &) + void pkgInterface::writeApt(const TQStringList &) { } |