diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kdeprint/lpdunix | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/lpdunix')
-rw-r--r-- | kdeprint/lpdunix/klpdunixprinterimpl.cpp | 4 | ||||
-rw-r--r-- | kdeprint/lpdunix/kmlpdunixmanager.cpp | 26 |
2 files changed, 15 insertions, 15 deletions
diff --git a/kdeprint/lpdunix/klpdunixprinterimpl.cpp b/kdeprint/lpdunix/klpdunixprinterimpl.cpp index 7a9a3ad81..8a680ae6e 100644 --- a/kdeprint/lpdunix/klpdunixprinterimpl.cpp +++ b/kdeprint/lpdunix/klpdunixprinterimpl.cpp @@ -36,12 +36,12 @@ KLpdUnixPrinterImpl::~KLpdUnixPrinterImpl() void KLpdUnixPrinterImpl::initLpPrint(TQString& cmd, KPrinter *printer) { - cmd += TQString::fromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd += TQString::tqfromLatin1(" -d %1 -n%2").arg(quote(printer->printerName())).arg(printer->numCopies()); } void KLpdUnixPrinterImpl::initLprPrint(TQString& cmd, KPrinter *printer) { - cmd += TQString::fromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd += TQString::tqfromLatin1(" -P %1 '-#%2'").arg(quote(printer->printerName())).arg(printer->numCopies()); } // look for executable, starting with "lpr" diff --git a/kdeprint/lpdunix/kmlpdunixmanager.cpp b/kdeprint/lpdunix/kmlpdunixmanager.cpp index f288702eb..0985a487c 100644 --- a/kdeprint/lpdunix/kmlpdunixmanager.cpp +++ b/kdeprint/lpdunix/kmlpdunixmanager.cpp @@ -114,12 +114,12 @@ TQMap<TQString,TQString> readEntry(KTextBuffer& t) if (l.count() > 0) { int p(-1); - if ((p=l[0].find('|')) != -1) + if ((p=l[0].tqfind('|')) != -1) entry["printer-name"] = l[0].left(p); // only keep first name (discard aliases else entry["printer-name"] = l[0]; for (uint i=1; i<l.count(); i++) - if ((p=l[i].find('=')) != -1) + if ((p=l[i].tqfind('=')) != -1) entry[l[i].left(p).stripWhiteSpace()] = l[i].right(l[i].length()-p-1).stripWhiteSpace(); else entry[l[i].stripWhiteSpace()] = TQString::null; @@ -168,7 +168,7 @@ TQString getPrintcapFileName() if (pcentry[0] == '|') { // printcap through pipe printcap = locateLocal("tmp","printcap"); - QString cmd = TQString::fromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap); + QString cmd = TQString::tqfromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap); kdDebug() << "printcap obtained through pipe" << endl << "executing: " << cmd << endl; ::system(cmd.local8Bit()); } @@ -192,14 +192,14 @@ void KMLpdUnixManager::parseEtcPrintcap() while (!t.eof()) { entry = readEntry(t); - if (entry.isEmpty() || !entry.contains("printer-name") || entry.contains("server")) + if (entry.isEmpty() || !entry.tqcontains("printer-name") || entry.tqcontains("server")) continue; if (entry["printer-name"] == "all") { - if (entry.contains("all")) + if (entry.tqcontains("all")) { - // find separator - int p = entry["all"].find(TQRegExp("[^a-zA-Z0-9_\\s-]")); + // tqfind separator + int p = entry["all"].tqfind(TQRegExp("[^a-zA-Z0-9_\\s-]")); if (p != -1) { QChar c = entry["all"][p]; @@ -216,7 +216,7 @@ void KMLpdUnixManager::parseEtcPrintcap() else { KMPrinter *printer = ::createPrinter(entry); - if (entry.contains("rm")) + if (entry.tqcontains("rm")) printer->setDescription(i18n("Remote printer queue on %1").arg(entry["rm"])); else printer->setDescription(i18n("Local printer")); @@ -234,7 +234,7 @@ TQString getEtcPrintersConfName() { // standard file not found, try NIS printersconf = locateLocal("tmp","printers.conf"); - QString cmd = TQString::fromLatin1("ypcat printers.conf.byname > %1").arg(printersconf); + QString cmd = TQString::tqfromLatin1("ypcat printers.conf.byname > %1").arg(printersconf); kdDebug() << "printers.conf obtained from NIS server: " << cmd << endl; ::system(TQFile::encodeName(cmd)); } @@ -254,18 +254,18 @@ void KMLpdUnixManager::parseEtcPrintersConf() while (!t.eof()) { entry = readEntry(t); - if (entry.isEmpty() || !entry.contains("printer-name")) + if (entry.isEmpty() || !entry.tqcontains("printer-name")) continue; QString prname = entry["printer-name"]; if (prname == "_default") { - if (entry.contains("use")) + if (entry.tqcontains("use")) default_printer = entry["use"]; } else if (prname != "_all") { KMPrinter *printer = ::createPrinter(entry); - if (entry.contains("bsdaddr")) + if (entry.tqcontains("bsdaddr")) { QStringList l = TQStringList::split(',',entry["bsdaddr"],false); printer->setDescription(i18n("Remote printer queue on %1").arg(l[0])); @@ -277,7 +277,7 @@ void KMLpdUnixManager::parseEtcPrintersConf() } if (!default_printer.isEmpty()) - setSoftDefault(findPrinter(default_printer)); + setSoftDefault(tqfindPrinter(default_printer)); } } |