summaryrefslogtreecommitdiffstats
path: root/kpackage/debInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpackage/debInterface.cpp')
-rw-r--r--kpackage/debInterface.cpp120
1 files changed, 60 insertions, 60 deletions
diff --git a/kpackage/debInterface.cpp b/kpackage/debInterface.cpp
index 4c79485..41146fe 100644
--- a/kpackage/debInterface.cpp
+++ b/kpackage/debInterface.cpp
@@ -78,7 +78,7 @@ DEB::~DEB()
//////////////////////////////////////////////////////////////////////////////
// check if debian file
-bool DEB::isType(char *buf, const QString &)
+bool DEB::isType(char *buf, const TQString &)
{
if (hasProgram) {
if (!strcmp(buf,"!<arch>\n")) {
@@ -92,13 +92,13 @@ bool DEB::isType(char *buf, const QString &)
}
}
-void DEB::distPackages(QPtrList<packageInfo> *, cacheObj *)
+void DEB::distPackages(TQPtrList<packageInfo> *, cacheObj *)
{
}
-void DEB::listUnIPackages(QPtrList<packageInfo> *pki, LcacheObj *pCache)
+void DEB::listUnIPackages(TQPtrList<packageInfo> *pki, LcacheObj *pCache)
{
- QString s;
+ TQString s;
cacheObj *cp;
for (cp = pCache->first(); cp != 0; cp = pCache->next()) {
@@ -119,7 +119,7 @@ void DEB::listUnIPackages(QPtrList<packageInfo> *pki, LcacheObj *pCache)
}
}
-bool DEB::parseName(const QString &name, QString *n, QString *v)
+bool DEB::parseName(const TQString &name, TQString *n, TQString *v)
{
int d1, d2, s1;
@@ -138,17 +138,17 @@ bool DEB::parseName(const QString &name, QString *n, QString *v)
return FALSE;
}
-void DEB::listInstalledPackages(QPtrList<packageInfo> *pki)
+void DEB::listInstalledPackages(TQPtrList<packageInfo> *pki)
{
listPackList(pki,STATUS,0);
}
-void DEB::listPackList(QPtrList<packageInfo> *pki, const QString &fname, cacheObj *cp)
+void DEB::listPackList(TQPtrList<packageInfo> *pki, const TQString &fname, cacheObj *cp)
{
bool local = FALSE;
packageInfo *p;
- QStringList list;
- QString sline( i18n("Querying DEB package list: ")+fname );
+ TQStringList list;
+ TQString sline( i18n("Querying DEB package list: ")+fname );
if (cp) {
KURL u(cp->base);
@@ -158,12 +158,12 @@ void DEB::listPackList(QPtrList<packageInfo> *pki, const QString &fname, cacheOb
kpackage->setStatus(sline);
kpackage->setPercent(0);
- QFile file(STATUS);
- QString s;
+ TQFile file(STATUS);
+ TQString s;
bool fileOpened= file.open(IO_ReadOnly);
if (fileOpened) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
s = "";
while ( !s.isNull() ) {
s = stream.readLine();
@@ -190,7 +190,7 @@ void DEB::listPackList(QPtrList<packageInfo> *pki, const QString &fname, cacheOb
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
-packageInfo *DEB::getPackageInfo(char mode, const QString &name, const QString &)
+packageInfo *DEB::getPackageInfo(char mode, const TQString &name, const TQString &)
{
if (mode == 'i') {
if (hostName.isEmpty()) {
@@ -202,19 +202,19 @@ packageInfo *DEB::getPackageInfo(char mode, const QString &name, const QString &
return getUPackageInfo(name);
}
-packageInfo *DEB::getIPackageInfo( const QString &name)
+packageInfo *DEB::getIPackageInfo( const TQString &name)
{
// query an installed package!
packageInfo *pki = 0;
- QString search;
- QStringList list;
+ TQString search;
+ TQStringList list;
search = "Package: "+ name;
- QFile f(STATUS);
+ TQFile f(STATUS);
if ( f.open(IO_ReadOnly) ) {
- QTextStream t( &f );
- QString s;
+ TQTextStream t( &f );
+ TQString s;
while ( !t.eof() ) {
s = t.readLine();
@@ -238,15 +238,15 @@ packageInfo *DEB::getIPackageInfo( const QString &name)
return pki;
}
-packageInfo *DEB::getIRPackageInfo( const QString &name)
+packageInfo *DEB::getIRPackageInfo( const TQString &name)
{
// query an remote installed package
packageInfo *pki = 0;
- QString s = "dpkg --status ";
+ TQString s = "dpkg --status ";
s += name;
- QStringList list = kpty->run(s);
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ TQStringList list = kpty->run(s);
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
// kdDebug() << "U=" << *it << "\n";
if ((*it).find("Package:") >= 0) {
kdDebug() << "found\n";
@@ -269,16 +269,16 @@ packageInfo *DEB::getIRPackageInfo( const QString &name)
return pki;
}
-packageInfo *DEB::getUPackageInfo( const QString &name)
+packageInfo *DEB::getUPackageInfo( const TQString &name)
{
// query an uninstalled package
packageInfo *pki = 0;
- QString s = "dpkg --info ";
+ TQString s = "dpkg --info ";
s += KProcess::quote(name);
- QStringList list = kpty->run(s);
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ TQStringList list = kpty->run(s);
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
// kdDebug() << "U=" << *it << "\n";
if ((*it).find("Package:") >= 0) {
// kdDebug() << "found\n";
@@ -301,20 +301,20 @@ packageInfo *DEB::getUPackageInfo( const QString &name)
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
-packageInfo *DEB::collectInfo(QStringList &ln, pkgInterface *pkgInt)
+packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt)
{
if (!pkgInt) {
pkgInt = this;
}
- QMap<QString, QString> a;
+ TQMap<TQString, TQString> a;
- QString key, val;
+ TQString key, val;
bool bad_install = FALSE;
bool available = FALSE;
bool haveName = FALSE;
- for ( QStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) {
+ for ( TQStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) {
loop:
int col = (*it).find(':');
key = ((*it).left(col)).lower();
@@ -334,7 +334,7 @@ packageInfo *DEB::collectInfo(QStringList &ln, pkgInterface *pkgInt)
}
} else if (key == "description") {
a.insert("summary", val);
- QString desc;
+ TQString desc;
while (++it != ln.end()) {
if ((*it)[0] == ' ') {
desc += *it;
@@ -394,19 +394,19 @@ packageInfo *DEB::collectInfo(QStringList &ln, pkgInterface *pkgInt)
//////////////////////////////////////////////////////////////////////////////
-QStringList DEB::getChangeLog(packageInfo *p) {
- QString fn( p->getFilename());
+TQStringList DEB::getChangeLog(packageInfo *p) {
+ TQString fn( p->getFilename());
if(!fn.isEmpty())
return 0;
else
return getIChangeLog(p);
}
-QStringList DEB::getIChangeLog(packageInfo *p)
+TQStringList DEB::getIChangeLog(packageInfo *p)
{
- QString from;
- QStringList ret;
- QString name = p->getProperty("name");
+ TQString from;
+ TQStringList ret;
+ TQString name = p->getProperty("name");
from = "zcat /usr/share/doc/";
from += name;
@@ -447,9 +447,9 @@ bool DEB::changeTab(packageInfo *p) {
//////////////////////////////////////////////////////////////////////////////
-QStringList DEB::getFileList(packageInfo *p)
+TQStringList DEB::getFileList(packageInfo *p)
{
- QString fn( p->getFilename());
+ TQString fn( p->getFilename());
if(!fn.isEmpty())
return getUFileList(fn);
else
@@ -457,13 +457,13 @@ QStringList DEB::getFileList(packageInfo *p)
}
// query an installed package
-QStringList DEB::getIFileList(packageInfo *p)
+TQStringList DEB::getIFileList(packageInfo *p)
{
FILE *file;
- QString name = p->getProperty("name");
- QStringList filelist;
+ TQString name = p->getProperty("name");
+ TQStringList filelist;
- QString vb( INFODIR + name + ".list");
+ TQString vb( INFODIR + name + ".list");
file= fopen(vb.ascii(),"r");
if (file) {
@@ -478,17 +478,17 @@ QStringList DEB::getIFileList(packageInfo *p)
}
// query an uninstalled package
-QStringList DEB::getUFileList(const QString &fn)
+TQStringList DEB::getUFileList(const TQString &fn)
{
- QString s = "dpkg --contents ";
+ TQString s = "dpkg --contents ";
s += "'";
s += fn;
s += "'";
- QStringList filelist = kpty->run(s);
+ TQStringList filelist = kpty->run(s);
int pt = -1;
- for ( QStringList::Iterator it = filelist.begin();
+ for ( TQStringList::Iterator it = filelist.begin();
it != filelist.end(); ++it ) {
// kdDebug() << "F=" << *it << "\n";
if (pt < 0) {
@@ -501,21 +501,21 @@ QStringList DEB::getUFileList(const QString &fn)
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
-QStringList DEB::FindFile(const QString &name, bool)
+TQStringList DEB::FindFile(const TQString &name, bool)
{
- QString s = "dpkg -S ";
+ TQString s = "dpkg -S ";
s += name;
- QStringList filelist = kpty->run(s);
+ TQStringList filelist = kpty->run(s);
- for ( QStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) {
+ for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) {
int p = (*it).find(": ");
if( p !=-1 )
(*it).replace(p, 2, "\t");
}
if (filelist.count() == 1) {
- QStringList::Iterator it = filelist.begin();
+ TQStringList::Iterator it = filelist.begin();
if ((*it).find("not found") >= 0) {
filelist.remove(it);
}
@@ -543,10 +543,10 @@ void DEB::setAvail(LcacheObj *slist)
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
-QString DEB::uninstall(int uninstallFlags, QPtrList<packageInfo> *p,
+TQString DEB::uninstall(int uninstallFlags, TQPtrList<packageInfo> *p,
bool &test)
{
- QString packs = "";
+ TQString packs = "";
packageInfo *i;
for (i = p->first(); i!= 0; i = p->next()) {
@@ -557,14 +557,14 @@ QString DEB::uninstall(int uninstallFlags, QPtrList<packageInfo> *p,
}
//////////////////////////////////////////////////////////////////////////////
-QString DEB::install(int installFlags, QPtrList<packageInfo> *p,
+TQString DEB::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 += KProcess::quote(fname);
packs += " ";
@@ -579,9 +579,9 @@ QString DEB::install(int installFlags, QPtrList<packageInfo> *p,
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
-QString DEB::doInstall(int installFlags, const QString &packs, bool &test)
+TQString DEB::doInstall(int installFlags, const TQString &packs, bool &test)
{
- QString s = "dpkg -i ";
+ TQString s = "dpkg -i ";
s += setOptions(installFlags, paramsInst);
s += packs;