diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 20:34:22 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 20:34:22 +0000 |
commit | b09bffed6b43262948018dfb0f11890850ddf7c1 (patch) | |
tree | 138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /kpackage | |
parent | 6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff) | |
download | tdeadmin-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')
47 files changed, 422 insertions, 384 deletions
diff --git a/kpackage/cache.cpp b/kpackage/cache.cpp index a50e838..d60be2f 100644 --- a/kpackage/cache.cpp +++ b/kpackage/cache.cpp @@ -60,7 +60,7 @@ TQString cacheObj::PDir() TQDir d(tmpd); if (!d.exists()) { if (!d.mkdir(tmpd)) { - KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE); + KpMsgE(i18n("Cannot create folder %1").tqarg(tmpd),TRUE); tmpd = ""; } else { chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); @@ -81,7 +81,7 @@ TQString cacheObj::CDir() TQDir d(tmpd); if (!d.exists()) { if (!d.mkdir(tmpd)) { - KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE); + KpMsgE(i18n("Cannot create folder %1").tqarg(tmpd),TRUE); tmpd = ""; } else { chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); @@ -95,7 +95,7 @@ int cacheObj::newDCache(const TQString &url, const TQString &fn, TQString &fnam KURL u(url); if ( !u.isValid() ) { - KpMsgE(i18n("Malformed URL: %1").arg(url),TRUE); + KpMsgE(i18n("Malformed URL: %1").tqarg(url),TRUE); return -1; } @@ -193,7 +193,7 @@ void CacheList::read () while (!stream.eof()) { line = stream.readLine() ; if (line[0] != '#') { // not a comment - append (line) ; // to this QStringList + append (line) ; // to this TQStringList } } CLFile.close() ; diff --git a/kpackage/cache.h b/kpackage/cache.h index 2a54b7c..86cac1e 100644 --- a/kpackage/cache.h +++ b/kpackage/cache.h @@ -51,7 +51,7 @@ public: TQString option; bool subdirs; - cacheObj(const TQString &Pbase, const TQString &Plocation, const TQString &PcacheFile, const TQString &Poption = TQString::null, bool Psubdirs = FALSE); + cacheObj(const TQString &Pbase, const TQString &Plocation, const TQString &PcacheFile, const TQString &Poption = TQString(), bool Psubdirs = FALSE); ~cacheObj(); static TQString PDir(); @@ -88,7 +88,7 @@ public: /** * @short the list of cached files in a directory stored in the file "kpackage_cachelist" **/ -class CacheList : public QStringList +class CacheList : public TQStringList { public: /** diff --git a/kpackage/debAptInterface.cpp b/kpackage/debAptInterface.cpp index 9139adf..d453726 100644 --- a/kpackage/debAptInterface.cpp +++ b/kpackage/debAptInterface.cpp @@ -100,19 +100,19 @@ bool DEBAPT::isType(char *, const TQString &) void DEBAPT::makeMenu(KActionCollection* act) { - updateM = new KAction( i18n("&Update"), TQString::null, + updateM = new KAction( i18n("&Update"), TQString(), 0, this, TQT_SLOT(updateS()), act, "debapt_update"); - upgradeM = new KAction( i18n("U&pgrade"), TQString::null, + upgradeM = new KAction( i18n("U&pgrade"), TQString(), 0, this, TQT_SLOT(upgradeS()), act, "debapt_upgrade"); - fixupM = new KAction( i18n("&Fixup"), TQString::null, + fixupM = new KAction( i18n("&Fixup"), TQString(), 0, this, TQT_SLOT(fixupS()), act, "debapt_fixup"); - fileM = new KAction( i18n("&Apt-File Update"), TQString::null, + fileM = new KAction( i18n("&Apt-File Update"), TQString(), 0, this, TQT_SLOT(fileS()), act, "debapt_file"); } @@ -156,7 +156,7 @@ void DEBAPT::fileS() kprun->exec(); } } else { - KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), TRUE); + KpMsg("Error",i18n("The %1 program needs to be installed").tqarg("apt-file"), TRUE); } } @@ -185,13 +185,13 @@ void DEBAPT::listRPack(TQPtrList<packageInfo> *pki) packageInfo *p; TQStringList plist; - kpackage->setStatus(i18n("Querying DEB APT remote package list: %1").arg(hostName)); + kpackage->settqStatus(i18n("Querying DEB APT remote package list: %1").tqarg(hostName)); kpackage->setPercent(0); TQString cmd = "cat " STATUS; TQStringList list = kpty->run(cmd); - kpackage->setStatus(i18n("Processing DEB APT remote package list: %1").arg(hostName)); + kpackage->settqStatus(i18n("Processing DEB APT remote package list: %1").tqarg(hostName)); // kdDebug() << "P=" << list.count() <<"\n"; kpackage->setPercent(50); @@ -228,7 +228,7 @@ void DEBAPT::listRPack(TQPtrList<packageInfo> *pki) } list.clear(); - kpackage->setStatus(i18n("DEB APT")); + kpackage->settqStatus(i18n("DEB APT")); kpackage->setPercent(100); } @@ -241,16 +241,16 @@ void DEBAPT::listAvail(TQPtrList<packageInfo> *pki) // kdDebug() << "H=" << hostName << "\n"; if (hostName.isEmpty()) - kpackage->setStatus(i18n("Querying DEB APT available list")); + kpackage->settqStatus(i18n("Querying DEB APT available list")); else - kpackage->setStatus(i18n("Querying DEB APT available list: %1").arg(hostName)); + kpackage->settqStatus(i18n("Querying DEB APT available list: %1").tqarg(hostName)); kpackage->setPercent(0); TQStringList list = kpty->run("apt-cache dumpavail"); if (hostName.isEmpty()) - kpackage->setStatus(i18n("Processing DEB APT available list")); + kpackage->settqStatus(i18n("Processing DEB APT available list")); else - kpackage->setStatus(i18n("Processing DEB APT available list: %1").arg(hostName)); + kpackage->settqStatus(i18n("Processing DEB APT available list: %1").tqarg(hostName)); // kdDebug() << "A=" << list.count() <<"\n"; kpackage->setPercent(50); @@ -284,7 +284,7 @@ void DEBAPT::listAvail(TQPtrList<packageInfo> *pki) } list.clear(); - kpackage->setStatus(i18n("DEB APT")); + kpackage->settqStatus(i18n("DEB APT")); kpackage->setPercent(100); } @@ -318,7 +318,7 @@ TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool TQString packAll; for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { // kdDebug() << "M=" << *it << "\n"; - if ((*it).find(match) >= 0 || extras) { + if ((*it).tqfind(match) >= 0 || extras) { if (extras) { if ((*it)[0] == ' ') { packAll += *it; @@ -351,21 +351,21 @@ TQStringList DEBAPT::FindFile(const TQString &name, bool searchAll) TQStringList filelist = kpty->run(s); for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { - int p = (*it).find(": "); + int p = (*it).tqfind(": "); if( p !=-1 ) - (*it).replace(p, 2, "\t"); + (*it).tqreplace(p, 2, "\t"); } if (filelist.count() == 1) { TQStringList::Iterator it = filelist.begin(); - if ((*it).find("not found") >= 0) { + if ((*it).tqfind("not found") >= 0) { filelist.remove(it); } } return filelist; } else { - KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), TRUE); + KpMsg("Error",i18n("The %1 program needs to be installed").tqarg("apt-file"), TRUE); TQStringList nill; return nill; } @@ -514,10 +514,10 @@ void DEBAPT::writeApt(const TQStringList &list) { TQString cmd = "sh -c \"/bin/echo -e '"; for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { TQString s = *it; - s.replace("\""," "); - s.replace("'"," "); - s.replace("!"," "); - s.replace("`"," "); + s.tqreplace("\""," "); + s.tqreplace("'"," "); + s.tqreplace("!"," "); + s.tqreplace("`"," "); cmd += s; cmd += "\n"; } diff --git a/kpackage/debAptInterface.h b/kpackage/debAptInterface.h index 2e23ac5..e7b78ea 100644 --- a/kpackage/debAptInterface.h +++ b/kpackage/debAptInterface.h @@ -38,6 +38,7 @@ class DEBAPT: public DEB { Q_OBJECT + TQ_OBJECT public: DEBAPT(); diff --git a/kpackage/debDpkgInterface.h b/kpackage/debDpkgInterface.h index fe9f422..2f83b79 100644 --- a/kpackage/debDpkgInterface.h +++ b/kpackage/debDpkgInterface.h @@ -38,6 +38,7 @@ class cacheObj; class DEBDPKG: public DEB { Q_OBJECT + TQ_OBJECT public: DEBDPKG(); diff --git a/kpackage/debInterface.cpp b/kpackage/debInterface.cpp index 41146fe..8ad5226 100644 --- a/kpackage/debInterface.cpp +++ b/kpackage/debInterface.cpp @@ -123,11 +123,11 @@ bool DEB::parseName(const TQString &name, TQString *n, TQString *v) { int d1, d2, s1; - s1 = name.findRev('.'); + s1 = name.tqfindRev('.'); if (s1 > 0) { - d2 = name.findRev('-',s1-1); + d2 = name.tqfindRev('-',s1-1); if (d2 > 0) { - d1 = name.findRev('_',d2-1); + d1 = name.tqfindRev('_',d2-1); if (d1 < 0) d1 = d2; *n = name.left(d1); @@ -155,7 +155,7 @@ void DEB::listPackList(TQPtrList<packageInfo> *pki, const TQString &fname, cache local = u.isLocalFile(); } - kpackage->setStatus(sline); + kpackage->settqStatus(sline); kpackage->setPercent(0); TQFile file(STATUS); @@ -248,7 +248,7 @@ packageInfo *DEB::getIRPackageInfo( const TQString &name) TQStringList list = kpty->run(s); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // kdDebug() << "U=" << *it << "\n"; - if ((*it).find("Package:") >= 0) { + if ((*it).tqfind("Package:") >= 0) { kdDebug() << "found\n"; while (it != list.begin()) { list.remove(list.begin()); @@ -280,7 +280,7 @@ packageInfo *DEB::getUPackageInfo( const TQString &name) TQStringList list = kpty->run(s); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // kdDebug() << "U=" << *it << "\n"; - if ((*it).find("Package:") >= 0) { + if ((*it).tqfind("Package:") >= 0) { // kdDebug() << "found\n"; while (it != list.begin()) { list.remove(list.begin()); @@ -316,7 +316,7 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) for ( TQStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) { loop: - int col = (*it).find(':'); + int col = (*it).tqfind(':'); key = ((*it).left(col)).lower(); if (key[0] == ' ') { key.remove(0,1); @@ -354,7 +354,7 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) } else if (key == "section") { a.insert("group", val); } else if (key == "status") { - if ((val.find("not-installed") >= 0) || (val.find("config-files") >= 0)) { + if ((val.tqfind("not-installed") >= 0) || (val.tqfind("config-files") >= 0)) { return 0; } if (val != "install ok installed" && @@ -492,7 +492,7 @@ TQStringList DEB::getUFileList(const TQString &fn) it != filelist.end(); ++it ) { // kdDebug() << "F=" << *it << "\n"; if (pt < 0) { - pt = (*it).findRev(' '); + pt = (*it).tqfindRev(' '); } (*it) = (*it).mid(pt + 1); } @@ -509,14 +509,14 @@ TQStringList DEB::FindFile(const TQString &name, bool) TQStringList filelist = kpty->run(s); for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { - int p = (*it).find(": "); + int p = (*it).tqfind(": "); if( p !=-1 ) - (*it).replace(p, 2, "\t"); + (*it).tqreplace(p, 2, "\t"); } if (filelist.count() == 1) { TQStringList::Iterator it = filelist.begin(); - if ((*it).find("not found") >= 0) { + if ((*it).tqfind("not found") >= 0) { filelist.remove(it); } } diff --git a/kpackage/debInterface.h b/kpackage/debInterface.h index 9cc450d..78bfe4c 100644 --- a/kpackage/debInterface.h +++ b/kpackage/debInterface.h @@ -54,6 +54,7 @@ class cacheObj; class DEB: public pkgInterface { Q_OBJECT + TQ_OBJECT public: DEB(); 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"); } diff --git a/kpackage/fbsdInterface.h b/kpackage/fbsdInterface.h index 4966711..800ef04 100644 --- a/kpackage/fbsdInterface.h +++ b/kpackage/fbsdInterface.h @@ -47,6 +47,7 @@ class bsdPortsIndexItem; class fbsdInterface : public pkgInterface { Q_OBJECT + TQ_OBJECT public: fbsdInterface(); @@ -117,7 +118,7 @@ public: * * dname is the name of the base directory of this ports/packages tree. */ - bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const TQString &dname); + bsdPortsIndexItem(fbsdInterface *tqparent, char *desc, bool binaries, const TQString &dname); /** @short true if this has a binary packages. */ bool bin; @@ -145,7 +146,7 @@ public: * binaries should be true if the file is an index for packages, false for ports. * dname is the base directory. */ - static void processFile(fbsdInterface *parent, const TQString &fname, bool binaries, const TQString &dname); + static void processFile(fbsdInterface *tqparent, const TQString &fname, bool binaries, const TQString &dname); private: unsigned int name_hash; diff --git a/kpackage/findf.cpp b/kpackage/findf.cpp index 9b51944..651b50f 100644 --- a/kpackage/findf.cpp +++ b/kpackage/findf.cpp @@ -43,17 +43,17 @@ extern pkgInterface *kpinterface[]; extern Opts *opts; -FindF::FindF(TQWidget *parent) - : KDialogBase(parent, "find_file", false, +FindF::FindF(TQWidget *tqparent) + : KDialogBase(tqparent, "find_file", false, i18n("Find File"), User1 | Close, User1, true, - KGuiItem(i18n("&Find"),"filefind")) + KGuiItem(i18n("&Find"),"filetqfind")) { tick = UserIcon("ptick"); TQFrame *page = makeMainWidget(); - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); TQVBoxLayout* vtop = new TQVBoxLayout( page, 10, 10, "vtop"); TQFrame *frame1 = new TQGroupBox(i18n("Find Package"), page, "frame1"); @@ -68,7 +68,7 @@ FindF::FindF(TQWidget *parent) value->setFocus(); TQLabel *valueLabel = new TQLabel(value, i18n("Find:"), frame1); - valueLabel->setAlignment( AlignRight ); + valueLabel->tqsetAlignment( AlignRight ); tab = new KListView(frame1, "tab"); connect(tab, TQT_SIGNAL(selectionChanged ( TQListViewItem * )), @@ -81,7 +81,7 @@ FindF::FindF(TQWidget *parent) tab->setAllColumnsShowFocus(TRUE); tab->setSorting(1); - if (kpackage->management->dirInstPackages->find("apt-file/deb")) { + if (kpackage->management->dirInstPackages->tqfind("apt-file/deb")) { searchAll = new TQCheckBox(i18n("Also search uninstalled packages"), frame1, "searchAll"); } else { searchAll = new TQCheckBox(i18n("Also search uninstalled packages (apt-file needs to be installed)"), frame1, "searchAll"); @@ -150,11 +150,11 @@ void FindF::doFind(const TQString &str) cnt++; for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { - if ((*it).find("diversion by") >= 0) { + if ((*it).tqfind("diversion by") >= 0) { new TQListViewItem(tab, "", *it); } - int t1 = (*it).find('\t'); + int t1 = (*it).tqfind('\t'); TQString s1 = (*it).left(t1); TQString s2 = (*it).right((*it).length()-t1); s2 = s2.stripWhiteSpace(); @@ -162,7 +162,7 @@ void FindF::doFind(const TQString &str) TQListViewItem *ql = new TQListViewItem(tab, "", kpinterface[i]->name, kpinterface[i]->head, s1, s2); TQString tx = s1 + kpinterface[i]->typeID; - if (kpackage->management->dirInstPackages->find(tx)) { + if (kpackage->management->dirInstPackages->tqfind(tx)) { ql->setPixmap(0,tick); } } @@ -193,7 +193,7 @@ void FindF::search(TQListViewItem *item) s = s.stripWhiteSpace(); kdDebug() << "searchF=" << s << "\n"; - p = s.find(','); + p = s.tqfind(','); if (p > 0) { s.truncate(p); } diff --git a/kpackage/findf.h b/kpackage/findf.h index 62b8a0e..cee118d 100644 --- a/kpackage/findf.h +++ b/kpackage/findf.h @@ -33,7 +33,7 @@ // Standard Headers #include <stdio.h> -// Qt Headers +// TQt Headers #include <tqdir.h> #include <tqwidget.h> #include <tqframe.h> @@ -52,10 +52,11 @@ class FindF : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FindF ( TQWidget *parent = 0); + FindF ( TQWidget *tqparent = 0); ~FindF(); void resizeEvent(TQResizeEvent *); void dropEvent(TQDropEvent *); diff --git a/kpackage/gentooInterface.cpp b/kpackage/gentooInterface.cpp index 448b74c..22eaefc 100644 --- a/kpackage/gentooInterface.cpp +++ b/kpackage/gentooInterface.cpp @@ -39,7 +39,7 @@ Should we care about the world-file? - Read masked packages from /usr/portage/profiles/package.mask + Read tqmasked packages from /usr/portage/profiles/package.tqmask Use flags and CFLAGS? @@ -69,7 +69,7 @@ Gentoo::Gentoo() archesPossible << "~x86" << "x86"; portageDir="/usr/portage/"; - TQFile f(portageDir+"profiles/package.mask"); + TQFile f(portageDir+"profiles/package.tqmask"); if (f.open(IO_ReadOnly)) { TQTextStream stream( &f ); @@ -124,7 +124,7 @@ void Gentoo::listInstalledPackages(TQPtrList<packageInfo> *pki) TQString sline = i18n("Looking for Gentoo packages: "); - kpackage->setStatus(sline); + kpackage->settqStatus(sline); kpackage->setPercent(0); TQFile f(portageDir+"profiles/categories"); @@ -181,14 +181,14 @@ void Gentoo::listInstalledPackages(TQPtrList<packageInfo> *pki) continue; } - for (TQStringList::Iterator maskIt = packageMask.begin(); maskIt != packageMask.end(); ++maskIt) + for (TQStringList::Iterator tqmaskIt = packageMask.begin(); tqmaskIt != packageMask.end(); ++tqmaskIt) { // FIXME Should all be handled, just not implemented yet - if ((*maskIt).startsWith("<") || (*maskIt).startsWith("=") || (*maskIt).startsWith("~") || (*maskIt).startsWith(">")) + if ((*tqmaskIt).startsWith("<") || (*tqmaskIt).startsWith("=") || (*tqmaskIt).startsWith("~") || (*tqmaskIt).startsWith(">")) continue; - if (*category+"/"+name == *maskIt) + if (*category+"/"+name == *tqmaskIt) { - kdDebug() << "Package: " << name << "-" << version << " is masked" << endl; + kdDebug() << "Package: " << name << "-" << version << " is tqmasked" << endl; isMasked = true; break; } diff --git a/kpackage/gentooInterface.h b/kpackage/gentooInterface.h index 1a99f56..02ddbb4 100644 --- a/kpackage/gentooInterface.h +++ b/kpackage/gentooInterface.h @@ -26,6 +26,7 @@ class Gentoo : public pkgInterface { Q_OBJECT + TQ_OBJECT public: Gentoo(); diff --git a/kpackage/kio.h b/kpackage/kio.h index 6e3a414..94bb16b 100644 --- a/kpackage/kio.h +++ b/kpackage/kio.h @@ -37,9 +37,10 @@ #include "../config.h" #include <kio/job.h> -class Kio: public QObject +class Kio: public TQObject { Q_OBJECT + TQ_OBJECT public: Kio(); @@ -53,9 +54,10 @@ private slots: void slotIOJobFinished( KIO::Job *job ); }; -class Kiod: public QObject +class Kiod: public TQObject { Q_OBJECT + TQ_OBJECT public: Kiod(); diff --git a/kpackage/kissInterface.cpp b/kpackage/kissInterface.cpp index 29de45f..31a9efc 100644 --- a/kpackage/kissInterface.cpp +++ b/kpackage/kissInterface.cpp @@ -103,7 +103,7 @@ bool KISS::isType(char *buf, const TQString &) { if (hasProgram) { TQString tmp = buf; - if (tmp.find("perl",0,false) >= 0) + if (tmp.tqfind("perl",0,false) >= 0) return true; else return false; @@ -116,11 +116,11 @@ bool KISS::parseName(const TQString& name, TQString *n, TQString *v) { int d1, d2, s1; - s1 = name.findRev('.'); + s1 = name.tqfindRev('.'); if (s1 > 0) { - d2 = name.findRev('-',s1-1); + d2 = name.tqfindRev('-',s1-1); if (d2 > 0) { - d1 = name.findRev('_',d2-1); + d1 = name.tqfindRev('_',d2-1); if (d1 < 0) d1 = d2; *n = name.left(d1); @@ -143,13 +143,13 @@ void KISS::listInstalledPackages(TQPtrList<packageInfo> *pki) if (!reader.start(0,FALSE)) return; - kpackage->setStatus(sline); + kpackage->settqStatus(sline); kpackage->setPercent(0); vb = "" ; int sc, sp = 0; - while ((sc = reader.buf.find("\n\n",sp)) >= 0) { + while ((sc = reader.buf.tqfind("\n\n",sp)) >= 0) { if (sc+1 == (signed int)reader.buf.length()) break; p = collectInfo(reader.buf.mid(sp,sc-sp).ascii()); diff --git a/kpackage/kissInterface.h b/kpackage/kissInterface.h index 1f411eb..78d594c 100644 --- a/kpackage/kissInterface.h +++ b/kpackage/kissInterface.h @@ -43,6 +43,7 @@ class cacheObj; class KISS: public pkgInterface { Q_OBJECT + TQ_OBJECT public: KISS(); diff --git a/kpackage/kpPty.cpp b/kpackage/kpPty.cpp index 23eb15f..bd6062a 100644 --- a/kpackage/kpPty.cpp +++ b/kpackage/kpPty.cpp @@ -257,7 +257,7 @@ void kpPty::breakUpCmd(const TQString &cmd) if ((*it)[0] == '\'') { // Start of quoted string s = *it; if ((*it)[lastPt] == '\'') { // Also End of quoted string - s.replace("'",""); + s.tqreplace("'",""); (*pty) << s; quote = FALSE; } else { @@ -266,7 +266,7 @@ void kpPty::breakUpCmd(const TQString &cmd) } } else if ((*it)[lastPt] == '\'') { // End of quoted string s += *it; - s.replace("'",""); + s.tqreplace("'",""); (*pty) << s; quote = FALSE; } else if (quote) { @@ -345,7 +345,7 @@ void kpPty::finish(int ret) if (!retList.empty()) { int p; l = retList.fromLast(); - if ((p = (*l).find("RESULT=")) >= 0) { + if ((p = (*l).tqfind("RESULT=")) >= 0) { ret = (*l).mid(p+7).toInt(0,10); retList.remove(l); // Remove return code } else { @@ -356,7 +356,7 @@ void kpPty::finish(int ret) if (!retList.empty()) { l = retList.begin(); if ( l != retList.end()) { - if ((*l).find("RESULT=") >= 0) { + if ((*l).tqfind("RESULT=") >= 0) { retList.remove(l); // Remove command at start } } @@ -396,7 +396,7 @@ void kpPty::readLines() stext.truncate(stext.length()-1); } - i = stext.findRev('\r'); + i = stext.tqfindRev('\r'); if (i > -1) { stext = stext.mid(i+1); } diff --git a/kpackage/kpPty.h b/kpackage/kpPty.h index bf303f2..327f3ec 100644 --- a/kpackage/kpPty.h +++ b/kpackage/kpPty.h @@ -40,6 +40,7 @@ class kpKProcIO: public KProcIO { Q_OBJECT + TQ_OBJECT public: @@ -51,8 +52,9 @@ public: ////////////////////////////////////////////////////////////////////////////// -class kpPty: public QObject +class kpPty: public TQObject { Q_OBJECT + TQ_OBJECT public: kpPty(); ~kpPty(); diff --git a/kpackage/kpTerm.cpp b/kpackage/kpTerm.cpp index aab6ab8..c91f1a2 100644 --- a/kpackage/kpTerm.cpp +++ b/kpackage/kpTerm.cpp @@ -38,13 +38,13 @@ ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -kpTerm::kpTerm(kpPty *pt, TQWidget * parent, const char * name ) : - TQTextEdit(parent,name) +kpTerm::kpTerm(kpPty *pt, TQWidget * tqparent, const char * name ) : + TQTextEdit(tqparent,name) { pty = pt; setFont(KGlobalSettings::fixedFont()); // setMinimumWidth(fontMetrics().maxWidth()*80 + - // minimumSizeHint().width()); + // tqminimumSizeHint().width()); setWordWrap(NoWrap); setReadOnly(TRUE); } @@ -111,13 +111,13 @@ void kpTerm::textIn(const TQString &stext, bool bNewLine) TQRegExp chrs("[\\010\\012\\015]"); TQString del = "\010"; // kdDebug() << "Tin=[" << stext << "]\n"; - if (stext.find(chrs) < 0) { + if (stext.tqfind(chrs) < 0) { insert( stext ); } else { int p; int op = 0; - while ((p = stext.find(chrs,op)) >= 0) { + while ((p = stext.tqfind(chrs,op)) >= 0) { if (p != op) { insert( stext.mid(op, p-op)); } @@ -169,8 +169,8 @@ void kpTerm::slotResult(TQStringList &rlist, int ret) // Dialog window for password prompt // ////////////////////////////////////////////////////////////////////////////// -kpRun::kpRun( TQWidget *parent) - : KDialogBase(parent, "kpRun", true, TQString::null, +kpRun::kpRun( TQWidget *tqparent) + : KDialogBase(tqparent, "kpRun", true, TQString(), Cancel, Cancel, true ) { TQVBox *page = makeVBoxMainWidget(); diff --git a/kpackage/kpTerm.h b/kpackage/kpTerm.h index 00ac57a..5bebd02 100644 --- a/kpackage/kpTerm.h +++ b/kpackage/kpTerm.h @@ -42,12 +42,13 @@ #include <kpPty.h> ////////////////////////////////////////////////////////////////////////////// -class kpTerm: public QTextEdit +class kpTerm: public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - kpTerm(kpPty *pt, TQWidget * parent=0, const char * name=0); + kpTerm(kpPty *pt, TQWidget * tqparent=0, const char * name=0); void keyPressEvent ( TQKeyEvent * e ); bool run(const TQString &cmd, TQStringList &r); void doConnect(); @@ -72,9 +73,10 @@ signals: class kpRun: public KDialogBase { Q_OBJECT + TQ_OBJECT public: - kpRun(TQWidget *parent = 0); + kpRun(TQWidget *tqparent = 0); bool run(TQString cmd, TQString title); void addText(const TQStringList &ret); diff --git a/kpackage/kpackage.cpp b/kpackage/kpackage.cpp index c5dd2eb..670b4b6 100644 --- a/kpackage/kpackage.cpp +++ b/kpackage/kpackage.cpp @@ -93,93 +93,93 @@ KPKG::KPKG(KConfig *_config) void KPKG::setupMenu() { - pack_open = KStdAction::open(kpackage, TQT_SLOT(fileOpen()), + pack_open = KStdAction::open(TQT_TQOBJECT(kpackage), TQT_SLOT(fileOpen()), actionCollection()); - recent = KStdAction::openRecent(this, TQT_SLOT(openRecent(const KURL&)), + recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openRecent(const KURL&)), actionCollection()); recent->loadEntries( config ); - pack_find = new KAction( i18n("Find &Package..."), "find", - KStdAccel::shortcut(KStdAccel::Find), kpackage, - TQT_SLOT(find()), actionCollection(), "pack_find"); + pack_tqfind = new KAction( i18n("Find &Package..."), "tqfind", + KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(kpackage), + TQT_SLOT(tqfind()), actionCollection(), "pack_tqfind"); - pack_findf = new KAction( i18n("Find &File..."), "filefind", - 0, kpackage, + pack_findf = new KAction( i18n("Find &File..."), "filetqfind", + 0, TQT_TQOBJECT(kpackage), TQT_SLOT(findf()), actionCollection(), "pack_findf"); kpack_reload = new KAction( i18n("&Reload"), "reload", - KStdAccel::shortcut(KStdAccel::Reload), kpackage, + KStdAccel::shortcut(KStdAccel::Reload), TQT_TQOBJECT(kpackage), TQT_SLOT(reload()), actionCollection(), "kpack_reload"); - (void) KStdAction::quit(kpackage, TQT_SLOT(fileQuit()), + (void) KStdAction::quit(TQT_TQOBJECT(kpackage), TQT_SLOT(fileQuit()), actionCollection()); - pack_prev = KStdAction::back(kpackage->management->treeList, TQT_SLOT(previous()), + pack_prev = KStdAction::back(TQT_TQOBJECT(kpackage->management->treeList), TQT_SLOT(previous()), actionCollection(),"pack_prev"); - pack_next = KStdAction::forward(kpackage->management->treeList, TQT_SLOT(next()), + pack_next = KStdAction::forward(TQT_TQOBJECT(kpackage->management->treeList), TQT_SLOT(next()), actionCollection(),"pack_next"); (void) (new KAction( i18n("&Expand Tree"), "ftout", - 0, kpackage, + 0, TQT_TQOBJECT(kpackage), TQT_SLOT(expandTree()), actionCollection(), "kpack_expand")); (void) (new KAction( i18n("&Collapse Tree"), "ftin", - 0, kpackage, + 0, TQT_TQOBJECT(kpackage), TQT_SLOT(collapseTree()), actionCollection(), "kpack_collapse")); - (void) (new KAction( i18n("Clear &Marked"), TQString::null, - 0, kpackage, + (void) (new KAction( i18n("Clear &Marked"), TQString(), + 0, TQT_TQOBJECT(kpackage), TQT_SLOT(clearMarked()), actionCollection(), "kpack_clear")); - (void) (new KAction( i18n("Mark &All"), TQString::null, - 0, kpackage, + (void) (new KAction( i18n("Mark &All"), TQString(), + 0, TQT_TQOBJECT(kpackage), TQT_SLOT(markAll()), actionCollection(), "kpack_markall")); - pack_install = new KAction( i18n("&Install"), TQString::null, - 0, kpackage->management, + pack_install = new KAction( i18n("&Install"), TQString(), + 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(installSingleClicked()), actionCollection(), "install_single"); pack_install->setEnabled(false); kpackage->management->setInstallAction(pack_install); - pack_uninstall = new KAction( i18n("&Uninstall"), TQString::null, - 0, kpackage->management, + pack_uninstall = new KAction( i18n("&Uninstall"), TQString(), + 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(uninstallSingleClicked()), actionCollection(), "uninstall_single"); pack_uninstall->setEnabled(false); kpackage->management->setUninstallAction(pack_uninstall); - (void) (new KAction( i18n("&Install Marked"), TQString::null, - 0, kpackage->management, + (void) (new KAction( i18n("&Install Marked"), TQString(), + 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(installMultClicked()), actionCollection(), "install_marked")); - (void) (new KAction( i18n("&Uninstall Marked"), TQString::null, - 0, kpackage->management, + (void) (new KAction( i18n("&Uninstall Marked"), TQString(), + 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(uninstallMultClicked()), actionCollection(), "uninstall_marked")); setStandardToolBarMenuEnabled(true); - KStdAction::configureToolbars( this, TQT_SLOT(configureToolBars()), + KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT(configureToolBars()), actionCollection()); - KStdAction::saveOptions( this, TQT_SLOT(saveSettings()), actionCollection()); + KStdAction::saveOptions( TQT_TQOBJECT(this), TQT_SLOT(saveSettings()), actionCollection()); KStdAction::keyBindings( guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); (void) (new KAction( i18n("Configure &KPackage..."), "configure", - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(setOptions()), actionCollection(), "kpack_options")); - (void) (new KAction( i18n("Clear Package &Folder Cache"), TQString::null, - 0, this, + (void) (new KAction( i18n("Clear Package &Folder Cache"), TQString(), + 0, TQT_TQOBJECT(this), TQT_SLOT(clearDCache()), actionCollection(), "clear_dcache")); - (void) (new KAction( i18n("Clear &Package Cache"), TQString::null, - 0, this, + (void) (new KAction( i18n("Clear &Package Cache"), TQString(), + 0, TQT_TQOBJECT(this), TQT_SLOT(clearPCache()), actionCollection(), "clear_pcache")); int i; @@ -196,7 +196,7 @@ void KPKG::setupMenu() void KPKG::disableMenu() { pack_open->setEnabled(false); - pack_find->setEnabled(false); + pack_tqfind->setEnabled(false); pack_findf->setEnabled(false); kpack_reload->setEnabled(false); recent->setEnabled(false); @@ -205,7 +205,7 @@ void KPKG::disableMenu() void KPKG::enableMenu() { pack_open->setEnabled(true); - pack_find->setEnabled(true); + pack_tqfind->setEnabled(true); pack_findf->setEnabled(true); kpack_reload->setEnabled(true); recent->setEnabled(true); @@ -302,8 +302,8 @@ bool KPKG::queryClose() { ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -KPACKAGE::KPACKAGE(KConfig *_config, TQWidget *parent) - : TQWidget(parent) +KPACKAGE::KPACKAGE(KConfig *_config, TQWidget *tqparent) + : TQWidget(tqparent) { // Save copy of config @@ -485,9 +485,9 @@ pkgInterface *KPACKAGE::pkType(const TQString &fname) } } fclose(file); - KpMsgE(i18n("Unknown package type: %1").arg(fname),TRUE); + KpMsgE(i18n("Unknown package type: %1").tqarg(fname),TRUE); } else { - KpMsgE(i18n("File not found: %1").arg(fname),TRUE); + KpMsgE(i18n("File not found: %1").tqarg(fname),TRUE); } return 0; @@ -585,7 +585,7 @@ TQString KPACKAGE::getFileName(const KURL & url, TQString &cacheName ) TQString fname = ""; if ( !url.isValid() ) { - KpMsgE(i18n("Malformed URL: %1").arg(url.url()),TRUE); + KpMsgE(i18n("Malformed URL: %1").tqarg(url.url()),TRUE); } else { // Just a usual file ? @@ -643,12 +643,12 @@ TQString KPACKAGE::fetchNetFile( const KURL & url ) } else { save_url = url; - setStatus(i18n("Starting KIO")); + settqStatus(i18n("Starting KIO")); Kio kio; if (kio.download(url, cf)) { - setStatus(i18n("KIO finished")); + settqStatus(i18n("KIO finished")); TQFileInfo fi(cf); if (!(fi.exists() && fi.size() > 0)) { unlink(TQFile::encodeName(cf)); @@ -660,7 +660,7 @@ TQString KPACKAGE::fetchNetFile( const KURL & url ) return cf; } } else { - setStatus(i18n("KIO failed")); + settqStatus(i18n("KIO failed")); return ""; } } @@ -672,7 +672,7 @@ void KPACKAGE::fileOpenUrl(){ bool ok; - TQString url = KInputDialog::getText( TQString::null, + TQString url = KInputDialog::getText( TQString(), i18n( "Open location:" ), save_url.prettyURL(), &ok, this ); if ( ok ) @@ -682,7 +682,7 @@ void KPACKAGE::fileOpenUrl(){ } } -void KPACKAGE::find(){ +void KPACKAGE::tqfind(){ if (srchdialog) srchdialog->show(); else @@ -732,13 +732,13 @@ void KPACKAGE::dropEvent(TQDropEvent *de) // something has been dropped openNetFiles(list.toStringList()); } -void KPACKAGE::setStatus(const TQString &s) // set the text in the status bar +void KPACKAGE::settqStatus(const TQString &s) // set the text in the status bar { status->setText(s); kapp->processEvents(); // refresh the screen } -TQString KPACKAGE::getStatus() // get the text in the status bar +TQString KPACKAGE::gettqStatus() // get the text in the status bar { if(status) return status->text(); diff --git a/kpackage/kpackage.h b/kpackage/kpackage.h index 7fda9bb..dcb55fa 100644 --- a/kpackage/kpackage.h +++ b/kpackage/kpackage.h @@ -51,7 +51,7 @@ class Options; class pkgInterface; class managementWidget; class KAccel; -class QDropEevnt; +class TQDropEevnt; class KRecentFilesAction; class KAction; class kpRun; @@ -60,13 +60,14 @@ class kpRun; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -class KPACKAGE : public QWidget +class KPACKAGE : public TQWidget { Q_OBJECT + TQ_OBJECT ///////////// METHODS ------------------------------------------------------ public: - KPACKAGE(KConfig *_config, TQWidget *parent); + KPACKAGE(KConfig *_config, TQWidget *tqparent); // Constructor ~KPACKAGE(); @@ -76,13 +77,13 @@ public: OPEN_READONLY = 2, OPEN_INSERT = 4 }; - void setStatus(const TQString &s); + void settqStatus(const TQString &s); // this sets the status bar's string to s void setPercent(int x); // this set the status bar's progress to x - TQString getStatus(); + TQString gettqStatus(); // this gets the current status string on the status bar // void setMode(int newmode, pkgInterface *type, int refresh); @@ -158,7 +159,7 @@ public slots: void fileOpenUrl(); // menu item FIle->OpenUrl - void find(); + void tqfind(); // search for package void findf(); @@ -222,13 +223,14 @@ private: class KPKG : public KMainWindow { Q_OBJECT + TQ_OBJECT enum { Tback = 1, Tforward = 2, Tfileopen = 3, Tftout = 4, Tftin = 5, - Tfind = 6, + Ttqfind = 6, Tfindf = 7, Treload = 8 }; @@ -276,7 +278,7 @@ private: TQStrList recent_files; KAction *pack_open; - KAction *pack_find; + KAction *pack_tqfind; KAction *pack_findf; KAction *kpack_reload; KAction *pack_prev; diff --git a/kpackage/kplview.cpp b/kpackage/kplview.cpp index 5b7d76c..cf9014e 100644 --- a/kpackage/kplview.cpp +++ b/kpackage/kplview.cpp @@ -43,8 +43,8 @@ #define MPOS 1 -KpTreeList::KpTreeList( TQWidget *parent ) : -KListView (parent) +KpTreeList::KpTreeList( TQWidget *tqparent ) : +KListView (tqparent) { markPkg = 0; setShowSortIndicator(true); @@ -97,7 +97,7 @@ void KpTreeList::contentsMousePressEvent ( TQMouseEvent * e ) { bool markUpdate = false; - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { if (inMark(e->x())) { TQPoint vp = contentsToViewport(e->pos()); KpTreeListItem *i = ( KpTreeListItem *)itemAt( vp ); @@ -430,7 +430,7 @@ bool KpTreeList::searchChild(KpTreeListItem *it) TQString s = it->text(0); // kdDebug() << "s='" << s << "'='" << searchStr << "\n"; if ((it->childCount() == 0) && (it->info->display(treeType)) && - (searchSubstr ? s.contains(searchStr,FALSE) : s == searchStr)) { + (searchSubstr ? s.tqcontains(searchStr,FALSE) : s == searchStr)) { searchResult = it; return TRUE; } @@ -458,7 +458,7 @@ KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) TQListViewItem *i; i = searchResult; - while ((i = i->parent())) { + while ((i = i->tqparent())) { i->setOpen(TRUE); } if (push) { @@ -510,7 +510,7 @@ void KpTreeList::previous() void KpTreeList::stackRemove(KpTreeListItem *pack) { - int n = stack.find(pack); + int n = stack.tqfind(pack); if (n >= 0) { if (n == 0) { kpkg->disablePrevious(); @@ -571,14 +571,14 @@ void KpTreeList::readTreeConfig() ////////////////////////////////////////////////////////////////////////////// -KpTreeListItem::KpTreeListItem( TQListViewItem *parent, packageInfo* pinfo, +KpTreeListItem::KpTreeListItem( TQListViewItem *tqparent, packageInfo* pinfo, const TQPixmap& thePixmap, TQString label1, TQString label2 , TQString label3 , TQString label4 , TQString label5 , TQString label6 , TQString label7 , TQString label8 -) : TQListViewItem(parent, label1, label2, label3, label4, label5, +) : TQListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8) { info = pinfo; @@ -588,13 +588,13 @@ KpTreeListItem::KpTreeListItem( TQListViewItem *parent, packageInfo* pinfo, setPixmap(1,info->interface->markUnInst); } -KpTreeListItem::KpTreeListItem( KListView *parent, packageInfo* pinfo, +KpTreeListItem::KpTreeListItem( KListView *tqparent, packageInfo* pinfo, const TQPixmap& thePixmap, TQString label1, TQString label2 , TQString label3 , TQString label4 , TQString label5 , TQString label6 , TQString label7 , TQString label8 -) : TQListViewItem(parent, label1, label2, label3, label4, label5, +) : TQListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8) { info = pinfo; @@ -650,11 +650,11 @@ int KpTreeListItem::compare( TQListViewItem *i, int col, bool ascending ) const TQString k, j; j = key( col, ascending ); - j = j.replace(' ','0'); + j = j.tqreplace(' ','0'); j = j.rightJustify(6,'0'); k = i->key( col, ascending ); - k = k.replace(' ','0'); + k = k.tqreplace(' ','0'); k = k.rightJustify(6,'0'); // kdDebug() << k <<"=" << j << "\n"; diff --git a/kpackage/kplview.h b/kpackage/kplview.h index 1bbd08f..3f8a7a7 100644 --- a/kpackage/kplview.h +++ b/kpackage/kplview.h @@ -31,7 +31,7 @@ #include "../config.h" // Standard Headers -// Qt Headers +// TQt Headers #include <tqframe.h> #include <tqpushbutton.h> #include <tqptrlist.h> @@ -50,9 +50,10 @@ class packageDisplayWidget; class KpTreeList: public KListView { Q_OBJECT + TQ_OBJECT public: - KpTreeList ( TQWidget * parent = 0); + KpTreeList ( TQWidget * tqparent = 0); void contentsMousePressEvent ( TQMouseEvent * e ); @@ -152,10 +153,10 @@ signals: }; //////////////////////////////////////////////////////////////////////// -class KpTreeListItem : public QListViewItem +class KpTreeListItem : public TQListViewItem { public: - KpTreeListItem( TQListViewItem *parent, packageInfo* pinfo, + KpTreeListItem( TQListViewItem *tqparent, packageInfo* pinfo, const TQPixmap& thePixmap, TQString label1 = 0, TQString label2 = 0, TQString label3 = 0, TQString label4 = 0, @@ -163,7 +164,7 @@ public: TQString label7 = 0, TQString label8 = 0); - KpTreeListItem( KListView *parent, packageInfo* pinfo, + KpTreeListItem( KListView *tqparent, packageInfo* pinfo, const TQPixmap& thePixmap, TQString label1 = 0, TQString label2 = 0, TQString label3 = 0, TQString label4 = 0, diff --git a/kpackage/managementWidget.cpp b/kpackage/managementWidget.cpp index e8dbcb6..2d30f5b 100644 --- a/kpackage/managementWidget.cpp +++ b/kpackage/managementWidget.cpp @@ -52,8 +52,8 @@ extern Opts *opts; -KpListViewSearchLine::KpListViewSearchLine(TQWidget *parent, KpTreeList *listView) - :KListViewSearchLine(parent, listView) +KpListViewSearchLine::KpListViewSearchLine(TQWidget *tqparent, KpTreeList *listView) + :KListViewSearchLine(tqparent, listView) { list = listView; } @@ -72,8 +72,8 @@ void KpListViewSearchLine::updateSearch(const TQString &s) // constructor -- initialise variables -managementWidget::managementWidget(TQWidget *parent) - : TQFrame(parent) +managementWidget::managementWidget(TQWidget *tqparent) + : TQFrame(tqparent) { install_action = 0; uninstall_action = 0; @@ -114,7 +114,7 @@ void managementWidget::setupWidgets() TQTab t; top = new TQBoxLayout(this,TQBoxLayout::TopToBottom); - vPan = new TQSplitter(TQSplitter::Horizontal, this); + vPan = new TQSplitter(Qt::Horizontal, this); top->addWidget(vPan); // the left panel @@ -170,9 +170,9 @@ void managementWidget::setupWidgets() connect(linstButton,TQT_SIGNAL(clicked()), TQT_SLOT(installMultClicked())); - leftbox->addLayout(lbuttons,0); // top level layout as child + leftbox->addLayout(lbuttons,0); // top level tqlayout as child - // Setup the `buttons' layout + // Setup the `buttons' tqlayout lbuttons->addWidget(linstButton,1,AlignBottom); lbuttons->addWidget(luinstButton,1,AlignBottom); lbuttons->addStretch(1); @@ -200,11 +200,11 @@ void managementWidget::setupWidgets() TQT_SLOT(installSingleClicked())); - // Setup the `right panel' layout + // Setup the `right panel' tqlayout rightbox->addWidget(packageDisplay,10); - rightbox->addLayout(rbuttons,0); // top level layout as child + rightbox->addLayout(rbuttons,0); // top level tqlayout as child - // Setup the `buttons' layout + // Setup the `buttons' tqlayout rbuttons->addWidget(instButton,1); rbuttons->addWidget(uinstButton,1); rbuttons->addStretch(1); @@ -289,7 +289,7 @@ void managementWidget::setupInstButton() void managementWidget::arrangeWidgets() { - // this is done automatically by the layout managers + // this is done automatically by the tqlayout managers } void managementWidget::tabChanged(int tab) @@ -352,7 +352,7 @@ void managementWidget::rebuildListTree() packageInfo *i; int n = 0; - kpackage->setStatus(i18n("Building package tree")); + kpackage->settqStatus(i18n("Building package tree")); kpackage->setPercent(0); treeList->setSorting(-1); @@ -378,7 +378,7 @@ void managementWidget::rebuildListTree() treeList->setSorting(0); kpackage->setPercent(100); // set the progress - kpackage->setStatus(""); + kpackage->settqStatus(""); checkMarked(); } @@ -623,7 +623,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) if (install) { if (pnew) { if (pnew->packageState != packageInfo::BAD_INSTALL) { - ptree = dirInstPackages->find(pkgId); // remove installed entry + ptree = dirInstPackages->tqfind(pkgId); // remove installed entry dirInstPackages->remove(pkgId); if (ptree) { if (ptree->getItem()) { @@ -632,7 +632,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) } } - ptree = dirUninstPackages->find(pkgId); // remove uninstalled entry + ptree = dirUninstPackages->tqfind(pkgId); // remove uninstalled entry if (ptree) { ptree->packageState = packageInfo::HIDDEN; if (ptree->getItem()) { @@ -665,7 +665,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) } else { kdDebug() << "DEL=" << name << endl; } - packageInfo *pb = dirUninstPackages->find(pkgId); + packageInfo *pb = dirUninstPackages->tqfind(pkgId); if (pb) { // available package matching the one just uninstalled pb->packageState = packageInfo::NEW; q = pb->place(treeList,TRUE); diff --git a/kpackage/managementWidget.h b/kpackage/managementWidget.h index 6e65372..56fcfb5 100644 --- a/kpackage/managementWidget.h +++ b/kpackage/managementWidget.h @@ -42,7 +42,7 @@ #include "../config.h" // Standard Headers -// Qt Headers +// TQt Headers #include <tqframe.h> #include <tqpushbutton.h> #include <tqptrlist.h> @@ -71,28 +71,30 @@ class managementWidget; class KpListViewSearchLine : public KListViewSearchLine { Q_OBJECT + TQ_OBJECT public: - KpListViewSearchLine(TQWidget *parent, KpTreeList *listView); + KpListViewSearchLine(TQWidget *tqparent, KpTreeList *listView); ~KpListViewSearchLine(); - void updateSearch(const TQString &s = TQString::null); + void updateSearch(const TQString &s = TQString()); private: KpTreeList *list; }; -class managementWidget : public QFrame +class managementWidget : public TQFrame { Q_OBJECT + TQ_OBJECT ///////////// METHODS ------------------------------------------------------ public: - managementWidget(TQWidget *parent); + managementWidget(TQWidget *tqparent); // Constructor ~managementWidget(); @@ -179,10 +181,10 @@ private: // This widget displays the package info / file-list TQBoxLayout *top, *leftbox, *rightbox, *lbuttons, *rbuttons; - // These are the geometry managers + // These are the tqgeometry managers TQFrame *leftpanel, *rightpanel; - // frame to put QBox in + // frame to put TQBox in TQTabWidget *ltab; // tab between various treelist displays diff --git a/kpackage/options.cpp b/kpackage/options.cpp index 8d86470..16cf61f 100644 --- a/kpackage/options.cpp +++ b/kpackage/options.cpp @@ -53,8 +53,8 @@ extern Opts *opts; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -Options::Options(TQWidget *parent) - : KDialogBase(Tabbed, i18n("Options"), Ok | Cancel, Ok, parent, 0, false){ +Options::Options(TQWidget *tqparent) + : KDialogBase(Tabbed, i18n("Options"), Ok | Cancel, Ok, tqparent, 0, false){ fRemote = false; @@ -96,8 +96,8 @@ Options::Options(TQWidget *parent) } else { msgStr = kpinterface[i]->name; msgStr = i18n("%1: %2 not found") - .arg(kpinterface[i]->name) - .arg(kpinterface[i]->errExe); + .tqarg(kpinterface[i]->name) + .tqarg(kpinterface[i]->errExe); } packageBox[i] = new TQGroupBox(2,Qt::Horizontal,msgStr, framet, "box"); packageHandle[i] = new TQCheckBox(i18n("Enable"), packageBox[i]); @@ -146,7 +146,7 @@ Options::Options(TQWidget *parent) vp->addWidget(pcache[2]); TQGroupBox* cd = new TQGroupBox (1, Qt::Horizontal, i18n("Cache Folder"), page) ; - cd->setSizePolicy (TQSizePolicy::Expanding, TQSizePolicy::Fixed) ; + cd->tqsetSizePolicy (TQSizePolicy::Expanding, TQSizePolicy::Fixed) ; cachedir = new KURLRequester("", cd, "cachedir"); } @@ -395,7 +395,7 @@ void Opts::readSettings(const TQString &initHost) // kdDebug() << "readSettings: " << initHost << "\n"; hostList = config->readListEntry("Host_list"); - if (!initHost.isEmpty() && !hostList.contains(initHost)) { + if (!initHost.isEmpty() && !hostList.tqcontains(initHost)) { hostList.prepend(initHost); config->writeEntry("Host_list", hostList); } diff --git a/kpackage/options.h b/kpackage/options.h index 96da8e6..037bb55 100644 --- a/kpackage/options.h +++ b/kpackage/options.h @@ -34,7 +34,7 @@ // Standard Headers #include <stdio.h> -// Qt Headers +// TQt Headers #include <tqdir.h> #include <tqwidget.h> #include <tqfiledialog.h> @@ -62,10 +62,11 @@ class TQRadioButton; class Options : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - Options ( TQWidget *parent = 0); + Options ( TQWidget *tqparent = 0); ~Options(); void restore(); diff --git a/kpackage/packageDisplay.cpp b/kpackage/packageDisplay.cpp index 6eabc9d..707959f 100644 --- a/kpackage/packageDisplay.cpp +++ b/kpackage/packageDisplay.cpp @@ -31,7 +31,7 @@ // Standard headers #include <stdio.h> -// Qt headers +// TQt headers #include <tqapplication.h> #include <tqfileinfo.h> @@ -55,8 +55,8 @@ extern Opts *opts; // constructor -packageDisplayWidget::packageDisplayWidget(TQWidget *parent) - : TQTabWidget(parent) +packageDisplayWidget::packageDisplayWidget(TQWidget *tqparent) + : TQTabWidget(tqparent) { // Initially we're not dealing with any package package=NULL; @@ -186,7 +186,7 @@ void packageDisplayWidget::changePackage(packageInfo *p) if (package && package != p) { - if (!package->getItem() && !kpackage->management->allPackages->find(package)) { + if (!package->getItem() && !kpackage->management->allPackages->tqfind(package)) { delete package; package = 0; } @@ -203,7 +203,7 @@ void packageDisplayWidget::changePackage(packageInfo *p) if (np) { TQMap<TQString, TQString>::Iterator it; // update info entries in p for ( it = np->info.begin(); it != np->info.end(); ++it ) { - package->info.replace(it.key(),it.data()); + package->info.tqreplace(it.key(),it.data()); } package->interface = np->interface; delete np; @@ -249,7 +249,7 @@ void packageDisplayWidget::updateChangeLog() lines = package->interface->getChangeLog(package); - changeLog->setTextFormat(Qt::LogText); + changeLog->setTextFormat(TQt::LogText); changeLog->hide(); if (lines.count() > 1) { changeLog->setText(""); @@ -280,7 +280,7 @@ void packageDisplayWidget::updateFileList() TQStringList errorfiles; // set the status - kpackage->setStatus(i18n("Updating File List")); + kpackage->settqStatus(i18n("Updating File List")); // clear the file list fileList->clear(); @@ -306,7 +306,7 @@ void packageDisplayWidget::updateFileList() errorfiles = package->interface->verify(package, files); } - kpackage->setStatus(i18n("Updating File List")); + kpackage->settqStatus(i18n("Updating File List")); uint c=0, p=0; uint step = (files.count() / 100) + 1; @@ -363,7 +363,7 @@ void packageDisplayWidget::updateFileList() kpackage->setPercent(100); } - kpFileList::kpFileList(TQWidget* parent, packageDisplayWidget* parent2) : KListView(parent) + kpFileList::kpFileList(TQWidget* tqparent, packageDisplayWidget* tqparent2) : KListView(tqparent) { hide(); addColumn("name"); @@ -372,9 +372,9 @@ void packageDisplayWidget::updateFileList() this, TQT_SLOT( openContext(KListView *, TQListViewItem *, const TQPoint &)) ); FileListMenu = new KPopupMenu(); - openwith = FileListMenu->insertItem(i18n("&Open With..."),parent2,TQT_SLOT(__openBindingWith())); + openwith = FileListMenu->insertItem(i18n("&Open With..."),tqparent2,TQT_SLOT(__openBindingWith())); - pkDisplay = parent2; + pkDisplay = tqparent2; } diff --git a/kpackage/packageDisplay.h b/kpackage/packageDisplay.h index e504dec..e761820 100644 --- a/kpackage/packageDisplay.h +++ b/kpackage/packageDisplay.h @@ -5,7 +5,7 @@ // package. // // Package information will be displayed using (another) sub-widget -// that is inherited from a QTableView. +// that is inherited from a TQTableView. // // The file list will be displayed using a tree list. // @@ -41,7 +41,7 @@ #define PACKAGEDISPLAY_H #include "../config.h" -// Qt Headers +// TQt Headers #include <tqframe.h> #include <tqtabbar.h> #include <tqtabwidget.h> @@ -57,10 +57,11 @@ class packageDisplayWidget; class kpFileList : public KListView { Q_OBJECT + TQ_OBJECT public: - kpFileList(TQWidget* parent, packageDisplayWidget* parent2); + kpFileList(TQWidget* tqparent, packageDisplayWidget* tqparent2); TQString item2Path(TQListViewItem *it); @@ -82,14 +83,15 @@ public slots: }; -class packageDisplayWidget : public QTabWidget +class packageDisplayWidget : public TQTabWidget { Q_OBJECT + TQ_OBJECT friend class kpFileList; ///////////// METHODS ------------------------------------------------------ public: - packageDisplayWidget(TQWidget *parent=0); + packageDisplayWidget(TQWidget *tqparent=0); // Constructor ~packageDisplayWidget(); 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") ); } } diff --git a/kpackage/packageProperties.cpp b/kpackage/packageProperties.cpp index 2e1aca7..c613a23 100644 --- a/kpackage/packageProperties.cpp +++ b/kpackage/packageProperties.cpp @@ -37,8 +37,8 @@ #include "managementWidget.h" packagePropertiesWidget::packagePropertiesWidget - (TQWidget *parent) - : KTextBrowser(parent) + (TQWidget *tqparent) + : KTextBrowser(tqparent) { TQDict<TQString> trl(53); TQStringList pList(); @@ -46,7 +46,7 @@ packagePropertiesWidget::packagePropertiesWidget // hide(); package=NULL; - TQColorGroup cg = colorGroup(); + TQColorGroup cg = tqcolorGroup(); setBackgroundColor(cg.base()); initTranslate(); } @@ -126,7 +126,7 @@ void packagePropertiesWidget::changePackage(packageInfo *p) // append other properties to end TQMap<TQString, TQString>::Iterator it; for ( it = p->info.begin(); it != p->info.end(); ++it ) { - if (!trl.find(it.key())) { + if (!trl.tqfind(it.key())) { if (!it.data().isEmpty()) cList.append(it.key()); } @@ -154,11 +154,11 @@ void packagePropertiesWidget::changePackage(packageInfo *p) stmp += "</td><td>"; TQString f = p->getProperty(*s); if (*s == "maintainer" || *s == "packager") { - f.replace(TQRegExp("<"),"<"); - f.replace(TQRegExp(">"),">"); + f.tqreplace(TQRegExp("<"),"<"); + f.tqreplace(TQRegExp(">"),">"); } if (*s == "filename") { - int p = f.findRev("/"); + int p = f.tqfindRev("/"); if (p >= 0) { f.insert(p+1,"\n"); }; @@ -211,7 +211,7 @@ void packagePropertiesWidget::dor(const TQString &f) { } void packagePropertiesWidget::delement(const TQString &f) { - int n = f.find("("); + int n = f.tqfind("("); if (n < 0) { n = f.length(); } @@ -222,9 +222,9 @@ void packagePropertiesWidget::delement(const TQString &f) { TQString us = uf + package->interface->typeID; bool inst = false, uninst = false; - if (kpackage->management->dirInstPackages->find(us)) { + if (kpackage->management->dirInstPackages->tqfind(us)) { inst = true; - } else if (kpackage->management->dirUninstPackages->find(us)) { + } else if (kpackage->management->dirUninstPackages->tqfind(us)) { uninst = true; } @@ -242,7 +242,7 @@ void packagePropertiesWidget::delement(const TQString &f) { if (uninst) stmp += "</i>"; if (n < (signed)f.length()) - stmp += f.mid(n).replace(TQRegExp("<"),"<"); + stmp += f.mid(n).tqreplace(TQRegExp("<"),"<"); } void packagePropertiesWidget::setSource(const TQString &name) { @@ -262,12 +262,12 @@ void packagePropertiesWidget::setSource(const TQString &name) { } TQString ind = s + package->interface->typeID; - packageInfo *p = kpackage->management->dirInstPackages->find(ind); + packageInfo *p = kpackage->management->dirInstPackages->tqfind(ind); if (p) { kpackage->management->treeList->changePack(p->getItem(), package->getItem() != 0); } else { kdDebug() << "nfound=" << ind << endl; - p = kpackage->management->dirUninstPackages->find(ind); + p = kpackage->management->dirUninstPackages->tqfind(ind); if (p) { kpackage->management->treeList->changePack(p->getItem(), package->getItem() != 0); } else { diff --git a/kpackage/packageProperties.h b/kpackage/packageProperties.h index e5532f3..aca2103 100644 --- a/kpackage/packageProperties.h +++ b/kpackage/packageProperties.h @@ -35,7 +35,7 @@ // Standard Headers -// Qt Headers +// TQt Headers #include <tqpainter.h> #include <tqstringlist.h> #include <tqregexp.h> @@ -52,10 +52,11 @@ class packageInfo; class packagePropertiesWidget : public KTextBrowser { Q_OBJECT + TQ_OBJECT ///////////// METHODS ------------------------------------------------------ public: - packagePropertiesWidget(TQWidget *parent=0); + packagePropertiesWidget(TQWidget *tqparent=0); // constructor ~packagePropertiesWidget(); diff --git a/kpackage/pkgInterface.cpp b/kpackage/pkgInterface.cpp index 7382ff5..b59901d 100644 --- a/kpackage/pkgInterface.cpp +++ b/kpackage/pkgInterface.cpp @@ -142,7 +142,7 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c packageInfo *p; TQString sline( queryMsg + fname ); - kpackage->setStatus(sline); + kpackage->settqStatus(sline); kdDebug() << "listDir fn=" << fname << " dir=" << dir << endl; @@ -156,21 +156,21 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c if (d.exists()) { if ( d.isReadable() ) { TQString pn; - const QFileInfoList *list = d.entryInfoList(); - QFileInfoListIterator it( *list ); // create list iterator + const TQFileInfoList *list = d.entryInfoList(); + TQFileInfoListIterator it( *list ); // create list iterator TQFileInfo *fi; // pointer for traversing while ( (fi=it.current()) ) { // for each entry... if ( fi->isDir() ) { // entry is a subdir - if ( fi->fileName() != TQString::fromLatin1(".") && - fi->fileName() != TQString::fromLatin1("..") ) + if ( fi->fileName() != TQString::tqfromLatin1(".") && + fi->fileName() != TQString::tqfromLatin1("..") ) { - // not current dir and not parent dir + // not current dir and not tqparent dir // -> recursive call: listDir( pki, dir + "/" + fi->fileName(), dir + "/" + fi->fileName(), subdirs ); } else { - // current dir or parent dir + // current dir or tqparent dir // -> notihng to do ; } @@ -197,7 +197,7 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c } } else { // directory is not readable - kdDebug() << TQString("WARNING: directory '%1' not readable (will be ignored) !\n").arg(d.absPath() ) << endl; + kdDebug() << TQString("WARNING: directory '%1' not readable (will be ignored) !\n").tqarg(d.absPath() ) << endl; } } else { TQFile f(fname); @@ -257,12 +257,12 @@ TQString pkgInterface::getPackList(cacheObj *cp) unlink(TQFile::encodeName(tmpf)); if (kpkg) - kpackage->setStatus(i18n("Starting Kio")); + kpackage->settqStatus(i18n("Starting Kio")); Kio kio; if (kio.download(url, tmpf)) { if (kpkg) - kpackage->setStatus(i18n("Kio finished")); + kpackage->settqStatus(i18n("Kio finished")); TQFileInfo f(tmpf); if (!(f.exists() && f.size() > 0)) { unlink(TQFile::encodeName(tmpf)); @@ -272,7 +272,7 @@ TQString pkgInterface::getPackList(cacheObj *cp) } } else { if (kpkg) - kpackage->setStatus(i18n("Kio failed")); + kpackage->settqStatus(i18n("Kio failed")); return ""; } } else { @@ -287,7 +287,7 @@ TQString pkgInterface::getDir(cacheObj *cp) { if ((res = cacheObj::newDCache(url, cp->cacheFile, tmpDir))) { if (res < 0) - return TQString::null; + return TQString(); Kiod kiod; if (kiod.listDir(url,tmpDir, cp->subdirs)) { @@ -297,9 +297,9 @@ TQString pkgInterface::getDir(cacheObj *cp) { cl.write(); return tmpDir; } else { - KpMsgE(i18n("Cannot read folder %1").arg(url),FALSE); + KpMsgE(i18n("Cannot read folder %1").tqarg(url),FALSE); unlink(tmpDir.ascii()); - return TQString::null; + return TQString(); } } else { return tmpDir; @@ -327,7 +327,7 @@ TQStringList pkgInterface::verify(packageInfo *, const TQStringList &files) uint step = (files.count() / 100) + 1; - kpackage->setStatus(i18n("Verifying")); + kpackage->settqStatus(i18n("Verifying")); kpackage->setPercent(0); for( TQStringList::ConstIterator it = files.begin(); diff --git a/kpackage/pkgInterface.h b/kpackage/pkgInterface.h index 839ada2..0346f81 100644 --- a/kpackage/pkgInterface.h +++ b/kpackage/pkgInterface.h @@ -66,9 +66,10 @@ public: ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -class pkgInterface: public QObject +class pkgInterface: public TQObject { Q_OBJECT + TQ_OBJECT public: pkgInterface(); diff --git a/kpackage/pkgOptions.cpp b/kpackage/pkgOptions.cpp index bf3975e..c1be713 100644 --- a/kpackage/pkgOptions.cpp +++ b/kpackage/pkgOptions.cpp @@ -47,8 +47,8 @@ /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -pkgOptions::pkgOptions(pkgInterface *pki, TQWidget *parent, const TQString &caption) - : KDialog(parent,0,TRUE) +pkgOptions::pkgOptions(pkgInterface *pki, TQWidget *tqparent, const TQString &caption) + : KDialog(tqparent,0,TRUE) { // setFrameStyle(TQFrame::Raised | TQFrame::Panel); @@ -102,38 +102,38 @@ void pkgOptions::setupWidgets(TQPtrList<param> &pars) connect(cancelButton,TQT_SIGNAL(clicked()),TQT_SLOT(cancelButtonClicked())); connect(Keep, TQT_SIGNAL(toggled(bool)), TQT_SLOT(keepToggle(bool))); - // Do the layout - vlayout = new TQBoxLayout(this, TQBoxLayout::TopToBottom, marginHint(), spacingHint()); - vlayout->addWidget(title,0); + // Do the tqlayout + vtqlayout = new TQBoxLayout(this, TQBoxLayout::TopToBottom, marginHint(), spacingHint()); + vtqlayout->addWidget(title,0); { - hlayout = new TQBoxLayout(vlayout,TQBoxLayout::LeftToRight, spacingHint()); + htqlayout = new TQBoxLayout(vtqlayout,TQBoxLayout::LeftToRight, spacingHint()); { - layout = new TQBoxLayout(hlayout,TQBoxLayout::TopToBottom, spacingHint()); + tqlayout = new TQBoxLayout(htqlayout,TQBoxLayout::TopToBottom, spacingHint()); packages = new KListView(this); - layout->addWidget(packages,20); + tqlayout->addWidget(packages,20); packages->addColumn(i18n("PACKAGES"),200); connect(packages, TQT_SIGNAL(selectionChanged ( TQListViewItem * )), this, TQT_SLOT(slotSearch( TQListViewItem * ))); - layout->addStretch(1); + tqlayout->addStretch(1); for (i = 0; i < bnumber; i++) { - layout->addWidget(Boxs[i],1); + tqlayout->addWidget(Boxs[i],1); } - layout->addWidget(new KSeparator(KSeparator::HLine, this), 2); + tqlayout->addWidget(new KSeparator(KSeparator::HLine, this), 2); - TQBoxLayout *slayout = new TQBoxLayout(layout, TQBoxLayout::LeftToRight); - slayout->addStretch(1); - slayout->addWidget(Keep, 1); - slayout->addStretch(1); + TQBoxLayout *stqlayout = new TQBoxLayout(tqlayout, TQBoxLayout::LeftToRight); + stqlayout->addStretch(1); + stqlayout->addWidget(Keep, 1); + stqlayout->addStretch(1); - layout->addWidget(new KSeparator(KSeparator::HLine, this), 2); + tqlayout->addWidget(new KSeparator(KSeparator::HLine, this), 2); TQBoxLayout *buttons = new TQBoxLayout(TQBoxLayout::LeftToRight); - layout->addLayout(buttons); + tqlayout->addLayout(buttons); buttons->addWidget(installButton,2); buttons->addStretch(1); @@ -141,7 +141,7 @@ void pkgOptions::setupWidgets(TQPtrList<param> &pars) } { term = new kpTerm(kpty,this); - hlayout->addWidget(term, 1000); + htqlayout->addWidget(term, 1000); } } resize(800, 400); @@ -188,9 +188,9 @@ bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &) plist.append(*it); TQString dirIndex = *it + pkgInt->typeID; if (installer) { - pk = kpackage->management->dirUninstPackages->find(dirIndex); + pk = kpackage->management->dirUninstPackages->tqfind(dirIndex); } else { - pk = kpackage->management->dirInstPackages->find(dirIndex); + pk = kpackage->management->dirInstPackages->tqfind(dirIndex); } if (pk) { // kdDebug() << "FF=" << dirIndex << "\n"; @@ -202,7 +202,7 @@ bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &) } } - s = i18n("%1: 1 %2 Package","%1: %n %2 Packages",plist.count()).arg(insType,pkgInt->name); + s = i18n("%1: 1 %2 Package","%1: %n %2 Packages",plist.count()).tqarg(insType,pkgInt->name); title->setText(s); for (TQStringList::Iterator pit = plist.begin(); pit != plist.end(); ++pit ) { @@ -302,7 +302,7 @@ void pkgOptions::cancelButtonClicked() } void pkgOptions::closeEvent ( TQCloseEvent * e ) { - kdDebug() << "pkgOptions::QCloseEvent\n"; + kdDebug() << "pkgOptions::TQCloseEvent\n"; terminate(); TQWidget::closeEvent (e); @@ -342,8 +342,8 @@ void pkgOptions::getKeep() /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -pkgOptionsI::pkgOptionsI(pkgInterface *pkg, TQWidget *parent): - pkgOptions(pkg, parent, i18n("Install")) +pkgOptionsI::pkgOptionsI(pkgInterface *pkg, TQWidget *tqparent): + pkgOptions(pkg, tqparent, i18n("Install")) { insType = i18n("Install"); installer = TRUE; @@ -357,8 +357,8 @@ TQString pkgOptionsI::doPackages(int installFlags, TQPtrList<packageInfo> *p, bo /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -pkgOptionsU::pkgOptionsU(pkgInterface *pkg, TQWidget *parent): - pkgOptions(pkg, parent, i18n("Uninstall")) +pkgOptionsU::pkgOptionsU(pkgInterface *pkg, TQWidget *tqparent): + pkgOptions(pkg, tqparent, i18n("Uninstall")) { insType = i18n("Uninstall"); installer = FALSE; diff --git a/kpackage/pkgOptions.h b/kpackage/pkgOptions.h index 1cf8d94..02a830f 100644 --- a/kpackage/pkgOptions.h +++ b/kpackage/pkgOptions.h @@ -32,7 +32,7 @@ #define PKGINSTALL_OPTIONS #include "../config.h" -// Qt headers +// TQt headers #include <tqframe.h> #include <tqlayout.h> #include <tqpushbutton.h> @@ -52,8 +52,9 @@ class KPushButton; class pkgOptions : public KDialog { Q_OBJECT + TQ_OBJECT public: - pkgOptions( pkgInterface *pki, TQWidget *parent=0, const TQString &caption=TQString::null); + pkgOptions( pkgInterface *pki, TQWidget *tqparent=0, const TQString &caption=TQString()); ~pkgOptions(); bool setup(TQPtrList<packageInfo> *pl, const TQString &type); @@ -103,8 +104,8 @@ signals: void finished(int refresh); protected: - // The layout managers - TQBoxLayout *layout, *hlayout, *vlayout; + // The tqlayout managers + TQBoxLayout *tqlayout, *htqlayout, *vtqlayout; // Sub widgets TQPushButton *installButton; @@ -133,8 +134,9 @@ protected: class pkgOptionsI: public pkgOptions { Q_OBJECT + TQ_OBJECT public: - pkgOptionsI(pkgInterface *pkg, TQWidget *parent = 0); + pkgOptionsI(pkgInterface *pkg, TQWidget *tqparent = 0); TQString doPackages(int installFlags, TQPtrList<packageInfo> *p, bool &test); }; @@ -143,8 +145,9 @@ public: class pkgOptionsU: public pkgOptions { Q_OBJECT + TQ_OBJECT public: - pkgOptionsU(pkgInterface *pkg, TQWidget *parent = 0); + pkgOptionsU(pkgInterface *pkg, TQWidget *tqparent = 0); TQString doPackages(int installFlags, TQPtrList<packageInfo> *p, bool &test); }; diff --git a/kpackage/procbuf.cpp b/kpackage/procbuf.cpp index 568e651..da3bc98 100644 --- a/kpackage/procbuf.cpp +++ b/kpackage/procbuf.cpp @@ -32,11 +32,11 @@ #include <tqlabel.h> #include <kdebug.h> -Modal::Modal(TQString msg, TQWidget *parent, const char * name ) - : KDialog( parent, name, TRUE ) +Modal::Modal(TQString msg, TQWidget *tqparent, const char * name ) + : KDialog( tqparent, name, TRUE ) { TQLabel *line1 = new TQLabel(msg,this); - line1->setAlignment(AlignCenter); + line1->tqsetAlignment(AlignCenter); line1->setAutoResize(true); } @@ -136,13 +136,13 @@ int procbuf::start (TQString msg, bool errorDlg, << " exit=" << proc->exitStatus() << endl; if (timed) { kdDebug() << "timeout..................\n"; - KpMsg("Error",i18n("Timeout: %1").arg(timeMsg), TRUE); + KpMsg("Error",i18n("Timeout: %1").tqarg(timeMsg), TRUE); delete proc; proc = 0; return 0; } else { if (!proc->normalExit() || proc->exitStatus()) { if (errorDlg) { - KpMsg("Error",i18n("Kprocess error:%1").arg(buf), TRUE); + KpMsg("Error",i18n("Kprocess error:%1").tqarg(buf), TRUE); } delete proc; proc = 0; return 0; diff --git a/kpackage/procbuf.h b/kpackage/procbuf.h index be5bad3..b7dfcac 100644 --- a/kpackage/procbuf.h +++ b/kpackage/procbuf.h @@ -37,14 +37,16 @@ class Modal : public KDialog { Q_OBJECT + TQ_OBJECT public: - Modal(TQString msg, TQWidget *parent, const char * name ); + Modal(TQString msg, TQWidget *tqparent, const char * name ); void terminate(); }; -class procbuf: public QObject +class procbuf: public TQObject { Q_OBJECT + TQ_OBJECT public: procbuf(); diff --git a/kpackage/rpmInterface.cpp b/kpackage/rpmInterface.cpp index 8096a78..b9d6e5c 100644 --- a/kpackage/rpmInterface.cpp +++ b/kpackage/rpmInterface.cpp @@ -93,7 +93,7 @@ RPM::RPM():pkgInterface() infoList.append("buildtime/%{BUILDTIME:date}"); infoList.append("size/%{SIZE}"); infoList.append("provides/[%{PROVIDES}, ]"); - infoList.append("requires/[%{REQUIRENAME} (%{REQUIREFLAGS:depflags} %{REQUIREVERSION}), ]"); + infoList.append("requires/[%{RETQUIRENAME} (%{RETQUIREFLAGS:depflags} %{RETQUIREVERSION}), ]"); infoList.append("description/[%{DESCRIPTION}]"); hasProgram = ifExe("rpm"); @@ -118,13 +118,13 @@ bool RPM::parseName(const TQString &name, TQString *n, TQString *v) { int d1, d2, s1, s2; - s2 = name.findRev('.'); + s2 = name.tqfindRev('.'); if (s2 > 0) { - s1 = name.findRev('.',s2-1); + s1 = name.tqfindRev('.',s2-1); if (s1 > 0) { - d2 = name.findRev('-',s1-1); + d2 = name.tqfindRev('-',s1-1); if (d2 > 0) { - d1 = name.findRev('-',d2-1); + d1 = name.tqfindRev('-',d2-1); if (d1 < 0) d1 = d2; *n = name.left(d1); @@ -160,11 +160,11 @@ void RPM::listInstalledPackages(TQPtrList<packageInfo> *pki) TQString cmd = "rpm -q -a"; cmd += packageQuery(); - kpackage->setStatus(i18n("Querying RPM package list")); + kpackage->settqStatus(i18n("Querying RPM package list")); kpackage->setPercent(0); TQStringList list = kpty->run(cmd); - kpackage->setStatus(i18n("Processing RPM package list")); + kpackage->settqStatus(i18n("Processing RPM package list")); // kdDebug() << "P=" << list.count() <<"\n"; kpackage->setPercent(50); @@ -197,7 +197,7 @@ void RPM::listInstalledPackages(TQPtrList<packageInfo> *pki) } list.clear(); - kpackage->setStatus(i18n("DEB APT")); + kpackage->settqStatus(i18n("DEB APT")); kpackage->setPercent(100); } @@ -231,8 +231,8 @@ packageInfo* RPM::collectInfo(TQStringList &ln) { } else if (name == "buildtime") { a.insert("build-time", value); } else if (name == "requires") { - value = value.replace(TQRegExp("\\(\\)"),""); - value = value.replace(TQRegExp("\\( \\)"),""); + value = value.tqreplace(TQRegExp("\\(\\)"),""); + value = value.tqreplace(TQRegExp("\\( \\)"),""); value = value.stripWhiteSpace(); if (value.endsWith(",")) { value.truncate(value.length()-1); @@ -242,18 +242,18 @@ packageInfo* RPM::collectInfo(TQStringList &ln) { int s = 0, n; TQString t; - if (!(*a.find("name")).isEmpty()) { - while ((n = value.find(",",s)) > 0) { + if (!(*a.tqfind("name")).isEmpty()) { + while ((n = value.tqfind(",",s)) > 0) { t = value.mid(s,n-s); t = t.stripWhiteSpace(); if (!t.isEmpty()) - provides.insert(t,new TQString(*a.find("name"))); + provides.insert(t,new TQString(*a.tqfind("name"))); s = n+1; } t = value.mid(s); t = t.stripWhiteSpace(); if (!t.isEmpty()) - provides.insert(t,new TQString(*a.find("name"))); + provides.insert(t,new TQString(*a.tqfind("name"))); value = value.stripWhiteSpace(); if (value.endsWith(",")) { @@ -464,7 +464,7 @@ void RPM::collectDepends(packageInfo *p, const TQString &name, int src) if (list.count() > 0) { TQStringList::Iterator it = list.begin(); - int pt = (*it).find(":"); + int pt = (*it).tqfind(":"); if (pt > 0) { TQString s = (*it).mid(pt+1); if (!s.isEmpty()) { @@ -602,10 +602,10 @@ TQStringList RPM::FindFile(const TQString &name, bool) { list.clear(); } else { for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - int p = (*it).find(" "); - int nm = (*it).find(name,p); + int p = (*it).tqfind(" "); + int nm = (*it).tqfind(name,p); if (nm >= 0) { - (*it).replace(p, 1, "\t"); + (*it).tqreplace(p, 1, "\t"); retlist.append(*it); } } @@ -617,7 +617,7 @@ TQStringList RPM::FindFile(const TQString &name, bool) { ////////////////////////////////////////////////////////////////////////////// TQString RPM::quotePath( const TQString &path) { TQString s = path; - s = s.replace(" ","\\ "); + s = s.tqreplace(" ","\\ "); return ( "'" + s + "'" ); } diff --git a/kpackage/rpmInterface.h b/kpackage/rpmInterface.h index a7db803..e551ca3 100644 --- a/kpackage/rpmInterface.h +++ b/kpackage/rpmInterface.h @@ -41,6 +41,7 @@ class cacheObj; class RPM : public pkgInterface { Q_OBJECT + TQ_OBJECT public: RPM(); diff --git a/kpackage/search.cpp b/kpackage/search.cpp index 2f774bf..8477473 100644 --- a/kpackage/search.cpp +++ b/kpackage/search.cpp @@ -35,15 +35,15 @@ #include <tqframe.h> #include <tqgroupbox.h> -Search::Search(TQWidget *parent, const char * name) - : KDialogBase(parent, name, false, +Search::Search(TQWidget *tqparent, const char * name) + : KDialogBase(tqparent, name, false, i18n("Find Package"), User1 | Close, User1, true, - KGuiItem( i18n("&Find"), "find")) + KGuiItem( i18n("&Find"), "tqfind")) { TQFrame *page = makeMainWidget(); - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); TQVBoxLayout* vtop = new TQVBoxLayout( page, 10, 10, "vtop"); @@ -54,7 +54,7 @@ Search::Search(TQWidget *parent, const char * name) value = new TQLineEdit( frame1, "v"); vf->addWidget(value,0); value->setFocus(); - value->setFixedHeight(value->sizeHint().height()); + value->setFixedHeight(value->tqsizeHint().height()); value->setMinimumWidth(250); connect(value, TQT_SIGNAL(textChanged(const TQString &)),this, TQT_SLOT(textChanged(const TQString &))); @@ -64,13 +64,13 @@ Search::Search(TQWidget *parent, const char * name) substr = new TQCheckBox(i18n("Sub string"), frame1, "substr"); substr->setChecked(TRUE); hc->addWidget(substr,1,AlignLeft); - substr->setFixedSize(substr->sizeHint()); + substr->setFixedSize(substr->tqsizeHint()); hc->addStretch(1); wrap = new TQCheckBox(i18n("Wrap search"), frame1, "wrap"); wrap->setChecked(TRUE); hc->addWidget(wrap,1,AlignRight); - wrap->setFixedSize(wrap->sizeHint()); + wrap->setFixedSize(wrap->tqsizeHint()); enableButton( User1, false ); @@ -104,7 +104,7 @@ void Search::ok_slot() } if (pkg == 0) KpMsg(i18n("Note"), - i18n("%1 was not found.").arg(to_find),TRUE); + i18n("%1 was not found.").tqarg(to_find),TRUE); } void Search::done_slot() diff --git a/kpackage/search.h b/kpackage/search.h index 28f5195..8d289c0 100644 --- a/kpackage/search.h +++ b/kpackage/search.h @@ -46,10 +46,11 @@ class TQCheckBox; class Search : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - Search ( TQWidget *parent = 0, const char * name=0); + Search ( TQWidget *tqparent = 0, const char * name=0); ~Search(); private: diff --git a/kpackage/slackInterface.cpp b/kpackage/slackInterface.cpp index 6e6d993..49e7c64 100644 --- a/kpackage/slackInterface.cpp +++ b/kpackage/slackInterface.cpp @@ -148,7 +148,7 @@ bool SLACK::isType(char *buf, const TQString &) bool SLACK::parseName(const TQString &name, TQString *n, TQString *v) { int s1; - s1 = name.findRev('.'); + s1 = name.tqfindRev('.'); if (s1 > 0) { *n = name.left(s1); v = new TQString(""); @@ -206,11 +206,11 @@ void SLACK::listInstalledPackages(TQPtrList<packageInfo> *pki) TQDir d(DIR); if (d.exists()) { TQString sline = i18n("Querying SLACK package list: "); - kpackage->setStatus(sline); + kpackage->settqStatus(sline); - const QFileInfoList *list = d.entryInfoList(); + const TQFileInfoList *list = d.entryInfoList(); int count = list->count(); - QFileInfoListIterator it( *list ); // create list iterator + TQFileInfoListIterator it( *list ); // create list iterator TQFileInfo *fi; // pointer for traversing kpackage->setPercent(0); @@ -224,7 +224,7 @@ void SLACK::listInstalledPackages(TQPtrList<packageInfo> *pki) fn = dr + fi->fileName(); file = fopen(TQFile::encodeName(fn),"r"); if (file) { - vb = TQString::null; + vb = TQString(); while (fgets(linebuf,sizeof(linebuf),file)) { if (strcmp(linebuf,FILELIST)) { vb += linebuf; @@ -260,7 +260,7 @@ void SLACK::listPackList(TQPtrList<packageInfo> *pki, const TQString &s, cacheO TQString sline = i18n("Querying SLACK package list: "); sline += cp->location; - kpackage->setStatus(sline); + kpackage->settqStatus(sline); kpackage->setPercent(0); np = 0; @@ -318,7 +318,7 @@ packageInfo *SLACK::getPackageInfo(char mode, const TQString &name, const TQStri fn = DIR + name; file = fopen(TQFile::encodeName(fn),"r"); if (file) { - vb = TQString::null; + vb = TQString(); while (fgets(linebuf,sizeof(linebuf),file)) { if (strcmp(linebuf,FILELIST)) { vb += linebuf; @@ -432,15 +432,15 @@ packageInfo *SLACK::collectInfo(const char *_inp, int insState) } else if (!strcmp("package location",str)) { TQString sl = xstr; if (insState != INSTALLED) { - int sls = sl.findRev("/"); + int sls = sl.tqfindRev("/"); if (sls >= 0) { TQRegExp num("[0-9][0-9]*"); - int slf = sl.find(num,sls); + int slf = sl.tqfind(num,sls); if (slf >= 0) { sls++; TQString gt = sl.mid(sls,slf-sls); - if (trl->find(gt)) { - gt = *trl->find(gt); + if (trl->tqfind(gt)) { + gt = *trl->tqfind(gt); } a.insert("group",gt); } @@ -619,11 +619,11 @@ TQStringList SLACK::FindFile(const TQString &name, bool) TQDir d(DIR); if (d.exists()) { TQString sline = i18n("Querying SLACK package list: "); - kpackage->setStatus(sline); + kpackage->settqStatus(sline); - const QFileInfoList *list = d.entryInfoList(); + const TQFileInfoList *list = d.entryInfoList(); int count = list->count(); - QFileInfoListIterator it( *list ); // create list iterator + TQFileInfoListIterator it( *list ); // create list iterator TQFileInfo *fi; // pointer for traversing kpackage->setPercent(0); @@ -643,7 +643,7 @@ TQStringList SLACK::FindFile(const TQString &name, bool) } } while (fgets(linebuf,sizeof(linebuf),file)) { - if (TQString::fromLocal8Bit(linebuf).find(name) != -1) { + if (TQString(TQString::fromLocal8Bit(linebuf)).tqfind(name) != -1) { st = "/"; st += linebuf; st.truncate(st.length() -1); diff --git a/kpackage/slackInterface.h b/kpackage/slackInterface.h index f6ed3fc..7f754f0 100644 --- a/kpackage/slackInterface.h +++ b/kpackage/slackInterface.h @@ -41,6 +41,7 @@ class cacheObj; class SLACK: public pkgInterface { Q_OBJECT + TQ_OBJECT public: SLACK(); diff --git a/kpackage/updateLoc.cpp b/kpackage/updateLoc.cpp index 60e43e4..ba33f06 100644 --- a/kpackage/updateLoc.cpp +++ b/kpackage/updateLoc.cpp @@ -40,9 +40,9 @@ ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -apanel::apanel( TQWidget *parent, +apanel::apanel( TQWidget *tqparent, const char * name ) - : TQWidget( parent, name ) + : TQWidget( tqparent, name ) { puse = 0; @@ -99,8 +99,8 @@ void apanel::clear() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -dpanel::dpanel( TQWidget *parent, const char * name ) - : TQWidget( parent, name ) +dpanel::dpanel( TQWidget *tqparent, const char * name ) + : TQWidget( tqparent, name ) { puse = 0; psubdirs = 0; @@ -120,8 +120,8 @@ dpanel::dpanel( TQWidget *parent, const char * name ) } dpanel::dpanel(dpanel *basep, const TQString &Pfilter, bool bsubdirs, - TQWidget *parent, const char * name ) - : TQWidget( parent, name ) + TQWidget *tqparent, const char * name ) + : TQWidget( tqparent, name ) { filter = Pfilter; puse = 0; @@ -140,7 +140,7 @@ dpanel::dpanel(dpanel *basep, const TQString &Pfilter, bool bsubdirs, if (bsubdirs) { psubdirs = new TQCheckBox(i18n("Subfolders"),this); - psubdirs->setFixedSize(psubdirs->sizeHint()); + psubdirs->setFixedSize(psubdirs->tqsizeHint()); pack->addWidget(psubdirs,0); } @@ -272,9 +272,9 @@ void updateLoc::doBase(const TQString & bmsg) if (haveBase) { fbase = new TQGroupBox(bmsg, this); fbase->setColumnLayout(0, Qt::Vertical ); - fbase->layout()->setSpacing( KDialog::spacingHint() ); - fbase->layout()->setMargin( KDialog::marginHint() ); - vbase = new TQVBoxLayout(fbase->layout()); + fbase->tqlayout()->setSpacing( KDialog::spacingHint() ); + fbase->tqlayout()->setMargin( KDialog::marginHint() ); + vbase = new TQVBoxLayout(fbase->tqlayout()); vf->addWidget(fbase,1); base = new dpanel(fbase); vbase->addWidget(base,0); @@ -410,10 +410,10 @@ pdUpdateLoc::pdUpdateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, cons TQGroupBox *floc = new TQGroupBox(lmsg, this); floc->setColumnLayout(0, Qt::Vertical ); - floc->layout()->setSpacing( KDialog::spacingHint() ); - floc->layout()->setMargin( KDialog::marginHint() ); + floc->tqlayout()->setSpacing( KDialog::spacingHint() ); + floc->tqlayout()->setMargin( KDialog::marginHint() ); vf->addWidget(floc,1); - TQVBoxLayout *vloc = new TQVBoxLayout(floc->layout()); + TQVBoxLayout *vloc = new TQVBoxLayout(floc->tqlayout()); for (int i = 0; i < numLines; i++) { dp[i] = new dpanel(base, filter, subdirs, floc); @@ -452,7 +452,7 @@ void pdUpdateLoc::applyS(LcacheObj *slist) if (dp[i]->getUse()) { t = dp[i]->getText(); if (!t.isEmpty()) { - CObj = new cacheObj(haveBase ? base->getText() : TQString::null, + CObj = new cacheObj(haveBase ? base->getText() : TQString(), t, cn + pn.setNum(i), "", dp[i]->getSubdirs()); slist->append(CObj); // printf("T=%s\n",t.data()); @@ -547,10 +547,10 @@ cUpdateLoc::cUpdateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, const for (int i = 0; i < numLines; i++) { TQGroupBox *floc = new TQGroupBox(*kcIt, this); floc->setColumnLayout(0, Qt::Vertical ); - floc->layout()->setSpacing( KDialog::spacingHint() ); - floc->layout()->setMargin( KDialog::marginHint() ); + floc->tqlayout()->setSpacing( KDialog::spacingHint() ); + floc->tqlayout()->setMargin( KDialog::marginHint() ); vf->addWidget(floc,1); - TQVBoxLayout *vloc = new TQVBoxLayout(floc->layout()); + TQVBoxLayout *vloc = new TQVBoxLayout(floc->tqlayout()); combo[i] = new KComboBox( true, floc); KCompletion *comp = combo[i]->completionObject(); diff --git a/kpackage/updateLoc.h b/kpackage/updateLoc.h index d9879f3..c8ae61d 100644 --- a/kpackage/updateLoc.h +++ b/kpackage/updateLoc.h @@ -34,7 +34,7 @@ // Standard Headers #include <stdio.h> -// Qt Headers +// TQt Headers #include <tqdir.h> #include <tqwidget.h> #include <tqframe.h> @@ -57,14 +57,15 @@ class KComboBox; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -class dpanel : public QWidget +class dpanel : public TQWidget { Q_OBJECT + TQ_OBJECT public: - dpanel(TQWidget *parent, const char * name = 0); + dpanel(TQWidget *tqparent, const char * name = 0); dpanel(dpanel *basep, const TQString &Pfilter, bool bsubdirs, - TQWidget *parent, const char * name = 0); + TQWidget *tqparent, const char * name = 0); ~dpanel(); @@ -94,12 +95,13 @@ private: ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -class apanel : public QWidget +class apanel : public TQWidget { Q_OBJECT + TQ_OBJECT public: - apanel( TQWidget *parent, const char * name = 0 ); + apanel( TQWidget *tqparent, const char * name = 0 ); ~apanel(); @@ -123,9 +125,10 @@ private: ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -class updateLoc : public QWidget +class updateLoc : public TQWidget { Q_OBJECT + TQ_OBJECT public: @@ -158,6 +161,7 @@ public: class aUpdateLoc : public updateLoc { Q_OBJECT + TQ_OBJECT public: @@ -197,6 +201,7 @@ private: class pdUpdateLoc : public updateLoc { Q_OBJECT + TQ_OBJECT public: @@ -238,6 +243,7 @@ private: class cUpdateLoc : public updateLoc { Q_OBJECT + TQ_OBJECT public: @@ -279,6 +285,7 @@ private: class Locations : public KDialogBase { Q_OBJECT + TQ_OBJECT public: Locations( const TQString &msg); |