diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kdeprint | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint')
164 files changed, 476 insertions, 476 deletions
diff --git a/kdeprint/cups/cupsaddsmb2.cpp b/kdeprint/cups/cupsaddsmb2.cpp index ef1b0f4e8..8a6d44d6e 100644 --- a/kdeprint/cups/cupsaddsmb2.cpp +++ b/kdeprint/cups/cupsaddsmb2.cpp @@ -156,7 +156,7 @@ void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen) while (1) { // read a line - line = TQString::fromLatin1(""); + line = TQString::tqfromLatin1(""); partial = true; while (index < buflen) { @@ -231,7 +231,7 @@ void CupsAddSmb::checkActionStatus() m_status = (m_buffer.count() == 0); break; case MkDir: - m_status = (m_buffer.count() == 1 || m_buffer[1].find("ERRfilexists") != -1); + m_status = (m_buffer.count() == 1 || m_buffer[1].tqfind("ERRfilexists") != -1); break; case AddDriver: case AddPrinter: @@ -315,7 +315,7 @@ void CupsAddSmb::slotProcessExited(KProcess*) if (m_proc.normalExit() && m_state != Start && m_status) { // last process went OK. If it was smbclient, then switch to rpcclient - if (qstrncmp(m_proc.args().first(), "smbclient", 9) == 0) + if (tqstrncmp(m_proc.args().first(), "smbclient", 9) == 0) { doInstall(); return; @@ -433,7 +433,7 @@ bool CupsAddSmb::doExport() m_actions << "quit"; m_proc.clearArguments(); - m_proc << "smbclient" << TQString::fromLatin1("//")+m_servered->text()+"/print$"; + m_proc << "smbclient" << TQString::tqfromLatin1("//")+m_servered->text()+"/print$"; return startProcess(); } diff --git a/kdeprint/cups/cupsdconf2/addressdialog.cpp b/kdeprint/cups/cupsdconf2/addressdialog.cpp index 1811abf68..d4f5b900f 100644 --- a/kdeprint/cups/cupsdconf2/addressdialog.cpp +++ b/kdeprint/cups/cupsdconf2/addressdialog.cpp @@ -76,7 +76,7 @@ TQString AddressDialog::newAddress(TQWidget *parent) TQString AddressDialog::editAddress(const TQString& addr, TQWidget *parent) { AddressDialog dlg(parent); - int p = addr.find(' '); + int p = addr.tqfind(' '); if (p != -1) { dlg.type_->setCurrentItem(addr.left(p).lower() == "deny" ? 1 : 0); diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp index 43847299b..62c9a0c6f 100644 --- a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp @@ -92,7 +92,7 @@ TQString CupsdComment::comment(const TQString& key) { if (comments_.count() != 0 || loadComments()) { - Comment *comm = comments_.find(key); + Comment *comm = comments_.tqfind(key); if (comm) return comm->comment(); } @@ -103,7 +103,7 @@ TQString CupsdComment::toolTip(const TQString& key) { if (comments_.count() != 0 || loadComments()) { - Comment *comm = comments_.find(key); + Comment *comm = comments_.tqfind(key); if (comm) return comm->toolTip(); } diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp index f500d219c..535866e4f 100644 --- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -42,7 +42,7 @@ TQString findDir(const TQStringList& list) void splitSizeSpec(const TQString& s, int& sz, int& suff) { - int p = s.find(TQRegExp("\\D")); + int p = s.tqfind(TQRegExp("\\D")); sz = s.mid(0, p).toInt(); if (p != -1) { @@ -484,7 +484,7 @@ bool CupsdConf::parseOption(const TQString& line) int p(-1); TQString keyword, value, l(line.simplifyWhiteSpace()); - if ((p=l.find(' ')) != -1) + if ((p=l.tqfind(' ')) != -1) { keyword = l.left(p).lower(); value = l.mid(p+1); @@ -508,7 +508,7 @@ bool CupsdConf::parseOption(const TQString& line) { browseprotocols_.clear(); TQStringList prots = TQStringList::split(TQRegExp("\\s"), value, false); - if (prots.find("all") != prots.end()) + if (prots.tqfind("all") != prots.end()) browseprotocols_ << "CUPS" << "SLP"; else for (TQStringList::ConstIterator it=prots.begin(); it!=prots.end(); ++it) @@ -718,7 +718,7 @@ CupsLocation::CupsLocation(const CupsLocation& loc) bool CupsLocation::parseResource(const TQString& line) { QString str = line.simplifyWhiteSpace(); - int p1 = line.find(' '), p2 = line.find('>'); + int p1 = line.tqfind(' '), p2 = line.tqfind('>'); if (p1 != -1 && p2 != -1) { resourcename_ = str.mid(p1+1,p2-p1-1); @@ -732,7 +732,7 @@ bool CupsLocation::parseOption(const TQString& line) int p(-1); TQString keyword, value, l(line.simplifyWhiteSpace()); - if ((p=l.find(' ')) != -1) + if ((p=l.tqfind(' ')) != -1) { keyword = l.left(p).lower(); value = l.mid(p+1); @@ -760,7 +760,7 @@ bool CupsLocation::parseOption(const TQString& line) else if (keyword == "authgroupname") authname_ = value; else if (keyword == "require") { - int p = value.find(' '); + int p = value.tqfind(' '); if (p != -1) { authname_ = value.mid(p+1); @@ -810,8 +810,8 @@ int CupsResource::typeFromText(const TQString& text) { if (text == i18n("Base", "Root") || text == i18n("All printers") || text == i18n("All classes") || text == i18n("Print jobs")) return RESOURCE_GLOBAL; else if (text == i18n("Administration")) return RESOURCE_ADMIN; - else if (text.find(i18n("Class")) == 0) return RESOURCE_CLASS; - else if (text.find(i18n("Printer")) == 0) return RESOURCE_PRINTER; + else if (text.tqfind(i18n("Class")) == 0) return RESOURCE_CLASS; + else if (text.tqfind(i18n("Printer")) == 0) return RESOURCE_PRINTER; else return RESOURCE_PRINTER; } @@ -832,12 +832,12 @@ TQString CupsResource::textToPath(const TQString& text) else if (text == i18n("All classes")) path = "/classes"; else if (text == i18n("Print jobs")) path = "/jobs"; else if (text == i18n("Base", "Root")) path = "/"; - else if (text.find(i18n("Printer")) == 0) + else if (text.tqfind(i18n("Printer")) == 0) { path = "/printers/"; path.append(text.right(text.length()-i18n("Printer").length()-1)); } - else if (text.find(i18n("Class")) == 0) + else if (text.tqfind(i18n("Class")) == 0) { path = "/classes/"; path.append(text.right(text.length()-i18n("Class").length()-1)); @@ -853,13 +853,13 @@ TQString CupsResource::pathToText(const TQString& path) else if (path == "/classes") text = i18n("All classes"); else if (path == "/") text = i18n("Root"); else if (path == "/jobs") text = i18n("Print jobs"); - else if (path.find("/printers/") == 0) + else if (path.tqfind("/printers/") == 0) { text = i18n("Printer"); text.append(" "); text.append(path.right(path.length()-10)); } - else if (path.find("/classes/") == 0) + else if (path.tqfind("/classes/") == 0) { text = i18n("Class"); text.append(" "); diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp index 8023aeef7..50f8a3858 100644 --- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -337,7 +337,7 @@ int CupsdDialog::serverOwner() while (!t.eof()) { str = t.readLine(); - if (str.find("Uid:",0,false) == 0) + if (str.tqfind("Uid:",0,false) == 0) { QStringList list = TQStringList::split('\t', str, false); if (list.count() >= 2) diff --git a/kdeprint/cups/cupsdconf2/cupsdpage.h b/kdeprint/cups/cupsdconf2/cupsdpage.h index e503319ca..f6c8b932b 100644 --- a/kdeprint/cups/cupsdconf2/cupsdpage.h +++ b/kdeprint/cups/cupsdconf2/cupsdpage.h @@ -24,7 +24,7 @@ struct CupsdConf; -class CupsdPage : public QWidget +class CupsdPage : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp index 9dd7581a8..754e7cbd5 100644 --- a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp @@ -39,11 +39,11 @@ CupsdSplash::CupsdSplash(TQWidget *parent, const char *name) QLabel *cupslogo_ = new TQLabel(this); QString logopath = locate("data", TQString("kdeprint/cups_logo.png")); cupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath)); - cupslogo_->setAlignment(Qt::AlignCenter); + cupslogo_->tqsetAlignment(Qt::AlignCenter); QLabel *kupslogo_ = new TQLabel(this); logopath = locate("data", TQString("kdeprint/kde_logo.png")); kupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath)); - kupslogo_->setAlignment(Qt::AlignCenter); + kupslogo_->tqsetAlignment(Qt::AlignCenter); QLabel *helptxt_ = new TQLabel(this); helptxt_->setText(i18n( "<p>This tool will help you to configure graphically the server of the CUPS printing system. " diff --git a/kdeprint/cups/cupsdconf2/editlist.h b/kdeprint/cups/cupsdconf2/editlist.h index 9035d980f..9f4800c15 100644 --- a/kdeprint/cups/cupsdconf2/editlist.h +++ b/kdeprint/cups/cupsdconf2/editlist.h @@ -26,7 +26,7 @@ class KListBox; class TQPushButton; -class EditList : public QWidget +class EditList : public TQWidget { Q_OBJECT diff --git a/kdeprint/cups/cupsdconf2/portdialog.cpp b/kdeprint/cups/cupsdconf2/portdialog.cpp index e17e2b081..184005c13 100644 --- a/kdeprint/cups/cupsdconf2/portdialog.cpp +++ b/kdeprint/cups/cupsdconf2/portdialog.cpp @@ -93,12 +93,12 @@ TQString PortDialog::editListen(const TQString& s, TQWidget *parent, CupsdConf * { PortDialog dlg(parent); dlg.setInfos(conf); - int p = s.find(' '); + int p = s.tqfind(' '); if (p != -1) { dlg.usessl_->setChecked(s.left(p).startsWith("SSL")); QString addr = s.mid(p+1).stripWhiteSpace(); - int p1 = addr.find(':'); + int p1 = addr.tqfind(':'); if (p1 == -1) { dlg.address_->setText(addr); diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.h b/kdeprint/cups/cupsdconf2/qdirlineedit.h index 1f4d87d17..9d4a03b34 100644 --- a/kdeprint/cups/cupsdconf2/qdirlineedit.h +++ b/kdeprint/cups/cupsdconf2/qdirlineedit.h @@ -26,7 +26,7 @@ class TQLineEdit; class TQPushButton; -class QDirLineEdit : public QWidget +class QDirLineEdit : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index 1daca81cb..7b96d4ef9 100644 --- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -44,7 +44,7 @@ QDirMultiLineEdit::QDirMultiLineEdit(TQWidget *parent, const char *name) connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveClicked())); m_remove->setEnabled(false); - m_view->setFixedHeight(QMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->sizeHint().height()*2)); + m_view->setFixedHeight(QMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->tqsizeHint().height()*2)); QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 3); QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 0); diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h index 8853bd18e..66586d37f 100644 --- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h +++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h @@ -26,7 +26,7 @@ class KListView; class TQListViewItem; class TQPushButton; -class QDirMultiLineEdit : public QWidget +class QDirMultiLineEdit : public TQWidget { Q_OBJECT diff --git a/kdeprint/cups/cupsdconf2/sizewidget.cpp b/kdeprint/cups/cupsdconf2/sizewidget.cpp index d77fe5aaa..5920c30a9 100644 --- a/kdeprint/cups/cupsdconf2/sizewidget.cpp +++ b/kdeprint/cups/cupsdconf2/sizewidget.cpp @@ -45,7 +45,7 @@ SizeWidget::SizeWidget( TQWidget *parent, const char *name ) void SizeWidget::setSizeString( const TQString& sz ) { - int p = sz.find( TQRegExp( "\\D" ) ); + int p = sz.tqfind( TQRegExp( "\\D" ) ); m_size->setValue( sz.left( p ).toInt() ); switch( sz[ p ].latin1() ) { diff --git a/kdeprint/cups/cupsdconf2/sizewidget.h b/kdeprint/cups/cupsdconf2/sizewidget.h index faa52e27b..56818b9a1 100644 --- a/kdeprint/cups/cupsdconf2/sizewidget.h +++ b/kdeprint/cups/cupsdconf2/sizewidget.h @@ -25,7 +25,7 @@ class TQSpinBox; class TQComboBox; -class SizeWidget : public QWidget +class SizeWidget : public TQWidget { public: SizeWidget( TQWidget *parent = 0, const char *name = 0 ); diff --git a/kdeprint/cups/cupsinfos.cpp b/kdeprint/cups/cupsinfos.cpp index 839f83612..78bbeb458 100644 --- a/kdeprint/cups/cupsinfos.cpp +++ b/kdeprint/cups/cupsinfos.cpp @@ -119,9 +119,9 @@ void CupsInfos::load() { KConfig *conf_ = KMFactory::self()->printConfig(); conf_->setGroup("CUPS"); - host_ = conf_->readEntry("Host",TQString::fromLatin1(cupsServer())); + host_ = conf_->readEntry("Host",TQString::tqfromLatin1(cupsServer())); port_ = conf_->readNumEntry("Port",ippPort()); - login_ = conf_->readEntry("Login",TQString::fromLatin1(cupsUser())); + login_ = conf_->readEntry("Login",TQString::tqfromLatin1(cupsUser())); savepwd_ = conf_->readBoolEntry( "SavePassword", false ); if ( savepwd_ ) { diff --git a/kdeprint/cups/image.cpp b/kdeprint/cups/image.cpp index 4fe214bc1..9e32ce771 100644 --- a/kdeprint/cups/image.cpp +++ b/kdeprint/cups/image.cpp @@ -267,9 +267,9 @@ TQImage convertImage(const TQImage& image, int hue, int saturation, int brightne for (int j=0;j<image.height();j++) { c = image.pixel(i,j); - r = qRed(c); - g = qGreen(c); - b = qBlue(c); + r = tqRed(c); + g = tqGreen(c); + b = tqBlue(c); v = lut[0][0][r] + lut[1][0][g] + lut[2][0][b]; if (gamma != 1000) v = (int)rint(pow(v,gam)); @@ -289,7 +289,7 @@ TQImage convertImage(const TQImage& image, int hue, int saturation, int brightne else if (v > 255) b2 = 255; else b2 = v; - img.setPixel(i,j,qRgb(r2,g2,b2)); + img.setPixel(i,j,tqRgb(r2,g2,b2)); } return img; } diff --git a/kdeprint/cups/imageposition.cpp b/kdeprint/cups/imageposition.cpp index bc2b207fd..9e0ab4941 100644 --- a/kdeprint/cups/imageposition.cpp +++ b/kdeprint/cups/imageposition.cpp @@ -44,8 +44,8 @@ ImagePosition::ImagePosition(TQWidget *parent, const char *name) : TQWidget(parent,name) { position_ = Center; - setMinimumSize(sizeHint()); - setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); + setMinimumSize(tqsizeHint()); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); pix_.load(locate("data", "kdeprint/preview-mini.png")); } @@ -147,7 +147,7 @@ void ImagePosition::paintEvent(TQPaintEvent*) p.end(); } -TQSize ImagePosition::sizeHint() const +TQSize ImagePosition::tqsizeHint() const { return TQSize(60, 80); } diff --git a/kdeprint/cups/imageposition.h b/kdeprint/cups/imageposition.h index caaa63ca2..406e96951 100644 --- a/kdeprint/cups/imageposition.h +++ b/kdeprint/cups/imageposition.h @@ -24,7 +24,7 @@ #include <tqstring.h> #include <tqpixmap.h> -class ImagePosition : public QWidget +class ImagePosition : public TQWidget { public: enum PositionType {TopLeft, @@ -45,7 +45,7 @@ public: void setPosition(int horiz = 1, int vert = 1); PositionType position() const { return (PositionType)position_; } TQString positionString() const; - TQSize sizeHint() const; + TQSize tqsizeHint() const; protected: void paintEvent(TQPaintEvent *); diff --git a/kdeprint/cups/imagepreview.cpp b/kdeprint/cups/imagepreview.cpp index 7ae5dabf0..9272399e4 100644 --- a/kdeprint/cups/imagepreview.cpp +++ b/kdeprint/cups/imagepreview.cpp @@ -51,7 +51,7 @@ void ImagePreview::setParameters(int brightness, int hue, int saturation, int ga hue_ = hue; saturation_ = saturation; gamma_ = gamma; - repaint(); + tqrepaint(); } void ImagePreview::paintEvent(TQPaintEvent*){ @@ -59,7 +59,7 @@ void ImagePreview::paintEvent(TQPaintEvent*){ int x = (width()-tmpImage.width())/2, y = (height()-tmpImage.height())/2; QPixmap buffer(width(), height()); - buffer.fill(parentWidget(), 0, 0); + buffer.fill(tqparentWidget(), 0, 0); QPainter p(&buffer); p.drawImage(x,y,tmpImage); p.end(); @@ -72,7 +72,7 @@ void ImagePreview::setBlackAndWhite(bool on){ update(); } -TQSize ImagePreview::minimumSizeHint() const +TQSize ImagePreview::tqminimumSizeHint() const { return image_.size(); } diff --git a/kdeprint/cups/imagepreview.h b/kdeprint/cups/imagepreview.h index 1967efdc2..ff9da9fb8 100644 --- a/kdeprint/cups/imagepreview.h +++ b/kdeprint/cups/imagepreview.h @@ -23,7 +23,7 @@ #include <tqwidget.h> #include <tqimage.h> -class ImagePreview : public QWidget +class ImagePreview : public TQWidget { public: ImagePreview(TQWidget *parent=0, const char *name=0); @@ -32,7 +32,7 @@ public: void setParameters(int brightness, int hue, int saturation, int gamma); void setImage(const TQImage& image); void setBlackAndWhite(bool on); - TQSize minimumSizeHint() const; + TQSize tqminimumSizeHint() const; private: // Private attributes int brightness_; diff --git a/kdeprint/cups/ippreportdlg.cpp b/kdeprint/cups/ippreportdlg.cpp index 343cd4118..20882d8c4 100644 --- a/kdeprint/cups/ippreportdlg.cpp +++ b/kdeprint/cups/ippreportdlg.cpp @@ -59,7 +59,7 @@ void IppReportDlg::slotUser1() int hh = rich.height(), page(1); while (1) { - rich.draw(&painter, margin, margin, r, colorGroup()); + rich.draw(&painter, margin, margin, r, tqcolorGroup()); QString s = caption() + ": " + TQString::number(page); QRect 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/kdeprint/cups/ipprequest.cpp b/kdeprint/cups/ipprequest.cpp index 0b32e45e7..0f6c8cbc6 100644 --- a/kdeprint/cups/ipprequest.cpp +++ b/kdeprint/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::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); + TQString s = TQString::tqfromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); for (int i=0;i<attr->num_values;i++) { switch (attr->value_tag) diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp index 1bf6d55bf..7fa6da140 100644 --- a/kdeprint/cups/kcupsprinterimpl.cpp +++ b/kdeprint/cups/kcupsprinterimpl.cpp @@ -37,9 +37,9 @@ TQSize rangeToSize(const TQString& s) int p(-1); int from, to; - if ((p=range.find(',')) != -1) + if ((p=range.tqfind(',')) != -1) range.truncate(p); - if ((p=range.find('-')) != -1) + if ((p=range.tqfind('-')) != -1) { from = range.left(p).toInt(); to = range.right(range.length()-p-1).toInt(); @@ -67,8 +67,8 @@ bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) // check printer object if (!printer) return false; - QString 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())); + QString 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())); if (!CupsInfos::self()->login().isEmpty()) { QString 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") { - QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); + QString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); KPrinterImpl::broadcastOption("PageSize",pagename); // simple hack for classes KPrinterImpl::broadcastOption("media",pagename); diff --git a/kdeprint/cups/kmcupsconfigwidget.h b/kdeprint/cups/kmcupsconfigwidget.h index 6c0ceedf7..6f213af6c 100644 --- a/kdeprint/cups/kmcupsconfigwidget.h +++ b/kdeprint/cups/kmcupsconfigwidget.h @@ -26,7 +26,7 @@ class TQLineEdit; class TQCheckBox; class KConfig; -class KMCupsConfigWidget : public QWidget +class KMCupsConfigWidget : public TQWidget { public: KMCupsConfigWidget(TQWidget *parent = 0, const char *name = 0); diff --git a/kdeprint/cups/kmcupsjobmanager.cpp b/kdeprint/cups/kmcupsjobmanager.cpp index 011256cd6..35f2ea272 100644 --- a/kdeprint/cups/kmcupsjobmanager.cpp +++ b/kdeprint/cups/kmcupsjobmanager.cpp @@ -93,7 +93,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int ac if (argstr.isEmpty()) return false; req.setOperation(CUPS_MOVE_JOB); uri = - TQString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(), + TQString::tqfromLatin1("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::fromLatin1("completed")); + req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::tqfromLatin1("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::fromLatin1("%1").arg(attr->values[0].integer, 3)); + job->setAttribute(0, TQString::tqfromLatin1("%1").arg(attr->values[0].integer, 3)); } else if (name == "job-billing") { @@ -356,7 +356,7 @@ static TQString processRange(const TQString& range) for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { s.append(*it); - if ((*it).find('-') == -1) + if ((*it).tqfind('-') == -1) s.append("-").append(*it); s.append(","); } diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp index 2d923a371..e4fe957e6 100644 --- a/kdeprint/cups/kmcupsmanager.cpp +++ b/kdeprint/cups/kmcupsmanager.cpp @@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager() TQString KMCupsManager::driverDbCreationProgram() { - return TQString::fromLatin1("/opt/kde3/bin/make_driver_db_cups"); + return TQString::tqfromLatin1("/opt/kde3/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::fromLatin1("all")); + req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::tqfromLatin1("all")); } req.addText(IPP_TAG_PRINTER,"printer-info",p->description()); req.addText(IPP_TAG_PRINTER,"printer-location",p->location()); @@ -287,9 +287,9 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) delete kes; m_hostSuccess = false; } else { - TQDateTime tm = TQDateTime::currentDateTime().addSecs(2); - while (!m_lookupDone && (TQDateTime::currentDateTime() < tm)) - qApp->processEvents(); + TQDateTime tm = TQDateTime::tqcurrentDateTime().addSecs(2); + while (!m_lookupDone && (TQDateTime::tqcurrentDateTime() < 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::fromLatin1(","))); - if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(","))); + p->setOption("kde-banners",values.join(TQString::tqfromLatin1(","))); + if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::tqfromLatin1(","))); // 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::fromLatin1("KDE Print Test")); + req.addName(IPP_TAG_OPERATION,"job-name",TQString::tqfromLatin1("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::fromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); if (req.doRequest("/printers/")) { QString s = TQString::null; @@ -576,7 +576,7 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) { QStringList comps = TQStringList::split('/', drname, false); QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); QString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -655,10 +655,10 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) if (line.startsWith("*% COMDATA #")) { int p(-1), q(-1); - if ((p=line.find("'name'")) != -1) + if ((p=line.tqfind("'name'")) != -1) { - p = line.find('\'',p+6)+1; - q = line.find('\'',p); + p = line.tqfind('\'',p+6)+1; + q = line.tqfind('\'',p); keyword = line.mid(p,q-p); opt = driver->findOption(keyword); if (opt && (opt->type() == DrBase::Integer || opt->type() == DrBase::Float)) @@ -666,19 +666,19 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) else isnumeric = false; } - /*else if ((p=line.find("'type'")) != -1) + /*else if ((p=line.tqfind("'type'")) != -1) { - p = line.find('\'',p+6)+1; - if (line.find("float",p) != -1 || line.find("int",p) != -1) + p = line.tqfind('\'',p+6)+1; + if (line.tqfind("float",p) != -1 || line.tqfind("int",p) != -1) isnumeric = true; else isnumeric = false; }*/ - else if ((p=line.find("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric) + else if ((p=line.tqfind("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric) { QString prefix = line.left(p+9); tout << prefix << " => '" << opt->valueText() << '\''; - if (line.find(',',p) != -1) + if (line.tqfind(',',p) != -1) tout << ','; tout << endl; continue; @@ -687,11 +687,11 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) } else if (line.startsWith("*Default")) { - int p = line.find(':',8); + int p = line.tqfind(':',8); keyword = line.mid(8,p-8); DrBase *bopt = 0; if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" ) - bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) ); + bopt = driver->findOption( TQString::tqfromLatin1( "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::fromLatin1( "printer-name" ) ); + req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::tqfromLatin1( "printer-name" ) ); if ( req.doRequest( "/printers/" ) ) setUpdatePossible( true ); else diff --git a/kdeprint/cups/kmpropusers.cpp b/kdeprint/cups/kmpropusers.cpp index 3f0792d9c..35d6f0fe1 100644 --- a/kdeprint/cups/kmpropusers.cpp +++ b/kdeprint/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(colorGroup().background()); + m_text->setPaper(tqcolorGroup().background()); m_text->setFrameStyle(TQFrame::NoFrame); QVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0); diff --git a/kdeprint/cups/kmwbanners.cpp b/kdeprint/cups/kmwbanners.cpp index 80a21a37c..7755e9774 100644 --- a/kdeprint/cups/kmwbanners.cpp +++ b/kdeprint/cups/kmwbanners.cpp @@ -70,7 +70,7 @@ TQString mapBanner( const TQString& ban ) if ( map.size() == 0 ) for ( int i=0; bannermap[ i ].banner; i++ ) map[ bannermap[ i ].banner ] = bannermap[ i ].name; - TQMap<TQString,TQString>::ConstIterator it = map.find( ban ); + TQMap<TQString,TQString>::ConstIterator it = map.tqfind( ban ); if ( it == map.end() ) return ban; else @@ -120,7 +120,7 @@ void KMWBanners::initPrinter(KMPrinter *p) m_bans = TQStringList::split(',',p->option("kde-banners-supported"),false); if (m_bans.count() == 0) m_bans = defaultBanners(); - if (m_bans.find("none") == m_bans.end()) + if (m_bans.tqfind("none") == m_bans.end()) m_bans.prepend("none"); for ( TQStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it ) { diff --git a/kdeprint/cups/kmwfax.cpp b/kdeprint/cups/kmwfax.cpp index ea5b98f3b..45cd502fd 100644 --- a/kdeprint/cups/kmwfax.cpp +++ b/kdeprint/cups/kmwfax.cpp @@ -48,7 +48,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) // initialize IppRequest req; req.setOperation(CUPS_GET_DEVICES); - QString uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + QString uri = TQString::tqfromLatin1("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::fromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("blockdevice"),TQString::tqfromLatin1(attr->values[0].string.text)); } attr = attr->next; } diff --git a/kdeprint/cups/kmwipp.cpp b/kdeprint/cups/kmwipp.cpp index c0d30c452..81bcf584c 100644 --- a/kdeprint/cups/kmwipp.cpp +++ b/kdeprint/cups/kmwipp.cpp @@ -41,7 +41,7 @@ KMWIpp::KMWIpp(TQWidget *parent, const char *name) "before continuing.</p>")); setLabel(0,i18n("Host:")); setLabel(1,i18n("Port:")); - setText( 1, TQString::fromLatin1( "631" ) ); + setText( 1, TQString::tqfromLatin1( "631" ) ); } bool KMWIpp::isValid(TQString& msg) diff --git a/kdeprint/cups/kmwippprinter.cpp b/kdeprint/cups/kmwippprinter.cpp index 4900a584b..b5f799fc5 100644 --- a/kdeprint/cups/kmwippprinter.cpp +++ b/kdeprint/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(colorGroup().background()); + m_info->setPaper(tqcolorGroup().background()); m_info->setMinimumHeight(100); m_info->setText(i18n("<p>Either enter the printer URI directly, or use the network scanning facility.</p>")); m_ippreport = new KPushButton(KGuiItem(i18n("&IPP Report"), "kdeprint_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::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2)); + uri = TQString::tqfromLatin1("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::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2))); + value.prepend(TQString::tqfromLatin1("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("<b>Model</b>: %1<br>").arg(value)); diff --git a/kdeprint/cups/kmwippselect.cpp b/kdeprint/cups/kmwippselect.cpp index fbfa597c7..38fff88df 100644 --- a/kdeprint/cups/kmwippselect.cpp +++ b/kdeprint/cups/kmwippselect.cpp @@ -75,16 +75,16 @@ void KMWIppSelect::initPrinter(KMPrinter *p) IppRequest req; QString uri; req.setOperation(CUPS_GET_PRINTERS); - uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); - req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("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("kdeprint_printer"),TQString::fromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("kdeprint_printer"),TQString::tqfromLatin1(attr->values[0].string.text)); attr = attr->next; } m_list->sort(); diff --git a/kdeprint/cups/kmwother.cpp b/kdeprint/cups/kmwother.cpp index 36e80c76d..f7c91cca0 100644 --- a/kdeprint/cups/kmwother.cpp +++ b/kdeprint/cups/kmwother.cpp @@ -89,7 +89,7 @@ void KMWOther::initPrinter(KMPrinter *p) TQString prt = *( ++it ); if ( !prt.isEmpty() ) desc.append( " [" + prt + "]" ); - TQListViewItem *parent = parents.find( cl ); + TQListViewItem *parent = parents.tqfind( cl ); if ( !parent ) { parent = new TQListViewItem( root, lastparent, cl ); @@ -105,7 +105,7 @@ void KMWOther::initPrinter(KMPrinter *p) lastparent = parent; parents.insert( cl, parent ); } - item = new TQListViewItem( parent, last.find( cl ), desc, uri); + item = new TQListViewItem( parent, last.tqfind( cl ), desc, uri); last.insert( cl, item ); } } diff --git a/kdeprint/cups/kpimagepage.cpp b/kdeprint/cups/kpimagepage.cpp index c4cf50e48..a1b519f59 100644 --- a/kdeprint/cups/kpimagepage.cpp +++ b/kdeprint/cups/kpimagepage.cpp @@ -192,7 +192,7 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) TQString whatsThisPreviewPositionImagePage = i18n( " <qt> " " <p><b>Position Preview Thumbnail</b></p> " " <p>This position preview thumbnail indicates the position of the image on the paper sheet. " - " <p>Click on horizontal and vertical radio buttons to move image alignment on paper around. Options are: " + " <p>Click on horizontal and vertical radio buttons to move image tqalignment on paper around. Options are: " " <ul> " " <li> center </li>" " <li> top </li>" @@ -313,7 +313,7 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) QRadioButton *left = new TQRadioButton(positionbox); QRadioButton *right = new TQRadioButton(positionbox); QRadioButton *hcenter = new TQRadioButton(positionbox); - QSize sz = bottom->sizeHint(); + QSize sz = bottom->tqsizeHint(); bottom->setFixedSize(sz); vcenter->setFixedSize(sz); top->setFixedSize(sz); diff --git a/kdeprint/cups/kptagspage.cpp b/kdeprint/cups/kptagspage.cpp index 7a1fd0924..b03f42e75 100644 --- a/kdeprint/cups/kptagspage.cpp +++ b/kdeprint/cups/kptagspage.cpp @@ -93,7 +93,7 @@ KPTagsPage::KPTagsPage(bool ro, TQWidget *parent, const char *name) QFont f = lab->font(); f.setBold(true); lab->setFont(f); - lab->setAlignment(AlignVCenter|AlignRight); + lab->tqsetAlignment(AlignVCenter|AlignRight); l0->addWidget(lab); } } @@ -110,7 +110,7 @@ bool KPTagsPage::isValid(TQString& msg) QString tag(m_tags->text(r, 0)); if (tag.isEmpty()) continue; - else if (tag.find(re) != -1) + else if (tag.tqfind(re) != -1) { msg = i18n("The tag name must not contain any spaces, tabs or quotes: <b>%1</b>.").arg(tag); return false; @@ -153,12 +153,12 @@ void KPTagsPage::getOptions(TQMap<TQString,TQString>& opts, bool) } } -TQSize KPTagsPage::sizeHint() const +TQSize KPTagsPage::tqsizeHint() const { return TQSize(-1, -1); } -TQSize KPTagsPage::minimumSizeHint() const +TQSize KPTagsPage::tqminimumSizeHint() const { return TQSize(-1, -1); } diff --git a/kdeprint/cups/kptagspage.h b/kdeprint/cups/kptagspage.h index 46b85c000..fc5c88046 100644 --- a/kdeprint/cups/kptagspage.h +++ b/kdeprint/cups/kptagspage.h @@ -34,8 +34,8 @@ public: void setOptions(const TQMap<TQString,TQString>& opts); bool isValid(TQString& msg); - TQSize sizeHint() const; - TQSize minimumSizeHint() const; + TQSize tqsizeHint() const; + TQSize tqminimumSizeHint() const; private: QTable *m_tags; diff --git a/kdeprint/cups/kptextpage.cpp b/kdeprint/cups/kptextpage.cpp index 75fc838cc..6aece51d2 100644 --- a/kdeprint/cups/kptextpage.cpp +++ b/kdeprint/cups/kptextpage.cpp @@ -212,7 +212,7 @@ KPTextPage::KPTextPage(DrMain *driver, TQWidget *parent, const char *name) m_prettypix = new TQLabel(prettybox); TQWhatsThis::add(m_prettypix, whatsThisPrettyprintPreviewIconTextPage); - m_prettypix->setAlignment(Qt::AlignCenter); + m_prettypix->tqsetAlignment(Qt::AlignCenter); QRadioButton *off = new TQRadioButton(i18n("&Disabled"), prettybox); TQWhatsThis::add(off, whatsThisPrettyprintButtonOffTextPage); QRadioButton *on = new TQRadioButton(i18n("&Enabled"), prettybox); diff --git a/kdeprint/driver.cpp b/kdeprint/driver.cpp index ce411f0a4..4250b96e7 100644 --- a/kdeprint/driver.cpp +++ b/kdeprint/driver.cpp @@ -224,7 +224,7 @@ void DrGroup::addObject(DrBase *optgrp) void DrGroup::removeOption(const TQString& name) { - DrBase *opt = m_options.find(name); + DrBase *opt = m_options.tqfind(name); if (opt) { m_listoptions.removeRef(opt); @@ -264,7 +264,7 @@ void DrGroup::createTree(DriverItem *parent) DrBase* DrGroup::findOption(const TQString& name, DrGroup **parentGroup) { - DrBase *opt = m_options.find(name); + DrBase *opt = m_options.tqfind(name); if (!opt) { TQPtrListIterator<DrGroup> it(m_subgroups); @@ -334,7 +334,7 @@ void DrGroup::flattenGroup(TQMap<TQString, DrBase*>& optmap, int& index) optmap[oit.current()->name()] = oit.current(); if (name().isEmpty()) - optmap[TQString::fromLatin1("group%1").arg(index++)] = this; + optmap[TQString::tqfromLatin1("group%1").arg(index++)] = this; else optmap[name()] = this; diff --git a/kdeprint/driver.h b/kdeprint/driver.h index a2ccab8a8..2ffacd1c2 100644 --- a/kdeprint/driver.h +++ b/kdeprint/driver.h @@ -159,7 +159,7 @@ public: DriverItem* createTreeView(TQListView *parent); void addConstraint(DrConstraint *c) { m_constraints.append(c); } int checkConstraints(); - DrPageSize* findPageSize(const TQString& name) { return m_pagesizes.find(name); } + DrPageSize* findPageSize(const TQString& name) { return m_pagesizes.tqfind(name); } void addPageSize(DrPageSize *sz); void removeOptionGlobally(const TQString& name); void removeGroupGlobally(DrGroup *grp); diff --git a/kdeprint/driveritem.cpp b/kdeprint/driveritem.cpp index 7bb1715aa..8bbfff6a4 100644 --- a/kdeprint/driveritem.cpp +++ b/kdeprint/driveritem.cpp @@ -46,7 +46,7 @@ void DriverItem::updateText() { QString s(m_item->get("text")); if (m_item->isOption()) - s.append(TQString::fromLatin1(": <%1>").arg(m_item->prettyText())); + s.append(TQString::tqfromLatin1(": <%1>").arg(m_item->prettyText())); if (m_item->type() == DrBase::List) { // remove all children: something has changed (otherwise this @@ -107,7 +107,7 @@ void DriverItem::paintCell(TQPainter *p, const TQColorGroup& cg, int, int width, p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s); w += w1; p->setPen(cg.text()); - s = TQString::fromLatin1(">"); + s = TQString::tqfromLatin1(">"); w1 = p->fontMetrics().width(s); p->drawText(w,0,w1,height(),Qt::AlignLeft|Qt::AlignVCenter,s); } @@ -133,7 +133,7 @@ bool DriverItem::updateConflict() m_conflict = (m_item->conflict()); } } - repaint(); + tqrepaint(); return m_conflict; } diff --git a/kdeprint/driveritem.h b/kdeprint/driveritem.h index 1d6fdcd4a..b9469be23 100644 --- a/kdeprint/driveritem.h +++ b/kdeprint/driveritem.h @@ -25,7 +25,7 @@ class DrBase; -class DriverItem : public QListViewItem +class DriverItem : public TQListViewItem { public: DriverItem(TQListView *parent, DrBase *item); diff --git a/kdeprint/driverview.h b/kdeprint/driverview.h index 59f72133b..421786c50 100644 --- a/kdeprint/driverview.h +++ b/kdeprint/driverview.h @@ -36,7 +36,7 @@ public: DrListView(TQWidget *parent = 0, const char *name = 0); }; -class KDEPRINT_EXPORT DriverView : public QWidget +class KDEPRINT_EXPORT DriverView : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/droptionview.h b/kdeprint/droptionview.h index a4334ad31..0e2775d2f 100644 --- a/kdeprint/droptionview.h +++ b/kdeprint/droptionview.h @@ -35,7 +35,7 @@ class TQListViewItem; class DrBase; class DriverItem; -class OptionBaseView : public QWidget +class OptionBaseView : public TQWidget { Q_OBJECT public: @@ -112,7 +112,7 @@ private: QStringList m_choices; }; -class DrOptionView : public QGroupBox +class DrOptionView : public TQGroupBox { Q_OBJECT public: diff --git a/kdeprint/foomatic/kfoomaticprinterimpl.cpp b/kdeprint/foomatic/kfoomaticprinterimpl.cpp index b72fbd191..7e47a505f 100644 --- a/kdeprint/foomatic/kfoomaticprinterimpl.cpp +++ b/kdeprint/foomatic/kfoomaticprinterimpl.cpp @@ -44,7 +44,7 @@ bool KFoomaticPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) QString exe = executable(); if (!exe.isEmpty()) { - cmd = exe + TQString::fromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd = exe + TQString::tqfromLatin1(" -P %1 -# %2").arg(quote(printer->printerName())).arg(printer->numCopies()); return true; } else diff --git a/kdeprint/foomatic/kmfoomaticmanager.cpp b/kdeprint/foomatic/kmfoomaticmanager.cpp index 57edf07c9..76ca31a4e 100644 --- a/kdeprint/foomatic/kmfoomaticmanager.cpp +++ b/kdeprint/foomatic/kmfoomaticmanager.cpp @@ -97,10 +97,10 @@ KMPrinter* KMFoomaticManager::createPrinterFromElement(TQDomElement *elem) printer->setName(e.text()); printer->setPrinterName(e.text()); printer->setState(KMPrinter::Idle); - /*if (printer->name().find('/') != -1) + /*if (printer->name().tqfind('/') != -1) { QString s(printer->name()); - int p = s.find('/'); + int p = s.tqfind('/'); printer->setPrinterName(s.left(p)); printer->setInstanceName(s.mid(p+1)); printer->addType(KMPrinter::Virtual); @@ -136,7 +136,7 @@ DrMain* KMFoomaticManager::createDriverFromXML(TQDomElement *elem) { driver->set("manufacturer", pelem.namedItem("make").toElement().text()); driver->set("model", pelem.namedItem("model").toElement().text()); - QString s = TQString::fromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text()); + QString s = TQString::tqfromLatin1("%1 %2 (%3)").arg(driver->get("manufacturer")).arg(driver->get("model")).arg(delem.namedItem("name").toElement().text()); driver->set("description", s); driver->set("text", s); diff --git a/kdeprint/foomatic2loader.cpp b/kdeprint/foomatic2loader.cpp index 4ca1464dd..ec26e5907 100644 --- a/kdeprint/foomatic2loader.cpp +++ b/kdeprint/foomatic2loader.cpp @@ -141,7 +141,7 @@ DrMain* Foomatic2Loader::buildDriver() const if ( m_foodata.isEmpty() ) return NULL; - TQVariant v = m_foodata.find( "VAR" ).data(); + TQVariant v = m_foodata.tqfind( "VAR" ).data(); if ( !v.isNull() && v.type() == TQVariant::Map ) { DrMain *driver = new DrMain; @@ -152,7 +152,7 @@ DrMain* Foomatic2Loader::buildDriver() const driver->set( "matic_driver", v.mapFind( "driver" ).data().toString() ); driver->set( "text", TQString( "%1 %2 (%3)" ).arg( driver->get( "manufacturer" ) ).arg( driver->get( "model" ) ).arg( driver->get( "matic_driver" ) ) ); if ( m_foodata.contains( "POSTPIPE" ) ) - driver->set( "postpipe", m_foodata.find( "POSTPIPE" ).data().toString() ); + driver->set( "postpipe", m_foodata.tqfind( "POSTPIPE" ).data().toString() ); v = v.mapFind( "args" ).data(); if ( !v.isNull() && v.type() == TQVariant::List ) { @@ -211,7 +211,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const TQValueList<DrBase*> optList; DrGroup *grp = NULL; - TQVariant V = m_foodata.find( "VAR" ).data(); + TQVariant V = m_foodata.tqfind( "VAR" ).data(); if ( !V.isNull() && V.type() == TQVariant::Map ) { TQVariant v = V.mapFind( "args" ).data(); diff --git a/kdeprint/kdeprintcheck.cpp b/kdeprint/kdeprintcheck.cpp index 5c807ae9b..114477191 100644 --- a/kdeprint/kdeprintcheck.cpp +++ b/kdeprint/kdeprintcheck.cpp @@ -101,8 +101,8 @@ bool KdeprintChecker::checkConfig(const KURL& url) const char* const *p = config_stddirs; while (*p) { - // kdDebug( 500 ) << "checkConfig() with " << TQString::fromLatin1( *p ) + f << endl; - if ( TQFile::exists( TQString::fromLatin1( *p ) + f ) ) + // kdDebug( 500 ) << "checkConfig() with " << TQString::tqfromLatin1( *p ) + f << endl; + if ( TQFile::exists( TQString::tqfromLatin1( *p ) + f ) ) { state = true; break; diff --git a/kdeprint/kdeprintd.cpp b/kdeprint/kdeprintd.cpp index 198147463..9a4964cac 100644 --- a/kdeprint/kdeprintd.cpp +++ b/kdeprint/kdeprintd.cpp @@ -66,11 +66,11 @@ StatusWindow::StatusWindow(int pid) : TQWidget(NULL, "StatusWindow", WType_TopLevel|WStyle_DialogBorder|WStyle_StaysOnTop|WDestructiveClose), m_pid(pid) { m_label = new TQLabel(this); - m_label->setAlignment(AlignCenter); + m_label->tqsetAlignment(AlignCenter); m_button = new KPushButton(KStdGuiItem::close(), this); m_icon = new TQLabel(this); m_icon->setPixmap(DesktopIcon("fileprint")); - m_icon->setAlignment(AlignCenter); + m_icon->tqsetAlignment(AlignCenter); KWin::setIcons(winId(), *(m_icon->pixmap()), SmallIcon("fileprint")); QGridLayout *l0 = new TQGridLayout(this, 2, 3, 10, 10); l0->setRowStretch(0, 1); @@ -86,8 +86,8 @@ void StatusWindow::setMessage(const TQString& msg) { //QSize oldSz = size(); m_label->setText(msg); - //QSize sz = m_label->sizeHint(); - //sz += TQSize(layout()->margin()*2, layout()->margin()*2+layout()->spacing()+m_button->sizeHint().height()); + //QSize sz = m_label->tqsizeHint(); + //sz += TQSize(layout()->margin()*2, layout()->margin()*2+layout()->spacing()+m_button->tqsizeHint().height()); // dialog will never be smaller //sz = sz.expandedTo(oldSz); //resize(sz); @@ -192,7 +192,7 @@ bool KDEPrintd::checkFiles(TQString& cmd, const TQStringList& files) void KDEPrintd::statusMessage(const TQString& msg, int pid, const TQString& appName) { - StatusWindow *w = m_windows.find(pid); + StatusWindow *w = m_windows.tqfind(pid); if (!w && !msg.isEmpty()) { w = new StatusWindow(pid); diff --git a/kdeprint/kfilelist.cpp b/kdeprint/kfilelist.cpp index c61f3b948..a8402e8ce 100644 --- a/kdeprint/kfilelist.cpp +++ b/kdeprint/kfilelist.cpp @@ -263,7 +263,7 @@ void KFileList::slotOpenFile() } } -TQSize KFileList::sizeHint() const +TQSize KFileList::tqsizeHint() const { return TQSize(100, 100); } diff --git a/kdeprint/kfilelist.h b/kdeprint/kfilelist.h index ca4d925c8..667938d29 100644 --- a/kdeprint/kfilelist.h +++ b/kdeprint/kfilelist.h @@ -28,7 +28,7 @@ class KListView; class TQToolButton; class TQListViewItem; -class KFileList : public QWidget +class KFileList : public TQWidget { Q_OBJECT public: @@ -37,7 +37,7 @@ public: void setFileList(const TQStringList&); TQStringList fileList() const; - TQSize sizeHint() const; + TQSize tqsizeHint() const; protected slots: void slotAddFile(); diff --git a/kdeprint/kmdbentry.cpp b/kdeprint/kmdbentry.cpp index 9402dd02c..87bb76c6c 100644 --- a/kdeprint/kmdbentry.cpp +++ b/kdeprint/kmdbentry.cpp @@ -43,13 +43,13 @@ bool KMDBEntry::validate(bool checkIt) // check manufacturer if (manufacturer.isEmpty()) { - int p = model.find(' ',0); + int p = model.tqfind(' ',0); if (p != -1) manufacturer = model.left(p); if (manufacturer.isEmpty()) return false; } // extract manufacturer from model - if (model.find(manufacturer,0,false) == 0) + if (model.tqfind(manufacturer,0,false) == 0) { model = model.right(model.length()-manufacturer.length()-1).stripWhiteSpace(); if (model.isEmpty()) return false; diff --git a/kdeprint/kmfactory.cpp b/kdeprint/kmfactory.cpp index 96397adc4..aa696490f 100644 --- a/kdeprint/kmfactory.cpp +++ b/kdeprint/kmfactory.cpp @@ -213,7 +213,7 @@ void KMFactory::loadFactory(const TQString& syst) if (sys.isEmpty()) // load default configured print plugin sys = printSystem(); - QString libname = TQString::fromLatin1("kdeprint_%1").arg(sys); + QString libname = TQString::tqfromLatin1("kdeprint_%1").arg(sys); m_factory = KLibLoader::self()->factory(TQFile::encodeName(libname)); if (!m_factory) { @@ -311,7 +311,7 @@ KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name) { QString path(name); if (path[0] != '/') - path = locate("data", TQString::fromLatin1("kdeprint/plugins/%1.print").arg(name)); + path = locate("data", TQString::tqfromLatin1("kdeprint/plugins/%1.print").arg(name)); KSimpleConfig conf(path); PluginInfo info; @@ -363,7 +363,7 @@ TQString KMFactory::autoDetect() currentPrecedence = plugins[i].detectPrecedence; } } - return (pluginIndex == -1 ? TQString::fromLatin1("lpdunix") : plugins[pluginIndex].name); + return (pluginIndex == -1 ? TQString::tqfromLatin1("lpdunix") : plugins[pluginIndex].name); } void KMFactory::slot_pluginChanged(pid_t pid) diff --git a/kdeprint/kmjob.cpp b/kdeprint/kmjob.cpp index 0576303e2..5c904538b 100644 --- a/kdeprint/kmjob.cpp +++ b/kdeprint/kmjob.cpp @@ -75,7 +75,7 @@ TQString KMJob::pixmap() { // special case if (m_type == KMJob::Threaded) - return TQString::fromLatin1("exec"); + return TQString::tqfromLatin1("exec"); // normal case QString str("kdeprint_job"); diff --git a/kdeprint/kmjobmanager.cpp b/kdeprint/kmjobmanager.cpp index afbca7a2f..fcc7d1a00 100644 --- a/kdeprint/kmjobmanager.cpp +++ b/kdeprint/kmjobmanager.cpp @@ -214,7 +214,7 @@ void KMJobManager::validatePluginActions(KActionCollection*, const TQPtrList<KMJ void KMJobManager::addPrinter(const TQString& pr, KMJobManager::JobType type, bool isSpecial) { - struct JobFilter *jf = m_filter.find(pr); + struct JobFilter *jf = m_filter.tqfind(pr); if (!jf) { jf = new JobFilter; @@ -226,7 +226,7 @@ void KMJobManager::addPrinter(const TQString& pr, KMJobManager::JobType type, bo void KMJobManager::removePrinter(const TQString& pr, KMJobManager::JobType type) { - struct JobFilter *jf = m_filter.find(pr); + struct JobFilter *jf = m_filter.tqfind(pr); if (jf) { jf->m_type[type] = QMAX(0, jf->m_type[type]-1); diff --git a/kdeprint/kmjobmanager.h b/kdeprint/kmjobmanager.h index 643be34d1..8b95bf7ac 100644 --- a/kdeprint/kmjobmanager.h +++ b/kdeprint/kmjobmanager.h @@ -43,7 +43,7 @@ class KAction; * if you're a KDEPrint developer. The API might change in the * future and binary compatibility might be broken. */ -class KDEPRINT_EXPORT KMJobManager : public QObject +class KDEPRINT_EXPORT KMJobManager : public TQObject { Q_OBJECT diff --git a/kdeprint/kmmanager.cpp b/kdeprint/kmmanager.cpp index ec161d755..675e31bf2 100644 --- a/kdeprint/kmmanager.cpp +++ b/kdeprint/kmmanager.cpp @@ -268,7 +268,7 @@ TQPtrList<KMPrinter>* KMManager::printerList(bool reload) // - use the PRINTER variable if (!softDefault()) { - KMPrinter *defprinter = findPrinter(TQString::fromLatin1(getenv("PRINTER"))); + KMPrinter *defprinter = findPrinter(TQString::tqfromLatin1(getenv("PRINTER"))); if (defprinter) setSoftDefault(defprinter); } @@ -475,7 +475,7 @@ TQStringList KMManager::detectLocalPrinters() { QStringList list; for (int i=0; i<3; i++) - list << TQString::null << TQString::fromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString::null; + list << TQString::null << TQString::tqfromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString::null; return list; } diff --git a/kdeprint/kmmanager.h b/kdeprint/kmmanager.h index 8826273a0..ecdacba06 100644 --- a/kdeprint/kmmanager.h +++ b/kdeprint/kmmanager.h @@ -45,7 +45,7 @@ class PrinterFilter; * if you're a KDEPrint developer. The API might change in the * future and binary compatibility might be broken. */ -class KDEPRINT_EXPORT KMManager : public QObject +class KDEPRINT_EXPORT KMManager : public TQObject { Q_OBJECT diff --git a/kdeprint/kmprinter.cpp b/kdeprint/kmprinter.cpp index 5749a47c5..e612c2717 100644 --- a/kdeprint/kmprinter.cpp +++ b/kdeprint/kmprinter.cpp @@ -216,7 +216,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent) TQString KMPrinter::deviceProtocol() const { - int p = m_device.find( ':' ); + int p = m_device.tqfind( ':' ); if ( p != -1 ) return m_device.left( p ); else diff --git a/kdeprint/kmspecialmanager.cpp b/kdeprint/kmspecialmanager.cpp index 7ccebedff..bb2caea24 100644 --- a/kdeprint/kmspecialmanager.cpp +++ b/kdeprint/kmspecialmanager.cpp @@ -66,7 +66,7 @@ bool KMSpecialManager::savePrinters() conf.setGroup("General"); int n = conf.readNumEntry("Number",0); for (int i=0;i<n;i++) - conf.deleteGroup(TQString::fromLatin1("Printer %1").arg(i),true); + conf.deleteGroup(TQString::tqfromLatin1("Printer %1").arg(i),true); // then add printers n = 0; @@ -74,7 +74,7 @@ bool KMSpecialManager::savePrinters() for (;it.current();++it) { if (!it.current()->isSpecial() || it.current()->isVirtual()) continue; - conf.setGroup(TQString::fromLatin1("Printer %1").arg(n)); + conf.setGroup(TQString::tqfromLatin1("Printer %1").arg(n)); conf.writeEntry("Name",it.current()->name()); conf.writeEntry("Description",it.current()->description()); conf.writeEntry("Comment",it.current()->location()); @@ -139,7 +139,7 @@ bool KMSpecialManager::loadDesktopFile(const TQString& filename) int n = conf.readNumEntry("Number",0); for (int i=0;i<n;i++) { - QString grpname = TQString::fromLatin1("Printer %1").arg(i); + QString grpname = TQString::tqfromLatin1("Printer %1").arg(i); if (!conf.hasGroup(grpname)) continue; conf.setGroup(grpname); KMPrinter *printer = new KMPrinter; diff --git a/kdeprint/kmspecialmanager.h b/kdeprint/kmspecialmanager.h index f8619a6f9..47adec6b2 100644 --- a/kdeprint/kmspecialmanager.h +++ b/kdeprint/kmspecialmanager.h @@ -28,7 +28,7 @@ class KMManager; class KXmlCommand; class DrMain; -class KMSpecialManager : public QObject +class KMSpecialManager : public TQObject { public: KMSpecialManager(KMManager *parent, const char *name = 0); diff --git a/kdeprint/kmthreadjob.cpp b/kdeprint/kmthreadjob.cpp index bea9382db..43dcda831 100644 --- a/kdeprint/kmthreadjob.cpp +++ b/kdeprint/kmthreadjob.cpp @@ -106,7 +106,7 @@ bool KMThreadJob::checkJob(int ID) KMJob* KMThreadJob::findJob(int ID) { - return m_jobs.find(ID); + return m_jobs.tqfind(ID); } KMJob* KMThreadJob::findJob(const TQString& uri) @@ -115,7 +115,7 @@ KMJob* KMThreadJob::findJob(const TQString& uri) { int pid = uri.mid(6).toInt(); if (pid > 0) - return m_jobs.find(pid); + return m_jobs.tqfind(pid); } return NULL; } @@ -150,7 +150,7 @@ void KMThreadJob::createJob(KMJob *job) if (job->id() > 0) { loadJobs(); - if (!m_jobs.find(job->id())) + if (!m_jobs.tqfind(job->id())) { m_jobs.insert(job->id(),job); saveJobs(); diff --git a/kdeprint/kmthreadjob.h b/kdeprint/kmthreadjob.h index 3d2e6cf2f..b4eedfbfd 100644 --- a/kdeprint/kmthreadjob.h +++ b/kdeprint/kmthreadjob.h @@ -26,7 +26,7 @@ class KMJob; class KMJobManager; -class KMThreadJob : public QObject +class KMThreadJob : public TQObject { public: KMThreadJob(TQObject *parent = 0, const char *name = 0); diff --git a/kdeprint/kmuimanager.h b/kdeprint/kmuimanager.h index 3c6a74719..478dbc0df 100644 --- a/kdeprint/kmuimanager.h +++ b/kdeprint/kmuimanager.h @@ -33,7 +33,7 @@ class KPrinterPropertyDialog; class KMConfigDialog; class TQListView; -class KDEPRINT_EXPORT KMUiManager : public QObject +class KDEPRINT_EXPORT KMUiManager : public TQObject { Q_OBJECT public: diff --git a/kdeprint/kpcopiespage.cpp b/kdeprint/kpcopiespage.cpp index 1a7756913..994e9ea61 100644 --- a/kdeprint/kpcopiespage.cpp +++ b/kdeprint/kpcopiespage.cpp @@ -186,7 +186,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) m_order = new TQCheckBox(i18n("Re&verse"), m_copybox); TQWhatsThis::add(m_order, whatsThisReverseLabel); m_collatepix = new TQLabel(m_copybox); - m_collatepix->setAlignment(Qt::AlignCenter); + m_collatepix->tqsetAlignment(Qt::AlignCenter); m_collatepix->setMinimumHeight(70); QLabel *m_copieslabel = new TQLabel(i18n("Cop&ies:"), m_copybox); m_copies = new TQSpinBox(m_copybox); @@ -336,7 +336,7 @@ void KPCopiesPage::getOptions(TQMap<TQString,TQString>& options, bool incldef) options["kde-collate"] = (m_collate->isChecked() ? "Collate" : "Uncollate"); // ranges options["kde-current"] = (m_current->isChecked() ? "1" : "0"); - options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? TQString::fromLatin1("1-") : TQString::fromLatin1(""))); + options["kde-range"] = (m_range->isChecked() ? m_rangeedit->text() : (incldef ? TQString::tqfromLatin1("1-") : TQString::tqfromLatin1(""))); // page set options["kde-pageset"] = TQString::number(m_pageset->currentItem()); } diff --git a/kdeprint/kpfilterpage.cpp b/kdeprint/kpfilterpage.cpp index d7906a290..882a81923 100644 --- a/kdeprint/kpfilterpage.cpp +++ b/kdeprint/kpfilterpage.cpp @@ -295,7 +295,7 @@ void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts) TQDictIterator<KXmlCommand> dit(m_activefilters); for (;dit.current();) { - if (filters.find(dit.currentKey()) == filters.end()) + if (filters.tqfind(dit.currentKey()) == filters.end()) m_activefilters.remove(dit.currentKey()); else { @@ -309,7 +309,7 @@ void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts) for (TQStringList::ConstIterator sit=filters.begin(); sit!=filters.end(); ++sit) { KXmlCommand *f(0); - if ((f=m_activefilters.find(*sit)) == 0) + if ((f=m_activefilters.tqfind(*sit)) == 0) { f = KXmlCommandManager::self()->loadCommand(*sit); if (f) @@ -329,7 +329,7 @@ void KPFilterPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) QStringList filters = activeList(); for (TQStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it) { - KXmlCommand *f = m_activefilters.find(*it); + KXmlCommand *f = m_activefilters.tqfind(*it); if (f) f->getOptions(opts, incldef); } @@ -355,7 +355,7 @@ KXmlCommand* KPFilterPage::currentFilter() { KXmlCommand *filter(0); if (m_view->selectedItem()) - filter = m_activefilters.find(m_view->selectedItem()->text(1)); + filter = m_activefilters.tqfind(m_view->selectedItem()->text(1)); return filter; } @@ -367,10 +367,10 @@ void KPFilterPage::checkFilterChain() while (item) { item->setPixmap(0, (ok ? SmallIcon("filter") : SmallIcon("filterstop"))); - KXmlCommand *f1 = m_activefilters.find(item->text(1)); + KXmlCommand *f1 = m_activefilters.tqfind(item->text(1)); if (f1 && item->nextSibling()) { - KXmlCommand *f2 = m_activefilters.find(item->nextSibling()->text(1)); + KXmlCommand *f2 = m_activefilters.tqfind(item->nextSibling()->text(1)); if (f2) { if (!f2->acceptMimeType(f1->mimeType())) diff --git a/kdeprint/kpgeneralpage.cpp b/kdeprint/kpgeneralpage.cpp index 73f21f4af..bd7c42283 100644 --- a/kdeprint/kpgeneralpage.cpp +++ b/kdeprint/kpgeneralpage.cpp @@ -261,15 +261,15 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const // widget creation QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this); - m_pagesizelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight); + m_pagesizelabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); TQWhatsThis::add(m_pagesizelabel, whatsThisGeneralPageSizeLabel); QLabel *m_papertypelabel = new TQLabel(i18n("Paper t&ype:"), this); - m_papertypelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight); + m_papertypelabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); TQWhatsThis::add(m_papertypelabel, whatsThisGeneralPaperTypeLabel); QLabel *m_inputslotlabel = new TQLabel(i18n("Paper so&urce:"), this); - m_inputslotlabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight); + m_inputslotlabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); TQWhatsThis::add(m_inputslotlabel, whatsThisGeneralPaperSourceLabel); m_pagesize = new TQComboBox(this); @@ -304,19 +304,19 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const m_portrait->setChecked(true); m_orientpix = new TQLabel(m_orientbox); - m_orientpix->setAlignment(Qt::AlignCenter); + m_orientpix->tqsetAlignment(Qt::AlignCenter); QRadioButton *m_dupnone = new TQRadioButton(i18n("duplex orientation", "&None"), m_duplexbox); QRadioButton *m_duplong = new TQRadioButton(i18n("duplex orientation", "Lon&g side"), m_duplexbox); QRadioButton *m_dupshort = new TQRadioButton(i18n("duplex orientation", "S&hort side"), m_duplexbox); m_dupnone->setChecked(true); m_duplexpix = new TQLabel(m_duplexbox); - m_duplexpix->setAlignment(Qt::AlignCenter); + m_duplexpix->tqsetAlignment(Qt::AlignCenter); QRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox); QRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox); QRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox); m_nup1->setChecked(true); m_nuppix = new TQLabel(m_nupbox); - m_nuppix->setAlignment(Qt::AlignCenter); + m_nuppix->tqsetAlignment(Qt::AlignCenter); m_startbanner = new TQComboBox(m_bannerbox); m_endbanner = new TQComboBox(m_bannerbox); QLabel *m_startbannerlabel = new TQLabel(i18n("S&tart:"), m_bannerbox); diff --git a/kdeprint/kpipeprocess.h b/kdeprint/kpipeprocess.h index 966838d53..8cf3dbf30 100644 --- a/kdeprint/kpipeprocess.h +++ b/kdeprint/kpipeprocess.h @@ -25,7 +25,7 @@ #include <kdelibs_export.h> -class KDEPRINT_EXPORT KPipeProcess : public QFile +class KDEPRINT_EXPORT KPipeProcess : public TQFile { public: KPipeProcess(const TQString& cmd = TQString::null, int mode = IO_ReadOnly); diff --git a/kdeprint/kpposterpage.cpp b/kdeprint/kpposterpage.cpp index fa4b1481b..bc95bfa10 100644 --- a/kdeprint/kpposterpage.cpp +++ b/kdeprint/kpposterpage.cpp @@ -194,7 +194,7 @@ KPPosterPage::KPPosterPage( TQWidget *parent, const char *name ) m_lockbtn->setToggleButton( true ); m_lockbtn->setPixmap( SmallIcon( "encrypted" ) ); m_lockbtn->setOn( true ); - m_lockbtn->setFixedSize( m_lockbtn->sizeHint() ); + m_lockbtn->setFixedSize( m_lockbtn->tqsizeHint() ); TQToolTip::add( m_lockbtn, i18n( "Link/unlink poster and print size" ) ); for ( int i=0; i<KPrinter::NPageSize-1; i++ ) @@ -265,7 +265,7 @@ void KPPosterPage::setOptions( const TQMap<TQString,TQString>& opts ) m_mediasize->setText( ps ); m_preview->setMediaSize( ps ); - if ( opts[ "_kde-filters" ].find( "poster" ) != -1 ) + if ( opts[ "_kde-filters" ].tqfind( "poster" ) != -1 ) { m_postercheck->setChecked( true ); ps = opts[ "_kde-poster-size" ]; diff --git a/kdeprint/kpqtpage.cpp b/kdeprint/kpqtpage.cpp index c6d19a506..b13ba8d6d 100644 --- a/kdeprint/kpqtpage.cpp +++ b/kdeprint/kpqtpage.cpp @@ -116,7 +116,7 @@ void KPQtPage::init() m_pagesize = new TQComboBox(this); TQWhatsThis::add(m_pagesize, whatsThisPageSizeOtPageLabel); QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this); - m_pagesizelabel->setAlignment(Qt::AlignVCenter|Qt::AlignRight); + m_pagesizelabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); m_pagesizelabel->setBuddy(m_pagesize); m_orientbox = new TQButtonGroup(0, Qt::Vertical, i18n("Orientation"), this); TQWhatsThis::add(m_orientbox, whatsThisOrientationOtPageLabel); @@ -129,7 +129,7 @@ void KPQtPage::init() TQWhatsThis::add(m_landscape, whatsThisOrientationOtPageLabel); m_orientpix = new TQLabel(m_orientbox); - m_orientpix->setAlignment(Qt::AlignCenter); + m_orientpix->tqsetAlignment(Qt::AlignCenter); TQWhatsThis::add(m_orientpix, whatsThisOrientationOtPageLabel); QRadioButton *m_color = new TQRadioButton(i18n("Colo&r"), m_colorbox); @@ -137,7 +137,7 @@ void KPQtPage::init() QRadioButton *m_grayscale = new TQRadioButton(i18n("&Grayscale"), m_colorbox); m_colorpix = new TQLabel(m_colorbox); - m_colorpix->setAlignment(Qt::AlignCenter); + m_colorpix->tqsetAlignment(Qt::AlignCenter); TQWhatsThis::add(m_colorpix, whatsThisColorModeOtPageLabel); m_nupbox = new TQButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this); @@ -152,7 +152,7 @@ void KPQtPage::init() TQWhatsThis::add(m_nupother, whatsThisPagesPerSheetOtPageLabel); m_nuppix = new TQLabel(m_nupbox); - m_nuppix->setAlignment(Qt::AlignCenter); + m_nuppix->tqsetAlignment(Qt::AlignCenter); TQWhatsThis::add(m_nuppix, whatsThisPagesPerSheetOtPageLabel); // layout creation @@ -268,7 +268,7 @@ void KPQtPage::setOptions(const TQMap<TQString,TQString>& opts) else if (!opts["kde-pagesize"].isEmpty()) m_pagesize->setCurrentItem(findIndex(opts["kde-pagesize"].toInt())); ID = NUP_1; - if (opts["_kde-filters"].find("psnup") != -1) + if (opts["_kde-filters"].tqfind("psnup") != -1) { if (opts.contains("_kde-psnup-nup")) { ID = opts["_kde-psnup-nup"].toInt(); @@ -323,7 +323,7 @@ void KPQtPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) else if (ID != NUP_OTHER) { int nup(ID == NUP_2 ? 2 : 4); - if (s.find("psnup") == -1) + if (s.tqfind("psnup") == -1) { QStringList fl = TQStringList::split(',', s, false); KXmlCommandManager::self()->insertCommand(fl, "psnup"); diff --git a/kdeprint/kprintaction.cpp b/kdeprint/kprintaction.cpp index 4e62e791b..8b51ccfb6 100644 --- a/kdeprint/kprintaction.cpp +++ b/kdeprint/kprintaction.cpp @@ -31,33 +31,33 @@ public: KPrintActionPrivate() { type = All; - parentWidget = 0; + tqparentWidget = 0; } PrinterType type; QStringList printers; - TQWidget *parentWidget; + TQWidget *tqparentWidget; }; -KPrintAction::KPrintAction(const TQString& text, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) +KPrintAction::KPrintAction(const TQString& text, PrinterType type, TQWidget *tqparentWidget, TQObject *parent, const char *name) : KActionMenu(text, parent, name) { d = new KPrintActionPrivate(); - initialize(type, parentWidget); + initialize(type, tqparentWidget); } -KPrintAction::KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) +KPrintAction::KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type, TQWidget *tqparentWidget, TQObject *parent, const char *name) : KActionMenu(text, icon, parent, name) { d = new KPrintActionPrivate(); - initialize(type, parentWidget); + initialize(type, tqparentWidget); } -KPrintAction::KPrintAction(const TQString& text, const TQString& icon, PrinterType type, TQWidget *parentWidget, TQObject *parent, const char *name) +KPrintAction::KPrintAction(const TQString& text, const TQString& icon, PrinterType type, TQWidget *tqparentWidget, TQObject *parent, const char *name) : KActionMenu(text, icon, parent, name) { d = new KPrintActionPrivate(); - initialize(type, parentWidget); + initialize(type, tqparentWidget); } KPrintAction::~KPrintAction() @@ -65,13 +65,13 @@ KPrintAction::~KPrintAction() delete d; } -void KPrintAction::initialize(PrinterType type, TQWidget *parentWidget) +void KPrintAction::initialize(PrinterType type, TQWidget *tqparentWidget) { connect(popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); connect(popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int))); d->type = type; - d->parentWidget = parentWidget; + d->tqparentWidget = tqparentWidget; } void KPrintAction::slotAboutToShow() @@ -105,26 +105,26 @@ void KPrintAction::slotActivated(int ID) { KPrinter printer(false); KMPrinter *mprt = KMManager::self()->findPrinter(d->printers[ID]); - if (mprt && mprt->autoConfigure(&printer, d->parentWidget)) + if (mprt && mprt->autoConfigure(&printer, d->tqparentWidget)) { // emit the signal emit print(&printer); } } -KPrintAction* KPrintAction::exportAll(TQWidget *parentWidget, TQObject *parent, const char *name) +KPrintAction* KPrintAction::exportAll(TQWidget *tqparentWidget, TQObject *parent, const char *name) { - return new KPrintAction(i18n("&Export..."), All, parentWidget, parent, (name ? name : "export_all")); + return new KPrintAction(i18n("&Export..."), All, tqparentWidget, parent, (name ? name : "export_all")); } -KPrintAction* KPrintAction::exportRegular(TQWidget *parentWidget, TQObject *parent, const char *name) +KPrintAction* KPrintAction::exportRegular(TQWidget *tqparentWidget, TQObject *parent, const char *name) { - return new KPrintAction(i18n("&Export..."), Regular, parentWidget, parent, (name ? name : "export_regular")); + return new KPrintAction(i18n("&Export..."), Regular, tqparentWidget, parent, (name ? name : "export_regular")); } -KPrintAction* KPrintAction::exportSpecial(TQWidget *parentWidget, TQObject *parent, const char *name) +KPrintAction* KPrintAction::exportSpecial(TQWidget *tqparentWidget, TQObject *parent, const char *name) { - return new KPrintAction(i18n("&Export..."), Specials, parentWidget, parent, (name ? name : "export_special")); + return new KPrintAction(i18n("&Export..."), Specials, tqparentWidget, parent, (name ? name : "export_special")); } #include "kprintaction.moc" diff --git a/kdeprint/kprintaction.h b/kdeprint/kprintaction.h index eb23d6e31..b9ba54add 100644 --- a/kdeprint/kprintaction.h +++ b/kdeprint/kprintaction.h @@ -30,14 +30,14 @@ class KDEPRINT_EXPORT KPrintAction : public KActionMenu public: enum PrinterType { All, Regular, Specials }; - KPrintAction(const TQString& text, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0); - KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0); - KPrintAction(const TQString& text, const TQString& icon, PrinterType type = All, TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0); + KPrintAction(const TQString& text, PrinterType type = All, TQWidget *tqparentWidget = 0, TQObject *parent = 0, const char *name = 0); + KPrintAction(const TQString& text, const TQIconSet& icon, PrinterType type = All, TQWidget *tqparentWidget = 0, TQObject *parent = 0, const char *name = 0); + KPrintAction(const TQString& text, const TQString& icon, PrinterType type = All, TQWidget *tqparentWidget = 0, TQObject *parent = 0, const char *name = 0); virtual ~KPrintAction(); - static KPrintAction* exportAll(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0); - static KPrintAction* exportRegular(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0); - static KPrintAction* exportSpecial(TQWidget *parentWidget = 0, TQObject *parent = 0, const char *name = 0); + static KPrintAction* exportAll(TQWidget *tqparentWidget = 0, TQObject *parent = 0, const char *name = 0); + static KPrintAction* exportRegular(TQWidget *tqparentWidget = 0, TQObject *parent = 0, const char *name = 0); + static KPrintAction* exportSpecial(TQWidget *tqparentWidget = 0, TQObject *parent = 0, const char *name = 0); signals: void print(KPrinter*); @@ -47,7 +47,7 @@ protected slots: void slotActivated(int); protected: - void initialize(PrinterType type, TQWidget *parentWidget); + void initialize(PrinterType type, TQWidget *tqparentWidget); private: class KPrintActionPrivate; diff --git a/kdeprint/kprintdialog.cpp b/kdeprint/kprintdialog.cpp index c84472677..a2b67c344 100644 --- a/kdeprint/kprintdialog.cpp +++ b/kdeprint/kprintdialog.cpp @@ -546,7 +546,7 @@ void KPrintDialog::initialize(KPrinter *printer) TQPtrList<KMPrinter> *plist = KMFactory::self()->manager()->printerList(); if (!KMManager::self()->errorMsg().isEmpty()) { - KMessageBox::error(parentWidget(), + KMessageBox::error(tqparentWidget(), "<qt><nobr>"+ i18n("An error occurred while retrieving the printer list:") +"</nobr><br><br>"+KMManager::self()->errorMsg()+"</qt>"); @@ -568,7 +568,7 @@ void KPrintDialog::initialize(KPrinter *printer) if (!sep && it.current()->isSpecial()) { sep = true; - d->m_printers->insertItem(TQPixmap(), TQString::fromLatin1("--------")); + d->m_printers->insertItem(TQPixmap(), TQString::tqfromLatin1("--------")); } d->m_printers->insertItem(SmallIcon(it.current()->pixmap(),0,(it.current()->isValid() ? (int)KIcon::DefaultState : (int)KIcon::LockOverlay)),it.current()->name(),false/*sep*/); if (it.current()->isSoftDefault()) @@ -863,7 +863,7 @@ void KPrintDialog::expandDialog(bool on) if (on) { - sz.setHeight(sz.height()+d->m_dummy->minimumSize().height()+d->m_plugin->minimumSize().height()+2*layout()->spacing()); + sz.setHeight(sz.height()+d->m_dummy->tqminimumSize().height()+d->m_plugin->tqminimumSize().height()+2*layout()->spacing()); if (isVisible() || !d->m_dummy->isVisible() || !d->m_plugin->isVisible()) { d->m_dummy->show(); @@ -934,7 +934,7 @@ void KPrintDialog::slotUpdatePossible( bool flag ) { MessageWindow::remove( this ); if ( !flag ) - KMessageBox::error(parentWidget(), + KMessageBox::error(tqparentWidget(), "<qt><nobr>"+ i18n("An error occurred while retrieving the printer list:") +"</nobr><br><br>"+KMManager::self()->errorMsg()+"</qt>"); diff --git a/kdeprint/kprintdialogpage.h b/kdeprint/kprintdialogpage.h index 70416d18f..1802eb6ec 100644 --- a/kdeprint/kprintdialogpage.h +++ b/kdeprint/kprintdialogpage.h @@ -87,7 +87,7 @@ class DrMain; * @short Base class for customized print dialog pages. * @see KPrinter */ -class KDEPRINT_EXPORT KPrintDialogPage : public QWidget +class KDEPRINT_EXPORT KPrintDialogPage : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/kprinter.cpp b/kdeprint/kprinter.cpp index c96db7a8d..34e215a8e 100644 --- a/kdeprint/kprinter.cpp +++ b/kdeprint/kprinter.cpp @@ -486,7 +486,7 @@ TQValueList<int> KPrinter::pageList() const QStringList ranges = TQStringList::split(',',option("kde-range"),false); for (TQStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it) { - int p = (*it).find('-'); + int p = (*it).tqfind('-'); bool ok; if (p == -1) { @@ -519,7 +519,7 @@ TQValueList<int> KPrinter::pageList() const if (pageOrder() == LastPageFirst) { for (uint i=0;i<(list.count()/2);i++) - qSwap(list[i],list[list.count()-1-i]); + tqSwap(list[i],list[list.count()-1-i]); } // select page set if needed @@ -846,7 +846,7 @@ int KPrinter::toPage() const { return (option("kde-topage").isEmpty() ? 0 : option("kde-topage").toInt()); } void KPrinter::setFromTo(int m, int M) -{ setOption("kde-frompage",TQString::number(m)); setOption("kde-topage",TQString::number(M)); setOption("kde-range",(m>0 && M>0 ? TQString("%1-%2").arg(m).arg(M) : TQString::fromLatin1(""))); } +{ setOption("kde-frompage",TQString::number(m)); setOption("kde-topage",TQString::number(M)); setOption("kde-range",(m>0 && M>0 ? TQString("%1-%2").arg(m).arg(M) : TQString::tqfromLatin1(""))); } // if no page size defined, use the localized one KPrinter::PageSize KPrinter::pageSize() const @@ -880,16 +880,16 @@ void KPrinter::setPrintProgram(const TQString& prg) else { QString s(prg); - if (s.find("%in") == -1) + if (s.tqfind("%in") == -1) s.append(" %in"); - setOutputToFile( s.find( "%out" ) != -1 ); + setOutputToFile( s.tqfind( "%out" ) != -1 ); setOption("kde-isspecial", "1"); setOption("kde-special-command", s); } } TQString KPrinter::printerSelectionOption() const -{ return TQString::fromLatin1(""); } +{ return TQString::tqfromLatin1(""); } void KPrinter::setPrinterSelectionOption(const TQString&) {} diff --git a/kdeprint/kprinterimpl.cpp b/kdeprint/kprinterimpl.cpp index 94750b607..61c5bdc5f 100644 --- a/kdeprint/kprinterimpl.cpp +++ b/kdeprint/kprinterimpl.cpp @@ -252,7 +252,7 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T QString command(cmd), filestr; QStringList printfiles; - if (command.find("%in") == -1) command.append(" %in"); + if (command.tqfind("%in") == -1) command.append(" %in"); for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) if (TQFile::exists(*it)) @@ -379,7 +379,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ for (TQStringList::Iterator it=files.begin(); it!=files.end(); ++it) { QString mime = KMimeMagic::self()->findFileType(*it)->mimeType(); - if (inputMimeTypes.find(mime) == inputMimeTypes.end()) + if (inputMimeTypes.tqfind(mime) == inputMimeTypes.end()) { if (KMessageBox::warningContinueCancel(0, "<p>" + i18n("The MIME type %1 is not supported as input of the filter chain " @@ -508,7 +508,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool TQString::null, i18n("Convert"), i18n("Keep"), - TQString::fromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes) + TQString::tqfromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes) { // find the filter chain QStringList flist = KXmlCommandManager::self()->autoConvert(mime, primaryMimeType); diff --git a/kdeprint/kprinterimpl.h b/kdeprint/kprinterimpl.h index ae6b8b75d..b06d77706 100644 --- a/kdeprint/kprinterimpl.h +++ b/kdeprint/kprinterimpl.h @@ -31,7 +31,7 @@ class KPrinter; class KMPrinter; -class KDEPRINT_EXPORT KPrinterImpl : public QObject +class KDEPRINT_EXPORT KPrinterImpl : public TQObject { Q_OBJECT public: diff --git a/kdeprint/kprintpreview.cpp b/kdeprint/kprintpreview.cpp index 5ad8a428f..ec2ea0a37 100644 --- a/kdeprint/kprintpreview.cpp +++ b/kdeprint/kprintpreview.cpp @@ -111,7 +111,7 @@ static KLibFactory* componentFactory() factory = KLibLoader::self()->factory("libkghostviewpart"); if( factory ) return factory; - KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null); + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("application/postscript"), TQString::tqfromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null); for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { KService::Ptr service = *it; diff --git a/kdeprint/kxmlcommand.cpp b/kdeprint/kxmlcommand.cpp index 27f8c6642..db707a120 100644 --- a/kdeprint/kxmlcommand.cpp +++ b/kdeprint/kxmlcommand.cpp @@ -161,7 +161,7 @@ void KXmlCommand::setMimeType(const TQString& s) bool KXmlCommand::acceptMimeType(const TQString& s) { check(); - return (d->m_inputMime.find(s) != d->m_inputMime.end()); + return (d->m_inputMime.tqfind(s) != d->m_inputMime.end()); } TQStringList KXmlCommand::inputMimeTypes() @@ -383,7 +383,7 @@ TQString KXmlCommand::buildCommand(const TQMap<TQString,TQString>& opts, bool pi { QString format = dopt->get("format"); TQString value = dopt->valueText(); - if ( format.find( quotedRe ) != -1 ) + if ( format.tqfind( quotedRe ) != -1 ) { if ( ( value.right( 1 ) == "'" && value.left( 1 ) == "'" ) || ( value.right( 1 ) == "\"" && value.left( 1 ) == "\"" ) ) @@ -463,7 +463,7 @@ void KXmlCommand::saveXml() TQDomElement KXmlCommand::createIO(TQDomDocument& doc, int n, const TQString& tag) { QDomElement elem = doc.createElement(tag); - if (d->m_command.find("%"+tag) != -1) + if (d->m_command.tqfind("%"+tag) != -1) { for (int i=0; i<2; i++) { @@ -632,7 +632,7 @@ TQStringList KXmlCommandManager::commandList() for (TQStringList::ConstIterator it2=list.begin(); it2!=list.end(); ++it2) { QString cmdName = (*it2).left((*it2).length()-8); - if (d->m_cmdlist.find(cmdName) == d->m_cmdlist.end()) + if (d->m_cmdlist.tqfind(cmdName) == d->m_cmdlist.end()) d->m_cmdlist.append(cmdName); } } @@ -791,12 +791,12 @@ bool KXmlCommandManager::checkCommand(const TQString& xmlId, int inputCheck, int QString cmd = (xmlCmd ? xmlCmd->command() : xmlId); if (status && !cmd.isEmpty() && (inputCheck > None || outputCheck > None)) { - if (inputCheck > None && (cmd.find("%in") == -1 || inputCheck == Advanced) && cmd.find("%filterinput") == -1) + if (inputCheck > None && (cmd.tqfind("%in") == -1 || inputCheck == Advanced) && cmd.tqfind("%filterinput") == -1) { status = false; errmsg = i18n("The command does not contain the required tag %1.").arg(inputCheck == Advanced ? "%filterinput" : "{%in,%filterinput}"); } - if (status && outputCheck > None && (cmd.find("%out") == -1 || outputCheck == Advanced) && cmd.find("filteroutput") == -1) + if (status && outputCheck > None && (cmd.tqfind("%out") == -1 || outputCheck == Advanced) && cmd.tqfind("filteroutput") == -1) { status = false; errmsg = i18n("The command does not contain the required tag %1.").arg(outputCheck == Advanced ? "%filteroutput" : "{%out,%filteroutput}"); diff --git a/kdeprint/kxmlcommand.h b/kdeprint/kxmlcommand.h index c6e4c25fc..e24266f49 100644 --- a/kdeprint/kxmlcommand.h +++ b/kdeprint/kxmlcommand.h @@ -30,7 +30,7 @@ class DrMain; class DrGroup; class DrBase; -class KDEPRINT_EXPORT KXmlCommand : public QObject +class KDEPRINT_EXPORT KXmlCommand : public TQObject { friend class KXmlCommandManager; @@ -86,7 +86,7 @@ private: KXmlCommandPrivate *d; }; -class KDEPRINT_EXPORT KXmlCommandManager : public QObject +class KDEPRINT_EXPORT KXmlCommandManager : public TQObject { public: enum IO_CheckType { None = 0, Basic, Advanced }; diff --git a/kdeprint/lpd/gschecker.cpp b/kdeprint/lpd/gschecker.cpp index 8f23fcc32..012d3cd4d 100644 --- a/kdeprint/lpd/gschecker.cpp +++ b/kdeprint/lpd/gschecker.cpp @@ -48,12 +48,12 @@ void GsChecker::loadDriverList() line = t.readLine().stripWhiteSpace(); if (ok) { - if (line.find(':') != -1) + if (line.tqfind(':') != -1) break; else buffer.append(line).append(" "); } - else if (line.startsWith(TQString::fromLatin1("Available devices:"))) + else if (line.startsWith(TQString::tqfromLatin1("Available devices:"))) ok = true; } m_driverlist = TQStringList::split(' ',buffer,false); diff --git a/kdeprint/lpd/gschecker.h b/kdeprint/lpd/gschecker.h index 65f247380..1814ca1d7 100644 --- a/kdeprint/lpd/gschecker.h +++ b/kdeprint/lpd/gschecker.h @@ -24,7 +24,7 @@ #include <tqstringlist.h> #include <tqobject.h> -class GsChecker : public QObject +class GsChecker : public TQObject { public: GsChecker(TQObject *parent = 0, const char *name = 0); diff --git a/kdeprint/lpd/klpdprinterimpl.cpp b/kdeprint/lpd/klpdprinterimpl.cpp index 8a04927e6..8b365cbd1 100644 --- a/kdeprint/lpd/klpdprinterimpl.cpp +++ b/kdeprint/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::fromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies()); + cmd = TQString::tqfromLatin1("%1 -P %2 '-#%3'").arg(exestr).arg(quote(printer->printerName())).arg(printer->numCopies()); return true; } diff --git a/kdeprint/lpd/kmlpdmanager.cpp b/kdeprint/lpd/kmlpdmanager.cpp index 95623a56f..e5e641b68 100644 --- a/kdeprint/lpd/kmlpdmanager.cpp +++ b/kdeprint/lpd/kmlpdmanager.cpp @@ -65,12 +65,12 @@ KMLpdManager::~KMLpdManager() TQString KMLpdManager::driverDbCreationProgram() { - return TQString::fromLatin1("make_driver_db_lpd"); + return TQString::tqfromLatin1("make_driver_db_lpd"); } TQString KMLpdManager::driverDirectory() { - return TQString::fromLatin1("/usr/lib/rhs/rhs-printfilters"); + return TQString::tqfromLatin1("/usr/lib/rhs/rhs-printfilters"); } bool KMLpdManager::completePrinter(KMPrinter *printer) @@ -80,7 +80,7 @@ bool KMLpdManager::completePrinter(KMPrinter *printer) bool KMLpdManager::completePrinterShort(KMPrinter *printer) { - PrintcapEntry *entry = m_entries.find(printer->name()); + PrintcapEntry *entry = m_entries.tqfind(printer->name()); if (entry) { QString type(entry->comment(2)), driver(entry->comment(7)), lp(entry->arg("lp")); @@ -91,11 +91,11 @@ bool KMLpdManager::completePrinterShort(KMPrinter *printer) KURL url; if (!entry->arg("rm").isEmpty()) { - url = TQString::fromLatin1("lpd://%1/%2").arg(entry->arg("rm")).arg(entry->arg("rp")); + url = TQString::tqfromLatin1("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::fromLatin1("parallel:%1").arg(lp); + url = TQString::tqfromLatin1("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::fromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]); + url = TQString::tqfromLatin1("smb://%1/%2").arg(l[0]).arg(l[1]); else - url = TQString::fromLatin1("smb://%1/%2/%3").arg(map["workgroup"]).arg(l[0]).arg(l[1]); + url = TQString::tqfromLatin1("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::fromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]); + url = TQString::tqfromLatin1("socket://%1:%2").arg(map["printer_ip"]).arg(map["port"]); else if (type == "NCP") { - url = TQString::fromLatin1("ncp://%1/%2").arg(map["server"]).arg(map["queue"]); + url = TQString::tqfromLatin1("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::fromLatin1("")); + ent->m_args["rp"] = printer->device().path().replace("/",TQString::tqfromLatin1("")); ent->m_args["lpd_bounce"] = "true"; - ent->m_comment = TQString::fromLatin1("##PRINTTOOL3## REMOTE"); + ent->m_comment = TQString::tqfromLatin1("##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::fromLatin1("%1/etc/printcap").arg(lpdprefix)); + loadPrintcapFile(TQString::tqfromLatin1("%1/etc/printcap").arg(lpdprefix)); TQDictIterator<PrintcapEntry> it(m_entries); for (;it.current();++it) @@ -299,11 +299,11 @@ void KMLpdManager::checkStatus() line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - if ((p=line.find(':')) != -1) + if ((p=line.tqfind(':')) != -1) printer = findPrinter(line.left(p)); else if (line.startsWith("printing") && printer) - printer->setState(line.find("enabled") != -1 ? KMPrinter::Idle : KMPrinter::Stopped); - else if (line.find("entries") != -1 && printer) + printer->setState(line.tqfind("enabled") != -1 ? KMPrinter::Idle : KMPrinter::Stopped); + else if (line.tqfind("entries") != -1 && printer) if (!line.startsWith("no") && printer->state() == KMPrinter::Idle) printer->setState(KMPrinter::Processing); } @@ -312,7 +312,7 @@ void KMLpdManager::checkStatus() bool KMLpdManager::writePrinters() { - if (!writePrintcapFile(TQString::fromLatin1("%1/etc/printcap").arg(lpdprefix))) + if (!writePrintcapFile(TQString::tqfromLatin1("%1/etc/printcap").arg(lpdprefix))) { setErrorMsg(i18n("Unable to write printcap file.")); return false; @@ -367,7 +367,7 @@ PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const TQString& name) { if (m_ptentries.count() == 0) loadPrinttoolDb(driverDirectory()+"/printerdb"); - PrinttoolEntry *ent = m_ptentries.find(name); + PrinttoolEntry *ent = m_ptentries.tqfind(name); if (!ent) setErrorMsg(i18n("Couldn't find driver <b>%1</b> in printtool database.").arg(name)); return ent; @@ -406,7 +406,7 @@ DrMain* KMLpdManager::loadDbDriver(KMDBEntry *entry) PrintcapEntry* KMLpdManager::findPrintcapEntry(const TQString& name) { - PrintcapEntry *ent = m_entries.find(name); + PrintcapEntry *ent = m_entries.tqfind(name); if (!ent) setErrorMsg(i18n("Couldn't find printer <b>%1</b> in printcap file.").arg(name)); return ent; @@ -471,7 +471,7 @@ TQMap<TQString,TQString> KMLpdManager::loadPrinttoolCfgFile(const TQString& file break; if (line.startsWith("export ")) line.replace(0,7,""); - if ((p=line.find('=')) != -1) + if ((p=line.tqfind('=')) != -1) { name = line.left(p); val = line.right(line.length()-p-1); @@ -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::fromLatin1("")); + fname.replace(TQRegExp("\\.in$"),TQString::tqfromLatin1("")); QFile fin(templatefile); QFile fout(dirname + "/" + fname); if (fin.exists() && fin.open(IO_ReadOnly) && fout.open(IO_WriteOnly)) @@ -508,9 +508,9 @@ bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQSt if (line.startsWith("export ")) { tout << "export "; - line.replace(0,7,TQString::fromLatin1("")); + line.replace(0,7,TQString::tqfromLatin1("")); } - if ((p=line.find('=')) != -1) + if ((p=line.tqfind('=')) != -1) { name = line.left(p); tout << name << '=' << options[name] << endl; @@ -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::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"); + 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"); 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::fromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer)); + entry->m_comment = TQString::tqfromLatin1("##PRINTTOOL3## %1").arg(ptPrinterType(printer)); if (prot == "smb" || prot == "ncp" || prot == "socket") { - entry->m_args["af"] = sd+TQString::fromLatin1("/acct"); - QFile f(sd+TQString::fromLatin1("/.config")); + entry->m_args["af"] = sd+TQString::tqfromLatin1("/acct"); + QFile f(sd+TQString::tqfromLatin1("/.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::fromLatin1("/directprint"); + entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/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::fromLatin1("")) << '\'' << endl; - entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/smbprint"); + t << "workgroup='" << (l.count() == 2 ? dev.host() : TQString::tqfromLatin1("")) << '\'' << endl; + entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/smbprint"); } else if (prot == "ncp") { t << "server=" << dev.host() << endl; - t << "queue=" << dev.path().replace("/",TQString::fromLatin1("")) << endl; + t << "queue=" << dev.path().replace("/",TQString::tqfromLatin1("")) << endl; t << "user=" << dev.user() << endl; t << "password=" << dev.pass() << endl; - entry->m_args["if"] = driverDirectory()+TQString::fromLatin1("/ncpprint"); + entry->m_args["if"] = driverDirectory()+TQString::tqfromLatin1("/ncpprint"); } } else return false; - entry->m_args["lp"] = TQString::fromLatin1("/dev/null"); + entry->m_args["lp"] = TQString::tqfromLatin1("/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::fromLatin1("/var/spool/lpd/")+entry->m_name; + entry->m_args["sd"] = TQString::tqfromLatin1("/var/spool/lpd/")+entry->m_name; QString sd = entry->arg("sd"); if (!KStandardDirs::exists(sd)) { diff --git a/kdeprint/lpd/lpdtools.cpp b/kdeprint/lpd/lpdtools.cpp index 3b1651337..ee919ff95 100644 --- a/kdeprint/lpd/lpdtools.cpp +++ b/kdeprint/lpd/lpdtools.cpp @@ -60,7 +60,7 @@ TQString nextWord(const TQString& s, int& pos) if (s[p1] == '{') { p1++; - p2 = s.find('}',p1); + p2 = s.tqfind('}',p1); } else { @@ -81,12 +81,12 @@ bool PrintcapEntry::readLine(const TQString& line) m_name = l[0]; int p(-1); // discard aliases - if ((p=m_name.find('|')) != -1) + if ((p=m_name.tqfind('|')) != -1) m_name = m_name.left(p); m_args.clear(); for (uint i=1; i<l.count(); i++) { - int p = l[i].find('='); + int p = l[i].tqfind('='); if (p == -1) p = 2; QString key = l[i].left(p); QString value = l[i].right(l[i].length()-(l[i][p] == '=' ? p+1 : p)); @@ -140,22 +140,22 @@ KMPrinter* PrintcapEntry::createPrinter() TQStringList splitPrinttoolLine(const TQString& line) { QStringList l; - int p = line.find(':'); + int p = line.tqfind(':'); if (p != -1) { l.append(line.left(p)); - p = line.find('{',p); + p = line.tqfind('{',p); if (p == -1) l.append(line.right(line.length()-l[0].length()-1).stripWhiteSpace()); else { while (p != -1) { - int q = line.find('}',p); + int q = line.tqfind('}',p); if (q != -1) { l.append(line.mid(p+1,q-p-1)); - p = line.find('{',q); + p = line.tqfind('{',q); } else break; } @@ -257,11 +257,11 @@ DrMain* PrinttoolEntry::createDriver() for (int i=0;it.current();++it,i++) { ch = new DrBase; - ch->setName(TQString::fromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->setName(TQString::tqfromLatin1("%1x%2").arg(it.current()->xdpi).arg(it.current()->ydpi)); if (it.current()->comment.isEmpty()) - ch->set("text",TQString::fromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->set("text",TQString::tqfromLatin1("%1x%2 DPI").arg(it.current()->xdpi).arg(it.current()->ydpi)); else - ch->set("text",TQString::fromLatin1("%2x%3 DPI (%1)").arg(it.current()->comment).arg(it.current()->xdpi).arg(it.current()->ydpi)); + ch->set("text",TQString::tqfromLatin1("%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::fromLatin1("-dBitsPerPixel=%1").arg(it.current()->bpp)); + ch->setName(TQString::tqfromLatin1("-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::fromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment)); + ch->set("text",TQString::tqfromLatin1("%1 - %2").arg(it.current()->bpp).arg(it.current()->comment)); lopt->addChoice(ch); } QString defval = lopt->choices()->first()->name(); 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..1adb21ccb 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()); } @@ -199,7 +199,7 @@ void KMLpdUnixManager::parseEtcPrintcap() if (entry.contains("all")) { // find separator - int p = entry["all"].find(TQRegExp("[^a-zA-Z0-9_\\s-]")); + int p = entry["all"].tqfind(TQRegExp("[^a-zA-Z0-9_\\s-]")); if (p != -1) { QChar c = entry["all"][p]; @@ -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)); } diff --git a/kdeprint/lpr/apshandler.cpp b/kdeprint/lpr/apshandler.cpp index fc6ade276..526edaf49 100644 --- a/kdeprint/lpr/apshandler.cpp +++ b/kdeprint/lpr/apshandler.cpp @@ -50,8 +50,8 @@ bool ApsHandler::validate(PrintcapEntry *entry) KMPrinter* ApsHandler::createPrinter(PrintcapEntry *entry) { - entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); - entry->postcomment = TQString::fromLatin1("# APS%1_END - don't delete this").arg(m_counter); + entry->comment = TQString::tqfromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); + entry->postcomment = TQString::tqfromLatin1("# APS%1_END - don't delete this").arg(m_counter); m_counter++; return LprHandler::createPrinter(entry); } @@ -148,7 +148,7 @@ TQMap<TQString,TQString> ApsHandler::loadVarFile(const TQString& filename) while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); - if (line.isEmpty() || line[0] == '#' || (p = line.find('=')) == -1) + if (line.isEmpty() || line[0] == '#' || (p = line.tqfind('=')) == -1) continue; QString variable = line.left(p).stripWhiteSpace(); QString value = line.mid(p+1).stripWhiteSpace(); @@ -187,7 +187,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config DrMain* ApsHandler::loadDbDriver(const TQString& s) { - int p = s.find('/'); + int p = s.tqfind('/'); DrMain *driver = loadApsDriver(true); if (driver) driver->set("gsdriver", s.mid(p+1)); @@ -309,8 +309,8 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) entry->addField("af", Field::String, sd + "/acct"); entry->addField("lf", Field::String, sd + "/log"); entry->addField("if", Field::String, sysconfDir() + "/basedir/bin/apsfilter"); - entry->comment = TQString::fromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); - entry->postcomment = TQString::fromLatin1("# APS%1_END").arg(m_counter); + entry->comment = TQString::tqfromLatin1("# APS%1_BEGIN:printer%2").arg(m_counter).arg(m_counter); + entry->postcomment = TQString::tqfromLatin1("# APS%1_END").arg(m_counter); m_counter++; return entry; } diff --git a/kdeprint/lpr/klprprinterimpl.cpp b/kdeprint/lpr/klprprinterimpl.cpp index 1d77b166c..9f0956ff3 100644 --- a/kdeprint/lpr/klprprinterimpl.cpp +++ b/kdeprint/lpr/klprprinterimpl.cpp @@ -41,7 +41,7 @@ bool KLprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) if (!printer || m_exepath.isEmpty()) return false; - cmd = TQString::fromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() ); + cmd = TQString::tqfromLatin1("%1 -P %1 '-#%1'").arg(m_exepath).arg(quote(printer->printerName())).arg( printer->numCopies() ); QString opts = static_cast<KMLprManager*>(KMManager::self())->printOptions(printer); if (!opts.isEmpty()) cmd += (" " + opts); @@ -53,7 +53,7 @@ void KLprPrinterImpl::broadcastOption(const TQString& key, const TQString& value KPrinterImpl::broadcastOption(key,value); if (key == "kde-pagesize") { - QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); + QString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); KPrinterImpl::broadcastOption("PageSize",pagename); } } diff --git a/kdeprint/lpr/kmlprmanager.cpp b/kdeprint/lpr/kmlprmanager.cpp index 65b08eb67..008674a78 100644 --- a/kdeprint/lpr/kmlprmanager.cpp +++ b/kdeprint/lpr/kmlprmanager.cpp @@ -160,7 +160,7 @@ LprHandler* KMLprManager::findHandler(KMPrinter *prt) { QString handlerstr(prt->option("kde-lpr-handler")); LprHandler *handler(0); - if (handlerstr.isEmpty() || (handler = m_handlers.find(handlerstr)) == NULL) + if (handlerstr.isEmpty() || (handler = m_handlers.tqfind(handlerstr)) == NULL) { return NULL; } @@ -169,7 +169,7 @@ LprHandler* KMLprManager::findHandler(KMPrinter *prt) PrintcapEntry* KMLprManager::findEntry(KMPrinter *prt) { - PrintcapEntry *entry = m_entries.find(prt->printerName()); + PrintcapEntry *entry = m_entries.tqfind(prt->printerName()); if (!entry) { return NULL; @@ -230,9 +230,9 @@ DrMain* KMLprManager::loadPrinterDriver(KMPrinter *prt, bool config) DrMain* KMLprManager::loadFileDriver(const TQString& filename) { - int p = filename.find('/'); - QString handler_str = (p != -1 ? filename.left(p) : TQString::fromLatin1("default")); - LprHandler *handler = m_handlers.find(handler_str); + int p = filename.tqfind('/'); + QString handler_str = (p != -1 ? filename.left(p) : TQString::tqfromLatin1("default")); + LprHandler *handler = m_handlers.tqfind(handler_str); if (handler) { DrMain *driver = handler->loadDbDriver(filename); @@ -311,7 +311,7 @@ bool KMLprManager::savePrintcapFile() bool KMLprManager::createPrinter(KMPrinter *prt) { // remove existing printcap entry - PrintcapEntry *oldEntry = m_entries.find(prt->printerName()); + PrintcapEntry *oldEntry = m_entries.tqfind(prt->printerName()); // look for the handler and re-create entry LprHandler *handler(0); @@ -320,11 +320,11 @@ bool KMLprManager::createPrinter(KMPrinter *prt) // or we use the handler of the existing printer // (modifying something else, handler stays the same) if (prt->driver()) - handler = m_handlers.find(prt->driver()->get("handler")); + handler = m_handlers.tqfind(prt->driver()->get("handler")); else if (oldEntry) handler = findHandler(prt); else - handler = m_handlers.find("default"); + handler = m_handlers.tqfind("default"); if (!handler) { setErrorMsg(i18n("Internal error: no handler defined.")); @@ -422,7 +422,7 @@ bool KMLprManager::removePrinter(KMPrinter *prt) TQString KMLprManager::driverDbCreationProgram() { - return TQString::fromLatin1("make_driver_db_lpr"); + return TQString::tqfromLatin1("make_driver_db_lpr"); } TQString KMLprManager::driverDirectory() diff --git a/kdeprint/lpr/lpchelper.cpp b/kdeprint/lpr/lpchelper.cpp index 516e85af3..fb39a37f9 100644 --- a/kdeprint/lpr/lpchelper.cpp +++ b/kdeprint/lpr/lpchelper.cpp @@ -82,26 +82,26 @@ void LpcHelper::parseStatusLPR(TQTextStream &t) line = t.readLine(); if (line.isEmpty()) continue; - else if (!line[0].isSpace() && (p = line.find(':')) != -1) + else if (!line[0].isSpace() && (p = line.tqfind(':')) != -1) { printer = line.left(p); m_state[printer] = KMPrinter::Idle; } - else if (line.find("printing is disabled") != -1) + else if (line.tqfind("printing is disabled") != -1) { if (!printer.isEmpty()) m_state[printer] = KMPrinter::PrinterState((KMPrinter::Stopped) | (m_state[printer] & ~KMPrinter::StateMask)); } - else if (line.find("queuing is disabled") != -1) + else if (line.tqfind("queuing is disabled") != -1) { if (!printer.isEmpty()) m_state[printer] = KMPrinter::PrinterState((KMPrinter::Rejecting) | (m_state[printer] & KMPrinter::StateMask)); } - else if (line.find("entries") != -1) + else if (line.tqfind("entries") != -1) { if (!printer.isEmpty() && (m_state[printer] & KMPrinter::StateMask) != KMPrinter::Stopped && - line.find("no entries") == -1) + line.tqfind("no entries") == -1) m_state[printer] = KMPrinter::PrinterState((m_state[printer] & ~KMPrinter::StateMask) | KMPrinter::Processing); } } @@ -121,7 +121,7 @@ void LpcHelper::parseStatusLPRng(TQTextStream& t) l = TQStringList::split(TQRegExp("\\s"), t.readLine(), false); if (l.count() < 4) continue; - p = l[0].find('@'); + p = l[0].tqfind('@'); if (p == 0) printer = l[0]; else @@ -206,11 +206,11 @@ static TQString lprngAnswer(const TQString& result, const TQString& printer) { int p, q; - p = result.find("\n" + printer); + p = result.tqfind("\n" + printer); if (p != -1) { - q = result.find(':', p)+2; - p = result.find('\n', q); + q = result.tqfind(':', p)+2; + p = result.tqfind('\n', q); QString answer = result.mid(q, p-q).stripWhiteSpace(); return answer; } @@ -274,9 +274,9 @@ bool LpcHelper::removeJob(KMJob *job, TQString& msg) return false; } QString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id())); - if (result.find("dequeued") != -1) + if (result.tqfind("dequeued") != -1) return true; - else if (result.find("Permission denied") != -1 || result.find("no permissions") != -1) + else if (result.tqfind("Permission denied") != -1 || result.tqfind("no permissions") != -1) msg = i18n("Permission denied."); else msg = i18n("Execution of lprm failed: %1").arg(result); diff --git a/kdeprint/lpr/lpchelper.h b/kdeprint/lpr/lpchelper.h index d7e6c7897..2c711f41b 100644 --- a/kdeprint/lpr/lpchelper.h +++ b/kdeprint/lpr/lpchelper.h @@ -27,7 +27,7 @@ class KMJob; -class LpcHelper : public QObject +class LpcHelper : public TQObject { public: LpcHelper(TQObject *parent = 0, const char *name = 0); diff --git a/kdeprint/lpr/lpqhelper.cpp b/kdeprint/lpr/lpqhelper.cpp index 2675c9d41..aa8e19879 100644 --- a/kdeprint/lpr/lpqhelper.cpp +++ b/kdeprint/lpr/lpqhelper.cpp @@ -46,7 +46,7 @@ KMJob* LpqHelper::parseLineLpr(const TQString& line) job->setOwner(line.mid(7, 11).stripWhiteSpace()); job->setId(line.mid(18, 5).toInt()); job->setName(line.mid(23, 38).stripWhiteSpace()); - int p = line.find(' ', 61); + int p = line.tqfind(' ', 61); if (p != -1) { job->setSize(line.mid(61, p-61).toInt() / 1000); @@ -61,14 +61,14 @@ KMJob* LpqHelper::parseLineLPRng(const TQString& line) return NULL; KMJob *job = new KMJob; job->setState((rank[0].isDigit() ? KMJob::Queued : (rank == "hold" ? KMJob::Held : KMJob::Printing))); - int p = line.find('@', 7), q = line.find(' ', 7); + int p = line.tqfind('@', 7), q = line.tqfind(' ', 7); job->setOwner(line.mid(7, QMIN(p,q)-7)); while (line[q].isSpace()) q++; q++; while (line[q].isSpace()) q++; - p = line.find(' ', q); + p = line.tqfind(' ', q); job->setId(line.mid(q, p-q).toInt()); while (line[p].isSpace()) p++; diff --git a/kdeprint/lpr/lpqhelper.h b/kdeprint/lpr/lpqhelper.h index b41521f66..d79903f57 100644 --- a/kdeprint/lpr/lpqhelper.h +++ b/kdeprint/lpr/lpqhelper.h @@ -25,7 +25,7 @@ class KMJob; -class LpqHelper : public QObject +class LpqHelper : public TQObject { public: LpqHelper(TQObject *parent = 0, const char *name = 0); diff --git a/kdeprint/lpr/lprhandler.cpp b/kdeprint/lpr/lprhandler.cpp index 600df4796..4a2a96b0f 100644 --- a/kdeprint/lpr/lprhandler.cpp +++ b/kdeprint/lpr/lprhandler.cpp @@ -61,7 +61,7 @@ bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool) KURL uri; if (!val.isEmpty() && val != "/dev/null") { - int p = val.find('@'); + int p = val.tqfind('@'); if (p != -1) { prt->setLocation(i18n("Remote queue (%1) on %2").arg(val.left(p)).arg(val.mid(p+1))); @@ -69,7 +69,7 @@ bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool) uri.setHost(val.mid(p+1)); uri.setPath("/" + val.left(p)); } - else if ((p = val.find('%')) != -1) + else if ((p = val.tqfind('%')) != -1) { prt->setLocation(i18n("Network printer (%1)").arg("socket")); uri.setProtocol("socket"); diff --git a/kdeprint/lpr/lprngtoolhandler.cpp b/kdeprint/lpr/lprngtoolhandler.cpp index 3710496a9..624b74114 100644 --- a/kdeprint/lpr/lprngtoolhandler.cpp +++ b/kdeprint/lpr/lprngtoolhandler.cpp @@ -40,7 +40,7 @@ LPRngToolHandler::LPRngToolHandler(KMManager *mgr) bool LPRngToolHandler::validate(PrintcapEntry *entry) { if (entry->comment.startsWith("##LPRNGTOOL##") && - entry->comment.find("UNKNOWN") == -1) + entry->comment.tqfind("UNKNOWN") == -1) return true; return false; } @@ -82,14 +82,14 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo if (!(str=entry->field("ifhp")).isEmpty()) { QString model; - int p = str.find("model"); + int p = str.tqfind("model"); if (p != -1) { - p = str.find('=', p); + p = str.tqfind('=', p); if (p != -1) { p++; - int q = str.find(',', p); + int q = str.tqfind(',', p); if (q == -1) model = str.mid(p); else @@ -142,7 +142,7 @@ void LPRngToolHandler::loadAuthFile(const TQString& filename, TQString& user, TQ line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - int p = line.find('='); + int p = line.tqfind('='); if (p != -1) { QString key = line.left(p); @@ -182,7 +182,7 @@ DrMain* LPRngToolHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool DrMain* LPRngToolHandler::loadDbDriver(const TQString& s) { - int p = s.find('/'); + int p = s.tqfind('/'); DrMain* driver = loadToolDriver(locate("data", "kdeprint/lprngtooldriver1")); if (driver) driver->set("driverID", s.mid(p+1)); @@ -209,13 +209,13 @@ TQValueList< QPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(con key = TQString::null; if (line.contains('|') == 2 || line.right(7) == "BOOLEAN") { - int p = line.find('|', 7); + int p = line.tqfind('|', 7); key = line.mid(7, p-7); } } else if (line.startsWith("CHOICE")) { - int p = line.find('|', 7); + int p = line.tqfind('|', 7); l << line.mid(7, p-7); } } @@ -239,7 +239,7 @@ TQMap<TQString,TQString> LPRngToolHandler::parseZOptions(const TQString& optstr) bool found(false); for (TQValueList< QPair<TQString,TQStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p) { - if ((*p).second.find(*it) != (*p).second.end()) + if ((*p).second.tqfind(*it) != (*p).second.end()) { opts[(*p).first] = (*it); found = true; @@ -308,7 +308,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) QString work, server, printer, user, passwd; if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) ) { - entry->addField("xfer_options", Field::String, TQString::fromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work)); + entry->addField("xfer_options", Field::String, TQString::tqfromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work)); QFile authfile(LprSettings::self()->baseSpoolDir() + "/" + prt->printerName() + "/auth"); if (authfile.open(IO_WriteOnly)) { @@ -331,8 +331,8 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) DrMain *driver = prt->driver(); comment.append("filtertype=IFHP ifhp_options=status@,sync@,pagecount@,waitend@ printerdb_entry="); comment.append(driver->get("driverID")); - entry->addField("ifhp", Field::String, TQString::fromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID"))); - entry->addField("lprngtooloptions", Field::String, TQString::fromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID"))); + entry->addField("ifhp", Field::String, TQString::tqfromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID"))); + entry->addField("lprngtooloptions", Field::String, TQString::tqfromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID"))); TQMap<TQString,TQString> opts; QString optstr; driver->getOptions(opts, false); diff --git a/kdeprint/lpr/matichandler.cpp b/kdeprint/lpr/matichandler.cpp index f3f0d4cdc..9f830c821 100644 --- a/kdeprint/lpr/matichandler.cpp +++ b/kdeprint/lpr/matichandler.cpp @@ -85,7 +85,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh { prt->setLocation(i18n("Local printer on %1").arg(val)); KURL url(val); - if (val.find("usb") != -1) + if (val.tqfind("usb") != -1) url.setProtocol("usb"); else url.setProtocol("parallel"); @@ -104,7 +104,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh KURL url ( parsePostpipe(postpipe) ); if (!url.isEmpty()) { - QString ds = TQString::fromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol()); + QString ds = TQString::tqfromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol()); prt->setDevice(url.url()); prt->setLocation(ds); } @@ -115,7 +115,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh { prt->setManufacturer(m["make"].toString()); prt->setModel(m["model"].toString()); - prt->setDriverInfo(TQString::fromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString())); + prt->setDriverInfo(TQString::tqfromLatin1("%1 %2 (%3)").arg(prt->manufacturer()).arg(prt->model()).arg(m["driver"].toString())); } } } @@ -167,7 +167,7 @@ TQString MaticHandler::parsePostpipe(const TQString& s) else { QString host = (args[i].length() == 2 ? args[i+1] : args[i].right(args[i].length()-2)); - int p = host.find("\\@"); + int p = host.tqfind("\\@"); if (p != -1) { url = "lpd://" + host.right(host.length()-p-2) + "/" + host.left(p); @@ -247,7 +247,7 @@ DrMain* MaticHandler::loadDbDriver(const TQString& path) } QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); QString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -309,13 +309,13 @@ bool MaticHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMai line = tin.readLine(); if (line.stripWhiteSpace().startsWith("$postpipe")) continue; - else if ((p = line.find("'name'")) != -1) + else if ((p = line.tqfind("'name'")) != -1) { - p = line.find('\'', p+6)+1; - q = line.find('\'', p); + p = line.tqfind('\'', p+6)+1; + q = line.tqfind('\'', p); optname = line.mid(p, q-p); } - else if ((p = line.find("'default'")) != -1) + else if ((p = line.tqfind("'default'")) != -1) { DrBase *opt = driver->findOption(optname); if (opt) @@ -351,7 +351,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) if (mdriver.isEmpty() || mprinter.isEmpty()) return true; - QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); QString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -372,7 +372,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) line = tin.readLine(); if (line.startsWith("*% COMDATA #")) { - if (line.find("'default'") != -1) + if (line.tqfind("'default'") != -1) { DrBase *opt = (optname.isEmpty() ? NULL : driver->findOption(optname)); if (opt) diff --git a/kdeprint/lpr/printcapreader.cpp b/kdeprint/lpr/printcapreader.cpp index a3ab30e8f..7abd094f9 100644 --- a/kdeprint/lpr/printcapreader.cpp +++ b/kdeprint/lpr/printcapreader.cpp @@ -101,7 +101,7 @@ PrintcapEntry* PrintcapReader::nextEntry() // now parse the entry kdDebug() << "COMMENT: " << comment << endl; kdDebug() << "LINE: " << buf << endl; - int p = buf.find(':'); + int p = buf.tqfind(':'); if (p == -1) name = buf; else @@ -132,14 +132,14 @@ PrintcapEntry* PrintcapReader::nextEntry() for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { Field f; - int p = (*it).find('='); + int p = (*it).tqfind('='); if (p == -1) { - p = (*it).find('#'); + p = (*it).tqfind('#'); if (p == -1) { f.type = Field::Boolean; - p = (*it).find('@'); + p = (*it).tqfind('@'); if (p == -1) { f.name = (*it); diff --git a/kdeprint/management/cjanuswidget.cpp b/kdeprint/management/cjanuswidget.cpp index 7bad07264..d9d3ea126 100644 --- a/kdeprint/management/cjanuswidget.cpp +++ b/kdeprint/management/cjanuswidget.cpp @@ -118,7 +118,7 @@ void CJanusWidget::CListBox::computeWidth() item = item->next(); } if (verticalScrollBar()->isVisible()) - w += verticalScrollBar()->sizeHint().width(); + w += verticalScrollBar()->tqsizeHint().width(); w += (frameWidth()*2); setFixedWidth(w); } diff --git a/kdeprint/management/cjanuswidget.h b/kdeprint/management/cjanuswidget.h index 2b06aed21..d73cafd31 100644 --- a/kdeprint/management/cjanuswidget.h +++ b/kdeprint/management/cjanuswidget.h @@ -28,7 +28,7 @@ class TQWidgetStack; class TQLabel; class TQListBoxItem; -class CJanusWidget : public QWidget +class CJanusWidget : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/kmconfigfilter.cpp b/kdeprint/management/kmconfigfilter.cpp index 10dff4749..4b0d81e46 100644 --- a/kdeprint/management/kmconfigfilter.cpp +++ b/kdeprint/management/kmconfigfilter.cpp @@ -97,7 +97,7 @@ void KMConfigFilter::loadConfig(KConfig *conf) { if (!it.current()->isSpecial() && !it.current()->isVirtual()) { - KListBox *lb = (m_plist.find(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); + KListBox *lb = (m_plist.tqfind(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); lb->insertItem(SmallIcon(it.current()->pixmap()), it.current()->printerName()); } } diff --git a/kdeprint/management/kmconfigpage.h b/kdeprint/management/kmconfigpage.h index 138d7c152..596b8c5ec 100644 --- a/kdeprint/management/kmconfigpage.h +++ b/kdeprint/management/kmconfigpage.h @@ -26,7 +26,7 @@ class KConfig; -class KDEPRINT_EXPORT KMConfigPage : public QWidget +class KDEPRINT_EXPORT KMConfigPage : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/kmdbcreator.cpp b/kdeprint/management/kmdbcreator.cpp index 3b271ff00..cce83605d 100644 --- a/kdeprint/management/kmdbcreator.cpp +++ b/kdeprint/management/kmdbcreator.cpp @@ -109,7 +109,7 @@ bool KMDBCreator::createDriverDB(const TQString& dirname, const TQString& filena { if (!m_dlg) { - m_dlg = new TQProgressDialog(parent->topLevelWidget(),"progress-dialog",true); + m_dlg = new TQProgressDialog(parent->tqtopLevelWidget(),"progress-dialog",true); m_dlg->setLabelText(i18n("Please wait while KDE rebuilds a driver database.")); m_dlg->setCaption(i18n("Driver Database")); connect(m_dlg,TQT_SIGNAL(canceled()),TQT_SLOT(slotCancelled())); @@ -133,7 +133,7 @@ void KMDBCreator::slotReceivedStdout(KProcess*, char *buf, int len) // the toInt() will return 0. If that occurs for the first number, // then the number of steps will be also 0. bool ok; - int p = str.find('\n'); + int p = str.tqfind('\n'); int n = str.mid(0, p).toInt(&ok); // process the number received diff --git a/kdeprint/management/kmdbcreator.h b/kdeprint/management/kmdbcreator.h index 82fa5469e..d4281a51d 100644 --- a/kdeprint/management/kmdbcreator.h +++ b/kdeprint/management/kmdbcreator.h @@ -28,7 +28,7 @@ class TQWidget; class TQProgressDialog; -class KMDBCreator : public QObject +class KMDBCreator : public TQObject { Q_OBJECT public: diff --git a/kdeprint/management/kmdriverdb.cpp b/kdeprint/management/kmdriverdb.cpp index 6e275a6d4..ca872da43 100644 --- a/kdeprint/management/kmdriverdb.cpp +++ b/kdeprint/management/kmdriverdb.cpp @@ -60,7 +60,7 @@ KMDriverDB::~KMDriverDB() TQString KMDriverDB::dbFile() { // this calls insure missing directories creation - QString filename = locateLocal("data",TQString::fromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem())); + QString filename = locateLocal("data",TQString::tqfromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem())); return filename; } @@ -110,7 +110,7 @@ void KMDriverDB::slotDbCreated() KMDBEntryList* KMDriverDB::findEntry(const TQString& manu, const TQString& model) { - TQDict<KMDBEntryList> *models = m_entries.find(manu); + TQDict<KMDBEntryList> *models = m_entries.tqfind(manu); if (models) return models->find(model); return 0; @@ -118,7 +118,7 @@ KMDBEntryList* KMDriverDB::findEntry(const TQString& manu, const TQString& model KMDBEntryList* KMDriverDB::findPnpEntry(const TQString& manu, const TQString& model) { - TQDict<KMDBEntryList> *models = m_pnpentries.find(manu); + TQDict<KMDBEntryList> *models = m_pnpentries.tqfind(manu); if (models) return models->find(model); return 0; @@ -126,7 +126,7 @@ KMDBEntryList* KMDriverDB::findPnpEntry(const TQString& manu, const TQString& mo TQDict<KMDBEntryList>* KMDriverDB::findModels(const TQString& manu) { - return m_entries.find(manu); + return m_entries.tqfind(manu); } void KMDriverDB::insertEntry(KMDBEntry *entry) @@ -140,7 +140,7 @@ void KMDriverDB::insertEntry(KMDBEntry *entry) } // insert it in normal entries - TQDict<KMDBEntryList> *models = m_entries.find(entry->manufacturer); + TQDict<KMDBEntryList> *models = m_entries.tqfind(entry->manufacturer); if (!models) { models = new TQDict<KMDBEntryList>(17,false); @@ -159,7 +159,7 @@ void KMDriverDB::insertEntry(KMDBEntry *entry) if (!entry->pnpmanufacturer.isEmpty() && !entry->pnpmodel.isEmpty()) { // insert it in PNP entries - models = m_pnpentries.find(entry->manufacturer); + models = m_pnpentries.tqfind(entry->manufacturer); if (!models) { models = new TQDict<KMDBEntryList>(17,false); @@ -209,7 +209,7 @@ void KMDriverDB::loadDbFile() line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - int p = line.find('='); + int p = line.tqfind('='); if (p == -1) continue; words.clear(); diff --git a/kdeprint/management/kmdriverdb.h b/kdeprint/management/kmdriverdb.h index 1ffecdc0a..3913d74ef 100644 --- a/kdeprint/management/kmdriverdb.h +++ b/kdeprint/management/kmdriverdb.h @@ -29,7 +29,7 @@ class KMDBCreator; -class KMDriverDB : public QObject +class KMDriverDB : public TQObject { Q_OBJECT public: diff --git a/kdeprint/management/kmdriverdbwidget.cpp b/kdeprint/management/kmdriverdbwidget.cpp index fdd3d263c..95175cb07 100644 --- a/kdeprint/management/kmdriverdbwidget.cpp +++ b/kdeprint/management/kmdriverdbwidget.cpp @@ -105,7 +105,7 @@ void KMDriverDbWidget::setDriver(const TQString& manu, const TQString& model) // try by stripping the manufacturer name from // the beginning of the model string. This is // often the case with PPD files - item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::fromLatin1(""))); + item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1(""))); if (item) m_model->setCurrentItem(item); } diff --git a/kdeprint/management/kmdriverdbwidget.h b/kdeprint/management/kmdriverdbwidget.h index c9e263f47..09298f3fa 100644 --- a/kdeprint/management/kmdriverdbwidget.h +++ b/kdeprint/management/kmdriverdbwidget.h @@ -27,7 +27,7 @@ class TQListBox; class TQCheckBox; class TQPushButton; -class KMDriverDbWidget : public QWidget +class KMDriverDbWidget : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/kmiconview.cpp b/kdeprint/management/kmiconview.cpp index 5d16e34d0..c53cc8148 100644 --- a/kdeprint/management/kmiconview.cpp +++ b/kdeprint/management/kmiconview.cpp @@ -99,7 +99,7 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode) setText(TQString::null); setText(p->name()); } - setKey(TQString::fromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name())); + setKey(TQString::tqfromLatin1("%1_%2").arg((p->isSpecial() ? "special" : (p->isClass(false) ? "class" : "printer"))).arg(p->name())); m_isclass = p->isClass(false); } if (mode != m_mode || ((oldstate&0x4) != (m_state&0x4)) || (p && p->pixmap() != m_pixmap)) @@ -114,7 +114,7 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode) setPixmap(SmallIcon(m_pixmap, 0, iconstate)); } //if (update) - // repaint(); + // tqrepaint(); setDiscarded(false); } diff --git a/kdeprint/management/kminfopage.cpp b/kdeprint/management/kminfopage.cpp index e06fa3c28..6f3503566 100644 --- a/kdeprint/management/kminfopage.cpp +++ b/kdeprint/management/kminfopage.cpp @@ -32,7 +32,7 @@ KMInfoPage::KMInfoPage(TQWidget *parent, const char *name) { m_title = new TQLabel(this); m_titlepixmap = new TQLabel(this); - m_titlepixmap->setAlignment(Qt::AlignCenter); + m_titlepixmap->tqsetAlignment(Qt::AlignCenter); KSeparator* sep = new KSeparator( KSeparator::HLine, this); m_type = new TQLabel(this); m_description = new TQLabel(this); @@ -42,19 +42,19 @@ KMInfoPage::KMInfoPage(TQWidget *parent, const char *name) m_uri = new TQLabel(this); m_device = new TQLabel(this); QLabel *m_loclabel = new TQLabel(i18n("Physical Location", "Location:"), this); - m_loclabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + m_loclabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); QLabel *m_desclabel = new TQLabel(i18n("Description:"), this); - m_desclabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + m_desclabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); QLabel *m_typelabel = new TQLabel(i18n("Type:"), this); - m_typelabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + m_typelabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); QLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), this); - m_statelabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + m_statelabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); QLabel *m_urilabel = new TQLabel(i18n("URI:"), this); - m_urilabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + m_urilabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); m_devlabel = new TQLabel(i18n("Device:"), this); - m_devlabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + m_devlabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); QLabel *m_modellabel = new TQLabel(i18n("Model:"), this); - m_modellabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); + m_modellabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); QGridLayout *lay0 = new TQGridLayout(this, 11, 2, 0, 5); QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10); @@ -107,7 +107,7 @@ void KMInfoPage::setPrinter(KMPrinter *p) } else { - m_title->setText(TQString::fromLatin1("<b>%1</b>").arg(p->name())); + m_title->setText(TQString::tqfromLatin1("<b>%1</b>").arg(p->name())); m_titlepixmap->setPixmap(SmallIcon(p->pixmap())); if (p->isImplicit()) m_type->setText(i18n("Implicit class")); else if (p->isClass(false)) diff --git a/kdeprint/management/kminstancepage.cpp b/kdeprint/management/kminstancepage.cpp index 6e6fcc391..d53c1eca7 100644 --- a/kdeprint/management/kminstancepage.cpp +++ b/kdeprint/management/kminstancepage.cpp @@ -138,7 +138,7 @@ void KMInstancePage::slotNew() i18n("(Default)"),&ok,this); if (ok) { - if (name.find(TQRegExp("[/\\s]")) != -1) + if (name.tqfind(TQRegExp("[/\\s]")) != -1) KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes.")); else { @@ -183,7 +183,7 @@ void KMInstancePage::slotCopy() i18n("(Default)"),&ok,this); if (ok) { - if (name.find(TQRegExp("[/\\s]")) != -1) + if (name.tqfind(TQRegExp("[/\\s]")) != -1) KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes.")); else { diff --git a/kdeprint/management/kmjobviewer.cpp b/kdeprint/management/kmjobviewer.cpp index a5e419fc6..e8c6efce0 100644 --- a/kdeprint/management/kmjobviewer.cpp +++ b/kdeprint/management/kmjobviewer.cpp @@ -280,7 +280,7 @@ void KMJobViewer::initActions() connect(m_userfield, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotUserChanged())); connect(uact, TQT_SIGNAL(toggled(bool)), m_userfield, TQT_SLOT(setEnabled(bool))); m_userfield->setEnabled(false); - m_userfield->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); + m_userfield->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); KWidgetAction *ufact = new KWidgetAction(m_userfield, i18n("User Name"), 0, 0, 0, actionCollection(), "view_username"); if (!m_pop) diff --git a/kdeprint/management/kmlistview.cpp b/kdeprint/management/kmlistview.cpp index e754cfe1d..4a35a230e 100644 --- a/kdeprint/management/kmlistview.cpp +++ b/kdeprint/management/kmlistview.cpp @@ -89,7 +89,7 @@ void KMListViewItem::updatePrinter(KMPrinter *p) } setDiscarded(false); if (update) - repaint(); + tqrepaint(); } void KMListViewItem::paintCell(TQPainter *p, const TQColorGroup& cg, int c, int w, int a) diff --git a/kdeprint/management/kmlistview.h b/kdeprint/management/kmlistview.h index e9a6b29e5..9f5b24b46 100644 --- a/kdeprint/management/kmlistview.h +++ b/kdeprint/management/kmlistview.h @@ -26,7 +26,7 @@ class KMListViewItem; class KMPrinter; -class KMListView : public QListView +class KMListView : public TQListView { Q_OBJECT public: diff --git a/kdeprint/management/kmpages.h b/kdeprint/management/kmpages.h index e300aa998..75ad4641a 100644 --- a/kdeprint/management/kmpages.h +++ b/kdeprint/management/kmpages.h @@ -26,7 +26,7 @@ class KMPrinter; class KMPrinterPage; -class KMPages : public QTabWidget +class KMPages : public TQTabWidget { public: KMPages(TQWidget *parent = 0, const char *name = 0); diff --git a/kdeprint/management/kmprinterview.cpp b/kdeprint/management/kmprinterview.cpp index 794683f54..f43f8f62a 100644 --- a/kdeprint/management/kmprinterview.cpp +++ b/kdeprint/management/kmprinterview.cpp @@ -47,7 +47,7 @@ KMPrinterView::KMPrinterView(TQWidget *parent, const char *name) connect(m_listview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&))); setViewType(m_type); - setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); } KMPrinterView::~KMPrinterView() @@ -105,9 +105,9 @@ void KMPrinterView::slotPrinterSelected(const TQString& p) m_current = p; } -TQSize KMPrinterView::minimumSizeHint() const +TQSize KMPrinterView::tqminimumSizeHint() const { - return TQWidgetStack::minimumSizeHint(); + return TQWidgetStack::tqminimumSizeHint(); } #include "kmprinterview.moc" diff --git a/kdeprint/management/kmprinterview.h b/kdeprint/management/kmprinterview.h index 5ea565dba..0b3a17789 100644 --- a/kdeprint/management/kmprinterview.h +++ b/kdeprint/management/kmprinterview.h @@ -28,7 +28,7 @@ class KMListView; class KMPrinter; class TQIconViewItem; -class KMPrinterView : public QWidgetStack +class KMPrinterView : public TQWidgetStack { Q_OBJECT public: @@ -42,7 +42,7 @@ public: void setViewType(ViewType t); ViewType viewType() const { return m_type; } - TQSize minimumSizeHint() const; + TQSize tqminimumSizeHint() const; signals: void printerSelected(const TQString&); diff --git a/kdeprint/management/kmpropcontainer.h b/kdeprint/management/kmpropcontainer.h index ff4ca8439..5d9ca5455 100644 --- a/kdeprint/management/kmpropcontainer.h +++ b/kdeprint/management/kmpropcontainer.h @@ -26,7 +26,7 @@ class KMPropWidget; class TQPushButton; class KMPrinter; -class KMPropContainer : public QWidget +class KMPropContainer : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/kmpropmembers.cpp b/kdeprint/management/kmpropmembers.cpp index 775c71f89..6fa76cba9 100644 --- a/kdeprint/management/kmpropmembers.cpp +++ b/kdeprint/management/kmpropmembers.cpp @@ -29,7 +29,7 @@ KMPropMembers::KMPropMembers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) { m_members = new TQTextView(this); - m_members->setPaper(colorGroup().background()); + m_members->setPaper(tqcolorGroup().background()); m_members->setFrameStyle(TQFrame::NoFrame); QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 0); diff --git a/kdeprint/management/kmpropwidget.h b/kdeprint/management/kmpropwidget.h index f4d3a865b..a9c2b918f 100644 --- a/kdeprint/management/kmpropwidget.h +++ b/kdeprint/management/kmpropwidget.h @@ -27,7 +27,7 @@ class KMPrinter; class KMWizard; -class KDEPRINT_EXPORT KMPropWidget : public QWidget +class KDEPRINT_EXPORT KMPropWidget : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/kmtimer.h b/kdeprint/management/kmtimer.h index cf5efb719..6dcf962a0 100644 --- a/kdeprint/management/kmtimer.h +++ b/kdeprint/management/kmtimer.h @@ -34,7 +34,7 @@ * if you're a KDEPrint developer. The API might change in the * future and binary compatibility might be broken. */ -class KDEPRINT_EXPORT KMTimer : public QTimer +class KDEPRINT_EXPORT KMTimer : public TQTimer { Q_OBJECT public: diff --git a/kdeprint/management/kmwbackend.cpp b/kdeprint/management/kmwbackend.cpp index 53803d383..481651e87 100644 --- a/kdeprint/management/kmwbackend.cpp +++ b/kdeprint/management/kmwbackend.cpp @@ -102,7 +102,7 @@ void KMWBackend::updatePrinter(KMPrinter *p) else p->setType(KMPrinter::Printer); p->setOption("kde-backend",TQString::number(ID)); QString s = m_buttons->selected()->text(); - s.replace(TQRegExp("&(?=\\w)"), TQString::fromLatin1("")); + s.replace(TQRegExp("&(?=\\w)"), TQString::tqfromLatin1("")); p->setOption("kde-backend-description",s); setNextPage((m_map.contains(ID) ? m_map[ID] : KMWizard::Error)); } diff --git a/kdeprint/management/kmwdriver.cpp b/kdeprint/management/kmwdriver.cpp index a50454d0b..bf5ef9c4b 100644 --- a/kdeprint/management/kmwdriver.cpp +++ b/kdeprint/management/kmwdriver.cpp @@ -49,7 +49,7 @@ void KMWDriver::initPrinter(KMPrinter *p) { // use auto-detection info instead: split the string // into make/model pair at the first space character - int p = autoDetect.find( ' ' ); + int p = autoDetect.tqfind( ' ' ); if ( p != -1 ) { TQString manu = autoDetect.left( p ), model = autoDetect.mid( p+1 ); diff --git a/kdeprint/management/kmwend.cpp b/kdeprint/management/kmwend.cpp index 5fd3c7fc0..0d638dfd9 100644 --- a/kdeprint/management/kmwend.cpp +++ b/kdeprint/management/kmwend.cpp @@ -42,11 +42,11 @@ KMWEnd::KMWEnd(TQWidget *parent, const char *name) void KMWEnd::initPrinter(KMPrinter *p) { QString txt; - QString s(TQString::fromLatin1("<li><u>%1</u>: %2</li>")); + QString s(TQString::tqfromLatin1("<li><u>%1</u>: %2</li>")); int ID = p->option("kde-backend").toInt(); // general information - txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General"))); + txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("General"))); txt.append(s.arg(i18n("Type")).arg(p->option("kde-backend-description"))); txt.append(s.arg(i18n("Name")).arg(p->name())); txt.append(s.arg(i18n("Location")).arg(p->location())); @@ -56,9 +56,9 @@ void KMWEnd::initPrinter(KMPrinter *p) if (ID == KMWizard::Class) { // class members - txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members"))); + txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members"))); QStringList m(p->members()); - QString s1(TQString::fromLatin1("<li>%1</li>")); + QString s1(TQString::tqfromLatin1("<li>%1</li>")); for (TQStringList::ConstIterator it=m.begin(); it!=m.end(); ++it) txt.append(s1.arg(*it)); txt.append("</ul><br>"); @@ -66,7 +66,7 @@ void KMWEnd::initPrinter(KMPrinter *p) else { // backend information - txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend"))); + txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Backend"))); KURL url ( p->device() ); switch (ID) { @@ -101,7 +101,7 @@ void KMWEnd::initPrinter(KMPrinter *p) if (p->option("kde-driver") == "raw" || p->driver()) { // driver information - txt.append(TQString::fromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver"))); + txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Driver"))); if (p->option("kde-driver") == "raw") txt.append(s.arg(i18n("Type")).arg(i18n("Raw printer"))); else diff --git a/kdeprint/management/kmwfile.cpp b/kdeprint/management/kmwfile.cpp index 9daeee77b..33deb0836 100644 --- a/kdeprint/management/kmwfile.cpp +++ b/kdeprint/management/kmwfile.cpp @@ -72,6 +72,6 @@ bool KMWFile::isValid(TQString& msg) void KMWFile::updatePrinter(KMPrinter *p) { - QString dev = TQString::fromLatin1("file:%1").arg(m_url->url()); + QString dev = TQString::tqfromLatin1("file:%1").arg(m_url->url()); p->setDevice(dev); } diff --git a/kdeprint/management/kmwizard.cpp b/kdeprint/management/kmwizard.cpp index 6a793dd5a..59bfa644d 100644 --- a/kdeprint/management/kmwizard.cpp +++ b/kdeprint/management/kmwizard.cpp @@ -178,14 +178,14 @@ void KMWizard::configure(int start, int end, bool inclusive) void KMWizard::setNextPage(int page, int next) { - KMWizardPage *p = m_pagepool.find(page); + KMWizardPage *p = m_pagepool.tqfind(page); if (p) p->setNextPage(next); } void KMWizard::setCurrentPage(int ID, bool back) { - KMWizardPage *page = m_pagepool.find(ID); + KMWizardPage *page = m_pagepool.tqfind(ID); if (!page) { KMessageBox::error(this,i18n("Unable to find the requested page."),i18n("Add Printer Wizard")); diff --git a/kdeprint/management/kmwizard.h b/kdeprint/management/kmwizard.h index 54a97abcd..0c981967d 100644 --- a/kdeprint/management/kmwizard.h +++ b/kdeprint/management/kmwizard.h @@ -34,7 +34,7 @@ class KMPrinter; class KMWBackend; class SidePixmap; -class KDEPRINT_EXPORT KMWizard : public QDialog +class KDEPRINT_EXPORT KMWizard : public TQDialog { Q_OBJECT public: diff --git a/kdeprint/management/kmwizardpage.h b/kdeprint/management/kmwizardpage.h index d6756ab37..68f655b2a 100644 --- a/kdeprint/management/kmwizardpage.h +++ b/kdeprint/management/kmwizardpage.h @@ -26,7 +26,7 @@ class KMPrinter; -class KDEPRINT_EXPORT KMWizardPage : public QWidget +class KDEPRINT_EXPORT KMWizardPage : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/kmwlocal.cpp b/kdeprint/management/kmwlocal.cpp index 1a89babe0..0340a5fe1 100644 --- a/kdeprint/management/kmwlocal.cpp +++ b/kdeprint/management/kmwlocal.cpp @@ -173,7 +173,7 @@ void KMWLocal::initialize() ++it; QString uri = *it; - int p = uri.find( ':' ); + int p = uri.tqfind( ':' ); QString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : TQString::null ); QString printer = *(++it); int index(-1); diff --git a/kdeprint/management/kmwlpd.cpp b/kdeprint/management/kmwlpd.cpp index c2686b481..d1bb53cab 100644 --- a/kdeprint/management/kmwlpd.cpp +++ b/kdeprint/management/kmwlpd.cpp @@ -66,7 +66,7 @@ bool KMWLpd::isValid(TQString& msg) void KMWLpd::updatePrinter(KMPrinter *p) { - QString dev = TQString::fromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1)); + QString dev = TQString::tqfromLatin1("lpd://%1/%2").arg(text(0)).arg(text(1)); p->setDevice(dev); } @@ -81,7 +81,7 @@ bool checkLpdQueue(const char *host, const char *queue) char res[64] = {0}; snprintf(res,64,"%c%s\n",(char)4,queue); - if (sock.writeBlock(res, strlen(res)) != (Q_LONG)(strlen(res))) + if (sock.writeBlock(res, strlen(res)) != (TQ_LONG)(strlen(res))) return false; char buf[1024] = {0}; diff --git a/kdeprint/management/kmwname.cpp b/kdeprint/management/kmwname.cpp index d46b104a7..43f6f3fad 100644 --- a/kdeprint/management/kmwname.cpp +++ b/kdeprint/management/kmwname.cpp @@ -48,7 +48,7 @@ bool KMWName::isValid(TQString& msg) msg = i18n("You must supply at least a name."); return false; } - else if (text(0).find(TQRegExp("\\s")) != -1) + else if (text(0).tqfind(TQRegExp("\\s")) != -1) { QString conv = text(0); conv.replace(TQRegExp("\\s"), ""); diff --git a/kdeprint/management/kmwpassword.cpp b/kdeprint/management/kmwpassword.cpp index a84b8f904..f05fa2378 100644 --- a/kdeprint/management/kmwpassword.cpp +++ b/kdeprint/management/kmwpassword.cpp @@ -121,7 +121,7 @@ void KMWPassword::updatePrinter(KMPrinter *p) p->setOption( "kde-password", TQString::null ); break; case 1: - p->setOption( "kde-login", TQString::fromLatin1( "guest" ) ); + p->setOption( "kde-login", TQString::tqfromLatin1( "guest" ) ); p->setOption( "kde-password", TQString::null ); break; case 2: diff --git a/kdeprint/management/kmwsocket.cpp b/kdeprint/management/kmwsocket.cpp index 749ab8ea7..59b7e9d72 100644 --- a/kdeprint/management/kmwsocket.cpp +++ b/kdeprint/management/kmwsocket.cpp @@ -88,7 +88,7 @@ KMWSocket::~KMWSocket() void KMWSocket::updatePrinter(KMPrinter *p) { - QString dev = TQString::fromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text()); + QString dev = TQString::tqfromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text()); p->setDevice(dev); } diff --git a/kdeprint/management/kmwsocketutil.cpp b/kdeprint/management/kmwsocketutil.cpp index d3f838ce7..6c1cce103 100644 --- a/kdeprint/management/kmwsocketutil.cpp +++ b/kdeprint/management/kmwsocketutil.cpp @@ -53,12 +53,12 @@ SocketConfig::SocketConfig(KMWSocketUtil *util, TQWidget *parent, const char *na QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); QLineEdit *mm = new TQLineEdit(dummy); - mm->setText(TQString::fromLatin1(".[0-255]")); + mm->setText(TQString::tqfromLatin1(".[0-255]")); mm->setReadOnly(true); mm->setFixedWidth(fontMetrics().width(mm->text())+10); mask_ = new TQLineEdit(dummy); - mask_->setAlignment(Qt::AlignRight); + mask_->tqsetAlignment(Qt::AlignRight); port_ = new TQComboBox(true,dummy); if ( port_->lineEdit() ) port_->lineEdit()->setValidator( val ); diff --git a/kdeprint/management/kxmlcommanddlg.cpp b/kdeprint/management/kxmlcommanddlg.cpp index 24e6f4adf..13778043e 100644 --- a/kdeprint/management/kxmlcommanddlg.cpp +++ b/kdeprint/management/kxmlcommanddlg.cpp @@ -52,8 +52,8 @@ TQString generateId(const TQMap<TQString, DrBase*>& map) { int index(-1); - while (map.contains(TQString::fromLatin1("item%1").arg(++index))) ; - return TQString::fromLatin1("item%1").arg(index); + while (map.contains(TQString::tqfromLatin1("item%1").arg(++index))) ; + return TQString::tqfromLatin1("item%1").arg(index); } TQListViewItem* findPrev(TQListViewItem *item) @@ -735,10 +735,10 @@ void KXmlCommandAdvancedDlg::slotMoveDown() void KXmlCommandAdvancedDlg::slotCommandChanged(const TQString& cmd) { - m_inputfile->parentWidget()->setEnabled(cmd.find("%filterinput") != -1); - m_outputfile->parentWidget()->setEnabled(cmd.find("%filteroutput") != -1); - m_view->setEnabled(cmd.find("%filterargs") != -1); - m_name->parentWidget()->setEnabled(m_view->isEnabled()); + m_inputfile->tqparentWidget()->setEnabled(cmd.tqfind("%filterinput") != -1); + m_outputfile->tqparentWidget()->setEnabled(cmd.tqfind("%filteroutput") != -1); + m_view->setEnabled(cmd.tqfind("%filterargs") != -1); + m_name->tqparentWidget()->setEnabled(m_view->isEnabled()); slotSelectionChanged((m_view->isEnabled() ? m_view->currentItem() : 0)); m_view->setOpen(m_view->firstChild(), m_view->isEnabled()); } @@ -1025,7 +1025,7 @@ void KXmlCommandDlg::slotRemoveMime() void KXmlCommandDlg::slotEditCommand() { - KXmlCommandAdvancedDlg::editCommand(m_cmd, parentWidget()); + KXmlCommandAdvancedDlg::editCommand(m_cmd, tqparentWidget()); } void KXmlCommandDlg::slotAddReq() diff --git a/kdeprint/management/kxmlcommanddlg.h b/kdeprint/management/kxmlcommanddlg.h index f30b321ad..ccd52ba0b 100644 --- a/kdeprint/management/kxmlcommanddlg.h +++ b/kdeprint/management/kxmlcommanddlg.h @@ -40,7 +40,7 @@ class DrGroup; class DrBase; class KXmlCommand; -class KXmlCommandAdvancedDlg : public QWidget +class KXmlCommandAdvancedDlg : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/kxmlcommandselector.cpp b/kdeprint/management/kxmlcommandselector.cpp index 4e57b3922..ed7ff0150 100644 --- a/kdeprint/management/kxmlcommandselector.cpp +++ b/kdeprint/management/kxmlcommandselector.cpp @@ -275,7 +275,7 @@ void KXmlCommandSelector::slotHelpCommand() { KPopupFrame *pop = new KPopupFrame( m_helpbtn ); KActiveLabel *lab = new KActiveLabel( m_help, pop ); - lab->resize( lab->sizeHint() ); + lab->resize( lab->tqsizeHint() ); pop->setMainWidget( lab ); pop->exec( m_helpbtn->mapToGlobal( TQPoint( m_helpbtn->width(), 0 ) ) ); pop->close( 0 ); diff --git a/kdeprint/management/kxmlcommandselector.h b/kdeprint/management/kxmlcommandselector.h index d632aaddf..0f1335174 100644 --- a/kdeprint/management/kxmlcommandselector.h +++ b/kdeprint/management/kxmlcommandselector.h @@ -32,7 +32,7 @@ class TQLabel; class TQPushButton; class KDialogBase; -class KDEPRINT_EXPORT KXmlCommandSelector : public QWidget +class KDEPRINT_EXPORT KXmlCommandSelector : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/management/networkscanner.cpp b/kdeprint/management/networkscanner.cpp index 41b368ab0..576840760 100644 --- a/kdeprint/management/networkscanner.cpp +++ b/kdeprint/management/networkscanner.cpp @@ -157,7 +157,7 @@ void NetworkScanner::slotScanClicked() if ( !d->scanning ) { if ( d->localPrefix() == d->prefixaddress || - KMessageBox::warningContinueCancel( this->parentWidget(), + KMessageBox::warningContinueCancel( this->tqparentWidget(), i18n( "You are about to scan a subnet (%1.*) that does not " "correspond to the current subnet of this computer (%2.*). Do you want " "to scan the specified subnet anyway?" ).arg( d->prefixaddress ).arg( d->localPrefix() ), @@ -339,12 +339,12 @@ NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char * QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); QLineEdit *mm = new TQLineEdit(dummy); - mm->setText(TQString::fromLatin1(".[0-255]")); + mm->setText(TQString::tqfromLatin1(".[0-255]")); mm->setReadOnly(true); mm->setFixedWidth(fontMetrics().width(mm->text())+10); mask_ = new TQLineEdit(dummy); - mask_->setAlignment(Qt::AlignRight); + mask_->tqsetAlignment(Qt::AlignRight); port_ = new TQComboBox(true,dummy); if ( port_->lineEdit() ) port_->lineEdit()->setValidator( val ); diff --git a/kdeprint/management/networkscanner.h b/kdeprint/management/networkscanner.h index 462d26427..ea9602afa 100644 --- a/kdeprint/management/networkscanner.h +++ b/kdeprint/management/networkscanner.h @@ -25,7 +25,7 @@ #include <tqptrlist.h> -class KDEPRINT_EXPORT NetworkScanner : public QWidget +class KDEPRINT_EXPORT NetworkScanner : public TQWidget { Q_OBJECT diff --git a/kdeprint/management/sidepixmap.cpp b/kdeprint/management/sidepixmap.cpp index 99a1e6198..696d7b025 100644 --- a/kdeprint/management/sidepixmap.cpp +++ b/kdeprint/management/sidepixmap.cpp @@ -32,7 +32,7 @@ SidePixmap::SidePixmap(TQWidget *parent, const char *name) m_tileup.load(locate("data", "kdeprint/tileup.png")); m_tiledown.load(locate("data", "kdeprint/tiledown.png")); - setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum)); } bool SidePixmap::isValid() @@ -42,7 +42,7 @@ bool SidePixmap::isValid() && (m_side.width() == m_tiledown.width())); } -TQSize SidePixmap::sizeHint() const +TQSize SidePixmap::tqsizeHint() const { return (TQSize(m_side.width()+lineWidth(), 300+lineWidth())); } diff --git a/kdeprint/management/sidepixmap.h b/kdeprint/management/sidepixmap.h index 33db2275c..330b63e2d 100644 --- a/kdeprint/management/sidepixmap.h +++ b/kdeprint/management/sidepixmap.h @@ -25,11 +25,11 @@ #include <kdelibs_export.h> -class KDEPRINT_EXPORT SidePixmap : public QFrame +class KDEPRINT_EXPORT SidePixmap : public TQFrame { public: SidePixmap(TQWidget *parent = 0, const char *name = 0); - TQSize sizeHint() const; + TQSize tqsizeHint() const; bool isValid(); protected: diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp index 08f8487f7..987c3f6ae 100644 --- a/kdeprint/management/smbview.cpp +++ b/kdeprint/management/smbview.cpp @@ -216,7 +216,7 @@ void SmbView::processGroups() clear(); for (TQStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it) { - int p = (*it).find("<1d>"); + int p = (*it).tqfind("<1d>"); if (p == -1) continue; QListViewItem *item = new TQListViewItem(this,(*it).left(p).stripWhiteSpace()); diff --git a/kdeprint/marginpreview.h b/kdeprint/marginpreview.h index 8cceba7bc..7722b73c7 100644 --- a/kdeprint/marginpreview.h +++ b/kdeprint/marginpreview.h @@ -22,7 +22,7 @@ #include <tqwidget.h> -class MarginPreview : public QWidget +class MarginPreview : public TQWidget { Q_OBJECT diff --git a/kdeprint/marginwidget.h b/kdeprint/marginwidget.h index 90cef87ef..c526c9f9a 100644 --- a/kdeprint/marginwidget.h +++ b/kdeprint/marginwidget.h @@ -30,7 +30,7 @@ class MarginPreview; class TQCheckBox; class TQComboBox; -class KDEPRINT_EXPORT MarginWidget : public QWidget +class KDEPRINT_EXPORT MarginWidget : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/messagewindow.cpp b/kdeprint/messagewindow.cpp index d4c4ae40d..553d78e21 100644 --- a/kdeprint/messagewindow.cpp +++ b/kdeprint/messagewindow.cpp @@ -55,13 +55,13 @@ MessageWindow::MessageWindow( const TQString& txt, int delay, TQWidget *parent, MessageWindow::~MessageWindow() { - m_windows.remove( parentWidget() ); + m_windows.remove( tqparentWidget() ); } void MessageWindow::slotTimer() { - TQSize psz = parentWidget()->size(), sz = sizeHint(); - move( parentWidget()->mapToGlobal( TQPoint( (psz.width()-sz.width())/2, (psz.height()-sz.height())/2 ) ) ); + TQSize psz = tqparentWidget()->size(), sz = tqsizeHint(); + move( tqparentWidget()->mapToGlobal( TQPoint( (psz.width()-sz.width())/2, (psz.height()-sz.height())/2 ) ) ); if ( !isVisible() ) { show(); @@ -85,7 +85,7 @@ void MessageWindow::add( TQWidget *parent, const TQString& txt, int delay ) kdWarning( 500 ) << "Cannot add a message window to a null parent" << endl; else { - MessageWindow *w = m_windows.find( parent ); + MessageWindow *w = m_windows.tqfind( parent ); if ( w ) w->setText( txt ); else @@ -96,14 +96,14 @@ void MessageWindow::add( TQWidget *parent, const TQString& txt, int delay ) void MessageWindow::remove( TQWidget *parent ) { if ( parent ) - delete m_windows.find( parent ); + delete m_windows.tqfind( parent ); } void MessageWindow::change( TQWidget *parent, const TQString& txt ) { if ( parent ) { - MessageWindow *w = m_windows.find( parent ); + MessageWindow *w = m_windows.tqfind( parent ); if ( w ) w->setText( txt ); else diff --git a/kdeprint/messagewindow.h b/kdeprint/messagewindow.h index a86378a53..52e73ea2e 100644 --- a/kdeprint/messagewindow.h +++ b/kdeprint/messagewindow.h @@ -27,7 +27,7 @@ class TQLabel; -class KDEPRINT_EXPORT MessageWindow : public QWidget +class KDEPRINT_EXPORT MessageWindow : public TQWidget { Q_OBJECT diff --git a/kdeprint/plugincombobox.cpp b/kdeprint/plugincombobox.cpp index 038e9ddbd..b6533353a 100644 --- a/kdeprint/plugincombobox.cpp +++ b/kdeprint/plugincombobox.cpp @@ -44,7 +44,7 @@ PluginComboBox::PluginComboBox(TQWidget *parent, const char *name) TQWhatsThis::add(m_combo, whatsThisCurrentPrintsystem); QLabel *m_label = new TQLabel(i18n("Print s&ystem currently used:"), this); TQWhatsThis::add(m_label, whatsThisCurrentPrintsystem); - m_label->setAlignment(AlignVCenter|AlignRight); + m_label->tqsetAlignment(AlignVCenter|AlignRight); m_label->setBuddy(m_combo); m_plugininfo = new TQLabel("Plugin information", this); QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 5); diff --git a/kdeprint/posterpreview.cpp b/kdeprint/posterpreview.cpp index fbdfe5200..f3535de25 100644 --- a/kdeprint/posterpreview.cpp +++ b/kdeprint/posterpreview.cpp @@ -106,7 +106,7 @@ void PosterPreview::drawContents( TQPainter *painter ) TQPixmap pix( width(), height() ); TQPainter *p = new TQPainter( &pix ); - p->fillRect( 0, 0, width(), height(), colorGroup().background() ); + p->fillRect( 0, 0, width(), height(), tqcolorGroup().background() ); if ( isEnabled() ) { @@ -120,7 +120,7 @@ void PosterPreview::drawContents( TQPainter *painter ) int x = ( width()-richtext.widthUsed() )/2, y = ( height()-richtext.height() )/2; x = QMAX( x, 0 ); y = QMAX( y, 0 ); - richtext.draw( p, x, y, TQRect( x, y, richtext.widthUsed(), richtext.height() ), colorGroup() ); + richtext.draw( p, x, y, TQRect( x, y, richtext.widthUsed(), richtext.height() ), tqcolorGroup() ); m_boundingrect = TQRect(); } else @@ -139,7 +139,7 @@ void PosterPreview::drawContents( TQPainter *painter ) { for ( int j=0; j<m_cols; j++, x+=m_pw ) { - bool selected = ( m_selectedpages.find( i*m_cols+j+1 ) != m_selectedpages.end() ); + bool selected = ( m_selectedpages.tqfind( i*m_cols+j+1 ) != m_selectedpages.end() ); p->fillRect( x+1, y+1, m_pw-2, m_ph-2, ( selected ? KGlobalSettings::highlightColor() : white ) ); p->drawRect( x, y, m_pw, m_ph ); if ( pw > 0 && ph > 0 ) @@ -187,7 +187,7 @@ void PosterPreview::mousePressEvent( TQMouseEvent *e ) r = m_rows - ( e->pos().y()-m_boundingrect.y() )/( m_boundingrect.height()/m_rows ); int pagenum = ( r-1 )*m_cols+c; - if ( m_selectedpages.find( pagenum ) == m_selectedpages.end() || + if ( m_selectedpages.tqfind( pagenum ) == m_selectedpages.end() || !( e->state() & Qt::ShiftButton ) ) { if ( !( e->state() & Qt::ShiftButton ) ) @@ -267,7 +267,7 @@ void PosterPreview::setSelectedPages( const TQString& s ) for ( TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it ) { int p; - if ( ( p = ( *it ).find( '-' ) ) == -1 ) + if ( ( p = ( *it ).tqfind( '-' ) ) == -1 ) m_selectedpages.append( ( *it ).toInt() ); else { diff --git a/kdeprint/posterpreview.h b/kdeprint/posterpreview.h index 25fda31eb..bd9b6cc77 100644 --- a/kdeprint/posterpreview.h +++ b/kdeprint/posterpreview.h @@ -25,7 +25,7 @@ class KProcess; -class PosterPreview : public QFrame +class PosterPreview : public TQFrame { Q_OBJECT public: diff --git a/kdeprint/ppdloader.cpp b/kdeprint/ppdloader.cpp index 9fbecc774..035038a7a 100644 --- a/kdeprint/ppdloader.cpp +++ b/kdeprint/ppdloader.cpp @@ -78,7 +78,7 @@ static TQValueList<float> splitNumberString( const TQString& _s ) int p1 = 1, p2 = 0; while ( true ) { - p2 = s.find( ' ', p1 ); + p2 = s.tqfind( ' ', p1 ); if ( p2 != -1 ) { l.append( s.mid( p1, p2-p1 ).toFloat() ); @@ -431,7 +431,7 @@ bool PPDLoader::putPaperDimension( const TQString& name, const TQString& s ) { TQValueList<float> l = splitNumberString( s ); - PS_private *ps = m_ps.find( name ); + PS_private *ps = m_ps.tqfind( name ); if ( !ps ) { ps = new PS_private; @@ -448,7 +448,7 @@ bool PPDLoader::putImageableArea( const TQString& name, const TQString& s ) { TQValueList<float> l = splitNumberString( s ); - PS_private *ps = m_ps.find( name ); + PS_private *ps = m_ps.tqfind( name ); if ( !ps ) { ps = new PS_private; diff --git a/kdeprint/printerfilter.cpp b/kdeprint/printerfilter.cpp index a6f02f077..2590f41a4 100644 --- a/kdeprint/printerfilter.cpp +++ b/kdeprint/printerfilter.cpp @@ -62,7 +62,7 @@ bool PrinterFilter::filter(KMPrinter *prt) if (m_enabled) { if ((!m_locationRe.isEmpty() && m_locationRe.exactMatch(prt->location())) || - m_printers.find(prt->printerName()) != m_printers.end()) + m_printers.tqfind(prt->printerName()) != m_printers.end()) return true; else return false; diff --git a/kdeprint/rlpr/kmproxywidget.h b/kdeprint/rlpr/kmproxywidget.h index 8dfdd149a..4d2799a67 100644 --- a/kdeprint/rlpr/kmproxywidget.h +++ b/kdeprint/rlpr/kmproxywidget.h @@ -26,7 +26,7 @@ class KConfig; class TQLineEdit; class TQCheckBox; -class KMProxyWidget : public QGroupBox +class KMProxyWidget : public TQGroupBox { public: KMProxyWidget(TQWidget *parent = 0, const char *name = 0); diff --git a/kdeprint/rlpr/kmrlprmanager.cpp b/kdeprint/rlpr/kmrlprmanager.cpp index f455fd1ff..718969116 100644 --- a/kdeprint/rlpr/kmrlprmanager.cpp +++ b/kdeprint/rlpr/kmrlprmanager.cpp @@ -116,7 +116,7 @@ void KMRlprManager::loadPrintersConf(const TQString& filename) if (w.count() > 4) printer->setLocation(w[4]); } printer->setState(KMPrinter::Idle); - printer->setDevice(TQString::fromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2])); + printer->setDevice(TQString::tqfromLatin1("lpd://%1/%2").arg(w[1]).arg(w[2])); addPrinter(printer); } diff --git a/kdeprint/rlpr/kmwrlpr.cpp b/kdeprint/rlpr/kmwrlpr.cpp index 78f483db6..915bf74ae 100644 --- a/kdeprint/rlpr/kmwrlpr.cpp +++ b/kdeprint/rlpr/kmwrlpr.cpp @@ -53,7 +53,7 @@ KMWRlpr::KMWRlpr(TQWidget *parent, const char *name) m_view = new KListView(this); m_view->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_view->setLineWidth(1); - m_view->addColumn(TQString::fromLatin1("")); + m_view->addColumn(TQString::tqfromLatin1("")); m_view->header()->hide(); m_view->setRootIsDecorated(true); m_view->setSorting(0); @@ -109,7 +109,7 @@ void KMWRlpr::initPrinter(KMPrinter *p) void KMWRlpr::updatePrinter(KMPrinter *p) { - QString uri = TQString::fromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text()); + QString uri = TQString::tqfromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text()); p->setDevice(uri); p->setOption("host",m_host->text()); p->setOption("queue",m_queue->text()); @@ -140,7 +140,7 @@ void KMWRlpr::initialize() line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - if ((p=line.find(':')) != -1) + if ((p=line.tqfind(':')) != -1) { host = line.left(p).stripWhiteSpace(); QListViewItem *hitem = new TQListViewItem(m_view,host); @@ -180,7 +180,7 @@ void KMWRlpr::initialize() } if (buffer.isEmpty()) continue; - int p = buffer.find(':'); + int p = buffer.tqfind(':'); if (p != -1) { QString name = buffer.left(p); diff --git a/kdeprint/rlpr/krlprprinterimpl.cpp b/kdeprint/rlpr/krlprprinterimpl.cpp index 1d4845bde..ac18d1a2b 100644 --- a/kdeprint/rlpr/krlprprinterimpl.cpp +++ b/kdeprint/rlpr/krlprprinterimpl.cpp @@ -54,7 +54,7 @@ bool KRlprPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) return false; } - cmd = TQString::fromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies()); + cmd = TQString::tqfromLatin1("%1 -H %2 -P %3 -\\#%4").arg(exestr).arg(quote(host)).arg(quote(queue)).arg(printer->numCopies()); // proxy settings KConfig *conf = KMFactory::self()->printConfig(); diff --git a/kdeprint/tests/drawdemo.cpp b/kdeprint/tests/drawdemo.cpp index 443cc89e8..20fc3d12e 100644 --- a/kdeprint/tests/drawdemo.cpp +++ b/kdeprint/tests/drawdemo.cpp @@ -78,7 +78,7 @@ void drawFonts( TQPainter *p ) // -// This function draws some shapes +// This function draws some tqshapes // void drawShapes( TQPainter *p ) @@ -115,7 +115,7 @@ struct DrawThing { DrawThing ourDrawFunctions[] = { { drawColorWheel, "Draw color wheel" }, { drawFonts, "Draw fonts" }, - { drawShapes, "Draw shapes" }, + { drawShapes, "Draw tqshapes" }, { 0, 0 } }; diff --git a/kdeprint/tests/drawdemo.h b/kdeprint/tests/drawdemo.h index 5d2412477..963da64db 100644 --- a/kdeprint/tests/drawdemo.h +++ b/kdeprint/tests/drawdemo.h @@ -6,7 +6,7 @@ // and a text in the table above. // -class DrawView : public QWidget +class DrawView : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/tests/helpwindow.cpp b/kdeprint/tests/helpwindow.cpp index c2cdb1b22..bee755d20 100644 --- a/kdeprint/tests/helpwindow.cpp +++ b/kdeprint/tests/helpwindow.cpp @@ -67,7 +67,7 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, file->insertItem( "&Print", this, TQT_SLOT( print() ), ALT | Key_P ); file->insertSeparator(); file->insertItem( "&Close", this, TQT_SLOT( close() ), ALT | Key_Q ); - file->insertItem( "E&xit", qApp, TQT_SLOT( closeAllWindows() ), ALT | Key_X ); + file->insertItem( "E&xit", tqApp, TQT_SLOT( closeAllWindows() ), ALT | Key_X ); // The same three icons are used twice each. TQIconSet icon_back( TQPixmap("back.xpm") ); @@ -278,7 +278,7 @@ void HelpWindow::print() TQRect view( body ); int page = 1; do { - richText.draw( &p, body.left(), body.top(), view, colorGroup() ); + richText.draw( &p, body.left(), body.top(), view, tqcolorGroup() ); view.moveBy( 0, body.height() ); p.translate( 0 , -body.height() ); p.setFont( font ); diff --git a/kdeprint/tests/richpage.cpp b/kdeprint/tests/richpage.cpp index f12040b71..30da712de 100644 --- a/kdeprint/tests/richpage.cpp +++ b/kdeprint/tests/richpage.cpp @@ -23,7 +23,7 @@ RichPage::RichPage(TQWidget *parent, const char *name) QFontDatabase db; QStringList fonts = db.families(); fontname_->insertStringList(fonts); - fontname_->setCurrentItem(fonts.findIndex(TQString::fromLatin1("times"))); + fontname_->setCurrentItem(fonts.findIndex(TQString::tqfromLatin1("times"))); if (fontname_->currentItem() < 0) fontname_->setCurrentItem(0); QLabel *l1 = new TQLabel("Margin:",this); diff --git a/kdeprint/tools/escputil/escpwidget.cpp b/kdeprint/tools/escputil/escpwidget.cpp index ef0e2390b..4a65a380d 100644 --- a/kdeprint/tools/escputil/escpwidget.cpp +++ b/kdeprint/tools/escputil/escpwidget.cpp @@ -97,20 +97,20 @@ EscpWidget::EscpWidget(TQWidget *parent, const char *name) connect(identbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked())); QLabel *printerlab = new TQLabel(i18n("Printer:"), this); - printerlab->setAlignment(AlignRight|AlignVCenter); + printerlab->tqsetAlignment(AlignRight|AlignVCenter); QLabel *devicelab = new TQLabel(i18n("Device:"), this); - devicelab->setAlignment(AlignRight|AlignVCenter); + devicelab->tqsetAlignment(AlignRight|AlignVCenter); QLabel *cleanlab = new TQLabel(i18n("Clea&n print head"), this); QLabel *nozzlelab = new TQLabel(i18n("&Print a nozzle test pattern"), this); QLabel *alignlab = new TQLabel(i18n("&Align print head"), this); QLabel *inklab = new TQLabel(i18n("&Ink level"), this); QLabel *identlab = new TQLabel(i18n("P&rinter identification"), this); - cleanlab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix); - nozzlelab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix); - alignlab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix); - inklab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix); - identlab->setAlignment(AlignLeft|AlignVCenter|ShowPrefix); + cleanlab->tqsetAlignment(AlignLeft|AlignVCenter|ShowPrefix); + nozzlelab->tqsetAlignment(AlignLeft|AlignVCenter|ShowPrefix); + alignlab->tqsetAlignment(AlignLeft|AlignVCenter|ShowPrefix); + inklab->tqsetAlignment(AlignLeft|AlignVCenter|ShowPrefix); + identlab->tqsetAlignment(AlignLeft|AlignVCenter|ShowPrefix); cleanbtn->setAccel(TQAccel::shortcutKey(cleanlab->text())); nozzlebtn->setAccel(TQAccel::shortcutKey(nozzlelab->text())); diff --git a/kdeprint/tools/escputil/escpwidget.h b/kdeprint/tools/escputil/escpwidget.h index 528de97c9..9cc0f2d38 100644 --- a/kdeprint/tools/escputil/escpwidget.h +++ b/kdeprint/tools/escputil/escpwidget.h @@ -27,7 +27,7 @@ class TQLabel; class TQCheckBox; -class EscpWidget : public QWidget +class EscpWidget : public TQWidget { Q_OBJECT diff --git a/kdeprint/treecombobox.cpp b/kdeprint/treecombobox.cpp index 1e4f1b694..752562e62 100644 --- a/kdeprint/treecombobox.cpp +++ b/kdeprint/treecombobox.cpp @@ -102,7 +102,7 @@ void TreeListBoxItem::paint(TQPainter *p) if (m_depth > 0) { QPen oldPen = p->pen(); - p->setPen(listBox()->colorGroup().mid()); + p->setPen(listBox()->tqcolorGroup().mid()); TreeListBoxItem *item = this; int s = xo-stepSize()/2; diff --git a/kdeprint/treecombobox.h b/kdeprint/treecombobox.h index 398633752..fa31c4471 100644 --- a/kdeprint/treecombobox.h +++ b/kdeprint/treecombobox.h @@ -27,7 +27,7 @@ /** * Class that represents a single object in the tree */ -class TreeListBoxItem : public QListBoxPixmap +class TreeListBoxItem : public TQListBoxPixmap { public: TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQString& txt, bool oneBlock = false); @@ -47,7 +47,7 @@ private: /** * Class for the listbox shown on popup */ -class TreeListBox : public QListBox +class TreeListBox : public TQListBox { friend class TreeListBoxItem; public: @@ -63,7 +63,7 @@ private: /** * Main class. */ -class TreeComboBox : public QComboBox +class TreeComboBox : public TQComboBox { public: TreeComboBox(TQWidget *parent = 0, const char *name = 0); diff --git a/kdeprint/util.cpp b/kdeprint/util.cpp index d95ca2c0c..01e276ae1 100644 --- a/kdeprint/util.cpp +++ b/kdeprint/util.cpp @@ -44,7 +44,7 @@ KURL smbToUrl(const TQString& s) { // allow to handle non-encoded chars in login/password KURL url; - int p = s.find('@'); + int p = s.tqfind('@'); if (p == -1) { // assumes url starts with "smb://". Use encoding in @@ -56,7 +56,7 @@ KURL smbToUrl(const TQString& s) // assumes URL starts with "smb://" QString username = s.mid(6, p-6); url = KURL("smb://" + KURL::encode_string(s.mid(p+1))); - int q = username.find(':'); + int q = username.tqfind(':'); if (q == -1) url.setUser(username); else @@ -99,14 +99,14 @@ bool splitSmbURI( const TQString& uri, TQString& work, TQString& server, TQStrin return false; p = 6; - int p1 = uri.find( '/', p ); + int p1 = uri.tqfind( '/', p ); if ( p1 != -1 ) { - int p2 = uri.find( '@', p ); + int p2 = uri.tqfind( '@', p ); if ( p2 != -1 && p2 < p1 ) { // Got a user - int p3 = uri.find( ':', p ); + int p3 = uri.tqfind( ':', p ); if ( p3 != -1 && p3 < p2 ) { // Got a password |