diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:32:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:32:40 -0600 |
commit | 984c25aa6969e55896e9a13c8e7f7b8a58991a4e (patch) | |
tree | 3653d4ee49b0adf405ff17e0ecdc99bc6f10c1bf /tdeprint/lpd | |
parent | 56160bf4dfe503631ef6373367b281f081bab2b4 (diff) | |
download | tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.tar.gz tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.zip |
Rename old tq methods that no longer need a unique name
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 | 52 | ||||
-rw-r--r-- | tdeprint/lpd/lpdtools.cpp | 10 |
4 files changed, 33 insertions, 33 deletions
diff --git a/tdeprint/lpd/gschecker.cpp b/tdeprint/lpd/gschecker.cpp index 9fe6e290b..99044918b 100644 --- a/tdeprint/lpd/gschecker.cpp +++ b/tdeprint/lpd/gschecker.cpp @@ -53,7 +53,7 @@ void GsChecker::loadDriverList() else buffer.append(line).append(" "); } - else if (line.startsWith(TQString::tqfromLatin1("Available devices:"))) + else if (line.startsWith(TQString::fromLatin1("Available devices:"))) ok = true; } m_driverlist = TQStringList::split(' ',buffer,false); diff --git a/tdeprint/lpd/klpdprinterimpl.cpp b/tdeprint/lpd/klpdprinterimpl.cpp index 59f04e74c..2704cc46a 100644 --- a/tdeprint/lpd/klpdprinterimpl.cpp +++ b/tdeprint/lpd/klpdprinterimpl.cpp @@ -46,6 +46,6 @@ bool KLpdPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) printer->setErrorMessage(i18n("The <b>%1</b> executable could not be found in your path. Check your installation.").arg("lpr")); return false; } - cmd = TQString::tqfromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd = TQString::fromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies()); return true; } diff --git a/tdeprint/lpd/kmlpdmanager.cpp b/tdeprint/lpd/kmlpdmanager.cpp index a5612ad58..fcc6fdac8 100644 --- a/tdeprint/lpd/kmlpdmanager.cpp +++ b/tdeprint/lpd/kmlpdmanager.cpp @@ -65,12 +65,12 @@ KMLpdManager::~KMLpdManager() TQString KMLpdManager::driverDbCreationProgram() { - return TQString::tqfromLatin1("make_driver_db_lpd"); + return TQString::fromLatin1("make_driver_db_lpd"); } TQString KMLpdManager::driverDirectory() { - return TQString::tqfromLatin1("/usr/lib/rhs/rhs-printfilters"); + return TQString::fromLatin1("/usr/lib/rhs/rhs-printfilters"); } bool KMLpdManager::completePrinter(KMPrinter *printer) @@ -91,11 +91,11 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer) KURL url; if (!entry->arg("rm").isEmpty()) { - url = TQString::tqfromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp")); + url = TQString::fromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp")); printer->setDescription(i18n("Remote LPD queue %1@%2").arg(entry->arg("rp")).arg(entry->arg("rm"))); } else if (!lp.isEmpty() && lp != "/dev/null") - url = TQString::tqfromLatin1("parallel:%1").arg(lp); + url = TQString::fromLatin1("parallel:%1").arg(lp); else if (TQFile::exists(entry->arg("sd")+"/.config")) { TQMap<TQString,TQString> map = loadPrinttoolCfgFile(entry->arg("sd")+"/.config"); @@ -103,17 +103,17 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer) { QStringList l = TQStringList::split('\\',map["share"],false); if (map["workgroup"].isEmpty()) - url = TQString::tqfromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]); + url = TQString::fromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]); else - url = TQString::tqfromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]); + url = TQString::fromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]); url.setUser(map["user"]); url.setPass(map["password"]); } else if (type == "DIRECT") - url = TQString::tqfromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]); + url = TQString::fromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]); else if (type == "NCP") { - url = TQString::tqfromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]); + url = TQString::fromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]); url.setUser(map["user"]); url.setPass(map["password"]); } @@ -146,9 +146,9 @@ bool KMLpdManager::createPrinter(KMPrinter *printer) { // remote lpd queue ent->m_args["rm"] = printer->device().host(); - ent->m_args["rp"] = printer->device().path().replace("/",TQString::tqfromLatin1("")); + ent->m_args["rp"] = printer->device().path().replace("/",TQString::fromLatin1("")); ent->m_args["lpd_bounce"] = "true"; - ent->m_comment = TQString::tqfromLatin1("##PRINTTOOL3## REMOTE"); + ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## REMOTE"); } ent->m_args["mx"] = (printer->option("mx").isEmpty() ? "#0" : printer->option("mx")); ent->m_args["sh"] = TQString::null; @@ -259,7 +259,7 @@ bool KMLpdManager::disablePrinter(KMPrinter *printer) void KMLpdManager::listPrinters() { m_entries.clear(); - loadPrintcapFile(TQString::tqfromLatin1("%1/etc/printcap").arg(lpdprefix)); + loadPrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix)); TQDictIterator<PrintcapEntry> it(m_entries); for (;it.current();++it) @@ -312,7 +312,7 @@ void KMLpdManager::checkStatus() bool KMLpdManager::writePrinters() { - if (!writePrintcapFile(TQString::tqfromLatin1("%1/etc/printcap").arg(lpdprefix))) + if (!writePrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix))) { setErrorMsg(i18n("Unable to write printcap file.")); return false; @@ -489,7 +489,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQSt { // defines input and output file QString fname = TQFileInfo(templatefile).fileName(); - fname.replace(TQRegExp("\\.in$"),TQString::tqfromLatin1("")); + fname.replace(TQRegExp("\\.in$"),TQString::fromLatin1("")); QFile fin(templatefile); QFile fout(dirname + "/" + fname); if (fin.exists() && fin.open(IO_ReadOnly) && fout.open(IO_WriteOnly)) @@ -508,7 +508,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQSt if (line.startsWith("export ")) { tout << "export "; - line.replace(0,7,TQString::tqfromLatin1("")); + line.replace(0,7,TQString::fromLatin1("")); } if ((p=line.find('=')) != -1) { @@ -543,8 +543,8 @@ bool KMLpdManager::savePrinterDriver(KMPrinter *printer, DrMain *driver) return false; QString resol(options["RESOLUTION"]), color(options["COLOR"]); // update entry comment to make printtool happy and save printcap file - ent->m_comment = TQString::tqfromLatin1("##PRINTTOOL3## %1 %2 %3 %4 {} {%5} %6 {}").arg(options["PRINTER_TYPE"]).arg(options["GSDEVICE"]).arg((resol.isEmpty() ? TQString::tqfromLatin1("NAxNA") : resol)).arg(options["PAPERSIZE"]).arg(driver->name()).arg((color.isEmpty() ? TQString::tqfromLatin1("Default") : color.right(color.length()-15))); - ent->m_args["if"] = spooldir+TQString::tqfromLatin1("/filter"); + 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"); if (!writePrinters()) return false; // write various driver files using templates @@ -566,11 +566,11 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry { KURL dev(printer->device()); QString prot = dev.protocol(), sd(entry->arg("sd")); - entry->m_comment = TQString::tqfromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer)); + entry->m_comment = TQString::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer)); if (prot == "smb" || prot == "ncp" || prot == "socket") { - entry->m_args["af"] = sd+TQString::tqfromLatin1("/acct"); - QFile f(sd+TQString::tqfromLatin1("/.config")); + entry->m_args["af"] = sd+TQString::fromLatin1("/acct"); + QFile f(sd+TQString::fromLatin1("/.config")); if (f.open(IO_WriteOnly)) { QTextStream t(&f); @@ -578,7 +578,7 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry { t << "printer_ip=" << dev.host() << endl; t << "port=" << dev.port() << endl; - entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/directprint"); + entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/directprint"); } else if (prot == "smb") { @@ -594,20 +594,20 @@ bool KMLpdManager::createPrinttoolEntry(KMPrinter *printer, PrintcapEntry *entry t << "hostip=" << endl; t << "user='" << dev.user() << '\'' << endl; t << "password='" << dev.pass() << '\'' << endl; - t << "workgroup='" << (l.count() == 2 ? dev.host() : TQString::tqfromLatin1("")) << '\'' << endl; - entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/smbprint"); + t << "workgroup='" << (l.count() == 2 ? dev.host() : TQString::fromLatin1("")) << '\'' << endl; + entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/smbprint"); } else if (prot == "ncp") { t << "server=" << dev.host() << endl; - t << "queue=" << dev.path().replace("/",TQString::tqfromLatin1("")) << endl; + t << "queue=" << dev.path().replace("/",TQString::fromLatin1("")) << endl; t << "user=" << dev.user() << endl; t << "password=" << dev.pass() << endl; - entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/ncpprint"); + entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/ncpprint"); } } else return false; - entry->m_args["lp"] = TQString::tqfromLatin1("/dev/null"); + entry->m_args["lp"] = TQString::fromLatin1("/dev/null"); } else if (prot != "lpd") entry->m_args["lp"] = dev.path(); @@ -618,7 +618,7 @@ bool KMLpdManager::createSpooldir(PrintcapEntry *entry) { // first check if it has a "sd" defined if (entry->arg("sd").isEmpty()) - entry->m_args["sd"] = TQString::tqfromLatin1("/var/spool/lpd/")+entry->m_name; + entry->m_args["sd"] = TQString::fromLatin1("/var/spool/lpd/")+entry->m_name; QString sd = entry->arg("sd"); if (!KStandardDirs::exists(sd)) { diff --git a/tdeprint/lpd/lpdtools.cpp b/tdeprint/lpd/lpdtools.cpp index 610e8ead5..5131b33f3 100644 --- a/tdeprint/lpd/lpdtools.cpp +++ b/tdeprint/lpd/lpdtools.cpp @@ -257,11 +257,11 @@ DrMain* PrinttoolEntry::createDriver() for (int i=0;it.current();++it,i++) { ch = new DrBase; - ch->setName(TQString::tqfromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->setName(TQString::fromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi)); if (it.current()->comment.isEmpty()) - ch->set("text",TQString::tqfromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->set("text",TQString::fromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi)); else - ch->set("text",TQString::tqfromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi)); + 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(); @@ -281,13 +281,13 @@ DrMain* PrinttoolEntry::createDriver() { ch = new DrBase; if (m_gsdriver != "uniprint") - ch->setName(TQString::tqfromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp)); + ch->setName(TQString::fromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp)); else ch->setName(it.current()->bpp); if (it.current()->comment.isEmpty()) ch->set("text",it.current()->bpp); else - ch->set("text",TQString::tqfromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment)); + ch->set("text",TQString::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment)); lopt->addChoice(ch); } QString defval = lopt->choices()->first()->name(); |