diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-25 12:03:00 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-25 12:29:31 +0900 |
commit | 4c0dae60b2fbc60996fc8f4bd29ee6219b869527 (patch) | |
tree | 6aa583e34395f4d19d4b85f081b31513e5c9c19d /tdeprint/lpd | |
parent | 066f257eadc5866386c2cfbdba1a93105cff67ae (diff) | |
download | tdelibs-4c0dae60b2fbc60996fc8f4bd29ee6219b869527.tar.gz tdelibs-4c0dae60b2fbc60996fc8f4bd29ee6219b869527.zip |
Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdeprint/lpd')
-rw-r--r-- | tdeprint/lpd/gschecker.cpp | 2 | ||||
-rw-r--r-- | tdeprint/lpd/klpdprinterimpl.cpp | 2 | ||||
-rw-r--r-- | tdeprint/lpd/kmlpdmanager.cpp | 34 | ||||
-rw-r--r-- | tdeprint/lpd/lpdtools.cpp | 14 | ||||
-rw-r--r-- | tdeprint/lpd/lpdtools.h | 12 |
5 files changed, 32 insertions, 32 deletions
diff --git a/tdeprint/lpd/gschecker.cpp b/tdeprint/lpd/gschecker.cpp index 99044918b..2ea194453 100644 --- a/tdeprint/lpd/gschecker.cpp +++ b/tdeprint/lpd/gschecker.cpp @@ -41,7 +41,7 @@ void GsChecker::loadDriverList() if (proc.open("gs -h",IO_ReadOnly)) { QTextStream t(&proc); - QString buffer, line; + TQString buffer, line; bool ok(false); while (!t.eof()) { diff --git a/tdeprint/lpd/klpdprinterimpl.cpp b/tdeprint/lpd/klpdprinterimpl.cpp index 3647f0b38..843e73409 100644 --- a/tdeprint/lpd/klpdprinterimpl.cpp +++ b/tdeprint/lpd/klpdprinterimpl.cpp @@ -40,7 +40,7 @@ TQString KLpdPrinterImpl::executable() bool KLpdPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) { - QString exestr = executable(); + TQString exestr = executable(); if (exestr.isEmpty()) { printer->setErrorMessage(i18n("The <b>%1</b> executable could not be found in your path. Check your installation.").arg("lpr")); diff --git a/tdeprint/lpd/kmlpdmanager.cpp b/tdeprint/lpd/kmlpdmanager.cpp index e72733f89..ab0a9d3dc 100644 --- a/tdeprint/lpd/kmlpdmanager.cpp +++ b/tdeprint/lpd/kmlpdmanager.cpp @@ -44,7 +44,7 @@ // only there to allow testing on my system. Should be removed // when everything has proven to be working and stable -QString lpdprefix = ""; +TQString lpdprefix = ""; TQString ptPrinterType(KMPrinter*); //************************************************************************************************ @@ -83,7 +83,7 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer) PrintcapEntry *entry = m_entries.find(printer->name()); if (entry) { - QString type(entry->comment(2)), driver(entry->comment(7)), lp(entry->arg("lp")); + TQString type(entry->comment(2)), driver(entry->comment(7)), lp(entry->arg("lp")); printer->setDescription(i18n("Local printer queue (%1)").arg(type.isEmpty() ? i18n("Unknown type of local printer queue", "Unknown") : type)); printer->setLocation(i18n("<Not available>")); printer->setDriverInfo(driver.isEmpty() ? i18n("Unknown Driver", "Unknown") : driver); @@ -221,7 +221,7 @@ bool KMLpdManager::removePrinter(KMPrinter *printer) bool KMLpdManager::enablePrinter(KMPrinter *printer, bool state) { KPipeProcess proc; - QString cmd = programName(0); + TQString cmd = programName(0); cmd += " "; cmd += state ? "up" : "down"; cmd += " "; @@ -229,7 +229,7 @@ bool KMLpdManager::enablePrinter(KMPrinter *printer, bool state) if (proc.open(cmd)) { QTextStream t(&proc); - QString buffer; + TQString buffer; while (!t.eof()) buffer.append(t.readLine()); if (buffer.startsWith("?Privilege")) @@ -287,11 +287,11 @@ TQString KMLpdManager::programName(int f) void KMLpdManager::checkStatus() { KPipeProcess proc; - QString cmd = programName(0) + " status all"; + TQString cmd = programName(0) + " status all"; if (proc.open(cmd)) { QTextStream t(&proc); - QString line; + TQString line; KMPrinter *printer(0); int p(-1); while (!t.eof()) @@ -326,7 +326,7 @@ void KMLpdManager::loadPrintcapFile(const TQString& filename) if (f.exists() && f.open(IO_ReadOnly)) { QTextStream t(&f); - QString line, comment; + TQString line, comment; PrintcapEntry *entry; while (!t.eof()) { @@ -391,7 +391,7 @@ void KMLpdManager::loadPrinttoolDb(const TQString& filename) DrMain* KMLpdManager::loadDbDriver(KMDBEntry *entry) { - QString ptdbfilename = driverDirectory() + "/printerdb"; + TQString ptdbfilename = driverDirectory() + "/printerdb"; if (entry->file == ptdbfilename) { PrinttoolEntry *ptentry = findPrinttoolEntry(entry->modelname); @@ -419,7 +419,7 @@ DrMain* KMLpdManager::loadPrinterDriver(KMPrinter *printer, bool config) return NULL; // check for printtool driver (only for configuration) - QString sd = entry->arg("sd"), dr(entry->comment(7)); + TQString sd = entry->arg("sd"), dr(entry->comment(7)); if (TQFile::exists(sd+"/postscript.cfg") && config && !dr.isEmpty()) { TQMap<TQString,TQString> map = loadPrinttoolCfgFile(sd+"/postscript.cfg"); @@ -462,7 +462,7 @@ TQMap<TQString,TQString> KMLpdManager::loadPrinttoolCfgFile(const TQString& file if (f.exists() && f.open(IO_ReadOnly)) { QTextStream t(&f); - QString line, name, val; + TQString line, name, val; int p(-1); while (!t.eof()) { @@ -488,14 +488,14 @@ TQMap<TQString,TQString> KMLpdManager::loadPrinttoolCfgFile(const TQString& file bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQString& dirname, const TQMap<TQString,TQString>& options) { // defines input and output file - QString fname = TQFileInfo(templatefile).fileName(); + TQString fname = TQFileInfo(templatefile).fileName(); fname.replace(TQRegExp("\\.in$"),TQString::fromLatin1("")); QFile fin(templatefile); QFile fout(dirname + "/" + fname); if (fin.exists() && fin.open(IO_ReadOnly) && fout.open(IO_WriteOnly)) { QTextStream tin(&fin), tout(&fout); - QString line, name; + TQString line, name; int p(-1); while (!tin.eof()) { @@ -525,7 +525,7 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver) { // To be able to save a printer driver, a printcap entry MUST exist. // We can then retrieve the spool directory from it. - QString spooldir; + TQString spooldir; PrintcapEntry *ent = findPrintcapEntry(printer->printerName()); if (!ent) return false; @@ -541,7 +541,7 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver) options["PS_SEND_EOF"] = "NO"; if (!checkGsDriver(options["GSDEVICE"])) return false; - QString resol(options["RESOLUTION"]), color(options["COLOR"]); + TQString resol(options["RESOLUTION"]), color(options["COLOR"]); // update entry comment to make printtool happy and save printcap file ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? TQString::fromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? TQString::fromLatin1("Default") : color.right(color.length()-15))); ent->m_args["if"] = spooldir+TQString::fromLatin1("/filter"); @@ -565,7 +565,7 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver) bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry) { KURL dev(printer->device()); - QString prot = dev.protocol(), sd(entry->arg("sd")); + TQString prot = dev.protocol(), sd(entry->arg("sd")); entry->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer)); if (prot == "smb" || prot == "ncp" || prot == "socket") { @@ -619,7 +619,7 @@ bool KMLpdManager::createSpooldir(PrintcapEntry *entry) // first check if it has a "sd" defined if (entry->arg("sd").isEmpty()) entry->m_args["sd"] = TQString::fromLatin1("/var/spool/lpd/")+entry->m_name; - QString sd = entry->arg("sd"); + TQString sd = entry->arg("sd"); if (!TDEStandardDirs::exists(sd)) { if (!TDEStandardDirs::makeDir(sd,0750)) @@ -641,7 +641,7 @@ bool KMLpdManager::validateDbDriver(KMDBEntry *entry) TQString ptPrinterType(KMPrinter *p) { - QString type, prot = p->device().protocol(); + TQString type, prot = p->device().protocol(); if (prot == "lpd") type = "REMOTE"; else if (prot == "smb") type = "SMB"; else if (prot == "ncp") type = "NCP"; diff --git a/tdeprint/lpd/lpdtools.cpp b/tdeprint/lpd/lpdtools.cpp index 54f19c405..4d45a9760 100644 --- a/tdeprint/lpd/lpdtools.cpp +++ b/tdeprint/lpd/lpdtools.cpp @@ -88,8 +88,8 @@ bool PrintcapEntry::readLine(const TQString& line) { int p = l[i].find('='); if (p == -1) p = 2; - QString key = l[i].left(p); - QString value = l[i].right(l[i].length()-(l[i][p] == '=' ? p+1 : p)); + TQString key = l[i].left(p); + TQString value = l[i].right(l[i].length()-(l[i][p] == '=' ? p+1 : p)); m_args[key] = value; } return true; @@ -114,7 +114,7 @@ void PrintcapEntry::writeEntry(TQTextStream& t) TQString PrintcapEntry::comment(int index) { - QString w; + TQString w; if (m_comment.startsWith("##PRINTTOOL3##")) { int p(0); @@ -166,7 +166,7 @@ TQStringList splitPrinttoolLine(const TQString& line) bool PrinttoolEntry::readEntry(TQTextStream& t) { - QString line; + TQString line; QStringList args; m_resolutions.setAutoDelete(true); @@ -264,7 +264,7 @@ DrMain* PrinttoolEntry::createDriver() ch->set("text",TQString::fromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi)); lopt->addChoice(ch); } - QString defval = lopt->choices()->first()->name(); + TQString defval = lopt->choices()->first()->name(); lopt->set("default",defval); lopt->setValueText(defval); } @@ -290,7 +290,7 @@ DrMain* PrinttoolEntry::createDriver() ch->set("text",TQString::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment)); lopt->addChoice(ch); } - QString defval = lopt->choices()->first()->name(); + TQString defval = lopt->choices()->first()->name(); lopt->set("default",defval); lopt->setValueText(defval); } @@ -394,7 +394,7 @@ DrMain* PrinttoolEntry::createDriver() TQString getPrintcapLine(TQTextStream& t, TQString *lastcomment) { - QString line, buffer, comm; + TQString line, buffer, comm; while (!t.eof()) { buffer = t.readLine().stripWhiteSpace(); diff --git a/tdeprint/lpd/lpdtools.h b/tdeprint/lpd/lpdtools.h index 692dd0fa2..ef28ff089 100644 --- a/tdeprint/lpd/lpdtools.h +++ b/tdeprint/lpd/lpdtools.h @@ -38,8 +38,8 @@ public: TQString arg(const TQString& key) const { return m_args[key]; } TQString comment(int i); private: - QString m_name; - QString m_comment; + TQString m_name; + TQString m_comment; TQMap<TQString,TQString> m_args; }; @@ -48,13 +48,13 @@ private: struct Resolution { int xdpi, ydpi; - QString comment; + TQString comment; }; struct BitsPerPixel { - QString bpp; - QString comment; + TQString bpp; + TQString comment; }; class PrinttoolEntry @@ -64,7 +64,7 @@ public: bool readEntry(TQTextStream& t); DrMain* createDriver(); private: - QString m_name, m_gsdriver, m_description, m_about; + TQString m_name, m_gsdriver, m_description, m_about; TQPtrList<Resolution> m_resolutions; TQPtrList<BitsPerPixel> m_depths; }; |