summaryrefslogtreecommitdiffstats
path: root/kdeprint/kprinterimpl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /kdeprint/kprinterimpl.cpp
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/kprinterimpl.cpp')
-rw-r--r--kdeprint/kprinterimpl.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kdeprint/kprinterimpl.cpp b/kdeprint/kprinterimpl.cpp
index 1e6f10837..94750b607 100644
--- a/kdeprint/kprinterimpl.cpp
+++ b/kdeprint/kprinterimpl.cpp
@@ -69,11 +69,11 @@ KPrinterImpl::~KPrinterImpl()
void KPrinterImpl::preparePrinting(KPrinter *printer)
{
- // page size -> try to tqfind page size and margins from driver file
- // use "PageSize" as option name to tqfind the wanted page size. It's
+ // page size -> try to find page size and margins from driver file
+ // use "PageSize" as option name to find the wanted page size. It's
// up to the driver loader to use that option name.
KMManager *mgr = KMFactory::self()->manager();
- DrMain *driver = mgr->loadPrinterDriver(mgr->tqfindPrinter(printer->printerName()), false);
+ DrMain *driver = mgr->loadPrinterDriver(mgr->findPrinter(printer->printerName()), false);
if (driver)
{
// Find the page size:
@@ -82,13 +82,13 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
QString psname = printer->option("PageSize");
if (psname.isEmpty())
{
- DrListOption *opt = (DrListOption*)driver->tqfindOption("PageSize");
+ DrListOption *opt = (DrListOption*)driver->findOption("PageSize");
if (opt) psname = opt->get("default");
}
if (!psname.isEmpty())
{
printer->setOption("kde-pagesize",TQString::number((int)pageNameToPageSize(psname)));
- DrPageSize *ps = driver->tqfindPageSize(psname);
+ DrPageSize *ps = driver->findPageSize(psname);
if (ps)
{
printer->setRealPageSize( ps );
@@ -104,7 +104,7 @@ void KPrinterImpl::preparePrinting(KPrinter *printer)
TQString res = printer->option( "Resolution" );
if ( res.isEmpty() )
{
- DrBase *opt = driver->tqfindOption( "Resolution" );
+ DrBase *opt = driver->findOption( "Resolution" );
if ( opt )
res = opt->get( "default" );
if ( res.isEmpty() )
@@ -225,7 +225,7 @@ void KPrinterImpl::statusMessage(const TQString& msg, KPrinter *printer)
kdDebug(500) << "kdeprint: status message: " << msg << endl;
KConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("General");
- if (!conf->readBoolEntry("ShowtqStatusMsg", true))
+ if (!conf->readBoolEntry("ShowStatusMsg", true))
return;
QString message(msg);
@@ -252,7 +252,7 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T
QString command(cmd), filestr;
QStringList printfiles;
- if (command.tqfind("%in") == -1) command.append(" %in");
+ if (command.find("%in") == -1) command.append(" %in");
for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
if (TQFile::exists(*it))
@@ -266,7 +266,7 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T
if (printfiles.count() > 0)
{
- command.tqreplace("%in",filestr);
+ command.replace("%in",filestr);
int pid = dcopPrint(command,files,flag);
if (pid > 0)
{
@@ -317,7 +317,7 @@ int KPrinterImpl::filterFiles(KPrinter *printer, TQStringList& files, bool flag)
!printer->option("kde-range").isEmpty() ||
printer->pageSet() != KPrinter::AllPages))
{
- if (flist.tqfindIndex("psselect") == -1)
+ if (flist.findIndex("psselect") == -1)
{
int index = KXmlCommandManager::self()->insertCommand(flist, "psselect", false);
if (index == -1 || !KXmlCommandManager::self()->checkCommand("psselect"))
@@ -378,8 +378,8 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ
QString ps = pageSizeToPageName( printer->option( "kde-printsize" ).isEmpty() ? printer->pageSize() : ( KPrinter::PageSize )printer->option( "kde-printsize" ).toInt() );
for (TQStringList::Iterator it=files.begin(); it!=files.end(); ++it)
{
- QString mime = KMimeMagic::self()->tqfindFileType(*it)->mimeType();
- if (inputMimeTypes.tqfind(mime) == inputMimeTypes.end())
+ QString mime = KMimeMagic::self()->findFileType(*it)->mimeType();
+ if (inputMimeTypes.find(mime) == inputMimeTypes.end())
{
if (KMessageBox::warningContinueCancel(0,
"<p>" + i18n("The MIME type %1 is not supported as input of the filter chain "
@@ -434,10 +434,10 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ
QString tmpfile = tempFile();
QString cmd(filtercmd);
- cmd.tqreplace(rout,quote(tmpfile));
- cmd.tqreplace(rpsl,ps.lower());
- cmd.tqreplace(rpsu,ps);
- cmd.tqreplace(rin,quote(*it)); // Replace as last, filename could contain "%psl"
+ cmd.replace(rout,quote(tmpfile));
+ cmd.replace(rpsl,ps.lower());
+ cmd.replace(rpsu,ps);
+ cmd.replace(rin,quote(*it)); // Replace as last, filename could contain "%psl"
statusMessage(i18n("Filtering print data"), printer);
int status = system(TQFile::encodeName(cmd));
if (status < 0 || WEXITSTATUS(status) == 127)
@@ -479,7 +479,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool
int status(0), result;
for (TQStringList::Iterator it=files.begin(); it!=files.end(); )
{
- QString mime = KMimeMagic::self()->tqfindFileType(*it)->mimeType();
+ QString mime = KMimeMagic::self()->findFileType(*it)->mimeType();
if ( mime == "application/x-zerosize" )
{
// special case of empty file
@@ -491,7 +491,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool
it = files.remove( it );
continue;
}
- else if (mimeTypes.tqfindIndex(mime) == -1)
+ else if (mimeTypes.findIndex(mime) == -1)
{
if ((result=KMessageBox::warningYesNoCancel(NULL,
i18n("<qt>The file format <em> %1 </em> is not directly supported by the current print system. You "
@@ -508,9 +508,9 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool
TQString::null,
i18n("Convert"),
i18n("Keep"),
- TQString::tqfromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes)
+ TQString::fromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes)
{
- // tqfind the filter chain
+ // find the filter chain
QStringList flist = KXmlCommandManager::self()->autoConvert(mime, primaryMimeType);
if (flist.count() == 0)
{
@@ -565,9 +565,9 @@ bool KPrinterImpl::setupSpecialCommand(TQString& cmd, KPrinter *p, const TQStrin
s = KMFactory::self()->specialManager()->setupCommand(s, p->options());
QString ps = pageSizeToPageName( p->option( "kde-printsize" ).isEmpty() ? p->pageSize() : ( KPrinter::PageSize )p->option( "kde-printsize" ).toInt() );
- s.tqreplace("%psl", ps.lower());
- s.tqreplace("%psu", ps);
- s.tqreplace("%out", "$out{" + p->outputFileName() + "}"); // Replace as last
+ s.replace("%psl", ps.lower());
+ s.replace("%psu", ps);
+ s.replace("%out", "$out{" + p->outputFileName() + "}"); // Replace as last
cmd = s;
return true;
}