diff options
Diffstat (limited to 'kdeprint/lpr/apshandler.cpp')
-rw-r--r-- | kdeprint/lpr/apshandler.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kdeprint/lpr/apshandler.cpp b/kdeprint/lpr/apshandler.cpp index 526edaf49..57ac45311 100644 --- a/kdeprint/lpr/apshandler.cpp +++ b/kdeprint/lpr/apshandler.cpp @@ -63,7 +63,7 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor if (!shortmode) { TQMap<TQString,TQString> opts = loadResources(entry); - if (opts.contains("PRINTER")) + if (opts.tqcontains("PRINTER")) { prt->setDescription(i18n("APS Driver (%1)").arg(opts["PRINTER"])); prt->setDriverInfo(prt->description()); @@ -72,8 +72,8 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor if (prt->device().isEmpty()) { TQString prot; - QString smbname(sysconfDir() + "/" + prt->printerName() + "/smbclient.conf"); - QString ncpname(sysconfDir() + "/" + prt->printerName() + "/netware.conf"); + TQString smbname(sysconfDir() + "/" + prt->printerName() + "/smbclient.conf"); + TQString ncpname(sysconfDir() + "/" + prt->printerName() + "/netware.conf"); if (TQFile::exists(smbname)) { TQMap<TQString,TQString> opts = loadVarFile(smbname); @@ -139,19 +139,19 @@ TQMap<TQString,TQString> ApsHandler::loadResources(PrintcapEntry *entry) TQMap<TQString,TQString> ApsHandler::loadVarFile(const TQString& filename) { TQMap<TQString,TQString> opts; - QFile f(filename); + TQFile f(filename); if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; int p(-1); while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); if (line.isEmpty() || line[0] == '#' || (p = line.tqfind('=')) == -1) continue; - QString variable = line.left(p).stripWhiteSpace(); - QString value = line.mid(p+1).stripWhiteSpace(); + TQString variable = line.left(p).stripWhiteSpace(); + TQString value = line.mid(p+1).stripWhiteSpace(); if (!value.isEmpty() && value[0] == '\'') value = value.mid(1, value.length()-2); opts[variable] = value; @@ -166,7 +166,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config if (driver /* && config */ ) // Load resources in all case, to get the correct page size { TQMap<TQString,TQString> opts = loadResources(entry); - if ( !config && opts.contains( "PAPERSIZE" ) ) + if ( !config && opts.tqcontains( "PAPERSIZE" ) ) { // this is needed to keep applications informed // about the current selected page size @@ -209,13 +209,13 @@ void ApsHandler::reset() PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) { - QString prot = prt->deviceProtocol(); + TQString prot = prt->deviceProtocol(); if (prot != "parallel" && prot != "lpd" && prot != "smb" && prot != "ncp") { manager()->setErrorMsg(i18n("Unsupported backend: %1.").arg(prot)); return NULL; } - QString path = sysconfDir() + "/" + prt->printerName(); + TQString path = sysconfDir() + "/" + prt->printerName(); if (!KStandardDirs::makeDir(path, 0755)) { manager()->setErrorMsg(i18n("Unable to create directory %1.").arg(path)); @@ -226,13 +226,13 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) // either "smb" or "ncp" TQFile::remove(path + "/smbclient.conf"); TQFile::remove(path + "/netware.conf"); - QFile f; + TQFile f; if (prot == "smb") { f.setName(path + "/smbclient.conf"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); TQString work, server, printer, user, passwd; if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) ) { @@ -275,7 +275,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) uri.replace( 0, 3, "smb" ); if ( splitSmbURI( uri, work, server, printer, user, passwd ) ) { - QTextStream t(&f); + TQTextStream t(&f); t << "NCP_SERVER='" << server << "'" << endl; t << "NCP_PRINTER='" << printer << "'" << endl; if (!user.isEmpty()) @@ -305,7 +305,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) entry = new PrintcapEntry; entry->addField("lp", Field::String, "/dev/null"); } - QString sd = LprSettings::self()->baseSpoolDir() + "/" + prt->printerName(); + TQString sd = LprSettings::self()->baseSpoolDir() + "/" + prt->printerName(); entry->addField("af", Field::String, sd + "/acct"); entry->addField("lf", Field::String, sd + "/log"); entry->addField("if", Field::String, sysconfDir() + "/basedir/bin/apsfilter"); @@ -322,10 +322,10 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain manager()->setErrorMsg(i18n("The APS driver is not defined.")); return false; } - QFile f(sysconfDir() + "/" + prt->printerName() + "/apsfilterrc"); + TQFile f(sysconfDir() + "/" + prt->printerName() + "/apsfilterrc"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); t << "# File generated by KDEPrint" << endl; t << "PRINTER='" << driver->get("gsdriver") << "'" << endl; TQValueStack<DrGroup*> stack; @@ -337,7 +337,7 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain for (; git.current(); ++git) stack.push(git.current()); TQPtrListIterator<DrBase> oit(grp->options()); - QString value; + TQString value; for (; oit.current(); ++oit) { value = oit.current()->valueText(); @@ -371,7 +371,7 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry) { - QString path(sysconfDir() + "/" + entry->name); + TQString path(sysconfDir() + "/" + entry->name); TQFile::remove(path + "/smbclient.conf"); TQFile::remove(path + "/netware.conf"); TQFile::remove(path + "/apsfilterrc"); @@ -385,7 +385,7 @@ bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry) TQString ApsHandler::printOptions(KPrinter *printer) { - QString optstr; + TQString optstr; TQMap<TQString,TQString> opts = printer->options(); for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it) { |