summaryrefslogtreecommitdiffstats
path: root/kpackage/fbsdInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpackage/fbsdInterface.cpp')
-rw-r--r--kpackage/fbsdInterface.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kpackage/fbsdInterface.cpp b/kpackage/fbsdInterface.cpp
index 8b5a6d6..cab1b8a 100644
--- a/kpackage/fbsdInterface.cpp
+++ b/kpackage/fbsdInterface.cpp
@@ -128,7 +128,7 @@ static void insertGroups(TQMap<TQString, TQString> *a, TQString cats)
packageInfo *fbsdInterface::getPackageInfo(char mode, const TQString &pname, const TQString &version) {
TQString name( pname);
bool installed = false;
- kpackage->setStatus(i18n("Getting package info"));
+ kpackage->settqStatus(i18n("Getting package info"));
kdDebug() << "Looking at package " << pname << endl;
@@ -145,7 +145,7 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const TQString &pname, con
cmd += name;
TQStringList list = kpty->run(cmd);
- int last_dir = name.find('/');
+ int last_dir = name.tqfind('/');
if (last_dir != -1) {
a["filename"] = name.mid(last_dir+1);
a["base"] = name.left(last_dir + 1);
@@ -205,7 +205,7 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const TQString &pname, con
}
a["description"] = desc;
} else {
- kpackage->setStatus(TQString::null);
+ kpackage->settqStatus(TQString());
return 0;
}
@@ -213,7 +213,7 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const TQString &pname, con
ret->packageState = installed? packageInfo::INSTALLED : packageInfo::AVAILABLE;
ret->fixup();
if (!installed) ret->smerge(typeID);
- kpackage->setStatus(TQString::null);
+ kpackage->settqStatus(TQString());
return ret;
}
@@ -234,7 +234,7 @@ TQStringList fbsdInterface::getFileList(packageInfo *p) {
// Run pkg_info on the package name to get the file list.
// The file list is returned on stdout, one per line.
- kpackage->setStatus(i18n("Getting file list"));
+ kpackage->settqStatus(i18n("Getting file list"));
TQStringList ret;
@@ -249,7 +249,7 @@ TQStringList fbsdInterface::getFileList(packageInfo *p) {
} else {
if (!p->hasProperty("name")) {
ret.append(i18n("Can't find package name!"));
- kpackage->setStatus(TQString::null);
+ kpackage->settqStatus(TQString());
return ret;
}
@@ -270,7 +270,7 @@ TQStringList fbsdInterface::getFileList(packageInfo *p) {
ret = list;
- kpackage->setStatus(TQString::null);
+ kpackage->settqStatus(TQString());
return ret;
}
@@ -335,7 +335,7 @@ TQStringList fbsdInterface::FindFile(const TQString &, bool) {
bool fbsdInterface::parseName(const TQString &name, TQString *n, TQString *v) {
int m1;
- m1 = name.findRev('-');
+ m1 = name.tqfindRev('-');
if (m1 <= 0) return false;
*n = name.left(m1);
*v = name.right(name.length() - m1 - 1);
@@ -347,7 +347,7 @@ void fbsdInterface::addNV(TQMap<TQString, TQString> &d, const TQString &name) {
if (!parseName(name, &n, &v)) {
n = name;
- v = TQString::null;
+ v = TQString();
}
d.insert("name", n);
@@ -394,7 +394,7 @@ void fbsdInterface::listPackages(TQPtrList<packageInfo> *pki) {
listInstalledPackages(pki);
- TQDictIterator<bsdPortsIndexItem> it( ports ); // See QDictIterator
+ TQDictIterator<bsdPortsIndexItem> it( ports ); // See TQDictIterator
for( ; it.current(); ++it ) {
bsdPortsIndexItem *scan = it.current();
if (!scan->installed /*&& scan->bin */) {
@@ -482,7 +482,7 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a)
parseItem(it, name, value, INFO_SEPARATOR, list); // Information
parseItem(it, name, value, INFO_SEPARATOR, list); // Path
- int pos = value.findRev('/');
+ int pos = value.tqfindRev('/');
value.truncate(pos);
a["group"] = value;
} else {
@@ -498,7 +498,7 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a)
// Open a pipe to a pkg_info process in order to read the comment, name
// and description for the packages.
- kpackage->setStatus(i18n("Querying BSD packages database for installed packages"));
+ kpackage->settqStatus(i18n("Querying BSD packages database for installed packages"));
TQString cmd = PKG_INFO_BIN;
cmd += " -acdl ";
@@ -527,8 +527,8 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a)
// Find the last word on this line (which should be the package name) minus a trailing :.
TQString pkg = name.section(' ',-1);
if (pkg.isEmpty()) {
- KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").arg(value), TRUE);
- kpackage->setStatus(TQString::null);
+ KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").tqarg(value), TRUE);
+ kpackage->settqStatus(TQString());
return;
} else {
if (pkg[pkg.length()-1] == ':') {
@@ -577,11 +577,11 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a)
}
-bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const TQString &dname) : bin(binaries), port(!binaries), installed(false) {
+bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *tqparent, char *desc, bool binaries, const TQString &dname) : bin(binaries), port(!binaries), installed(false) {
fields = TQStringList::split('|', desc, TRUE);
TQString name = fields[NAME];
- bsdPortsIndexItem *port = parent->ports[name];
+ bsdPortsIndexItem *port = tqparent->ports[name];
if (port) {
port->bin = port->bin || bin;
port->port = port->port || port;
@@ -600,7 +600,7 @@ bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool bin
}
-void bsdPortsIndexItem::processFile(fbsdInterface *parent, const TQString &fname, bool binaries, const TQString &dname) {
+void bsdPortsIndexItem::processFile(fbsdInterface *tqparent, const TQString &fname, bool binaries, const TQString &dname) {
// Read the file in to a buffer and null terminate it.
struct stat s;
@@ -627,11 +627,11 @@ void bsdPortsIndexItem::processFile(fbsdInterface *parent, const TQString &fname
// Go through each line and create a new bsdPortsIndexItem.
char *line = strtok(index, "\n");
while (line != 0) {
- bsdPortsIndexItem *i = new bsdPortsIndexItem(parent, line, binaries, dname + "/All");
+ bsdPortsIndexItem *i = new bsdPortsIndexItem(tqparent, line, binaries, dname + "/All");
if (i->fields[NAME].isEmpty()) {
delete i;
} else {
- parent->ports.insert(i->fields[NAME] , i);
+ tqparent->ports.insert(i->fields[NAME] , i);
}
line = strtok(0, "\n");
}