summaryrefslogtreecommitdiffstats
path: root/kdeprint
diff options
context:
space:
mode:
Diffstat (limited to 'kdeprint')
-rw-r--r--kdeprint/cups/cupsaddsmb2.cpp2
-rw-r--r--kdeprint/cups/cupsdconf2/addressdialog.cpp2
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp4
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdcomment.cpp4
-rw-r--r--kdeprint/cups/cupsdconf2/cupsdconf.cpp24
-rw-r--r--kdeprint/cups/cupsdconf2/cupsddialog.cpp2
-rw-r--r--kdeprint/cups/cupsdconf2/editlist.cpp6
-rw-r--r--kdeprint/cups/cupsdconf2/locationdialog.cpp2
-rw-r--r--kdeprint/cups/cupsdconf2/portdialog.cpp4
-rw-r--r--kdeprint/cups/cupsdconf2/sizewidget.cpp2
-rw-r--r--kdeprint/cups/kcupsprinterimpl.cpp4
-rw-r--r--kdeprint/cups/kmcupsjobmanager.cpp14
-rw-r--r--kdeprint/cups/kmcupsmanager.cpp18
-rw-r--r--kdeprint/cups/kmwbanners.cpp8
-rw-r--r--kdeprint/cups/kmwother.cpp4
-rw-r--r--kdeprint/cups/kphpgl2page.cpp4
-rw-r--r--kdeprint/cups/kptagspage.cpp2
-rw-r--r--kdeprint/cups/kptextpage.cpp2
-rw-r--r--kdeprint/driver.cpp8
-rw-r--r--kdeprint/driver.h4
-rw-r--r--kdeprint/droptionview.cpp4
-rw-r--r--kdeprint/foomatic/kmfoomaticmanager.cpp4
-rw-r--r--kdeprint/foomatic2loader.cpp10
-rw-r--r--kdeprint/kdeprintd.cpp2
-rw-r--r--kdeprint/kmdbentry.cpp4
-rw-r--r--kdeprint/kmfactory.cpp2
-rw-r--r--kdeprint/kmjobmanager.cpp4
-rw-r--r--kdeprint/kmmanager.cpp2
-rw-r--r--kdeprint/kmprinter.cpp4
-rw-r--r--kdeprint/kmprinter.h2
-rw-r--r--kdeprint/kmthreadjob.cpp6
-rw-r--r--kdeprint/kpfilterpage.cpp12
-rw-r--r--kdeprint/kpposterpage.cpp4
-rw-r--r--kdeprint/kpqtpage.cpp8
-rw-r--r--kdeprint/kprintdialog.cpp2
-rw-r--r--kdeprint/kprinter.cpp8
-rw-r--r--kdeprint/kprinterimpl.cpp8
-rw-r--r--kdeprint/kxmlcommand.cpp18
-rw-r--r--kdeprint/lpd/gschecker.cpp2
-rw-r--r--kdeprint/lpd/kmlpdmanager.cpp16
-rw-r--r--kdeprint/lpd/lpdtools.cpp14
-rw-r--r--kdeprint/lpdunix/kmlpdunixmanager.cpp18
-rw-r--r--kdeprint/lpr/apshandler.cpp8
-rw-r--r--kdeprint/lpr/kmlprmanager.cpp14
-rw-r--r--kdeprint/lpr/lpchelper.cpp24
-rw-r--r--kdeprint/lpr/lpqhelper.cpp6
-rw-r--r--kdeprint/lpr/lprhandler.cpp4
-rw-r--r--kdeprint/lpr/lprngtoolhandler.cpp18
-rw-r--r--kdeprint/lpr/matichandler.cpp16
-rw-r--r--kdeprint/lpr/matichelper.cpp2
-rw-r--r--kdeprint/lpr/printcapentry.h2
-rw-r--r--kdeprint/lpr/printcapreader.cpp8
-rw-r--r--kdeprint/management/cjanuswidget.cpp2
-rw-r--r--kdeprint/management/kmconfigfilter.cpp2
-rw-r--r--kdeprint/management/kmdbcreator.cpp2
-rw-r--r--kdeprint/management/kmdriverdb.cpp20
-rw-r--r--kdeprint/management/kmdriverdbwidget.cpp10
-rw-r--r--kdeprint/management/kminstancepage.cpp8
-rw-r--r--kdeprint/management/kmjobviewer.cpp2
-rw-r--r--kdeprint/management/kmspecialprinterdlg.cpp2
-rw-r--r--kdeprint/management/kmwbackend.cpp2
-rw-r--r--kdeprint/management/kmwclass.cpp2
-rw-r--r--kdeprint/management/kmwdriver.cpp2
-rw-r--r--kdeprint/management/kmwizard.cpp4
-rw-r--r--kdeprint/management/kmwlocal.cpp4
-rw-r--r--kdeprint/management/kmwname.cpp2
-rw-r--r--kdeprint/management/kmwsocketutil.cpp2
-rw-r--r--kdeprint/management/kxmlcommanddlg.cpp26
-rw-r--r--kdeprint/management/kxmlcommandselector.cpp6
-rw-r--r--kdeprint/management/networkscanner.cpp2
-rw-r--r--kdeprint/management/smbview.cpp4
-rw-r--r--kdeprint/messagewindow.cpp6
-rw-r--r--kdeprint/plugincombobox.cpp2
-rw-r--r--kdeprint/posterpreview.cpp6
-rw-r--r--kdeprint/ppdloader.cpp8
-rw-r--r--kdeprint/ppdscanner.cpp2
-rw-r--r--kdeprint/ppdscanner.l2
-rw-r--r--kdeprint/printerfilter.cpp2
-rw-r--r--kdeprint/rlpr/kmrlprmanager.cpp2
-rw-r--r--kdeprint/rlpr/kmwrlpr.cpp4
-rw-r--r--kdeprint/treecombobox.cpp2
-rw-r--r--kdeprint/util.cpp10
82 files changed, 263 insertions, 263 deletions
diff --git a/kdeprint/cups/cupsaddsmb2.cpp b/kdeprint/cups/cupsaddsmb2.cpp
index 2737cfd71..f12653cbb 100644
--- a/kdeprint/cups/cupsaddsmb2.cpp
+++ b/kdeprint/cups/cupsaddsmb2.cpp
@@ -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].tqfind("ERRfilexists") != -1);
+ m_status = (m_buffer.count() == 1 || m_buffer[1].find("ERRfilexists") != -1);
break;
case AddDriver:
case AddPrinter:
diff --git a/kdeprint/cups/cupsdconf2/addressdialog.cpp b/kdeprint/cups/cupsdconf2/addressdialog.cpp
index 325d3c7d5..7e4f1bdd9 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.tqfind(' ');
+ int p = addr.find(' ');
if (p != -1)
{
dlg.type_->setCurrentItem(addr.left(p).lower() == "deny" ? 1 : 0);
diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
index edd55d30e..5ae671092 100644
--- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp
@@ -127,8 +127,8 @@ bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, TQString&)
{
conf_ = conf;
browsing_->setChecked(conf_->browsing_);
- cups_->setChecked(conf_->browseprotocols_.tqfindIndex("CUPS") != -1);
- slp_->setChecked(conf_->browseprotocols_.tqfindIndex("SLP") != -1);
+ cups_->setChecked(conf_->browseprotocols_.findIndex("CUPS") != -1);
+ slp_->setChecked(conf_->browseprotocols_.findIndex("SLP") != -1);
browseport_->setValue(conf_->browseport_);
browseinterval_->setValue(conf_->browseinterval_);
browsetimeout_->setValue(conf_->browsetimeout_);
diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp
index 4813f504d..0e761378c 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_.tqfind(key);
+ Comment *comm = comments_.find(key);
if (comm)
return comm->comment();
}
@@ -103,7 +103,7 @@ TQString CupsdComment::toolTip(const TQString& key)
{
if (comments_.count() != 0 || loadComments())
{
- Comment *comm = comments_.tqfind(key);
+ Comment *comm = comments_.find(key);
if (comm)
return comm->toolTip();
}
diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp
index 72e76edca..78ec9ec78 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.tqfind(TQRegExp("\\D"));
+ int p = s.find(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.tqfind(' ')) != -1)
+ if ((p=l.find(' ')) != -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.tqfind("all") != prots.end())
+ if (prots.find("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)
{
TQString str = line.simplifyWhiteSpace();
- int p1 = line.tqfind(' '), p2 = line.tqfind('>');
+ int p1 = line.find(' '), p2 = line.find('>');
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.tqfind(' ')) != -1)
+ if ((p=l.find(' ')) != -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.tqfind(' ');
+ int p = value.find(' ');
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.tqfind(i18n("Class")) == 0) return RESOURCE_CLASS;
- else if (text.tqfind(i18n("Printer")) == 0) return RESOURCE_PRINTER;
+ else if (text.find(i18n("Class")) == 0) return RESOURCE_CLASS;
+ else if (text.find(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.tqfind(i18n("Printer")) == 0)
+ else if (text.find(i18n("Printer")) == 0)
{
path = "/printers/";
path.append(text.right(text.length()-i18n("Printer").length()-1));
}
- else if (text.tqfind(i18n("Class")) == 0)
+ else if (text.find(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.tqfind("/printers/") == 0)
+ else if (path.find("/printers/") == 0)
{
text = i18n("Printer");
text.append(" ");
text.append(path.right(path.length()-10));
}
- else if (path.tqfind("/classes/") == 0)
+ else if (path.find("/classes/") == 0)
{
text = i18n("Class");
text.append(" ");
diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
index 8dfa9c41a..fb59986c5 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.tqfind("Uid:",0,false) == 0)
+ if (str.find("Uid:",0,false) == 0)
{
TQStringList list = TQStringList::split('\t', str, false);
if (list.count() >= 2)
diff --git a/kdeprint/cups/cupsdconf2/editlist.cpp b/kdeprint/cups/cupsdconf2/editlist.cpp
index d0420be32..9acbb23a2 100644
--- a/kdeprint/cups/cupsdconf2/editlist.cpp
+++ b/kdeprint/cups/cupsdconf2/editlist.cpp
@@ -81,7 +81,7 @@ void EditList::setText(int index, const TQString& s)
{
if (list_->text(index) != s)
{
- TQListBoxItem *it = list_->tqfindItem(s, TQt::ExactMatch);
+ TQListBoxItem *it = list_->findItem(s, TQt::ExactMatch);
if (!it)
list_->changeItem(s, index);
else
@@ -97,13 +97,13 @@ void EditList::clear()
void EditList::insertItem(const TQString& s)
{
- if (!list_->tqfindItem(s, TQt::ExactMatch))
+ if (!list_->findItem(s, TQt::ExactMatch))
list_->insertItem(s);
}
void EditList::insertItem(const TQPixmap& icon, const TQString& s)
{
- if (!list_->tqfindItem(s, TQt::ExactMatch))
+ if (!list_->findItem(s, TQt::ExactMatch))
list_->insertItem(icon, s);
}
diff --git a/kdeprint/cups/cupsdconf2/locationdialog.cpp b/kdeprint/cups/cupsdconf2/locationdialog.cpp
index a4d550d0e..416efa249 100644
--- a/kdeprint/cups/cupsdconf2/locationdialog.cpp
+++ b/kdeprint/cups/cupsdconf2/locationdialog.cpp
@@ -141,7 +141,7 @@ void LocationDialog::fillLocation(CupsLocation *loc)
void LocationDialog::setLocation(CupsLocation *loc)
{
- int index = conf_->resources_.tqfindRef(loc->resource_);
+ int index = conf_->resources_.findRef(loc->resource_);
resource_->setCurrentItem(index);
authtype_->setCurrentItem(loc->authtype_);
authclass_->setCurrentItem(loc->authclass_);
diff --git a/kdeprint/cups/cupsdconf2/portdialog.cpp b/kdeprint/cups/cupsdconf2/portdialog.cpp
index d3dd2f0a5..18f27db5b 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.tqfind(' ');
+ int p = s.find(' ');
if (p != -1)
{
dlg.usessl_->setChecked(s.left(p).startsWith("SSL"));
TQString addr = s.mid(p+1).stripWhiteSpace();
- int p1 = addr.tqfind(':');
+ int p1 = addr.find(':');
if (p1 == -1)
{
dlg.address_->setText(addr);
diff --git a/kdeprint/cups/cupsdconf2/sizewidget.cpp b/kdeprint/cups/cupsdconf2/sizewidget.cpp
index 5920c30a9..d77fe5aaa 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.tqfind( TQRegExp( "\\D" ) );
+ int p = sz.find( TQRegExp( "\\D" ) );
m_size->setValue( sz.left( p ).toInt() );
switch( sz[ p ].latin1() )
{
diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp
index 132ddc136..4bcf96e6e 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.tqfind(',')) != -1)
+ if ((p=range.find(',')) != -1)
range.truncate(p);
- if ((p=range.tqfind('-')) != -1)
+ if ((p=range.find('-')) != -1)
{
from = range.left(p).toInt();
to = range.right(range.length()-p-1).toInt();
diff --git a/kdeprint/cups/kmcupsjobmanager.cpp b/kdeprint/cups/kmcupsjobmanager.cpp
index 76bf2202f..1daa22b42 100644
--- a/kdeprint/cups/kmcupsjobmanager.cpp
+++ b/kdeprint/cups/kmcupsjobmanager.cpp
@@ -212,7 +212,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
else if (name == "job-printer-uri" && !pr->isRemote())
{
TQString str(attr->values[0].string.text);
- int p = str.tqfindRev('/');
+ int p = str.findRev('/');
if (p != -1)
job->setPrinter(str.mid(p+1));
}
@@ -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).tqfind('-') == -1)
+ if ((*it).find('-') == -1)
s.append("-").append(*it);
s.append(",");
}
@@ -387,15 +387,15 @@ bool KMCupsJobManager::editJobAttributes(KMJob *j)
TQMap<TQString,TQString> opts = req.toMap(IPP_TAG_JOB);
// translate the "Copies" option to non-CUPS syntax
- if (opts.tqcontains("copies"))
+ if (opts.contains("copies"))
opts["kde-copies"] = opts["copies"];
- if (opts.tqcontains("page-set"))
+ if (opts.contains("page-set"))
opts["kde-pageset"] = (opts["page-set"] == "even" ? "2" : (opts["page-set"] == "odd" ? "1" : "0"));
- if (opts.tqcontains("OutputOrder"))
+ if (opts.contains("OutputOrder"))
opts["kde-pageorder"] = opts["OutputOrder"];
- if (opts.tqcontains("multiple-document-handling"))
+ if (opts.contains("multiple-document-handling"))
opts["kde-collate"] = (opts["multiple-document-handling"] == "separate-documents-collated-copies" ? "Collate" : "Uncollate");
- if (opts.tqcontains("page-ranges"))
+ if (opts.contains("page-ranges"))
opts["kde-range"] = opts["page-ranges"];
// find printer and construct dialog
diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp
index 42ca37cf9..6dd1f32d5 100644
--- a/kdeprint/cups/kmcupsmanager.cpp
+++ b/kdeprint/cups/kmcupsmanager.cpp
@@ -655,10 +655,10 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename)
if (line.startsWith("*% COMDATA #"))
{
int p(-1), q(-1);
- if ((p=line.tqfind("'name'")) != -1)
+ if ((p=line.find("'name'")) != -1)
{
- p = line.tqfind('\'',p+6)+1;
- q = line.tqfind('\'',p);
+ p = line.find('\'',p+6)+1;
+ q = line.find('\'',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.tqfind("'type'")) != -1)
+ /*else if ((p=line.find("'type'")) != -1)
{
- p = line.tqfind('\'',p+6)+1;
- if (line.tqfind("float",p) != -1 || line.tqfind("int",p) != -1)
+ p = line.find('\'',p+6)+1;
+ if (line.find("float",p) != -1 || line.find("int",p) != -1)
isnumeric = true;
else
isnumeric = false;
}*/
- else if ((p=line.tqfind("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
+ else if ((p=line.find("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric)
{
TQString prefix = line.left(p+9);
tout << prefix << " => '" << opt->valueText() << '\'';
- if (line.tqfind(',',p) != -1)
+ if (line.find(',',p) != -1)
tout << ',';
tout << endl;
continue;
@@ -687,7 +687,7 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename)
}
else if (line.startsWith("*Default"))
{
- int p = line.tqfind(':',8);
+ int p = line.find(':',8);
keyword = line.mid(8,p-8);
DrBase *bopt = 0;
if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" )
diff --git a/kdeprint/cups/kmwbanners.cpp b/kdeprint/cups/kmwbanners.cpp
index 72964c697..9e930ac0e 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.tqfind( ban );
+ TQMap<TQString,TQString>::ConstIterator it = map.find( 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.tqfind("none") == m_bans.end())
+ if (m_bans.find("none") == m_bans.end())
m_bans.prepend("none");
for ( TQStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it )
{
@@ -131,8 +131,8 @@ void KMWBanners::initPrinter(KMPrinter *p)
TQStringList l = TQStringList::split(',',p->option("kde-banners"),false);
while (l.count() < 2)
l.append("none");
- m_start->setCurrentItem(m_bans.tqfindIndex(l[0]));
- m_end->setCurrentItem(m_bans.tqfindIndex(l[1]));
+ m_start->setCurrentItem(m_bans.findIndex(l[0]));
+ m_end->setCurrentItem(m_bans.findIndex(l[1]));
}
}
diff --git a/kdeprint/cups/kmwother.cpp b/kdeprint/cups/kmwother.cpp
index 947b884d1..68a6c4532 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.tqfind( cl );
+ TQListViewItem *parent = parents.find( 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.tqfind( cl ), desc, uri);
+ item = new TQListViewItem( parent, last.find( cl ), desc, uri);
last.insert( cl, item );
}
}
diff --git a/kdeprint/cups/kphpgl2page.cpp b/kdeprint/cups/kphpgl2page.cpp
index 94816af1a..0d15a838d 100644
--- a/kdeprint/cups/kphpgl2page.cpp
+++ b/kdeprint/cups/kphpgl2page.cpp
@@ -142,9 +142,9 @@ KPHpgl2Page::~KPHpgl2Page()
void KPHpgl2Page::setOptions(const TQMap<TQString,TQString>& opts)
{
TQString value;
- if (opts.tqcontains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true"))
+ if (opts.contains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true"))
m_blackplot->setChecked(true);
- if (opts.tqcontains("fitplot") && ((value=opts["fitplot"]).isEmpty() || value == "true"))
+ if (opts.contains("fitplot") && ((value=opts["fitplot"]).isEmpty() || value == "true"))
m_fitplot->setChecked(true);
if (!(value=opts["penwidth"]).isEmpty())
m_penwidth->setValue(value.toInt());
diff --git a/kdeprint/cups/kptagspage.cpp b/kdeprint/cups/kptagspage.cpp
index d9f5a0686..0e2d93ea3 100644
--- a/kdeprint/cups/kptagspage.cpp
+++ b/kdeprint/cups/kptagspage.cpp
@@ -110,7 +110,7 @@ bool KPTagsPage::isValid(TQString& msg)
TQString tag(m_tags->text(r, 0));
if (tag.isEmpty())
continue;
- else if (tag.tqfind(re) != -1)
+ else if (tag.find(re) != -1)
{
msg = i18n("The tag name must not contain any spaces, tabs or quotes: <b>%1</b>.").arg(tag);
return false;
diff --git a/kdeprint/cups/kptextpage.cpp b/kdeprint/cups/kptextpage.cpp
index 25cfb888d..cec0f6c23 100644
--- a/kdeprint/cups/kptextpage.cpp
+++ b/kdeprint/cups/kptextpage.cpp
@@ -261,7 +261,7 @@ void KPTextPage::setOptions(const TQMap<TQString,TQString>& opts)
if (!(value=opts["columns"]).isEmpty())
m_columns->setValue(value.toInt());
int ID(0);
- if (opts.tqcontains("prettyprint") && (opts["prettyprint"].isEmpty() || opts["prettyprint"] == "true"))
+ if (opts.contains("prettyprint") && (opts["prettyprint"].isEmpty() || opts["prettyprint"] == "true"))
ID = 1;
m_prettyprint->setButton(ID);
slotPrettyChanged(ID);
diff --git a/kdeprint/driver.cpp b/kdeprint/driver.cpp
index 241dd0b10..26423a858 100644
--- a/kdeprint/driver.cpp
+++ b/kdeprint/driver.cpp
@@ -61,7 +61,7 @@ DriverItem* DrBase::createItem(DriverItem *parent, DriverItem *after)
void DrBase::setOptions(const TQMap<TQString,TQString>& opts)
{
- if (opts.tqcontains(name())) setValueText(opts[name()]);
+ if (opts.contains(name())) setValueText(opts[name()]);
}
void DrBase::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
@@ -224,7 +224,7 @@ void DrGroup::addObject(DrBase *optgrp)
void DrGroup::removeOption(const TQString& name)
{
- DrBase *opt = m_options.tqfind(name);
+ DrBase *opt = m_options.find(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.tqfind(name);
+ DrBase *opt = m_options.find(name);
if (!opt)
{
TQPtrListIterator<DrGroup> it(m_subgroups);
@@ -278,7 +278,7 @@ DrBase* DrGroup::findOption(const TQString& name, DrGroup **parentGroup)
DrGroup* DrGroup::findGroup(DrGroup *grp, DrGroup ** parentGroup)
{
- DrGroup *group = (m_subgroups.tqfindRef(grp) == -1 ? 0 : grp);
+ DrGroup *group = (m_subgroups.findRef(grp) == -1 ? 0 : grp);
if (!group)
{
TQPtrListIterator<DrGroup> it(m_subgroups);
diff --git a/kdeprint/driver.h b/kdeprint/driver.h
index 0d08675af..a2ccab8a8 100644
--- a/kdeprint/driver.h
+++ b/kdeprint/driver.h
@@ -71,7 +71,7 @@ public:
const TQString& get(const TQString& key) const { return m_map[key]; }
void set(const TQString& key, const TQString& val) { m_map[key] = val; }
- bool has(const TQString& key) const { return m_map.tqcontains(key); }
+ bool has(const TQString& key) const { return m_map.contains(key); }
const TQString& name() const { return m_name; }
void setName(const TQString& s) { m_name = s; }
bool conflict() const { return m_conflict; }
@@ -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.tqfind(name); }
+ DrPageSize* findPageSize(const TQString& name) { return m_pagesizes.find(name); }
void addPageSize(DrPageSize *sz);
void removeOptionGlobally(const TQString& name);
void removeGroupGlobally(DrGroup *grp);
diff --git a/kdeprint/droptionview.cpp b/kdeprint/droptionview.cpp
index 74d04bab9..f6ed93fff 100644
--- a/kdeprint/droptionview.cpp
+++ b/kdeprint/droptionview.cpp
@@ -219,7 +219,7 @@ void OptionListView::setOption(DrBase *opt)
void OptionListView::setValue(const TQString& val)
{
- m_list->setCurrentItem(m_choices.tqfindIndex(val));
+ m_list->setCurrentItem(m_choices.findIndex(val));
}
void OptionListView::slotSelectionChanged()
@@ -265,7 +265,7 @@ void OptionBooleanView::setOption(DrBase *opt)
void OptionBooleanView::setValue(const TQString& val)
{
- int ID = m_choices.tqfindIndex(val);
+ int ID = m_choices.findIndex(val);
m_group->setButton(ID);
}
diff --git a/kdeprint/foomatic/kmfoomaticmanager.cpp b/kdeprint/foomatic/kmfoomaticmanager.cpp
index 76ca31a4e..749bf160b 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().tqfind('/') != -1)
+ /*if (printer->name().find('/') != -1)
{
QString s(printer->name());
- int p = s.tqfind('/');
+ int p = s.find('/');
printer->setPrinterName(s.left(p));
printer->setInstanceName(s.mid(p+1));
printer->addType(KMPrinter::Virtual);
diff --git a/kdeprint/foomatic2loader.cpp b/kdeprint/foomatic2loader.cpp
index a258a8e4e..d2fb5b17d 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.tqfind( "VAR" ).data();
+ TQVariant v = m_foodata.find( "VAR" ).data();
if ( !v.isNull() && v.type() == TQVariant::Map )
{
DrMain *driver = new DrMain;
@@ -151,8 +151,8 @@ DrMain* Foomatic2Loader::buildDriver() const
driver->set( "matic_printer", v.mapFind( "id" ).data().toString() );
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.tqcontains( "POSTPIPE" ) )
- driver->set( "postpipe", m_foodata.tqfind( "POSTPIPE" ).data().toString() );
+ if ( m_foodata.contains( "POSTPIPE" ) )
+ driver->set( "postpipe", m_foodata.find( "POSTPIPE" ).data().toString() );
v = v.mapFind( "args" ).data();
if ( !v.isNull() && v.type() == TQVariant::List )
{
@@ -166,7 +166,7 @@ DrMain* Foomatic2Loader::buildDriver() const
{
TQString group = DrGroup::groupForOption( opt->name() );
DrGroup *grp = NULL;
- if ( !groups.tqcontains( group ) )
+ if ( !groups.contains( group ) )
{
grp = new DrGroup;
grp->set( "text", group );
@@ -211,7 +211,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const
TQValueList<DrBase*> optList;
DrGroup *grp = NULL;
- TQVariant V = m_foodata.tqfind( "VAR" ).data();
+ TQVariant V = m_foodata.find( "VAR" ).data();
if ( !V.isNull() && V.type() == TQVariant::Map )
{
TQVariant v = V.mapFind( "args" ).data();
diff --git a/kdeprint/kdeprintd.cpp b/kdeprint/kdeprintd.cpp
index e2a22e933..e607629cb 100644
--- a/kdeprint/kdeprintd.cpp
+++ b/kdeprint/kdeprintd.cpp
@@ -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.tqfind(pid);
+ StatusWindow *w = m_windows.find(pid);
if (!w && !msg.isEmpty())
{
w = new StatusWindow(pid);
diff --git a/kdeprint/kmdbentry.cpp b/kdeprint/kmdbentry.cpp
index 87bb76c6c..9402dd02c 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.tqfind(' ',0);
+ int p = model.find(' ',0);
if (p != -1) manufacturer = model.left(p);
if (manufacturer.isEmpty()) return false;
}
// extract manufacturer from model
- if (model.tqfind(manufacturer,0,false) == 0)
+ if (model.find(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 bf0872986..5c31cf5a9 100644
--- a/kdeprint/kmfactory.cpp
+++ b/kdeprint/kmfactory.cpp
@@ -333,7 +333,7 @@ KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name)
void KMFactory::registerObject(KPReloadObject *obj, bool priority)
{
// check if object already registered, then add it
- if (m_objects.tqfindRef(obj) == -1)
+ if (m_objects.findRef(obj) == -1)
{
if (priority)
m_objects.prepend(obj);
diff --git a/kdeprint/kmjobmanager.cpp b/kdeprint/kmjobmanager.cpp
index fcde4817f..3449e1bb2 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.tqfind(pr);
+ struct JobFilter *jf = m_filter.find(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.tqfind(pr);
+ struct JobFilter *jf = m_filter.find(pr);
if (jf)
{
jf->m_type[type] = QMAX(0, jf->m_type[type]-1);
diff --git a/kdeprint/kmmanager.cpp b/kdeprint/kmmanager.cpp
index e63fd8e4f..53d988a49 100644
--- a/kdeprint/kmmanager.cpp
+++ b/kdeprint/kmmanager.cpp
@@ -458,7 +458,7 @@ bool KMManager::createSpecialPrinter(KMPrinter *p)
bool KMManager::removeSpecialPrinter(KMPrinter *p)
{
- if (p && p->isSpecial() && m_printers.tqfindRef(p) != -1)
+ if (p && p->isSpecial() && m_printers.findRef(p) != -1)
{
m_printers.removeRef(p);
return m_specialmgr->savePrinters();
diff --git a/kdeprint/kmprinter.cpp b/kdeprint/kmprinter.cpp
index f08cf4109..5749a47c5 100644
--- a/kdeprint/kmprinter.cpp
+++ b/kdeprint/kmprinter.cpp
@@ -165,7 +165,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent)
fName = ( printer->docName() + "." + ext );
else
{
- int p = fName.tqfindRev( '.' );
+ int p = fName.findRev( '.' );
if ( p == -1 )
fName.append( "." ).append( ext );
else
@@ -216,7 +216,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent)
TQString KMPrinter::deviceProtocol() const
{
- int p = m_device.tqfind( ':' );
+ int p = m_device.find( ':' );
if ( p != -1 )
return m_device.left( p );
else
diff --git a/kdeprint/kmprinter.h b/kdeprint/kmprinter.h
index 3872800ed..7f527fb23 100644
--- a/kdeprint/kmprinter.h
+++ b/kdeprint/kmprinter.h
@@ -147,7 +147,7 @@ public:
void setOwnSoftDefault(bool on) { m_ownsoftdefault = on; }
static int compare(KMPrinter *p1, KMPrinter *p2);
const TQString& option(const TQString& key) const { return m_options[key]; }
- bool hasOption(const TQString& key) const { return m_options.tqcontains(key); }
+ bool hasOption(const TQString& key) const { return m_options.contains(key); }
void setOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_options[key] = value; }
void removeOption(const TQString& key) { m_options.remove(key); }
TQMap<TQString,TQString> options() const { return m_options; }
diff --git a/kdeprint/kmthreadjob.cpp b/kdeprint/kmthreadjob.cpp
index 02c148d95..0fe277ee1 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.tqfind(ID);
+ return m_jobs.find(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.tqfind(pid);
+ return m_jobs.find(pid);
}
return NULL;
}
@@ -150,7 +150,7 @@ void KMThreadJob::createJob(KMJob *job)
if (job->id() > 0)
{
loadJobs();
- if (!m_jobs.tqfind(job->id()))
+ if (!m_jobs.find(job->id()))
{
m_jobs.insert(job->id(),job);
saveJobs();
diff --git a/kdeprint/kpfilterpage.cpp b/kdeprint/kpfilterpage.cpp
index 3b3bc6164..fcea863a2 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.tqfind(dit.currentKey()) == filters.end())
+ if (filters.find(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.tqfind(*sit)) == 0)
+ if ((f=m_activefilters.find(*sit)) == 0)
{
f = KXmlCommandManager::self()->loadCommand(*sit);
if (f)
@@ -329,7 +329,7 @@ void KPFilterPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef)
TQStringList filters = activeList();
for (TQStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it)
{
- KXmlCommand *f = m_activefilters.tqfind(*it);
+ KXmlCommand *f = m_activefilters.find(*it);
if (f)
f->getOptions(opts, incldef);
}
@@ -355,7 +355,7 @@ KXmlCommand* KPFilterPage::currentFilter()
{
KXmlCommand *filter(0);
if (m_view->selectedItem())
- filter = m_activefilters.tqfind(m_view->selectedItem()->text(1));
+ filter = m_activefilters.find(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.tqfind(item->text(1));
+ KXmlCommand *f1 = m_activefilters.find(item->text(1));
if (f1 && item->nextSibling())
{
- KXmlCommand *f2 = m_activefilters.tqfind(item->nextSibling()->text(1));
+ KXmlCommand *f2 = m_activefilters.find(item->nextSibling()->text(1));
if (f2)
{
if (!f2->acceptMimeType(f1->mimeType()))
diff --git a/kdeprint/kpposterpage.cpp b/kdeprint/kpposterpage.cpp
index eef927f11..1fa7a23b5 100644
--- a/kdeprint/kpposterpage.cpp
+++ b/kdeprint/kpposterpage.cpp
@@ -265,7 +265,7 @@ void KPPosterPage::setOptions( const TQMap<TQString,TQString>& opts )
m_mediasize->setText( ps );
m_preview->setMediaSize( ps );
- if ( opts[ "_kde-filters" ].tqfind( "poster" ) != -1 )
+ if ( opts[ "_kde-filters" ].find( "poster" ) != -1 )
{
m_postercheck->setChecked( true );
ps = opts[ "_kde-poster-size" ];
@@ -302,7 +302,7 @@ void KPPosterPage::getOptions( TQMap<TQString,TQString>& opts, bool )
}
else
{
- if ( !o.tqcontains( "poster" ) )
+ if ( !o.contains( "poster" ) )
o.append( "poster" );
opts[ "_kde-filters" ] = o.join( "," );
opts[ "_kde-poster-media" ] = m_mediasize->text();
diff --git a/kdeprint/kpqtpage.cpp b/kdeprint/kpqtpage.cpp
index 4c1a67f38..4bf107389 100644
--- a/kdeprint/kpqtpage.cpp
+++ b/kdeprint/kpqtpage.cpp
@@ -262,15 +262,15 @@ void KPQtPage::setOptions(const TQMap<TQString,TQString>& opts)
DrListOption *opt = static_cast<DrListOption*>(driver()->findOption("PageSize"));
DrBase *ch = opt->findChoice(val);
if (ch)
- m_pagesize->setCurrentItem(opt->choices()->tqfindRef(ch));
+ m_pagesize->setCurrentItem(opt->choices()->findRef(ch));
}
}
else if (!opts["kde-pagesize"].isEmpty())
m_pagesize->setCurrentItem(findIndex(opts["kde-pagesize"].toInt()));
ID = NUP_1;
- if (opts["_kde-filters"].tqfind("psnup") != -1)
+ if (opts["_kde-filters"].find("psnup") != -1)
{
- if (opts.tqcontains("_kde-psnup-nup")) {
+ if (opts.contains("_kde-psnup-nup")) {
ID = opts["_kde-psnup-nup"].toInt();
if (ID == 1 || ID == 2 || ID == 4)
{
@@ -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.tqfind("psnup") == -1)
+ if (s.find("psnup") == -1)
{
TQStringList fl = TQStringList::split(',', s, false);
KXmlCommandManager::self()->insertCommand(fl, "psnup");
diff --git a/kdeprint/kprintdialog.cpp b/kdeprint/kprintdialog.cpp
index c62730fde..ebdc6ae42 100644
--- a/kdeprint/kprintdialog.cpp
+++ b/kdeprint/kprintdialog.cpp
@@ -800,7 +800,7 @@ void KPrintDialog::setOutputFileExtension(const TQString& ext)
{
KURL url( d->m_file->url() );
TQString f( url.fileName() );
- int p = f.tqfindRev( '.' );
+ int p = f.findRev( '.' );
// change "file.ext"; don't change "file", "file." or ".file" but do change ".file.ext"
if ( p > 0 && p != int (f.length () - 1) )
{
diff --git a/kdeprint/kprinter.cpp b/kdeprint/kprinter.cpp
index 4a7134435..edd924456 100644
--- a/kdeprint/kprinter.cpp
+++ b/kdeprint/kprinter.cpp
@@ -486,7 +486,7 @@ TQValueList<int> KPrinter::pageList() const
TQStringList ranges = TQStringList::split(',',option("kde-range"),false);
for (TQStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it)
{
- int p = (*it).tqfind('-');
+ int p = (*it).find('-');
bool ok;
if (p == -1)
{
@@ -638,7 +638,7 @@ void KPrinter::setOptions(const TQMap<TQString,TQString>& opts)
tmpset.remove( "kde-resolution" );
tmpset.remove( "kde-fonts" );
for (TQMap<TQString,TQString>::ConstIterator it=tmpset.begin();it!=tmpset.end();++it)
- if (it.key().left(4) == "kde-" && !(d->m_options.tqcontains(it.key())))
+ if (it.key().left(4) == "kde-" && !(d->m_options.contains(it.key())))
d->m_options[it.key()] = it.data();
}
@@ -880,9 +880,9 @@ void KPrinter::setPrintProgram(const TQString& prg)
else
{
TQString s(prg);
- if (s.tqfind("%in") == -1)
+ if (s.find("%in") == -1)
s.append(" %in");
- setOutputToFile( s.tqfind( "%out" ) != -1 );
+ setOutputToFile( s.find( "%out" ) != -1 );
setOption("kde-isspecial", "1");
setOption("kde-special-command", s);
}
diff --git a/kdeprint/kprinterimpl.cpp b/kdeprint/kprinterimpl.cpp
index 31294b9be..7d0d9477a 100644
--- a/kdeprint/kprinterimpl.cpp
+++ b/kdeprint/kprinterimpl.cpp
@@ -252,7 +252,7 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T
TQString command(cmd), filestr;
TQStringList printfiles;
- if (command.tqfind("%in") == -1) command.append(" %in");
+ if (command.find("%in") == -1) command.append(" %in");
for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
if (TQFile::exists(*it))
@@ -317,7 +317,7 @@ int KPrinterImpl::filterFiles(KPrinter *printer, TQStringList& files, bool flag)
!printer->option("kde-range").isEmpty() ||
printer->pageSet() != KPrinter::AllPages))
{
- if (flist.tqfindIndex("psselect") == -1)
+ if (flist.findIndex("psselect") == -1)
{
int index = KXmlCommandManager::self()->insertCommand(flist, "psselect", false);
if (index == -1 || !KXmlCommandManager::self()->checkCommand("psselect"))
@@ -379,7 +379,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ
for (TQStringList::Iterator it=files.begin(); it!=files.end(); ++it)
{
TQString mime = KMimeMagic::self()->findFileType(*it)->mimeType();
- if (inputMimeTypes.tqfind(mime) == inputMimeTypes.end())
+ if (inputMimeTypes.find(mime) == inputMimeTypes.end())
{
if (KMessageBox::warningContinueCancel(0,
"<p>" + i18n("The MIME type %1 is not supported as input of the filter chain "
@@ -491,7 +491,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool
it = files.remove( it );
continue;
}
- else if (mimeTypes.tqfindIndex(mime) == -1)
+ else if (mimeTypes.findIndex(mime) == -1)
{
if ((result=KMessageBox::warningYesNoCancel(NULL,
i18n("<qt>The file format <em> %1 </em> is not directly supported by the current print system. You "
diff --git a/kdeprint/kxmlcommand.cpp b/kdeprint/kxmlcommand.cpp
index fbe7ec545..55a208d88 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.tqfind(s) != d->m_inputMime.end());
+ return (d->m_inputMime.find(s) != d->m_inputMime.end());
}
TQStringList KXmlCommand::inputMimeTypes()
@@ -383,7 +383,7 @@ TQString KXmlCommand::buildCommand(const TQMap<TQString,TQString>& opts, bool pi
{
TQString format = dopt->get("format");
TQString value = dopt->valueText();
- if ( format.tqfind( quotedRe ) != -1 )
+ if ( format.find( 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)
{
TQDomElement elem = doc.createElement(tag);
- if (d->m_command.tqfind("%"+tag) != -1)
+ if (d->m_command.find("%"+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)
{
TQString cmdName = (*it2).left((*it2).length()-8);
- if (d->m_cmdlist.tqfind(cmdName) == d->m_cmdlist.end())
+ if (d->m_cmdlist.find(cmdName) == d->m_cmdlist.end())
d->m_cmdlist.append(cmdName);
}
}
@@ -676,7 +676,7 @@ TQString KXmlCommandManager::selectCommand(TQWidget *parent)
KXmlCommand* KXmlCommandManager::command(const TQString& xmlId) const
{
- return (d->m_cmdmap.tqcontains(xmlId) ? d->m_cmdmap[xmlId] : 0);
+ return (d->m_cmdmap.contains(xmlId) ? d->m_cmdmap[xmlId] : 0);
}
int KXmlCommandManager::insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart)
@@ -728,7 +728,7 @@ TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQSt
preload();
- if (d->m_mimemap.tqcontains(mimesrc))
+ if (d->m_mimemap.contains(mimesrc))
{
const TQValueList<KXmlCommand*> l = d->m_mimemap[mimesrc];
for (TQValueList<KXmlCommand*>::ConstIterator it=l.begin(); it!=l.end(); ++it)
@@ -752,7 +752,7 @@ TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQSt
// mime types. Just discard it. If the subchain contains also the current
// considered filter, then discard it: it denotes of a cycle in filter
// chain.
- if (subchain.count() > 0 && subchain.tqfindIndex((*it)->name()) == -1)
+ if (subchain.count() > 0 && subchain.findIndex((*it)->name()) == -1)
{
subchain.prepend((*it)->name());
if (subchain.count() < score || score == 0)
@@ -791,12 +791,12 @@ bool KXmlCommandManager::checkCommand(const TQString& xmlId, int inputCheck, int
TQString cmd = (xmlCmd ? xmlCmd->command() : xmlId);
if (status && !cmd.isEmpty() && (inputCheck > None || outputCheck > None))
{
- if (inputCheck > None && (cmd.tqfind("%in") == -1 || inputCheck == Advanced) && cmd.tqfind("%filterinput") == -1)
+ if (inputCheck > None && (cmd.find("%in") == -1 || inputCheck == Advanced) && cmd.find("%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.tqfind("%out") == -1 || outputCheck == Advanced) && cmd.tqfind("filteroutput") == -1)
+ if (status && outputCheck > None && (cmd.find("%out") == -1 || outputCheck == Advanced) && cmd.find("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/lpd/gschecker.cpp b/kdeprint/lpd/gschecker.cpp
index 012d3cd4d..23f6be0a6 100644
--- a/kdeprint/lpd/gschecker.cpp
+++ b/kdeprint/lpd/gschecker.cpp
@@ -48,7 +48,7 @@ void GsChecker::loadDriverList()
line = t.readLine().stripWhiteSpace();
if (ok)
{
- if (line.tqfind(':') != -1)
+ if (line.find(':') != -1)
break;
else
buffer.append(line).append(" ");
diff --git a/kdeprint/lpd/kmlpdmanager.cpp b/kdeprint/lpd/kmlpdmanager.cpp
index e5e641b68..54f6c312a 100644
--- a/kdeprint/lpd/kmlpdmanager.cpp
+++ b/kdeprint/lpd/kmlpdmanager.cpp
@@ -80,7 +80,7 @@ bool KMLpdManager::completePrinter(KMPrinter *printer)
bool KMLpdManager::completePrinterShort(KMPrinter *printer)
{
- PrintcapEntry *entry = m_entries.tqfind(printer->name());
+ PrintcapEntry *entry = m_entries.find(printer->name());
if (entry)
{
QString type(entry->comment(2)), driver(entry->comment(7)), lp(entry->arg("lp"));
@@ -299,11 +299,11 @@ void KMLpdManager::checkStatus()
line = t.readLine().stripWhiteSpace();
if (line.isEmpty())
continue;
- if ((p=line.tqfind(':')) != -1)
+ if ((p=line.find(':')) != -1)
printer = findPrinter(line.left(p));
else if (line.startsWith("printing") && printer)
- printer->setState(line.tqfind("enabled") != -1 ? KMPrinter::Idle : KMPrinter::Stopped);
- else if (line.tqfind("entries") != -1 && printer)
+ printer->setState(line.find("enabled") != -1 ? KMPrinter::Idle : KMPrinter::Stopped);
+ else if (line.find("entries") != -1 && printer)
if (!line.startsWith("no") && printer->state() == KMPrinter::Idle)
printer->setState(KMPrinter::Processing);
}
@@ -367,7 +367,7 @@ PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const TQString& name)
{
if (m_ptentries.count() == 0)
loadPrinttoolDb(driverDirectory()+"/printerdb");
- PrinttoolEntry *ent = m_ptentries.tqfind(name);
+ PrinttoolEntry *ent = m_ptentries.find(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.tqfind(name);
+ PrintcapEntry *ent = m_entries.find(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.tqfind('=')) != -1)
+ if ((p=line.find('=')) != -1)
{
name = line.left(p);
val = line.right(line.length()-p-1);
@@ -510,7 +510,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQSt
tout << "export ";
line.replace(0,7,TQString::tqfromLatin1(""));
}
- if ((p=line.tqfind('=')) != -1)
+ if ((p=line.find('=')) != -1)
{
name = line.left(p);
tout << name << '=' << options[name] << endl;
diff --git a/kdeprint/lpd/lpdtools.cpp b/kdeprint/lpd/lpdtools.cpp
index ee919ff95..ba96f31a0 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.tqfind('}',p1);
+ p2 = s.find('}',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.tqfind('|')) != -1)
+ if ((p=m_name.find('|')) != -1)
m_name = m_name.left(p);
m_args.clear();
for (uint i=1; i<l.count(); i++)
{
- int p = l[i].tqfind('=');
+ int p = l[i].find('=');
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.tqfind(':');
+ int p = line.find(':');
if (p != -1)
{
l.append(line.left(p));
- p = line.tqfind('{',p);
+ p = line.find('{',p);
if (p == -1)
l.append(line.right(line.length()-l[0].length()-1).stripWhiteSpace());
else
{
while (p != -1)
{
- int q = line.tqfind('}',p);
+ int q = line.find('}',p);
if (q != -1)
{
l.append(line.mid(p+1,q-p-1));
- p = line.tqfind('{',q);
+ p = line.find('{',q);
}
else break;
}
diff --git a/kdeprint/lpdunix/kmlpdunixmanager.cpp b/kdeprint/lpdunix/kmlpdunixmanager.cpp
index 5350b53f1..8e757a706 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].tqfind('|')) != -1)
+ if ((p=l[0].find('|')) != -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].tqfind('=')) != -1)
+ if ((p=l[i].find('=')) != -1)
entry[l[i].left(p).stripWhiteSpace()] = l[i].right(l[i].length()-p-1).stripWhiteSpace();
else
entry[l[i].stripWhiteSpace()] = TQString::null;
@@ -192,14 +192,14 @@ void KMLpdUnixManager::parseEtcPrintcap()
while (!t.eof())
{
entry = readEntry(t);
- if (entry.isEmpty() || !entry.tqcontains("printer-name") || entry.tqcontains("server"))
+ if (entry.isEmpty() || !entry.contains("printer-name") || entry.contains("server"))
continue;
if (entry["printer-name"] == "all")
{
- if (entry.tqcontains("all"))
+ if (entry.contains("all"))
{
// find separator
- int p = entry["all"].tqfind(TQRegExp("[^a-zA-Z0-9_\\s-]"));
+ int p = entry["all"].find(TQRegExp("[^a-zA-Z0-9_\\s-]"));
if (p != -1)
{
TQChar c = entry["all"][p];
@@ -216,7 +216,7 @@ void KMLpdUnixManager::parseEtcPrintcap()
else
{
KMPrinter *printer = ::createPrinter(entry);
- if (entry.tqcontains("rm"))
+ if (entry.contains("rm"))
printer->setDescription(i18n("Remote printer queue on %1").arg(entry["rm"]));
else
printer->setDescription(i18n("Local printer"));
@@ -254,18 +254,18 @@ void KMLpdUnixManager::parseEtcPrintersConf()
while (!t.eof())
{
entry = readEntry(t);
- if (entry.isEmpty() || !entry.tqcontains("printer-name"))
+ if (entry.isEmpty() || !entry.contains("printer-name"))
continue;
TQString prname = entry["printer-name"];
if (prname == "_default")
{
- if (entry.tqcontains("use"))
+ if (entry.contains("use"))
default_printer = entry["use"];
}
else if (prname != "_all")
{
KMPrinter *printer = ::createPrinter(entry);
- if (entry.tqcontains("bsdaddr"))
+ if (entry.contains("bsdaddr"))
{
TQStringList l = TQStringList::split(',',entry["bsdaddr"],false);
printer->setDescription(i18n("Remote printer queue on %1").arg(l[0]));
diff --git a/kdeprint/lpr/apshandler.cpp b/kdeprint/lpr/apshandler.cpp
index 57ac45311..641ff5e07 100644
--- a/kdeprint/lpr/apshandler.cpp
+++ b/kdeprint/lpr/apshandler.cpp
@@ -63,7 +63,7 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor
if (!shortmode)
{
TQMap<TQString,TQString> opts = loadResources(entry);
- if (opts.tqcontains("PRINTER"))
+ if (opts.contains("PRINTER"))
{
prt->setDescription(i18n("APS Driver (%1)").arg(opts["PRINTER"]));
prt->setDriverInfo(prt->description());
@@ -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.tqfind('=')) == -1)
+ if (line.isEmpty() || line[0] == '#' || (p = line.find('=')) == -1)
continue;
TQString variable = line.left(p).stripWhiteSpace();
TQString value = line.mid(p+1).stripWhiteSpace();
@@ -166,7 +166,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config
if (driver /* && config */ ) // Load resources in all case, to get the correct page size
{
TQMap<TQString,TQString> opts = loadResources(entry);
- if ( !config && opts.tqcontains( "PAPERSIZE" ) )
+ if ( !config && opts.contains( "PAPERSIZE" ) )
{
// this is needed to keep applications informed
// about the current selected page size
@@ -187,7 +187,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config
DrMain* ApsHandler::loadDbDriver(const TQString& s)
{
- int p = s.tqfind('/');
+ int p = s.find('/');
DrMain *driver = loadApsDriver(true);
if (driver)
driver->set("gsdriver", s.mid(p+1));
diff --git a/kdeprint/lpr/kmlprmanager.cpp b/kdeprint/lpr/kmlprmanager.cpp
index d9bcae5e1..64e593590 100644
--- a/kdeprint/lpr/kmlprmanager.cpp
+++ b/kdeprint/lpr/kmlprmanager.cpp
@@ -160,7 +160,7 @@ LprHandler* KMLprManager::findHandler(KMPrinter *prt)
{
TQString handlerstr(prt->option("kde-lpr-handler"));
LprHandler *handler(0);
- if (handlerstr.isEmpty() || (handler = m_handlers.tqfind(handlerstr)) == NULL)
+ if (handlerstr.isEmpty() || (handler = m_handlers.find(handlerstr)) == NULL)
{
return NULL;
}
@@ -169,7 +169,7 @@ LprHandler* KMLprManager::findHandler(KMPrinter *prt)
PrintcapEntry* KMLprManager::findEntry(KMPrinter *prt)
{
- PrintcapEntry *entry = m_entries.tqfind(prt->printerName());
+ PrintcapEntry *entry = m_entries.find(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.tqfind('/');
+ int p = filename.find('/');
TQString handler_str = (p != -1 ? filename.left(p) : TQString::tqfromLatin1("default"));
- LprHandler *handler = m_handlers.tqfind(handler_str);
+ LprHandler *handler = m_handlers.find(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.tqfind(prt->printerName());
+ PrintcapEntry *oldEntry = m_entries.find(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.tqfind(prt->driver()->get("handler"));
+ handler = m_handlers.find(prt->driver()->get("handler"));
else if (oldEntry)
handler = findHandler(prt);
else
- handler = m_handlers.tqfind("default");
+ handler = m_handlers.find("default");
if (!handler)
{
setErrorMsg(i18n("Internal error: no handler defined."));
diff --git a/kdeprint/lpr/lpchelper.cpp b/kdeprint/lpr/lpchelper.cpp
index 4fa32b8e0..7cf0bfebf 100644
--- a/kdeprint/lpr/lpchelper.cpp
+++ b/kdeprint/lpr/lpchelper.cpp
@@ -62,7 +62,7 @@ LpcHelper::~LpcHelper()
KMPrinter::PrinterState LpcHelper::state(const TQString& prname) const
{
- if (m_state.tqcontains(prname))
+ if (m_state.contains(prname))
return m_state[prname];
return KMPrinter::Unknown;
}
@@ -82,26 +82,26 @@ void LpcHelper::parseStatusLPR(TQTextStream &t)
line = t.readLine();
if (line.isEmpty())
continue;
- else if (!line[0].isSpace() && (p = line.tqfind(':')) != -1)
+ else if (!line[0].isSpace() && (p = line.find(':')) != -1)
{
printer = line.left(p);
m_state[printer] = KMPrinter::Idle;
}
- else if (line.tqfind("printing is disabled") != -1)
+ else if (line.find("printing is disabled") != -1)
{
if (!printer.isEmpty())
m_state[printer] = KMPrinter::PrinterState((KMPrinter::Stopped) | (m_state[printer] & ~KMPrinter::StateMask));
}
- else if (line.tqfind("queuing is disabled") != -1)
+ else if (line.find("queuing is disabled") != -1)
{
if (!printer.isEmpty())
m_state[printer] = KMPrinter::PrinterState((KMPrinter::Rejecting) | (m_state[printer] & KMPrinter::StateMask));
}
- else if (line.tqfind("entries") != -1)
+ else if (line.find("entries") != -1)
{
if (!printer.isEmpty() &&
(m_state[printer] & KMPrinter::StateMask) != KMPrinter::Stopped &&
- line.tqfind("no entries") == -1)
+ line.find("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].tqfind('@');
+ p = l[0].find('@');
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.tqfind("\n" + printer);
+ p = result.find("\n" + printer);
if (p != -1)
{
- q = result.tqfind(':', p)+2;
- p = result.tqfind('\n', q);
+ q = result.find(':', p)+2;
+ p = result.find('\n', q);
TQString answer = result.mid(q, p-q).stripWhiteSpace();
return answer;
}
@@ -274,9 +274,9 @@ bool LpcHelper::removeJob(KMJob *job, TQString& msg)
return false;
}
TQString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id()));
- if (result.tqfind("dequeued") != -1)
+ if (result.find("dequeued") != -1)
return true;
- else if (result.tqfind("Permission denied") != -1 || result.tqfind("no permissions") != -1)
+ else if (result.find("Permission denied") != -1 || result.find("no permissions") != -1)
msg = i18n("Permission denied.");
else
msg = i18n("Execution of lprm failed: %1").arg(result);
diff --git a/kdeprint/lpr/lpqhelper.cpp b/kdeprint/lpr/lpqhelper.cpp
index bbc70da3a..3bd1c514b 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.tqfind(' ', 61);
+ int p = line.find(' ', 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.tqfind('@', 7), q = line.tqfind(' ', 7);
+ int p = line.find('@', 7), q = line.find(' ', 7);
job->setOwner(line.mid(7, TQMIN(p,q)-7));
while (line[q].isSpace())
q++;
q++;
while (line[q].isSpace())
q++;
- p = line.tqfind(' ', q);
+ p = line.find(' ', q);
job->setId(line.mid(q, p-q).toInt());
while (line[p].isSpace())
p++;
diff --git a/kdeprint/lpr/lprhandler.cpp b/kdeprint/lpr/lprhandler.cpp
index 1cacfae85..d3fc4ee94 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.tqfind('@');
+ int p = val.find('@');
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.tqfind('%')) != -1)
+ else if ((p = val.find('%')) != -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 aea703ea5..2d94e9b18 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.tqfind("UNKNOWN") == -1)
+ entry->comment.find("UNKNOWN") == -1)
return true;
return false;
}
@@ -82,14 +82,14 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo
if (!(str=entry->field("ifhp")).isEmpty())
{
TQString model;
- int p = str.tqfind("model");
+ int p = str.find("model");
if (p != -1)
{
- p = str.tqfind('=', p);
+ p = str.find('=', p);
if (p != -1)
{
p++;
- int q = str.tqfind(',', p);
+ int q = str.find(',', 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.tqfind('=');
+ int p = line.find('=');
if (p != -1)
{
TQString 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.tqfind('/');
+ int p = s.find('/');
DrMain* driver = loadToolDriver(locate("data", "kdeprint/lprngtooldriver1"));
if (driver)
driver->set("driverID", s.mid(p+1));
@@ -209,13 +209,13 @@ TQValueList< TQPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(co
key = TQString::null;
if (line.contains('|') == 2 || line.right(7) == "BOOLEAN")
{
- int p = line.tqfind('|', 7);
+ int p = line.find('|', 7);
key = line.mid(7, p-7);
}
}
else if (line.startsWith("CHOICE"))
{
- int p = line.tqfind('|', 7);
+ int p = line.find('|', 7);
l << line.mid(7, p-7);
}
}
@@ -239,7 +239,7 @@ TQMap<TQString,TQString> LPRngToolHandler::parseZOptions(const TQString& optstr)
bool found(false);
for (TQValueList< TQPair<TQString,TQStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p)
{
- if ((*p).second.tqfind(*it) != (*p).second.end())
+ if ((*p).second.find(*it) != (*p).second.end())
{
opts[(*p).first] = (*it);
found = true;
diff --git a/kdeprint/lpr/matichandler.cpp b/kdeprint/lpr/matichandler.cpp
index 1625571d7..bd3307ad5 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.tqfind("usb") != -1)
+ if (val.find("usb") != -1)
url.setProtocol("usb");
else
url.setProtocol("parallel");
@@ -126,7 +126,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh
TQString MaticHandler::parsePostpipe(const TQString& s)
{
TQString url;
- int p = s.tqfindRev('|');
+ int p = s.findRev('|');
TQStringList args = TQStringList::split(" ", s.right(s.length()-p-1));
if (args.count() != 0)
@@ -167,7 +167,7 @@ TQString MaticHandler::parsePostpipe(const TQString& s)
else
{
TQString host = (args[i].length() == 2 ? args[i+1] : args[i].right(args[i].length()-2));
- int p = host.tqfind("\\@");
+ int p = host.find("\\@");
if (p != -1)
{
url = "lpd://" + host.right(host.length()-p-2) + "/" + host.left(p);
@@ -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.tqfind("'name'")) != -1)
+ else if ((p = line.find("'name'")) != -1)
{
- p = line.tqfind('\'', p+6)+1;
- q = line.tqfind('\'', p);
+ p = line.find('\'', p+6)+1;
+ q = line.find('\'', p);
optname = line.mid(p, q-p);
}
- else if ((p = line.tqfind("'default'")) != -1)
+ else if ((p = line.find("'default'")) != -1)
{
DrBase *opt = driver->findOption(optname);
if (opt)
@@ -372,7 +372,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename)
line = tin.readLine();
if (line.startsWith("*% COMDATA #"))
{
- if (line.tqfind("'default'") != -1)
+ if (line.find("'default'") != -1)
{
DrBase *opt = (optname.isEmpty() ? NULL : driver->findOption(optname));
if (opt)
diff --git a/kdeprint/lpr/matichelper.cpp b/kdeprint/lpr/matichelper.cpp
index acc968331..1da5f6313 100644
--- a/kdeprint/lpr/matichelper.cpp
+++ b/kdeprint/lpr/matichelper.cpp
@@ -29,7 +29,7 @@ TQString maticFile(PrintcapEntry *entry)
s = entry->field("filter_options");
if (!s.isEmpty())
{
- int p = s.tqfindRev(' ');
+ int p = s.findRev(' ');
if (p != -1)
s = s.mid(p+1);
}
diff --git a/kdeprint/lpr/printcapentry.h b/kdeprint/lpr/printcapentry.h
index e1c785760..a7f2cabcf 100644
--- a/kdeprint/lpr/printcapentry.h
+++ b/kdeprint/lpr/printcapentry.h
@@ -72,7 +72,7 @@ public:
TQMap<TQString,Field> fields;
TQString postcomment;
- bool has(const TQString& f) const { return fields.tqcontains(f); }
+ bool has(const TQString& f) const { return fields.contains(f); }
TQString field(const TQString& f) const { return fields[f].value; }
bool writeEntry(TQTextStream&);
void addField(const TQString& name, Field::Type type = Field::Boolean, const TQString& value = TQString::null);
diff --git a/kdeprint/lpr/printcapreader.cpp b/kdeprint/lpr/printcapreader.cpp
index 4a5ce5ea7..72a6e2903 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.tqfind(':');
+ int p = buf.find(':');
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).tqfind('=');
+ int p = (*it).find('=');
if (p == -1)
{
- p = (*it).tqfind('#');
+ p = (*it).find('#');
if (p == -1)
{
f.type = Field::Boolean;
- p = (*it).tqfind('@');
+ p = (*it).find('@');
if (p == -1)
{
f.name = (*it);
diff --git a/kdeprint/management/cjanuswidget.cpp b/kdeprint/management/cjanuswidget.cpp
index 856ab8a62..4163a87fe 100644
--- a/kdeprint/management/cjanuswidget.cpp
+++ b/kdeprint/management/cjanuswidget.cpp
@@ -241,7 +241,7 @@ CJanusWidget::CPage* CJanusWidget::findPage(TQListBoxItem *i)
TQListBoxItem* CJanusWidget::findPrevItem(CPage *p)
{
- if (m_pages.tqfindRef(p) == -1)
+ if (m_pages.findRef(p) == -1)
m_pages.last();
else
m_pages.prev();
diff --git a/kdeprint/management/kmconfigfilter.cpp b/kdeprint/management/kmconfigfilter.cpp
index ab643c341..967a67908 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.tqfind(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2);
+ KListBox *lb = (m_plist.find(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2);
lb->insertItem(SmallIcon(it.current()->pixmap()), it.current()->printerName());
}
}
diff --git a/kdeprint/management/kmdbcreator.cpp b/kdeprint/management/kmdbcreator.cpp
index fb76b5baf..7bdefbe0e 100644
--- a/kdeprint/management/kmdbcreator.cpp
+++ b/kdeprint/management/kmdbcreator.cpp
@@ -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.tqfind('\n');
+ int p = str.find('\n');
int n = str.mid(0, p).toInt(&ok);
// process the number received
diff --git a/kdeprint/management/kmdriverdb.cpp b/kdeprint/management/kmdriverdb.cpp
index ec5f8c42b..973be686e 100644
--- a/kdeprint/management/kmdriverdb.cpp
+++ b/kdeprint/management/kmdriverdb.cpp
@@ -110,23 +110,23 @@ void KMDriverDB::slotDbCreated()
KMDBEntryList* KMDriverDB::findEntry(const TQString& manu, const TQString& model)
{
- TQDict<KMDBEntryList> *models = m_entries.tqfind(manu);
+ TQDict<KMDBEntryList> *models = m_entries.find(manu);
if (models)
- return models->tqfind(model);
+ return models->find(model);
return 0;
}
KMDBEntryList* KMDriverDB::findPnpEntry(const TQString& manu, const TQString& model)
{
- TQDict<KMDBEntryList> *models = m_pnpentries.tqfind(manu);
+ TQDict<KMDBEntryList> *models = m_pnpentries.find(manu);
if (models)
- return models->tqfind(model);
+ return models->find(model);
return 0;
}
TQDict<KMDBEntryList>* KMDriverDB::findModels(const TQString& manu)
{
- return m_entries.tqfind(manu);
+ return m_entries.find(manu);
}
void KMDriverDB::insertEntry(KMDBEntry *entry)
@@ -140,14 +140,14 @@ void KMDriverDB::insertEntry(KMDBEntry *entry)
}
// insert it in normal entries
- TQDict<KMDBEntryList> *models = m_entries.tqfind(entry->manufacturer);
+ TQDict<KMDBEntryList> *models = m_entries.find(entry->manufacturer);
if (!models)
{
models = new TQDict<KMDBEntryList>(17,false);
models->setAutoDelete(true);
m_entries.insert(entry->manufacturer,models);
}
- KMDBEntryList *list = models->tqfind(entry->model);
+ KMDBEntryList *list = models->find(entry->model);
if (!list)
{
list = new KMDBEntryList;
@@ -159,14 +159,14 @@ void KMDriverDB::insertEntry(KMDBEntry *entry)
if (!entry->pnpmanufacturer.isEmpty() && !entry->pnpmodel.isEmpty())
{
// insert it in PNP entries
- models = m_pnpentries.tqfind(entry->manufacturer);
+ models = m_pnpentries.find(entry->manufacturer);
if (!models)
{
models = new TQDict<KMDBEntryList>(17,false);
models->setAutoDelete(true);
m_pnpentries.insert(entry->manufacturer,models);
}
- list = models->tqfind(entry->model);
+ list = models->find(entry->model);
if (!list)
{
list = new KMDBEntryList;
@@ -209,7 +209,7 @@ void KMDriverDB::loadDbFile()
line = t.readLine().stripWhiteSpace();
if (line.isEmpty())
continue;
- int p = line.tqfind('=');
+ int p = line.find('=');
if (p == -1)
continue;
words.clear();
diff --git a/kdeprint/management/kmdriverdbwidget.cpp b/kdeprint/management/kmdriverdbwidget.cpp
index d67377485..e8a00c44d 100644
--- a/kdeprint/management/kmdriverdbwidget.cpp
+++ b/kdeprint/management/kmdriverdbwidget.cpp
@@ -95,17 +95,17 @@ KMDriverDbWidget::~KMDriverDbWidget()
void KMDriverDbWidget::setDriver(const TQString& manu, const TQString& model)
{
- TQListBoxItem *item = m_manu->tqfindItem(manu);
+ TQListBoxItem *item = m_manu->findItem(manu);
TQString model_(model);
if (item)
{
m_manu->setCurrentItem(item);
- item = m_model->tqfindItem(model_);
+ item = m_model->findItem(model_);
if (!item)
// try by stripping the manufacturer name from
// the beginning of the model string. This is
// often the case with PPD files
- item = m_model->tqfindItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1("")));
+ item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1("")));
if (item)
m_model->setCurrentItem(item);
}
@@ -203,11 +203,11 @@ void KMDriverDbWidget::slotPostscriptToggled(bool on)
{
if (on)
{
- TQListBoxItem *item = m_manu->tqfindItem("GENERIC");
+ TQListBoxItem *item = m_manu->findItem("GENERIC");
if (item)
{
m_manu->setCurrentItem(item);
- item = m_model->tqfindItem( "POSTSCRIPT PRINTER" );
+ item = m_model->findItem( "POSTSCRIPT PRINTER" );
if ( item )
{
m_model->setCurrentItem( item );
diff --git a/kdeprint/management/kminstancepage.cpp b/kdeprint/management/kminstancepage.cpp
index 47bae6132..a2d024546 100644
--- a/kdeprint/management/kminstancepage.cpp
+++ b/kdeprint/management/kminstancepage.cpp
@@ -121,9 +121,9 @@ void KMInstancePage::setPrinter(KMPrinter *p)
//iif (!oldText.isEmpty())
//{
- TQListBoxItem *item = m_view->tqfindItem(oldText);
+ TQListBoxItem *item = m_view->findItem(oldText);
if (!item)
- item = m_view->tqfindItem(i18n("(Default)"));
+ item = m_view->findItem(i18n("(Default)"));
if (item)
m_view->setSelected(item,true);
//}
@@ -138,7 +138,7 @@ void KMInstancePage::slotNew()
i18n("(Default)"),&ok,this);
if (ok)
{
- if (name.tqfind(TQRegExp("[/\\s]")) != -1)
+ if (name.find(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.tqfind(TQRegExp("[/\\s]")) != -1)
+ if (name.find(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 ebdfacf81..508595998 100644
--- a/kdeprint/management/kmjobviewer.cpp
+++ b/kdeprint/management/kmjobviewer.cpp
@@ -586,7 +586,7 @@ void KMJobViewer::loadPluginActions()
KAction *act = actionCollection()->action("job_restart");
for (int i=0;i<act->containerCount();i++)
{
- if (menuBar()->tqfindItem(act->itemId(i), &menu))
+ if (menuBar()->findItem(act->itemId(i), &menu))
{
menuindex = mpopindex = menu->indexOf(act->itemId(i))+1;
break;
diff --git a/kdeprint/management/kmspecialprinterdlg.cpp b/kdeprint/management/kmspecialprinterdlg.cpp
index c444091e7..346e858f4 100644
--- a/kdeprint/management/kmspecialprinterdlg.cpp
+++ b/kdeprint/management/kmspecialprinterdlg.cpp
@@ -186,7 +186,7 @@ void KMSpecialPrinterDlg::setPrinter(KMPrinter *printer)
{
m_command->setCommand(printer->option("kde-special-command"));
m_usefile->setChecked(printer->option("kde-special-file") == "1");
- int index = m_mimelist.tqfindIndex(printer->option("kde-special-mimetype"));
+ int index = m_mimelist.findIndex(printer->option("kde-special-mimetype"));
m_mimetype->setCurrentItem(index == -1 ? 0 : index);
m_extension->setText(printer->option("kde-special-extension"));
m_name->setText(printer->name());
diff --git a/kdeprint/management/kmwbackend.cpp b/kdeprint/management/kmwbackend.cpp
index 0a2958737..d05564115 100644
--- a/kdeprint/management/kmwbackend.cpp
+++ b/kdeprint/management/kmwbackend.cpp
@@ -104,7 +104,7 @@ void KMWBackend::updatePrinter(KMPrinter *p)
TQString s = m_buttons->selected()->text();
s.replace(TQRegExp("&(?=\\w)"), TQString::tqfromLatin1(""));
p->setOption("kde-backend-description",s);
- setNextPage((m_map.tqcontains(ID) ? m_map[ID] : KMWizard::Error));
+ setNextPage((m_map.contains(ID) ? m_map[ID] : KMWizard::Error));
}
void KMWBackend::addBackend( int ID, bool on, int nextpage )
diff --git a/kdeprint/management/kmwclass.cpp b/kdeprint/management/kmwclass.cpp
index 77544b08f..2e27db0c9 100644
--- a/kdeprint/management/kmwclass.cpp
+++ b/kdeprint/management/kmwclass.cpp
@@ -94,7 +94,7 @@ void KMWClass::initPrinter(KMPrinter *p)
{
TQPtrListIterator<KMPrinter> it(*list);
for (;it.current();++it)
- if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.tqcontains(it.current()->name()))
+ if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.contains(it.current()->name()))
m_list1->insertItem(SmallIcon(it.current()->pixmap()), it.current()->name());
m_list1->sort();
}
diff --git a/kdeprint/management/kmwdriver.cpp b/kdeprint/management/kmwdriver.cpp
index 45ce3afe7..d0a38e17d 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.tqfind( ' ' );
+ int p = autoDetect.find( ' ' );
if ( p != -1 )
{
TQString manu = autoDetect.left( p ), model = autoDetect.mid( p+1 );
diff --git a/kdeprint/management/kmwizard.cpp b/kdeprint/management/kmwizard.cpp
index 2a3fca450..fead7c4e3 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.tqfind(page);
+ KMWizardPage *p = m_pagepool.find(page);
if (p)
p->setNextPage(next);
}
void KMWizard::setCurrentPage(int ID, bool back)
{
- KMWizardPage *page = m_pagepool.tqfind(ID);
+ KMWizardPage *page = m_pagepool.find(ID);
if (!page)
{
KMessageBox::error(this,i18n("Unable to find the requested page."),i18n("Add Printer Wizard"));
diff --git a/kdeprint/management/kmwlocal.cpp b/kdeprint/management/kmwlocal.cpp
index af283af7d..c581bdf3c 100644
--- a/kdeprint/management/kmwlocal.cpp
+++ b/kdeprint/management/kmwlocal.cpp
@@ -78,7 +78,7 @@ bool KMWLocal::isValid(TQString& msg)
msg = i18n("The URI is empty","Empty URI.");
return false;
}
- else if (m_uris.tqfindIndex(m_localuri->text()) == -1)
+ else if (m_uris.findIndex(m_localuri->text()) == -1)
{
if (KMessageBox::warningContinueCancel(this, i18n("The local URI doesn't correspond to a detected port. Continue?")) == KMessageBox::Cancel)
{
@@ -173,7 +173,7 @@ void KMWLocal::initialize()
++it;
TQString uri = *it;
- int p = uri.tqfind( ':' );
+ int p = uri.find( ':' );
TQString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : TQString::null );
TQString printer = *(++it);
int index(-1);
diff --git a/kdeprint/management/kmwname.cpp b/kdeprint/management/kmwname.cpp
index 43f6f3fad..d46b104a7 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).tqfind(TQRegExp("\\s")) != -1)
+ else if (text(0).find(TQRegExp("\\s")) != -1)
{
QString conv = text(0);
conv.replace(TQRegExp("\\s"), "");
diff --git a/kdeprint/management/kmwsocketutil.cpp b/kdeprint/management/kmwsocketutil.cpp
index 31dad2249..a8a89e3ad 100644
--- a/kdeprint/management/kmwsocketutil.cpp
+++ b/kdeprint/management/kmwsocketutil.cpp
@@ -209,7 +209,7 @@ TQString localRootIP()
if (infos.count() > 0)
{
TQString IPstr = infos.first()->address()->nodeName();
- int p = IPstr.tqfindRev('.');
+ int p = IPstr.findRev('.');
IPstr.truncate(p);
return IPstr;
}
diff --git a/kdeprint/management/kxmlcommanddlg.cpp b/kdeprint/management/kxmlcommanddlg.cpp
index 9d6688001..474f9b61b 100644
--- a/kdeprint/management/kxmlcommanddlg.cpp
+++ b/kdeprint/management/kxmlcommanddlg.cpp
@@ -52,7 +52,7 @@
TQString generateId(const TQMap<TQString, DrBase*>& map)
{
int index(-1);
- while (map.tqcontains(TQString::tqfromLatin1("item%1").arg(++index))) ;
+ while (map.contains(TQString::tqfromLatin1("item%1").arg(++index))) ;
return TQString::tqfromLatin1("item%1").arg(index);
}
@@ -454,7 +454,7 @@ void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item)
m_name->setText(item->text(1));
m_desc->setText(item->text(0));
- DrBase *opt = (m_opts.tqcontains(item->text(1)) ? m_opts[item->text(1)] : 0);
+ DrBase *opt = (m_opts.contains(item->text(1)) ? m_opts[item->text(1)] : 0);
if (opt)
{
bool isgroup = (opt->type() < DrBase::String);
@@ -498,8 +498,8 @@ void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item)
m_addopt->setEnabled(isgroup);
TQListViewItem *prevItem = findPrev(item), *nextItem = findNext(item);
- DrBase *prevOpt = (prevItem && m_opts.tqcontains(prevItem->text(1)) ? m_opts[prevItem->text(1)] : 0);
- DrBase *nextOpt = (nextItem && m_opts.tqcontains(nextItem->text(1)) ? m_opts[nextItem->text(1)] : 0);
+ DrBase *prevOpt = (prevItem && m_opts.contains(prevItem->text(1)) ? m_opts[prevItem->text(1)] : 0);
+ DrBase *nextOpt = (nextItem && m_opts.contains(nextItem->text(1)) ? m_opts[nextItem->text(1)] : 0);
m_up->setEnabled(prevOpt && !(prevOpt->type() < DrBase::String && opt->type() >= DrBase::String));
m_down->setEnabled(nextOpt && !(isgroup && nextOpt->type() >= DrBase::String));
@@ -571,7 +571,7 @@ void KXmlCommandAdvancedDlg::slotApplyChanges()
m_apply->setEnabled(false);
- DrBase *opt = (m_opts.tqcontains(item->text(1)) ? m_opts[item->text(1)] : 0);
+ DrBase *opt = (m_opts.contains(item->text(1)) ? m_opts[item->text(1)] : 0);
m_opts.remove(item->text(1));
delete opt;
@@ -735,9 +735,9 @@ void KXmlCommandAdvancedDlg::slotMoveDown()
void KXmlCommandAdvancedDlg::slotCommandChanged(const TQString& cmd)
{
- m_inputfile->parentWidget()->setEnabled(cmd.tqfind("%filterinput") != -1);
- m_outputfile->parentWidget()->setEnabled(cmd.tqfind("%filteroutput") != -1);
- m_view->setEnabled(cmd.tqfind("%filterargs") != -1);
+ 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());
slotSelectionChanged((m_view->isEnabled() ? m_view->currentItem() : 0));
m_view->setOpen(m_view->firstChild(), m_view->isEnabled());
@@ -751,7 +751,7 @@ void KXmlCommandAdvancedDlg::slotValueSelected(TQListViewItem *item)
void KXmlCommandAdvancedDlg::slotOptionRenamed(TQListViewItem *item, int)
{
- if (item && m_opts.tqcontains(item->text(1)))
+ if (item && m_opts.contains(item->text(1)))
{
DrBase *opt = m_opts[item->text(1)];
opt->set("text", item->text(0));
@@ -767,7 +767,7 @@ void KXmlCommandAdvancedDlg::recreateGroup(TQListViewItem *item, DrGroup *grp)
TQListViewItem *child = item->firstChild();
while (child)
{
- DrBase *opt = (m_opts.tqcontains(child->text(1)) ? m_opts[child->text(1)] : 0);
+ DrBase *opt = (m_opts.contains(child->text(1)) ? m_opts[child->text(1)] : 0);
if (opt)
{
if (opt->type() == DrBase::Group)
@@ -807,7 +807,7 @@ bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, TQWidget *parent)
xmlcmd->setComment( xmldlg->m_comment->text().replace( TQRegExp( "\n" ), " " ) );
// need to recreate the driver tree structure
- DrMain *driver = (xmldlg->m_opts.tqcontains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0);
+ DrMain *driver = (xmldlg->m_opts.contains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0);
if (!driver && xmldlg->m_opts.count() > 0)
{
kdDebug() << "KXmlCommandAdvancedDlg: driver structure not found, creating one" << endl;
@@ -951,7 +951,7 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd)
item->setRenameEnabled(0, true);
}
- int index = m_mimelist.tqfindIndex(xmlCmd->mimeType());
+ int index = m_mimelist.findIndex(xmlCmd->mimeType());
if (index != -1)
m_mimetype->setCurrentItem(index);
else
@@ -964,7 +964,7 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd)
for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it)
{
m_selectedmime->insertItem(*it);
- delete m_availablemime->tqfindItem(*it, TQt::ExactMatch);
+ delete m_availablemime->findItem(*it, TQt::ExactMatch);
}
}
diff --git a/kdeprint/management/kxmlcommandselector.cpp b/kdeprint/management/kxmlcommandselector.cpp
index 8162c7b6c..f46222fba 100644
--- a/kdeprint/management/kxmlcommandselector.cpp
+++ b/kdeprint/management/kxmlcommandselector.cpp
@@ -137,7 +137,7 @@ void KXmlCommandSelector::loadCommands()
}
m_cmd->insertStringList(desclist);
- int index = m_cmdlist.tqfindIndex(thisCmd);
+ int index = m_cmdlist.findIndex(thisCmd);
if (index != -1)
m_cmd->setCurrentItem(index);
if (m_cmd->currentItem() != -1 && m_cmd->isEnabled())
@@ -156,7 +156,7 @@ TQString KXmlCommandSelector::command() const
void KXmlCommandSelector::setCommand(const TQString& cmd)
{
- int index = m_cmdlist.tqfindIndex(cmd);
+ int index = m_cmdlist.findIndex(cmd);
if (m_usefilter)
m_usefilter->setChecked(index != -1);
@@ -176,7 +176,7 @@ void KXmlCommandSelector::slotAddCommand()
{
bool added(true);
- if (m_cmdlist.tqfindIndex(cmdId) != -1)
+ if (m_cmdlist.findIndex(cmdId) != -1)
{
if (KMessageBox::warningContinueCancel(
this,
diff --git a/kdeprint/management/networkscanner.cpp b/kdeprint/management/networkscanner.cpp
index ab025748b..73466cdbb 100644
--- a/kdeprint/management/networkscanner.cpp
+++ b/kdeprint/management/networkscanner.cpp
@@ -80,7 +80,7 @@ TQString NetworkScanner::NetworkScannerPrivate::localPrefix()
if (infos.count() > 0)
{
TQString IPstr = infos.first()->address()->nodeName();
- int p = IPstr.tqfindRev('.');
+ int p = IPstr.findRev('.');
IPstr.truncate(p);
return IPstr;
}
diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp
index bbe2a07f9..f13670591 100644
--- a/kdeprint/management/smbview.cpp
+++ b/kdeprint/management/smbview.cpp
@@ -140,7 +140,7 @@ void SmbView::init()
while (!smb_stream.atEnd ())
{
TQString smb_line = smb_stream.readLine ();
- if (smb_line.tqcontains (wins_keyword, FALSE) > 0)
+ if (smb_line.contains (wins_keyword, FALSE) > 0)
{
TQString key = smb_line.section ('=', 0, 0);
key = key.stripWhiteSpace();
@@ -216,7 +216,7 @@ void SmbView::processGroups()
clear();
for (TQStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it)
{
- int p = (*it).tqfind("<1d>");
+ int p = (*it).find("<1d>");
if (p == -1)
continue;
TQListViewItem *item = new TQListViewItem(this,(*it).left(p).stripWhiteSpace());
diff --git a/kdeprint/messagewindow.cpp b/kdeprint/messagewindow.cpp
index 77931d165..4f64f8edb 100644
--- a/kdeprint/messagewindow.cpp
+++ b/kdeprint/messagewindow.cpp
@@ -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.tqfind( parent );
+ MessageWindow *w = m_windows.find( 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.tqfind( parent );
+ delete m_windows.find( parent );
}
void MessageWindow::change( TQWidget *parent, const TQString& txt )
{
if ( parent )
{
- MessageWindow *w = m_windows.tqfind( parent );
+ MessageWindow *w = m_windows.find( parent );
if ( w )
w->setText( txt );
else
diff --git a/kdeprint/plugincombobox.cpp b/kdeprint/plugincombobox.cpp
index 02934b0d9..414f38601 100644
--- a/kdeprint/plugincombobox.cpp
+++ b/kdeprint/plugincombobox.cpp
@@ -81,7 +81,7 @@ void PluginComboBox::reload()
{
TQString syst = KMFactory::self()->printSystem();
int index(-1);
- if ((index=m_pluginlist.tqfindIndex(syst)) != -1)
+ if ((index=m_pluginlist.findIndex(syst)) != -1)
m_combo->setCurrentItem(index);
configChanged();
}
diff --git a/kdeprint/posterpreview.cpp b/kdeprint/posterpreview.cpp
index c4685f719..8afa0e295 100644
--- a/kdeprint/posterpreview.cpp
+++ b/kdeprint/posterpreview.cpp
@@ -139,7 +139,7 @@ void PosterPreview::drawContents( TQPainter *painter )
{
for ( int j=0; j<m_cols; j++, x+=m_pw )
{
- bool selected = ( m_selectedpages.tqfind( i*m_cols+j+1 ) != m_selectedpages.end() );
+ bool selected = ( m_selectedpages.find( 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.tqfind( pagenum ) == m_selectedpages.end() ||
+ if ( m_selectedpages.find( pagenum ) == m_selectedpages.end() ||
!( e->state() & TQt::ShiftButton ) )
{
if ( !( e->state() & TQt::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 ).tqfind( '-' ) ) == -1 )
+ if ( ( p = ( *it ).find( '-' ) ) == -1 )
m_selectedpages.append( ( *it ).toInt() );
else
{
diff --git a/kdeprint/ppdloader.cpp b/kdeprint/ppdloader.cpp
index 32721a45b..9fbecc774 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.tqfind( ' ', p1 );
+ p2 = s.find( ' ', p1 );
if ( p2 != -1 )
{
l.append( s.mid( p1, p2-p1 ).toFloat() );
@@ -220,7 +220,7 @@ bool PPDLoader::endUi( const TQString& name )
else
grp = m_groups.top();
grp->addOption( m_option );
- if ( grp->get( "text" ).tqcontains( "install", false ) )
+ if ( grp->get( "text" ).contains( "install", false ) )
m_option->set( "fixed", "1" );
}
m_option = 0;
@@ -431,7 +431,7 @@ bool PPDLoader::putPaperDimension( const TQString& name, const TQString& s )
{
TQValueList<float> l = splitNumberString( s );
- PS_private *ps = m_ps.tqfind( name );
+ PS_private *ps = m_ps.find( 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.tqfind( name );
+ PS_private *ps = m_ps.find( name );
if ( !ps )
{
ps = new PS_private;
diff --git a/kdeprint/ppdscanner.cpp b/kdeprint/ppdscanner.cpp
index 213e08507..7eb0f22e7 100644
--- a/kdeprint/ppdscanner.cpp
+++ b/kdeprint/ppdscanner.cpp
@@ -933,7 +933,7 @@ YY_RULE_SETUP
case 24:
YY_RULE_SETUP
#line 100 "./ppdscanner.l"
-{ yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].tqcontains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; }
+{ yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].contains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; }
YY_BREAK
case 25:
YY_RULE_SETUP
diff --git a/kdeprint/ppdscanner.l b/kdeprint/ppdscanner.l
index 851ee290e..60a63f035 100644
--- a/kdeprint/ppdscanner.l
+++ b/kdeprint/ppdscanner.l
@@ -97,7 +97,7 @@ L [[:alnum:]]
/**
* Value state
*/
-<value>\"[^\"]*\" { yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].tqcontains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; }
+<value>\"[^\"]*\" { yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].contains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; }
<value>{WORD} { yylval = yytext; QDEBUG1("String part: %s",yytext); return STRINGPART; }
<value>"/" { BEGIN(translation_2); return '/'; }
<value>"\n" { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); }
diff --git a/kdeprint/printerfilter.cpp b/kdeprint/printerfilter.cpp
index 2590f41a4..a6f02f077 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.tqfind(prt->printerName()) != m_printers.end())
+ m_printers.find(prt->printerName()) != m_printers.end())
return true;
else
return false;
diff --git a/kdeprint/rlpr/kmrlprmanager.cpp b/kdeprint/rlpr/kmrlprmanager.cpp
index 3a5460dda..467f6c58e 100644
--- a/kdeprint/rlpr/kmrlprmanager.cpp
+++ b/kdeprint/rlpr/kmrlprmanager.cpp
@@ -59,7 +59,7 @@ bool KMRlprManager::createPrinter(KMPrinter *p)
bool KMRlprManager::removePrinter(KMPrinter *p)
{
- if (m_printers.tqfindRef(p) == -1)
+ if (m_printers.findRef(p) == -1)
setErrorMsg(i18n("Printer not found."));
else
{
diff --git a/kdeprint/rlpr/kmwrlpr.cpp b/kdeprint/rlpr/kmwrlpr.cpp
index 5e87be982..2f1d8b076 100644
--- a/kdeprint/rlpr/kmwrlpr.cpp
+++ b/kdeprint/rlpr/kmwrlpr.cpp
@@ -140,7 +140,7 @@ void KMWRlpr::initialize()
line = t.readLine().stripWhiteSpace();
if (line.isEmpty())
continue;
- if ((p=line.tqfind(':')) != -1)
+ if ((p=line.find(':')) != -1)
{
host = line.left(p).stripWhiteSpace();
TQListViewItem *hitem = new TQListViewItem(m_view,host);
@@ -180,7 +180,7 @@ void KMWRlpr::initialize()
}
if (buffer.isEmpty())
continue;
- int p = buffer.tqfind(':');
+ int p = buffer.find(':');
if (p != -1)
{
TQString name = buffer.left(p);
diff --git a/kdeprint/treecombobox.cpp b/kdeprint/treecombobox.cpp
index d36db7092..b0fde0f11 100644
--- a/kdeprint/treecombobox.cpp
+++ b/kdeprint/treecombobox.cpp
@@ -44,7 +44,7 @@ TreeListBoxItem::TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQStr
else
{
TQString parentStr = txt.left(txt.length()-m_path[m_depth].length()-1);
- TreeListBoxItem *parentItem = static_cast<TreeListBoxItem*>(lb->tqfindItem(parentStr, TQt::ExactMatch));
+ TreeListBoxItem *parentItem = static_cast<TreeListBoxItem*>(lb->findItem(parentStr, TQt::ExactMatch));
if (!parentItem)
{
// parent not found, add parent first into QListBox
diff --git a/kdeprint/util.cpp b/kdeprint/util.cpp
index 28e9afcba..f47db5017 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.tqfind('@');
+ int p = s.find('@');
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://"
TQString username = s.mid(6, p-6);
url = KURL("smb://" + KURL::encode_string(s.mid(p+1)));
- int q = username.tqfind(':');
+ int q = username.find(':');
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.tqfind( '/', p );
+ int p1 = uri.find( '/', p );
if ( p1 != -1 )
{
- int p2 = uri.tqfind( '@', p );
+ int p2 = uri.find( '@', p );
if ( p2 != -1 && p2 < p1 )
{
// Got a user
- int p3 = uri.tqfind( ':', p );
+ int p3 = uri.find( ':', p );
if ( p3 != -1 && p3 < p2 )
{
// Got a password