diff options
Diffstat (limited to 'kpackage')
33 files changed, 281 insertions, 284 deletions
diff --git a/kpackage/cache.cpp b/kpackage/cache.cpp index bcd45e0..facdd6b 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").arg(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").arg(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").arg(url),true); return -1; } @@ -169,7 +169,7 @@ void cacheObj::clearPCache() { ////////////////////////////////////////////////////////////////////////////// LcacheObj::LcacheObj() { - setAutoDelete(TRUE); + setAutoDelete(true); } LcacheObj::~LcacheObj() diff --git a/kpackage/cache.h b/kpackage/cache.h index 86cac1e..f77c61c 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(), bool Psubdirs = FALSE); + cacheObj(const TQString &Pbase, const TQString &Plocation, const TQString &PcacheFile, const TQString &Poption = TQString(), bool Psubdirs = false); ~cacheObj(); static TQString PDir(); diff --git a/kpackage/debAptInterface.cpp b/kpackage/debAptInterface.cpp index 5f0f067..58752a5 100644 --- a/kpackage/debAptInterface.cpp +++ b/kpackage/debAptInterface.cpp @@ -51,7 +51,7 @@ DEBAPT::DEBAPT():DEB() queryMsg = i18n("Querying DEB APT package list: "); procMsg = i18n("KPackage: Waiting on APT-GET"); - hasRemote = TRUE; + hasRemote = true; locatedialog = new Locations(i18n("Location of Debian Packages")); @@ -64,22 +64,22 @@ DEBAPT::DEBAPT():DEB() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Download only"),FALSE,FALSE,"-d")); - paramsInst.append(new param(i18n("No download"),FALSE,FALSE,"--no-download")); - paramsInst.append(new param(i18n("Ignore missing"),FALSE,FALSE,"-m")); - paramsInst.append(new param(i18n("Ignore hold"),FALSE,FALSE,"--ignore-hold")); - paramsInst.append(new param(i18n("Allow Unauthenticated"),FALSE,FALSE,"--allow-unauthenticated")); - paramsInst.append(new param(i18n("Assume yes"),TRUE,FALSE,"--yes")); - paramsInst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"-s")); + paramsInst.append(new param(i18n("Download only"),false,false,"-d")); + paramsInst.append(new param(i18n("No download"),false,false,"--no-download")); + paramsInst.append(new param(i18n("Ignore missing"),false,false,"-m")); + paramsInst.append(new param(i18n("Ignore hold"),false,false,"--ignore-hold")); + paramsInst.append(new param(i18n("Allow Unauthenticated"),false,false,"--allow-unauthenticated")); + paramsInst.append(new param(i18n("Assume yes"),true,false,"--yes")); + paramsInst.append(new param(i18n("Test (do not uninstall)"),false,false,"-s")); - paramsUninst.append(new param(i18n("Purge Config Files"),FALSE,FALSE,"--purge")); - paramsUninst.append(new param(i18n("Assume yes"),TRUE,FALSE,"--yes")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"-s")); + paramsUninst.append(new param(i18n("Purge Config Files"),false,false,"--purge")); + paramsUninst.append(new param(i18n("Assume yes"),true,false,"--yes")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"-s")); env = "DEBIAN_FRONTEND=readline; export DEBIAN_FRONTEND; "; - noFetch = TRUE; - hasSearchAll = TRUE; + noFetch = true; + hasSearchAll = true; hasProgram = ifExe("apt-get"); } @@ -129,7 +129,7 @@ void DEBAPT::updateS() { if (kprun->run("apt-get update", "APT update")) { if (kprun->exec()) - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } } @@ -137,7 +137,7 @@ void DEBAPT::upgradeS() { if (kprun->run(env + "apt-get dist-upgrade", "APT upgrade")) { if (kprun->exec()) - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } } @@ -145,7 +145,7 @@ void DEBAPT::fixupS() { if (kprun->run(env + "apt-get -f install", "APT fixup")) { if (kprun->exec()) - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } } @@ -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").arg("apt-file"), true); } } @@ -218,7 +218,7 @@ void DEBAPT::listRPack(TQPtrList<packageInfo> *pki) // kdDebug() << "---------\n"; p = collectInfo(plist); if (p) { - if (!p->pkgInsert(pki, typeID, TRUE)) { + if (!p->pkgInsert(pki, typeID, true)) { delete p; } } @@ -274,7 +274,7 @@ void DEBAPT::listAvail(TQPtrList<packageInfo> *pki) } else { p = collectInfo(plist); if (p) { - if (!p->pkgInsert(pki, typeID, FALSE)) { + if (!p->pkgInsert(pki, typeID, false)) { delete p; } } @@ -290,7 +290,7 @@ void DEBAPT::listAvail(TQPtrList<packageInfo> *pki) TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool &cancel) { - bool extras=FALSE, found=FALSE; + bool extras=false, found=false; TQString match; TQString s = "apt-get -s "; @@ -307,11 +307,11 @@ TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool s += " "; } - TQStringList list = kpty->run(s, TRUE, TRUE); + TQStringList list = kpty->run(s, true, true); if (!kpty->inSession) { - cancel = TRUE; // Root login did not work + cancel = true; // Root login did not work } else { - cancel = FALSE; + cancel = false; } // kdDebug() << "LS=" << list.count() << "\n"; @@ -327,7 +327,7 @@ TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool break; } } - extras=TRUE; + extras=true; } } @@ -365,7 +365,7 @@ TQStringList DEBAPT::FindFile(const TQString &name, bool searchAll) 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").arg("apt-file"), true); TQStringList nill; return nill; } @@ -414,7 +414,7 @@ TQString DEBAPT::doUninstall(int uninstallFlags, const TQString &packs, bool &te kdDebug() << "uCMD=" << s << "\n"; if (uninstallFlags>>2 & 1) - test = TRUE; + test = true; return s; } @@ -456,7 +456,7 @@ TQString DEBAPT::doInstall(int installFlags, const TQString &packs, bool &test) kdDebug() << "iCMD=" << s << "\n"; if ((installFlags>>0 & 1) || (installFlags>>5 & 1)) - test = TRUE; + test = true; return s; } @@ -525,7 +525,7 @@ void DEBAPT::writeApt(const TQStringList &list) { cmd += "mv /etc/apt/sources.list /etc/apt/sources.list.b; mv /etc/apt/sources.list.n /etc/apt/sources.list; fi\" "; - TQStringList rlist = kpty->run(cmd,TRUE,TRUE); + TQStringList rlist = kpty->run(cmd,true,true); //for ( TQStringList::Iterator it = rlist.begin(); it != rlist.end(); ++it ) { // kdDebug() << "SL=" << *it << "\n"; //} diff --git a/kpackage/debDpkgInterface.cpp b/kpackage/debDpkgInterface.cpp index ddacf75..624630a 100644 --- a/kpackage/debDpkgInterface.cpp +++ b/kpackage/debDpkgInterface.cpp @@ -81,15 +81,15 @@ DEBDPKG::DEBDPKG():DEB() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Allow Downgrade"),TRUE,TRUE,"--refuse-downgrade")); - paramsInst.append(new param(i18n("Check Conflicts"),TRUE,TRUE,"--force-conflicts")); - paramsInst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--force-depends")); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"--no-act")); + paramsInst.append(new param(i18n("Allow Downgrade"),true,true,"--refuse-downgrade")); + paramsInst.append(new param(i18n("Check Conflicts"),true,true,"--force-conflicts")); + paramsInst.append(new param(i18n("Check Dependencies"),true,true,"--force-depends")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"--no-act")); - paramsUninst.append(new param(i18n("Purge Config Files"),TRUE,FALSE, + paramsUninst.append(new param(i18n("Purge Config Files"),true,false, "--purge","--remove")); - paramsUninst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--force-depends")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"--no-act")); + paramsUninst.append(new param(i18n("Check Dependencies"),true,true,"--force-depends")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"--no-act")); hasProgram = ifExe("dpkg"); diff --git a/kpackage/debInterface.cpp b/kpackage/debInterface.cpp index 5b0bf58..a66d7b7 100644 --- a/kpackage/debInterface.cpp +++ b/kpackage/debInterface.cpp @@ -132,10 +132,10 @@ bool DEB::parseName(const TQString &name, TQString *n, TQString *v) d1 = d2; *n = name.left(d1); *v = name.mid(d1+1,s1-d1-1); - return TRUE; + return true; } } - return FALSE; + return false; } void DEB::listInstalledPackages(TQPtrList<packageInfo> *pki) @@ -145,7 +145,7 @@ void DEB::listInstalledPackages(TQPtrList<packageInfo> *pki) void DEB::listPackList(TQPtrList<packageInfo> *pki, const TQString &fname, cacheObj *cp) { - bool local = FALSE; + bool local = false; packageInfo *p; TQStringList list; TQString sline( i18n("Querying DEB package list: ")+fname ); @@ -260,7 +260,7 @@ packageInfo *DEB::getIRPackageInfo( const TQString &name) if (list.count() > 1) { pki = DEB::collectInfo(list); if (pki) { - pki->updated = TRUE; + pki->updated = true; if (pki->getFilename().isEmpty()) pki->setFilename(name); } @@ -292,7 +292,7 @@ packageInfo *DEB::getUPackageInfo( const TQString &name) if (list.count() > 1) { pki = DEB::collectInfo(list, kpinterface[0]); // To be fixed up later, assumes order of kpinterface if (pki) - pki->updated = TRUE; + pki->updated = true; } return pki; @@ -310,9 +310,9 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) TQMap<TQString, TQString> a; TQString key, val; - bool bad_install = FALSE; - bool available = FALSE; - bool haveName = FALSE; + bool bad_install = false; + bool available = false; + bool haveName = false; for ( TQStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) { loop: @@ -347,10 +347,10 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) break; } else if (key == "package") { a.insert("name", val); - haveName = TRUE; + haveName = true; } else if (key == "md5sum") { - available = TRUE; - bad_install = FALSE; + available = true; + bad_install = false; } else if (key == "section") { a.insert("group", val); } else if (key == "status") { @@ -361,7 +361,7 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) val != "deinstall ok installed" && val != "deinstall ok config-files" && val != "purge ok installed") { - bad_install = TRUE; + bad_install = true; } a.insert("status", val); } else if (key == "version") { diff --git a/kpackage/fbsdInterface.cpp b/kpackage/fbsdInterface.cpp index 98174e2..b0a752c 100644 --- a/kpackage/fbsdInterface.cpp +++ b/kpackage/fbsdInterface.cpp @@ -71,19 +71,19 @@ fbsdInterface::fbsdInterface():pkgInterface() { locatedialog = new Locations(i18n("Location of BSD Packages and Ports")); locatedialog->dLocations(1, 1, this, i18n("Ports"), "Pkg", "*.tbz", - i18n("Location of Ports Tree (e.g. /usr/ports or /usr/opt)"),FALSE); + i18n("Location of Ports Tree (e.g. /usr/ports or /usr/opt)"),false); locatedialog->dLocations(1, 6, this, i18n("Packages"), "Pkg", "*.tbz", i18n("Location of Folders Containing BSD Packages or Package Trees")); connect(locatedialog, TQ_SIGNAL(returnVal(LcacheObj *)), this, TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Ignore Scripts"),FALSE,FALSE,"-I")); - paramsInst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"-f")); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"-n")); + paramsInst.append(new param(i18n("Ignore Scripts"),false,false,"-I")); + paramsInst.append(new param(i18n("Check Dependencies"),true,true,"-f")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"-n")); - paramsUninst.append(new param(i18n("Ignore Scripts"),FALSE,FALSE, "-I")); - paramsUninst.append(new param(i18n("Check Dependencies"),TRUE,TRUE, "-f")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE, "-n")); + paramsUninst.append(new param(i18n("Ignore Scripts"),false,false, "-I")); + paramsUninst.append(new param(i18n("Check Dependencies"),true,true, "-f")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false, "-n")); hasProgram = ifExe("pkg_info") && ifExe("pkg_add"); } @@ -223,11 +223,11 @@ TQStringList fbsdInterface::getChangeLog(packageInfo *) { bool fbsdInterface::filesTab(packageInfo *) { - return TRUE; + return true; } bool fbsdInterface::changeTab(packageInfo *) { - return FALSE; + return false; } TQStringList fbsdInterface::getFileList(packageInfo *p) { @@ -527,7 +527,7 @@ 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); + KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").arg(value), true); kpackage->setStatus(TQString()); return; } else { @@ -578,7 +578,7 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a) bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const TQString &dname) : bin(binaries), port(!binaries), installed(false) { - fields = TQStringList::split('|', desc, TRUE); + fields = TQStringList::split('|', desc, true); TQString name = fields[NAME]; bsdPortsIndexItem *port = parent->ports[name]; diff --git a/kpackage/findf.cpp b/kpackage/findf.cpp index 2a39057..0998d71 100644 --- a/kpackage/findf.cpp +++ b/kpackage/findf.cpp @@ -78,7 +78,7 @@ FindF::FindF(TQWidget *parent) tab->addColumn("",0); // Hidden column for package type tab->addColumn(i18n("Package"),180); tab->addColumn(i18n("File Name"),330); - tab->setAllColumnsShowFocus(TRUE); + tab->setAllColumnsShowFocus(true); tab->setSorting(1); if (kpackage->management->dirInstPackages->find("apt-file/deb")) { @@ -86,7 +86,7 @@ FindF::FindF(TQWidget *parent) } else { searchAll = new TQCheckBox(i18n("Also search uninstalled packages (apt-file needs to be installed)"), frame1, "searchAll"); } - searchAll->setChecked(FALSE); + searchAll->setChecked(false); gtop->addWidget(valueLabel, 0, 0); gtop->addWidget(value, 0, 1); @@ -110,11 +110,11 @@ void FindF::checkSearchAll() { // button not enabled if no package interface has search uninstalled // packages for files ability - bool hasAll = FALSE; + bool hasAll = false; for (int i = 0; i < kpinterfaceN; i++) { if (kpinterface[i] && opts->handlePackage[i]) { if (kpinterface[i]->hasSearchAll) - hasAll = TRUE; + hasAll = true; } } @@ -221,7 +221,7 @@ void FindF::dropEvent(TQDropEvent *de) // something has been dropped value->setText(file); doFind(file); } else { - KpMsgE(i18n("Incorrect URL type"),FALSE); + KpMsgE(i18n("Incorrect URL type"),false); } } diff --git a/kpackage/kissInterface.cpp b/kpackage/kissInterface.cpp index 71a2a4e..a2a3796 100644 --- a/kpackage/kissInterface.cpp +++ b/kpackage/kissInterface.cpp @@ -82,11 +82,11 @@ KISS::KISS():pkgInterface() procMsg = i18n("KPackage: Waiting on KISS"); param paramsInst[] = { - param(0,FALSE,FALSE,0) + param(0,false,false,0) }; param paramsUninst[] = { - param(0,FALSE,FALSE,0) + param(0,false,false,0) }; hasProgram = ifExe("kiss"); } @@ -125,10 +125,10 @@ bool KISS::parseName(const TQString& name, TQString *n, TQString *v) d1 = d2; *n = name.left(d1); *v = name.mid(d1+1,s1-d1-1); - return TRUE; + return true; } } - return FALSE; + return false; } void KISS::listInstalledPackages(TQPtrList<packageInfo> *pki) @@ -140,7 +140,7 @@ void KISS::listInstalledPackages(TQPtrList<packageInfo> *pki) reader.setup("kiss"); *reader.proc << "-qq"; - if (!reader.start(0,FALSE)) + if (!reader.start(0,false)) return; kpackage->setStatus(sline); @@ -154,7 +154,7 @@ void KISS::listInstalledPackages(TQPtrList<packageInfo> *pki) break; p = collectInfo(reader.buf.mid(sp,sc-sp).ascii()); if (p) { - if (!p->pkgInsert(pki, typeID, TRUE)) { + if (!p->pkgInsert(pki, typeID, true)) { delete p; } } @@ -179,7 +179,7 @@ packageInfo *KISS::getPackageInfo(char mode, const TQString &name, const TQStrin case 'i': reader.setup("kiss"); *reader.proc << "-q" << name; - if (reader.start(0,FALSE)) { + if (reader.start(0,false)) { reader.buf += "package: " + name + "\n"; pki = collectInfo(reader.buf.ascii()); } @@ -190,7 +190,7 @@ packageInfo *KISS::getPackageInfo(char mode, const TQString &name, const TQStrin case 'u': reader.setup("perl"); *reader.proc << name << "-q"; - if (reader.start(0,TRUE)) { + if (reader.start(0,true)) { pki = collectInfo(reader.buf.ascii()); TQFileInfo fi(name); @@ -275,11 +275,11 @@ TQStringList KISS::getChangeLog(packageInfo *) { bool KISS::filesTab(packageInfo *) { - return TRUE; + return true; } bool KISS::changeTab(packageInfo *) { - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// @@ -306,7 +306,7 @@ TQStringList KISS::getFileList(packageInfo *p) reader.setup("kiss"); *reader.proc << "-f" << name; - if (reader.start(0,FALSE)) { + if (reader.start(0,false)) { char *buffer = tqstrdup(reader.buf.ascii()); char *str = strtok(buffer,"\n"); if (str) { @@ -323,7 +323,7 @@ TQStringList KISS::getFileList(packageInfo *p) case 'u': reader.setup("perl"); *reader.proc << fn << "-f"; - if (reader.start(0,TRUE)) { + if (reader.start(0,true)) { char *buffer = tqstrdup(reader.buf.ascii()); char *str = strtok(buffer,"\n"); if (str) { diff --git a/kpackage/kpPty.cpp b/kpackage/kpPty.cpp index 2919dc4..2530297 100644 --- a/kpackage/kpPty.cpp +++ b/kpackage/kpPty.cpp @@ -86,10 +86,10 @@ kpPty::kpPty() : TQObject() tm = new TQTimer(this); connect(tm, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTimeout())); - eventLoop = FALSE; - inSession = FALSE; - pUnterm = FALSE; - loginSession = FALSE; + eventLoop = false; + inSession = false; + pUnterm = false; + loginSession = false; codec = TQTextCodec::codecForLocale(); TQMap<TQString, TQString> passwords; @@ -138,19 +138,19 @@ bool kpPty::needSession(bool needRoot) bool kpPty::startSession(bool needRoot) { - bool interact = FALSE; // Have interacted with user, prevents loops - bool passwordTried = FALSE; // Have tried the current save password, so need to put up dialog - pUnterm = FALSE; + bool interact = false; // Have interacted with user, prevents loops + bool passwordTried = false; // Have tried the current save password, so need to put up dialog + pUnterm = false; kdDebug() << "kpPty::startSession\n"; if (!inSession && needSession(needRoot)) { // Assume !needRoot actions are simple executables - kdDebug() << "kpPty::startSession TRUE\n"; - loginSession = TRUE; + kdDebug() << "kpPty::startSession true\n"; + loginSession = true; int ret; TQString s = "echo START=$?\n"; FULL_RESTART: - interact = FALSE; + interact = false; retList.clear(); pty->resetAll(); @@ -169,14 +169,14 @@ bool kpPty::startSession(bool needRoot) pty->sstart(TDEProcess::NotifyOnExit); RESTART: - tm->start(6*1000, TRUE); - eventLoop = TRUE; + tm->start(6*1000, true); + eventLoop = true; kdDebug() << "Loopst\n"; tdeApp->enter_loop(); kdDebug() << "Loopfn Result=" << Result << "\n"; tm->stop(); if (Result == TIMEOUT) { // timeout - interact = TRUE; + interact = true; // kdDebug() << "Line=" << retList.last() << "\n"; kpstart->addText(retList); kpstart->run("", i18n("Login Problem: Please login manually")); @@ -184,14 +184,14 @@ bool kpPty::startSession(bool needRoot) ret = kpstart->exec(); kdDebug() << "Sret=" << ret << "\n"; if (ret) { - inSession = FALSE; + inSession = false; } else { - inSession = TRUE; + inSession = true; } } else if (Result == PASSWORD) { // We got a password prompt TQString pass; int res; - interact = TRUE; + interact = true; // kdDebug() << "H=" << hostName << " PH=" << passwords[hostName] << " PT=" << passwordTried <<"\n"; if (passwords[hostName] != 0 && !passwordTried) { pass = passwords[hostName]; @@ -213,31 +213,31 @@ bool kpPty::startSession(bool needRoot) } } pty->writeStdin(pass.append("\n"), false); - passwordTried = TRUE; + passwordTried = true; if (res) { retList.clear(); goto RESTART; } else { - inSession = FALSE; + inSession = false; } } else if (Result == PROMPT) { // Got Prompt - inSession = TRUE; - kdDebug() << "kpPty::startSession TRUE\n"; + inSession = true; + kdDebug() << "kpPty::startSession true\n"; } else { // process return code pty->writeStdin(TQCString("\04"), false); // SU doesn't listen to ^C if (interact) { goto FULL_RESTART; } else { TQString errMsg = retList.join(" "); - KpMsgE(errMsg, TRUE); - inSession = FALSE; + KpMsgE(errMsg, true); + inSession = false; } } } else { kdDebug() << "kpPty::startSession Not needed\n"; } - loginSession = FALSE; + loginSession = false; if (!inSession) close(); @@ -248,7 +248,7 @@ void kpPty::breakUpCmd(const TQString &cmd) { kdDebug() << " kpPty::run CMD=\""<< cmd <<"\" pty = " << pty << endl; - bool quote = FALSE; + bool quote = false; TQString s; TQStringList cl = TQStringList::split(" ", cmd); @@ -259,16 +259,16 @@ void kpPty::breakUpCmd(const TQString &cmd) if ((*it)[lastPt] == '\'') { // Also End of quoted string s.replace("'",""); (*pty) << s; - quote = FALSE; + quote = false; } else { s += " "; - quote = TRUE; + quote = true; } } else if ((*it)[lastPt] == '\'') { // End of quoted string s += *it; s.replace("'",""); (*pty) << s; - quote = FALSE; + quote = false; } else if (quote) { s += *it; s += " "; @@ -282,7 +282,7 @@ TQStringList kpPty::run(const TQString &cmd, bool inLoop, bool needRoot) { Result = 0; - pUnterm = FALSE; + pUnterm = false; if (!inSession && !needSession(needRoot)) { // Assume !needRoot actions are simple executables @@ -308,7 +308,7 @@ TQStringList kpPty::run(const TQString &cmd, bool inLoop, bool needRoot) retList.clear(); if (inLoop) { - eventLoop = TRUE; + eventLoop = true; tdeApp->enter_loop(); return retList; @@ -366,14 +366,14 @@ void kpPty::finish(int ret) if (eventLoop) { - eventLoop = FALSE; + eventLoop = false; tdeApp->exit_loop(); } } void kpPty::readLines() { - bool unterm = FALSE; + bool unterm = false; TQString stext; while(pty->readln(stext, false, &unterm) >= 0) diff --git a/kpackage/kpPty.h b/kpackage/kpPty.h index 35ba413..88d5ba7 100644 --- a/kpackage/kpPty.h +++ b/kpackage/kpPty.h @@ -59,8 +59,8 @@ public: kpPty(); ~kpPty(); - TQStringList run(const TQString &cmd, bool inLoop = TRUE, - bool needRoot= FALSE); + TQStringList run(const TQString &cmd, bool inLoop = true, + bool needRoot= false); bool startSession(bool needRoot); void close(); diff --git a/kpackage/kpTerm.cpp b/kpackage/kpTerm.cpp index cc94726..ba0dd26 100644 --- a/kpackage/kpTerm.cpp +++ b/kpackage/kpTerm.cpp @@ -46,7 +46,7 @@ kpTerm::kpTerm(kpPty *pt, TQWidget * parent, const char * name ) : // setMinimumWidth(fontMetrics().maxWidth()*80 + // minimumSizeHint().width()); setWordWrap(NoWrap); - setReadOnly(TRUE); + setReadOnly(true); } void kpTerm::doConnect() @@ -71,15 +71,15 @@ void kpTerm::doUnconnect() bool kpTerm::run(const TQString &cmd, TQStringList &r) { - setReadOnly(FALSE); + setReadOnly(false); setFocus(); - if (pty->startSession(TRUE)) { + if (pty->startSession(true)) { doConnect(); - r = pty->run(cmd,FALSE); - return TRUE; + r = pty->run(cmd,false); + return true; } else { - return FALSE; + return false; } } @@ -91,7 +91,7 @@ void kpTerm::done() { clear(); doUnconnect(); - setReadOnly(TRUE); + setReadOnly(true); clearFocus(); } @@ -152,7 +152,7 @@ void kpTerm::insert ( const TQString & str, bool) { getCursorPosition(&y,&x); // kdDebug() << "k=" << y << "," << x <<"\n"; } - TQTextEdit::insert(str,(bool)FALSE); + TQTextEdit::insert(str,(bool)false); } } @@ -197,7 +197,7 @@ bool kpRun::run(TQString cmd, TQString msg) return term->run(cmd, r); } else { term->doConnect(); - term->setReadOnly(FALSE); + term->setReadOnly(false); term->setFocus(); return true; } diff --git a/kpackage/kpTerm.h b/kpackage/kpTerm.h index da6254e..74031f6 100644 --- a/kpackage/kpTerm.h +++ b/kpackage/kpTerm.h @@ -53,7 +53,7 @@ public: bool run(const TQString &cmd, TQStringList &r); void doConnect(); void doUnconnect(); - void insert ( const TQString & str, bool mark=FALSE ); + void insert ( const TQString & str, bool mark=false ); kpPty *pty; void cancel(); void done(); diff --git a/kpackage/kpackage.cpp b/kpackage/kpackage.cpp index e3246bb..bbc1429 100644 --- a/kpackage/kpackage.cpp +++ b/kpackage/kpackage.cpp @@ -189,7 +189,7 @@ void KPKG::setupMenu() } } - // urlList.setAutoDelete(TRUE); + // urlList.setAutoDelete(true); createGUI(); } @@ -367,7 +367,7 @@ void KPACKAGE::setupStatusBar() statusbar = new TQFrame(this); statusbar->setFrameStyle(TQFrame::Raised | TQFrame::Panel); processProgress = new KProgress(100,statusbar); - processProgress->setTextEnabled(FALSE); + processProgress->setTextEnabled(false); status = new TQLabel(i18n("Management Mode"), statusbar); } @@ -417,7 +417,7 @@ void KPACKAGE::cleanUp() // file->quit selected from menu void KPACKAGE::reload() { - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } void KPACKAGE::fileOpen() // file->quit selected from menu @@ -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").arg(fname),true); } else { - KpMsgE(i18n("File not found: %1").arg(fname),TRUE); + KpMsgE(i18n("File not found: %1").arg(fname),true); } return 0; @@ -544,7 +544,7 @@ void KPACKAGE::openNetFiles (const TQStringList &urls, bool install ) kpinterface[i]->installation->setup(lst[i],kpinterface[i]->head); if (kpinterface[i]->installation->exec()) { for (packageInfo *inf = lst[i]->first(); inf != 0; inf = lst[i]->next()) { - kpackage->management->updatePackage(inf,TRUE); + kpackage->management->updatePackage(inf,true); } } } @@ -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").arg(url.url()),true); } else { // Just a usual file ? @@ -701,7 +701,7 @@ KFileDialog* KPACKAGE::getFileDialog(const TQString &captiontext) if(!file_dialog) { file_dialog = new KFileDialog(TQDir::currentDirPath(), "", - this,"file_dialog",TRUE); + this,"file_dialog",true); } TQString pat; diff --git a/kpackage/kpackage.h b/kpackage/kpackage.h index 3315e55..722b485 100644 --- a/kpackage/kpackage.h +++ b/kpackage/kpackage.h @@ -97,8 +97,8 @@ public: int typeIndex(pkgInterface *); // convert interface pointer to index - void openNetFiles(const TQStringList &urls, bool install=TRUE); - void openNetFile(const KURL & url, bool install=TRUE); + void openNetFiles(const TQStringList &urls, bool install=true); + void openNetFile(const KURL & url, bool install=true); // open a file given a URL TQString fetchNetFile(const KURL & url); @@ -333,6 +333,6 @@ extern TQString hostName; extern pkgInterface *kpinterface[]; void KpMsg(const TQString &lab, const TQString &msg, bool stop); -void KpMsgE(const TQString &msg, bool stop = FALSE); +void KpMsgE(const TQString &msg, bool stop = false); #endif diff --git a/kpackage/kplview.cpp b/kpackage/kplview.cpp index 3bbbb4e..12c9345 100644 --- a/kpackage/kplview.cpp +++ b/kpackage/kplview.cpp @@ -68,8 +68,8 @@ TDEListView (parent) addColumn(i18n("Old Version")); setColumnWidthMode(5,TQListView::Manual); - // setAllColumnsShowFocus(TRUE); - setRootIsDecorated(TRUE); + // setAllColumnsShowFocus(true); + setRootIsDecorated(true); readTreeConfig(); update(); show(); @@ -295,7 +295,7 @@ void KpTreeList::expandTree(KpTreeList *list) while (item) { if (item->childCount() > 0) { - item->setOpen(TRUE); + item->setOpen(true); expandTree(item); } item = item->nextSibling(); @@ -309,7 +309,7 @@ void KpTreeList::expandTree(KpTreeListItem *pitem) while (item) { if (item->childCount() > 0) { - item->setOpen(TRUE); + item->setOpen(true); expandTree(item); } item = item->nextSibling(); @@ -341,9 +341,9 @@ void KpTreeList::collapseTree(KpTreeListItem *pitem) item = item->nextSibling(); }; if (n) - pitem->setOpen(TRUE); + pitem->setOpen(true); else - pitem->setOpen(FALSE); + pitem->setOpen(false); } /////////////////////////////////////////////////////////////////////////// @@ -365,13 +365,13 @@ void KpTreeList::packageHighlighted(TQListViewItem *item, packageDisplayWidget * } // Disable the tree list while we do this - setEnabled(FALSE); + setEnabled(false); // Tell everything that is interested to change packages packageDisplay->changePackage(sel->info); // Re-enable the treeList and uninstall button - setEnabled(TRUE); + setEnabled(true); setFocus(); if (!notPress) { @@ -388,8 +388,8 @@ KpTreeListItem *KpTreeList::search(const TQString &str, const TQString &head, KpTreeListItem *item = firstChild(); searchCitem = start; - searchSkip = FALSE; - searchSubstr = FALSE; + searchSkip = false; + searchSubstr = false; searchStr = str; searchResult = 0; @@ -404,7 +404,7 @@ KpTreeListItem *KpTreeList::search(const TQString &str, const TQString &head, } KpTreeListItem *KpTreeList::search(const TQString &str, bool subStr, bool wrap, - bool start=FALSE) + bool start=false) { if (!firstChild()) return 0; @@ -430,26 +430,26 @@ 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.contains(searchStr,false) : s == searchStr)) { searchResult = it; - return TRUE; + return true; } } if (searchCitem == it) { if (searchSkip) { - searchSkip = FALSE; + searchSkip = false; } else { - return TRUE; + return true; } } if (it->childCount() > 0) { if (searchChild(it->firstChild())) - return TRUE; + return true; } } while ((it = it->nextSibling())); - return FALSE; + return false; } KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) @@ -459,7 +459,7 @@ KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) i = searchResult; while ((i = i->parent())) { - i->setOpen(TRUE); + i->setOpen(true); } if (push) { stack.append(searchResult); @@ -467,7 +467,7 @@ KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) } notPress = true; - setSelected(searchResult,TRUE); + setSelected(searchResult,true); setCurrentItem(searchResult); ensureItemVisible(searchResult); return searchResult; diff --git a/kpackage/main.cpp b/kpackage/main.cpp index 396fe7b..68779f6 100644 --- a/kpackage/main.cpp +++ b/kpackage/main.cpp @@ -144,7 +144,7 @@ int main(int argc, char **argv) for(int i = 0; i < args->count(); i++) { files.append(args->url(i).url()); } - kpackage->openNetFiles(files, FALSE); + kpackage->openNetFiles(files, false); } else { if (!kpkg->prop_restart) kpackage->setup(); diff --git a/kpackage/managementWidget.cpp b/kpackage/managementWidget.cpp index 8287006..7fa0c6b 100644 --- a/kpackage/managementWidget.cpp +++ b/kpackage/managementWidget.cpp @@ -162,11 +162,11 @@ void managementWidget::setupWidgets() lbuttons = new TQBoxLayout(TQBoxLayout::LeftToRight); luinstButton = new TQPushButton(i18n("Uninstall Marked"),leftpanel); - luinstButton->setEnabled(FALSE); + luinstButton->setEnabled(false); connect(luinstButton,TQ_SIGNAL(clicked()), TQ_SLOT(uninstallMultClicked())); linstButton = new TQPushButton(i18n("Install Marked"),leftpanel); - linstButton->setEnabled(FALSE); + linstButton->setEnabled(false); connect(linstButton,TQ_SIGNAL(clicked()), TQ_SLOT(installMultClicked())); @@ -191,11 +191,11 @@ void managementWidget::setupWidgets() rbuttons = new TQBoxLayout(TQBoxLayout::LeftToRight); uinstButton = new TQPushButton(i18n("Uninstall"),rightpanel); - uinstButton->setEnabled(FALSE); + uinstButton->setEnabled(false); connect(uinstButton,TQ_SIGNAL(clicked()), TQ_SLOT(uninstallSingleClicked())); instButton = new TQPushButton(i18n("Install"),rightpanel); - instButton->setEnabled(FALSE); + instButton->setEnabled(false); connect(instButton,TQ_SIGNAL(clicked()), TQ_SLOT(installSingleClicked())); @@ -327,7 +327,7 @@ void managementWidget::collectData(bool refresh) } allPackages = new TQPtrList<packageInfo>; - allPackages->setAutoDelete(TRUE); + allPackages->setAutoDelete(true); dirInstPackages->clear(); dirUninstPackages->clear(); @@ -365,7 +365,7 @@ void managementWidget::rebuildListTree() for(i=allPackages->first(); i!=0; i=allPackages->next()) { - i->place(treeList,TRUE); + i->place(treeList,true); if (!(n % incr)) { kpackage->setPercent(int (n*100/count)); @@ -419,7 +419,7 @@ void managementWidget::installSingleClicked() // it was accepted, so the package has been installed packageInfo *inf; for (inf = plist.first(); inf != 0; inf = plist.next()) { - updatePackage(inf,TRUE); + updatePackage(inf,true); } if (treeList->currentItem()) { @@ -441,7 +441,7 @@ void managementWidget::installSingleClicked() setupInstButton(); } } else { - KpMsgE(i18n("Filename not available\n"),TRUE); + KpMsgE(i18n("Filename not available\n"),true); } } } @@ -485,7 +485,7 @@ void managementWidget::installMultClicked() if (kpinterface[i]->installation->exec() || kpinterface[i]->installation->modified) { for (inf = lst[i]->first(); inf != 0; inf = lst[i]->next()) { - updatePackage(inf,TRUE); + updatePackage(inf,true); } } } @@ -521,7 +521,7 @@ void managementWidget::uninstallSingleClicked() interface->installation->modified) { packageInfo *inf; for (inf = plist.first(); inf != 0; inf = plist.next()) { - updatePackage(inf,FALSE); + updatePackage(inf,false); } if (treeList->currentItem()) { @@ -572,7 +572,7 @@ void managementWidget::uninstallMultClicked() if (kpinterface[i]->uninstallation->exec()|| kpinterface[i]->installation->modified ) { for (inf = lst[i]->first(); inf != 0; inf = lst[i]->next()) { - updatePackage(inf,FALSE); + updatePackage(inf,false); } } } @@ -644,7 +644,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) dirInstPackages->insert(pkgId,pnew); - q = pnew->place(treeList,TRUE); + q = pnew->place(treeList,true); allPackages->insert(0,pnew); if (!q) { printf("NOTP=%s \n",pnew->getProperty("name").ascii()); @@ -668,7 +668,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) packageInfo *pb = dirUninstPackages->find(pkgId); if (pb) { // available package matching the one just uninstalled pb->packageState = packageInfo::NEW; - q = pb->place(treeList,TRUE); + q = pb->place(treeList,true); if (!q) { printf("NOTP=%s \n",pb->getProperty("name").ascii()); } else { diff --git a/kpackage/managementWidget.h b/kpackage/managementWidget.h index f8fa276..8135602 100644 --- a/kpackage/managementWidget.h +++ b/kpackage/managementWidget.h @@ -111,7 +111,7 @@ public: // emit change package KpTreeListItem *search(TQString str, bool subStr, bool wrap, - bool start=FALSE); + bool start=false); protected: void resizeEvent(TQResizeEvent *re); // This is called when the widget is resized diff --git a/kpackage/options.cpp b/kpackage/options.cpp index 360dce8..65bc800 100644 --- a/kpackage/options.cpp +++ b/kpackage/options.cpp @@ -223,7 +223,7 @@ void Options::setValues() { } if (!hostName.isEmpty()) { - huse->setChecked(TRUE); + huse->setChecked(true); } // kdDebug() << "C=" <<opts->hostList.count() << "\n"; @@ -235,9 +235,9 @@ void Options::setValues() { } scanLocates(); - dcache[DCache]->setChecked(TRUE); - pcache[PCache]->setChecked(TRUE); - privs[privCmd]->setChecked(TRUE); + dcache[DCache]->setChecked(true); + pcache[PCache]->setChecked(true); + privs[privCmd]->setChecked(true); cachedir->lineEdit()->setText(CacheDir); valid->setChecked(opts->VerifyFL); diff --git a/kpackage/packageDisplay.cpp b/kpackage/packageDisplay.cpp index e7a4114..7553b49 100644 --- a/kpackage/packageDisplay.cpp +++ b/kpackage/packageDisplay.cpp @@ -207,7 +207,7 @@ void packageDisplayWidget::changePackage(packageInfo *p) } package->interface = np->interface; delete np; - package->updated = TRUE; + package->updated = true; } } @@ -367,7 +367,7 @@ void packageDisplayWidget::updateFileList() { hide(); addColumn("name"); - setRootIsDecorated(TRUE); + setRootIsDecorated(true); connect(this, TQ_SIGNAL(contextMenu(TDEListView *, TQListViewItem *, const TQPoint &)), this, TQ_SLOT( openContext(TDEListView *, TQListViewItem *, const TQPoint &)) ); @@ -397,7 +397,7 @@ void packageDisplayWidget::updateFileList() void kpFileList::openContext(TDEListView *, TQListViewItem *, const TQPoint &p) { FileListMenu->setItemEnabled(openwith, - (selectedItem() && pkDisplay->package && pkDisplay->package->getFilename().isEmpty()) ? TRUE : FALSE); + (selectedItem() && pkDisplay->package && pkDisplay->package->getFilename().isEmpty()) ? true : false); FileListMenu->exec(p); } diff --git a/kpackage/packageInfo.cpp b/kpackage/packageInfo.cpp index 7dcbf9f..616bc2b 100644 --- a/kpackage/packageInfo.cpp +++ b/kpackage/packageInfo.cpp @@ -65,7 +65,7 @@ packageInfo::packageInfo(TQMap<TQString, TQString> _info, pkgInterface *type) item = NULL; packageState = UNSET; - updated = FALSE; + updated = false; url = TQString(); } @@ -265,7 +265,7 @@ int packageInfo::pnewer(const TQString &s, const TQString &sp) int ns = 0, nsp = 0, vs, vsp; // kdDebug() << "S=" << s << " SP=" << sp << "\n"; - while (TRUE) { + while (true) { vs = getDigElement(s,&ns); vsp = getDigElement(sp,&nsp); // kdDebug() << "s=" << ns << " " << vs << " sp=" << nsp << " " << vsp << "\n"; @@ -369,21 +369,21 @@ bool packageInfo::display(int treeType) switch (treeType) { case Opts::INSTALLED: if (packageState == INSTALLED || packageState == BAD_INSTALL) - return TRUE; + return true; break; case Opts::UPDATED: if (packageState == UPDATED) - return TRUE; + return true; break; case Opts::NEW: if ((packageState == UPDATED) || (packageState == NEW)) - return TRUE; + return true; break; case Opts::ALL: - return TRUE; + return true; break; }; - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////// @@ -393,11 +393,11 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) { KpTreeListItem *search = tree->firstChild(), *parent=NULL, *child=NULL; TQString qtmp, tmp; - bool doit = FALSE; + bool doit = false; - doit = TRUE; + doit = true; if (packageState == NOLIST || packageState == HIDDEN) - doit = FALSE; + doit = false; if (doit) { qtmp = interface->head; @@ -411,7 +411,7 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) if( search && (group=findGroup(*it, search)) ) { parent = group; - parent->setOpen(TRUE); + parent->setOpen(true); search = group->firstChild(); } else { if (parent) { @@ -420,7 +420,7 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) group = new KpTreeListItem(tree, 0, interface->folder, *it); } parent = group; - parent->setOpen(TRUE); + parent->setOpen(true); search = NULL; } cnt++; @@ -484,9 +484,9 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) } if (insertI) { - parent->setOpen(TRUE); + parent->setOpen(true); } else { - parent->setOpen(FALSE); + parent->setOpen(false); } return item; @@ -520,9 +520,9 @@ bool packageInfo::smerge( const TQString &exp) { } ++it; } - return TRUE; + return true; } - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// @@ -531,9 +531,9 @@ void packageInfo::pkgFileIns(const TQString &fileName) info.insert("filename", fileName); info.insert("base", "/"); - if (pkgInsert(kpackage->management->allPackages, interface->typeID, FALSE)) { + if (pkgInsert(kpackage->management->allPackages, interface->typeID, false)) { packageState = packageInfo::NEW; - place(kpackage->management->treeList,TRUE); + place(kpackage->management->treeList,true); TQString pname = getProperty("name") + interface->typeID; kpackage->management->dirUninstPackages->insert(pname,this); @@ -551,15 +551,15 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, TQString pname = getProperty("name") + exp; // printf("U1=%s\n",pname.data()); - bool shouldUpdate = TRUE; - bool hidden = FALSE; + bool shouldUpdate = true; + bool hidden = false; packageInfo *pi = dirInstPackages->find(pname); if (pi) { // installed version exists if ((pi->packageState != BAD_INSTALL) && (pi->packageState != NOLIST)) { if (newer(pi) >= 0) { - hidden = TRUE; + hidden = true; } } } @@ -569,7 +569,7 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, if ((pu->packageState != BAD_INSTALL) && (pu->packageState != NOLIST)) { if (newer(pu) >= 0) { - shouldUpdate = FALSE; + shouldUpdate = false; } else if (!installed) { // If older available package exists, remove it dirUninstPackages->remove(*(pu->info.find("name"))); pki->remove(pu); @@ -578,7 +578,7 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, } if (getProperty("version").isEmpty()) { - shouldUpdate = TRUE; + shouldUpdate = true; } if (shouldUpdate) { @@ -624,9 +624,9 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, dirInstPackages->insert(pname,this); } else dirUninstPackages->insert(pname,this); - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/kpackage/packageInfo.h b/kpackage/packageInfo.h index 1ce24a3..0ffc74b 100644 --- a/kpackage/packageInfo.h +++ b/kpackage/packageInfo.h @@ -86,7 +86,7 @@ public: void fixup(); // Initialize fields if missing - KpTreeListItem *place(KpTreeList *tree, bool InsertI=FALSE); + KpTreeListItem *place(KpTreeList *tree, bool InsertI=false); // places the object in the treelist `tree' and initialises // `item'. If necessary, new groups will be added to `tree'. @@ -120,7 +120,7 @@ public: // Insert a package from a file into package tree bool pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, bool installed, - bool infoPackage = FALSE); + bool infoPackage = false); // insert packgeInfo either installed or not installed TQMap<TQString, TQString> info; diff --git a/kpackage/pkgInterface.cpp b/kpackage/pkgInterface.cpp index 288caf4..e1d6710 100644 --- a/kpackage/pkgInterface.cpp +++ b/kpackage/pkgInterface.cpp @@ -75,10 +75,10 @@ pkgInterface::pkgInterface( ) : TQObject(), new_pict(), updated_pict() markUnInst = UserIcon("noball"); bad_pict = UserIcon("dbad"); - hasRemote = FALSE; + hasRemote = false; defaultHandle = 1; - noFetch = FALSE; - hasSearchAll = FALSE; + noFetch = false; + hasSearchAll = false; } ////////////////////////////////////////////////////////////////////////////// @@ -109,11 +109,11 @@ TQString pkgInterface::doInstall(int, const TQString &, bool &) {return 0;} bool pkgInterface::ifExe(TQString exe) { if (!TDEGlobal::dirs()->findExe( exe ).isNull()) { - return TRUE; + return true; } else { kdDebug() << "Program not found: " << exe << "\n"; errExe = exe; - return FALSE; + return false; } } @@ -149,9 +149,9 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c TQDir d(fname,packagePattern); if (subdirs) - d.setMatchAllDirs( TRUE ); // list contains subdirs + d.setMatchAllDirs( true ); // list contains subdirs else - d.setMatchAllDirs( FALSE ); // list contains no subdirs + d.setMatchAllDirs( false ); // list contains no subdirs if (d.exists()) { if ( d.isReadable() ) { @@ -189,7 +189,7 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c } if (p) { smerge(p); - if (!p->pkgInsert(pki, typeID, FALSE)) + if (!p->pkgInsert(pki, typeID, false)) delete p; } } @@ -213,7 +213,7 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c packageInfo *p = collectDir(name,size,dir); if (p) { smerge(p); - if (!p->pkgInsert(pki, typeID, FALSE)) + if (!p->pkgInsert(pki, typeID, false)) delete p; } } @@ -297,7 +297,7 @@ 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").arg(url),false); unlink(tmpDir.ascii()); return TQString(); } @@ -399,7 +399,7 @@ TQString pkgInterface::install(int installFlags, TQPtrList<packageInfo> *p, bool ////////////////////////////////////////////////////////////////////////////// TQStringList pkgInterface::listInstalls(const TQStringList &packs, bool , bool &cancel) { - cancel = FALSE; + cancel = false; return packs; } diff --git a/kpackage/pkgInterface.h b/kpackage/pkgInterface.h index 74f15c2..fcd2a97 100644 --- a/kpackage/pkgInterface.h +++ b/kpackage/pkgInterface.h @@ -128,7 +128,7 @@ public: TQString getDir(cacheObj *cp); // list directory local or remote - void listDir(TQPtrList<packageInfo> *pki, const TQString &fname, const TQString &dir, bool subdirs = FALSE); + void listDir(TQPtrList<packageInfo> *pki, const TQString &fname, const TQString &dir, bool subdirs = false); // list the packages in a directory packageInfo *collectDir(const TQString &name, const TQString &size, const TQString &dir); diff --git a/kpackage/pkgOptions.cpp b/kpackage/pkgOptions.cpp index 38479d4..5dec101 100644 --- a/kpackage/pkgOptions.cpp +++ b/kpackage/pkgOptions.cpp @@ -48,7 +48,7 @@ /////////////////////////////////////////////////////////////////////////// pkgOptions::pkgOptions(pkgInterface *pki, TQWidget *parent, const TQString &caption) - : KDialog(parent,0,TRUE) + : KDialog(parent,0,true) { // setFrameStyle(TQFrame::Raised | TQFrame::Panel); @@ -154,7 +154,7 @@ void pkgOptions::setup(packageInfo *p, const TQString &type) { bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &) { TQString s; - modified = FALSE; + modified = false; packList = pl; @@ -208,7 +208,7 @@ bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &) new TQListViewItem(packages, *pit); } cancelButton->setGuiItem(KStdGuiItem::cancel()); - return TRUE; + return true; } // install button has been clicked....so install the package @@ -216,7 +216,7 @@ void pkgOptions::pkginstallButtonClicked() { int i; TQStringList r; - modified = TRUE; + modified = true; // Collect data from check boxes int installFlags = 0; @@ -225,7 +225,7 @@ void pkgOptions::pkginstallButtonClicked() installFlags |= (Boxs[i]->isChecked()) << i; } - test = FALSE; + test = false; TQString s = doPackages(installFlags, packList, test); // A "0=" or "1=" indicates it was actually (un)installed by the doPackages // routine instead of just returning a command to execute @@ -239,10 +239,10 @@ void pkgOptions::pkginstallButtonClicked() connect(term,TQ_SIGNAL(result(TQStringList &, int)), this,TQ_SLOT(slotResult(TQStringList &, int))); - installButton->setEnabled(FALSE); + installButton->setEnabled(false); if (term->run(s, r)) { - running = TRUE; + running = true; cancelButton->setGuiItem(KStdGuiItem::cancel()); } else { reset(); @@ -265,11 +265,11 @@ void pkgOptions::slotSearch(TQListViewItem *item) } void pkgOptions::reset() { - installButton->setEnabled(TRUE); + installButton->setEnabled(true); cancelButton->setGuiItem(KGuiItem(i18n("Done"))); //clear icon disconnect(term,TQ_SIGNAL(result(TQStringList &, int)), this,TQ_SLOT(slotResult(TQStringList &, int))); - running = FALSE; + running = false; } void pkgOptions::slotResult(TQStringList &, int ret) @@ -310,8 +310,8 @@ void pkgOptions::showEvent ( TQShowEvent *e ) { // kdDebug() << "pkgOptions::showEvent\n"; getKeep(); - modified = FALSE; - running = FALSE; + modified = false; + running = false; TQWidget::showEvent(e); } @@ -344,7 +344,7 @@ pkgOptionsI::pkgOptionsI(pkgInterface *pkg, TQWidget *parent): pkgOptions(pkg, parent, i18n("Install")) { insType = i18n("Install"); - installer = TRUE; + installer = true; setupWidgets(pkg->paramsInst); } @@ -359,7 +359,7 @@ pkgOptionsU::pkgOptionsU(pkgInterface *pkg, TQWidget *parent): pkgOptions(pkg, parent, i18n("Uninstall")) { insType = i18n("Uninstall"); - installer = FALSE; + installer = false; setupWidgets(pkg->paramsUninst); } diff --git a/kpackage/procbuf.cpp b/kpackage/procbuf.cpp index e5b844b..bedbb9e 100644 --- a/kpackage/procbuf.cpp +++ b/kpackage/procbuf.cpp @@ -33,7 +33,7 @@ #include <kdebug.h> Modal::Modal(TQString msg, TQWidget *parent, const char * name ) - : KDialog( parent, name, TRUE ) + : KDialog( parent, name, true ) { TQLabel *line1 = new TQLabel(msg,this); line1->setAlignment(AlignCenter); @@ -81,7 +81,7 @@ void procbuf::slotReadInfo(TDEProcess *, char *buffer, int buflen) buf += last; if (timed) { - timed = FALSE; + timed = false; tm->stop(); } } @@ -92,7 +92,7 @@ void procbuf::slotExited(TDEProcess *) m->terminate(); } if (timed) { - timed = FALSE; + timed = false; tm->stop(); } } @@ -109,14 +109,14 @@ int procbuf::start (TQString msg, bool errorDlg, int timeout, TQString timeMsg ) { if (timeout) { - tm->start(timeout*1000, TRUE); + tm->start(timeout*1000, true); timed = true; } if (!proc->start(!msg.isNull() ? TDEProcess::NotifyOnExit : TDEProcess::Block, TDEProcess::All)) { if (errorDlg) { - KpMsgE(i18n("TDEProcess Failure"),TRUE); + KpMsgE(i18n("TDEProcess Failure"),true); } return 0; }; @@ -134,13 +134,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").arg(timeMsg), true); delete proc; proc = 0; return 0; } else { if (!proc->normalExit() || proc->exitStatus()) { if (errorDlg) { - KpMsg("Error",i18n("TDEProcess error:%1").arg(buf), TRUE); + KpMsg("Error",i18n("TDEProcess error:%1").arg(buf), true); } delete proc; proc = 0; return 0; diff --git a/kpackage/procbuf.h b/kpackage/procbuf.h index 9ca0eeb..6ac264c 100644 --- a/kpackage/procbuf.h +++ b/kpackage/procbuf.h @@ -52,7 +52,7 @@ public: procbuf(); ~procbuf(); void setup(TQString); - int start(TQString msg, bool errorDlg = TRUE, + int start(TQString msg, bool errorDlg = true, int timeout=0, TQString timeMsg = ""); TQString buf; diff --git a/kpackage/rpmInterface.cpp b/kpackage/rpmInterface.cpp index 8a37844..0015e97 100644 --- a/kpackage/rpmInterface.cpp +++ b/kpackage/rpmInterface.cpp @@ -63,16 +63,16 @@ RPM::RPM():pkgInterface() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Upgrade"),TRUE,FALSE,"-U","-i")); - paramsInst.append(new param(i18n("Replace Files"),FALSE,FALSE,"--replacefiles")); - paramsInst.append(new param(i18n("Replace Packages"),TRUE,FALSE,"--replacepkgs")); - paramsInst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--nodeps")); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"--test")); + paramsInst.append(new param(i18n("Upgrade"),true,false,"-U","-i")); + paramsInst.append(new param(i18n("Replace Files"),false,false,"--replacefiles")); + paramsInst.append(new param(i18n("Replace Packages"),true,false,"--replacepkgs")); + paramsInst.append(new param(i18n("Check Dependencies"),true,true,"--nodeps")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"--test")); - paramsUninst.append(new param(i18n("Remove all versions"),FALSE,FALSE,"--allmatches")); - paramsUninst.append(new param(i18n("Use Scripts"),TRUE,TRUE,"--noscripts")); - paramsUninst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--nodeps")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"--test")); + paramsUninst.append(new param(i18n("Remove all versions"),false,false,"--allmatches")); + paramsUninst.append(new param(i18n("Use Scripts"),true,true,"--noscripts")); + paramsUninst.append(new param(i18n("Check Dependencies"),true,true,"--nodeps")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"--test")); queryMsg = i18n("Querying RPM package list: "); @@ -129,11 +129,11 @@ bool RPM::parseName(const TQString &name, TQString *n, TQString *v) d1 = d2; *n = name.left(d1); *v = name.mid(d1+1,s1-d1-1); - return TRUE; + return true; } } } - return FALSE; + return false; } TQString RPM::packageQuery() { @@ -187,7 +187,7 @@ void RPM::listInstalledPackages(TQPtrList<packageInfo> *pki) } else { p = collectInfo(plist); if (p) { - if (!p->pkgInsert(pki, typeID, TRUE)) { + if (!p->pkgInsert(pki, typeID, true)) { delete p; } } @@ -203,7 +203,7 @@ void RPM::listInstalledPackages(TQPtrList<packageInfo> *pki) packageInfo* RPM::collectInfo(TQStringList &ln) { - bool haveName = FALSE; + bool haveName = false; TQMap<TQString, TQString> a; TQString name, value; @@ -226,7 +226,7 @@ packageInfo* RPM::collectInfo(TQStringList &ln) { a.insert("install time", value); } else if (name == "name") { if (!value.isEmpty()) - haveName = TRUE; + haveName = true; a.insert("name", value.stripWhiteSpace()); } else if (name == "buildtime") { a.insert("build-time", value); @@ -427,7 +427,7 @@ packageInfo *RPM::getUPackageInfo( const TQString &name ) TQStringList infoList = kpty->run(cmd); packageInfo *pki = collectInfo(infoList); if (pki) { - pki->updated = TRUE; + pki->updated = true; pki->packageState = packageInfo::AVAILABLE; if (pki->hasProperty("install time")) pki->info.remove("install time"); @@ -530,7 +530,7 @@ TQString RPM::doUninstP(int uninstallFlags, const TQStringList &files, bool &tes } if (uninstallFlags>>3 & 1) - test = TRUE; + test = true; kdDebug() << "uCMD=" << s << " test=" << test << "\n"; @@ -582,7 +582,7 @@ TQString RPM::doinstP(int installFlags, const TQStringList &files, bool &test) } if (installFlags>>4 & 1) - test = TRUE; + test = true; kdDebug() << "iCMD=" << s << " test=" << test << "\n"; diff --git a/kpackage/search.cpp b/kpackage/search.cpp index 3782257..9d2bba7 100644 --- a/kpackage/search.cpp +++ b/kpackage/search.cpp @@ -62,13 +62,13 @@ Search::Search(TQWidget *parent, const char * name) vf->addLayout(hc,0); substr = new TQCheckBox(i18n("Sub string"), frame1, "substr"); - substr->setChecked(TRUE); + substr->setChecked(true); hc->addWidget(substr,1,AlignLeft); substr->setFixedSize(substr->sizeHint()); hc->addStretch(1); wrap = new TQCheckBox(i18n("Wrap search"), frame1, "wrap"); - wrap->setChecked(TRUE); + wrap->setChecked(true); hc->addWidget(wrap,1,AlignRight); wrap->setFixedSize(wrap->sizeHint()); @@ -97,14 +97,14 @@ void Search::ok_slot() to_find = to_find.stripWhiteSpace(); pkg = kpackage->management->search(to_find, - substr->isChecked(),FALSE,FALSE); + substr->isChecked(),false,false); if (pkg == 0 && wrap->isChecked()) { pkg = kpackage->management->search(to_find, - substr->isChecked(),TRUE,FALSE); + substr->isChecked(),true,false); } if (pkg == 0) KpMsg(i18n("Note"), - i18n("%1 was not found.").arg(to_find),TRUE); + i18n("%1 was not found.").arg(to_find),true); } void Search::done_slot() diff --git a/kpackage/slackInterface.cpp b/kpackage/slackInterface.cpp index b5841b5..570216d 100644 --- a/kpackage/slackInterface.cpp +++ b/kpackage/slackInterface.cpp @@ -96,9 +96,9 @@ SLACK::SLACK():pkgInterface() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"-warn")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"-warn")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"-warn")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"-warn")); hasProgram = ifExe("installpkg"); @@ -153,9 +153,9 @@ bool SLACK::parseName(const TQString &name, TQString *n, TQString *v) if (s1 > 0) { *n = name.left(s1); v = new TQString(""); - return TRUE; + return true; } - return FALSE; + return false; } void SLACK::listPackages(TQPtrList<packageInfo> *pki) @@ -237,7 +237,7 @@ void SLACK::listInstalledPackages(TQPtrList<packageInfo> *pki) p = collectInfo(vb.ascii(), INSTALLED); if (p) { smerge(p); - if (!p->pkgInsert(pki, typeID, TRUE)) + if (!p->pkgInsert(pki, typeID, true)) delete p; } } @@ -355,7 +355,7 @@ packageInfo *SLACK::getPackageInfo(char mode, const TQString &name, const TQStri pki = new packageInfo(a,this); if (pki) { smerge(pki); - pki->updated = TRUE; + pki->updated = true; } } break; @@ -494,11 +494,11 @@ TQStringList SLACK::getChangeLog(packageInfo *) { } bool SLACK::filesTab(packageInfo *) { - return TRUE; + return true; } bool SLACK::changeTab(packageInfo *) { - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// diff --git a/kpackage/tdeio.cpp b/kpackage/tdeio.cpp index 1897031..50ef5cf 100644 --- a/kpackage/tdeio.cpp +++ b/kpackage/tdeio.cpp @@ -84,12 +84,9 @@ bool Kiod::listDir(const TQString &url, const TQString &fname, bool subdirs) tdeApp->enter_loop(); file->close(); - if (worked) - return TRUE; - else - return FALSE; + return worked; } else - return FALSE; + return false; } void Kiod::slotListEntries( TDEIO::Job *, const TDEIO::UDSEntryList& entries ) diff --git a/kpackage/updateLoc.cpp b/kpackage/updateLoc.cpp index d89a177..d4adc25 100644 --- a/kpackage/updateLoc.cpp +++ b/kpackage/updateLoc.cpp @@ -78,22 +78,22 @@ bool apanel::getUse() if (puse) return puse->isChecked(); else - return FALSE; + return false; } void apanel::setUse(int n) { if (puse) { if (n) - puse->setChecked(TRUE); + puse->setChecked(true); else - puse->setChecked(FALSE); + puse->setChecked(false); } } void apanel::clear() { - puse->setChecked(FALSE); + puse->setChecked(false); pent->clear(); } @@ -175,16 +175,16 @@ bool dpanel::getUse() const if (puse) return puse->isChecked(); else - return FALSE; + return false; } void dpanel::setUse(int n) { if (puse) { if (n) - puse->setChecked(TRUE); + puse->setChecked(true); else - puse->setChecked(FALSE); + puse->setChecked(false); } } @@ -193,7 +193,7 @@ bool dpanel::getSubdirs() const if (psubdirs) return psubdirs->isChecked(); else - return FALSE; + return false; } void dpanel::setSubdirs(int n) @@ -201,9 +201,9 @@ void dpanel::setSubdirs(int n) if (psubdirs) { if (n) - psubdirs->setChecked(TRUE); + psubdirs->setChecked(true); else - psubdirs->setChecked(FALSE); + psubdirs->setChecked(false); } } @@ -253,7 +253,7 @@ void dpanel::dirOpen() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// updateLoc::updateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname) - : TQWidget(p,"updateLoc",FALSE) + : TQWidget(p,"updateLoc",false) { interName = iname; interface = inter; diff --git a/kpackage/updateLoc.h b/kpackage/updateLoc.h index 7dd49aa..ddea958 100644 --- a/kpackage/updateLoc.h +++ b/kpackage/updateLoc.h @@ -208,7 +208,7 @@ public: pdUpdateLoc (TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname, int numberLines, const TQString &filter, const TQString &lmsg, TQString bmsg = 0, - bool subdirs = FALSE); + bool subdirs = false); ~pdUpdateLoc(); @@ -294,13 +294,13 @@ public: void dLocations(int numberDirs, int numberLines, pkgInterface *inter, const TQString &iname, const TQString &label, const TQString &filter, const TQString &dirMsg, - bool subdirs=TRUE ); + bool subdirs=true ); void pLocations(int numberDirs, int numberLines, pkgInterface *inter, const TQString &iname, const TQString &label, const TQString &filter, const TQString &packMsg, TQString baseMsg = 0, - bool subdirs=FALSE); + bool subdirs=false); void cLocations(int numberDirs, int numberLines, pkgInterface *inter, const TQString &iname, const TQString &label, |
