summaryrefslogtreecommitdiffstats
path: root/kpackage/packageInfo.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /kpackage/packageInfo.cpp
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpackage/packageInfo.cpp')
-rw-r--r--kpackage/packageInfo.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kpackage/packageInfo.cpp b/kpackage/packageInfo.cpp
index 6ea0ffa..e9d1e14 100644
--- a/kpackage/packageInfo.cpp
+++ b/kpackage/packageInfo.cpp
@@ -66,7 +66,7 @@ packageInfo::packageInfo(TQMap<TQString, TQString> _info, pkgInterface *type)
item = NULL;
packageState = UNSET;
updated = FALSE;
- url = TQString::null;
+ url = TQString();
}
// Another constructor, for a packge with a url
@@ -86,7 +86,7 @@ TQString packageInfo::getProperty(const TQString &property)
{
TQString result = info[property];
if (result.isEmpty()) {
- return TQString::null;
+ return TQString();
}
return result;
}
@@ -209,7 +209,7 @@ int packageInfo::getDigElement(const TQString &str, int *pos)
int val = 0;
if ((s[0] >= '0') && (s[0] <= '9')) {
- nf = s.find(ndig);
+ nf = s.tqfind(ndig);
if (nf >= 0) {
val = s.left(nf).toInt();
} else {
@@ -230,11 +230,11 @@ TQString packageInfo::getNdigElement(const TQString &string, int *pos)
TQString s(string);
if (*pos < 0)
- return TQString::null;
+ return TQString();
s = s.mid(*pos);
if (s.isEmpty())
- return TQString::null;
+ return TQString();
TQString str;
int nf = 0;
@@ -242,7 +242,7 @@ TQString packageInfo::getNdigElement(const TQString &string, int *pos)
TQRegExp idig("[0-9]");
if ((s[0] < '0') || (s[0] > '9') ) {
- nf = s.find(idig);
+ nf = s.tqfind(idig);
if (nf < 0)
nf = s.length();
str = s.left(nf);
@@ -305,7 +305,7 @@ int packageInfo::pnewer(const TQString &s, const TQString &sp)
static bool split(TQString orig, char seperator, TQString &first, TQString &second)
{
- int pos = orig.find(seperator);
+ int pos = orig.tqfind(seperator);
if (pos > 0) {
first = orig.mid(0,pos);
second = orig.mid(pos+1);
@@ -387,11 +387,11 @@ bool packageInfo::display(int treeType)
}
//////////////////////////////////////////////////////////////////////
-// Place the package in a QListView
+// Place the package in a TQListView
KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI)
{
- KpTreeListItem *search = tree->firstChild(), *parent=NULL, *child=NULL;
+ KpTreeListItem *search = tree->firstChild(), *tqparent=NULL, *child=NULL;
TQString qtmp, tmp;
bool doit = FALSE;
@@ -410,23 +410,23 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI)
KpTreeListItem *group;
if( search && (group=findGroup(*it, search)) ) {
- parent = group;
- parent->setOpen(TRUE);
+ tqparent = group;
+ tqparent->setOpen(TRUE);
search = group->firstChild();
} else {
- if (parent) {
- group = new KpTreeListItem(parent, 0, interface->folder, *it);
+ if (tqparent) {
+ group = new KpTreeListItem(tqparent, 0, interface->folder, *it);
} else {
group = new KpTreeListItem(tree, 0, interface->folder, *it);
}
- parent = group;
- parent->setOpen(TRUE);
+ tqparent = group;
+ tqparent->setOpen(TRUE);
search = NULL;
}
cnt++;
}
- tmp = *info.find("name");
+ tmp = *info.tqfind("name");
if(item)
delete item;
@@ -480,13 +480,13 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI)
if (child) {
item = new KpTreeListItem(child, this, pic, tmp, "", summary, sz, ver, over);
} else {
- item = new KpTreeListItem(parent, this, pic, tmp, "", summary, sz, ver, over);
+ item = new KpTreeListItem(tqparent, this, pic, tmp, "", summary, sz, ver, over);
}
if (insertI) {
- parent->setOpen(TRUE);
+ tqparent->setOpen(TRUE);
} else {
- parent->setOpen(FALSE);
+ tqparent->setOpen(FALSE);
}
return item;
@@ -497,7 +497,7 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI)
//////////////////////////////////////////////////////////////////////
-// Get the QListViewItem
+// Get the TQListViewItem
KpTreeListItem *packageInfo::getItem()
{
return item;
@@ -509,7 +509,7 @@ bool packageInfo::smerge( const TQString &exp) {
TQDict<packageInfo> *dirInfoPackages = kpackage->management->dirInfoPackages;
TQString pname = getProperty("name") + exp;
- packageInfo *pi = dirInfoPackages->find(pname);
+ packageInfo *pi = dirInfoPackages->tqfind(pname);
if (pi) {
TQMap<TQString,TQString>::Iterator it;
@@ -554,7 +554,7 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp,
bool shouldUpdate = TRUE;
bool hidden = FALSE;
- packageInfo *pi = dirInstPackages->find(pname);
+ packageInfo *pi = dirInstPackages->tqfind(pname);
if (pi) { // installed version exists
if ((pi->packageState != BAD_INSTALL)
&& (pi->packageState != NOLIST)) {
@@ -564,14 +564,14 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp,
}
}
- packageInfo *pu = dirUninstPackages->find(pname);
+ packageInfo *pu = dirUninstPackages->tqfind(pname);
if (pu) { // available version exists
if ((pu->packageState != BAD_INSTALL)
&& (pu->packageState != NOLIST)) {
if (newer(pu) >= 0) {
shouldUpdate = FALSE;
} else if (!installed) { // If older available package exists, remove it
- dirUninstPackages->remove(*(pu->info.find("name")));
+ dirUninstPackages->remove(*(pu->info.tqfind("name")));
pki->remove(pu);
}
}
@@ -606,7 +606,7 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp,
TQString group = getProperty("group");
if (group == "NEW") {
if (pi->hasProperty("group")) {
- info.replace("group",
+ info.tqreplace("group",
pi->getProperty("group") );
}
}