diff options
Diffstat (limited to 'tdeprint/lpd/kmlpdmanager.cpp')
-rw-r--r-- | tdeprint/lpd/kmlpdmanager.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
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"; |