From 984c25aa6969e55896e9a13c8e7f7b8a58991a4e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:32:40 -0600 Subject: Rename old tq methods that no longer need a unique name --- tdeprint/cups/cupsaddsmb2.cpp | 4 ++-- tdeprint/cups/cupsinfos.cpp | 4 ++-- tdeprint/cups/ippreportdlg.cpp | 2 +- tdeprint/cups/ipprequest.cpp | 2 +- tdeprint/cups/kcupsprinterimpl.cpp | 6 +++--- tdeprint/cups/kmcupsjobmanager.cpp | 6 +++--- tdeprint/cups/kmcupsmanager.cpp | 22 +++++++++++----------- tdeprint/cups/kmpropusers.cpp | 2 +- tdeprint/cups/kmwfax.cpp | 4 ++-- tdeprint/cups/kmwipp.cpp | 2 +- tdeprint/cups/kmwippprinter.cpp | 6 +++--- tdeprint/cups/kmwippselect.cpp | 6 +++--- 12 files changed, 33 insertions(+), 33 deletions(-) (limited to 'tdeprint/cups') diff --git a/tdeprint/cups/cupsaddsmb2.cpp b/tdeprint/cups/cupsaddsmb2.cpp index ca40a10a7..f0cb1c359 100644 --- a/tdeprint/cups/cupsaddsmb2.cpp +++ b/tdeprint/cups/cupsaddsmb2.cpp @@ -156,7 +156,7 @@ void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen) while (1) { // read a line - line = TQString::tqfromLatin1(""); + line = TQString::fromLatin1(""); partial = true; while (index < buflen) { @@ -433,7 +433,7 @@ bool CupsAddSmb::doExport() m_actions << "quit"; m_proc.clearArguments(); - m_proc << "smbclient" << TQString::tqfromLatin1("//")+m_servered->text()+"/print$"; + m_proc << "smbclient" << TQString::fromLatin1("//")+m_servered->text()+"/print$"; return startProcess(); } diff --git a/tdeprint/cups/cupsinfos.cpp b/tdeprint/cups/cupsinfos.cpp index 1fae8e0db..2f7031503 100644 --- a/tdeprint/cups/cupsinfos.cpp +++ b/tdeprint/cups/cupsinfos.cpp @@ -119,9 +119,9 @@ void CupsInfos::load() { KConfig *conf_ = KMFactory::self()->printConfig(); conf_->setGroup("CUPS"); - host_ = conf_->readEntry("Host",TQString::tqfromLatin1(cupsServer())); + host_ = conf_->readEntry("Host",TQString::fromLatin1(cupsServer())); port_ = conf_->readNumEntry("Port",ippPort()); - login_ = conf_->readEntry("Login",TQString::tqfromLatin1(cupsUser())); + login_ = conf_->readEntry("Login",TQString::fromLatin1(cupsUser())); savepwd_ = conf_->readBoolEntry( "SavePassword", false ); if ( savepwd_ ) { diff --git a/tdeprint/cups/ippreportdlg.cpp b/tdeprint/cups/ippreportdlg.cpp index 5fa54e11e..1e07789ac 100644 --- a/tdeprint/cups/ippreportdlg.cpp +++ b/tdeprint/cups/ippreportdlg.cpp @@ -59,7 +59,7 @@ void IppReportDlg::slotUser1() int hh = rich.height(), page(1); while (1) { - rich.draw(&painter, margin, margin, r, tqcolorGroup()); + rich.draw(&painter, margin, margin, r, colorGroup()); TQString s = caption() + ": " + TQString::number(page); TQRect br = painter.fontMetrics().boundingRect(s); painter.drawText(r.right()-br.width()-5, r.top()-br.height()-4, br.width()+5, br.height()+4, Qt::AlignRight|Qt::AlignTop, s); diff --git a/tdeprint/cups/ipprequest.cpp b/tdeprint/cups/ipprequest.cpp index 16cbe3308..c7472a9ae 100644 --- a/tdeprint/cups/ipprequest.cpp +++ b/tdeprint/cups/ipprequest.cpp @@ -66,7 +66,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString:: ipp_attribute_t *attr = req->attrs; while (attr) { - TQString s = TQString::tqfromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); + TQString s = TQString::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); for (int i=0;inum_values;i++) { switch (attr->value_tag) diff --git a/tdeprint/cups/kcupsprinterimpl.cpp b/tdeprint/cups/kcupsprinterimpl.cpp index e016e9954..5c2de105b 100644 --- a/tdeprint/cups/kcupsprinterimpl.cpp +++ b/tdeprint/cups/kcupsprinterimpl.cpp @@ -67,8 +67,8 @@ bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) // check printer object if (!printer) return false; - TQString hoststr = TQString::tqfromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); - cmd = TQString::tqfromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName())); + TQString hoststr = TQString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); + cmd = TQString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName())); if (!CupsInfos::self()->login().isEmpty()) { TQString userstr(CupsInfos::self()->login()); @@ -127,7 +127,7 @@ void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& valu KPrinterImpl::broadcastOption("orientation-requested",(value == "Landscape" ? "4" : "3")); else if (key == "kde-pagesize") { - TQString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); + TQString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); KPrinterImpl::broadcastOption("PageSize",pagename); // simple hack for classes KPrinterImpl::broadcastOption("media",pagename); diff --git a/tdeprint/cups/kmcupsjobmanager.cpp b/tdeprint/cups/kmcupsjobmanager.cpp index 58de0818a..be088d360 100644 --- a/tdeprint/cups/kmcupsjobmanager.cpp +++ b/tdeprint/cups/kmcupsjobmanager.cpp @@ -93,7 +93,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList& jobs, int ac if (argstr.isEmpty()) return false; req.setOperation(CUPS_MOVE_JOB); uri = - TQString::tqfromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(), + TQString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(), argstr); req.addURI(IPP_TAG_OPERATION, "job-printer-uri", uri); break; @@ -150,7 +150,7 @@ bool KMCupsJobManager::listJobs(const TQString& prname, KMJobManager::JobType ty // other attributes req.addKeyword(IPP_TAG_OPERATION, "requested-attributes", keys); if (type == KMJobManager::CompletedJobs) - req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::tqfromLatin1("completed")); + req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::fromLatin1("completed")); if (limit > 0) req.addInteger(IPP_TAG_OPERATION,"limit",limit); @@ -218,7 +218,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr) } else if (name == "job-priority") { - job->setAttribute(0, TQString::tqfromLatin1("%1").arg(attr->values[0].integer, 3)); + job->setAttribute(0, TQString::fromLatin1("%1").arg(attr->values[0].integer, 3)); } else if (name == "job-billing") { diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index 8db6bdc6d..635cfd5e8 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager() TQString KMCupsManager::driverDbCreationProgram() { - return TQString::tqfromLatin1("/opt/trinity/bin/make_driver_db_cups"); + return TQString::fromLatin1("/opt/trinity/bin/make_driver_db_cups"); } TQString KMCupsManager::driverDirectory() @@ -173,7 +173,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p) else if (!p->option("requesting-user-name-allowed").isEmpty()) req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQStringList::split(",",p->option("requesting-user-name-allowed"),false)); else - req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::tqfromLatin1("all")); + req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::fromLatin1("all")); } req.addText(IPP_TAG_PRINTER,"printer-info",p->description()); req.addText(IPP_TAG_PRINTER,"printer-location",p->location()); @@ -287,8 +287,8 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) delete kes; m_hostSuccess = false; } else { - TQDateTime tm = TQDateTime::tqcurrentDateTime().addSecs(2); - while (!m_lookupDone && (TQDateTime::tqcurrentDateTime() < tm)) + TQDateTime tm = TQDateTime::currentDateTime().addSecs(2); + while (!m_lookupDone && (TQDateTime::currentDateTime() < tm)) tqApp->processEvents(); kes->cancelAsyncConnect(); @@ -358,8 +358,8 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) // banners req.name("job-sheets-default",values); while (values.count() < 2) values.append("none"); - p->setOption("kde-banners",values.join(TQString::tqfromLatin1(","))); - if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::tqfromLatin1(","))); + p->setOption("kde-banners",values.join(TQString::fromLatin1(","))); + if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(","))); // quotas int ival; @@ -405,7 +405,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p) req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); req.addMime(IPP_TAG_OPERATION,"document-format","application/postscript"); if (!CupsInfos::self()->login().isEmpty()) req.addName(IPP_TAG_OPERATION,"requesting-user-name",CupsInfos::self()->login()); - req.addName(IPP_TAG_OPERATION,"job-name",TQString::tqfromLatin1("KDE Print Test")); + req.addName(IPP_TAG_OPERATION,"job-name",TQString::fromLatin1("KDE Print Test")); if (req.doFileRequest("/printers/",testpage)) return true; reportIppError(&req); @@ -453,7 +453,7 @@ void KMCupsManager::loadServerPrinters() // load default req.init(); req.setOperation(CUPS_GET_DEFAULT); - req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name")); if (req.doRequest("/printers/")) { TQString s = TQString::null; @@ -576,7 +576,7 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) { TQStringList comps = TQStringList::split('/', drname, false); TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - TQString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -691,7 +691,7 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) keyword = line.mid(8,p-8); DrBase *bopt = 0; if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" ) - bopt = driver->findOption( TQString::tqfromLatin1( "PageSize" ) ); + bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) ); else bopt = driver->findOption( keyword ); if (bopt) @@ -938,7 +938,7 @@ void KMCupsManager::slotConnectionSuccess() IppRequest req; req.setOperation( CUPS_GET_PRINTERS ); - req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::tqfromLatin1( "printer-name" ) ); + req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::fromLatin1( "printer-name" ) ); if ( req.doRequest( "/printers/" ) ) setUpdatePossible( true ); else diff --git a/tdeprint/cups/kmpropusers.cpp b/tdeprint/cups/kmpropusers.cpp index 65a9e4dbd..0f67205b0 100644 --- a/tdeprint/cups/kmpropusers.cpp +++ b/tdeprint/cups/kmpropusers.cpp @@ -29,7 +29,7 @@ KMPropUsers::KMPropUsers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) { m_text = new TQTextView(this); - m_text->setPaper(tqcolorGroup().background()); + m_text->setPaper(colorGroup().background()); m_text->setFrameStyle(TQFrame::NoFrame); TQVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0); diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp index 352081f6c..a9a120b6c 100644 --- a/tdeprint/cups/kmwfax.cpp +++ b/tdeprint/cups/kmwfax.cpp @@ -48,7 +48,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) // initialize IppRequest req; req.setOperation(CUPS_GET_DEVICES); - TQString uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + TQString uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); if (req.doRequest("/")) { @@ -57,7 +57,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) { if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0) { - m_list->insertItem(SmallIcon("blockdevice"),TQString::tqfromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(attr->values[0].string.text)); } attr = attr->next; } diff --git a/tdeprint/cups/kmwipp.cpp b/tdeprint/cups/kmwipp.cpp index 119da629a..cb9dedd6c 100644 --- a/tdeprint/cups/kmwipp.cpp +++ b/tdeprint/cups/kmwipp.cpp @@ -41,7 +41,7 @@ KMWIpp::KMWIpp(TQWidget *parent, const char *name) "before continuing.

")); setLabel(0,i18n("Host:")); setLabel(1,i18n("Port:")); - setText( 1, TQString::tqfromLatin1( "631" ) ); + setText( 1, TQString::fromLatin1( "631" ) ); } bool KMWIpp::isValid(TQString& msg) diff --git a/tdeprint/cups/kmwippprinter.cpp b/tdeprint/cups/kmwippprinter.cpp index 0a0c7b672..044f9cb6d 100644 --- a/tdeprint/cups/kmwippprinter.cpp +++ b/tdeprint/cups/kmwippprinter.cpp @@ -59,7 +59,7 @@ KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name) l1->setBuddy(m_uri); m_info = new TQTextView(this); - m_info->setPaper(tqcolorGroup().background()); + m_info->setPaper(colorGroup().background()); m_info->setMinimumHeight(100); m_info->setText(i18n("

Either enter the printer URI directly, or use the network scanning facility.

")); m_ippreport = new KPushButton(KGuiItem(i18n("&IPP Report"), "tdeprint_report"), this); @@ -157,7 +157,7 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) req.setOperation(IPP_GET_PRINTER_ATTRIBUTES); req.setHost(item->text(1)); req.setPort(item->text(2).toInt()); - uri = TQString::tqfromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2)); + uri = TQString::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2)); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); keys.append("printer-name"); keys.append("printer-state"); @@ -176,7 +176,7 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) if (req.uri("printer-uri-supported",value)) { if (value[0] == '/') - value.prepend(TQString::tqfromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2))); + value.prepend(TQString::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2))); m_uri->setText(value); } if (req.text("printer-make-and-model",value) && !value.isEmpty()) txt.append(i18n("Model: %1
").arg(value)); diff --git a/tdeprint/cups/kmwippselect.cpp b/tdeprint/cups/kmwippselect.cpp index 5c9cad356..b5e6c0405 100644 --- a/tdeprint/cups/kmwippselect.cpp +++ b/tdeprint/cups/kmwippselect.cpp @@ -75,16 +75,16 @@ void KMWIppSelect::initPrinter(KMPrinter *p) IppRequest req; TQString uri; req.setOperation(CUPS_GET_PRINTERS); - uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); - req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name")); if (req.doRequest("/printers/")) { ipp_attribute_t *attr = req.first(); while (attr) { if (attr->name && strcmp(attr->name,"printer-name") == 0) - m_list->insertItem(SmallIcon("tdeprint_printer"),TQString::tqfromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("tdeprint_printer"),TQString::fromLatin1(attr->values[0].string.text)); attr = attr->next; } m_list->sort(); -- cgit v1.2.1