From 4c6f8d69e2d1501837affb472c4eb8fec4462240 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- NewsLog.txt | 2 +- README.Kolab | 2 +- akregator/COPYING | 4 +- akregator/src/actionmanagerimpl.cpp | 4 +- akregator/src/addfeeddialog.cpp | 2 +- akregator/src/akregator_part.cpp | 2 +- akregator/src/akregator_view.cpp | 8 +- akregator/src/article.cpp | 8 +- akregator/src/articlefilter.cpp | 2 +- akregator/src/articlelistview.cpp | 6 +- akregator/src/articleviewer.cpp | 6 +- akregator/src/articleviewer.rc | 2 +- akregator/src/feed.cpp | 10 +- akregator/src/feediconmanager.cpp | 8 +- akregator/src/feedlist.cpp | 4 +- akregator/src/feedlistview.cpp | 4 +- akregator/src/feedstorage.h | 2 +- akregator/src/feedstoragedummyimpl.cpp | 76 ++++++------- akregator/src/feedstoragedummyimpl.h | 2 +- akregator/src/fetchqueue.cpp | 2 +- akregator/src/folder.cpp | 6 +- akregator/src/frame.cpp | 2 +- akregator/src/librss/tools_p.cpp | 26 ++--- akregator/src/mk4storage/feedstoragemk4impl.cpp | 10 +- akregator/src/mk4storage/feedstoragemk4impl.h | 2 +- akregator/src/mk4storage/metakit/CHANGES | 2 +- .../src/mk4storage/metakit/include/mk4str.inl | 6 +- akregator/src/mk4storage/metakit/src/store.cpp | 2 +- akregator/src/mk4storage/storagemk4impl.cpp | 2 +- akregator/src/nodelist.cpp | 6 +- akregator/src/pageviewer.cpp | 2 +- akregator/src/pageviewer.rc | 2 +- akregator/src/plugin.cpp | 4 +- akregator/src/progressmanager.cpp | 2 +- akregator/src/simplenodeselector.cpp | 2 +- akregator/src/speechclient.cpp | 2 +- akregator/src/storagedummyimpl.cpp | 14 +-- akregator/src/storagefactoryregistry.cpp | 2 +- akregator/src/tabwidget.cpp | 12 +- akregator/src/tagnode.cpp | 6 +- akregator/src/tagnode.h | 2 +- akregator/src/tagnodelist.cpp | 2 +- akregator/src/tagset.cpp | 12 +- akregator/src/tagset.h | 4 +- akregator/src/treenode.cpp | 4 +- akregator/src/treenode.h | 2 +- akregator/src/utils.cpp | 4 +- akregator/src/viewer.cpp | 4 +- certmanager/certificateinfowidgetimpl.cpp | 2 +- certmanager/certificatewizardimpl.cpp | 2 +- certmanager/certmanager.cpp | 6 +- certmanager/conf/dirservconfigpage.cpp | 2 +- certmanager/kleopatraui.rc | 2 +- .../lib/backends/qgpgme/gnupgprocessbase.cpp | 4 +- .../lib/backends/qgpgme/qgpgmecryptoconfig.cpp | 12 +- certmanager/lib/cryptplugwrapper.cpp | 12 +- certmanager/lib/cryptplugwrapperlist.cpp | 2 +- certmanager/lib/kleo/dn.cpp | 2 +- certmanager/lib/kleo/downloadjob.h | 2 +- certmanager/lib/tests/test.data | 4 +- certmanager/lib/tests/test_gnupgprocessbase.cpp | 2 +- certmanager/lib/ui/cryptoconfigmodule.cpp | 2 +- .../lib/ui/dnattributeorderconfigwidget.cpp | 2 +- doc/api/Doxyfile.pim | 2 +- indexlib/GPL_V2 | 4 +- indexlib/boost-compat/config/suffix.hpp | 4 +- indexlib/stringset.h | 2 +- kabc/frontend/mainWindow.ui.h | 12 +- kabc/kabc2mutt/kabc2mutt.cpp | 14 +-- kaddressbook/addresseditwidget.cpp | 4 +- kaddressbook/addresseeeditorwidget.cpp | 2 +- kaddressbook/addviewdialog.cpp | 2 +- kaddressbook/common/locationmap.cpp | 20 ++-- kaddressbook/customfieldswidget.cpp | 6 +- kaddressbook/distributionlistpicker.cpp | 4 +- kaddressbook/editors/imaddresswidget.cpp | 2 +- kaddressbook/editors/imeditorwidget.cpp | 16 +-- kaddressbook/extensionmanager.cpp | 14 +-- kaddressbook/features/distributionlistwidget.cpp | 4 +- kaddressbook/features/resourceselection.cpp | 4 +- kaddressbook/filtereditdialog.cpp | 4 +- kaddressbook/geowidget.cpp | 6 +- kaddressbook/jumpbuttonbar.cpp | 2 +- kaddressbook/kabcore.cpp | 14 +-- kaddressbook/kablock.cpp | 4 +- kaddressbook/kabtools.cpp | 16 +-- kaddressbook/kcmconfigs/kabldapconfig.desktop | 2 +- kaddressbook/keywidget.cpp | 4 +- kaddressbook/phoneeditwidget.cpp | 10 +- kaddressbook/printing/kabentrypainter.cpp | 4 +- kaddressbook/printing/mikesstyle.cpp | 4 +- kaddressbook/printing/printingwizard.cpp | 2 +- kaddressbook/printing/printstyle.cpp | 2 +- kaddressbook/searchmanager.cpp | 6 +- kaddressbook/thumbnailcreator/ldifvcardcreator.cpp | 4 +- kaddressbook/typecombo.h | 2 +- kaddressbook/viewmanager.cpp | 10 +- kaddressbook/views/cardview.cpp | 30 ++--- kaddressbook/xxport/csv_xxport.cpp | 2 +- kaddressbook/xxport/csvimportdialog.cpp | 2 +- kaddressbook/xxport/eudora_xxport.cpp | 20 ++-- kaddressbook/xxport/eudora_xxport.h | 2 +- kaddressbook/xxport/gnokii_xxport.cpp | 38 +++---- kaddressbook/xxport/opera_xxport.cpp | 6 +- kaddressbook/xxport/vcard_xxport.cpp | 2 +- kaddressbook/xxportselectdialog.cpp | 2 +- kalarm/COPYING | 4 +- kalarm/alarmcalendar.cpp | 2 +- kalarm/alarmevent.cpp | 36 +++--- kalarm/alarmlistview.cpp | 6 +- kalarm/alarmtext.cpp | 12 +- kalarm/birthdaydlg.cpp | 2 +- kalarm/calendarcompat.cpp | 8 +- kalarm/dcophandler.cpp | 2 +- kalarm/editdlg.cpp | 4 +- kalarm/eventlistviewbase.cpp | 4 +- kalarm/functions.cpp | 4 +- kalarm/kalarmapp.cpp | 26 ++--- kalarm/kalarmd/adcalendar.cpp | 8 +- kalarm/kalarmd/alarmdaemon.cpp | 6 +- kalarm/kalarmd/clientinfo.cpp | 4 +- kalarm/kalarmui.rc | 2 +- kalarm/kamail.cpp | 24 ++-- kalarm/karecurrence.cpp | 2 +- kalarm/lib/colourcombo.cpp | 2 +- kalarm/lib/colourlist.h | 8 +- kalarm/lib/lineedit.cpp | 2 +- kalarm/lib/messagebox.cpp | 2 +- kalarm/lib/shellprocess.cpp | 2 +- kalarm/lib/spinbox.cpp | 4 +- kalarm/lib/synchtimer.cpp | 2 +- kalarm/lib/timespinbox.cpp | 4 +- kalarm/mainwindow.cpp | 2 +- kalarm/messagewin.cpp | 4 +- kalarm/prefdlg.cpp | 12 +- kalarm/preferences.cpp | 4 +- kalarm/undo.cpp | 10 +- kalarm/undo.h | 2 +- kandy/COPYING | 4 +- kandy/src/atcommand.cpp | 8 +- karm/desktoptracker.cpp | 2 +- karm/kaccelmenuwatch.cpp | 4 +- karm/karmstorage.cpp | 50 ++++----- karm/karmutility.cpp | 2 +- karm/taskview.cpp | 6 +- karm/timekard.cpp | 12 +- kdgantt/KDGanttMinimizeSplitter.cpp | 2 +- kdgantt/KDGanttView.cpp | 2 +- kdgantt/KDGanttViewItem.cpp | 10 +- kdgantt/KDGanttViewItem.h | 2 +- kdgantt/KDGanttViewTaskLink.cpp | 6 +- kdgantt/KDGanttViewTaskLinkGroup.cpp | 10 +- kdgantt/KDGanttViewTaskLinkGroup.h | 2 +- kfile-plugins/vcf/kfile_vcf.cpp | 2 +- kgantt/COPYING | 4 +- kgantt/kgantt/KGanttItem.cpp | 2 +- kgantt/kgantt/KGanttItem.h | 2 +- kgantt/kgantt/KGanttRelation.h | 2 +- kgantt/kgantt/xQGanttBarViewPort.cpp | 2 +- kgantt/kgantt/xQGanttBarViewPort_Events.cpp | 22 ++-- kioslaves/imap4/imap4.cc | 68 ++++++------ kioslaves/imap4/imapinfo.cc | 30 ++--- kioslaves/imap4/imaplist.cc | 12 +- kioslaves/imap4/imapparser.cc | 36 +++--- kioslaves/imap4/imapparser.h | 4 +- kioslaves/imap4/mailaddress.cc | 4 +- kioslaves/imap4/mailheader.cc | 8 +- kioslaves/imap4/mimehdrline.cc | 10 +- kioslaves/imap4/mimeheader.cc | 30 ++--- kioslaves/imap4/mimeheader.h | 4 +- kioslaves/imap4/mimeio.cc | 8 +- kioslaves/imap4/rfcdecoder.cc | 12 +- kioslaves/imap4/rfcdecoder.h | 2 +- kioslaves/mbox/readmbox.cc | 2 +- kioslaves/mbox/stat.cc | 2 +- kioslaves/mbox/urlinfo.cc | 2 +- kioslaves/opengroupware/webdavhandler.cpp | 2 +- kioslaves/sieve/sieve.cpp | 18 +-- kitchensync/src/addresseediffalgo.cpp | 4 +- kitchensync/src/calendardiffalgo.cpp | 4 +- kitchensync/src/configguisyncmlhttp.cpp | 6 +- kitchensync/src/configguisyncmlobex.cpp | 6 +- kitchensync/src/groupconfigcommon.cpp | 2 +- kitchensync/src/kwidgetlist.cpp | 6 +- kitchensync/src/syncprocess.cpp | 2 +- kmail/Mainpage.dox | 2 +- kmail/accountdialog.cpp | 42 +++---- kmail/accountmanager.cpp | 6 +- kmail/accountmanager.h | 2 +- kmail/accountwizard.cpp | 8 +- kmail/actionscheduler.cpp | 8 +- kmail/antispamconfig.cpp | 2 +- kmail/antispamwizard.cpp | 6 +- kmail/archivefolderdialog.cpp | 2 +- kmail/bodyvisitor.cpp | 6 +- kmail/cachedimapjob.cpp | 24 ++-- kmail/callback.cpp | 12 +- kmail/chiasmuskeyselector.cpp | 2 +- kmail/configuredialog.cpp | 16 +-- kmail/configuredialog_p.cpp | 10 +- kmail/encodingdetector.cpp | 12 +- kmail/favoritefolderview.cpp | 10 +- kmail/folderIface.cpp | 2 +- kmail/folderdiaacltab.cpp | 8 +- kmail/folderjob.h | 2 +- kmail/foldersetselector.cpp | 2 +- kmail/folderstorage.cpp | 20 ++-- kmail/folderstorage.h | 4 +- kmail/foldertreebase.h | 2 +- kmail/folderviewtooltip.h | 2 +- kmail/headerlistquicksearch.cpp | 6 +- kmail/headerstrategy.cpp | 4 +- kmail/imapaccountbase.cpp | 22 ++-- kmail/imapaccountbase.h | 4 +- kmail/imapjob.cpp | 22 ++-- kmail/importjob.cpp | 2 +- kmail/keyresolver.cpp | 2 +- kmail/khtmlparthtmlwriter.cpp | 2 +- kmail/kmaccount.cpp | 2 +- kmail/kmacctcachedimap.cpp | 8 +- kmail/kmacctimap.cpp | 4 +- kmail/kmaddrbook.cpp | 12 +- kmail/kmail.kcfg | 4 +- kmail/kmailicalifaceimpl.cpp | 60 +++++----- kmail/kmcommands.cpp | 52 ++++----- kmail/kmcomposewin.cpp | 42 +++---- kmail/kmdict.cpp | 4 +- kmail/kmdict.h | 4 +- kmail/kmedit.cpp | 18 +-- kmail/kmfilter.cpp | 20 ++-- kmail/kmfilteraction.cpp | 40 +++---- kmail/kmfiltermgr.cpp | 4 +- kmail/kmfolder.cpp | 16 +-- kmail/kmfolder.h | 4 +- kmail/kmfoldercachedimap.cpp | 54 ++++----- kmail/kmfoldercombobox.cpp | 4 +- kmail/kmfolderdir.cpp | 4 +- kmail/kmfolderimap.cpp | 62 +++++------ kmail/kmfolderindex.h | 4 +- kmail/kmfoldermaildir.cpp | 22 ++-- kmail/kmfoldermbox.cpp | 18 +-- kmail/kmfoldermgr.cpp | 4 +- kmail/kmfoldermgr.h | 4 +- kmail/kmfoldersearch.cpp | 20 ++-- kmail/kmfoldersearch.h | 2 +- kmail/kmfoldertree.cpp | 24 ++-- kmail/kmheaders.cpp | 20 ++-- kmail/kmkernel.cpp | 34 +++--- kmail/kmmainwidget.cpp | 44 ++++---- kmail/kmmainwin.cpp | 6 +- kmail/kmmessage.cpp | 78 ++++++------- kmail/kmmessage.h | 2 +- kmail/kmmsgbase.cpp | 40 +++---- kmail/kmmsgbase.h | 4 +- kmail/kmmsgdict.cpp | 20 ++-- kmail/kmmsgdict.h | 2 +- kmail/kmmsgpart.cpp | 14 +-- kmail/kmmsgpartdlg.cpp | 6 +- kmail/kmreaderwin.cpp | 16 +-- kmail/kmsearchpattern.cpp | 20 ++-- kmail/kmsearchpattern.h | 4 +- kmail/kmsender.cpp | 12 +- kmail/kmservertest.cpp | 8 +- kmail/kmstartup.cpp | 2 +- kmail/kmsystemtray.cpp | 2 +- kmail/kmtransport.cpp | 6 +- kmail/listjob.cpp | 2 +- kmail/mailinglist-magic.cpp | 40 +++---- kmail/mailinglistpropertiesdialog.cpp | 2 +- kmail/mboxjob.cpp | 2 +- kmail/messagecomposer.cpp | 6 +- kmail/messagecopyhelper.cpp | 2 +- kmail/messageproperty.cpp | 14 +-- kmail/mh2kmailr | 4 +- kmail/networkaccount.cpp | 8 +- kmail/newfolderdialog.cpp | 2 +- kmail/objecttreeparser.cpp | 66 +++++------ kmail/objecttreeparser.h | 2 +- kmail/partNode.cpp | 2 +- kmail/popaccount.cpp | 16 +-- kmail/recipientseditor.cpp | 6 +- kmail/recipientspicker.cpp | 8 +- kmail/renamejob.cpp | 2 +- kmail/rulewidgethandlermanager.cpp | 4 +- kmail/scalix.cpp | 2 +- kmail/searchjob.cpp | 4 +- kmail/searchwindow.cpp | 8 +- kmail/simplefoldertree.h | 2 +- kmail/snippetwidget.cpp | 10 +- kmail/templateparser.cpp | 10 +- kmail/tests/messagedicttests.cpp | 10 +- kmail/tests/mimelibtests.cpp | 8 +- kmail/tests/utiltests.cpp | 4 +- kmail/tips | 4 +- kmail/transportmanager.cpp | 2 +- kmail/urlhandlermanager.cpp | 4 +- kmail/vacation.cpp | 24 ++-- kmailcvt/filter_evolution.cxx | 6 +- kmailcvt/filter_evolution_v2.cxx | 10 +- kmailcvt/filter_pmail.cxx | 4 +- kmailcvt/filter_thebat.cxx | 6 +- kmailcvt/filter_thunderbird.cxx | 10 +- kmobile/devices/gnokii/gnokii_mobile.cpp | 2 +- kmobile/devices/gnokii/gnokiiconfig.cpp | 2 +- kmobile/kioslave/kio_mobile.cpp | 4 +- kmobile/kmobileitem.cpp | 6 +- knode/ChangeLog | 2 +- knode/articlewidget.cpp | 20 ++-- knode/filters/1.fltr | 4 +- knode/filters/2.fltr | 4 +- knode/filters/3.fltr | 4 +- knode/filters/4.fltr | 4 +- knode/filters/5.fltr | 4 +- knode/filters/6.fltr | 4 +- knode/filters/7.fltr | 4 +- knode/filters/8.fltr | 4 +- knode/knaccountmanager.cpp | 2 +- knode/knarticle.cpp | 2 +- knode/knarticlefactory.cpp | 18 +-- knode/knarticlemanager.cpp | 2 +- knode/kncollectionviewitem.cpp | 4 +- knode/kncomposer.cpp | 50 ++++----- knode/kncomposerui.rc | 8 +- knode/knconfig.cpp | 10 +- knode/knconfigwidgets.cpp | 4 +- knode/knconvert.cpp | 2 +- knode/knfiltermanager.cpp | 4 +- knode/knfolder.cpp | 8 +- knode/kngroup.cpp | 14 +-- knode/kngroup.h | 2 +- knode/kngroupbrowser.cpp | 12 +- knode/kngroupmanager.cpp | 8 +- knode/knmainwidget.cpp | 10 +- knode/knnntpclient.cpp | 6 +- knode/knsearchdialog.cpp | 2 +- knode/knserverinfo.cpp | 4 +- knode/knstringfilter.cpp | 10 +- knode/utilities.cpp | 4 +- knotes/knote.cpp | 26 ++--- knotes/knote.h | 4 +- knotes/knotesapp.cpp | 16 +-- knotes/knotesapp.h | 2 +- knotes/knotesappui.rc | 2 +- knotes/knotesnetrecv.cpp | 2 +- kode/automakefile.cpp | 8 +- kode/class.cpp | 6 +- kode/file.cpp | 2 +- kode/kodemain.cpp | 20 ++-- kode/kwsdl/compiler.cpp | 2 +- kode/kwsdl/converter.cpp | 2 +- kode/kwsdl/kung/loader.cpp | 2 +- kode/kwsdl/namemapper.cpp | 2 +- kode/kwsdl/parser.cpp | 2 +- kode/kwsdl/schema/parser.cpp | 2 +- kode/kwsdl/schema/qualifiedname.cpp | 2 +- kode/kwsdl/schema/simpletype.cpp | 2 +- kode/kwsdl/typemapper.cpp | 18 +-- kode/kxml_compiler/creator.cpp | 4 +- kode/kxml_compiler/kxml_compiler.cpp | 4 +- kode/kxml_compiler/parser.cpp | 6 +- kode/printer.cpp | 8 +- konsolekalendar/COPYING | 4 +- konsolekalendar/ROADMAP | 2 +- konsolekalendar/konsolekalendarexports.cpp | 14 +-- kontact/Thoughts | 2 +- kontact/interfaces/core.cpp | 2 +- kontact/plugins/kmail/kcmkmailsummary.cpp | 8 +- kontact/plugins/kmail/summarywidget.cpp | 2 +- kontact/plugins/korganizer/summarywidget.cpp | 4 +- kontact/plugins/newsticker/kcmkontactknt.cpp | 4 +- kontact/plugins/specialdates/sdsummarywidget.cpp | 2 +- kontact/plugins/summary/kcmkontactsummary.cpp | 2 +- kontact/plugins/summary/summaryview_part.cpp | 30 ++--- kontact/plugins/weather/summarywidget.cpp | 2 +- kontact/src/aboutdialog.cpp | 2 +- kontact/src/mainwindow.cpp | 6 +- kontact/src/profilemanager.cpp | 14 +-- korganizer/COPYING | 4 +- korganizer/actionmanager.cpp | 14 +-- korganizer/calendarview.cpp | 10 +- korganizer/calendarview.h | 2 +- korganizer/customlistviewitem.h | 2 +- korganizer/eventarchiver.cpp | 4 +- korganizer/freebusymanager.cpp | 34 +++--- korganizer/journalentry.cpp | 6 +- korganizer/koagenda.cpp | 12 +- korganizer/koagendaitem.cpp | 4 +- korganizer/koagendaview.cpp | 4 +- korganizer/koattendeeeditor.cpp | 6 +- korganizer/kocore.cpp | 8 +- korganizer/koeditorattachments.cpp | 6 +- korganizer/koeditorfreebusy.cpp | 2 +- korganizer/koeditorrecurrence.cpp | 2 +- korganizer/koeventeditor.cpp | 4 +- korganizer/koincidenceeditor.cpp | 6 +- korganizer/kojournaleditor.cpp | 4 +- korganizer/kojournalview.cpp | 2 +- korganizer/kolistview.cpp | 2 +- korganizer/komailclient.cpp | 6 +- korganizer/koprefs.cpp | 10 +- korganizer/koprefsdialog.cpp | 14 +-- korganizer/korgac/alarmdialog.cpp | 2 +- korganizer/korganizer_part.rc | 2 +- korganizer/korganizeriface.h | 2 +- korganizer/korganizerui.rc | 2 +- korganizer/kotimelineview.cpp | 2 +- korganizer/kotodoeditor.cpp | 4 +- korganizer/kotodoview.cpp | 16 +-- korganizer/kotodoviewitem.cpp | 2 +- korganizer/kowhatsnextview.cpp | 2 +- korganizer/mailscheduler.cpp | 2 +- korganizer/plugins/projectview/koprojectview.cpp | 4 +- korganizer/printing/calprintdefaultplugins.cpp | 2 +- korganizer/printing/calprinter.cpp | 2 +- korganizer/printing/calprintpluginbase.cpp | 6 +- korganizer/printing/cellitem.cpp | 2 +- korganizer/resourceview.cpp | 12 +- korganizer/searchdialog.cpp | 2 +- korganizer/templatemanagementdialog.cpp | 2 +- korganizer/templatemanagementdialog.h | 2 +- korganizer/urihandler.cpp | 4 +- korn/account_input.cpp | 4 +- korn/accountmanager.cpp | 2 +- korn/dcopdrop.cpp | 8 +- korn/imap_proto.cpp | 20 ++-- korn/kconf_update/korn-3-4-config_change.cpp | 4 +- korn/kio.cpp | 28 ++--- korn/kio_count.cpp | 2 +- korn/kio_proto.cpp | 6 +- korn/kornaccountcfgimpl.cpp | 8 +- korn/maildir_proto.h | 2 +- korn/mailsubject.cpp | 2 +- korn/pop3_proto.cpp | 20 ++-- korn/pop3_proto.h | 4 +- korn/protocols.cpp | 2 +- kresources/birthdays/resourcekabc.cpp | 2 +- kresources/birthdays/resourcekabcconfig.cpp | 2 +- kresources/blogging/API_Blogger.cpp | 8 +- kresources/blogging/xmlrpcjob.cpp | 2 +- kresources/caldav/preferences.cpp | 30 ++--- kresources/caldav/resource.cpp | 42 +++---- kresources/carddav/preferences.cpp | 10 +- kresources/carddav/resource.cpp | 4 +- kresources/carddav/writer.cpp | 8 +- kresources/egroupware/debugdialog.cpp | 6 +- kresources/egroupware/kabc_resourcexmlrpc.cpp | 8 +- kresources/egroupware/kcal_resourcexmlrpc.cpp | 8 +- kresources/egroupware/todostatemapper.cpp | 4 +- kresources/egroupware/xmlrpciface.cpp | 8 +- kresources/exchange/dateset.cpp | 18 +-- kresources/exchange/dateset.h | 10 +- kresources/exchange/resourceexchange.cpp | 8 +- .../featureplan/kcal_resourcefeatureplan.cpp | 2 +- kresources/groupdav/groupdavglobals.cpp | 4 +- .../groupware/kabc_resourcegroupwareconfig.cpp | 2 +- kresources/groupwise/kabc_resourcegroupwise.cpp | 6 +- .../groupwise/kabc_resourcegroupwiseconfig.cpp | 6 +- kresources/groupwise/kioslave/groupwise.cpp | 12 +- kresources/groupwise/soap/contactconverter.cpp | 6 +- kresources/groupwise/soap/groupwiseserver.cpp | 8 +- kresources/groupwise/soap/gwjobs.cpp | 4 +- kresources/groupwise/soap/ksslsocket.cpp | 4 +- kresources/groupwise/soap/soapC.cpp | 2 +- kresources/groupwise/soap/soapStub.h | 2 +- kresources/groupwise/soap/stdsoap2.h | 4 +- kresources/kolab/kabc/contact.cpp | 10 +- kresources/kolab/kabc/resourcekolab.cpp | 32 +++--- kresources/kolab/kcal/resourcekolab.cpp | 88 +++++++-------- kresources/kolab/knotes/resourcekolab.cpp | 18 +-- kresources/kolab/shared/kmailconnection.cpp | 4 +- kresources/lib/calendaradaptor.cpp | 4 +- kresources/lib/folderconfig.cpp | 12 +- kresources/lib/folderlister.cpp | 12 +- kresources/lib/folderlistview.cpp | 30 ++--- kresources/lib/folderlistview.h | 6 +- kresources/lib/groupwaredataadaptor.cpp | 6 +- kresources/lib/groupwaredataadaptor.h | 2 +- kresources/lib/groupwaredownloadjob.cpp | 18 +-- kresources/lib/webdavhandler.cpp | 4 +- .../newexchange/exchangeconvertercalendar.cpp | 2 +- .../newexchange/exchangeconvertercontact.cpp | 2 +- kresources/newexchange/exchangeglobals.cpp | 6 +- kresources/scalix/kabc/resourcescalix.cpp | 32 +++--- kresources/scalix/kcal/resourcescalix.cpp | 58 +++++----- kresources/scalix/kioslave/scalix.cpp | 8 +- kresources/scalix/knotes/resourcescalix.cpp | 12 +- kresources/scalix/scalixadmin/otherusermanager.cpp | 2 +- kresources/slox/kabcresourceslox.cpp | 14 +-- kresources/slox/kcalresourceslox.cpp | 6 +- kresources/slox/sloxaccounts.cpp | 10 +- kresources/slox/sloxfolderdialog.cpp | 2 +- kresources/slox/sloxfoldermanager.cpp | 2 +- kresources/tvanytime/COPYING | 4 +- kresources/tvanytime/kcal_resourcetvanytime.cpp | 8 +- ktnef/lib/ktnefparser.cpp | 10 +- ktnef/lib/ktnefpropertyset.cpp | 10 +- ktnef/lib/ktnefwriter.cpp | 4 +- ktnef/lib/mapi.cpp | 4 +- libemailfunctions/email.cpp | 12 +- libemailfunctions/idmapper.cpp | 10 +- libkcal/COPYING | 2 +- libkcal/assignmentvisitor.cpp | 2 +- libkcal/assignmentvisitor.h | 2 +- libkcal/attachmenthandler.cpp | 22 ++-- libkcal/attachmenthandler.h | 6 +- libkcal/calendar.cpp | 6 +- libkcal/calendarresources.cpp | 14 +-- libkcal/calfilter.cpp | 2 +- libkcal/calhelper.cpp | 4 +- libkcal/compat.cpp | 14 +-- libkcal/customproperties.cpp | 8 +- libkcal/dndfactory.cpp | 2 +- libkcal/dummyscheduler.cpp | 2 +- libkcal/htmlexport.cpp | 56 +++++----- libkcal/icalformatimpl.cpp | 2 +- libkcal/incidence.cpp | 2 +- libkcal/incidencebase.cpp | 2 +- libkcal/incidenceformatter.cpp | 66 +++++------ libkcal/listbase.h | 2 +- libkcal/person.cpp | 2 +- libkcal/qtopiaformat.cpp | 4 +- libkcal/recurrence.cpp | 26 ++--- libkcal/recurrence.h | 8 +- libkcal/recurrencerule.cpp | 4 +- libkcal/resourcecached.cpp | 6 +- libkcal/resourcelocaldir.cpp | 2 +- libkcal/vcalformat.cpp | 32 +++--- libkdenetwork/libgpgme-copy/assuan/assuan-defs.h | 2 +- libkdenetwork/libgpgme-copy/assuan/assuan.h | 4 +- libkdenetwork/libgpgme-copy/gpgme/ChangeLog | 2 +- libkdepim/addresseediffalgo.cpp | 4 +- libkdepim/addresseeemailselection.cpp | 2 +- libkdepim/addresseelineedit.cpp | 40 +++---- libkdepim/addresseeselector.cpp | 8 +- libkdepim/addresseeview.cpp | 26 ++--- libkdepim/addressesdialog.cpp | 12 +- libkdepim/calendardiffalgo.cpp | 4 +- libkdepim/categoryselectdialog.cpp | 2 +- libkdepim/designerfields.cpp | 6 +- libkdepim/diffalgo.cpp | 2 +- libkdepim/kabcresourcecached.cpp | 10 +- libkdepim/kcmdesignerfields.cpp | 8 +- libkdepim/kdateedit.cpp | 6 +- libkdepim/kfileio.h | 2 +- libkdepim/kimportdialog.cpp | 24 ++-- libkdepim/kmailcompletion.cpp | 8 +- libkdepim/kmailcompletion.h | 2 +- libkdepim/komposer/core/core.cpp | 2 +- libkdepim/komposer/core/pluginmanager.cpp | 4 +- libkdepim/komposer/core/prefsmodule.cpp | 2 +- .../komposer/plugins/default/defaulteditor.cpp | 6 +- libkdepim/kpimprefs.cpp | 2 +- libkdepim/kpixmapregionselectorwidget.cpp | 2 +- libkdepim/kprefsdialog.cpp | 4 +- libkdepim/kregexp3.cpp | 10 +- libkdepim/kregexp3.h | 6 +- libkdepim/kscoring.cpp | 34 +++--- libkdepim/ksubscription.cpp | 2 +- libkdepim/kwidgetlister.cpp | 2 +- libkdepim/kxface.cpp | 8 +- libkdepim/ldapclient.cpp | 8 +- libkdepim/linklocator.cpp | 22 ++-- libkdepim/pluginloaderbase.cpp | 4 +- libkdepim/progressdialog.cpp | 16 +-- libkdepim/progressmanager.cpp | 2 +- libkdepim/qutf7codec.cpp | 2 +- libkdepim/spellingfilter.cpp | 12 +- libkdepim/tests/test_kregexp.cpp | 2 +- libkholidays/kholidays.cpp | 2 +- libkholidays/parseholiday.c | 2 +- libkholidays/parseholiday.h | 2 +- libkmime/kmime_content.cpp | 26 ++--- libkmime/kmime_content.h | 2 +- libkmime/kmime_headers.cpp | 58 +++++----- libkmime/kmime_headers.h | 6 +- libkmime/kmime_mdn.cpp | 4 +- libkmime/kmime_message.cpp | 2 +- libkmime/kmime_newsarticle.cpp | 2 +- libkmime/kmime_parsers.cpp | 48 ++++---- libkmime/kmime_util.cpp | 24 ++-- libkmime/kqcstringsplitter.cpp | 8 +- libkmime/tests/run_codec_tests | 2 +- libkpgp/kpgp.cpp | 32 +++--- libkpgp/kpgpbase.cpp | 4 +- libkpgp/kpgpbase2.cpp | 122 ++++++++++----------- libkpgp/kpgpbase5.cpp | 90 +++++++-------- libkpgp/kpgpbase6.cpp | 90 +++++++-------- libkpgp/kpgpbaseG.cpp | 92 ++++++++-------- libkpgp/kpgpkey.cpp | 2 +- libkpgp/kpgpui.cpp | 8 +- libkpimexchange/core/exchangeaccount.cpp | 6 +- libkpimexchange/core/exchangeclient.cpp | 2 +- libkpimexchange/core/exchangedownload.cpp | 4 +- libkpimexchange/core/exchangemonitor.cpp | 8 +- libkpimexchange/core/exchangeupload.cpp | 12 +- libkpimidentities/identity.cpp | 4 +- libkpimidentities/identitycombo.cpp | 6 +- libkpimidentities/identitymanager.cpp | 6 +- mimelib/LICENSE | 4 +- mimelib/Tutorial | 4 +- mimelib/binhex.cpp | 4 +- mimelib/doc/addrlist.html | 2 +- mimelib/doc/body.html | 4 +- mimelib/doc/bodypart.html | 2 +- mimelib/doc/entity.html | 4 +- mimelib/doc/field.html | 8 +- mimelib/doc/headers.html | 2 +- mimelib/doc/mailbox.html | 4 +- mimelib/doc/mboxlist.html | 2 +- mimelib/doc/message.html | 4 +- mimelib/doc/string.html | 56 +++++----- mimelib/dwstring.cpp | 86 +++++++-------- mimelib/mimelib/body.h | 4 +- mimelib/mimelib/entity.h | 4 +- mimelib/mimelib/field.h | 6 +- mimelib/mimelib/headers.h | 4 +- mimelib/mimelib/mailbox.h | 6 +- mimelib/mimelib/message.h | 2 +- mimelib/mimelib/string.h | 30 ++--- plugins/kmail/bodypartformatter/text_calendar.cpp | 4 +- plugins/kmail/bodypartformatter/text_vcard.cpp | 4 +- translate | 2 +- wizards/groupwisewizard.cpp | 4 +- wizards/kmailchanges.cpp | 6 +- wizards/kolabkmailchanges.cpp | 2 +- wizards/kolabwizard.cpp | 6 +- wizards/servertypemanager.cpp | 6 +- 627 files changed, 2958 insertions(+), 2958 deletions(-) diff --git a/NewsLog.txt b/NewsLog.txt index 7a71dd3a3..e0a0e81da 100644 --- a/NewsLog.txt +++ b/NewsLog.txt @@ -593,7 +593,7 @@ Friday, October 2th 2009 Problems addressed ------------------ -* kolab/issue3783: SMIME encrypted and signed mail: Audit log dialog tqcontains ???? at the bottom +* kolab/issue3783: SMIME encrypted and signed mail: Audit log dialog contains ???? at the bottom * kolab/issue3823: mimetreeviewer doesn't show structure of forward-as-attachment message #n where #n > 1 * kolab/issue3889: Kontact crahes if opening/changing calendar view (rt#5868) * kolab/issue3867: Save S/MIME encrypted mails unencrypted after reading them diff --git a/README.Kolab b/README.Kolab index 455e5448b..46fc111b5 100644 --- a/README.Kolab +++ b/README.Kolab @@ -39,7 +39,7 @@ KAddressBook: The scheme for the base DN is to take the parts of the fully qualified hostname of the kolab server and put ",dc=" between the parts and "dc=" in front of it. Or in Qt code: - baseDN = "dc=" + hostname.tqreplace( '.', ",dc=" ); + baseDN = "dc=" + hostname.replace( '.', ",dc=" ); Finally check the checkbox to activate the LDAP server. Now you can search the Kolab LDAP server and get all users on the system. diff --git a/akregator/COPYING b/akregator/COPYING index 2ad70b8b1..c13faf0dd 100644 --- a/akregator/COPYING +++ b/akregator/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/akregator/src/actionmanagerimpl.cpp b/akregator/src/actionmanagerimpl.cpp index 09a9b3cd8..b8c946694 100644 --- a/akregator/src/actionmanagerimpl.cpp +++ b/akregator/src/actionmanagerimpl.cpp @@ -148,7 +148,7 @@ void ActionManagerImpl::slotUpdateTagActions(bool enabled, const TQStringList& t for (TQValueList::ConstIterator it = actions.begin(); it != actions.end(); ++it) { - (*it)->setChecked(tagIds.tqcontains((*it)->tag().id())); + (*it)->setChecked(tagIds.contains((*it)->tag().id())); } } } @@ -197,7 +197,7 @@ void ActionManagerImpl::slotTagAdded(const Tag& tag) if (!Settings::showTaggingGUI()) return; - if (!d->tagActions.tqcontains(tag.id())) + if (!d->tagActions.contains(tag.id())) { d->tagActions[tag.id()] = new TagAction(tag, TQT_TQOBJECT(d->view), TQT_SLOT(slotAssignTag(const Tag&, bool)), d->tagMenu); d->tagMenu->insert(d->tagActions[tag.id()]); diff --git a/akregator/src/addfeeddialog.cpp b/akregator/src/addfeeddialog.cpp index 8c5f4d4b9..591e0d619 100644 --- a/akregator/src/addfeeddialog.cpp +++ b/akregator/src/addfeeddialog.cpp @@ -79,7 +79,7 @@ void AddFeedDialog::slotOk( ) if (feedURL.startsWith("feed:")) feedURL = feedURL.right( feedURL.length() - 5 ); - if (feedURL.tqfind(":/") == -1) + if (feedURL.find(":/") == -1) feedURL.prepend("http://"); f->setXmlUrl(feedURL); diff --git a/akregator/src/akregator_part.cpp b/akregator/src/akregator_part.cpp index 1cfd42b11..bd9f77cfe 100644 --- a/akregator/src/akregator_part.cpp +++ b/akregator/src/akregator_part.cpp @@ -522,7 +522,7 @@ bool Part::mergePart(KParts::Part* part) { if (m_mergedPart) { factory()->removeClient(m_mergedPart); - if (childClients()->tqcontainsRef(m_mergedPart)) + if (childClients()->containsRef(m_mergedPart)) removeChildClient(m_mergedPart); } if (part) diff --git a/akregator/src/akregator_view.cpp b/akregator/src/akregator_view.cpp index c110d305a..c92e4ec26 100644 --- a/akregator/src/akregator_view.cpp +++ b/akregator/src/akregator_view.cpp @@ -411,10 +411,10 @@ void View::slotOnShutdown() void View::saveSettings() { const TQValueList spl1 = m_horizontalSplitter->sizes(); - if ( spl1.tqcontains( 0 ) == 0 ) + if ( spl1.contains( 0 ) == 0 ) Settings::setSplitter1Sizes( spl1 ); const TQValueList spl2 = m_articleSplitter->sizes(); - if ( spl2.tqcontains( 0 ) == 0 ) + if ( spl2.contains( 0 ) == 0 ) Settings::setSplitter2Sizes( spl2 ); Settings::setViewMode( m_viewMode ); Settings::writeConfig(); @@ -1329,7 +1329,7 @@ void View::slotArticleDelete() for (TQValueList
::Iterator it = articles.begin(); it != articles.end(); ++it) { Feed* feed = (*it).feed(); - if (!feeds.tqcontains(feed)) + if (!feeds.contains(feed)) feeds.append(feed); feed->setNotificationMode(false); (*it).setDeleted(); @@ -1529,7 +1529,7 @@ void View::updateTagActions() TQStringList atags = (*it).tags(); for (TQStringList::ConstIterator it2 = atags.begin(); it2 != atags.end(); ++it2) { - if (!tags.tqcontains(*it2)) + if (!tags.contains(*it2)) tags += *it2; } } diff --git a/akregator/src/article.cpp b/akregator/src/article.cpp index c0151af39..3b7f321a9 100644 --- a/akregator/src/article.cpp +++ b/akregator/src/article.cpp @@ -102,7 +102,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) d->guid = article.guid(); - if (!d->archive->tqcontains(d->guid)) + if (!d->archive->contains(d->guid)) { d->archive->addEntry(d->guid); @@ -425,7 +425,7 @@ void Article::removeTag(const TQString& tag) bool Article::hasTag(const TQString& tag) const { - return d->archive->tags(d->guid).tqcontains(tag); + return d->archive->tags(d->guid).contains(tag); } TQStringList Article::tags() const @@ -453,7 +453,7 @@ TQString Article::buildTitle(const TQString& description) if (description.stripWhiteSpace().isEmpty()) return ""; - int i = s.tqfind('>',500); /*avoid processing too much */ + int i = s.find('>',500); /*avoid processing too much */ if (i != -1) s = s.left(i+1); TQRegExp rx("(<([^\\s>]*)(?:[^>]*)>)[^<]*", false); @@ -470,7 +470,7 @@ TQString Article::buildTitle(const TQString& description) } else toReplace=rx.cap(1); // strip just tag - s=s.tqreplace(s.tqfind(toReplace),toReplace.length(),replaceWith); // do the deed + s=s.replace(s.find(toReplace),toReplace.length(),replaceWith); // do the deed } if (s.length()> 90) s=s.left(90)+"..."; diff --git a/akregator/src/articlefilter.cpp b/akregator/src/articlefilter.cpp index e8e36f076..715ede193 100644 --- a/akregator/src/articlefilter.cpp +++ b/akregator/src/articlefilter.cpp @@ -179,7 +179,7 @@ bool Criterion::satisfiedBy( const Article &article ) const switch ( predicateType ) { case Contains: - satisfied = concreteSubject.toString().tqfind( m_object.toString(), 0, false ) != -1; + satisfied = concreteSubject.toString().find( m_object.toString(), 0, false ) != -1; break; case Equals: if (subjectType=="int") diff --git a/akregator/src/articlelistview.cpp b/akregator/src/articlelistview.cpp index 68e41730d..ecf262285 100644 --- a/akregator/src/articlelistview.cpp +++ b/akregator/src/articlelistview.cpp @@ -354,7 +354,7 @@ void ArticleListView::slotArticlesAdded(TreeNode* /*node*/, const TQValueList::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (!d->articleMap.tqcontains(*it)) + if (!d->articleMap.contains(*it)) { if (!(*it).isNull() && !(*it).isDeleted()) { @@ -385,7 +385,7 @@ void ArticleListView::slotArticlesUpdated(TreeNode* /*node*/, const TQValueList< for (TQValueList
::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (!(*it).isNull() && d->articleMap.tqcontains(*it)) + if (!(*it).isNull() && d->articleMap.contains(*it)) { ArticleItem* ali = d->articleMap[*it]; @@ -447,7 +447,7 @@ void ArticleListView::slotArticlesRemoved(TreeNode* /*node*/, const TQValueList< for (TQValueList
::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (d->articleMap.tqcontains(*it)) + if (d->articleMap.contains(*it)) { ArticleItem* ali = d->articleMap[*it]; d->articleMap.remove(*it); diff --git a/akregator/src/articleviewer.cpp b/akregator/src/articleviewer.cpp index a6ab467d8..977abc99d 100644 --- a/akregator/src/articleviewer.cpp +++ b/akregator/src/articleviewer.cpp @@ -87,7 +87,7 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor { text += TQString("
"); TQString url=node->xmlUrl(); - TQString file = url.tqreplace("/", "_").tqreplace(":", "_"); + TQString file = url.replace("/", "_").replace(":", "_"); KURL u(m_view->m_imageDir); u.setFileName(file); text += TQString("\n").tqarg(node->htmlUrl()).tqarg(u.url()); @@ -410,7 +410,7 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic text += TQString("\n"; @@ -505,7 +505,7 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art text += TQString("\n"; diff --git a/akregator/src/articleviewer.rc b/akregator/src/articleviewer.rc index a74bdf5cb..5b61457b2 100644 --- a/akregator/src/articleviewer.rc +++ b/akregator/src/articleviewer.rc @@ -11,7 +11,7 @@ - + diff --git a/akregator/src/feed.cpp b/akregator/src/feed.cpp index 8e0c4c90c..2188b3843 100644 --- a/akregator/src/feed.cpp +++ b/akregator/src/feed.cpp @@ -87,7 +87,7 @@ class Feed::FeedPrivate /** caches guids of tagged articles. key: tag, value: list of guids */ TQMap taggedArticles; - /** list of deleted articles. This tqcontains **/ + /** list of deleted articles. This contains **/ TQValueList
deletedArticles; /** caches guids of deleted articles for notification */ @@ -450,7 +450,7 @@ void Feed::appendArticles(const RSS::Document &doc) for (it = d_articles.begin(); it != en; ++it) { - if ( !d->articles.tqcontains((*it).guid()) ) // article not in list + if ( !d->articles.contains((*it).guid()) ) // article not in list { Article mya(*it, this); mya.offsetPubDate(nudge); @@ -535,7 +535,7 @@ void Feed::appendArticle(const Article& a) { if ( (a.keep() && Settings::doNotExpireImportantArticles()) || ( !usesExpiryByAge() || !isExpired(a) ) ) // if not expired { - if (!d->articles.tqcontains(a.guid())) + if (!d->articles.contains(a.guid())) { d->articles[a.guid()] = a; if (!a.isDeleted() && a.status() != Article::Read) @@ -726,10 +726,10 @@ void Feed::setUnread(int unread) void Feed::setArticleDeleted(Article& a) { - if (!d->deletedArticles.tqcontains(a)) + if (!d->deletedArticles.contains(a)) d->deletedArticles.append(a); - if (!d->removedArticlesNotify.tqcontains(a)) + if (!d->removedArticlesNotify.contains(a)) d->removedArticlesNotify.append(a); articlesModified(); diff --git a/akregator/src/feediconmanager.cpp b/akregator/src/feediconmanager.cpp index adc3fce42..ba75561ea 100644 --- a/akregator/src/feediconmanager.cpp +++ b/akregator/src/feediconmanager.cpp @@ -59,7 +59,7 @@ FeedIconManager* FeedIconManager::self() void FeedIconManager::fetchIcon(Feed* feed) { - if (!d->registeredFeeds.tqcontains(feed)) + if (!d->registeredFeeds.contains(feed)) { d->registeredFeeds.append(feed); connect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotFeedDestroyed(TreeNode*))); @@ -133,8 +133,8 @@ void FeedIconManager::slotFeedDestroyed(TreeNode* node) { Feed* feed = dynamic_cast(node); if (feed) - while (d->registeredFeeds.tqcontains(feed)) - d->registeredFeeds.remove(d->registeredFeeds.tqfind(feed)); + while (d->registeredFeeds.contains(feed)) + d->registeredFeeds.remove(d->registeredFeeds.find(feed)); } void FeedIconManager::slotIconChanged(bool /*isHost*/, const TQString& hostOrURL, @@ -147,7 +147,7 @@ void FeedIconManager::slotIconChanged(bool /*isHost*/, const TQString& hostOrURL if (!p.isNull()) // we don't set null pixmaps, as feed checks pixmap.isNull() to find out whether the icon was already loaded or not. It would request the icon another time, resulting an infinite loop (until stack overflow that is { while (( f = d->urlDict.take(hostOrURL) )) - if (d->registeredFeeds.tqcontains(f)) + if (d->registeredFeeds.contains(f)) f->setFavicon(p); } emit signalIconChanged(hostOrURL, iconFile); diff --git a/akregator/src/feedlist.cpp b/akregator/src/feedlist.cpp index 50496d8bc..72db09113 100644 --- a/akregator/src/feedlist.cpp +++ b/akregator/src/feedlist.cpp @@ -117,7 +117,7 @@ void FeedList::parseChildNodes(TQDomNode &node, Folder* tqparent) Feed* feed = Feed::fromOPML(e); if (feed) { - if (!d->urlMap[feed->xmlUrl()].tqcontains(feed)) + if (!d->urlMap[feed->xmlUrl()].contains(feed)) d->urlMap[feed->xmlUrl()].append(feed); tqparent->appendChild(feed); } @@ -219,7 +219,7 @@ void FeedList::append(FeedList* list, Folder* tqparent, TreeNode* after) if ( list == this ) return; - if ( !flatList()->tqcontains(tqparent) ) + if ( !flatList()->contains(tqparent) ) tqparent = rootNode(); TQValueList tqchildren = list->rootNode()->tqchildren(); diff --git a/akregator/src/feedlistview.cpp b/akregator/src/feedlistview.cpp index a891445fc..fa33b89da 100644 --- a/akregator/src/feedlistview.cpp +++ b/akregator/src/feedlistview.cpp @@ -457,12 +457,12 @@ TreeNode* NodeListView::findNodeByTitle(const TQString& title) TreeNodeItem* NodeListView::findNodeItem(TreeNode* node) { - return d->itemDict.tqfind(node); + return d->itemDict.find(node); } TreeNodeItem* NodeListView::findItemByTitle(const TQString& text, int column, ComparisonFlags compare) const { - return dynamic_cast (KListView::tqfindItem(text, column, compare)); + return dynamic_cast (KListView::findItem(text, column, compare)); } void NodeListView::ensureNodeVisible(TreeNode* node) diff --git a/akregator/src/feedstorage.h b/akregator/src/feedstorage.h index c0685695a..32e6c0587 100644 --- a/akregator/src/feedstorage.h +++ b/akregator/src/feedstorage.h @@ -92,7 +92,7 @@ class AKREGATOR_EXPORT FeedStorage : public TQObject virtual void clear() = 0; - virtual bool tqcontains(const TQString& guid) = 0; + virtual bool contains(const TQString& guid) = 0; virtual void addEntry(const TQString& guid) = 0; virtual void deleteArticle(const TQString& guid) = 0; virtual int comments(const TQString& guid) = 0; diff --git a/akregator/src/feedstoragedummyimpl.cpp b/akregator/src/feedstoragedummyimpl.cpp index 9d7b8e125..5ae572a82 100644 --- a/akregator/src/feedstoragedummyimpl.cpp +++ b/akregator/src/feedstoragedummyimpl.cpp @@ -147,21 +147,21 @@ TQStringList FeedStorageDummyImpl::articles(const Category& cat) void FeedStorageDummyImpl::addEntry(const TQString& guid) { - if (!d->entries.tqcontains(guid)) + if (!d->entries.contains(guid)) { d->entries[guid] = FeedStorageDummyImplPrivate::Entry(); setTotalCount(totalCount()+1); } } -bool FeedStorageDummyImpl::tqcontains(const TQString& guid) +bool FeedStorageDummyImpl::contains(const TQString& guid) { - return d->entries.tqcontains(guid); + return d->entries.contains(guid); } void FeedStorageDummyImpl::deleteArticle(const TQString& guid) { - if (!d->entries.tqcontains(guid)) + if (!d->entries.contains(guid)) return; setDeleted(guid); @@ -172,33 +172,33 @@ void FeedStorageDummyImpl::deleteArticle(const TQString& guid) int FeedStorageDummyImpl::comments(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].comments : 0; + return contains(guid) ? d->entries[guid].comments : 0; } TQString FeedStorageDummyImpl::commentsLink(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].commentsLink : ""; + return contains(guid) ? d->entries[guid].commentsLink : ""; } bool FeedStorageDummyImpl::guidIsHash(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].guidIsHash : false; + return contains(guid) ? d->entries[guid].guidIsHash : false; } bool FeedStorageDummyImpl::guidIsPermaLink(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].guidIsPermaLink : false; + return contains(guid) ? d->entries[guid].guidIsPermaLink : false; } uint FeedStorageDummyImpl::hash(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].hash : 0; + return contains(guid) ? d->entries[guid].hash : 0; } void FeedStorageDummyImpl::setDeleted(const TQString& guid) { - if (!tqcontains(guid)) + if (!contains(guid)) return; FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; @@ -233,99 +233,99 @@ void FeedStorageDummyImpl::setDeleted(const TQString& guid) TQString FeedStorageDummyImpl::link(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].link : ""; + return contains(guid) ? d->entries[guid].link : ""; } uint FeedStorageDummyImpl::pubDate(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].pubDate : 0; + return contains(guid) ? d->entries[guid].pubDate : 0; } int FeedStorageDummyImpl::status(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].status : 0; + return contains(guid) ? d->entries[guid].status : 0; } void FeedStorageDummyImpl::setqStatus(const TQString& guid, int status) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].status = status; } TQString FeedStorageDummyImpl::title(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].title : ""; + return contains(guid) ? d->entries[guid].title : ""; } TQString FeedStorageDummyImpl::description(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].description : ""; + return contains(guid) ? d->entries[guid].description : ""; } void FeedStorageDummyImpl::setPubDate(const TQString& guid, uint pubdate) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].pubDate = pubdate; } void FeedStorageDummyImpl::setGuidIsHash(const TQString& guid, bool isHash) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].guidIsHash = isHash; } void FeedStorageDummyImpl::setLink(const TQString& guid, const TQString& link) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].link = link; } void FeedStorageDummyImpl::setHash(const TQString& guid, uint hash) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].hash = hash; } void FeedStorageDummyImpl::setTitle(const TQString& guid, const TQString& title) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].title = title; } void FeedStorageDummyImpl::setDescription(const TQString& guid, const TQString& description) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].description = description; } void FeedStorageDummyImpl::setCommentsLink(const TQString& guid, const TQString& commentsLink) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].commentsLink = commentsLink; } void FeedStorageDummyImpl::setComments(const TQString& guid, int comments) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].comments = comments; } void FeedStorageDummyImpl::setGuidIsPermaLink(const TQString& guid, bool isPermaLink) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].guidIsPermaLink = isPermaLink; } void FeedStorageDummyImpl::addTag(const TQString& guid, const TQString& tag) { - if (tqcontains(guid)) + if (contains(guid)) { d->entries[guid].tags.append(tag); - if (!d->taggedArticles[tag].tqcontains(guid)) + if (!d->taggedArticles[tag].contains(guid)) d->taggedArticles[tag].append(guid); - if (!d->tags.tqcontains(tag)) + if (!d->tags.contains(tag)) d->tags.append(tag); } @@ -333,7 +333,7 @@ void FeedStorageDummyImpl::addTag(const TQString& guid, const TQString& tag) void FeedStorageDummyImpl::addCategory(const TQString& guid, const Category& cat) { - if (!tqcontains(guid)) + if (!contains(guid)) return; d->entries[guid].categories.append(cat); @@ -345,19 +345,19 @@ void FeedStorageDummyImpl::addCategory(const TQString& guid, const Category& cat void FeedStorageDummyImpl::setAuthor(const TQString& guid, const TQString& author) { - if (tqcontains(guid)) + if (contains(guid)) d->entries[guid].author = author; } TQString FeedStorageDummyImpl::author(const TQString& guid) { - return tqcontains(guid) ? d->entries[guid].author : TQString(); + return contains(guid) ? d->entries[guid].author : TQString(); } TQValueList FeedStorageDummyImpl::categories(const TQString& guid) { if (!guid.isNull()) - return tqcontains(guid) ? d->entries[guid].categories : TQValueList(); + return contains(guid) ? d->entries[guid].categories : TQValueList(); else return d->categories; } @@ -365,7 +365,7 @@ TQValueList FeedStorageDummyImpl::categories(const TQString& guid) void FeedStorageDummyImpl::removeTag(const TQString& guid, const TQString& tag) { - if (tqcontains(guid)) + if (contains(guid)) { d->entries[guid].tags.remove(tag); d->taggedArticles[tag].remove(guid); @@ -377,7 +377,7 @@ void FeedStorageDummyImpl::removeTag(const TQString& guid, const TQString& tag) TQStringList FeedStorageDummyImpl::tags(const TQString& guid) { if (!guid.isNull()) - return tqcontains(guid) ? d->entries[guid].tags : TQStringList(); + return contains(guid) ? d->entries[guid].tags : TQStringList(); else { return d->tags; @@ -396,7 +396,7 @@ void FeedStorageDummyImpl::add(FeedStorage* source) void FeedStorageDummyImpl::copyArticle(const TQString& guid, FeedStorage* source) { - if (!tqcontains(guid)) + if (!contains(guid)) addEntry(guid); setComments(guid, source->comments(guid)); @@ -424,7 +424,7 @@ void FeedStorageDummyImpl::clear() void FeedStorageDummyImpl::setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length) { - if (tqcontains(guid)) + if (contains(guid)) { FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; entry.hasEnclosure = true; @@ -436,7 +436,7 @@ void FeedStorageDummyImpl::setEnclosure(const TQString& guid, const TQString& ur void FeedStorageDummyImpl::removeEnclosure(const TQString& guid) { - if (tqcontains(guid)) + if (contains(guid)) { FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; entry.hasEnclosure = false; @@ -448,7 +448,7 @@ void FeedStorageDummyImpl::removeEnclosure(const TQString& guid) void FeedStorageDummyImpl::enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length) { - if (tqcontains(guid)) + if (contains(guid)) { FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; hasEnclosure = entry.hasEnclosure; diff --git a/akregator/src/feedstoragedummyimpl.h b/akregator/src/feedstoragedummyimpl.h index 4ba4a4606..bd71a11c8 100644 --- a/akregator/src/feedstoragedummyimpl.h +++ b/akregator/src/feedstoragedummyimpl.h @@ -50,7 +50,7 @@ class FeedStorageDummyImpl : public FeedStorage virtual TQStringList articles(const Category& cat); - virtual bool tqcontains(const TQString& guid); + virtual bool contains(const TQString& guid); virtual void addEntry(const TQString& guid); virtual void deleteArticle(const TQString& guid); virtual int comments(const TQString& guid); diff --git a/akregator/src/fetchqueue.cpp b/akregator/src/fetchqueue.cpp index d171d25ed..c00abe2e5 100644 --- a/akregator/src/fetchqueue.cpp +++ b/akregator/src/fetchqueue.cpp @@ -72,7 +72,7 @@ void FetchQueue::slotAbort() void FetchQueue::addFeed(Feed *f) { - if (!d->queuedFeeds.tqcontains(f) && !d->fetchingFeeds.tqcontains(f)) + if (!d->queuedFeeds.contains(f) && !d->fetchingFeeds.contains(f)) { connectToFeed(f); d->queuedFeeds.append(f); diff --git a/akregator/src/folder.cpp b/akregator/src/folder.cpp index d55c75aec..2a0f2776e 100644 --- a/akregator/src/folder.cpp +++ b/akregator/src/folder.cpp @@ -99,7 +99,7 @@ TQStringList Folder::tags() const // intersect tag sets instead of appending lists, to avoid dupes. This sucks. Definitely. I want TQSet. Now. TQStringList t2 = (*it)->tags(); for (TQStringList::ConstIterator it2 = t2.begin(); it2 != t2.end(); ++it2) - if (!t.tqcontains(*it2)) + if (!t.contains(*it2)) t.append(*it2); } return t; @@ -137,7 +137,7 @@ TQValueList Folder::tqchildren() const void Folder::insertChild(TreeNode* node, TreeNode* after) { - int pos = d->tqchildren.tqfindIndex(after); + int pos = d->tqchildren.findIndex(after); if (pos < 0) prependChild(node); @@ -202,7 +202,7 @@ void Folder::prependChild(TreeNode* node) void Folder::removeChild(TreeNode* node) { // kdDebug() << "enter Folder::removeChild() node:" << (node ? node->title() : "null") << endl; - if (node && d->tqchildren.tqcontains(node)) + if (node && d->tqchildren.contains(node)) { node->setParent(0); d->tqchildren.remove(node); diff --git a/akregator/src/frame.cpp b/akregator/src/frame.cpp index 55fac570e..e800bafda 100644 --- a/akregator/src/frame.cpp +++ b/akregator/src/frame.cpp @@ -123,7 +123,7 @@ void Frame::setCaption(const TQString &s) void Frame::seStatusText(const TQString &s) { m_statusText=s; - m_statusText.tqreplace(TQRegExp("<[^>]*>"), ""); + m_statusText.replace(TQRegExp("<[^>]*>"), ""); emit statusText(m_statusText); } diff --git a/akregator/src/librss/tools_p.cpp b/akregator/src/librss/tools_p.cpp index 72058fa05..baaa6409d 100644 --- a/akregator/src/librss/tools_p.cpp +++ b/akregator/src/librss/tools_p.cpp @@ -24,7 +24,7 @@ time_t parseISO8601Date(const TQString &s) return 0; // error // FIXME: imho this is done in KRFCDate::parseDateISO8601() automatically, so we could omit it? -fo - if (s.tqfind('T') != -1) + if (s.find('T') != -1) return KRFCDate::parseDateISO8601(s); else return KRFCDate::parseDateISO8601(s + "T12:00:00"); @@ -43,11 +43,11 @@ TQString childNodesAsXML(const TQDomNode& tqparent) static TQString plainTextToHtml(const TQString& plainText) { TQString str(plainText); - str.tqreplace("&", "&"); - str.tqreplace("\"", """); - str.tqreplace("<", "<"); - //str.tqreplace(">", ">"); - str.tqreplace("\n", "
"); + str.replace("&", "&"); + str.replace("\"", """); + str.replace("<", "<"); + //str.replace(">", ">"); + str.replace("\n", "
"); return str; } @@ -84,7 +84,7 @@ static ContentFormat mapTypeToFormat(const TQString& modep, const TQString& type xmltypes.append(TQString::fromUtf8("application/xml-dtd")); - if (xmltypes.tqcontains(type) + if (xmltypes.contains(type) || type.tqendsWith(TQString::fromUtf8("+xml"), false) || type.tqendsWith(TQString::fromUtf8("/xml"), false)) return XML; @@ -102,7 +102,7 @@ static TQString extractAtomContent(const TQDomElement& e) { case HTML: { - const bool hasPre = e.text().tqcontains( "
", false ) || e.text().tqcontains( "
", false ) || e.text().contains( "
", false) || result.tqcontains("
 regexp
+            bool hasPre = result.contains("
", false) || result.contains("
 regexp
             if(!isInlined && !hasHtml)						// perform nl2br if not a inline elt and it has no html elts
-                    result = result = result.tqreplace(TQChar('\n'), "
"); + result = result = result.replace(TQChar('\n'), "
"); if(!hasPre) // strip white spaces if no
                     result = result.simplifyWhiteSpace();
         }
@@ -151,7 +151,7 @@ TQString extractTitle(const TQDomNode & tqparent)
 
     TQString result = node.toElement().text();
 
-    result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).tqreplace(TQRegExp("<[^>]*>"), "").remove("\\"));
+    result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).replace(TQRegExp("<[^>]*>"), "").remove("\\"));
 	result = result.simplifyWhiteSpace();
 
     if (result.isEmpty())
@@ -177,7 +177,7 @@ static void authorFromString(const TQString& strp, TQString& name, TQString& ema
     {
         TQString all = remail.cap(0);
         email = remail.cap(1);
-        str.tqreplace(all, ""); // remove mail address
+        str.replace(all, ""); // remove mail address
     }
     
     // simplify the rest and use it as name
diff --git a/akregator/src/mk4storage/feedstoragemk4impl.cpp b/akregator/src/mk4storage/feedstoragemk4impl.cpp
index ec0fe7b64..75ee1e2f1 100644
--- a/akregator/src/mk4storage/feedstoragemk4impl.cpp
+++ b/akregator/src/mk4storage/feedstoragemk4impl.cpp
@@ -147,8 +147,8 @@ FeedStorageMK4Impl::FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main
     kdDebug() << url2 << endl;
     TQString t = url2;
     TQString t2 = url2;
-    TQString filePath = main->archivePath() +"/"+ t.tqreplace("/", "_").tqreplace(":", "_");
-    d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.tqreplace("/", "_").tqreplace(":", "_") + ".xml";
+    TQString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_");
+    d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.replace("/", "_").replace(":", "_") + ".xml";
 
     d->convert = !TQFile::exists(filePath + ".mk4") && TQFile::exists(d->oldArchivePath);
     d->storage = new c4_Storage((filePath + ".mk4").local8Bit(), true);
@@ -297,7 +297,7 @@ void FeedStorageMK4Impl::addEntry(const TQString& guid)
 {
     c4_Row row;
     d->pguid(row) = guid.ascii();
-    if (!tqcontains(guid))
+    if (!contains(guid))
     {
         d->archiveView.Add(row);
         markDirty();
@@ -305,7 +305,7 @@ void FeedStorageMK4Impl::addEntry(const TQString& guid)
     }
 }
 
-bool FeedStorageMK4Impl::tqcontains(const TQString& guid)
+bool FeedStorageMK4Impl::contains(const TQString& guid)
 {
     return findArticle(guid) != -1;
 }
@@ -789,7 +789,7 @@ void FeedStorageMK4Impl::add(FeedStorage* source)
 
 void FeedStorageMK4Impl::copyArticle(const TQString& guid, FeedStorage* source)
 {
-    if (!tqcontains(guid))
+    if (!contains(guid))
         addEntry(guid);
     setComments(guid, source->comments(guid));
     setCommentsLink(guid, source->commentsLink(guid));
diff --git a/akregator/src/mk4storage/feedstoragemk4impl.h b/akregator/src/mk4storage/feedstoragemk4impl.h
index d13f04def..057ba2e73 100644
--- a/akregator/src/mk4storage/feedstoragemk4impl.h
+++ b/akregator/src/mk4storage/feedstoragemk4impl.h
@@ -50,7 +50,7 @@ class FeedStorageMK4Impl : public FeedStorage
 
         virtual TQStringList articles(const Category& cat);
 
-        virtual bool tqcontains(const TQString& guid);
+        virtual bool contains(const TQString& guid);
         virtual void addEntry(const TQString& guid);
         virtual void deleteArticle(const TQString& guid);
         virtual int comments(const TQString& guid);
diff --git a/akregator/src/mk4storage/metakit/CHANGES b/akregator/src/mk4storage/metakit/CHANGES
index e5d4aad17..1e1761cad 100644
--- a/akregator/src/mk4storage/metakit/CHANGES
+++ b/akregator/src/mk4storage/metakit/CHANGES
@@ -1198,7 +1198,7 @@
 
     Moved C++ member documentation out of "mk4.h" header.  Added
     examples/ directory, with a find.py timing example.  Fixed bugs in
-    new Mk4tcl: "$vw tqfind" and "$vw delete end".  Added tests for new
+    new Mk4tcl: "$vw find" and "$vw delete end".  Added tests for new
     Mk4tcl OO interface: ":mk5object.test".
 
 2000-06-16    Improved modifiable custom viewers
diff --git a/akregator/src/mk4storage/metakit/include/mk4str.inl b/akregator/src/mk4storage/metakit/include/mk4str.inl
index eddbefb8d..4f95fa514 100644
--- a/akregator/src/mk4storage/metakit/include/mk4str.inl
+++ b/akregator/src/mk4storage/metakit/include/mk4str.inl
@@ -131,12 +131,12 @@ d4_inline bool c4_String::operator< (const c4_String& str_) const
 
 d4_inline int c4_String::Find(char ch_) const
 {
-    return tqfind(ch_);
+    return find(ch_);
 }
 
 d4_inline int c4_String::ReverseFind(char ch_) const
 {
-    return rtqfind(ch_);
+    return rfind(ch_);
 }
 
 d4_inline int c4_String::FindOneOf(const char* set_) const
@@ -146,7 +146,7 @@ d4_inline int c4_String::FindOneOf(const char* set_) const
 
 d4_inline int c4_String::Find(const char* sub_) const
 {
-    return tqfind(sub_);
+    return find(sub_);
 }
 
 d4_inline c4_String c4_String::SpanIncluding(const char* set_) const
diff --git a/akregator/src/mk4storage/metakit/src/store.cpp b/akregator/src/mk4storage/metakit/src/store.cpp
index 3a4583378..a32de665c 100644
--- a/akregator/src/mk4storage/metakit/src/store.cpp
+++ b/akregator/src/mk4storage/metakit/src/store.cpp
@@ -161,7 +161,7 @@ void c4_Notifier::Notify()
  *  Manager for persistent storage of view structures.
  *
  *  The storage class uses a view, with additional functionality to be able 
- *  to store and reload the data it tqcontains (including nested subviews).
+ *  to store and reload the data it contains (including nested subviews).
  *
  *  By default, data is loaded on demand, i.e. whenever data which has
  *  not yet been referenced is used for the first time.  Loading is limited
diff --git a/akregator/src/mk4storage/storagemk4impl.cpp b/akregator/src/mk4storage/storagemk4impl.cpp
index af71d97bb..becbd5186 100644
--- a/akregator/src/mk4storage/storagemk4impl.cpp
+++ b/akregator/src/mk4storage/storagemk4impl.cpp
@@ -276,7 +276,7 @@ void StorageMK4Impl::slotCommit()
 
 FeedStorage* StorageMK4Impl::archiveFor(const TQString& url)
 {
-    if (!d->feeds.tqcontains(url))
+    if (!d->feeds.contains(url))
     {
         FeedStorage* fs = new FeedStorageMK4Impl(url, this);
         d->feeds[url] = fs;
diff --git a/akregator/src/nodelist.cpp b/akregator/src/nodelist.cpp
index edea9c6e2..1ed274d1c 100644
--- a/akregator/src/nodelist.cpp
+++ b/akregator/src/nodelist.cpp
@@ -216,7 +216,7 @@ int NodeList::generateID()
 void NodeList::slotNodeAdded(TreeNode* node)
 {
     Folder* tqparent = node->tqparent();
-    if ( !node || !d->flatList.tqcontains(tqparent) || d->flatList.tqcontains(node) )
+    if ( !node || !d->flatList.contains(tqparent) || d->flatList.contains(node) )
         return;
 
     addNode(node, false);
@@ -224,7 +224,7 @@ void NodeList::slotNodeAdded(TreeNode* node)
 
 void NodeList::slotNodeDestroyed(TreeNode* node)
 {
-    if ( !node || !d->flatList.tqcontains(node) )
+    if ( !node || !d->flatList.contains(node) )
         return;
 
     removeNode(node);
@@ -232,7 +232,7 @@ void NodeList::slotNodeDestroyed(TreeNode* node)
 
 void NodeList::slotNodeRemoved(Folder* /*tqparent*/, TreeNode* node)
 {
-    if ( !node || !d->flatList.tqcontains(node) )
+    if ( !node || !d->flatList.contains(node) )
         return;
 
     removeNode(node);
diff --git a/akregator/src/pageviewer.cpp b/akregator/src/pageviewer.cpp
index 8d10256cd..0392535cf 100644
--- a/akregator/src/pageviewer.cpp
+++ b/akregator/src/pageviewer.cpp
@@ -390,7 +390,7 @@ void PageViewer::slotPaletteOrFontChanged()
     if ( !obj ) // not all views have a browser extension !
         return;
     
-    int id = obj->tqmetaObject()->tqfindSlot("reparseConfiguration()");
+    int id = obj->tqmetaObject()->findSlot("reparseConfiguration()");
     if (id == -1)
         return;
     TQUObject o[1];
diff --git a/akregator/src/pageviewer.rc b/akregator/src/pageviewer.rc
index a7b98fee9..dd44ee368 100644
--- a/akregator/src/pageviewer.rc
+++ b/akregator/src/pageviewer.rc
@@ -17,7 +17,7 @@
   
   
   
-  
+  
   
   
 
diff --git a/akregator/src/plugin.cpp b/akregator/src/plugin.cpp index 599d3972c..495dabc38 100644 --- a/akregator/src/plugin.cpp +++ b/akregator/src/plugin.cpp @@ -25,7 +25,7 @@ Plugin::addPluginProperty( const TQString& key, const TQString& value ) TQString Plugin::pluginProperty( const TQString& key ) { - if ( m_properties.tqfind( key.lower() ) == m_properties.end() ) + if ( m_properties.find( key.lower() ) == m_properties.end() ) return "false"; return m_properties[key.lower()]; @@ -35,7 +35,7 @@ Plugin::pluginProperty( const TQString& key ) bool Plugin::hasPluginProperty( const TQString& key ) { - return m_properties.tqfind( key.lower() ) != m_properties.end(); + return m_properties.find( key.lower() ) != m_properties.end(); } } diff --git a/akregator/src/progressmanager.cpp b/akregator/src/progressmanager.cpp index 6ef94f4c9..931b04766 100644 --- a/akregator/src/progressmanager.cpp +++ b/akregator/src/progressmanager.cpp @@ -102,7 +102,7 @@ void ProgressManager::slotNodeAdded(TreeNode* node) Feed* feed = dynamic_cast(node); if (feed) { - if (!d->handlers.tqcontains(feed)) + if (!d->handlers.contains(feed)) d->handlers[feed] = new ProgressItemHandler(feed); connect(feed, TQT_SIGNAL(signalDestroyed(TreeNode*)), this, TQT_SLOT(slotNodeDestroyed(TreeNode*))); } diff --git a/akregator/src/simplenodeselector.cpp b/akregator/src/simplenodeselector.cpp index 57612bd47..c4e91e5a6 100644 --- a/akregator/src/simplenodeselector.cpp +++ b/akregator/src/simplenodeselector.cpp @@ -185,7 +185,7 @@ void SimpleNodeSelector::slotItemSelected(TQListViewItem* item) void SimpleNodeSelector::slotNodeDestroyed(TreeNode* node) { - if (d->nodeToItem.tqcontains(node)) + if (d->nodeToItem.contains(node)) { TQListViewItem* item = d->nodeToItem[node]; d->nodeToItem.remove(node); diff --git a/akregator/src/speechclient.cpp b/akregator/src/speechclient.cpp index b0fc92c92..8665213d9 100644 --- a/akregator/src/speechclient.cpp +++ b/akregator/src/speechclient.cpp @@ -135,7 +135,7 @@ void SpeechClient::slotAbortJobs() ASYNC SpeechClient::textRemoved(const TQCString& /*appId*/, uint jobNum) { kdDebug() << "SpeechClient::textRemoved() called" << endl; - if (d->pendingJobs.tqcontains(jobNum)) + if (d->pendingJobs.contains(jobNum)) { d->pendingJobs.remove(jobNum); if (d->pendingJobs.isEmpty()) diff --git a/akregator/src/storagedummyimpl.cpp b/akregator/src/storagedummyimpl.cpp index e8d5c4c01..393be7d14 100644 --- a/akregator/src/storagedummyimpl.cpp +++ b/akregator/src/storagedummyimpl.cpp @@ -100,12 +100,12 @@ bool StorageDummyImpl::rollback() int StorageDummyImpl::unreadFor(const TQString &url) { - return d->feeds.tqcontains(url) ? d->feeds[url].unread : 0; + return d->feeds.contains(url) ? d->feeds[url].unread : 0; } void StorageDummyImpl::setUnreadFor(const TQString &url, int unread) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->addEntry(url, unread, unread, 0); else d->feeds[url].unread = unread; @@ -113,12 +113,12 @@ void StorageDummyImpl::setUnreadFor(const TQString &url, int unread) int StorageDummyImpl::totalCountFor(const TQString &url) { - return d->feeds.tqcontains(url) ? d->feeds[url].totalCount : 0; + return d->feeds.contains(url) ? d->feeds[url].totalCount : 0; } void StorageDummyImpl::setTotalCountFor(const TQString &url, int total) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->addEntry(url, 0, total, 0); else d->feeds[url].totalCount = total; @@ -126,12 +126,12 @@ void StorageDummyImpl::setTotalCountFor(const TQString &url, int total) int StorageDummyImpl::lastFetchFor(const TQString& url) { - return d->feeds.tqcontains(url) ? d->feeds[url].lastFetch : 0; + return d->feeds.contains(url) ? d->feeds[url].lastFetch : 0; } void StorageDummyImpl::setLastFetchFor(const TQString& url, int lastFetch) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->addEntry(url, 0, 0, lastFetch); else d->feeds[url].lastFetch = lastFetch; @@ -143,7 +143,7 @@ void StorageDummyImpl::slotCommit() FeedStorage* StorageDummyImpl::archiveFor(const TQString& url) { - if (!d->feeds.tqcontains(url)) + if (!d->feeds.contains(url)) d->feeds[url].feedStorage = new FeedStorageDummyImpl(url, this); return d->feeds[url].feedStorage; diff --git a/akregator/src/storagefactoryregistry.cpp b/akregator/src/storagefactoryregistry.cpp index 608c05b17..50fb6005d 100644 --- a/akregator/src/storagefactoryregistry.cpp +++ b/akregator/src/storagefactoryregistry.cpp @@ -70,7 +70,7 @@ StorageFactory* StorageFactoryRegistry::getFactory(const TQString& typestr) bool StorageFactoryRegistry::containsFactory(const TQString& typestr) const { - return d->map.tqcontains(typestr); + return d->map.contains(typestr); } TQStringList StorageFactoryRegistry::list() const diff --git a/akregator/src/tabwidget.cpp b/akregator/src/tabwidget.cpp index 60ba42b3f..cbd7e737a 100644 --- a/akregator/src/tabwidget.cpp +++ b/akregator/src/tabwidget.cpp @@ -218,7 +218,7 @@ void TabWidget::setTitle( const TQString &title , TQWidget* sender) newTitle = newTitle.left( newMaxLength-3 ) + "..."; } - newTitle.tqreplace( '&', "&&" ); + newTitle.replace( '&', "&&" ); if ( tabLabel( sender ) != newTitle ) changeTab( sender, newTitle ); @@ -235,7 +235,7 @@ void TabWidget::setTitle( const TQString &title , TQWidget* sender) newTitle = newTitle.left( newMaxLength-3 ) + "..."; } - newTitle.tqreplace( '&', "&&" ); + newTitle.replace( '&', "&&" ); if ( newTitle != tabLabel( page( i ) ) ) changeTab( page( i ), newTitle ); } @@ -298,8 +298,8 @@ void TabWidget::slotCloseTab() d->currentItem = currentPage(); if (indexOf(d->currentItem) == 0) return; - if (d->frames.tqfind(d->currentItem) != NULL) - removeFrame(d->frames.tqfind(d->currentItem)); + if (d->frames.find(d->currentItem) != NULL) + removeFrame(d->frames.find(d->currentItem)); delete d->currentItem; d->currentItem = 0; } @@ -323,8 +323,8 @@ void TabWidget::initiateDrag(int tab) void TabWidget::slotCloseRequest(TQWidget* widget) { - if (d->frames.tqfind(widget) != NULL) - removeFrame(d->frames.tqfind(widget)); + if (d->frames.find(widget) != NULL) + removeFrame(d->frames.find(widget)); } } // namespace Akregator diff --git a/akregator/src/tagnode.cpp b/akregator/src/tagnode.cpp index 35c720724..24d81755a 100644 --- a/akregator/src/tagnode.cpp +++ b/akregator/src/tagnode.cpp @@ -196,7 +196,7 @@ void TagNode::slotArticlesAdded(TreeNode* node, const TQValueList
& list bool added = false; for (TQValueList
::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (!d->articles.tqcontains(*it) && d->filter.matches(*it)) + if (!d->articles.contains(*it) && d->filter.matches(*it)) { d->articles.append(*it); d->addedArticlesNotify.append(*it); @@ -216,7 +216,7 @@ void TagNode::slotArticlesUpdated(TreeNode* node, const TQValueList
& li bool updated = false; for (TQValueList
::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (d->articles.tqcontains(*it)) + if (d->articles.contains(*it)) { if (!d->filter.matches(*it)) // articles is in list, but doesn't match our criteria anymore -> remove it { @@ -252,7 +252,7 @@ void TagNode::slotArticlesRemoved(TreeNode* node, const TQValueList
& li bool removed = false; for (TQValueList
::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (d->articles.tqcontains(*it)) + if (d->articles.contains(*it)) { d->articles.remove(*it); d->removedArticlesNotify.append(*it); diff --git a/akregator/src/tagnode.h b/akregator/src/tagnode.h index 8598a8a24..ebdf15a00 100644 --- a/akregator/src/tagnode.h +++ b/akregator/src/tagnode.h @@ -76,7 +76,7 @@ public: virtual int totalCount() const; - /** Returns a sequence of the articles this node tqcontains. For feed groups, this returns a concatenated list of all articles in the sub tree. + /** Returns a sequence of the articles this node contains. For feed groups, this returns a concatenated list of all articles in the sub tree. If @c tag is not null, only articles tagged with @c tag are returned @return sequence of articles */ diff --git a/akregator/src/tagnodelist.cpp b/akregator/src/tagnodelist.cpp index ba531d038..cf87b7707 100644 --- a/akregator/src/tagnodelist.cpp +++ b/akregator/src/tagnodelist.cpp @@ -158,7 +158,7 @@ void TagNodeList::slotNodeRemoved(Folder* tqparent, TreeNode* node) bool TagNodeList::containsTagId(const TQString& tagId) { - return d->tagIdToNodeMap.tqcontains(tagId); + return d->tagIdToNodeMap.contains(tagId); } TQValueList TagNodeList::toList() const diff --git a/akregator/src/tagset.cpp b/akregator/src/tagset.cpp index 1be7f952e..a6b412856 100644 --- a/akregator/src/tagset.cpp +++ b/akregator/src/tagset.cpp @@ -54,7 +54,7 @@ TagSet::~TagSet() void TagSet::insert(const Tag& tag) { - if (!d->map.tqcontains(tag.id())) + if (!d->map.contains(tag.id())) { d->map.insert(tag.id(), tag); tag.addedToTagSet(this); @@ -64,7 +64,7 @@ void TagSet::insert(const Tag& tag) void TagSet::remove(const Tag& tag) { - if (d->map.tqcontains(tag.id())) + if (d->map.contains(tag.id())) { d->map.remove(tag.id()); tag.removedFromTagSet(this); @@ -74,17 +74,17 @@ void TagSet::remove(const Tag& tag) bool TagSet::containsID(const TQString& id) const { - return d->map.tqcontains(id); + return d->map.contains(id); } -bool TagSet::tqcontains(const Tag& tag) const +bool TagSet::contains(const Tag& tag) const { - return d->map.tqcontains(tag.id()); + return d->map.contains(tag.id()); } Tag TagSet::findByID(const TQString& id) const { - return d->map.tqcontains(id) ? d->map[id] : Tag(); + return d->map.contains(id) ? d->map[id] : Tag(); } TQMap TagSet::toMap() const diff --git a/akregator/src/tagset.h b/akregator/src/tagset.h index 637fce50f..49b19aed9 100644 --- a/akregator/src/tagset.h +++ b/akregator/src/tagset.h @@ -63,8 +63,8 @@ class TagSet : public TQObject /** returns the tag set as map ((id, Tag) pairs) */ TQMap toMap() const; - /** returns @c true if this set tqcontains @c tag */ - bool tqcontains(const Tag& tag) const; + /** returns @c true if this set contains @c tag */ + bool contains(const Tag& tag) const; /** returns @c true if this set contains a tag with a given ID */ bool containsID(const TQString& id) const; diff --git a/akregator/src/treenode.cpp b/akregator/src/treenode.cpp index 27ee2ecae..58e4ae8ea 100644 --- a/akregator/src/treenode.cpp +++ b/akregator/src/treenode.cpp @@ -96,7 +96,7 @@ TreeNode* TreeNode::nextSibling() const TQValueList tqchildren = d->tqparent->tqchildren(); TreeNode* me = (TreeNode*)this; - int idx = tqchildren.tqfindIndex(me); + int idx = tqchildren.findIndex(me); return idx+1 < tqchildren.size() ? *(tqchildren.at(idx+1)) : 0L; } @@ -108,7 +108,7 @@ TreeNode* TreeNode::prevSibling() const TQValueList tqchildren = d->tqparent->tqchildren(); TreeNode* me = (TreeNode*)this; - int idx = tqchildren.tqfindIndex(me); + int idx = tqchildren.findIndex(me); return idx > 0 ? *(d->tqparent->tqchildren().at(idx-1)) : 0L; } diff --git a/akregator/src/treenode.h b/akregator/src/treenode.h index d6c6f860e..b50b050a6 100644 --- a/akregator/src/treenode.h +++ b/akregator/src/treenode.h @@ -112,7 +112,7 @@ public: virtual void setParent(Folder* tqparent); - /** Returns a sequence of the articles this node tqcontains. For feed groups, this returns a concatenated list of all articles in the sub tree. + /** Returns a sequence of the articles this node contains. For feed groups, this returns a concatenated list of all articles in the sub tree. If @c tag is not null, only articles tagged with @c tag are returned @return sequence of articles */ diff --git a/akregator/src/utils.cpp b/akregator/src/utils.cpp index fb7b0186f..6bc6cf148 100644 --- a/akregator/src/utils.cpp +++ b/akregator/src/utils.cpp @@ -30,7 +30,7 @@ namespace Akregator { TQString Utils::stripTags(const TQString& str) { - return TQString(str).tqreplace(TQRegExp("<[^>]*>"), ""); + return TQString(str).replace(TQRegExp("<[^>]*>"), ""); } uint Utils::calcHash(const TQString& str) @@ -48,7 +48,7 @@ TQString Utils::fileNameForUrl(const TQString& url_p) { TQString url2(url_p); - url2 = url2.tqreplace("/", "_").tqreplace(":", "_"); + url2 = url2.replace("/", "_").replace(":", "_"); if (url2.length() > 255) url2 = url2.left(200) + TQString::number(Akregator::Utils::calcHash(url2), 16); diff --git a/akregator/src/viewer.cpp b/akregator/src/viewer.cpp index 989ff8ae5..4302f0a7e 100644 --- a/akregator/src/viewer.cpp +++ b/akregator/src/viewer.cpp @@ -112,7 +112,7 @@ void Viewer::displayInExternalBrowser(const KURL &url, const TQString &mimetype) { TQString cmd = Settings::externalBrowserCustomCommand(); TQString urlStr = url.url(); - cmd.tqreplace(TQRegExp("%u"), urlStr); + cmd.replace(TQRegExp("%u"), urlStr); KProcess *proc = new KProcess; TQStringList cmdAndArgs = KShell::splitArgs(cmd); *proc << cmdAndArgs; @@ -202,7 +202,7 @@ void Viewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, c void Viewer::slotCopy() { TQString text = selectedText(); - text.tqreplace( TQChar( 0xa0 ), ' ' ); + text.replace( TQChar( 0xa0 ), ' ' ); TQClipboard *cb = TQApplication::tqclipboard(); disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); cb->setText(text); diff --git a/certmanager/certificateinfowidgetimpl.cpp b/certmanager/certificateinfowidgetimpl.cpp index 9067672e2..b661eeeda 100644 --- a/certmanager/certificateinfowidgetimpl.cpp +++ b/certmanager/certificateinfowidgetimpl.cpp @@ -155,7 +155,7 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key ) { for ( Kleo::DN::const_iterator dnit = dn.begin() ; dnit != dn.end() ; ++dnit ) { TQString displayName = (*dnit).name(); - if( dnComponentNames.tqcontains(displayName) ) displayName = dnComponentNames[displayName]; + if( dnComponentNames.contains(displayName) ) displayName = dnComponentNames[displayName]; item = new TQListViewItem( listView, item, displayName, (*dnit).value() ); } diff --git a/certmanager/certificatewizardimpl.cpp b/certmanager/certificatewizardimpl.cpp index 89f4d66eb..4924cd0b2 100644 --- a/certmanager/certificatewizardimpl.cpp +++ b/certmanager/certificatewizardimpl.cpp @@ -391,7 +391,7 @@ void CertificateWizardImpl::slotURLSelected( const TQString& _url ) // The application/pkcs10 mimetype didn't have a native extension, // so the filedialog didn't have the checkbox for auto-adding it. TQString fileName = url.fileName(); - int pos = fileName.tqfindRev( '.' ); + int pos = fileName.findRev( '.' ); if ( pos < 0 ) // no extension url.setFileName( fileName + ".p10" ); #endif diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp index 2ebe66a6a..7c80966a8 100644 --- a/certmanager/certmanager.cpp +++ b/certmanager/certmanager.cpp @@ -363,8 +363,8 @@ void CertManager::createActions() { mComboAction = new ComboAction( lst, actionCollection(), TQT_TQOBJECT(this), TQT_SLOT( slotToggleRemote(int) ), "location_combo_action", mNextFindRemote? 1 : 0 ); - mFindAction = new KAction( i18n("Find"), "tqfind", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearch()), - actionCollection(), "tqfind" ); + mFindAction = new KAction( i18n("Find"), "find", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearch()), + actionCollection(), "find" ); KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotEditKeybindings()), actionCollection() ); KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotShowConfigurationDialog()), actionCollection() ); @@ -745,7 +745,7 @@ void CertManager::slotStartCertificateDownload( const TQString& fingerprint, con TQString CertManager::displayNameForJob( const Kleo::Job *job ) { - JobsDisplayNameMap::iterator it = mJobsDisplayNameMap.tqfind( job ); + JobsDisplayNameMap::iterator it = mJobsDisplayNameMap.find( job ); TQString displayName; if ( it != mJobsDisplayNameMap.end() ) { displayName = *it; diff --git a/certmanager/conf/dirservconfigpage.cpp b/certmanager/conf/dirservconfigpage.cpp index 61a427d80..e95089d8e 100644 --- a/certmanager/conf/dirservconfigpage.cpp +++ b/certmanager/conf/dirservconfigpage.cpp @@ -235,7 +235,7 @@ void DirectoryServicesConfigurationPage::save() KURL::List::const_iterator end = toAdd.end(); for( ; it != end; ++it ) { // check if the URL is already in currentList - if ( currentList.tqfind( *it ) == currentList.end() ) + if ( currentList.find( *it ) == currentList.end() ) // if not, add it currentList.append( *it ); } diff --git a/certmanager/kleopatraui.rc b/certmanager/kleopatraui.rc index 786ae1a35..d07e08b85 100644 --- a/certmanager/kleopatraui.rc +++ b/certmanager/kleopatraui.rc @@ -52,7 +52,7 @@ - + diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp index d179aa953..b1d55ac98 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp @@ -158,7 +158,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { static const int startTokenLen = sizeof startToken / sizeof *startToken - 1; int lineStart = 0; - for ( int lineEnd = d->statusBuffer.tqfind( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.tqfind( '\n', lineStart = lineEnd+1 ) ) { + for ( int lineEnd = d->statusBuffer.find( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.find( '\n', lineStart = lineEnd+1 ) ) { // get next line: const TQCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); if ( line.isEmpty() ) @@ -179,7 +179,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { TQString cmd; TQStringList args; int tagStart = 0; - for ( int tagEnd = command.tqfind( ' ' ) ; tagEnd >= 0 ; tagEnd = command.tqfind( ' ', tagStart = tagEnd+1 ) ) { + for ( int tagEnd = command.find( ' ' ) ; tagEnd >= 0 ; tagEnd = command.find( ' ', tagStart = tagEnd+1 ) ) { const TQCString tag = command.mid( tagStart, tagEnd - tagStart ); if ( cmd.isNull() ) cmd = fromHexEscapedUtf8( tag ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp index 312246851..51f8f68c8 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp @@ -131,7 +131,7 @@ Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const TQString& name { if ( !mParsed ) const_cast( this )->runGpgConf( false ); - return mComponents.tqfind( name ); + return mComponents.find( name ); } void QGpgMECryptoConfig::sync( bool runtime ) @@ -240,7 +240,7 @@ TQStringList QGpgMECryptoConfigComponent::groupList() const Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const TQString& name ) const { - return mGroups.tqfind( name ); + return mGroups.find( name ); } void QGpgMECryptoConfigComponent::sync( bool runtime ) @@ -341,7 +341,7 @@ TQStringList QGpgMECryptoConfigGroup::entryList() const Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const TQString& name ) const { - return mEntries.tqfind( name ); + return mEntries.find( name ); } //// @@ -357,15 +357,15 @@ static TQString gpgconf_escape( const TQString& str ) // Escape special chars (including ':' and '%') TQString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char) // Also encode commas, for lists. - enc.tqreplace( ',', "%2c" ); + enc.replace( ',', "%2c" ); return enc; } static TQString urlpart_encode( const TQString& str ) { TQString enc( str ); - enc.tqreplace( '%', "%25" ); // first! - enc.tqreplace( ':', "%3a" ); + enc.replace( '%', "%25" ); // first! + enc.replace( ':', "%3a" ); //kdDebug() << " urlpart_encode: " << str << " -> " << enc << endl; return enc; } diff --git a/certmanager/lib/cryptplugwrapper.cpp b/certmanager/lib/cryptplugwrapper.cpp index 1d35f1c1b..4ffc59c91 100644 --- a/certmanager/lib/cryptplugwrapper.cpp +++ b/certmanager/lib/cryptplugwrapper.cpp @@ -468,9 +468,9 @@ TQString CryptPlugWrapper::libName() const TQString CryptPlugWrapper::protocol() const { - if ( _libName.tqcontains( "smime" ) ) + if ( _libName.contains( "smime" ) ) return "SMIME"; - if ( _libName.tqcontains( "openpgp" ) ) + if ( _libName.contains( "openpgp" ) ) return "OpenPGP"; return TQString(); } @@ -485,9 +485,9 @@ TQString CryptPlugWrapper::displayName() const { if ( !_name.isEmpty() ) return _name; - if ( _libName.tqcontains( "smime" ) ) + if ( _libName.contains( "smime" ) ) return "gpgsm"; - if ( _libName.tqcontains( "openpgp" ) ) + if ( _libName.contains( "openpgp" ) ) return "gpg"; return i18n("(Unknown Protocol)"); } @@ -503,10 +503,10 @@ bool CryptPlugWrapper::initialize( InitqStatus* initqStatus, TQString* errorMsg _initqStatus = IniStatus_NoLibName; kdDebug(5150) << "No library name was given.\n" << endl; } else { - if ( _libName.tqcontains( "smime" ) ) { + if ( _libName.contains( "smime" ) ) { _cp = new SMIMECryptPlug(); _config = new Config( GPGME_PROTOCOL_CMS ); - } else if ( _libName.tqcontains( "openpgp" ) ) { + } else if ( _libName.contains( "openpgp" ) ) { _cp = new OpenPGPCryptPlug(); _config = new Config( GPGME_PROTOCOL_OpenPGP ); } else { diff --git a/certmanager/lib/cryptplugwrapperlist.cpp b/certmanager/lib/cryptplugwrapperlist.cpp index 7b1c75722..43f88670d 100644 --- a/certmanager/lib/cryptplugwrapperlist.cpp +++ b/certmanager/lib/cryptplugwrapperlist.cpp @@ -28,7 +28,7 @@ CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const TQString & libName ) const { for ( TQPtrListIterator it( *this ) ; it.current() ; ++it ) - if ( (*it)->libName().tqfind( libName, 0, false ) >= 0 ) + if ( (*it)->libName().find( libName, 0, false ) >= 0 ) return *it; return 0; } diff --git a/certmanager/lib/kleo/dn.cpp b/certmanager/lib/kleo/dn.cpp index 0f0c357d2..7e39185c8 100644 --- a/certmanager/lib/kleo/dn.cpp +++ b/certmanager/lib/kleo/dn.cpp @@ -309,7 +309,7 @@ reorder_dn( const Kleo::DN::Attribute::List & dn ) { // find all unknown entries in their order of appearance for ( Kleo::DN::const_iterator it = dn.begin(); it != dn.end(); ++it ) - if ( attrOrder.tqfind( (*it).name() ) == attrOrder.end() ) + if ( attrOrder.find( (*it).name() ) == attrOrder.end() ) unknownEntries.push_back( *it ); // process the known attrs in the desired order diff --git a/certmanager/lib/kleo/downloadjob.h b/certmanager/lib/kleo/downloadjob.h index d7f83f248..1583c4866 100644 --- a/certmanager/lib/kleo/downloadjob.h +++ b/certmanager/lib/kleo/downloadjob.h @@ -69,7 +69,7 @@ namespace Kleo { /** Starts the download operation. \a fingerprints is a list of fingerprints used to specify the list of keys downloaded. Empty - patterns are ignored. If \a fingerprints is empty, tqcontains + patterns are ignored. If \a fingerprints is empty, contains only empty strings or anything other than fingerprints, the result is undefined. */ diff --git a/certmanager/lib/tests/test.data b/certmanager/lib/tests/test.data index f09481ba5..b4bce1a93 100644 --- a/certmanager/lib/tests/test.data +++ b/certmanager/lib/tests/test.data @@ -116,7 +116,7 @@ static int status( void * void_ctx, const char * line ) { static int inquire( void * void_ctx, const char * keyword ) { assuan_context_t ctx = (assuan_context_t)void_ctx; assert( ctx ); - const std::map::const_iterator it = inquireData.tqfind( keyword ); + const std::map::const_iterator it = inquireData.find( keyword ); if ( it == inquireData.end() ) return gpg_error( GPG_ERR_UNKNOWN_COMMAND ); @@ -179,7 +179,7 @@ int main( int argc, char * argv[] ) { options.push_back( argv[++optind] ); } else if ( qstrcmp( arg, "--inquire" ) == 0 ) { const std::string inqval = argv[++optind]; - const size_t pos = inqval.tqfind( '=' ); + const size_t pos = inqval.find( '=' ); // ### implement indirection with "@file"... inquireData[inqval.substr( 0, pos )] = inqval.substr( pos+1 ); } else { diff --git a/certmanager/lib/tests/test_gnupgprocessbase.cpp b/certmanager/lib/tests/test_gnupgprocessbase.cpp index c3ec0c33b..c3aba82d2 100644 --- a/certmanager/lib/tests/test_gnupgprocessbase.cpp +++ b/certmanager/lib/tests/test_gnupgprocessbase.cpp @@ -88,7 +88,7 @@ static TQStringList split( char * buffer, int buflen, TQString & old ) { } static TQString escape( TQString str ) { - return str.tqreplace( '&', "&" ).tqreplace( '<', "<" ).tqreplace( '>', ">" ); + return str.replace( '&', "&" ).replace( '<', "<" ).replace( '>', ">" ); } void GnuPGViewer::slotStdout( KProcess *, char * buffer, int buflen ) { diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp index cd486a864..9fa55e969 100644 --- a/certmanager/lib/ui/cryptoconfigmodule.cpp +++ b/certmanager/lib/ui/cryptoconfigmodule.cpp @@ -59,7 +59,7 @@ using namespace Kleo; static inline TQPixmap loadIcon( TQString s ) { return KGlobal::instance()->iconLoader() - ->loadIcon( s.tqreplace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( s.replace( TQRegExp( "[^a-zA-Z0-9_]" ), "_" ), KIcon::NoGroup, KIcon::SizeMedium ); } static unsigned int num_components_with_options( const Kleo::CryptoConfig * config ) { diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp index 6f42393f2..46adfe3b0 100644 --- a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp +++ b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp @@ -173,7 +173,7 @@ void Kleo::DNAttributeOrderConfigWidget::load() { const TQStringList all = Kleo::DNAttributeMapper::instance()->names(); for ( TQStringList::const_iterator it = all.begin() ; it != all.end() ; ++it ) - if ( order.tqfind( *it ) == order.end() ) + if ( order.find( *it ) == order.end() ) (void)new TQListViewItem( d->availableLV, *it, d->mapper->name2label( *it ) ); if ( !d->placeHolderItem->listView() ) diff --git a/doc/api/Doxyfile.pim b/doc/api/Doxyfile.pim index 6ecb6dd8b..a2bc93361 100644 --- a/doc/api/Doxyfile.pim +++ b/doc/api/Doxyfile.pim @@ -74,7 +74,7 @@ REPEAT_BRIEF = YES # as the annotated text. Otherwise, the brief description is used as-is. If left # blank, the following values are used ("$name" is automatically replaced with the # name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "tqcontains" "represents" "a" "an" "the" +# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" ABBREVIATE_BRIEF = diff --git a/indexlib/GPL_V2 b/indexlib/GPL_V2 index 07dec1a9b..cfa6e1a83 100644 --- a/indexlib/GPL_V2 +++ b/indexlib/GPL_V2 @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/indexlib/boost-compat/config/suffix.hpp b/indexlib/boost-compat/config/suffix.hpp index 3d60d7181..77d9decac 100644 --- a/indexlib/boost-compat/config/suffix.hpp +++ b/indexlib/boost-compat/config/suffix.hpp @@ -332,7 +332,7 @@ namespace std { // The same problem occurs with has_facet. // These macros provide a consistent way to access a locale's facets. // Usage: -// tqreplace +// replace // std::use_facet(loc); // with // BOOST_USE_FACET(Type, loc); @@ -357,7 +357,7 @@ namespace std { // BOOST_NESTED_TEMPLATE workaround ------------------------------------------// // Member templates are supported by some compilers even though they can't use -// the A::template member syntax, as a workaround tqreplace: +// the A::template member syntax, as a workaround replace: // // typedef typename A::template rebind binder; // diff --git a/indexlib/stringset.h b/indexlib/stringset.h index 3daa5d604..4761718b2 100644 --- a/indexlib/stringset.h +++ b/indexlib/stringset.h @@ -129,7 +129,7 @@ struct stringset { void clear(); /** - * Returns std::make_pair( tqfind( word ), tqfind( word + 'Z' ) ) which makes it easy + * Returns std::make_pair( find( word ), find( word + 'Z' ) ) which makes it easy * to implement word* searches */ std::pair upper_lower( const char* ) const; diff --git a/kabc/frontend/mainWindow.ui.h b/kabc/frontend/mainWindow.ui.h index 0740d9cf0..421c0d332 100644 --- a/kabc/frontend/mainWindow.ui.h +++ b/kabc/frontend/mainWindow.ui.h @@ -139,8 +139,8 @@ void MainWindow::readAddressee( const KABC::Addressee &a ) TQStringList customs = a.customs(); TQStringList::ConstIterator it5; for( it5 = customs.begin(); it5 != customs.end(); ++it5 ) { - int posDash = (*it5).tqfind( "-" ); - int posColon = (*it5).tqfind( ":" ); + int posDash = (*it5).find( "-" ); + int posColon = (*it5).find( ":" ); TQString app = (*it5).left( posDash ); TQString cname = (*it5).mid( posDash + 1, posColon - posDash - 1 ); @@ -583,8 +583,8 @@ void MainWindow::editCustom() this ); if ( !ok || name.isEmpty() ) return; - int posDash = name.tqfind( "-" ); - int posColon = name.tqfind( ":" ); + int posDash = name.find( "-" ); + int posColon = name.find( ":" ); TQString app = name.left( posDash ); TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); @@ -610,8 +610,8 @@ void MainWindow::newCustom() this ); if ( !ok || name.isEmpty() ) return; - int posDash = name.tqfind( "-" ); - int posColon = name.tqfind( ":" ); + int posDash = name.find( "-" ); + int posColon = name.find( ":" ); TQString app = name.left( posDash ); TQString cname = name.mid( posDash + 1, posColon - posDash - 1 ); diff --git a/kabc/kabc2mutt/kabc2mutt.cpp b/kabc/kabc2mutt/kabc2mutt.cpp index 7e10dc32e..c12967862 100644 --- a/kabc/kabc2mutt/kabc2mutt.cpp +++ b/kabc/kabc2mutt/kabc2mutt.cpp @@ -53,8 +53,8 @@ void KABC2Mutt::loadingFinished() for ( iaddr = mAddressBook->begin(); iaddr != mAddressBook->end(); ++iaddr ) { const TQString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName(); if ( !mQuery.isEmpty() ) { - bool match = (name.tqfind(mQuery, 0, mIgnoreCase) > -1) || - ((*iaddr).preferredEmail().tqfind( mQuery, 0, mIgnoreCase ) > -1 ); + bool match = (name.find(mQuery, 0, mIgnoreCase) > -1) || + ((*iaddr).preferredEmail().find( mQuery, 0, mIgnoreCase ) > -1 ); if ( !match ) continue; } @@ -86,9 +86,9 @@ void KABC2Mutt::loadingFinished() else if ( !(*iaddr).familyName().isEmpty() ) key = (*iaddr).givenName().left( 1 ).lower() + - (*iaddr).familyName().lower().tqreplace( space, underscore ); + (*iaddr).familyName().lower().replace( space, underscore ); else - key = (*iaddr).givenName().lower().tqreplace( space, underscore ); + key = (*iaddr).givenName().lower().replace( space, underscore ); while ( from != to ) { std::cout << "alias " << key; @@ -101,7 +101,7 @@ void KABC2Mutt::loadingFinished() if ( !(*iaddr).nickName().isEmpty() ) { std::cout << "alias " - << (*iaddr).nickName().lower().tqreplace( space, underscore ) + << (*iaddr).nickName().lower().replace( space, underscore ) << '\t' << name << " <" << (*iaddr).preferredEmail() << '>' << std::endl; } @@ -130,7 +130,7 @@ void KABC2Mutt::loadingFinished() KABC::DistributionList *list = manager.list( *iaddr ); if ( list ) { if ( !mQuery.isEmpty() ) { - bool match = ((*iaddr).tqfind(mQuery) > -1); + bool match = ((*iaddr).find(mQuery) > -1); if ( !match ) continue; } @@ -140,7 +140,7 @@ void KABC2Mutt::loadingFinished() continue; if ( mFormat == Aliases ) { - std::cout << "alias " << (*iaddr).tqreplace( TQRegExp( " " ), "_" ) + std::cout << "alias " << (*iaddr).replace( TQRegExp( " " ), "_" ) << '\t' << emails.join( "," ) << std::endl; } else { std::cout << emails.join( "," ) << '\t' << (*iaddr) << '\t' << std::endl; diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp index 60c1f2a6f..61b8ec90b 100644 --- a/kaddressbook/addresseditwidget.cpp +++ b/kaddressbook/addresseditwidget.cpp @@ -617,7 +617,7 @@ AddressTypeDialog::AddressTypeDialog( int type, TQWidget *tqparent ) new TQCheckBox( KABC::Address::typeLabel( *it ), mGroup ); for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); box->setChecked( type & mTypeList[ i ] ); } } @@ -630,7 +630,7 @@ int AddressTypeDialog::type() const { int type = 0; for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); if ( box->isChecked() ) type += mTypeList[ i ]; } diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 1ea2e77f8..da551648d 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -486,7 +486,7 @@ void AddresseeEditorWidget::setupCustomFieldsTabs() const TQStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true ); for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { - if ( activePages.tqfind( (*it).mid( (*it).tqfindRev('/') + 1 ) ) == activePages.end() ) + if ( activePages.find( (*it).mid( (*it).findRev('/') + 1 ) ) == activePages.end() ) continue; ContactEditorTabPage *page = new ContactEditorTabPage( mTabWidget ); diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp index 548990d16..15bfe7a00 100644 --- a/kaddressbook/addviewdialog.cpp +++ b/kaddressbook/addviewdialog.cpp @@ -94,7 +94,7 @@ TQString AddViewDialog::viewName()const TQString AddViewDialog::viewType()const { // we missuse the name property for storing the type - return mTypeGroup->tqfind( mTypeId )->name(); + return mTypeGroup->find( mTypeId )->name(); } void AddViewDialog::clicked( int id ) diff --git a/kaddressbook/common/locationmap.cpp b/kaddressbook/common/locationmap.cpp index c5de16adf..f4f08fe5b 100644 --- a/kaddressbook/common/locationmap.cpp +++ b/kaddressbook/common/locationmap.cpp @@ -79,17 +79,17 @@ TQString LocationMap::createUrl( const KABC::Address &addr ) } #if KDE_VERSION >= 319 - return urlTemplate.tqreplace( "%s", addr.street() ). - tqreplace( "%r", addr.region() ). - tqreplace( "%l", addr.locality() ). - tqreplace( "%z", addr.postalCode() ). - tqreplace( "%c", addr.countryToISO( addr.country() ) ); + return urlTemplate.replace( "%s", addr.street() ). + replace( "%r", addr.region() ). + replace( "%l", addr.locality() ). + replace( "%z", addr.postalCode() ). + replace( "%c", addr.countryToISO( addr.country() ) ); #else - return urlTemplate.tqreplace( "%s", addr.street() ). - tqreplace( "%r", addr.region() ). - tqreplace( "%l", addr.locality() ). - tqreplace( "%z", addr.postalCode() ). - tqreplace( "%c", "" ); + return urlTemplate.replace( "%s", addr.street() ). + replace( "%r", addr.region() ). + replace( "%l", addr.locality() ). + replace( "%z", addr.postalCode() ). + replace( "%c", "" ); #endif } diff --git a/kaddressbook/customfieldswidget.cpp b/kaddressbook/customfieldswidget.cpp index f22160d7b..d78c48c61 100644 --- a/kaddressbook/customfieldswidget.cpp +++ b/kaddressbook/customfieldswidget.cpp @@ -103,7 +103,7 @@ TQString AddFieldDialog::title() const TQString AddFieldDialog::identifier() const { TQString id = mTitle->text().lower(); - return id.tqreplace( ",", "_" ).tqreplace( " ", "_" ); + return id.replace( ",", "_" ).replace( " ", "_" ); } TQString AddFieldDialog::type() const @@ -547,12 +547,12 @@ TQStringList CustomFieldsWidget::marshallFields( bool global ) const void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { - int colon = str.tqfind( ':' ); + int colon = str.find( ':' ); if ( colon != -1 ) { TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); - int dash = tmp.tqfind( '-' ); + int dash = tmp.find( '-' ); if ( dash != -1 ) { app = tmp.left( dash ); name = tmp.mid( dash + 1 ); diff --git a/kaddressbook/distributionlistpicker.cpp b/kaddressbook/distributionlistpicker.cpp index 5810276e6..9b4d3f727 100644 --- a/kaddressbook/distributionlistpicker.cpp +++ b/kaddressbook/distributionlistpicker.cpp @@ -97,7 +97,7 @@ void KPIM::DistributionListPickerDialog::slotUser1() if ( name.isEmpty() ) return; - validName = !listNames.tqcontains( name ); + validName = !listNames.contains( name ); if ( validName ) { @@ -107,7 +107,7 @@ void KPIM::DistributionListPickerDialog::slotUser1() m_book->insertAddressee( list ); m_listBox->insertItem( name ); - TQListBoxItem* item = m_listBox->tqfindItem( name ); + TQListBoxItem* item = m_listBox->findItem( name ); m_listBox->setSelected( item, true ); } else diff --git a/kaddressbook/editors/imaddresswidget.cpp b/kaddressbook/editors/imaddresswidget.cpp index aa3a9a484..1d64c5b98 100644 --- a/kaddressbook/editors/imaddresswidget.cpp +++ b/kaddressbook/editors/imaddresswidget.cpp @@ -50,7 +50,7 @@ IMAddressWidget::IMAddressWidget( TQWidget *tqparent, TQValueList mProtocols = protocols; populateProtocols(); - cmbProtocol->setCurrentItem( mProtocols.tqfindIndex( protocol ) ); + cmbProtocol->setCurrentItem( mProtocols.findIndex( protocol ) ); edtAddress->setText( address.section( TQChar( 0xE120 ), 0, 0 ) ); edtNetwork->setText( address.section( TQChar( 0xE120 ), 1 ) ); diff --git a/kaddressbook/editors/imeditorwidget.cpp b/kaddressbook/editors/imeditorwidget.cpp index d74f51c14..0c4717b95 100644 --- a/kaddressbook/editors/imeditorwidget.cpp +++ b/kaddressbook/editors/imeditorwidget.cpp @@ -166,7 +166,7 @@ IMEditorWidget::IMEditorWidget( TQWidget *tqparent, const TQString &preferredIM, //mWidget->btnUp->setEnabled( false ); //mWidget->btnDown->setEnabled( false ); mPreferred = preferredIM; - mPreferred = mPreferred.tqreplace( " on ", TQString( TQChar( 0xE120 ) ), true ); + mPreferred = mPreferred.replace( " on ", TQString( TQChar( 0xE120 ) ), true ); mProtocols = KPluginInfo::fromServices( KTrader::self()->query( TQString::tqfromLatin1( "KABC/IMProtocol" ) ) ); // order the protocols by putting them in a qmap, then sorting the set of keys and recreating the list @@ -351,7 +351,7 @@ void IMEditorWidget::slotAdd() mPreferred = addressWid->address(); } - if ( mChangedProtocols.tqfind( addressWid->protocol() ) == mChangedProtocols.end() ) + if ( mChangedProtocols.find( addressWid->protocol() ) == mChangedProtocols.end() ) mChangedProtocols.append( addressWid->protocol() ); mWidget->lvAddresses->sort(); @@ -388,7 +388,7 @@ void IMEditorWidget::slotEdit() } // the entry for the protocol of the current address has changed - if ( mChangedProtocols.tqfind( current->protocol() ) == mChangedProtocols.end() ) { + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) { mChangedProtocols.append( current->protocol() ); } // update protocol - has another protocol gained an address? @@ -396,7 +396,7 @@ void IMEditorWidget::slotEdit() modified = true; // this proto is losing an entry current->setProtocol( addressWid->protocol() ); - if ( mChangedProtocols.tqfind( current->protocol() ) == mChangedProtocols.end() ) + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) mChangedProtocols.append( current->protocol() ); } @@ -431,7 +431,7 @@ void IMEditorWidget::slotDelete() while( it.current() ) { if ( it.current()->isSelected() ) { IMAddressLVI * current = static_cast( *it ); - if ( mChangedProtocols.tqfind( current->protocol() ) == mChangedProtocols.end() ) + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) mChangedProtocols.append( current->protocol() ); if ( current->preferred() ) @@ -457,7 +457,7 @@ void IMEditorWidget::slotDelete() TQString IMEditorWidget::preferred() const { TQString retval( mPreferred ); - return retval.tqreplace( TQChar( 0xE120 ), " on " ); + return retval.replace( TQChar( 0xE120 ), " on " ); } @@ -477,12 +477,12 @@ KPluginInfo * IMEditorWidget::protocolFromString( const TQString &fieldValue ) c void IMEditorWidget::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { - int colon = str.tqfind( ':' ); + int colon = str.find( ':' ); if ( colon != -1 ) { TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); - int dash = tmp.tqfind( '-' ); + int dash = tmp.find( '-' ); if ( dash != -1 ) { app = tmp.left( dash ); name = tmp.mid( dash + 1 ); diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 1496be517..77f53a976 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp @@ -74,7 +74,7 @@ void ExtensionManager::restoreSettings() typedef TQMap::ConstIterator ConstIterator; for ( ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { - if ( activeExtensions.tqcontains( it.data().identifier ) ) { + if ( activeExtensions.contains( it.data().identifier ) ) { KToggleAction *action = static_cast( it.data().action ); if ( action ) action->setChecked( true ); @@ -102,20 +102,20 @@ void ExtensionManager::reconfigure() bool ExtensionManager::isQuickEditVisible() const { - return mActiveExtensions.tqcontains( "contact_editor" ); + return mActiveExtensions.contains( "contact_editor" ); } void ExtensionManager::setSelectionChanged() { for ( TQStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) { - if ( mExtensionMap.tqcontains( *it ) && mExtensionMap[*it].widget ) + if ( mExtensionMap.contains( *it ) && mExtensionMap[*it].widget ) mExtensionMap[*it].widget->contactsSelectionChanged(); } } void ExtensionManager::activationToggled( const TQString &extid ) { - if ( !mExtensionMap.tqcontains( extid ) ) + if ( !mExtensionMap.contains( extid ) ) return; const ExtensionData data = mExtensionMap[ extid ]; const bool activated = data.action->isChecked(); @@ -124,9 +124,9 @@ void ExtensionManager::activationToggled( const TQString &extid ) void ExtensionManager::setExtensionActive( const TQString& extid, bool active ) { - if ( !mExtensionMap.tqcontains( extid ) ) + if ( !mExtensionMap.contains( extid ) ) return; - if ( mActiveExtensions.tqcontains( extid ) == active ) + if ( mActiveExtensions.contains( extid ) == active ) return; const ExtensionData data = mExtensionMap[ extid ]; if ( active ) { @@ -174,7 +174,7 @@ void ExtensionManager::createActions() mMapper->setMapping( data.action, data.identifier ); mActionList.append( data.action ); - if ( mActiveExtensions.tqcontains( data.identifier ) ) + if ( mActiveExtensions.contains( data.identifier ) ) data.action->setChecked( true ); } diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp index 7ce25beb7..fc8af3abd 100644 --- a/kaddressbook/features/distributionlistwidget.cpp +++ b/kaddressbook/features/distributionlistwidget.cpp @@ -255,9 +255,9 @@ void DistributionListWidget::selectionContactViewChanged() bool DistributionListWidget::alreadyExists( const TQString& distrListName ) const { #ifdef KDEPIM_NEW_DISTRLISTS - return core()->distributionListNames().tqcontains( distrListName ); + return core()->distributionListNames().contains( distrListName ); #else - return mManager->listNames().tqcontains( distrListName ); + return mManager->listNames().contains( distrListName ); #endif } diff --git a/kaddressbook/features/resourceselection.cpp b/kaddressbook/features/resourceselection.cpp index edbb37a08..0629052ab 100644 --- a/kaddressbook/features/resourceselection.cpp +++ b/kaddressbook/features/resourceselection.cpp @@ -241,7 +241,7 @@ void ResourceSelection::add() if ( !ok ) return; - TQString type = types[ descs.tqfindIndex( desc ) ]; + TQString type = types[ descs.findIndex( desc ) ]; // Create new resource KABC::Resource *resource = mManager->createResource( type ); @@ -410,7 +410,7 @@ void ResourceSelection::slotSubresourceAdded( KPIM::ResourceABC *resource, const TQString& subResource ) { kdDebug(5720) << k_funcinfo << resource->resourceName() << " " << subResource << endl; - TQListViewItem *i = mListView->tqfindItem( resource->resourceName(), 0 ); + TQListViewItem *i = mListView->findItem( resource->resourceName(), 0 ); if ( !i ) // Not found return; diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index 7428b3638..bb9e255b3 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp @@ -71,7 +71,7 @@ void FilterEditDialog::setFilter( const Filter &filter ) TQStringList categories = filter.categories(); TQListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { - if ( categories.tqcontains( item->text( 0 ) ) ) { + if ( categories.contains( item->text( 0 ) ) ) { TQCheckListItem *checkItem = static_cast( item ); checkItem->setOn( true ); } @@ -102,7 +102,7 @@ Filter FilterEditDialog::filter() } filter.setCategories( categories ); - if ( mMatchRuleGroup->tqfind( 0 )->isOn() ) + if ( mMatchRuleGroup->find( 0 )->isOn() ) filter.setMatchRule( Filter::Matching ); else filter.setMatchRule( Filter::NotMatching ); diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 5dc432868..2b9b32c96 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp @@ -404,13 +404,13 @@ void GeoDialog::loadCityList() pos = name.search(line, pos); if ( pos > 0 ) { n = line.mid( pos, name.matchedLength() ).stripWhiteSpace(); - n.tqreplace( '_', " " ); + n.replace( '_', " " ); } if ( !c.isEmpty() && !n.isEmpty() ) { - pos = c.tqfind( "+", 1 ); + pos = c.find( "+", 1 ); if ( pos < 0 ) - pos = c.tqfind( "-", 1 ); + pos = c.find( "-", 1 ); if ( pos > 0 ) { GeoData data; data.latitude = calculateCoordinate( c.left( pos ) ); diff --git a/kaddressbook/jumpbuttonbar.cpp b/kaddressbook/jumpbuttonbar.cpp index 1af942b2d..e4a712a9d 100644 --- a/kaddressbook/jumpbuttonbar.cpp +++ b/kaddressbook/jumpbuttonbar.cpp @@ -121,7 +121,7 @@ void JumpButtonBar::updateButtons() return; } - if ( !character.isEmpty() && !characters.tqcontains( character ) ) + if ( !character.isEmpty() && !characters.contains( character ) ) characters.append( character ); } diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 23ebc277b..db10f8f96 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -778,7 +778,7 @@ void KABCore::addEmail( const TQString &aStr ) const KABC::AddressBook::Iterator endIt( mAddressBook->end() ); for ( it = mAddressBook->begin(); !found && (it != endIt); ++it ) { emailList = (*it).emails(); - if ( emailList.tqcontains( email ) > 0 ) { + if ( emailList.contains( email ) > 0 ) { found = true; (*it).setNameFromString( fullName ); editContact( (*it).uid() ); @@ -831,7 +831,7 @@ void KABCore::editContact( const TQString &uid ) KABC::Addressee addr = mAddressBook->findByUid( localUID ); if ( !addr.isEmpty() ) { - AddresseeEditorDialog *dialog = mEditorDict.tqfind( addr.uid() ); + AddresseeEditorDialog *dialog = mEditorDict.find( addr.uid() ); if ( !dialog ) { if ( !addr.resource()->readOnly() ) @@ -1005,7 +1005,7 @@ TQString KABCore::getNameByPhone( const TQString &phone ) const KABC::PhoneNumber::List::Iterator phoneEndIter( phoneList.end() ); for ( ; !found && ( phoneIter != phoneEndIter ); ++phoneIter) { // Get rid of separator chars so just the numbers are compared. - if ( (*phoneIter).number().tqreplace( r, "" ) == localPhone.tqreplace( r, "" ) ) { + if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { ownerName = (*iter).realName(); found = true; } @@ -1406,7 +1406,7 @@ void KABCore::initActions() action->setWhatsThis( i18n( "You will be presented with a dialog, that offers you all possibilities to configure KAddressBook." ) ); // misc - action = new KAction( i18n( "&Lookup Addresses in LDAP Directory..." ), "tqfind", 0, + action = new KAction( i18n( "&Lookup Addresses in LDAP Directory..." ), "find", 0, this, TQT_SLOT( openLDAPDialog() ), actionCollection(), "ldap_lookup" ); action->setWhatsThis( i18n( "Search for contacts on a LDAP server

You will be presented with a dialog, where you can search for contacts and select the ones you want to add to your local address book." ) ); @@ -1449,7 +1449,7 @@ void KABCore::updateCategories() TQStringList::ConstIterator it; const TQStringList::ConstIterator endIt( customCategories.end() ); for ( it = customCategories.begin(); it != endIt; ++it ) { - if ( categories.tqfind( *it ) == categories.end() ) { + if ( categories.find( *it ) == categories.end() ) { categories.append( *it ); } } @@ -1477,7 +1477,7 @@ TQStringList KABCore::allCategories() const categories = (*it).categories(); const TQStringList::ConstIterator catEndIt( categories.end() ); for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) { - if ( !allCategories.tqcontains( *catIt ) ) + if ( !allCategories.contains( *catIt ) ) allCategories.append( *catIt ); } } @@ -1519,7 +1519,7 @@ void KABCore::categoriesSelected( const TQStringList &categories ) TQStringList::ConstIterator catIt; const TQStringList::ConstIterator catEndIt( categories.end() ); for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) { - if ( !addrCategories.tqcontains( *catIt ) ) + if ( !addrCategories.contains( *catIt ) ) addrCategories.append( *catIt ); } addr.setCategories( addrCategories ); diff --git a/kaddressbook/kablock.cpp b/kaddressbook/kablock.cpp index 259ee70da..9444df472 100644 --- a/kaddressbook/kablock.cpp +++ b/kaddressbook/kablock.cpp @@ -65,7 +65,7 @@ KABLock *KABLock::self( KABC::AddressBook *ab ) bool KABLock::lock( KABC::Resource *resource ) { - if ( mLocks.tqfind( resource ) == mLocks.end() ) { // not locked yet + if ( mLocks.find( resource ) == mLocks.end() ) { // not locked yet KABC::Ticket *ticket = mAddressBook->requestSaveTicket( resource ); if ( !ticket ) { return false; @@ -89,7 +89,7 @@ bool KABLock::unlock( KABC::Resource *resource ) if ( resource == 0 ) resource = wrapper->getStandardResource(); - if ( mLocks.tqfind( resource ) == mLocks.end() ) { // hmm, not good... + if ( mLocks.find( resource ) == mLocks.end() ) { // hmm, not good... return false; } else { LockEntry &entry = mLocks[ resource ]; diff --git a/kaddressbook/kabtools.cpp b/kaddressbook/kabtools.cpp index 31d7f3684..3efa42772 100644 --- a/kaddressbook/kabtools.cpp +++ b/kaddressbook/kabtools.cpp @@ -39,12 +39,12 @@ static TQString uniqueFileName( const KABC::Addressee &addressee, TQStringList & uint number = 0; do { name = addressee.givenName() + "_" + addressee.familyName() + uniquePart + ".vcf"; - name.tqreplace( ' ', '_' ); - name.tqreplace( '/', '_' ); + name.replace( ' ', '_' ); + name.replace( '/', '_' ); ++number; uniquePart = TQString( "_%1" ).tqarg( number ); - } while ( existingFiles.tqcontains( name ) ); + } while ( existingFiles.contains( name ) ); existingFiles.append( name ); @@ -141,7 +141,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) KABC::Address::List::ConstIterator addrIt( addresses.begin() ); const KABC::Address::List::ConstIterator addrEndIt( addresses.end() ); for ( ; addrIt != addrEndIt; ++addrIt ) { - if ( !masterAddresses.tqcontains( *addrIt ) ) + if ( !masterAddresses.contains( *addrIt ) ) masterAddressee.insertAddress( *addrIt ); } @@ -156,7 +156,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) TQStringList::ConstIterator it( categories.begin() ); TQStringList::ConstIterator endIt( categories.end() ); for ( it = categories.begin(); it != endIt; ++it ) - if ( !masterCategories.tqcontains( *it ) ) + if ( !masterCategories.contains( *it ) ) newCategories.append( *it ); masterAddressee.setCategories( newCategories ); @@ -169,7 +169,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) const TQStringList masterEmails = masterAddressee.emails(); endIt = emails.end(); for ( it = emails.begin(); it != endIt; ++it ) - if ( !masterEmails.tqcontains( *it ) ) + if ( !masterEmails.contains( *it ) ) masterAddressee.insertEmail( *it, false ); // FN @@ -239,7 +239,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) KABC::PhoneNumber::List::ConstIterator phoneIt( phones.begin() ); const KABC::PhoneNumber::List::ConstIterator phoneEndIt( phones.end() ); for ( ; phoneIt != phoneEndIt; ++phoneIt ) - if ( !masterPhones.tqcontains( *phoneIt ) ) + if ( !masterPhones.contains( *phoneIt ) ) masterAddressee.insertPhoneNumber( *phoneIt ); // TITLE @@ -262,7 +262,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) TQStringList newCustoms( masterCustoms ); endIt = customs.end(); for ( it = customs.begin(); it != endIt; ++it ) - if ( !masterCustoms.tqcontains( *it ) ) + if ( !masterCustoms.contains( *it ) ) newCustoms.append( *it ); masterAddressee.setCustoms( newCustoms ); } diff --git a/kaddressbook/kcmconfigs/kabldapconfig.desktop b/kaddressbook/kcmconfigs/kabldapconfig.desktop index e007f2b52..2d29acdf0 100644 --- a/kaddressbook/kcmconfigs/kabldapconfig.desktop +++ b/kaddressbook/kcmconfigs/kabldapconfig.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Icon=tqfind +Icon=find Type=Service ServiceTypes=KCModule DocPath=kaddressbook/preferences.html#preferences-ldap-lookup diff --git a/kaddressbook/keywidget.cpp b/kaddressbook/keywidget.cpp index 3541ddf1d..1b6e77440 100644 --- a/kaddressbook/keywidget.cpp +++ b/kaddressbook/keywidget.cpp @@ -98,7 +98,7 @@ void KeyWidget::addKey() KABC::Key::TypeList::ConstIterator it; for ( it = typeList.begin(); it != typeList.end(); ++it ) { if ( (*it) != KABC::Key::Custom && - !existingKeyTypes.tqcontains( KABC::Key::typeLabel( *it ) ) ) { + !existingKeyTypes.contains( KABC::Key::typeLabel( *it ) ) ) { keyMap.insert( KABC::Key::typeLabel( *it ), *it ); keyTypeNames.append( KABC::Key::typeLabel( *it ) ); } @@ -110,7 +110,7 @@ void KeyWidget::addKey() return; int type = keyMap[ name ]; - if ( !keyTypeNames.tqcontains( name ) ) + if ( !keyTypeNames.contains( name ) ) type = KABC::Key::Custom; KURL url = KFileDialog::getOpenURL(); diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index fc05df184..4a394621b 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -68,7 +68,7 @@ PhoneTypeCombo::~PhoneTypeCombo() void PhoneTypeCombo::setType( int type ) { - if ( !mTypeList.tqcontains( type ) ) + if ( !mTypeList.contains( type ) ) mTypeList.insert( mTypeList.at( mTypeList.count() - 1 ), type ); mType = type; @@ -97,7 +97,7 @@ void PhoneTypeCombo::update() } } - setCurrentItem( mLastSelected = mTypeList.tqfindIndex( mType ) ); + setCurrentItem( mLastSelected = mTypeList.findIndex( mType ) ); blockSignals( blocked ); } @@ -117,7 +117,7 @@ void PhoneTypeCombo::otherSelected() PhoneTypeDialog dlg( mType, this ); if ( dlg.exec() ) { mType = dlg.type(); - if ( !mTypeList.tqcontains( mType ) ) + if ( !mTypeList.contains( mType ) ) mTypeList.insert( mTypeList.at( mTypeList.count() - 1 ), mType ); } else { setType( mTypeList[ mLastSelected ] ); @@ -315,7 +315,7 @@ PhoneTypeDialog::PhoneTypeDialog( int type, TQWidget *tqparent ) new TQCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup ); for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); box->setChecked( mType & mTypeList[ i ] ); } @@ -327,7 +327,7 @@ int PhoneTypeDialog::type() const int type = 0; for ( int i = 0; i < mGroup->count(); ++i ) { - TQCheckBox *box = (TQCheckBox*)mGroup->tqfind( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); if ( box->isChecked() ) type += mTypeList[ i ]; } diff --git a/kaddressbook/printing/kabentrypainter.cpp b/kaddressbook/printing/kabentrypainter.cpp index 356b53dfb..91bf9f342 100644 --- a/kaddressbook/printing/kabentrypainter.cpp +++ b/kaddressbook/printing/kabentrypainter.cpp @@ -139,7 +139,7 @@ int KABEntryPainter::hits( const TQRectList& list, const TQPoint &p ) int count = 0; for ( pos = list.begin(); pos != list.end(); ++pos ) { - if ( (*pos).tqcontains( p ) ) + if ( (*pos).contains( p ) ) return count; ++count; @@ -241,7 +241,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr, if ( !( addr.prefix().isEmpty() ) ) y += fmBody.lineSpacing() / 2; - // fill the parts stringlist, it tqcontains "parts" (printable areas) + // fill the parts stringlist, it contains "parts" (printable areas) // that will be combined to fill the page as effectively as possible: // Email addresses: if ( !addr.emails().isEmpty() && mShowEmails ) { diff --git a/kaddressbook/printing/mikesstyle.cpp b/kaddressbook/printing/mikesstyle.cpp index 63cfdcfd0..2301bb16c 100644 --- a/kaddressbook/printing/mikesstyle.cpp +++ b/kaddressbook/printing/mikesstyle.cpp @@ -226,14 +226,14 @@ int MikesStyle::calcHeight( const KABC::Addressee &addr, // Determine which half of the fields is higher for ( int i = 0; i < numFields / 2; i++ ) - halfHeight += fm.height() * (fieldList[ i ]->value( addr ).tqcontains( '\n' ) + 1); + halfHeight += fm.height() * (fieldList[ i ]->value( addr ).contains( '\n' ) + 1); height = halfHeight; // now the second half halfHeight = 0; for ( int i = numFields / 2; i < numFields; i++ ) - halfHeight += fm.height() * (fieldList[ i ]->value( addr ).tqcontains( '\n' ) + 1); + halfHeight += fm.height() * (fieldList[ i ]->value( addr ).contains( '\n' ) + 1); height = TQMAX( height, halfHeight ); diff --git a/kaddressbook/printing/printingwizard.cpp b/kaddressbook/printing/printingwizard.cpp index 949ebd519..e42621dee 100644 --- a/kaddressbook/printing/printingwizard.cpp +++ b/kaddressbook/printing/printingwizard.cpp @@ -186,7 +186,7 @@ void PrintingWizard::print() const TQStringList tmp( (*it).categories() ); TQStringList::ConstIterator tmpIt; for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) - if ( categories.tqcontains( *tmpIt ) ) { + if ( categories.contains( *tmpIt ) ) { list.append( *it ); break; } diff --git a/kaddressbook/printing/printstyle.cpp b/kaddressbook/printing/printstyle.cpp index 02e563eea..1c0c79710 100644 --- a/kaddressbook/printing/printstyle.cpp +++ b/kaddressbook/printing/printstyle.cpp @@ -76,7 +76,7 @@ PrintingWizard *PrintStyle::wizard() void PrintStyle::addPage( TQWidget *page, const TQString &title ) { - if ( mPageList.tqfind( page ) == -1 ) { // not yet in the list + if ( mPageList.find( page ) == -1 ) { // not yet in the list mPageList.append( page ); mPageTitles.append( title ); } diff --git a/kaddressbook/searchmanager.cpp b/kaddressbook/searchmanager.cpp index 32b898cd8..7a24e1b9d 100644 --- a/kaddressbook/searchmanager.cpp +++ b/kaddressbook/searchmanager.cpp @@ -117,7 +117,7 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi mContacts.append( *it ); found = true; break; - } else if ( type == Contains && (*fieldIt)->value( *it ).tqfind( pattern, 0, false ) != -1 ) { + } else if ( type == Contains && (*fieldIt)->value( *it ).find( pattern, 0, false ) != -1 ) { mContacts.append( *it ); found = true; break; @@ -135,7 +135,7 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi TQStringList::ConstIterator customIt( customs.begin() ); const TQStringList::ConstIterator customEndIt( customs.end() ); for ( ; customIt != customEndIt; ++customIt ) { - int pos = (*customIt).tqfind( ':' ); + int pos = (*customIt).find( ':' ); if ( pos != -1 ) { const TQString value = (*customIt).mid( pos + 1 ); if ( type == StartsWith && value.tqstartsWith( pattern, false ) ) { @@ -144,7 +144,7 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi } else if ( type == EndsWith && value.tqendsWith( pattern, false ) ) { mContacts.append( *it ); break; - } else if ( type == Contains && value.tqfind( pattern, 0, false ) != -1 ) { + } else if ( type == Contains && value.find( pattern, 0, false ) != -1 ) { mContacts.append( *it ); break; } else if ( type == Equals && value.localeAwareCompare( pattern ) == 0 ) { diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp index eb6b76700..3216ea733 100644 --- a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp +++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp @@ -130,7 +130,7 @@ bool VCard_LDIFCreator::readContents( const TQString &path ) TQStringList phoneNumbers; for (unsigned int no=0; no (int) i ) i = pos +1; } diff --git a/kaddressbook/typecombo.h b/kaddressbook/typecombo.h index 7280b5c7d..29266fa82 100644 --- a/kaddressbook/typecombo.h +++ b/kaddressbook/typecombo.h @@ -86,7 +86,7 @@ void TypeCombo::updateTypes() int type = ( mTypeList[ i ].type() & ~( T::Pref ) ); TQString label = mTypeList[ i ].typeLabel( type ); int count = 1; - if ( labelCount.tqcontains( type ) ) { + if ( labelCount.contains( type ) ) { count = labelCount[ type ] + 1; } labelCount[ type ] = count; diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 23b1a4cc2..646fbbae9 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -195,7 +195,7 @@ void ViewManager::setActiveView( const TQString &name ) // we can't find it, it means it hasn't been instantiated, so we will // create it on demand. - view = mViewDict.tqfind( name ); + view = mViewDict.find( name ); // Check if we found the view. If we didn't, then we need to create it if ( view == 0 ) { @@ -205,7 +205,7 @@ void ViewManager::setActiveView( const TQString &name ) kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl; - ViewFactory *factory = mViewFactoryDict.tqfind( type ); + ViewFactory *factory = mViewFactoryDict.find( type ); if ( factory ) view = factory->view( mCore, mViewWidgetStack ); @@ -265,7 +265,7 @@ void ViewManager::editView() if ( !mActiveView ) return; - ViewFactory *factory = mViewFactoryDict.tqfind( mActiveView->type() ); + ViewFactory *factory = mViewFactoryDict.find( mActiveView->type() ); ViewConfigureWidget *wdg = 0; if ( factory ) { @@ -342,7 +342,7 @@ void ViewManager::addView() // Check for name conflicts bool firstConflict = true; int numTries = 1; - while ( mViewNameList.tqcontains( newName ) > 0 ) { + while ( mViewNameList.contains( newName ) > 0 ) { if ( !firstConflict ) { newName = newName.left( newName.length() - 4 ); firstConflict = false; @@ -363,7 +363,7 @@ void ViewManager::addView() // try to set the active view mActionSelectView->setItems( mViewNameList ); - mActionSelectView->setCurrentItem( mViewNameList.tqfindIndex( newName ) ); + mActionSelectView->setCurrentItem( mViewNameList.findIndex( newName ) ); setActiveView( newName ); editView(); diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp index 9b0784d89..b790b0c3f 100644 --- a/kaddressbook/views/cardview.cpp +++ b/kaddressbook/views/cardview.cpp @@ -61,7 +61,7 @@ class CardViewTip : public TQLabel }; // -// Warning: make sure you use tqfindRef() instead of tqfind() to find an +// Warning: make sure you use findRef() instead of find() to find an // item! Only the pointer value is unique in the list. // class CardViewItemList : public TQPtrList @@ -355,7 +355,7 @@ int CardViewItem::height( bool allowCache ) const for ( iter.toFirst(); iter.current(); ++iter ) { if ( !sef && (*iter)->second.isEmpty() ) continue; - lines = TQMIN( (*iter)->second.tqcontains( '\n' ) + 1, maxLines ); + lines = TQMIN( (*iter)->second.contains( '\n' ) + 1, maxLines ); fieldHeight += ( lines * fh ) + 2; } @@ -507,7 +507,7 @@ void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip ) Field *_f; for ( _f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next() ) if ( se || ! _f->second.isEmpty() ) - y += ( TQMIN( _f->second.tqcontains( '\n' ) + 1, maxLines ) * fh ) + 2; + y += ( TQMIN( _f->second.contains( '\n' ) + 1, maxLines ) * fh ) + 2; if ( isLabel && itempos.y() > y + fh ) return; @@ -521,7 +521,7 @@ void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip ) trimmed = mView->d->mFm->width( s ) > mw - colonWidth; } else { TQRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, TQt::AlignTop|TQt::AlignLeft, s ) ); - trimmed = r.width() > mw || r.height() / fh > TQMIN( s.tqcontains( '\n' ) + 1, maxLines ); + trimmed = r.width() > mw || r.height() / fh > TQMIN( s.contains( '\n' ) + 1, maxLines ); } } @@ -560,7 +560,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const TQPoint & itempos ) const Field *f; for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() ) { if ( showEmpty || !f->second.isEmpty() ) - ypos += (TQMIN( f->second.tqcontains( '\n' )+1, maxLines ) * fh) + 2; + ypos += (TQMIN( f->second.contains( '\n' )+1, maxLines ) * fh) + 2; if ( iy <= ypos ) break; } @@ -616,7 +616,7 @@ void CardView::takeItem( CardViewItem *item ) { if ( d->mCurrentItem == item ) d->mCurrentItem = item->nextItem(); - d->mItemList.take( d->mItemList.tqfindRef( item ) ); + d->mItemList.take( d->mItemList.findRef( item ) ); setLayoutDirty( true ); } @@ -671,7 +671,7 @@ CardViewItem *CardView::itemAt( const TQPoint &viewPos ) const bool found = false; for ( iter.toFirst(); iter.current() && !found; ++iter ) { item = *iter; - if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).tqcontains( viewPos ) ) + if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) ) found = true; } @@ -860,7 +860,7 @@ void CardView::drawContents( TQPainter *p, int clipx, int clipy, item = *iter; cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() ); - if ( clipRect.intersects( cardRect ) || clipRect.tqcontains( cardRect ) ) { + if ( clipRect.intersects( cardRect ) || clipRect.contains( cardRect ) ) { // Tell the card to paint p->save(); p->translate( cardRect.x(), cardRect.y() ); @@ -875,7 +875,7 @@ void CardView::drawContents( TQPainter *p, int clipx, int clipy, sep = *sepIter; sepRect = sep->mRect; - if ( clipRect.intersects( sepRect ) || clipRect.tqcontains( sepRect ) ) { + if ( clipRect.intersects( sepRect ) || clipRect.contains( sepRect ) ) { p->save(); p->translate( sepRect.x(), sepRect.y() ); sep->paintSeparator( p, cg ); @@ -953,7 +953,7 @@ void CardView::calcLayout() CardViewItem *CardView::itemAfter( const CardViewItem *item ) const { - d->mItemList.tqfindRef( item ); + d->mItemList.findRef( item ); return d->mItemList.next(); } @@ -1070,8 +1070,8 @@ void CardView::contentsMousePressEvent( TQMouseEvent *e ) } int from, to, a, b; - a = d->mItemList.tqfindRef( item ); - b = d->mItemList.tqfindRef( other ); + a = d->mItemList.findRef( item ); + b = d->mItemList.findRef( other ); from = a < b ? a : b; to = a > b ? a : b; @@ -1218,7 +1218,7 @@ void CardView::keyPressEvent( TQKeyEvent *e ) return; } - uint pos = d->mItemList.tqfindRef( d->mCurrentItem ); + uint pos = d->mItemList.findRef( d->mCurrentItem ); CardViewItem *aItem = 0; CardViewItem *old = d->mCurrentItem; @@ -1347,8 +1347,8 @@ void CardView::keyPressEvent( TQKeyEvent *e ) // otherwise, ?????? bool s = ! aItem->isSelected(); int from, to, a, b; - a = d->mItemList.tqfindRef( aItem ); - b = d->mItemList.tqfindRef( old ); + a = d->mItemList.findRef( aItem ); + b = d->mItemList.findRef( old ); from = a < b ? a : b; to = a > b ? a : b; diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index 03962d3a0..aa2d76539 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp @@ -123,7 +123,7 @@ void CSVXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list ) if ( !first ) t << ","; - t << "\"" << (*fieldIter)->value( addr ).tqreplace( "\n", "\\n" ) << "\""; + t << "\"" << (*fieldIter)->value( addr ).replace( "\n", "\\n" ) << "\""; first = false; } diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp index 1120e4f06..9e2b8d6f6 100644 --- a/kaddressbook/xxport/csvimportdialog.cpp +++ b/kaddressbook/xxport/csvimportdialog.cpp @@ -854,7 +854,7 @@ void CSVImportDialog::saveTemplate() if ( fileName.isEmpty() ) return; - if ( !fileName.tqcontains( ".desktop" ) ) + if ( !fileName.contains( ".desktop" ) ) fileName += ".desktop"; if( TQFileInfo(fileName).exists() ) { diff --git a/kaddressbook/xxport/eudora_xxport.cpp b/kaddressbook/xxport/eudora_xxport.cpp index 9844b5507..bed374339 100644 --- a/kaddressbook/xxport/eudora_xxport.cpp +++ b/kaddressbook/xxport/eudora_xxport.cpp @@ -124,22 +124,22 @@ TQString EudoraXXPort::key( const TQString& line) const { int e; TQString result; - int b = line.tqfind( '\"', 0 ); + int b = line.find( '\"', 0 ); if ( b == -1 ) { - b = line.tqfind( ' ' ); + b = line.find( ' ' ); if ( b == -1 ) return result; b++; - e = line.tqfind( ' ', b ); + e = line.find( ' ', b ); result = line.mid( b, e - b ); return result; } b++; - e = line.tqfind( '\"', b ); + e = line.find( '\"', b ); if ( e == -1 ) return result; @@ -152,9 +152,9 @@ TQString EudoraXXPort::email( const TQString& line ) const { int b; TQString result; - b = line.tqfindRev( '\"' ); + b = line.findRev( '\"' ); if ( b == -1 ) { - b = line.tqfindRev( ' ' ); + b = line.findRev( ' ' ); if ( b == -1 ) return result; } @@ -168,9 +168,9 @@ TQString EudoraXXPort::comment( const TQString& line ) const int b; TQString result; uint i; - b = line.tqfindRev( '>' ); + b = line.findRev( '>' ); if ( b == -1 ) { - b = line.tqfindRev( '\"' ); + b = line.findRev( '\"' ); if ( b == -1 ) return result; } @@ -191,12 +191,12 @@ TQString EudoraXXPort::get( const TQString& line, const TQString& key ) const uint i; // Find formatted key, return on error - b = line.tqfind( fd ); + b = line.find( fd ); if ( b == -1 ) return TQString(); b += fd.length(); - e = line.tqfind( '>', b ); + e = line.find( '>', b ); if ( e == -1 ) return TQString(); diff --git a/kaddressbook/xxport/eudora_xxport.h b/kaddressbook/xxport/eudora_xxport.h index e8dcf939a..de2b47845 100644 --- a/kaddressbook/xxport/eudora_xxport.h +++ b/kaddressbook/xxport/eudora_xxport.h @@ -44,7 +44,7 @@ class EudoraXXPort : public KAB::XXPort TQString comment( const TQString& line ) const; TQString email( const TQString& line ) const; TQString key( const TQString& line ) const; - int tqfind( const TQString& key ) const; + int find( const TQString& key ) const; }; #endif diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp index 564fcf5fb..2d18cef7c 100644 --- a/kaddressbook/xxport/gnokii_xxport.cpp +++ b/kaddressbook/xxport/gnokii_xxport.cpp @@ -94,7 +94,7 @@ static TQString makeValidPhone( const TQString &number ) TQString num = number.simplifyWhiteSpace(); TQString allowed("0123456789*+#pw"); for (unsigned int i=num.length(); i>=1; i--) - if (allowed.tqfind(num[i-1])==-1) + if (allowed.find(num[i-1])==-1) num.remove(i-1,1); if (num.isEmpty()) num = "0"; @@ -242,7 +242,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.tqfind(',') == -1) { + if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -482,13 +482,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem TQStringList a; TQChar sem(';'); TQString sem_repl(TQString::tqfromLatin1(",")); - a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); - a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); - a.append( Addr->street() .tqreplace( sem, sem_repl ) ); - a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); - a.append( Addr->region() .tqreplace( sem, sem_repl ) ); - a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); - a.append( Addr->country() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); + a.append( Addr->extended() .replace( sem, sem_repl ) ); + a.append( Addr->street() .replace( sem, sem_repl ) ); + a.append( Addr->locality() .replace( sem, sem_repl ) ); + a.append( Addr->region() .replace( sem, sem_repl ) ); + a.append( Addr->postalCode() .replace( sem, sem_repl ) ); + a.append( Addr->country() .replace( sem, sem_repl ) ); s = a.join(sem); gn_lib_set_pb_subentry(state, -1 /* index to append entry */, GN_PHONEBOOK_ENTRY_Postal, GN_PHONEBOOK_NUMBER_General, GN_TO(s)); @@ -639,7 +639,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri if (memstat.free >= (int) list.count()) { if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), i18n("Do you want the selected contacts to be appended to " - "the current mobile phonebook or should they tqreplace all " + "the current mobile phonebook or should they replace all " "currently existing phonebook entries ?

" "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " @@ -1015,7 +1015,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(entry.name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.tqfind(',') == -1) { + if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -1264,13 +1264,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem TQStringList a; TQChar sem(';'); TQString sem_repl(TQString::tqfromLatin1(",")); - a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); - a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); - a.append( Addr->street() .tqreplace( sem, sem_repl ) ); - a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); - a.append( Addr->region() .tqreplace( sem, sem_repl ) ); - a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); - a.append( Addr->country() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); + a.append( Addr->extended() .replace( sem, sem_repl ) ); + a.append( Addr->street() .replace( sem, sem_repl ) ); + a.append( Addr->locality() .replace( sem, sem_repl ) ); + a.append( Addr->region() .replace( sem, sem_repl ) ); + a.append( Addr->postalCode() .replace( sem, sem_repl ) ); + a.append( Addr->country() .replace( sem, sem_repl ) ); s = a.join(sem); strncpy(subentry->data.number, GN_TO(s), sizeof(subentry->data.number)-1); entry.subentries_count++; @@ -1430,7 +1430,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri if (memstat.free >= (int) list.count()) { if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), i18n("Do you want the selected contacts to be appended to " - "the current mobile phonebook or should they tqreplace all " + "the current mobile phonebook or should they replace all " "currently existing phonebook entries ?

" "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " diff --git a/kaddressbook/xxport/opera_xxport.cpp b/kaddressbook/xxport/opera_xxport.cpp index 59fd52eaa..593960e83 100644 --- a/kaddressbook/xxport/opera_xxport.cpp +++ b/kaddressbook/xxport/opera_xxport.cpp @@ -84,7 +84,7 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const } if ( parseContact == true ) { - int sep = line.tqfind( '=' ); + int sep = line.find( '=' ); key = line.left( sep ).lower(); value = line.mid( sep + 1 ); if ( key == TQString::tqfromLatin1( "name" ) ) @@ -105,10 +105,10 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home ) ); else if ( key == TQString::tqfromLatin1( "postaladdress" ) ) { KABC::Address address( KABC::Address::Home ); - address.setLabel( value.tqreplace( separator, "\n" ) ); + address.setLabel( value.replace( separator, "\n" ) ); addr.insertAddress( address ); } else if ( key == TQString::tqfromLatin1( "description" ) ) - addr.setNote( value.tqreplace( separator, "\n" ) ); + addr.setNote( value.replace( separator, "\n" ) ); else if ( key == TQString::tqfromLatin1( "url" ) ) addr.setUrl( KURL( value ) ); else if ( key == TQString::tqfromLatin1( "pictureurl" ) ) { diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index d917292f7..9dedae791 100644 --- a/kaddressbook/xxport/vcard_xxport.cpp +++ b/kaddressbook/xxport/vcard_xxport.cpp @@ -239,7 +239,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const // With version 3.0, vCards are encoded with UTF-8 by default. Otherwise, use tqfromLatin1() // and hope that are fields are encoded correctly. - if ( TQString::tqfromLatin1( rawData ).lower().tqcontains( "version:3.0" ) ) { + if ( TQString::tqfromLatin1( rawData ).lower().contains( "version:3.0" ) ) { vCardText = TQString::fromUtf8( rawData ); } else { vCardText = TQString::tqfromLatin1( rawData ); diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp index f65348cfe..c90de6ca3 100644 --- a/kaddressbook/xxportselectdialog.cpp +++ b/kaddressbook/xxportselectdialog.cpp @@ -119,7 +119,7 @@ KABC::AddresseeList XXPortSelectDialog::contacts() const TQStringList tmp( (*it).categories() ); TQStringList::ConstIterator tmpIt; for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) - if ( categorieList.tqcontains( *tmpIt ) ) { + if ( categorieList.contains( *tmpIt ) ) { list.append( *it ); break; } diff --git a/kalarm/COPYING b/kalarm/COPYING index b55fa1466..54754ab4b 100644 --- a/kalarm/COPYING +++ b/kalarm/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp index 8cbc7ceb7..7bdd767a6 100644 --- a/kalarm/alarmcalendar.cpp +++ b/kalarm/alarmcalendar.cpp @@ -164,7 +164,7 @@ AlarmCalendar* AlarmCalendar::createCalendar(CalID type, KConfig* config, TQStri { TQString readPath = config->readPathEntry(configKey, locateLocal("appdata", calendarNames[type])); writePath = readPath; - writePath.tqreplace(vcsRegExp, ical); + writePath.replace(vcsRegExp, ical); return new AlarmCalendar(readPath, type, writePath, configKey); } } diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp index 54f60a3c4..c5e487caa 100644 --- a/kalarm/alarmevent.cpp +++ b/kalarm/alarmevent.cpp @@ -890,22 +890,22 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) TQString result = id; tqStatus oldtqStatus; int i, len; - if ((i = result.tqfind(EXPIRED_UID)) > 0) + if ((i = result.find(EXPIRED_UID)) > 0) { oldtqStatus = EXPIRED; len = EXPIRED_UID.length(); } - else if ((i = result.tqfind(DISPLAYING_UID)) > 0) + else if ((i = result.find(DISPLAYING_UID)) > 0) { oldtqStatus = DISPLAYING; len = DISPLAYING_UID.length(); } - else if ((i = result.tqfind(TEMPLATE_UID)) > 0) + else if ((i = result.find(TEMPLATE_UID)) > 0) { oldtqStatus = TEMPLATE; len = TEMPLATE_UID.length(); } - else if ((i = result.tqfind(KORGANIZER_UID)) > 0) + else if ((i = result.find(KORGANIZER_UID)) > 0) { oldtqStatus = KORGANIZER; len = KORGANIZER_UID.length(); @@ -913,7 +913,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) else { oldtqStatus = ACTIVE; - i = result.tqfindRev('-'); + i = result.findRev('-'); len = 1; } if (status != oldtqStatus && i > 0) @@ -927,7 +927,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) case TEMPLATE: part = TEMPLATE_UID; break; case KORGANIZER: part = KORGANIZER_UID; break; } - result.tqreplace(i, len, part); + result.replace(i, len, part); } return result; } @@ -937,13 +937,13 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) */ KAEvent::tqStatus KAEvent::uidtqStatus(const TQString& uid) { - if (uid.tqfind(EXPIRED_UID) > 0) + if (uid.find(EXPIRED_UID) > 0) return EXPIRED; - if (uid.tqfind(DISPLAYING_UID) > 0) + if (uid.find(DISPLAYING_UID) > 0) return DISPLAYING; - if (uid.tqfind(TEMPLATE_UID) > 0) + if (uid.find(TEMPLATE_UID) > 0) return TEMPLATE; - if (uid.tqfind(KORGANIZER_UID) > 0) + if (uid.find(KORGANIZER_UID) > 0) return KORGANIZER; return ACTIVE; } @@ -2551,7 +2551,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events) { Event* event = *evit; const TQStringList cats = event->categories(); - if (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end()) + if (cats.find(DATE_ONLY_CATEGORY) != cats.end()) { // It's an untimed event, so fix it TQTime oldTime = event->dtStart().time(); @@ -2732,14 +2732,14 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju else i = 0; // invalid prefix } - if (txt.tqfind(TEXT_PREFIX, i) == i) + if (txt.find(TEXT_PREFIX, i) == i) i += TEXT_PREFIX.length(); - else if (txt.tqfind(FILE_PREFIX, i) == i) + else if (txt.find(FILE_PREFIX, i) == i) { action = T_FILE; i += FILE_PREFIX.length(); } - else if (txt.tqfind(COMMAND_PREFIX, i) == i) + else if (txt.find(COMMAND_PREFIX, i) == i) { action = T_COMMAND; i += COMMAND_PREFIX.length(); @@ -2882,7 +2882,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple LATECANCEL category to LATECANCEL:n where n = minutes late. */ TQStringList::Iterator it; - while ((it = cats.tqfind(LATE_CANCEL_CAT)) != cats.end()) + while ((it = cats.find(LATE_CANCEL_CAT)) != cats.end()) { cats.remove(it); addLateCancel = true; @@ -2915,7 +2915,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple TMPLDEFTIME category to TMPLAFTTIME:n where n = minutes after. */ TQStringList::Iterator it; - while ((it = cats.tqfind(TEMPL_DEF_TIME_CAT)) != cats.end()) + while ((it = cats.find(TEMPL_DEF_TIME_CAT)) != cats.end()) { cats.remove(it); cats.append(TQString("%1%2").tqarg(TEMPL_AFTER_TIME_CATEGORY).tqarg(0)); @@ -2929,7 +2929,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * Convert simple XTERM category to LOG:xterm: */ TQStringList::Iterator it; - while ((it = cats.tqfind(EXEC_IN_XTERM_CAT)) != cats.end()) + while ((it = cats.find(EXEC_IN_XTERM_CAT)) != cats.end()) { cats.remove(it); cats.append(LOG_CATEGORY + xtermURL); @@ -2952,7 +2952,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju * alarm offsets to zero and deferral alarm offsets to be relative to * the next recurrence. */ - bool dateOnly = (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end()); + bool dateOnly = (cats.find(DATE_ONLY_CATEGORY) != cats.end()); DateTime startDateTime(event->dtStart(), dateOnly); // Convert the main alarm and get the next main trigger time from it DateTime nextMainDateTime; diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp index 3bbe042fd..546752ea2 100644 --- a/kalarm/alarmlistview.cpp +++ b/kalarm/alarmlistview.cpp @@ -507,8 +507,8 @@ TQString AlarmListViewItem::alarmTimeText(const DateTime& dateTime) const if (!TQApplication::reverseLayout()) // don't try to align right-to-left languages { TQString fmt = locale->timeFormat(); - int i = fmt.tqfind(TQRegExp("%[kl]")); // check if leading zeroes are omitted - if (i >= 0 && i == fmt.tqfind('%')) // and whether the hour is first + int i = fmt.find(TQRegExp("%[kl]")); // check if leading zeroes are omitted + if (i >= 0 && i == fmt.find('%')) // and whether the hour is first mTimeHourPos = i; // yes, so need to align } } @@ -593,7 +593,7 @@ void AlarmListViewItem::paintCell(TQPainter* painter, const TQColorGroup& cg, in if (mTimeHourPos >= 0) { // Need to pad out spacing to align times without leading zeroes - i = str.tqfind(" ~"); + i = str.find(" ~"); if (i >= 0) { if (mDigitWidth < 0) diff --git a/kalarm/alarmtext.cpp b/kalarm/alarmtext.cpp index 6cf07c34f..8bd1d6847 100644 --- a/kalarm/alarmtext.cpp +++ b/kalarm/alarmtext.cpp @@ -184,8 +184,8 @@ TQString AlarmText::fromCalendarText(const TQString& text, bool& email) dispText += mCcPrefix + lines[2].mid(mCcPrefixEn.length()) + '\n'; dispText += mDatePrefix + lines[n].mid(mDatePrefixEn.length()) + '\n'; dispText += mSubjectPrefix + lines[n+1].mid(mSubjectPrefixEn.length()); - int i = text.tqfind(mSubjectPrefixEn); - i = text.tqfind('\n', i); + int i = text.find(mSubjectPrefixEn); + i = text.find('\n', i); if (i > 0) dispText += text.mid(i); email = true; @@ -224,8 +224,8 @@ TQString AlarmText::toCalendarText(const TQString& text) calText += mCcPrefixEn + lines[2].mid(mCcPrefix.length()) + '\n'; calText += mDatePrefixEn + lines[n].mid(mDatePrefix.length()) + '\n'; calText += mSubjectPrefixEn + lines[n+1].mid(mSubjectPrefix.length()); - int i = text.tqfind(mSubjectPrefix); - i = text.tqfind('\n', i); + int i = text.find(mSubjectPrefix); + i = text.find('\n', i); if (i > 0) calText += text.mid(i); return calText; @@ -271,12 +271,12 @@ TQString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated) } if (truncated) *truncated = false; - if (text.tqcontains('\n') < maxLines) + if (text.contains('\n') < maxLines) return text; int newline = -1; for (int i = 0; i < maxLines; ++i) { - newline = text.tqfind('\n', newline + 1); + newline = text.find('\n', newline + 1); if (newline < 0) return text; // not truncated after all !?! } diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp index 16e8a4ac1..71ab86922 100644 --- a/kalarm/birthdaydlg.cpp +++ b/kalarm/birthdaydlg.cpp @@ -256,7 +256,7 @@ void BirthdayDlg::updateSelectionList() name = addressee.realName(); // Check if the birthday already has an alarm TQString text = mPrefixText + name + mSuffixText; - bool alarmExists = (messageList.tqfind(text) != messageList.end()); + bool alarmExists = (messageList.find(text) != messageList.end()); // Check if the birthday is already in the selection list bool inSelectionList = false; AddresseeItem* item = 0; diff --git a/kalarm/calendarcompat.cpp b/kalarm/calendarcompat.cpp index 134436a25..0d049fed0 100644 --- a/kalarm/calendarcompat.cpp +++ b/kalarm/calendarcompat.cpp @@ -81,21 +81,21 @@ int CalendarCompat::readKAlarmVersion(KCal::Calendar& calendar, TQString& subVer // Find the KAlarm identifier TQString progname = TQString::tqfromLatin1(" KAlarm "); - int i = prodid.tqfind(progname, 0, false); + int i = prodid.find(progname, 0, false); if (i < 0) { // Older versions used KAlarm's translated name in the product ID, which // could have created problems using a calendar in different locales. progname = TQString(" ") + kapp->aboutData()->programName() + ' '; - i = prodid.tqfind(progname, 0, false); + i = prodid.find(progname, 0, false); if (i < 0) return 0; // calendar wasn't created by KAlarm } // Extract the KAlarm version string TQString ver = prodid.mid(i + progname.length()).stripWhiteSpace(); - i = ver.tqfind('/'); - int j = ver.tqfind(' '); + i = ver.find('/'); + int j = ver.find(' '); if (j >= 0 && j < i) i = j; if (i <= 0) diff --git a/kalarm/dcophandler.cpp b/kalarm/dcophandler.cpp index 7f49ca573..f1a08df8a 100644 --- a/kalarm/dcophandler.cpp +++ b/kalarm/dcophandler.cpp @@ -417,7 +417,7 @@ bool DcopHandler::convertRecurrence(DateTime& start, KARecurrence& recurrence, c if (!start.isValid()) return false; TQDateTime end; - if (endDateTime.tqfind('T') < 0) + if (endDateTime.find('T') < 0) { if (!start.isDateOnly()) { diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp index 082627260..93b6bc5af 100644 --- a/kalarm/editdlg.cpp +++ b/kalarm/editdlg.cpp @@ -894,7 +894,7 @@ void EditAlarmDlg::setReadOnly() mCmdCommandEdit->setReadOnly(mReadOnly); mCmdScriptEdit->setReadOnly(mReadOnly); for (int id = DISCARD_OUTPUT; id < EXEC_IN_TERMINAL; ++id) - ((RadioButton*)mCmdOutputGroup->tqfind(id))->setReadOnly(mReadOnly); + ((RadioButton*)mCmdOutputGroup->find(id))->setReadOnly(mReadOnly); // Email alarm controls mEmailToEdit->setReadOnly(mReadOnly); @@ -1948,7 +1948,7 @@ bool EditAlarmDlg::checkText(TQString& result, bool showErrorMessage) const enum Err { NONE = 0, BLANK, NONEXISTENT, DIRECTORY, UNREADABLE, NOT_TEXT_IMAGE }; Err err = NONE; KURL url; - int i = alarmtext.tqfind(TQString::tqfromLatin1("/")); + int i = alarmtext.find(TQString::tqfromLatin1("/")); if (i > 0 && alarmtext[i - 1] == ':') { url = alarmtext; diff --git a/kalarm/eventlistviewbase.cpp b/kalarm/eventlistviewbase.cpp index ce0257301..c463c8ad0 100644 --- a/kalarm/eventlistviewbase.cpp +++ b/kalarm/eventlistviewbase.cpp @@ -458,8 +458,8 @@ TQString EventListWhatsThisBase::text(const TQPoint& pt) int column = -1; TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt); TQRect frame = mListView->header()->frameGeometry(); - if (frame.tqcontains(pt) - || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.tqcontains(TQPoint(pt.x(), frame.y()))) + if (frame.contains(pt) + || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y()))) column = mListView->header()->sectionAt(pt.x()); return mListView->whatsThisText(column); } diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp index 26b16d226..2c44e161f 100644 --- a/kalarm/functions.cpp +++ b/kalarm/functions.cpp @@ -793,7 +793,7 @@ int getVersionNumber(const TQString& version, TQString* subVersion) // if the representation returned by this method changes. if (subVersion) *subVersion = TQString(); - int count = version.tqcontains('.') + 1; + int count = version.contains('.') + 1; if (count < 2) return 0; bool ok; @@ -836,7 +836,7 @@ FileType fileType(const TQString& mimetype) if (mimetype.startsWith(TQString::tqfromLatin1("image/"))) return Image; - int slash = mimetype.tqfind('/'); + int slash = mimetype.find('/'); if (slash < 0) return Unknown; TQString type = mimetype.mid(slash + 1); diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp index d37e0dcda..775821c5e 100644 --- a/kalarm/kalarmapp.cpp +++ b/kalarm/kalarmapp.cpp @@ -475,7 +475,7 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("color"); if (static_cast(colourText)[0] == '0' && tolower(static_cast(colourText)[1]) == 'x') - colourText.tqreplace(0, 2, "#"); + colourText.replace(0, 2, "#"); bgColour.setNamedColor(colourText); if (!bgColour.isValid()) USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--color"))) @@ -486,7 +486,7 @@ int KAlarmApp::newInstance() TQCString colourText = args->getOption("colorfg"); if (static_cast(colourText)[0] == '0' && tolower(static_cast(colourText)[1]) == 'x') - colourText.tqreplace(0, 2, "#"); + colourText.replace(0, 2, "#"); fgColour.setNamedColor(colourText); if (!fgColour.isValid()) USAGE(i18n("Invalid %1 parameter").tqarg(TQString::tqfromLatin1("--colorfg"))) @@ -1704,43 +1704,43 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent& { // Execute the command in a terminal window. cmd = Preferences::cmdXTermCommand(); - cmd.tqreplace("%t", aboutData()->programName()); // set the terminal window title - if (cmd.tqfind("%C") >= 0) + cmd.replace("%t", aboutData()->programName()); // set the terminal window title + if (cmd.find("%C") >= 0) { // Execute the command from a temporary script file if (flags & ProcData::TEMP_FILE) - cmd.tqreplace("%C", command); // the command is already calling a temporary file + cmd.replace("%C", command); // the command is already calling a temporary file else { tmpXtermFile = createTempScriptFile(command, true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.tqreplace("%C", tmpXtermFile); // %C indicates where to insert the command + cmd.replace("%C", tmpXtermFile); // %C indicates where to insert the command } } - else if (cmd.tqfind("%W") >= 0) + else if (cmd.find("%W") >= 0) { // Execute the command from a temporary script file, // with a sleep after the command is executed tmpXtermFile = createTempScriptFile(command + TQString::tqfromLatin1("\nsleep 86400\n"), true, event, *alarm); if (tmpXtermFile.isEmpty()) return 0; - cmd.tqreplace("%W", tmpXtermFile); // %w indicates where to insert the command + cmd.replace("%W", tmpXtermFile); // %w indicates where to insert the command } - else if (cmd.tqfind("%w") >= 0) + else if (cmd.find("%w") >= 0) { // Append a sleep to the command. // Quote the command in case it contains characters such as [>|;]. TQString exec = KShellProcess::quote(command + TQString::tqfromLatin1("; sleep 86400")); - cmd.tqreplace("%w", exec); // %w indicates where to insert the command string + cmd.replace("%w", exec); // %w indicates where to insert the command string } else { // Set the command to execute. // Put it in quotes in case it contains characters such as [>|;]. TQString exec = KShellProcess::quote(command); - if (cmd.tqfind("%c") >= 0) - cmd.tqreplace("%c", exec); // %c indicates where to insert the command string + if (cmd.find("%c") >= 0) + cmd.replace("%c", exec); // %c indicates where to insert the command string else cmd.append(exec); // otherwise, simply append the command string } @@ -2118,7 +2118,7 @@ static bool convInterval(const TQCString& timeParam, KARecurrence::Type& recurTy break; case 'M': { - int i = timeString.tqfind('H'); + int i = timeString.find('H'); if (i < 0) { if (!allowMonthYear) diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp index e1f0823ae..409ab88f0 100644 --- a/kalarm/kalarmd/adcalendar.cpp +++ b/kalarm/kalarmd/adcalendar.cpp @@ -51,7 +51,7 @@ ADCalendar::ADCalendar(const TQString& url, const TQCString& appname) kdError(5900) << "ADCalendar::ADCalendar(" << url << "): calendar already exists" << endl; assert(0); } - mUrlIndex = mCalendarUrls.tqfindIndex(url); // get unique index for this URL + mUrlIndex = mCalendarUrls.findIndex(url); // get unique index for this URL if (mUrlIndex < 0) { mUrlIndex = static_cast(mCalendarUrls.count()); @@ -142,7 +142,7 @@ bool ADCalendar::setLoadedConnected() */ bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList& alarmtimes) { - EventsMap::ConstIterator it = mEventsHandled.tqfind(EventKey(event->uid(), mUrlIndex)); + EventsMap::ConstIterator it = mEventsHandled.find(EventKey(event->uid(), mUrlIndex)); if (it == mEventsHandled.end()) return false; @@ -170,7 +170,7 @@ void ADCalendar::setEventHandled(const TQString& eventID) EventKey key(eventID, mUrlIndex); // Remove it from the pending list, and add it to the handled list - EventsMap::Iterator it = mEventsPending.tqfind(key); + EventsMap::Iterator it = mEventsPending.find(key); if (it != mEventsPending.end()) { setEventInMap(mEventsHandled, key, it.data().alarmTimes, it.data().eventSequence); @@ -197,7 +197,7 @@ void ADCalendar::setEventPending(const KCal::Event* event, const TQValueList& alarmtimes, int sequence) { - EventsMap::Iterator it = map.tqfind(key); + EventsMap::Iterator it = map.find(key); if (it != map.end()) { // Update the existing entry for the event diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp index c14a1bf5b..a8460167f 100644 --- a/kalarm/kalarmd/alarmdaemon.cpp +++ b/kalarm/kalarmd/alarmdaemon.cpp @@ -374,7 +374,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) for (TQValueList::ConstIterator it = alarms.begin(); it != alarms.end(); ++it) { KCal::Event* event = dynamic_cast((*it)->tqparent()); - if (!event || eventsDone.tqfind(event) != eventsDone.end()) + if (!event || eventsDone.find(event) != eventsDone.end()) continue; // either not an event, or the event has already been processed eventsDone += event; const TQString& eventID = event->uid(); @@ -385,7 +385,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal) // The times for non-due alarms are set invalid in 'alarmtimes'. bool recurs = event->doesRecur(); const TQStringList cats = event->categories(); - bool floats = (cats.tqfind(TQString::tqfromLatin1("DATE")) != cats.end()); + bool floats = (cats.find(TQString::tqfromLatin1("DATE")) != cats.end()); TQDateTime nextDateTime = event->dtStart(); if (recurs) { @@ -487,7 +487,7 @@ bool AlarmDaemon::notifyEvent(ADCalendar* calendar, const TQString& eventID) { // It's running, but check if it has created our DCOP interface yet QCStringList objects = kapp->dcopClient()->remoteObjects(appname); - if (objects.tqfind(client->dcopObject()) == objects.end()) + if (objects.find(client->dcopObject()) == objects.end()) ready = false; } if (!ready) diff --git a/kalarm/kalarmd/clientinfo.cpp b/kalarm/kalarmd/clientinfo.cpp index 5475cce57..e8c5ea6c7 100644 --- a/kalarm/kalarmd/clientinfo.cpp +++ b/kalarm/kalarmd/clientinfo.cpp @@ -72,7 +72,7 @@ ClientInfo* ClientInfo::get(const TQCString& appName) { if (appName.isEmpty()) return 0; - TQMap::ConstIterator it = mClients.tqfind(appName); + TQMap::ConstIterator it = mClients.find(appName); if (it == mClients.end()) return 0; return it.data(); @@ -104,7 +104,7 @@ void ClientInfo::clear() */ void ClientInfo::remove(const TQCString& appName) { - TQMap::Iterator it = mClients.tqfind(appName); + TQMap::Iterator it = mClients.find(appName); if (it != mClients.end()) delete it.data(); } diff --git a/kalarm/kalarmui.rc b/kalarm/kalarmui.rc index 97d05056a..686271707 100644 --- a/kalarm/kalarmui.rc +++ b/kalarm/kalarmui.rc @@ -11,7 +11,7 @@ - +

diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp index 558406626..261e3865d 100644 --- a/kalarm/kamail.cpp +++ b/kalarm/kamail.cpp @@ -249,7 +249,7 @@ TQString KAMail::sendKMail(const KAMailData& data) if (func.left(5) == "bool ") { func = func.mid(5); - func.tqreplace(TQRegExp(" [0-9A-Za-z_:]+"), ""); + func.replace(TQRegExp(" [0-9A-Za-z_:]+"), ""); useSend = (func == sendFunction); } } @@ -341,13 +341,13 @@ bool KAMail::callKMail(const TQByteArray& callData, const TQCString& iface, cons || replyType != funcType) { TQCString funcname = function; - funcname.tqreplace(TQRegExp("(.+$"), "()"); + funcname.replace(TQRegExp("(.+$"), "()"); kdError(5950) << "KAMail::callKMail(): kmail " << funcname << " call failed\n";; return false; } TQDataStream replyStream(replyData, IO_ReadOnly); TQCString funcname = function; - funcname.tqreplace(TQRegExp("(.+$"), "()"); + funcname.replace(TQRegExp("(.+$"), "()"); if (replyType == "int") { int result; @@ -385,7 +385,7 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId) char buff[64]; strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow)); TQString from = data.from; - from.tqreplace(TQRegExp("^.*<"), TQString()).tqreplace(TQRegExp(">.*$"), TQString()); + from.replace(TQRegExp("^.*<"), TQString()).replace(TQRegExp(">.*$"), TQString()); message = TQString::tqfromLatin1(buff); message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from); } @@ -691,7 +691,7 @@ int KAMail::checkAddress(TQString& address) { address = address.stripWhiteSpace(); // Check that there are no list separator characters present - if (address.tqfind(',') >= 0 || address.tqfind(';') >= 0) + if (address.find(',') >= 0 || address.find(';') >= 0) return -1; int n = address.length(); if (!n) @@ -701,16 +701,16 @@ int KAMail::checkAddress(TQString& address) if (address[end] == '>') { // The email address is in <...> - if ((start = address.tqfind('<')) < 0) + if ((start = address.find('<')) < 0) return -1; ++start; --end; } - int i = address.tqfind('@', start); + int i = address.find('@', start); if (i >= 0) { if (i == start || i == end) // check @ isn't the first or last character -// || address.tqfind('@', i + 1) >= 0) // check for multiple @ characters +// || address.find('@', i + 1) >= 0) // check for multiple @ characters return -1; } /* else @@ -744,10 +744,10 @@ TQString KAMail::convertAttachments(const TQString& items, TQStringList& list) for (int next = 0; next < length; ) { // Find the first delimiter character (, or ;) - int i = items.tqfind(',', next); + int i = items.find(',', next); if (i < 0) i = items.length(); - int sc = items.tqfind(';', next); + int sc = items.find(';', next); if (sc < 0) sc = items.length(); if (sc < i) @@ -780,10 +780,10 @@ TQString KAMail::convertAttachments(const TQString& items, KURL::List& list) for (int next = 0; next < length; ) { // Find the first delimiter character (, or ;) - int i = items.tqfind(',', next); + int i = items.find(',', next); if (i < 0) i = items.length(); - int sc = items.tqfind(';', next); + int sc = items.find(';', next); if (sc < 0) sc = items.length(); if (sc < i) diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp index 4221a5ada..a14d5675e 100644 --- a/kalarm/karecurrence.cpp +++ b/kalarm/karecurrence.cpp @@ -606,7 +606,7 @@ bool KARecurrence::recursOn(const TQDate& dt) const return true; // We know now that it isn't in EXDATES or EXRULES, // so we just need to check if it's in RDATES or RRULES - if (rDates().tqcontains(dt)) + if (rDates().contains(dt)) return true; RecurrenceRule::List rulelist = rRules(); for (RecurrenceRule::List::ConstIterator rr = rulelist.begin(); rr != rulelist.end(); ++rr) diff --git a/kalarm/lib/colourcombo.cpp b/kalarm/lib/colourcombo.cpp index 5cea7fb83..cd078a34f 100644 --- a/kalarm/lib/colourcombo.cpp +++ b/kalarm/lib/colourcombo.cpp @@ -57,7 +57,7 @@ void ColourCombo::setColours(const ColourList& colours) { mColourList = colours; if (mSelectedColour != mCustomColour - && !mColourList.tqcontains(mSelectedColour)) + && !mColourList.contains(mSelectedColour)) { // The current colour has been deleted mSelectedColour = mColourList.count() ? mColourList.first() : mCustomColour; diff --git a/kalarm/lib/colourlist.h b/kalarm/lib/colourlist.h index 91fabaf92..485bba6d7 100644 --- a/kalarm/lib/colourlist.h +++ b/kalarm/lib/colourlist.h @@ -83,19 +83,19 @@ class ColourList /** Returns an iterator pointing to the colour at position @p i in the list. */ const_iterator at(size_type i) const { return mList.at(i); } /** Returns true if the list contains the colour @p c. */ - size_type tqcontains(const TQColor& c) const { return mList.tqcontains(c.rgb()); } + size_type contains(const TQColor& c) const { return mList.contains(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list. * Returns end() if colour @p c is not in the list. */ - const_iterator tqfind(const TQColor& c) const { return mList.tqfind(c.rgb()); } + const_iterator find(const TQColor& c) const { return mList.find(c.rgb()); } /** Returns an iterator pointing to the first occurrence of colour @p c in the list, starting. * from position @p it. Returns end() if colour @p c is not in the list. */ - const_iterator tqfind(const_iterator it, const TQColor& c) const { return mList.tqfind(it, c.rgb()); } + const_iterator find(const_iterator it, const TQColor& c) const { return mList.find(it, c.rgb()); } /** Returns the index to the first occurrence of colour @p c in the list. * Returns -1 if colour @p c is not in the list. */ - int findIndex(const TQColor& c) const { return mList.tqfindIndex(c.rgb()); } + int findIndex(const TQColor& c) const { return mList.findIndex(c.rgb()); } /** Returns the first colour in the list. If the list is empty, the result is undefined. */ TQColor first() const { return TQColor(mList.first()); } /** Returns the last colour in the list. If the list is empty, the result is undefined. */ diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp index f19ed8066..28d94fb26 100644 --- a/kalarm/lib/lineedit.cpp +++ b/kalarm/lib/lineedit.cpp @@ -181,7 +181,7 @@ void LineEdit::dropEvent(TQDropEvent* e) } else { - int newline = txt.tqfind('\n'); + int newline = txt.find('\n'); newText = (newline >= 0) ? txt.left(newline) : txt; } } diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp index dced4ce6a..2f7480dfd 100644 --- a/kalarm/lib/messagebox.cpp +++ b/kalarm/lib/messagebox.cpp @@ -45,7 +45,7 @@ KMessageBox::ButtonCode MessageBox::getContinueDefault(const TQString& dontAskAg ButtonCode defaultButton = Continue; if (!dontAskAgainName.isEmpty()) { - TQMap::ConstIterator it = mContinueDefaults.tqfind(dontAskAgainName); + TQMap::ConstIterator it = mContinueDefaults.find(dontAskAgainName); if (it != mContinueDefaults.end()) defaultButton = it.data(); } diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp index c2f2e11bd..09daf91db 100644 --- a/kalarm/lib/shellprocess.cpp +++ b/kalarm/lib/shellprocess.cpp @@ -185,7 +185,7 @@ const TQCString& ShellProcess::shellPath() } // Get the shell filename with the path stripped off - int i = mShellPath.tqfindRev('/'); + int i = mShellPath.findRev('/'); if (i >= 0) mShellName = mShellPath.mid(i + 1); else diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp index fc8e6b7c3..10f3f5917 100644 --- a/kalarm/lib/spinbox.cpp +++ b/kalarm/lib/spinbox.cpp @@ -468,9 +468,9 @@ int SpinBox::shiftStepAdjustment(int oldValue, int shiftStep) */ int SpinBox::whichButton(const TQPoint& pos) { - if (upRect().tqcontains(pos)) + if (upRect().contains(pos)) return UP; - if (downRect().tqcontains(pos)) + if (downRect().contains(pos)) return DOWN; return NO_BUTTON; } diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp index 7be3c17c2..caed93d7b 100644 --- a/kalarm/lib/synchtimer.cpp +++ b/kalarm/lib/synchtimer.cpp @@ -46,7 +46,7 @@ SynchTimer::~SynchTimer() void SynchTimer::connecT(TQObject* receiver, const char* member) { Connection connection(receiver, member); - if (mConnections.tqfind(connection) != mConnections.end()) + if (mConnections.find(connection) != mConnections.end()) return; // the slot is already connected, so ignore request connect(mTimer, TQT_SIGNAL(timeout()), receiver, member); mConnections.append(connection); diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp index 1a2a65008..ccf0c4492 100644 --- a/kalarm/lib/timespinbox.cpp +++ b/kalarm/lib/timespinbox.cpp @@ -124,7 +124,7 @@ TQString TimeSpinBox::mapValueToText(int v) int TimeSpinBox::mapTextToValue(bool* ok) { TQString text = cleanText(); - int colon = text.tqfind(':'); + int colon = text.find(':'); if (colon >= 0) { // [h]:m format for any time value @@ -309,7 +309,7 @@ TQValidator::State TimeSpinBox::TimeValidator::validate(TQString& text, int& /*c bool ok; int hr = 0; int mn = 0; - int colon = cleanText.tqfind(':'); + int colon = cleanText.find(':'); if (colon >= 0) { TQString minute = cleanText.mid(colon + 1); diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp index 34b13e5ff..aa334c670 100644 --- a/kalarm/mainwindow.cpp +++ b/kalarm/mainwindow.cpp @@ -1397,7 +1397,7 @@ void MainWindow::setEnableText(bool enable) */ MainWindow* MainWindow::toggleWindow(MainWindow* win) { - if (win && mWindowList.tqfind(win) != mWindowList.end()) + if (win && mWindowList.find(win) != mWindowList.end()) { // A window is specified (and it exists) if (win->isVisible()) diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp index ca7dd8241..6f0878c00 100644 --- a/kalarm/messagewin.cpp +++ b/kalarm/messagewin.cpp @@ -1622,7 +1622,7 @@ void MessageWin::displayMainWindow() */ bool MessageWin::haveErrorMessage(unsigned msg) const { - if (!mErrorMessages.tqcontains(mEventID)) + if (!mErrorMessages.contains(mEventID)) mErrorMessages.insert(mEventID, 0); bool result = (mErrorMessages[mEventID] & msg); mErrorMessages[mEventID] |= msg; @@ -1631,7 +1631,7 @@ bool MessageWin::haveErrorMessage(unsigned msg) const void MessageWin::clearErrorMessage(unsigned msg) const { - if (mErrorMessages.tqcontains(mEventID)) + if (mErrorMessages.contains(mEventID)) { if (mErrorMessages[mEventID] == msg) mErrorMessages.remove(mEventID); diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp index 24a444b98..860d68193 100644 --- a/kalarm/prefdlg.cpp +++ b/kalarm/prefdlg.cpp @@ -399,11 +399,11 @@ MiscPrefTab::MiscPrefTab(TQVBox* frame) mXtermType->insert(radio, mXtermCount); if (mXtermFirst < 0) mXtermFirst = mXtermCount; // note the id of the first button - cmd.tqreplace("%t", kapp->aboutData()->programName()); - cmd.tqreplace("%c", ""); - cmd.tqreplace("%w", ""); - cmd.tqreplace("%C", "[command]"); - cmd.tqreplace("%W", "[command; sleep]"); + cmd.replace("%t", kapp->aboutData()->programName()); + cmd.replace("%c", ""); + cmd.replace("%w", ""); + cmd.replace("%C", "[command]"); + cmd.replace("%W", "[command; sleep]"); TQWhatsThis::add(radio, whatsThis.tqarg(cmd)); grid->addWidget(radio, (row = index/3 + 1), index % 3, TQt::AlignAuto); ++index; @@ -444,7 +444,7 @@ void MiscPrefTab::restore() { for ( ; id < mXtermCount; ++id) { - if (mXtermType->tqfind(id) && xtermCmd == xtermCommands[id]) + if (mXtermType->find(id) && xtermCmd == xtermCommands[id]) break; } } diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp index be1e5e6a9..95b1b5a69 100644 --- a/kalarm/preferences.cpp +++ b/kalarm/preferences.cpp @@ -607,8 +607,8 @@ void Preferences::convertOldPrefs() static const TQString EMAIL_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailUseControlCenter"); static const TQString EMAIL_BCC_USE_CTRL_CENTRE = TQString::tqfromLatin1("EmailBccUseControlCenter"); TQMap entries = config->entryMap(GENERAL_SECTION); - if (entries.tqfind(EMAIL_FROM) == entries.end() - && entries.tqfind(EMAIL_USE_CTRL_CENTRE) != entries.end()) + if (entries.find(EMAIL_FROM) == entries.end() + && entries.find(EMAIL_USE_CTRL_CENTRE) != entries.end()) { // Preferences were written by KAlarm pre-1.2.1 config->setGroup(GENERAL_SECTION); diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp index 81d101c3f..4d951c17f 100644 --- a/kalarm/undo.cpp +++ b/kalarm/undo.cpp @@ -68,7 +68,7 @@ class UndoItem UndoItem(Undo::Type); static TQString addDeleteActionText(KAEvent::tqStatus, bool add); TQString description(const KAEvent&) const; - void replaceWith(UndoItem* item) { Undo::tqreplace(this, item); } + void replaceWith(UndoItem* item) { Undo::replace(this, item); } int mId; // unique identifier (only for mType = UNDO, REDO) Undo::Type mType; // which list (if any) the object is in @@ -398,13 +398,13 @@ void Undo::remove(UndoItem* item, bool undo) /****************************************************************************** * Replace an undo item in one of the lists. */ -void Undo::tqreplace(UndoItem* old, UndoItem* New) +void Undo::replace(UndoItem* old, UndoItem* New) { Type type = old->type(); List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0; if (!list) return; - Iterator it = list->tqfind(old); + Iterator it = list->find(old); if (it != list->end()) { New->setType(type); // ensure the item points to the correct list @@ -468,7 +468,7 @@ TQValueList Undo::ids(Undo::Type type) for (Undo::List::ConstIterator u = undos.begin(); u != undos.end(); ++u) { TQString evid = (*u)->eventID(); - if (ignoreIDs.tqfind(evid) != ignoreIDs.end()) + if (ignoreIDs.find(evid) != ignoreIDs.end()) omit = true; else if (omit) ignoreIDs.append(evid); @@ -483,7 +483,7 @@ TQValueList Undo::ids(Undo::Type type) } else { - omit = (ignoreIDs.tqfind(item->eventID()) != ignoreIDs.end()); + omit = (ignoreIDs.find(item->eventID()) != ignoreIDs.end()); if (!omit) ignoreIDs.append(item->eventID()); if (item->operation() == UndoItem::EDIT) diff --git a/kalarm/undo.h b/kalarm/undo.h index 0f65cb9fa..2bc2ca1e5 100644 --- a/kalarm/undo.h +++ b/kalarm/undo.h @@ -71,7 +71,7 @@ class Undo : public TQObject // Methods for use by UndoItem class static void add(UndoItem*, bool undo); static void remove(UndoItem*, bool undo); - static void tqreplace(UndoItem* old, UndoItem* New); + static void replace(UndoItem* old, UndoItem* New); private: typedef TQValueList::Iterator Iterator; diff --git a/kandy/COPYING b/kandy/COPYING index 0a56ad073..0b84a43fd 100644 --- a/kandy/COPYING +++ b/kandy/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kandy/src/atcommand.cpp b/kandy/src/atcommand.cpp index d010bb0bd..f03bb6794 100644 --- a/kandy/src/atcommand.cpp +++ b/kandy/src/atcommand.cpp @@ -112,7 +112,7 @@ TQString ATCommand::cmdString() TQString ATCommand::cmd() { if (mParameters.count() > 0) { - TQString cmd = cmdString().left(cmdString().tqfind("=") + 1); + TQString cmd = cmdString().left(cmdString().find("=") + 1); // kdDebug() << "--1-cmd: " << cmd << endl; for(uint i=0;ivalue(); @@ -157,7 +157,7 @@ void ATCommand::setResultString(const TQString &resultString) void ATCommand::setResultFields( TQString fieldsString ) { - TQString id = mId.upper().left( mId.tqfind( '=' ) ); + TQString id = mId.upper().left( mId.find( '=' ) ); // Truncate the command name prepended to the output by the modem. @@ -267,7 +267,7 @@ void ATCommand::setParameter(int index,int value) TQString ATCommand::processOutput(const TQString &output) { if (hexOutput()) { - TQString hexString = output.mid(output.tqfind('\n')+1); + TQString hexString = output.mid(output.find('\n')+1); int i=0; TQString aChar = hexString.mid(i,2); TQString result; @@ -295,7 +295,7 @@ void ATCommand::extractParameters() { // kdDebug() << "Arg String: " << cmdString() << endl; - int pos = cmdString().tqfind("="); + int pos = cmdString().find("="); if (pos < 0) return; TQString paraString = cmdString().mid(pos+1); diff --git a/karm/desktoptracker.cpp b/karm/desktoptracker.cpp index 773f6aea9..deab87548 100644 --- a/karm/desktoptracker.cpp +++ b/karm/desktoptracker.cpp @@ -1,4 +1,4 @@ -#include // std::tqfind +#include // std::find #include #include diff --git a/karm/kaccelmenuwatch.cpp b/karm/kaccelmenuwatch.cpp index 18a0f5110..75e4854e7 100644 --- a/karm/kaccelmenuwatch.cpp +++ b/karm/kaccelmenuwatch.cpp @@ -25,7 +25,7 @@ void KAccelMenuWatch::setMenu( TQPopupMenu *menu ) // we use _menuList to ensure that the signal is // connected only once per menu. - if ( !_menuList.tqfindRef( menu ) ) { + if ( !_menuList.findRef( menu ) ) { _menuList.append( menu ); connect( menu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(removeDeadMenu()) ); } @@ -74,7 +74,7 @@ void KAccelMenuWatch::removeDeadMenu() TQPopupMenu *sdr = (TQPopupMenu *) sender(); assert( sdr ); - if ( !_menuList.tqfindRef( sdr ) ) + if ( !_menuList.findRef( sdr ) ) return; // remove all accels diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp index 6211deb84..1231113b6 100644 --- a/karm/karmstorage.cpp +++ b/karm/karmstorage.cpp @@ -189,12 +189,12 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt // Load each task under it's tqparent task. for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { - Task* task = map.tqfind( (*todo)->uid() ); + Task* task = map.find( (*todo)->uid() ); // No relatedTo incident just means this is a top-level task. if ( (*todo)->relatedTo() ) { - Task* newParent = map.tqfind( (*todo)->relatedToUid() ); + Task* newParent = map.find( (*todo)->relatedToUid() ); // Complete the loading but return a message if ( !newParent ) @@ -258,12 +258,12 @@ TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) // 1.1. Load each task under it's tqparent task. for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { - Task* task = map.tqfind( (*todo)->uid() ); + Task* task = map.find( (*todo)->uid() ); // No relatedTo incident just means this is a top-level task. if ( (*todo)->relatedTo() ) { - Task* newParent = map.tqfind( (*todo)->relatedToUid() ); + Task* newParent = map.find( (*todo)->relatedToUid() ); // Complete the loading but return a message if ( !newParent ) @@ -482,12 +482,12 @@ TQString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview, bool KarmStorage::parseLine(TQString line, long *time, TQString *name, int *level, DesktopList* desktopList) { - if (line.tqfind('#') == 0) { + if (line.find('#') == 0) { // A comment line return false; } - int index = line.tqfind('\t'); + int index = line.find('\t'); if (index == -1) { // This doesn't seem like a valid record return false; @@ -496,7 +496,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, TQString levelStr = line.left(index); TQString rest = line.remove(0,index+1); - index = rest.tqfind('\t'); + index = rest.find('\t'); if (index == -1) { // This doesn't seem like a valid record return false; @@ -507,7 +507,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, bool ok; - index = rest.tqfind('\t'); // check for optional desktops string + index = rest.find('\t'); // check for optional desktops string if (index >= 0) { *name = rest.left(index); TQString deskLine = rest.remove(0,index+1); @@ -516,7 +516,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, // an DesktopList TQString ds; int d; - int commaIdx = deskLine.tqfind(','); + int commaIdx = deskLine.find(','); while (commaIdx >= 0) { ds = deskLine.left(commaIdx); d = ds.toInt(&ok); @@ -525,7 +525,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, desktopList->push_back(d); deskLine.remove(0,commaIdx+1); - commaIdx = deskLine.tqfind(','); + commaIdx = deskLine.find(','); } d = deskLine.toInt(&ok); @@ -627,9 +627,9 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, /* // CSV compliance - // Surround the field with quotes if the field tqcontains + // Surround the field with quotes if the field contains // a comma (delim) or a double quote - if (task->name().tqcontains(delim) || task->name().tqcontains(dquote)) + if (task->name().contains(delim) || task->name().contains(dquote)) to_quote = true; else to_quote = false; @@ -640,7 +640,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, retval += dquote; // Double quotes replaced by a pair of consecutive double quotes - retval += task->name().tqreplace( dquote, double_dquote ); + retval += task->name().replace( dquote, double_dquote ); if (to_quote) retval += dquote; @@ -661,7 +661,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, } // save, either locally or remote - if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/"))) + if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/"))) { TQString filename=rc.url.path(); if (filename.isEmpty()) filename=rc.url.url(); @@ -812,14 +812,14 @@ long KarmStorage::printTaskHistory ( .tqarg(daykey) .tqarg(task->uid()); - if (taskdaytotals.tqcontains(daytaskkey)) + if (taskdaytotals.contains(daytaskkey)) { cell.push_back(TQString::tqfromLatin1("%1") .tqarg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes))); sum += taskdaytotals[daytaskkey]; // in seconds - if (daytotals.tqcontains(daykey)) - daytotals.tqreplace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]); + if (daytotals.contains(daykey)) + daytotals.replace(daykey, daytotals[daykey]+taskdaytotals[daytaskkey]); else daytotals.insert(daykey, taskdaytotals[daytaskkey]); } @@ -842,16 +842,16 @@ long KarmStorage::printTaskHistory ( /* // CSV compliance - // Surround the field with quotes if the field tqcontains + // Surround the field with quotes if the field contains // a comma (delim) or a double quote - to_quote = task->name().tqcontains(delim) || task->name().tqcontains(dquote); + to_quote = task->name().contains(delim) || task->name().contains(dquote); */ to_quote = true; if ( to_quote) cell.push_back(dquote); // Double quotes replaced by a pair of consecutive double quotes - cell.push_back(task->name().tqreplace( dquote, double_dquote )); + cell.push_back(task->name().replace( dquote, double_dquote )); if ( to_quote) cell.push_back(dquote); @@ -941,8 +941,8 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, .tqarg(daykey) .tqarg((*event).todoUid()); - if (taskdaytotals.tqcontains(daytaskkey)) - taskdaytotals.tqreplace(daytaskkey, + if (taskdaytotals.contains(daytaskkey)) + taskdaytotals.replace(daytaskkey, taskdaytotals[daytaskkey] + (*event).duration()); else taskdaytotals.insert(daytaskkey, (*event).duration()); @@ -995,7 +995,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, { daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); - if (daytotals.tqcontains(daykey)) + if (daytotals.contains(daykey)) { retval += TQString::tqfromLatin1("%1") .tqarg(formatTime(daytotals[daykey]/60, rc.decimalMinutes)); @@ -1015,7 +1015,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, // save, either locally or remote - if ((rc.url.isLocalFile()) || (!rc.url.url().tqcontains("/"))) + if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/"))) { TQString filename=rc.url.path(); if (filename.isEmpty()) filename=rc.url.url(); @@ -1166,7 +1166,7 @@ TQValueList KarmStorage::getHistory(const TQDate& from, { // KArm events have the custom property X-KDE-Karm-duration - if (! processed.tqcontains( (*event)->uid())) + if (! processed.contains( (*event)->uid())) { // If an event spans multiple days, CalendarLocal::rawEventsForDate // will return the same event on both days. To avoid double-counting diff --git a/karm/karmutility.cpp b/karm/karmutility.cpp index d13a3f6ed..8a2de530a 100644 --- a/karm/karmutility.cpp +++ b/karm/karmutility.cpp @@ -12,7 +12,7 @@ TQString formatTime( long minutes, bool decimal ) TQString time; if ( decimal ) { time.sprintf("%.2f", minutes / 60.0); - time.tqreplace( '.', KGlobal::locale()->decimalSymbol() ); + time.replace( '.', KGlobal::locale()->decimalSymbol() ); } else time.sprintf("%s%ld:%02ld", (minutes < 0) ? KGlobal::locale()->negativeSign().utf8().data() : "", diff --git a/karm/taskview.cpp b/karm/taskview.cpp index 6a8f6e051..95dfc8569 100644 --- a/karm/taskview.cpp +++ b/karm/taskview.cpp @@ -154,7 +154,7 @@ void TaskView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) if ( e->pos().y() >= task->itemPos() && // doubleclick was onto current_item() e->pos().y() < task->itemPos()+task->height() ) { - if ( activeTasks.tqfindRef(task) == -1 ) // task is active + if ( activeTasks.findRef(task) == -1 ) // task is active { stopAllTimers(); startCurrentTimer(); @@ -388,7 +388,7 @@ void TaskView::startTimerFor(Task* task, TQDateTime startTime ) kdDebug(5970) << "Entering TaskView::startTimerFor" << endl; if (save()==TQString()) { - if (task != 0 && activeTasks.tqfindRef(task) == -1) + if (task != 0 && activeTasks.findRef(task) == -1) { _idleTimeDetector->startIdleDetection(); if (!task->isComplete()) @@ -462,7 +462,7 @@ void TaskView::resetTimeForAllTasks() void TaskView::stopTimerFor(Task* task) { kdDebug(5970) << "Entering stopTimerFor. task = " << task->name() << endl; - if ( task != 0 && activeTasks.tqfindRef(task) != -1 ) { + if ( task != 0 && activeTasks.findRef(task) != -1 ) { activeTasks.removeRef(task); task->setRunning(false, _storage); if ( activeTasks.count() == 0 ) { diff --git a/karm/timekard.cpp b/karm/timekard.cpp index c50168574..d9b8d4a76 100644 --- a/karm/timekard.cpp +++ b/karm/timekard.cpp @@ -139,7 +139,7 @@ void TimeKard::printTaskHistory(const Task *task, .tqarg(daykey) .tqarg(task->uid()); - if (taskdaytotals.tqcontains(daytaskkey)) + if (taskdaytotals.contains(daytaskkey)) { if ( !totalsOnly ) { @@ -148,8 +148,8 @@ void TimeKard::printTaskHistory(const Task *task, } sectionsum += taskdaytotals[daytaskkey]; // in seconds - if (daytotals.tqcontains(daykey)) - daytotals.tqreplace(daykey, daytotals[daykey] + taskdaytotals[daytaskkey]); + if (daytotals.contains(daykey)) + daytotals.replace(daykey, daytotals[daykey] + taskdaytotals[daytaskkey]); else daytotals.insert(daykey, taskdaytotals[daytaskkey]); } @@ -226,8 +226,8 @@ TQString TimeKard::sectionHistoryAsText( .tqarg(daykey) .tqarg((*event).todoUid()); - if (taskdaytotals.tqcontains(daytaskkey)) - taskdaytotals.tqreplace(daytaskkey, + if (taskdaytotals.contains(daytaskkey)) + taskdaytotals.replace(daytaskkey, taskdaytotals[daytaskkey] + (*event).duration()); else taskdaytotals.insert(daytaskkey, (*event).duration()); @@ -282,7 +282,7 @@ TQString TimeKard::sectionHistoryAsText( { TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); - if (daytotals.tqcontains(daykey)) + if (daytotals.contains(daykey)) { if ( !totalsOnly ) { diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp index 10ef33730..b863e4e6e 100644 --- a/kdgantt/KDGanttMinimizeSplitter.cpp +++ b/kdgantt/KDGanttMinimizeSplitter.cpp @@ -178,7 +178,7 @@ int KDGanttSplitterHandle::onButton( const TQPoint& p ) rect.setRight( rect.right() + 4); rect.setTop( rect.top()- 4 ); rect.setBottom( rect.bottom() + 4); - if ( rect.tqcontains( p ) ) { + if ( rect.contains( p ) ) { return index; } index++; diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index 6624a4c2a..749e53064 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -3727,7 +3727,7 @@ void KDGanttView::addTaskLinkGroup(KDGanttViewTaskLinkGroup* group) myTaskLinkGroupList.append(group); return; } - if (myTaskLinkGroupList.tqfind(group) == -1) + if (myTaskLinkGroupList.find(group) == -1) myTaskLinkGroupList.append(group); } diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp index ba6ad3437..687618139 100644 --- a/kdgantt/KDGanttViewItem.cpp +++ b/kdgantt/KDGanttViewItem.cpp @@ -292,10 +292,10 @@ void KDGanttViewItem::generateAndInsertName( const TQString& name ) sItemDict.remove( _name ); TQString newName; - if ( name.isEmpty() || sItemDict.tqfind( name ) ) { + if ( name.isEmpty() || sItemDict.find( name ) ) { // create unique name newName.sprintf( "%p", (void* )this ); - while( sItemDict.tqfind( newName ) ) { + while( sItemDict.find( newName ) ) { newName += "_0"; } } else { @@ -325,11 +325,11 @@ TQString KDGanttViewItem::name() const with that name exists */ -KDGanttViewItem* KDGanttViewItem::tqfind( const TQString& name ) +KDGanttViewItem* KDGanttViewItem::find( const TQString& name ) { if (name.isEmpty()) // avoid error msg from TQDict return 0; - return sItemDict.tqfind( name ); + return sItemDict.find( name ); } @@ -2294,7 +2294,7 @@ void KDGanttViewItem::resetSubitemVisibility() In calendar mode, only those items can be opened which have subitems which have subitems. An item which has subitems which have no subitems is called a calendar. - I.e., an item that tqcontains + I.e., an item that contains multiple calendars can be opened, while a calendar item itself cannot. But if all calendars of an item do not have any subitem (e.g at startup), the program cannot detect automatically that it should be possible to open diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h index 88713fb3a..e08630b87 100644 --- a/kdgantt/KDGanttViewItem.h +++ b/kdgantt/KDGanttViewItem.h @@ -171,7 +171,7 @@ public: KDGanttViewItem* itemBelow( bool includeDisabled = true ); KDGanttViewItem* getChildByName( const TQString& name ); TQString name() const; - static KDGanttViewItem* tqfind( const TQString& name ); + static KDGanttViewItem* find( const TQString& name ); void createNode( TQDomDocument& doc, TQDomElement& parentElement ); diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp index 51ed43f58..bc6047fdf 100644 --- a/kdgantt/KDGanttViewTaskLink.cpp +++ b/kdgantt/KDGanttViewTaskLink.cpp @@ -870,13 +870,13 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& el TQPtrList toItemList; for( TQStringList::const_iterator fromIt = fromList.begin(); fromIt != fromList.end(); ++fromIt ) { - KDGanttViewItem* item = KDGanttViewItem::tqfind( *fromIt ); + KDGanttViewItem* item = KDGanttViewItem::find( *fromIt ); if( item ) fromItemList.append( item ); } for( TQStringList::const_iterator toIt = toList.begin(); toIt != toList.end(); ++toIt ) { - KDGanttViewItem* item = KDGanttViewItem::tqfind( *toIt ); + KDGanttViewItem* item = KDGanttViewItem::find( *toIt ); if( item ) toItemList.append( item ); } @@ -898,7 +898,7 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& el tl->setHighlightColor( highlightColor ); tl->setTooltipText( tooltipText ); tl->setWhatsThisText( whatsThisText ); - KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::tqfind( group ); + KDGanttViewTaskLinkGroup* gr = KDGanttViewTaskLinkGroup::find( group ); if( gr ) tl->setGroup( gr ); diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp index c6e56c0b8..34b5bb81e 100644 --- a/kdgantt/KDGanttViewTaskLinkGroup.cpp +++ b/kdgantt/KDGanttViewTaskLinkGroup.cpp @@ -70,7 +70,7 @@ KDGanttViewTaskLinkGroup::~KDGanttViewTaskLinkGroup() /*! Constructs an empty task link group and records it under the name \a name so that it can later be found again with - KDGanttViewTaskLinkGroup::tqfind(). + KDGanttViewTaskLinkGroup::find(). \param name the search name of this task link group */ @@ -268,11 +268,11 @@ void KDGanttViewTaskLinkGroup::removeItem (KDGanttViewTaskLink* link) \return the task link group with the specified name; 0 if no group with that name exists */ -KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::tqfind( const TQString& name ) +KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const TQString& name ) { if (name.isEmpty()) // avoid error msg from TQDict return 0; - return sGroupDict.tqfind( name ); + return sGroupDict.find( name ); } @@ -371,10 +371,10 @@ void KDGanttViewTaskLinkGroup::generateAndInsertName( const TQString& name ) sGroupDict.remove( _name ); TQString newName; - if ( name.isEmpty() || sGroupDict.tqfind( name ) ) { + if ( name.isEmpty() || sGroupDict.find( name ) ) { // create unique name newName.sprintf( "%p", (void* )this ); - while( sGroupDict.tqfind( newName ) ) { + while( sGroupDict.find( newName ) ) { newName += "_0"; } } else { diff --git a/kdgantt/KDGanttViewTaskLinkGroup.h b/kdgantt/KDGanttViewTaskLinkGroup.h index e3959089f..b155b8b4d 100644 --- a/kdgantt/KDGanttViewTaskLinkGroup.h +++ b/kdgantt/KDGanttViewTaskLinkGroup.h @@ -62,7 +62,7 @@ public: void setHighlightColor( const TQColor& color ); TQColor highlightColor() const; - static KDGanttViewTaskLinkGroup* tqfind( const TQString& name ); + static KDGanttViewTaskLinkGroup* find( const TQString& name ); void createNode( TQDomDocument& doc, TQDomElement& parentElement ); diff --git a/kfile-plugins/vcf/kfile_vcf.cpp b/kfile-plugins/vcf/kfile_vcf.cpp index 6edc1655e..7297179d0 100644 --- a/kfile-plugins/vcf/kfile_vcf.cpp +++ b/kfile-plugins/vcf/kfile_vcf.cpp @@ -91,7 +91,7 @@ bool KVcfPlugin::readInfo( KFileMetaInfo& info, uint /*what*/ ) TQStringList phoneNumbers; for (unsigned int no=0; no 0 && _subitems.tqcontainsRef(to) >0) { + if(_subitems.containsRef(from) > 0 && _subitems.containsRef(to) >0) { KGanttRelation* rel = new KGanttRelation(from,to,text); _relations.append(rel); diff --git a/kgantt/kgantt/KGanttItem.h b/kgantt/kgantt/KGanttItem.h index b64c73392..a01763a50 100644 --- a/kgantt/kgantt/KGanttItem.h +++ b/kgantt/kgantt/KGanttItem.h @@ -343,7 +343,7 @@ public: /// Get date of starting. /*! - * If mode == ´Rubberband´ and this item tqcontains + * If mode == ´Rubberband´ and this item contains * subitems, start of the item is determined by the start of the * earliest subitem.
*/ diff --git a/kgantt/kgantt/KGanttRelation.h b/kgantt/kgantt/KGanttRelation.h index a75cec9be..42323026e 100644 --- a/kgantt/kgantt/KGanttRelation.h +++ b/kgantt/kgantt/KGanttRelation.h @@ -176,7 +176,7 @@ public: /// Get date of starting. /*! - * If mode == ´Rubberband´ and this item tqcontains + * If mode == ´Rubberband´ and this item contains * subitems, start of the item is determined by the start of the * earliest subitem.
*/ diff --git a/kgantt/kgantt/xQGanttBarViewPort.cpp b/kgantt/kgantt/xQGanttBarViewPort.cpp index d4be37616..6ac4daaee 100644 --- a/kgantt/kgantt/xQGanttBarViewPort.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort.cpp @@ -424,7 +424,7 @@ xQGanttBarViewPort::recalc(KGanttItem* item, int xPos, int yPos, new xTQTaskPosition(nr, xPos, yPos, _screenW, _screenH, _screenHS, _textPosX, _textPosY, depth); - _gItemList.tqreplace(item, tpos ); + _gItemList.replace(item, tpos ); tpos->_screenHandleX = xPos + dd; tpos->_screenHandleW = 2 * dd; diff --git a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp index d7542d1c2..ffd85d305 100644 --- a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp @@ -66,7 +66,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) */ if(e->button() == Qt::MidButton && _mode == Select) { - xTQTaskPosition* tp = _gItemList.tqfind(_currentItem); + xTQTaskPosition* tp = _gItemList.find(_currentItem); TQPainter p(this); TQRect rect = p.boundingRect(tp->_textPosX, @@ -118,7 +118,7 @@ xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) _itemInfo->setText( tmp ); _itemInfo->adjustSize(); - _itemInfo->move(e->x() + 25, _gItemList.tqfind(_currentItem)->_screenY - 50 ); + _itemInfo->move(e->x() + 25, _gItemList.find(_currentItem)->_screenY - 50 ); _itemInfo->show(); } else @@ -366,15 +366,15 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) _itemInfo->setText( stmp ); _itemInfo->adjustSize(); - _itemInfo->move(e->x() + 25, _gItemList.tqfind(_currentItem)->_screenY - 50); + _itemInfo->move(e->x() + 25, _gItemList.find(_currentItem)->_screenY - 50); _itemInfo->show(); if(oldx > 0) { - p.fillRect(oldx, _gItemList.tqfind(_currentItem)->_screenY, - oldw, _gItemList.tqfind(_currentItem)->_screenH, + p.fillRect(oldx, _gItemList.find(_currentItem)->_screenY, + oldw, _gItemList.find(_currentItem)->_screenH, TQBrush(TQColor(50,50,50), Dense4Pattern)); - p.drawRect(oldx, _gItemList.tqfind(_currentItem)->_screenY, - oldw, _gItemList.tqfind(_currentItem)->_screenH); + p.drawRect(oldx, _gItemList.find(_currentItem)->_screenY, + oldw, _gItemList.find(_currentItem)->_screenH); p.setPen(_solidPen); if(_changeStart) @@ -386,11 +386,11 @@ xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) } p.setPen(_dashPen); - p.fillRect(x, _gItemList.tqfind(_currentItem)->_screenY, - w, _gItemList.tqfind(_currentItem)->_screenH, + p.fillRect(x, _gItemList.find(_currentItem)->_screenY, + w, _gItemList.find(_currentItem)->_screenH, TQBrush(TQColor(50,50,50), Dense4Pattern) ); - p.drawRect(x, _gItemList.tqfind(_currentItem)->_screenY, - w, _gItemList.tqfind(_currentItem)->_screenH); + p.drawRect(x, _gItemList.find(_currentItem)->_screenY, + w, _gItemList.find(_currentItem)->_screenH); p.setPen(_solidPen); if(_changeStart) diff --git a/kioslaves/imap4/imap4.cc b/kioslaves/imap4/imap4.cc index b04b5b60a..12cf93e19 100644 --- a/kioslaves/imap4/imap4.cc +++ b/kioslaves/imap4/imap4.cc @@ -228,11 +228,11 @@ IMAP4Protocol::get (const KURL & _url) // the logic is in the app. TQString aUpper = aSection.upper(); - if (aUpper.tqfind ("STRUCTURE") != -1) + if (aUpper.find ("STRUCTURE") != -1) { aSection = "BODYSTRUCTURE"; } - else if (aUpper.tqfind ("ENVELOPE") != -1) + else if (aUpper.find ("ENVELOPE") != -1) { aSection = "UID RFC822.SIZE FLAGS ENVELOPE"; if (hasCapability("IMAP4rev1")) { @@ -246,12 +246,12 @@ IMAP4Protocol::get (const KURL & _url) { aSection = "UID RFC822.HEADER RFC822.SIZE FLAGS"; } - else if (aUpper.tqfind ("BODY.PEEK[") != -1) + else if (aUpper.find ("BODY.PEEK[") != -1) { - if (aUpper.tqfind ("BODY.PEEK[]") != -1) + if (aUpper.find ("BODY.PEEK[]") != -1) { if (!hasCapability("IMAP4rev1")) // imap4 does not know BODY.PEEK[] - aSection.tqreplace("BODY.PEEK[]", "RFC822.PEEK"); + aSection.replace("BODY.PEEK[]", "RFC822.PEEK"); } aSection.prepend("UID RFC822.SIZE FLAGS "); } @@ -309,7 +309,7 @@ IMAP4Protocol::get (const KURL & _url) { // get the MIME header and fill getLastHandled() TQString mySection = aSection; - mySection.tqreplace("]", ".MIME]"); + mySection.replace("]", ".MIME]"); cmd = sendCommand (imapCommand::clientFetch (aSequence, mySection)); do { @@ -342,11 +342,11 @@ IMAP4Protocol::get (const KURL & _url) if (cmd && !cmd->isComplete ()) { - if ((aUpper.tqfind ("BODYSTRUCTURE") != -1) - || (aUpper.tqfind ("FLAGS") != -1) - || (aUpper.tqfind ("UID") != -1) - || (aUpper.tqfind ("ENVELOPE") != -1) - || (aUpper.tqfind ("BODY.PEEK[0]") != -1 + if ((aUpper.find ("BODYSTRUCTURE") != -1) + || (aUpper.find ("FLAGS") != -1) + || (aUpper.find ("UID") != -1) + || (aUpper.find ("ENVELOPE") != -1) + || (aUpper.find ("BODY.PEEK[0]") != -1 && (aEnum == ITYPE_BOX || aEnum == ITYPE_DIR_AND_BOX))) { if (aEnum == ITYPE_BOX || aEnum == ITYPE_DIR_AND_BOX) @@ -440,8 +440,8 @@ IMAP4Protocol::listDir (const KURL & _url) UDSEntry entry; UDSAtom atom; KURL aURL = _url; - if (aURL.path().tqfind(';') != -1) - aURL.setPath(aURL.path().left(aURL.path().tqfind(';'))); + if (aURL.path().find(';') != -1) + aURL.setPath(aURL.path().left(aURL.path().find(';'))); kdDebug(7116) << "IMAP4Protocol::listDir - got " << listResponses.count () << endl; @@ -588,7 +588,7 @@ IMAP4Protocol::listDir (const KURL & _url) bool withSubject = mySection.isEmpty(); if (mySection.isEmpty()) mySection = "UID RFC822.SIZE ENVELOPE"; - bool withFlags = mySection.upper().tqfind("FLAGS") != -1; + bool withFlags = mySection.upper().find("FLAGS") != -1; imapCommand *fetch = sendCommand (imapCommand:: clientFetch (mySequence, mySection)); @@ -875,7 +875,7 @@ IMAP4Protocol::put (const KURL & _url, int, bool, bool) if (hasCapability("UIDPLUS")) { TQString uid = cmd->resultInfo(); - if (uid.tqfind("APPENDUID") != -1) + if (uid.find("APPENDUID") != -1) { uid = uid.section(" ", 2, 2); uid.truncate(uid.length()-1); @@ -930,7 +930,7 @@ IMAP4Protocol::mkdir (const KURL & _url, int) parseURL(_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, aInfo); if (type == ITYPE_BOX) { - bool ask = ( aInfo.tqfind( "ASKUSER" ) != -1 ); + bool ask = ( aInfo.find( "ASKUSER" ) != -1 ); if ( ask && messageBox(QuestionYesNo, i18n("The following folder will be created on the server: %1 " @@ -972,14 +972,14 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite) if (dType != ITYPE_BOX && dType != ITYPE_DIR_AND_BOX) { // this might be konqueror - int sub = dBox.tqfind (sBox); + int sub = dBox.find (sBox); // might be moving to upper folder if (sub > 0) { KURL testDir = dest; - TQString subDir = dBox.right (dBox.length () - dBox.tqfindRev ('/')); + TQString subDir = dBox.right (dBox.length () - dBox.findRev ('/')); TQString topDir = dBox.left (sub); testDir.setPath ("/" + topDir); dType = @@ -1049,7 +1049,7 @@ IMAP4Protocol::copy (const KURL & src, const KURL & dest, int, bool overwrite) if (hasCapability("UIDPLUS")) { TQString uid = cmd->resultInfo(); - if (uid.tqfind("COPYUID") != -1) + if (uid.find("COPYUID") != -1) { uid = uid.section(" ", 2, 3); uid.truncate(uid.length()-1); @@ -2108,7 +2108,7 @@ bool IMAP4Protocol::makeLogin () } } - if ( greeting.tqcontains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) { + if ( greeting.contains( TQRegExp( "Cyrus IMAP4 v2.1" ) ) ) { removeCapability( "ANNOTATEMORE" ); } @@ -2349,7 +2349,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox, TQString mailboxName = item.name (); // some beautification - if (mailboxName.tqfind (myBox) == 0 && mailboxName.length() > myBox.length()) + if (mailboxName.find (myBox) == 0 && mailboxName.length() > myBox.length()) { mailboxName = mailboxName.right (mailboxName.length () - myBox.length ()); @@ -2363,7 +2363,7 @@ IMAP4Protocol::doListEntry (const KURL & _url, const TQString & myBox, atom.m_uds = UDS_NAME; if (!item.hierarchyDelimiter().isEmpty() && - mailboxName.tqfind(item.hierarchyDelimiter()) != -1) + mailboxName.find(item.hierarchyDelimiter()) != -1) atom.m_str = mailboxName.section(item.hierarchyDelimiter(), -1); else atom.m_str = mailboxName; @@ -2473,7 +2473,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, // get the delimiter TQString myNamespace = namespaceForBox( _box ); kdDebug(7116) << "IMAP4::parseURL - namespace=" << myNamespace << endl; - if ( namespaceToDelimiter.tqcontains(myNamespace) ) + if ( namespaceToDelimiter.contains(myNamespace) ) { _hierarchyDelimiter = namespaceToDelimiter[myNamespace]; kdDebug(7116) << "IMAP4::parseURL - delimiter=" << _hierarchyDelimiter << endl; @@ -2524,7 +2524,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, } // if we got no list response for the box see if it's a prefix if ( retVal == ITYPE_UNKNOWN && - namespaceToDelimiter.tqcontains(_box) ) { + namespaceToDelimiter.contains(_box) ) { retVal = ITYPE_DIR; } } else { @@ -2554,17 +2554,17 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, { if (!_uid.isEmpty ()) { - if (_uid.tqfind (':') == -1 && _uid.tqfind (',') == -1 - && _uid.tqfind ('*') == -1) + if (_uid.find (':') == -1 && _uid.find (',') == -1 + && _uid.find ('*') == -1) retVal = ITYPE_MSG; } } if (retVal == ITYPE_MSG) { - if ( (_section.tqfind ("BODY.PEEK[", 0, false) != -1 || - _section.tqfind ("BODY[", 0, false) != -1) && - _section.tqfind(".MIME") == -1 && - _section.tqfind(".HEADER") == -1 ) + if ( (_section.find ("BODY.PEEK[", 0, false) != -1 || + _section.find ("BODY[", 0, false) != -1) && + _section.find(".MIME") == -1 && + _section.find(".HEADER") == -1 ) retVal = ITYPE_ATTACH; } if ( _hierarchyDelimiter.isEmpty() && @@ -2574,7 +2574,7 @@ IMAP4Protocol::parseURL (const KURL & _url, TQString & _box, // we try to reconstruct it from the URL if (!_box.isEmpty()) { - int start = _url.path().tqfindRev(_box); + int start = _url.path().findRev(_box); if (start != -1) _hierarchyDelimiter = _url.path().mid(start-1, start); kdDebug(7116) << "IMAP4::parseURL - reconstructed delimiter:" << _hierarchyDelimiter @@ -2629,9 +2629,9 @@ void IMAP4Protocol::flushOutput(TQString contentEncoding) { // get the coding from the MIME header TQByteArray decoded; - if (contentEncoding.tqfind("quoted-printable", 0, false) == 0) + if (contentEncoding.find("quoted-printable", 0, false) == 0) decoded = KCodecs::quotedPrintableDecode(outputCache); - else if (contentEncoding.tqfind("base64", 0, false) == 0) + else if (contentEncoding.find("base64", 0, false) == 0) KCodecs::base64Decode(outputCache, decoded); else decoded = outputCache; @@ -2697,7 +2697,7 @@ IMAP4Protocol::assureBox (const TQString & aBox, bool readonly) } completeQueue.removeRef (cmd); if (found) { - if (cmdInfo.tqfind("permission", 0, false) != -1) { + if (cmdInfo.find("permission", 0, false) != -1) { // not allowed to enter this folder error(ERR_ACCESS_DENIED, cmdInfo); } else { diff --git a/kioslaves/imap4/imapinfo.cc b/kioslaves/imap4/imapinfo.cc index be955c233..4d1fc805c 100644 --- a/kioslaves/imap4/imapinfo.cc +++ b/kioslaves/imap4/imapinfo.cc @@ -147,8 +147,8 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false) else if (tokens[2] == "[PERMANENTFLAGS") { - int flagsStart = line.tqfind('('); - int flagsEnd = line.tqfind(')'); + int flagsStart = line.find('('); + int flagsEnd = line.find(')'); kdDebug(7116) << "Checking permFlags from " << flagsStart << " to " << flagsEnd << endl; if ((-1 != flagsStart) && (-1 != flagsEnd) && flagsStart < flagsEnd) @@ -170,8 +170,8 @@ permanentFlagsAvailable_ (false), readWriteAvailable_ (false) } else if (tokens[1] == "FLAGS") { - int flagsStart = line.tqfind ('('); - int flagsEnd = line.tqfind (')'); + int flagsStart = line.find ('('); + int flagsEnd = line.find (')'); if ((-1 != flagsStart) && (-1 != flagsEnd) && flagsStart < flagsEnd) setFlags (_flags (line.mid (flagsStart, flagsEnd).latin1() )); @@ -206,29 +206,29 @@ ulong imapInfo::_flags (const TQCString & inFlags) if (entry.isEmpty ()) flagsString.clear(); - else if (0 != entry.tqcontains ("\\SEEN")) + else if (0 != entry.contains ("\\SEEN")) flags ^= Seen; - else if (0 != entry.tqcontains ("\\ANSWERED")) + else if (0 != entry.contains ("\\ANSWERED")) flags ^= Answered; - else if (0 != entry.tqcontains ("\\FLAGGED")) + else if (0 != entry.contains ("\\FLAGGED")) flags ^= Flagged; - else if (0 != entry.tqcontains ("\\DELETED")) + else if (0 != entry.contains ("\\DELETED")) flags ^= Deleted; - else if (0 != entry.tqcontains ("\\DRAFT")) + else if (0 != entry.contains ("\\DRAFT")) flags ^= Draft; - else if (0 != entry.tqcontains ("\\RECENT")) + else if (0 != entry.contains ("\\RECENT")) flags ^= Recent; - else if (0 != entry.tqcontains ("\\*")) + else if (0 != entry.contains ("\\*")) flags ^= User; // non standard kmail falgs - else if ( entry.tqcontains( "KMAILFORWARDED" ) || entry.tqcontains( "$FORWARDED" ) ) + else if ( entry.contains( "KMAILFORWARDED" ) || entry.contains( "$FORWARDED" ) ) flags = flags | Forwarded; - else if ( entry.tqcontains( "KMAILTODO" ) || entry.tqcontains( "$TODO" ) ) + else if ( entry.contains( "KMAILTODO" ) || entry.contains( "$TODO" ) ) flags = flags | Todo; - else if ( entry.tqcontains( "KMAILWATCHED" ) || entry.tqcontains( "$WATCHED" ) ) + else if ( entry.contains( "KMAILWATCHED" ) || entry.contains( "$WATCHED" ) ) flags = flags | Watched; - else if ( entry.tqcontains( "KMAILIGNORED" ) || entry.tqcontains( "$IGNORED" ) ) + else if ( entry.contains( "KMAILIGNORED" ) || entry.contains( "$IGNORED" ) ) flags = flags | Ignored; } diff --git a/kioslaves/imap4/imaplist.cc b/kioslaves/imap4/imaplist.cc index 6c9dad64f..13309089e 100644 --- a/kioslaves/imap4/imaplist.cc +++ b/kioslaves/imap4/imaplist.cc @@ -116,17 +116,17 @@ void imapList::parseAttributes( parseString & str ) orig = parser_->parseOneWordC(str); attributes_ << orig; attribute = orig.lower(); - if (-1 != attribute.tqfind ("\\noinferiors")) + if (-1 != attribute.find ("\\noinferiors")) noInferiors_ = true; - else if (-1 != attribute.tqfind ("\\noselect")) + else if (-1 != attribute.find ("\\noselect")) noSelect_ = true; - else if (-1 != attribute.tqfind ("\\marked")) + else if (-1 != attribute.find ("\\marked")) marked_ = true; - else if (-1 != attribute.tqfind ("\\unmarked")) + else if (-1 != attribute.find ("\\unmarked")) unmarked_ = true; - else if (-1 != attribute.tqfind ("\\hastqchildren")) + else if (-1 != attribute.find ("\\hastqchildren")) hasChildren_ = true; - else if (-1 != attribute.tqfind ("\\hasnotqchildren")) + else if (-1 != attribute.find ("\\hasnotqchildren")) hasNoChildren_ = true; else kdDebug(7116) << "imapList::imapList: bogus attribute " << attribute << endl; diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc index 37ae46caa..3e16e262d 100644 --- a/kioslaves/imap4/imapparser.cc +++ b/kioslaves/imap4/imapparser.cc @@ -122,7 +122,7 @@ imapParser::sendCommand (imapCommand * aCmd) // we no longer have a box open currentBox = TQString(); } - else if (command.tqfind ("SEARCH") != -1 + else if (command.find ("SEARCH") != -1 || command == "GETACL" || command == "LISTRIGHTS" || command == "MYRIGHTS" @@ -544,7 +544,7 @@ imapParser::parseResult (TQByteArray & result, parseString & rest, case 'A': // ALERT if (option == "ALERT") { - rest.pos = rest.data.tqfind(']', rest.pos) + 1; + rest.pos = rest.data.find(']', rest.pos) + 1; // The alert text is after [ALERT]. // Is this correct or do we need to care about litterals? selectInfo.setAlert( rest.cstr() ); @@ -563,7 +563,7 @@ imapParser::parseResult (TQByteArray & result, parseString & rest, } else if (option == "PERMANENTFLAGS") { - uint end = rest.data.tqfind(']', rest.pos); + uint end = rest.data.find(']', rest.pos); TQCString flags(rest.data.data() + rest.pos, end - rest.pos); selectInfo.setPermanentFlags (flags); rest.pos = end; @@ -1406,8 +1406,8 @@ void imapParser::parseBody (parseString & inWords) else { TQCString references = parseLiteralC(inWords, true); - int start = references.tqfind ('<'); - int end = references.tqfindRev ('>'); + int start = references.find ('<'); + int end = references.findRev ('>'); if (start < end) references = references.mid (start, end - start + 1); envelope->setReferences(references.simplifyWhiteSpace()); @@ -1420,7 +1420,7 @@ void imapParser::parseBody (parseString & inWords) } else { - if (specifier.tqfind(".MIME") != -1) + if (specifier.find(".MIME") != -1) { mailHeader *envelope = new mailHeader; TQString theHeader = parseLiteralC(inWords, false); @@ -1573,7 +1573,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords) if (!lastHandled) lastHandled = new imapCache(); lastHandled->setSize (size); } - else if (word.tqfind ("RFC822") == 0) + else if (word.find ("RFC822") == 0) { // might be RFC822 RFC822.TEXT RFC822.HEADER parseLiteralC(inWords, true); @@ -1675,7 +1675,7 @@ void imapParser::parseNamespace (parseString & result) return; TQString delimEmpty; - if ( namespaceToDelimiter.tqcontains( TQString() ) ) + if ( namespaceToDelimiter.contains( TQString() ) ) delimEmpty = namespaceToDelimiter[TQString()]; namespaceToDelimiter.clear(); @@ -1855,7 +1855,7 @@ imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section, _box = _url.path (); kdDebug(7116) << "imapParser::parseURL " << _box << endl; - int paramStart = _box.tqfind("/;"); + int paramStart = _box.find("/;"); if ( paramStart > -1 ) { TQString paramString = _box.right( _box.length() - paramStart-2 ); @@ -1868,24 +1868,24 @@ imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section, { TQString temp = (*it); - int pt = temp.tqfind ('/'); + int pt = temp.find ('/'); if (pt > 0) { - if (temp.tqfindRev ('"', pt) == -1 || temp.tqfind('"', pt) == -1) + if (temp.findRev ('"', pt) == -1 || temp.find('"', pt) == -1) { // if we have non-quoted '/' separator we'll just nuke it temp.truncate(pt); } } - if (temp.tqfind ("section=", 0, false) == 0) + if (temp.find ("section=", 0, false) == 0) _section = temp.right (temp.length () - 8); - else if (temp.tqfind ("type=", 0, false) == 0) + else if (temp.find ("type=", 0, false) == 0) _type = temp.right (temp.length () - 5); - else if (temp.tqfind ("uid=", 0, false) == 0) + else if (temp.find ("uid=", 0, false) == 0) _uid = temp.right (temp.length () - 4); - else if (temp.tqfind ("uidvalidity=", 0, false) == 0) + else if (temp.find ("uidvalidity=", 0, false) == 0) _validity = temp.right (temp.length () - 12); - else if (temp.tqfind ("info=", 0, false) == 0) + else if (temp.find ("info=", 0, false) == 0) _info = temp.right (temp.length () - 5); } // kdDebug(7116) << "URL: section= " << _section << ", type= " << _type << ", uid= " << _uid << endl; @@ -1911,7 +1911,7 @@ TQCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stop if (!inWords.isEmpty() && inWords[0] == '{') { TQCString retVal; - ulong runLen = inWords.tqfind ('}', 1); + ulong runLen = inWords.find ('}', 1); if (runLen > 0) { bool proper; @@ -2076,7 +2076,7 @@ TQString imapParser::namespaceForBox( const TQString & box ) TQString cleanPrefix; for ( TQValueList::Iterator it = list.begin(); it != list.end(); ++it ) { - if ( !(*it).isEmpty() && box.tqfind( *it ) != -1 ) + if ( !(*it).isEmpty() && box.find( *it ) != -1 ) return (*it); } } diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h index 8d57cee10..9902534c3 100644 --- a/kioslaves/imap4/imapparser.h +++ b/kioslaves/imap4/imapparser.h @@ -60,9 +60,9 @@ public: if (pos >= data.size()) return TQCString(); return TQCString(data.data() + pos, data.size() - pos + 1); } - int tqfind(char c, int index = 0) + int find(char c, int index = 0) { - int res = data.tqfind(c, index + pos); + int res = data.find(c, index + pos); return (res == -1) ? res : (res - pos); } // Warning: does not check for going past end of "data" diff --git a/kioslaves/imap4/mailaddress.cc b/kioslaves/imap4/mailaddress.cc index 0775d0f36..0ddd2ff04 100644 --- a/kioslaves/imap4/mailaddress.cc +++ b/kioslaves/imap4/mailaddress.cc @@ -105,7 +105,7 @@ mailAddress::parseAddress (char *aCStr) len = advance; user = user.mid (1, len - 2); // strip <> len -= 2; - pt = user.tqfind('@'); + pt = user.find('@'); host = user.right (len - pt - 1); // split it into host user.truncate(pt); // and user break; @@ -161,7 +161,7 @@ mailAddress::parseAddress (char *aCStr) } else if (user.isEmpty ()) { - pt = rawFullName.tqfind ('@'); + pt = rawFullName.find ('@'); if (pt >= 0) { user = rawFullName; diff --git a/kioslaves/imap4/mailheader.cc b/kioslaves/imap4/mailheader.cc index 76e03ace9..8ae36f4c3 100644 --- a/kioslaves/imap4/mailheader.cc +++ b/kioslaves/imap4/mailheader.cc @@ -76,8 +76,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine) goto out; } if (!qstricmp (label.data (), "Message-ID")) { - int start = value.tqfindRev ('<'); - int end = value.tqfindRev ('>'); + int start = value.findRev ('<'); + int end = value.findRev ('>'); if (start < end) messageID = value.mid (start, end - start + 1); else { @@ -87,8 +87,8 @@ mailHeader::addHdrLine (mimeHdrLine * inLine) goto out; } if (!qstricmp (label.data (), "In-Reply-To")) { - int start = value.tqfindRev ('<'); - int end = value.tqfindRev ('>'); + int start = value.findRev ('<'); + int end = value.findRev ('>'); if (start < end) inReplyTo = value.mid (start, end - start + 1); goto out; diff --git a/kioslaves/imap4/mimehdrline.cc b/kioslaves/imap4/mimehdrline.cc index 4158e59d5..9646ed26f 100644 --- a/kioslaves/imap4/mimehdrline.cc +++ b/kioslaves/imap4/mimehdrline.cc @@ -489,18 +489,18 @@ mimeHdrLine::truncateLine(TQCString aLine, unsigned int truncate) // see if we have a line of the form "key: value" (like "Subject: bla") // then we do not want to truncate between key and value - int validStart = aLine.tqfind(": "); + int validStart = aLine.find(": "); if (validStart > -1) { validStart += 2; } while (len > truncate) { - cutHere = aLine.tqfindRev(' ', truncate); + cutHere = aLine.findRev(' ', truncate); if (cutHere < 1 || cutHere < validStart) { - cutHere = aLine.tqfindRev('\t', truncate); + cutHere = aLine.findRev('\t', truncate); if (cutHere < 1) { - cutHere = aLine.tqfind(' ', 1); + cutHere = aLine.find(' ', 1); if (cutHere < 1) { - cutHere = aLine.tqfind('\t', 1); + cutHere = aLine.find('\t', 1); if (cutHere < 1) { // simply truncate return aLine.left(truncate); diff --git a/kioslaves/imap4/mimeheader.cc b/kioslaves/imap4/mimeheader.cc index d32f7eaca..048eba7a5 100644 --- a/kioslaves/imap4/mimeheader.cc +++ b/kioslaves/imap4/mimeheader.cc @@ -168,7 +168,7 @@ mimeHeader::addParameter (const TQCString& aParameter, TQDict < TQString > *aLis TQString *aValue; TQCString aLabel; - int pos = aParameter.tqfind ('='); + int pos = aParameter.find ('='); // cout << aParameter.left(pos).data(); aValue = new TQString (); aValue->setLatin1 (aParameter.right (aParameter.length () - pos - 1)); @@ -268,11 +268,11 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict) if (aDict) { //see if it is a normal parameter - found = aDict->tqfind (aStr); + found = aDict->find (aStr); if (!found) { //might be a continuated or encoded parameter - found = aDict->tqfind (aStr + "*"); + found = aDict->find (aStr + "*"); if (!found) { //continuated parameter @@ -284,10 +284,10 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict) TQCString search; search.setNum (part); search = aStr + "*" + search; - found = aDict->tqfind (search); + found = aDict->find (search); if (!found) { - found = aDict->tqfind (search + "*"); + found = aDict->find (search + "*"); if (found) encoded += rfcDecoder::encodeRFC2231String (*found); } @@ -298,7 +298,7 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict) part++; } while (found); - if (encoded.tqfind ('\'') >= 0) + if (encoded.find ('\'') >= 0) { retVal = rfcDecoder::decodeRFC2231String (encoded.local8Bit ()); } @@ -335,7 +335,7 @@ mimeHeader::setParameter (const TQCString& aLabel, const TQString& aValue, { //see if it needs to get encoded - if (encoded && aLabel.tqfind ('*') == -1) + if (encoded && aLabel.find ('*') == -1) { val = rfcDecoder::encodeRFC2231String (aValue); } @@ -412,7 +412,7 @@ mimeHeader::outputParameter (TQDict < TQString > *aDict) while (it.current ()) { retVal += (";\n\t" + it.currentKey () + "=").latin1 (); - if (it.current ()->tqfind (' ') > 0 || it.current ()->tqfind (';') > 0) + if (it.current ()->find (' ') > 0 || it.current ()->find (';') > 0) { retVal += '"' + it.current ()->utf8 () + '"'; } @@ -527,7 +527,7 @@ mimeHeader::parseBody (mimeIO & useIO, TQCString & messageBody, retVal = 1; //continue with next part break; } - else if (mbox && inputStr.tqfind ("From ") == 0) + else if (mbox && inputStr.find ("From ") == 0) { retVal = 0; // end of mbox break; @@ -556,7 +556,7 @@ mimeHeader::parseHeader (mimeIO & useIO) while (useIO.inputLine (inputStr)) { int appended; - if (inputStr.tqfind ("From ") != 0 || !first) + if (inputStr.find ("From ") != 0 || !first) { first = false; appended = my_line.appendStr (inputStr); @@ -584,7 +584,7 @@ mimeHeader * mimeHeader::bodyPart (const TQString & _str) { // see if it is nested a little deeper - int pt = _str.tqfind('.'); + int pt = _str.find('.'); if (pt != -1) { TQString tempStr = _str; @@ -658,9 +658,9 @@ mimeHeader::bodyDecodedBinary () { TQByteArray retVal; - if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0) + if (contentEncoding.find ("quoted-printable", 0, false) == 0) retVal = KCodecs::quotedPrintableDecode(postMultipartBody); - else if (contentEncoding.tqfind ("base64", 0, false) == 0) + else if (contentEncoding.find ("base64", 0, false) == 0) KCodecs::base64Decode(postMultipartBody, retVal); else retVal = postMultipartBody; @@ -680,9 +680,9 @@ mimeHeader::setBodyEncoded (const TQByteArray & _arr) TQByteArray setVal; kdDebug(7116) << "mimeHeader::setBodyEncoded - in size " << _arr.size () << endl; - if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0) + if (contentEncoding.find ("quoted-printable", 0, false) == 0) setVal = KCodecs::quotedPrintableEncode(_arr); - else if (contentEncoding.tqfind ("base64", 0, false) == 0) + else if (contentEncoding.find ("base64", 0, false) == 0) KCodecs::base64Encode(_arr, setVal); else setVal.duplicate (_arr); diff --git a/kioslaves/imap4/mimeheader.h b/kioslaves/imap4/mimeheader.h index 14d86e9d0..bc2fd2bcd 100644 --- a/kioslaves/imap4/mimeheader.h +++ b/kioslaves/imap4/mimeheader.h @@ -227,7 +227,7 @@ public: } TQString typeStr () { - return TQString (contentType.left (contentType.tqfind ('/'))); + return TQString (contentType.left (contentType.find ('/'))); } void setTypeStr (const TQString & _str) { @@ -236,7 +236,7 @@ public: TQString subtypeStr () { return TQString (contentType. - right (contentType.length () - contentType.tqfind ('/') - + right (contentType.length () - contentType.find ('/') - 1)); } void setSubtypeStr (const TQString & _str) diff --git a/kioslaves/imap4/mimeio.cc b/kioslaves/imap4/mimeio.cc index 9325df130..757c11a47 100644 --- a/kioslaves/imap4/mimeio.cc +++ b/kioslaves/imap4/mimeio.cc @@ -68,7 +68,7 @@ mimeIO::outputMimeLine (const TQCString & inLine) TQCString aLine = inLine; int len = inLine.length(); - int theLF = aLine.tqfindRev ('\n'); + int theLF = aLine.findRev ('\n'); if (theLF == len - 1 && theLF != -1) { //we have a trailing LF, now check for CR @@ -83,7 +83,7 @@ mimeIO::outputMimeLine (const TQCString & inLine) { int start, end, offset; start = 0; - end = aLine.tqfind ('\n', start); + end = aLine.find ('\n', start); while (end >= 0) { offset = 1; @@ -94,7 +94,7 @@ mimeIO::outputMimeLine (const TQCString & inLine) } outputLine (aLine.mid (start, end - start) + theCRLF, end - start + crlfLen); start = end + offset; - end = aLine.tqfind ('\n', start); + end = aLine.find ('\n', start); } outputLine (aLine.mid (start, len - start) + theCRLF, len - start + crlfLen); } @@ -178,7 +178,7 @@ mimeIOTQString::inputLine (TQCString & _str) if (theString.isEmpty ()) return 0; - int i = theString.tqfind ('\n'); + int i = theString.find ('\n'); if (i == -1) return 0; diff --git a/kioslaves/imap4/rfcdecoder.cc b/kioslaves/imap4/rfcdecoder.cc index 426911d0e..4eeb207d5 100644 --- a/kioslaves/imap4/rfcdecoder.cc +++ b/kioslaves/imap4/rfcdecoder.cc @@ -154,7 +154,7 @@ TQString rfcDecoder::fromIMAP (const TQString & inSrc) return TQString::fromUtf8 (dst.data ()); } -/* tqreplace " with \" and \ with \\ " and \ characters */ +/* replace " with \" and \ with \\ " and \ characters */ TQString rfcDecoder::quoteIMAP(const TQString &src) { uint len = src.length(); @@ -311,7 +311,7 @@ rfcDecoder::codecForName (const TQString & _str) if (_str.isEmpty ()) return NULL; return TQTextCodec::codecForName (_str.lower (). - tqreplace ("windows", "cp").latin1 ()); + replace ("windows", "cp").latin1 ()); } //----------------------------------------------------------------------------- @@ -338,7 +338,7 @@ rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset, TQString & language) { //do we have a rfc string - if (_str.tqfind("=?") < 0) + if (_str.find("=?") < 0) return _str; TQCString aStr = _str.ascii (); // TQString.length() means Unicode chars @@ -371,7 +371,7 @@ rfcDecoder::decodeRFC2047String (const TQString & _str, TQString & charset, else { charset = TQCString (beg, i - 1); // -2 + 1 for the zero - int pt = charset.tqfindRev('*'); + int pt = charset.findRev('*'); if (pt != -1) { // save language for later usage @@ -628,13 +628,13 @@ rfcDecoder::encodeRFC2231String (const TQString & _str) const TQString rfcDecoder::decodeRFC2231String (const TQString & _str) { - int p = _str.tqfind ('\''); + int p = _str.find ('\''); //see if it is an rfc string if (p < 0) return _str; - int l = _str.tqfindRev ('\''); + int l = _str.findRev ('\''); //second is language if (p >= l) diff --git a/kioslaves/imap4/rfcdecoder.h b/kioslaves/imap4/rfcdecoder.h index 50ab948e3..2095b2ed2 100644 --- a/kioslaves/imap4/rfcdecoder.h +++ b/kioslaves/imap4/rfcdecoder.h @@ -44,7 +44,7 @@ public: /** Convert Unicode path to modified UTF-7 IMAP mailbox */ static TQString toIMAP (const TQString & inSrc); -/** tqreplace " with \" and \ with \\ " and \ characters */ +/** replace " with \" and \ with \\ " and \ characters */ static TQString quoteIMAP (const TQString & src); /** remove \ from a string diff --git a/kioslaves/mbox/readmbox.cc b/kioslaves/mbox/readmbox.cc index 32f52d5b3..cc8503a5d 100644 --- a/kioslaves/mbox/readmbox.cc +++ b/kioslaves/mbox/readmbox.cc @@ -104,7 +104,7 @@ bool ReadMBox::nextLine() } else if( m_only_new ) { if( m_header && m_current_line->left( 7 ) == "tqStatus:" && - ! m_current_line->tqcontains( "U" ) && ! m_current_line->tqcontains( "N" ) ) + ! m_current_line->contains( "U" ) && ! m_current_line->contains( "N" ) ) { m_status = false; } diff --git a/kioslaves/mbox/stat.cc b/kioslaves/mbox/stat.cc index 093701e05..6d5bf75a6 100644 --- a/kioslaves/mbox/stat.cc +++ b/kioslaves/mbox/stat.cc @@ -86,7 +86,7 @@ KIO::UDSEntry Stat::statMessage( const UrlInfo& info ) Stat::addAtom( entry, KIO::UDS_MIME_TYPE, "message/rfc822" ); Stat::addAtom( entry, KIO::UDS_URL, url ); - url = url.right( url.length() - url.tqfindRev( "/" ) - 1 ); + url = url.right( url.length() - url.findRev( "/" ) - 1 ); Stat::addAtom( entry, KIO::UDS_NAME, url ); return entry; diff --git a/kioslaves/mbox/urlinfo.cc b/kioslaves/mbox/urlinfo.cc index 2a35ce2ea..d59c77ac8 100644 --- a/kioslaves/mbox/urlinfo.cc +++ b/kioslaves/mbox/urlinfo.cc @@ -111,7 +111,7 @@ bool UrlInfo::isMessage( const KURL& url ) { TQString path = url.path(); TQFileInfo info; - int cutindex = path.tqfindRev( '/' ); + int cutindex = path.findRev( '/' ); //Does it contain at least one /? if( cutindex < 0 ) diff --git a/kioslaves/opengroupware/webdavhandler.cpp b/kioslaves/opengroupware/webdavhandler.cpp index 61f2d6b53..1177624c5 100644 --- a/kioslaves/opengroupware/webdavhandler.cpp +++ b/kioslaves/opengroupware/webdavhandler.cpp @@ -70,7 +70,7 @@ TQDomDocument WebdavHandler::createAllPropsRequest() { TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addDavElement( doc, prop, "getcontentlength"); WebdavHandler::addDavElement( doc, prop, "getlastmodified" ); diff --git a/kioslaves/sieve/sieve.cpp b/kioslaves/sieve/sieve.cpp index 781e37ca5..8e6a5bcd7 100644 --- a/kioslaves/sieve/sieve.cpp +++ b/kioslaves/sieve/sieve.cpp @@ -245,14 +245,14 @@ bool kio_sieveProtocol::parseCapabilities(bool requestCapabilities/* = false*/) ksDebug() << "Looping receive" << endl; if (r.getType() == kio_sieveResponse::ACTION) { - if ( r.getAction().tqcontains("ok", false) != -1 ) { + if ( r.getAction().contains("ok", false) != -1 ) { ksDebug() << "Sieve server ready & awaiting authentication." << endl; break; } else ksDebug() << "Unknown action " << r.getAction() << "." << endl; } else if (r.getKey() == "IMPLEMENTATION") { - if (r.getVal().tqcontains("sieve", false) != -1) { + if (r.getVal().contains("sieve", false) != -1) { ksDebug() << "Connected to Sieve server: " << r.getVal() << endl; ret = true; setMetaData("implementation", r.getVal()); @@ -876,7 +876,7 @@ void kio_sieveProtocol::stat(const KURL& url) while(receiveData()) { if (r.getType() == kio_sieveResponse::ACTION) { - if (r.getAction().tqcontains("OK", false) == 1) + if (r.getAction().contains("OK", false) == 1) // Script list completed break; @@ -929,7 +929,7 @@ void kio_sieveProtocol::listDir(const KURL& url) while(receiveData()) { if (r.getType() == kio_sieveResponse::ACTION) { - if (r.getAction().tqcontains("OK", false) == 1) + if (r.getAction().contains("OK", false) == 1) // Script list completed. break; @@ -1237,10 +1237,10 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) { // expecting {quantity} start = 0; - end = interpret.tqfind("+}", start + 1); + end = interpret.find("+}", start + 1); // some older versions of Cyrus enclose the literal size just in { } instead of { +} if ( end == -1 ) - end = interpret.tqfind('}', start + 1); + end = interpret.find('}', start + 1); bool ok = false; r.setQuantity(interpret.mid(start + 1, end - start - 1).toUInt( &ok )); @@ -1263,7 +1263,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) start = 0; - end = interpret.tqfind(34, start + 1); + end = interpret.find(34, start + 1); if (end == -1) { ksDebug() << "Possible insufficient buffer size." << endl; r.setKey(interpret.right(interpret.length() - start)); @@ -1272,7 +1272,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) r.setKey(interpret.mid(start + 1, end - start - 1)); - start = interpret.tqfind(34, end + 1); + start = interpret.find(34, end + 1); if (start == -1) { if ((int)interpret.length() > end) // skip " and space @@ -1281,7 +1281,7 @@ bool kio_sieveProtocol::receiveData(bool waitForData, TQCString *reparse) return true; } - end = interpret.tqfind(34, start + 1); + end = interpret.find(34, start + 1); if (end == -1) { ksDebug() << "Possible insufficient buffer size." << endl; r.setVal(interpret.right(interpret.length() - start)); diff --git a/kitchensync/src/addresseediffalgo.cpp b/kitchensync/src/addresseediffalgo.cpp index cba16ec84..fc73c3677 100644 --- a/kitchensync/src/addresseediffalgo.cpp +++ b/kitchensync/src/addresseediffalgo.cpp @@ -146,12 +146,12 @@ void AddresseeDiffAlgo::diffList( const TQString &id, const TQValueList &left, const TQValueList &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/kitchensync/src/calendardiffalgo.cpp b/kitchensync/src/calendardiffalgo.cpp index fe376428e..3c9ef292d 100644 --- a/kitchensync/src/calendardiffalgo.cpp +++ b/kitchensync/src/calendardiffalgo.cpp @@ -206,12 +206,12 @@ void CalendarDiffAlgo::diffList( const TQString &id, const TQValueList &left, const TQValueList &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/kitchensync/src/configguisyncmlhttp.cpp b/kitchensync/src/configguisyncmlhttp.cpp index e81e92d46..3e1dac1aa 100644 --- a/kitchensync/src/configguisyncmlhttp.cpp +++ b/kitchensync/src/configguisyncmlhttp.cpp @@ -174,7 +174,7 @@ void ConfigGuiSyncmlHttp::load( const TQString &xml ) mMaxObjSize->setValue( element.text().toInt() ); } else if ( element.tagName() == "usestringtable" ) { mUseStringTable->setChecked( element.text() == "1" ); - } else if ( element.tagName() == "onlytqreplace" ) { + } else if ( element.tagName() == "onlyreplace" ) { mOnlyReplace->setChecked( element.text() == "1" ); } else if ( element.tagName() == "contact_db" ) { mContactDb->setCurrentText( element.text() ); @@ -208,12 +208,12 @@ TQString ConfigGuiSyncmlHttp::save() const xml += "0"; xml += "\n"; - xml += ""; + xml += ""; if ( mOnlyReplace->isChecked() ) xml += "1"; else xml += "0"; - xml += "\n"; + xml += "\n"; xml += "" + mContactDb->currentText() + "\n"; xml += "" + mCalendarDb->currentText() + "\n"; diff --git a/kitchensync/src/configguisyncmlobex.cpp b/kitchensync/src/configguisyncmlobex.cpp index 024e72ede..1bb4bdaf1 100644 --- a/kitchensync/src/configguisyncmlobex.cpp +++ b/kitchensync/src/configguisyncmlobex.cpp @@ -225,7 +225,7 @@ void ConfigGuiSyncmlObex::load( const TQString &xml ) if ( mMaxObjSize ) mMaxObjSize->setValue( element.text().toInt() ); } else if ( element.tagName() == "usestringtable" ) { mUseStringTable->setChecked( element.text() == "1" ); - } else if ( element.tagName() == "onlytqreplace" ) { + } else if ( element.tagName() == "onlyreplace" ) { mOnlyReplace->setChecked( element.text() == "1" ); } else if ( element.tagName() == "contact_db" ) { mContactDb->setCurrentText( element.text() ); @@ -293,12 +293,12 @@ TQString ConfigGuiSyncmlObex::save() const xml += "0"; xml += "\n"; - xml += ""; + xml += ""; if ( mOnlyReplace->isChecked() ) xml += "1"; else xml += "0"; - xml += "\n"; + xml += "\n"; xml += "" + mContactDb->currentText() + "\n"; xml += "" + mCalendarDb->currentText() + "\n"; diff --git a/kitchensync/src/groupconfigcommon.cpp b/kitchensync/src/groupconfigcommon.cpp index f2afe3c46..cda75c8cf 100644 --- a/kitchensync/src/groupconfigcommon.cpp +++ b/kitchensync/src/groupconfigcommon.cpp @@ -103,7 +103,7 @@ void ObjectTypeSelector::load( const QSync::Group &group ) TQMap::ConstIterator it; for( it = mObjectTypeChecks.begin(); it != mObjectTypeChecks.end(); ++it ) { TQCheckBox *check = it.data(); - check->setChecked( objectTypes.tqcontains( it.key() ) || initialLoad ); + check->setChecked( objectTypes.contains( it.key() ) || initialLoad ); } } diff --git a/kitchensync/src/kwidgetlist.cpp b/kitchensync/src/kwidgetlist.cpp index a5f5a81e4..89008f06f 100644 --- a/kitchensync/src/kwidgetlist.cpp +++ b/kitchensync/src/kwidgetlist.cpp @@ -69,7 +69,7 @@ void KWidgetList::appendItem( KWidgetListItem *item ) if ( !item ) return; - if ( !d->mItems.tqcontains( item ) ) { + if ( !d->mItems.contains( item ) ) { d->mItems.append( item ); item->reparent( d->mBox, 0, TQPoint( 0, 0 ), true ); item->setSelected( false ); @@ -129,7 +129,7 @@ void KWidgetList::setSelected( KWidgetListItem *item ) if ( !item ) return; - if ( d->mItems.tqcontains( item ) == 0 ) + if ( d->mItems.contains( item ) == 0 ) return; if ( d->mSelectedItem ) @@ -169,7 +169,7 @@ KWidgetListItem *KWidgetList::item( int index ) const int KWidgetList::index( KWidgetListItem *item ) const { - return d->mItems.tqfindIndex( item ); + return d->mItems.findIndex( item ); } void KWidgetList::clear() diff --git a/kitchensync/src/syncprocess.cpp b/kitchensync/src/syncprocess.cpp index 1a70f877d..672c789c3 100644 --- a/kitchensync/src/syncprocess.cpp +++ b/kitchensync/src/syncprocess.cpp @@ -90,7 +90,7 @@ void SyncProcess::applyObjectTypeFilter() const TQStringList activeObjectTypes = mGroup.config().activeObjectTypes(); for ( uint i = 0; i < objectTypes.count(); ++i ) { - if ( activeObjectTypes.tqcontains( objectTypes[ i ] ) ) { + if ( activeObjectTypes.contains( objectTypes[ i ] ) ) { kdDebug() << "Enabled object type: " << objectTypes[ i ] << endl; /* * This is not required. Also this lead to filtering problems when sync with "file-sync". diff --git a/kmail/Mainpage.dox b/kmail/Mainpage.dox index b1355c121..ab2391090 100644 --- a/kmail/Mainpage.dox +++ b/kmail/Mainpage.dox @@ -271,7 +271,7 @@ accessed via KMKernel ( the "kmkernel" construct ). Those methods are : folder manager. In dimap, both the headers and a copy of the full message are cached locally. 4) KMFolderMgr *searchFolderMgr() - which returns the folder manager - for search folders (folders created by using the "tqfind + for search folders (folders created by using the "find messages" tool). Other email clients call this type of folder "virtual folders". diff --git a/kmail/accountdialog.cpp b/kmail/accountdialog.cpp index 2782bfa93..de168cebb 100644 --- a/kmail/accountdialog.cpp +++ b/kmail/accountdialog.cpp @@ -133,7 +133,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) int commentPos = -1; - if( (commentPos = s.tqfind('#')) > -1 ) { + if( (commentPos = s.find('#')) > -1 ) { // get rid of trailing comment s.truncate(commentPos); s = s.stripWhiteSpace(); @@ -143,7 +143,7 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) processGlobalLock(s); } else if( lockFileLocal.search(s) != -1 ) { processLocalLock(s); - } else if( int i = s.tqfind('=') ) { + } else if( int i = s.find('=') ) { processVariableSetting(s,i); } } @@ -156,11 +156,11 @@ ProcmailRCParser::ProcmailRCParser(TQString fname) default_Location += '/'; default_Location += getenv("USER"); } - if ( !mSpoolFiles.tqcontains(default_Location) ) + if ( !mSpoolFiles.contains(default_Location) ) mSpoolFiles << default_Location; default_Location = default_Location + ".lock"; - if ( !mLockFiles.tqcontains(default_Location) ) + if ( !mLockFiles.contains(default_Location) ) mLockFiles << default_Location; } @@ -172,8 +172,8 @@ ProcmailRCParser::~ProcmailRCParser() void ProcmailRCParser::processGlobalLock(const TQString &s) { - TQString val = expandVars(s.mid(s.tqfind('=') + 1).stripWhiteSpace()); - if ( !mLockFiles.tqcontains(val) ) + TQString val = expandVars(s.mid(s.find('=') + 1).stripWhiteSpace()); + if ( !mLockFiles.contains(val) ) mLockFiles << val; } @@ -181,7 +181,7 @@ void ProcmailRCParser::processLocalLock(const TQString &s) { TQString val; - int colonPos = s.tqfindRev(':'); + int colonPos = s.findRev(':'); if (colonPos > 0) { // we don't care about the leading one val = s.mid(colonPos + 1).stripWhiteSpace(); @@ -190,7 +190,7 @@ ProcmailRCParser::processLocalLock(const TQString &s) // user specified a lockfile, so process it // val = expandVars(val); - if( val[0] != '/' && mVars.tqfind("MAILDIR") ) + if( val[0] != '/' && mVars.find("MAILDIR") ) val.insert(0, *(mVars["MAILDIR"]) + '/'); } // else we'll deduce the lockfile name one we // get the spoolfile name @@ -211,11 +211,11 @@ ProcmailRCParser::processLocalLock(const TQString &s) line = expandVars(line); // prepend default MAILDIR if needed - if( line[0] != '/' && mVars.tqfind("MAILDIR") ) + if( line[0] != '/' && mVars.find("MAILDIR") ) line.insert(0, *(mVars["MAILDIR"]) + '/'); // now we have the spoolfile name - if ( !mSpoolFiles.tqcontains(line) ) + if ( !mSpoolFiles.contains(line) ) mSpoolFiles << line; if( colonPos > 0 && (!val || val.isEmpty()) ) { @@ -224,13 +224,13 @@ ProcmailRCParser::processLocalLock(const TQString &s) val = line; // append lock extension - if( mVars.tqfind("LOCKEXT") ) + if( mVars.find("LOCKEXT") ) val += *(mVars["LOCKEXT"]); else val += ".lock"; } - if ( !val.isNull() && !mLockFiles.tqcontains(val) ) { + if ( !val.isNull() && !mLockFiles.contains(val) ) { mLockFiles << val; } } @@ -258,7 +258,7 @@ ProcmailRCParser::expandVars(const TQString &s) TQAsciiDictIterator it( mVars ); // iterator for dict while ( it.current() ) { - expS.tqreplace(TQString::tqfromLatin1("$") + it.currentKey(), *it.current()); + expS.replace(TQString::tqfromLatin1("$") + it.currentKey(), *it.current()); ++it; } @@ -806,7 +806,7 @@ void AccountDialog::makePopAccountPage() mPop.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mPop.authGroup, "auth digest-md5" ); mPop.authNTLM = new TQRadioButton( i18n("&NTLM"), mPop.authGroup, "auth ntlm" ); mPop.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mPop.authGroup, "auth gssapi" ); - if ( KProtocolInfo::capabilities("pop3").tqcontains("SASL") == 0 ) + if ( KProtocolInfo::capabilities("pop3").contains("SASL") == 0 ) { mPop.authNTLM->hide(); mPop.authGSSAPI->hide(); @@ -1764,7 +1764,7 @@ void AccountDialog::checkHighest( TQButtonGroup *btnGroup ) { kdDebug(5006) << "checkHighest( " << btnGroup << " )" << endl; for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) { - TQButton * btn = btnGroup->tqfind( i ); + TQButton * btn = btnGroup->find( i ); if ( btn && btn->isEnabled() ) { btn->animateClick(); return; @@ -1972,7 +1972,7 @@ void AccountDialog::saveSettings() // get the new account and register the new destination folder // this is the target folder for local or pop accounts and the root folder // of the account for (d)imap - KMAccount* newAcct = kmkernel->acctMgr()->tqfind(mAccount->id()); + KMAccount* newAcct = kmkernel->acctMgr()->find(mAccount->id()); if (newAcct) { if( accountType == "local" ) { @@ -2298,7 +2298,7 @@ NamespaceEditDialog::NamespaceEditDialog( TQWidget *tqparent, mBg = new TQButtonGroup( 0 ); connect( mBg, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( slotRemoveEntry(int) ) ); - mDelimMap = mNamespaceMap->tqfind( mType ).data(); + mDelimMap = mNamespaceMap->find( mType ).data(); ImapAccountBase::namespaceDelim::Iterator it; for ( it = mDelimMap.begin(); it != mDelimMap.end(); ++it ) { NamespaceLineEdit* edit = new NamespaceLineEdit( grid ); @@ -2315,7 +2315,7 @@ NamespaceEditDialog::NamespaceEditDialog( TQWidget *tqparent, void NamespaceEditDialog::slotRemoveEntry( int id ) { - if ( mLineEditMap.tqcontains( id ) ) { + if ( mLineEditMap.contains( id ) ) { // delete the lineedit and remove namespace from map NamespaceLineEdit* edit = mLineEditMap[id]; mDelimMap.remove( edit->text() ); @@ -2325,9 +2325,9 @@ void NamespaceEditDialog::slotRemoveEntry( int id ) mLineEditMap.remove( id ); delete edit; } - if ( mBg->tqfind( id ) ) { + if ( mBg->find( id ) ) { // delete the button - delete mBg->tqfind( id ); + delete mBg->find( id ); } adjustSize(); } @@ -2343,7 +2343,7 @@ void NamespaceEditDialog::slotOk() mDelimMap.remove( edit->lastText() ); } } - mNamespaceMap->tqreplace( mType, mDelimMap ); + mNamespaceMap->replace( mType, mDelimMap ); KDialogBase::slotOk(); } diff --git a/kmail/accountmanager.cpp b/kmail/accountmanager.cpp index 9340e774d..21a9f8cdc 100644 --- a/kmail/accountmanager.cpp +++ b/kmail/accountmanager.cpp @@ -293,7 +293,7 @@ KMAccount* AccountManager::findByName(const TQString &aName) const //----------------------------------------------------------------------------- -KMAccount* AccountManager::tqfind( const uint id ) const +KMAccount* AccountManager::find( const uint id ) const { if (id == 0) return 0; for ( AccountList::ConstIterator it( mAcctList.begin() ), end( mAcctList.end() ); it != end; ++it ) { @@ -397,7 +397,7 @@ void AccountManager::addToTotalNewMailCount( const TQMap & newInF for ( TQMap::const_iterator it = newInFolder.begin(); it != newInFolder.end(); ++it ) { mTotalNewMailsArrived += it.data(); - if ( mTotalNewInFolder.tqfind( it.key() ) == mTotalNewInFolder.end() ) + if ( mTotalNewInFolder.find( it.key() ) == mTotalNewInFolder.end() ) mTotalNewInFolder[it.key()] = it.data(); else mTotalNewInFolder[it.key()] += it.data(); @@ -417,7 +417,7 @@ uint AccountManager::createId() do { newId = kapp->random(); - } while ( usedIds.tqfind(newId) != usedIds.end() ); + } while ( usedIds.find(newId) != usedIds.end() ); return newId; } diff --git a/kmail/accountmanager.h b/kmail/accountmanager.h index 2fac30c36..f8a8079f7 100644 --- a/kmail/accountmanager.h +++ b/kmail/accountmanager.h @@ -65,7 +65,7 @@ public: /** Find account by id. Returns 0 if account does not exist. */ - KMAccount* tqfind( const uint id ) const; + KMAccount* find( const uint id ) const; /** Physically remove account. Also deletes the given account object ! Returns FALSE and does nothing if the account cannot be removed. */ diff --git a/kmail/accountwizard.cpp b/kmail/accountwizard.cpp index 0ae07d6c1..be69edd0f 100644 --- a/kmail/accountwizard.cpp +++ b/kmail/accountwizard.cpp @@ -153,7 +153,7 @@ void AccountWizard::showPage( TQWidget *page ) if ( mLoginName->text().isEmpty() ) { // try to extract login from email address TQString email = mEMailAddress->text(); - int pos = email.tqfind( '@' ); + int pos = email.find( '@' ); if ( pos != -1 ) mLoginName->setText( email.left( pos ) ); @@ -329,7 +329,7 @@ TQString AccountWizard::accountName() const TQString name( i18n( "None" ) ); TQString email = mEMailAddress->text(); - int pos = email.tqfind( '@' ); + int pos = email.find( '@' ); if ( pos != -1 ) { name = email.mid( pos + 1 ); name[ 0 ] = name[ 0 ].upper(); @@ -652,7 +652,7 @@ void AccountWizard::smtpCapabilities( const TQStringList &capaNormal, if ( authNone.isEmpty() && authSSL.isEmpty() && authTLS.isEmpty() ) { // slave doesn't seem to support "* AUTH METHODS" metadata (or server can't do AUTH) authBitsNone = authMethodsFromStringList( capaNormal ); - if ( capaNormal.tqfindIndex( "STARTTLS" ) != -1 ) + if ( capaNormal.findIndex( "STARTTLS" ) != -1 ) authBitsTLS = authBitsNone; else authBitsTLS = 0; @@ -664,7 +664,7 @@ void AccountWizard::smtpCapabilities( const TQStringList &capaNormal, } uint authBits = 0; - if ( capaNormal.tqfindIndex( "STARTTLS" ) != -1 ) { + if ( capaNormal.findIndex( "STARTTLS" ) != -1 ) { mTransportInfo->encryption = "TLS"; authBits = authBitsTLS; } else if ( !capaSSL.isEmpty() ) { diff --git a/kmail/actionscheduler.cpp b/kmail/actionscheduler.cpp index 3d1c86880..913245e99 100644 --- a/kmail/actionscheduler.cpp +++ b/kmail/actionscheduler.cpp @@ -462,7 +462,7 @@ void ActionScheduler::messageFetched( KMMessage *msg ) fetchMessageTimer->start( 0, true ); } if (mFetchUnget && msg->tqparent()) - msg->tqparent()->unGetMsg( msg->tqparent()->tqfind( msg )); + msg->tqparent()->unGetMsg( msg->tqparent()->find( msg )); return; } @@ -667,7 +667,7 @@ void ActionScheduler::moveMessage() mResult = mOldReturnCode; // ignore errors in deleting original message if (!orgMsg || !orgMsg->tqparent()) { // Original message is gone, no point filtering it anymore - mSrcFolder->removeMsg( mSrcFolder->tqfind( msg ) ); + mSrcFolder->removeMsg( mSrcFolder->find( msg ) ); kdDebug(5006) << "The original serial number is missing. " << "Cannot complete the filtering." << endl; mExecutingLock = false; @@ -680,7 +680,7 @@ void ActionScheduler::moveMessage() mIgnore = true; assert( msg->tqparent() == mSrcFolder.operator->() ); - mSrcFolder->take( mSrcFolder->tqfind( msg ) ); + mSrcFolder->take( mSrcFolder->find( msg ) ); mSrcFolder->addMsg( msg ); mIgnore = false; @@ -790,7 +790,7 @@ TQString ActionScheduler::debug() if ((*it)->mAccount && kmkernel->find( (*it)->mAccountId )) { res.append( TQString( "Account %1, Name %2.\n" ) .tqarg( (*it)->mAccountId ) - .tqarg( kmkernel->acctMgr()->tqfind( (*it)->mAccountId )->name() ) ); + .tqarg( kmkernel->acctMgr()->find( (*it)->mAccountId )->name() ) ); } res.append( TQString( "mExecuting %1, " ).tqarg( (*it)->mExecuting ? "true" : "false" ) ); res.append( TQString( "mExecutingLock %1, " ).tqarg( (*it)->mExecutingLock ? "true" : "false" ) ); diff --git a/kmail/antispamconfig.cpp b/kmail/antispamconfig.cpp index 19198e11a..500529953 100644 --- a/kmail/antispamconfig.cpp +++ b/kmail/antispamconfig.cpp @@ -89,7 +89,7 @@ const SpamAgents AntiSpamConfig::uniqueAgents() const SpamAgents::ConstIterator end( mAgents.end() ); for ( ; it != end ; ++it ) { const TQString agent( ( *it ).name() ); - if ( seenAgents.tqfind( agent ) == seenAgents.end() ) { + if ( seenAgents.find( agent ) == seenAgents.end() ) { agents.append( *it ); seenAgents.append( agent ); } diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp index 1e5e912b8..dccca6a89 100644 --- a/kmail/antispamwizard.cpp +++ b/kmail/antispamwizard.cpp @@ -505,9 +505,9 @@ void AntiSpamWizard::checkToolAvailability() AccountManager* mgr = kmkernel->acctMgr(); KMAccount* account = mgr->first(); while ( account ) { - if ( account->type() == "pop" || account->type().tqcontains( "imap" ) ) { + if ( account->type() == "pop" || account->type().contains( "imap" ) ) { const NetworkAccount * n = dynamic_cast( account ); - if ( n && n->host().lower().tqcontains( pattern.lower() ) ) { + if ( n && n->host().lower().contains( pattern.lower() ) ) { mInfoPage->addAvailableTool( (*it).getVisibleName() ); found = true; } @@ -925,7 +925,7 @@ void ASWizInfoPage::addAvailableTool( const TQString &visibleName ) bool ASWizInfoPage::isProgramSelected( const TQString &visibleName ) { TQString listName = visibleName; - return mToolsList->isSelected( mToolsList->tqfindItem( listName ) ); + return mToolsList->isSelected( mToolsList->findItem( listName ) ); } diff --git a/kmail/archivefolderdialog.cpp b/kmail/archivefolderdialog.cpp index b1422f476..f6cfac629 100644 --- a/kmail/archivefolderdialog.cpp +++ b/kmail/archivefolderdialog.cpp @@ -194,7 +194,7 @@ void ArchiveFolderDialog::slotFixFileExtension() // First, try to find the extension of the file name and remove it for( int i = 0; i < numExtensions; i++ ) { - int index = fileName.lower().tqfindRev( sortedExtensions[i] ); + int index = fileName.lower().findRev( sortedExtensions[i] ); if ( index != -1 ) { fileName = fileName.left( fileName.length() - TQString( sortedExtensions[i] ).length() ); break; diff --git a/kmail/bodyvisitor.cpp b/kmail/bodyvisitor.cpp index a4520f3c7..8a40d7443 100644 --- a/kmail/bodyvisitor.cpp +++ b/kmail/bodyvisitor.cpp @@ -78,11 +78,11 @@ namespace KMail { ++it; // skip this part if the tqparent part is already loading if ( part->tqparent() && - selected.tqcontains( part->tqparent() ) && + selected.contains( part->tqparent() ) && part->loadPart() ) continue; - if ( part->originalContentTypeStr().tqcontains("SIGNED") ) + if ( part->originalContentTypeStr().contains("SIGNED") ) { // signed messages have to be loaded completely // so construct a new dummy part that loads the body @@ -115,7 +115,7 @@ namespace KMail { // check whether to load this part or not: // look at the basic list, ask the subclass and check the tqparent - if ( mBasicList.tqcontains( part->originalContentTypeStr() ) || + if ( mBasicList.contains( part->originalContentTypeStr() ) || parentNeedsLoading( part ) || addPartToList( part ) ) { diff --git a/kmail/cachedimapjob.cpp b/kmail/cachedimapjob.cpp index 968529beb..d13382511 100644 --- a/kmail/cachedimapjob.cpp +++ b/kmail/cachedimapjob.cpp @@ -401,10 +401,10 @@ void CachedImapJob::slotPutNextMessage() mMsg->setUID( 0 ); // for the index TQCString cstr(mMsg->asString()); - int a = cstr.tqfind("\nX-UID: "); - int b = cstr.tqfind('\n', a); - if (a != -1 && b != -1 && cstr.tqfind("\n\n") > a) cstr.remove(a, b-a); - TQCString mData(cstr.length() + cstr.tqcontains('\n')); + int a = cstr.find("\nX-UID: "); + int b = cstr.find('\n', a); + if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); + TQCString mData(cstr.length() + cstr.contains('\n')); unsigned int i = 0; for( char *ch = cstr.data(); *ch; ch++ ) { if ( *ch == '\n' ) { @@ -462,7 +462,7 @@ void CachedImapJob::slotPutMessageInfoData( KIO::Job *job, const TQString &data return; } - if ( data.tqfind( "UID" ) != -1 && mMsg ) { + if ( data.find( "UID" ) != -1 && mMsg ) { int uid = ( data.right( data.length() - 4 ) ).toInt(); kdDebug( 5006 ) << k_funcinfo << "Server told us uid is: " << uid << endl; mMsg->setUID( uid ); @@ -498,7 +498,7 @@ void CachedImapJob::slotPutMessageResult(KIO::Job *job) emit progress( mSentBytes, mTotalBytes ); int i; - if( ( i = mFolder->tqfind(mMsg) ) != -1 ) { + if( ( i = mFolder->find(mMsg) ) != -1 ) { /* * If we have aquired a uid during upload the server supports the uidnext * extension and there is no need to redownload this mail, we already have @@ -686,7 +686,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) // Check the uidValidity TQCString cstr((*it).data.data(), (*it).data.size() + 1); - int a = cstr.tqfind("X-uidValidity: "); + int a = cstr.find("X-uidValidity: "); if (a < 0) { // Something is seriously rotten here! // TODO: Tell the user that he has a problem @@ -694,7 +694,7 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) << mFolder->name() << endl; } else { - int b = cstr.tqfind("\r\n", a); + int b = cstr.find("\r\n", a); if ( (b - a - 15) >= 0 ) { TQString uidv = cstr.mid(a + 15, b - a - 15); // kdDebug(5006) << "New uidv = " << uidv << ", old uidv = " @@ -711,11 +711,11 @@ void CachedImapJob::slotCheckUidValidityResult(KIO::Job * job) << mFolder->name() << endl; } - a = cstr.tqfind( "X-PermanentFlags: " ); + a = cstr.find( "X-PermanentFlags: " ); if ( a < 0 ) { kdDebug(5006) << "no PERMANENTFLAGS response? assumming custom flags are not available" << endl; } else { - int b = cstr.tqfind( "\r\n", a ); + int b = cstr.find( "\r\n", a ); if ( (b - a - 18) >= 0 ) { int flags = cstr.mid( a + 18, b - a - 18 ).toInt(); emit permanentFlags( flags ); @@ -767,7 +767,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath, static_cast(static_cast(node)->storage()); if ( !imapFolder->imapPath().isEmpty() ) // Only rename folders that have been accepted by the server - if( imapFolder->imapPath().tqfind( oldPath ) == 0 ) { + if( imapFolder->imapPath().find( oldPath ) == 0 ) { TQString p = imapFolder->imapPath(); p = p.mid( oldPath.length() ); p.prepend( newPath ); @@ -782,7 +782,7 @@ static void renameChildFolders( KMFolderDir* dir, const TQString& oldPath, void CachedImapJob::revertLabelChange() { - TQMap::ConstIterator renit = mAccount->renamedFolders().tqfind( mFolder->imapPath() ); + TQMap::ConstIterator renit = mAccount->renamedFolders().find( mFolder->imapPath() ); Q_ASSERT( renit != mAccount->renamedFolders().end() ); if ( renit != mAccount->renamedFolders().end() ) { mFolder->folder()->setLabel( (*renit).mOldLabel ); diff --git a/kmail/callback.cpp b/kmail/callback.cpp index 923ff6be3..0b94a5d1f 100644 --- a/kmail/callback.cpp +++ b/kmail/callback.cpp @@ -64,7 +64,7 @@ TQString Callback::askForTransport( bool nullIdentity ) const return transports.first(); const TQString defaultTransport = GlobalSettings::self()->defaultTransport(); - const int defaultIndex = TQMAX( 0, transports.tqfindIndex( defaultTransport ) ); + const int defaultIndex = TQMAX( 0, transports.findIndex( defaultTransport ) ); TQString text; if ( nullIdentity ) @@ -94,13 +94,13 @@ bool Callback::mailICal( const TQString& to, const TQString &iCal, msg->setSubject( subject ); if ( GlobalSettings::self()->exchangeCompatibleInvitations() ) { if ( status == TQString("cancel") ) - msg->setSubject( i18n( "Declined: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Declined: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("tentative") ) - msg->setSubject( i18n( "Tentative: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Tentative: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("accepted") ) - msg->setSubject( i18n( "Accepted: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Accepted: %1" ).tqarg(subject).replace("Answer: ","") ); else if ( status == TQString("delegated") ) - msg->setSubject( i18n( "Delegated: %1" ).tqarg(subject).tqreplace("Answer: ","") ); + msg->setSubject( i18n( "Delegated: %1" ).tqarg(subject).replace("Answer: ","") ); } msg->setTo( to ); msg->setFrom( receiver() ); @@ -227,7 +227,7 @@ TQString Callback::receiver() const // select default identity by default const TQString defaultAddr = kmkernel->identityManager()->defaultIdentity().primaryEmailAddress(); - const int defaultIndex = TQMAX( 0, addrs.tqfindIndex( defaultAddr ) ); + const int defaultIndex = TQMAX( 0, addrs.findIndex( defaultAddr ) ); mReceiver = KInputDialog::getItem( i18n( "Select Address" ), diff --git a/kmail/chiasmuskeyselector.cpp b/kmail/chiasmuskeyselector.cpp index 9fde31bb9..d88c3164b 100644 --- a/kmail/chiasmuskeyselector.cpp +++ b/kmail/chiasmuskeyselector.cpp @@ -21,7 +21,7 @@ ChiasmusKeySelector::ChiasmusKeySelector( TQWidget* tqparent, const TQString& ca mListBox = new KListBox( page ); mListBox->insertStringList( keys ); - const int current = keys.tqfindIndex( currentKey ); + const int current = keys.findIndex( currentKey ); mListBox->setSelected( TQMAX( 0, current ), true ); mListBox->ensureCurrentVisible(); tqlayout->addWidget( mListBox, 1 ); diff --git a/kmail/configuredialog.cpp b/kmail/configuredialog.cpp index e1fa08985..c0d775cf2 100644 --- a/kmail/configuredialog.cpp +++ b/kmail/configuredialog.cpp @@ -480,7 +480,7 @@ void IdentityPage::slotRenameIdentity( TQListViewItem * i, TQString newName = s.stripWhiteSpace(); if ( !newName.isEmpty() && - !kmkernel->identityManager()->shadowIdentities().tqcontains( newName ) ) { + !kmkernel->identityManager()->shadowIdentities().contains( newName ) ) { KPIM::Identity & ident = item->identity(); ident.setIdentityName( newName ); emit changed(true); @@ -739,7 +739,7 @@ static inline TQString uniqueName( const TQStringList & list, { int suffix = 1; TQString result = name; - while ( list.tqfind( result ) != list.end() ) { + while ( list.find( result ) != list.end() ) { result = i18n("%1: name; %2: number appended to it to make it unique " "among a list of names", "%1 %2") .tqarg( name ).tqarg( suffix ); @@ -2057,7 +2057,7 @@ AppearancePageHeadersTab::AppearancePageHeadersTab( TQWidget * tqparent, const c for ( int i = 0 ; i < numDateDisplayConfig ; i++ ) { TQString buttonLabel = i18n(dateDisplayConfig[i].displayName); - if ( buttonLabel.tqcontains("%1") ) + if ( buttonLabel.contains("%1") ) buttonLabel = buttonLabel.tqarg( DateFormatter::formatCurrentDate( dateDisplayConfig[i].dateDisplay ) ); radio = new TQRadioButton( buttonLabel, mDateDisplay ); mDateDisplay->insert( radio, i ); @@ -2367,7 +2367,7 @@ void AppearancePage::ReaderTab::readCurrentFallbackCodec() TQStringList::ConstIterator it( encodings.begin() ); TQStringList::ConstIterator end( encodings.end() ); TQString currentEncoding = GlobalSettings::self()->fallbackCharacterEncoding(); - currentEncoding = currentEncoding.tqreplace( "iso ", "iso-", false ); + currentEncoding = currentEncoding.replace( "iso ", "iso-", false ); ///kdDebug(5006) << "Looking for encoding: " << currentEncoding << endl; int i = 0; int indexOfLatin9 = 0; @@ -3203,7 +3203,7 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * tqparent, const char connect( mReplyListEditor, TQT_SIGNAL( changed( void ) ), this, TQT_SLOT( slotEmitChanged( void ) ) ); - // row 2: "tqreplace [...]" check box: + // row 2: "replace [...]" check box: mReplaceReplyPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceReplyPrefixItem()->label(), group, "kcfg_ReplaceReplyPrefix" ); @@ -3231,7 +3231,7 @@ ComposerPageSubjectTab::ComposerPageSubjectTab( TQWidget * tqparent, const char connect( mForwardListEditor, TQT_SIGNAL( changed( void ) ), this, TQT_SLOT( slotEmitChanged( void ) ) ); - // row 3: "tqreplace [...]" check box: + // row 3: "replace [...]" check box: mReplaceForwardPrefixCheck = new TQCheckBox( GlobalSettings::self()->replaceForwardPrefixItem()->label(), group, "kcfg_ReplaceForwardPrefix" ); @@ -3855,7 +3855,7 @@ SecurityPageGeneralTab::SecurityPageGeneralTab( TQWidget * tqparent, const char mMDNGroup->insert( radio ); for ( int i = 0 ; i < mMDNGroup->count() ; ++i ) - TQWhatsThis::add( mMDNGroup->tqfind( i ), receiptWhatsThis ); + TQWhatsThis::add( mMDNGroup->find( i ), receiptWhatsThis ); w = new TQWidget( hbox ); // spacer hbox->setStretchFactor( w, 1 ); @@ -5051,7 +5051,7 @@ void MiscPage::GroupwareTab::doLoadFromGlobalSettings() { KMAccount* selectedAccount = 0; int accountId = GlobalSettings::self()->theIMAPResourceAccount(); if ( accountId ) - selectedAccount = kmkernel->acctMgr()->tqfind( accountId ); + selectedAccount = kmkernel->acctMgr()->find( accountId ); else { // Fallback: iterate over accounts to select folderId if found (as an inbox folder) for( KMAccount *a = kmkernel->acctMgr()->first(); a!=0; diff --git a/kmail/configuredialog_p.cpp b/kmail/configuredialog_p.cpp index a6705c76b..7a8820236 100644 --- a/kmail/configuredialog_p.cpp +++ b/kmail/configuredialog_p.cpp @@ -222,7 +222,7 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, // we extract it from the path: "/prefix/de/entry.desktop" -> "de" TQString acronym = (*it).section( '/', -2, -2 ); - if ( suppressedAcronyms.tqfind( acronym ) == suppressedAcronyms.end() ) { + if ( suppressedAcronyms.find( acronym ) == suppressedAcronyms.end() ) { // not found: TQString displayname = TQString::tqfromLatin1("%1 (%2)") .tqarg( name ).tqarg( acronym ); @@ -239,7 +239,7 @@ NewLanguageDialog::NewLanguageDialog( LanguageItemList & suppressedLangs, TQString NewLanguageDialog::language() const { TQString s = mComboBox->currentText(); - int i = s.tqfindRev( '(' ); + int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } @@ -257,13 +257,13 @@ int LanguageComboBox::insertLanguage( const TQString & language ) TQString name = entry.readEntry( "Name" ); TQString output = TQString::tqfromLatin1("%1 (%2)").tqarg( name ).tqarg( language ); insertItem( TQPixmap( locate("locale", language + flagPng ) ), output ); - return listBox()->index( listBox()->tqfindItem(output) ); + return listBox()->index( listBox()->findItem(output) ); } TQString LanguageComboBox::language() const { TQString s = currentText(); - int i = s.tqfindRev( '(' ); + int i = s.findRev( '(' ); return s.mid( i + 1, s.length() - i - 2 ); } @@ -272,7 +272,7 @@ void LanguageComboBox::setLanguage( const TQString & language ) TQString parenthizedLanguage = TQString::tqfromLatin1("(%1)").tqarg( language ); for (int i = 0; i < count(); i++) // ### FIXME: use .endWith(): - if ( text(i).tqfind( parenthizedLanguage ) >= 0 ) { + if ( text(i).find( parenthizedLanguage ) >= 0 ) { setCurrentItem(i); return; } diff --git a/kmail/encodingdetector.cpp b/kmail/encodingdetector.cpp index cc19e3b1e..06537981b 100644 --- a/kmail/encodingdetector.cpp +++ b/kmail/encodingdetector.cpp @@ -51,7 +51,7 @@ // Multiple scripts per language were removed and the entries were reordered so // that simple substring matching will work. For example, bam was put before ba // so that the first match will be likely the right match. Otherwise "ba" would -// match "bam" but we would have to search on to tqfind "bam" which is what we want. +// match "bam" but we would have to search on to find "bam" which is what we want. // The original file is called pango-script-lang-table.h /* pango-script-lang-table.h: @@ -824,7 +824,7 @@ EncodingDetector::EncodingChoiceSource EncodingDetector::encodingChoiceSource() const char* EncodingDetector::encoding() const { d->m_storeDecoderName = d->m_codec->name(); - d->m_storeDecoderName = d->m_storeDecoderName.lower().tqreplace( "iso ", "iso-" ); + d->m_storeDecoderName = d->m_storeDecoderName.lower().replace( "iso ", "iso-" ); return d->m_storeDecoderName.data(); } @@ -1059,13 +1059,13 @@ bool EncodingDetector::analyze(const char *data, int len) TQCString str( ptr, (end-ptr)+1); str = str.lower(); int pos=0; - //if( (pos = str.tqfind("http-equiv", pos)) == -1) break; - //if( (pos = str.tqfind("content-type", pos)) == -1) break; - if( (pos = str.tqfind("charset")) == -1) + //if( (pos = str.find("http-equiv", pos)) == -1) break; + //if( (pos = str.find("content-type", pos)) == -1) break; + if( (pos = str.find("charset")) == -1) continue; pos+=6; // skip to '=' - if( (pos = str.tqfind('=', pos)) == -1) + if( (pos = str.find('=', pos)) == -1) continue; // skip whitespace before encoding itself diff --git a/kmail/favoritefolderview.cpp b/kmail/favoritefolderview.cpp index 5c5cfa66f..9de9271ef 100644 --- a/kmail/favoritefolderview.cpp +++ b/kmail/favoritefolderview.cpp @@ -74,7 +74,7 @@ FavoriteFolderViewItem::FavoriteFolderViewItem(FavoriteFolderView * tqparent, co void FavoriteFolderViewItem::nameChanged() { TQString txt = text( 0 ); - txt.tqreplace( mOldName, folder()->label() ); + txt.replace( mOldName, folder()->label() ); setText( 0, txt ); mOldName = folder()->label(); } @@ -309,7 +309,7 @@ void FavoriteFolderView::dropped(TQDropEvent * e, TQListViewItem * after) KMFolderTreeItem *fti = static_cast( it.current() ); if ( !fti->folder() ) continue; - if( !mFolderToItem.tqcontains( fti->folder() ) ) + if( !mFolderToItem.contains( fti->folder() ) ) afterItem = addFolder( fti->folder(), prettyName( fti ), afterItem ); } e->accept(); @@ -369,7 +369,7 @@ void FavoriteFolderView::initializeFavorites() assert( ft ); for ( TQListViewItemIterator it( ft ); it.current(); ++it ) { KMFolderTreeItem *fti = static_cast( it.current() ); - if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.tqcontains( fti->folder()->id() ) ) { + if ( fti->type() == KFolderTreeItem::Inbox && fti->folder() && !seenInboxes.contains( fti->folder()->id() ) ) { seenInboxes.append( fti->folder()->id() ); if ( fti->folder() == kmkernel->inboxFolder() && hideLocalInbox() ) continue; @@ -457,7 +457,7 @@ void FavoriteFolderView::addFolder() KMFolder *folder = dlg.folder(); if ( !folder ) return; - if ( mFolderToItem.tqcontains( folder ) ) + if ( mFolderToItem.contains( folder ) ) return; KMFolderTreeItem *fti = findFolderTreeItem( folder ); @@ -468,7 +468,7 @@ void KMail::FavoriteFolderView::addFolder(KMFolderTreeItem * fti) { if ( !fti || !fti->folder() ) return; - if ( !mFolderToItem.tqcontains( fti->folder() ) ) + if ( !mFolderToItem.contains( fti->folder() ) ) addFolder( fti->folder(), prettyName( fti ) ); } diff --git a/kmail/folderIface.cpp b/kmail/folderIface.cpp index 4d1cb8089..bcd4201f7 100644 --- a/kmail/folderIface.cpp +++ b/kmail/folderIface.cpp @@ -136,7 +136,7 @@ FolderIface::messageRefs() for( int i = 0; i < messageCache.size(); ++i ) { KMMsgBase *msg = messageCache[i]; if ( msg ) { - KMMessage *fmsg = msg->tqparent()->getMsg( msg->tqparent()->tqfind( msg ) ); + KMMessage *fmsg = msg->tqparent()->getMsg( msg->tqparent()->find( msg ) ); refList.append( DCOPRef( new MessageIface( fmsg ) ) ); } } diff --git a/kmail/folderdiaacltab.cpp b/kmail/folderdiaacltab.cpp index 5237787ea..3b64254c5 100644 --- a/kmail/folderdiaacltab.cpp +++ b/kmail/folderdiaacltab.cpp @@ -139,7 +139,7 @@ static TQString addresseeToUserId( const KABC::Addressee& addr, IMAPUserIdFormat if ( userIdFormat == FullEmail ) return email; else { // mUserIdFormat == UserName - email.truncate( email.tqfind( '@' ) ); + email.truncate( email.find( '@' ) ); return email; } } @@ -259,7 +259,7 @@ void KMail::FolderDiaACLTab::ListViewItem::load( const ACLListEntry& entry ) // since it uses space as a separator (imap4.cc, look for GETACL) // It's ok in distribution list names though, that's why this check is only done here // and also why there's no validator on the lineedit. - if ( entry.userId.tqcontains( ' ' ) ) + if ( entry.userId.contains( ' ' ) ) kdWarning(5006) << "Userid contains a space!!! '" << entry.userId << "'" << endl; setUserId( entry.userId ); @@ -412,7 +412,7 @@ void KMail::FolderDiaACLTab::load() // but the default value is determined from the current user's own id. TQString defaultFormat = "fullemail"; // warning mImapAccount can be 0 if creating a subsubsubfolder with dimap... (bug?) - if ( mImapAccount && mImapAccount->login().tqfind('@') == -1 ) + if ( mImapAccount && mImapAccount->login().find('@') == -1 ) defaultFormat = "username"; // no @ found, so we assume it's just the username KConfigGroup configGroup( kmkernel->config(), "IMAP" ); TQString str = configGroup.readEntry( "UserIdFormat", defaultFormat ); @@ -699,7 +699,7 @@ bool KMail::FolderDiaACLTab::save() TQString uid = (*init).userId; for( ACLList::ConstIterator it = aclList.begin(); it != aclList.end() && !isInNewList; ++it ) isInNewList = uid == (*it).userId; - if ( !isInNewList && !mRemovedACLs.tqcontains(uid) ) + if ( !isInNewList && !mRemovedACLs.contains(uid) ) mRemovedACLs.append( uid ); } diff --git a/kmail/folderjob.h b/kmail/folderjob.h index 3d662e76d..52778bb68 100644 --- a/kmail/folderjob.h +++ b/kmail/folderjob.h @@ -128,7 +128,7 @@ signals: /** * Emitted when a list of messages has been - * copied to the specified location. TQPtrList tqcontains + * copied to the specified location. TQPtrList contains * the list of the copied messages. */ void messageCopied( TQPtrList ); diff --git a/kmail/foldersetselector.cpp b/kmail/foldersetselector.cpp index 45748b2f6..8ae2618ec 100644 --- a/kmail/foldersetselector.cpp +++ b/kmail/foldersetselector.cpp @@ -76,7 +76,7 @@ void FolderSetSelector::setSelectedFolders(const TQValueList< int > & folderIds) while ( it.current() ) { SimpleFolderTreeItem *item = dynamic_cast*>( it.current() ); if ( item && item->folder() ) { - if ( folderIds.tqcontains( item->folder()->id() ) ) + if ( folderIds.contains( item->folder()->id() ) ) item->setOn( true ); else item->setOn( false ); diff --git a/kmail/folderstorage.cpp b/kmail/folderstorage.cpp index 469f03f11..25fc6c0f0 100644 --- a/kmail/folderstorage.cpp +++ b/kmail/folderstorage.cpp @@ -113,7 +113,7 @@ void FolderStorage::close( const char* owner, bool aForced ) TQString FolderStorage::dotEscape(const TQString& aStr) { if (aStr[0] != '.') return aStr; - return aStr.left(aStr.tqfind(TQRegExp("[^\\.]"))) + aStr; + return aStr.left(aStr.find(TQRegExp("[^\\.]"))) + aStr; } void FolderStorage::addJob( FolderJob* job ) const @@ -350,8 +350,8 @@ void FolderStorage::reallyAddCopyOfMsg(KMMessage* aMsg) unGetMsg( count() - 1 ); } -int FolderStorage::tqfind( const KMMessage * msg ) const { - return tqfind( &msg->toMsgBase() ); +int FolderStorage::find( const KMMessage * msg ) const { + return find( &msg->toMsgBase() ); } //----------------------------------------------------------------------------- @@ -359,7 +359,7 @@ void FolderStorage::removeMsg(const TQPtrList& msgList, bool imapQuie { for( TQPtrListIterator it( msgList ); *it; ++it ) { - int idx = tqfind(it.current()); + int idx = find(it.current()); assert( idx != -1); removeMsg(idx, imapQuiet); } @@ -370,7 +370,7 @@ void FolderStorage::removeMsg(const TQPtrList& msgList, bool imapQuie { for( TQPtrListIterator it( msgList ); *it; ++it ) { - int idx = tqfind(it.current()); + int idx = find(it.current()); assert( idx != -1); removeMsg(idx, imapQuiet); } @@ -465,7 +465,7 @@ void FolderStorage::take(TQPtrList msgList) { if (msg->tqparent()) { - int idx = msg->tqparent()->tqfind(msg); + int idx = msg->tqparent()->find(msg); if ( idx >= 0 ) take(idx); } @@ -725,11 +725,11 @@ int FolderStorage::rename(const TQString& newName, KMFolderDir *newParent) // if the folder is being moved then move its node and, if necessary, also // the associated subfolder directory node to the new tqparent if (newParent) { - if (oldParent->tqfindRef( folder() ) != -1) + if (oldParent->findRef( folder() ) != -1) oldParent->take(); newParent->inSort( folder() ); if ( child ) { - if ( child->tqparent()->tqfindRef( child ) != -1 ) + if ( child->tqparent()->findRef( child ) != -1 ) child->tqparent()->take(); newParent->inSort( child ); child->setParent( newParent ); @@ -898,7 +898,7 @@ void FolderStorage::msgStatusChanged(const KMMsgtqStatus oldtqStatus, void FolderStorage::headerOfMsgChanged(const KMMsgBase* aMsg, int idx) { if (idx < 0) - idx = aMsg->tqparent()->tqfind( aMsg ); + idx = aMsg->tqparent()->find( aMsg ); if (idx >= 0 ) { @@ -1025,7 +1025,7 @@ int FolderStorage::appendToFolderIdsFile( int idx ) void FolderStorage::replaceMsgSerNum( unsigned long sernum, KMMsgBase* msg, int idx ) { if ( !mExportsSernums ) return; - KMMsgDict::mutableInstance()->tqreplace( sernum, msg, idx ); + KMMsgDict::mutableInstance()->replace( sernum, msg, idx ); } void FolderStorage::setRDict( KMMsgDictREntry *rentry ) const diff --git a/kmail/folderstorage.h b/kmail/folderstorage.h index 9ff0b67f0..45a402820 100644 --- a/kmail/folderstorage.h +++ b/kmail/folderstorage.h @@ -229,8 +229,8 @@ public: virtual int moveMsg(TQPtrList, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ - virtual int tqfind(const KMMsgBase* msg) const = 0; - int tqfind( const KMMessage * msg ) const; + virtual int find(const KMMsgBase* msg) const = 0; + int find( const KMMessage * msg ) const; /** Number of messages in this folder. */ virtual int count(bool cache = false) const; diff --git a/kmail/foldertreebase.h b/kmail/foldertreebase.h index 710186637..b2c48c705 100644 --- a/kmail/foldertreebase.h +++ b/kmail/foldertreebase.h @@ -39,7 +39,7 @@ class FolderTreeBase : public KFolderTree /** Find index of given folder. Returns 0 if not found */ virtual TQListViewItem* indexOfFolder( const KMFolder* folder ) const { - if ( mFolderToItem.tqcontains( folder ) ) + if ( mFolderToItem.contains( folder ) ) return mFolderToItem[ folder ]; else return 0; diff --git a/kmail/folderviewtooltip.h b/kmail/folderviewtooltip.h index a60e60c6c..5846cd82d 100644 --- a/kmail/folderviewtooltip.h +++ b/kmail/folderviewtooltip.h @@ -32,7 +32,7 @@ class FolderViewToolTip : public TQToolTip item->updateCount(); TQString tipText = i18n("%1
Total: %2
Unread: %3
Size: %4" ) - .tqarg( item->folder()->prettyURL().tqreplace( " ", " " ) ) + .tqarg( item->folder()->prettyURL().replace( " ", " " ) ) .tqarg( item->totalCount() < 0 ? "-" : TQString::number( item->totalCount() ) ) .tqarg( item->unreadCount() < 0 ? "-" : TQString::number( item->unreadCount() ) ) .tqarg( KIO::convertSize( item->folderSize() ) ); diff --git a/kmail/headerlistquicksearch.cpp b/kmail/headerlistquicksearch.cpp index 67755effa..605e86f81 100644 --- a/kmail/headerlistquicksearch.cpp +++ b/kmail/headerlistquicksearch.cpp @@ -89,7 +89,7 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *tqparent, label->setBuddy( mStatusCombo ); - KToolBarButton * btn = new KToolBarButton( "mail_tqfind", 0, tqparent, + KToolBarButton * btn = new KToolBarButton( "mail_find", 0, tqparent, 0, i18n( "Open Full Search" ) ); connect( btn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( requestFullSearch() ) ); @@ -155,10 +155,10 @@ bool HeaderListQuickSearch::itemMatches(const TQListViewItem *item, const TQStri // The full email address is not visible, but we still want it to be searchable. // KListViewSearchLine::itemMatches() only searches in visible columns. const HeaderItem *headerItem = static_cast( item ); - if ( headerItem->from().lower().tqcontains( s.lower() ) ) { + if ( headerItem->from().lower().contains( s.lower() ) ) { return true; } - if ( headerItem->to().lower().tqcontains( s.lower() ) ) { + if ( headerItem->to().lower().contains( s.lower() ) ) { return true; } diff --git a/kmail/headerstrategy.cpp b/kmail/headerstrategy.cpp index 99cc4f5f0..239525d30 100644 --- a/kmail/headerstrategy.cpp +++ b/kmail/headerstrategy.cpp @@ -243,8 +243,8 @@ namespace KMail { } bool HeaderStrategy::showHeader( const TQString & header ) const { - if ( headersToDisplay().tqcontains( header.lower() ) ) return true; - if ( headersToHide().tqcontains( header.lower() ) ) return false; + if ( headersToDisplay().contains( header.lower() ) ) return true; + if ( headersToHide().contains( header.lower() ) ) return false; return defaultPolicy() == Display; } diff --git a/kmail/imapaccountbase.cpp b/kmail/imapaccountbase.cpp index d82ba5cc9..a06163799 100644 --- a/kmail/imapaccountbase.cpp +++ b/kmail/imapaccountbase.cpp @@ -669,7 +669,7 @@ namespace KMail { // split, allow empty parts as we can get empty namespaces TQStringList parts = TQStringList::split( "=", *it, true ); imapNamespace section = imapNamespace( parts[0].toInt() ); - if ( map.tqcontains( section ) ) { + if ( map.contains( section ) ) { nsDelim = map[section]; } else { nsDelim.clear(); @@ -736,12 +736,12 @@ namespace KMail { TQString msg = i18n("KMail has detected a prefix entry in the " "configuration of the account \"%1\" which is obsolete with the " "support of IMAP namespaces.").tqarg( name() ); - if ( list.tqcontains( "" ) ) { + if ( list.contains( "" ) ) { // replace empty entry with the old prefix list.remove( "" ); list += mOldPrefix; mNamespaces[PersonalNS] = list; - if ( mNamespaceToDelimiter.tqcontains( "" ) ) { + if ( mNamespaceToDelimiter.contains( "" ) ) { TQString delim = mNamespaceToDelimiter[""]; mNamespaceToDelimiter.remove( "" ); mNamespaceToDelimiter[mOldPrefix] = delim; @@ -755,7 +755,7 @@ namespace KMail { list.clear(); list += mOldPrefix; mNamespaces[PersonalNS] = list; - if ( mNamespaceToDelimiter.tqcontains( old ) ) { + if ( mNamespaceToDelimiter.contains( old ) ) { TQString delim = mNamespaceToDelimiter[old]; mNamespaceToDelimiter.remove( old ); mNamespaceToDelimiter[mOldPrefix] = delim; @@ -799,7 +799,7 @@ namespace KMail { ns = ns.left( ns.length()-1 ); } // first ignore an empty prefix as it would match always - if ( !ns.isEmpty() && path.tqfind( ns ) != -1 ) { + if ( !ns.isEmpty() && path.find( ns ) != -1 ) { return (*strit); } } @@ -812,7 +812,7 @@ namespace KMail { { //kdDebug(5006) << "delimiterForNamespace " << prefix << endl; // try to match exactly - if ( mNamespaceToDelimiter.tqcontains(prefix) ) { + if ( mNamespaceToDelimiter.contains(prefix) ) { return mNamespaceToDelimiter[prefix]; } @@ -824,13 +824,13 @@ namespace KMail { // make sure we also match this version TQString stripped = it.key().left( it.key().length() - 1 ); if ( !it.key().isEmpty() && - ( prefix.tqcontains( it.key() ) || prefix.tqcontains( stripped ) ) ) { + ( prefix.contains( it.key() ) || prefix.contains( stripped ) ) ) { return it.data(); } } // see if we have an empty namespace // this should always be the case - if ( mNamespaceToDelimiter.tqcontains( "" ) ) { + if ( mNamespaceToDelimiter.contains( "" ) ) { return mNamespaceToDelimiter[""]; } // well, we tried @@ -894,7 +894,7 @@ namespace KMail { TQString ImapAccountBase::prettifyQuotaError( const TQString& _error, KIO::Job * job ) { TQString error = _error; - if ( error.tqfind( "quota", 0, false ) == -1 ) return error; + if ( error.find( "quota", 0, false ) == -1 ) return error; // this is a quota error, prettify it a bit JobIterator it = findJob( job ); TQString quotaAsString( i18n("No detailed quota information available.") ); @@ -1025,7 +1025,7 @@ namespace KMail { //----------------------------------------------------------------------------- void ImapAccountBase::processNewMailInFolder( KMFolder* folder, FolderListType type /*= Single*/ ) { - if ( mFoldersQueuedForChecking.tqcontains( folder ) ) + if ( mFoldersQueuedForChecking.contains( folder ) ) return; mFoldersQueuedForChecking.append( folder ); mCheckingSingleFolder = ( type == Single ); @@ -1057,7 +1057,7 @@ namespace KMail { //----------------------------------------------------------------------------- bool ImapAccountBase::checkingMail( KMFolder *folder ) { - if (checkingMail() && mFoldersQueuedForChecking.tqcontains(folder)) + if (checkingMail() && mFoldersQueuedForChecking.contains(folder)) return true; return false; } diff --git a/kmail/imapaccountbase.h b/kmail/imapaccountbase.h index 4b5cda92c..c533171df 100644 --- a/kmail/imapaccountbase.h +++ b/kmail/imapaccountbase.h @@ -174,7 +174,7 @@ namespace KMail { /** * Look for the jobData related to a given job. Compare with end() */ - JobIterator findJob( KIO::Job* job ) { return mapJobData.tqfind( job ); } + JobIterator findJob( KIO::Job* job ) { return mapJobData.find( job ); } JobIterator jobsEnd() { return mapJobData.end(); } /** * Call this when a job is finished. @@ -398,7 +398,7 @@ namespace KMail { * Returns true if the account has the given capability */ bool hasCapability( const TQString& capa ) { - return mCapabilities.tqcontains( capa ); } + return mCapabilities.contains( capa ); } /** * Create an IMAP path for a tqparent folder and a foldername diff --git a/kmail/imapjob.cpp b/kmail/imapjob.cpp index be94557de..c25b29097 100644 --- a/kmail/imapjob.cpp +++ b/kmail/imapjob.cpp @@ -118,7 +118,7 @@ void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, ++it; if ( mSrcFolder && !curMsg->isMessage() ) { - int idx = mSrcFolder->tqfind( curMsg ); + int idx = mSrcFolder->find( curMsg ); curMsg = mSrcFolder->getMsg( idx ); } KURL url = account->getUrl(); @@ -130,10 +130,10 @@ void ImapJob::init( JobType jt, TQString sets, KMFolderImap* folder, curMsg->msgSizeServer() : curMsg->msgSize(); jd.msgList.append( curMsg ); TQCString cstr( curMsg->asString() ); - int a = cstr.tqfind("\nX-UID: "); - int b = cstr.tqfind('\n', a); - if (a != -1 && b != -1 && cstr.tqfind("\n\n") > a) cstr.remove(a, b-a); - jd.data.resize( cstr.length() + cstr.tqcontains( "\n" ) - cstr.tqcontains( "\r\n" ) ); + int a = cstr.find("\nX-UID: "); + int b = cstr.find('\n', a); + if (a != -1 && b != -1 && cstr.find("\n\n") > a) cstr.remove(a, b-a); + jd.data.resize( cstr.length() + cstr.contains( "\n" ) - cstr.contains( "\r\n" ) ); unsigned int i = 0; char prevChar = '\0'; // according to RFC 2060 we need CRLF @@ -290,7 +290,7 @@ void ImapJob::slotGetNextMessage() jd.msgList.append( msg ); if ( !mPartSpecifier.isEmpty() ) { - if ( mPartSpecifier.tqfind ("STRUCTURE", 0, false) != -1 ) { + if ( mPartSpecifier.find ("STRUCTURE", 0, false) != -1 ) { path += ";SECTION=STRUCTURE"; } else if ( mPartSpecifier == "HEADER" ) { path += ";SECTION=HEADER"; @@ -325,7 +325,7 @@ void ImapJob::slotGetNextMessage() KIO::Scheduler::assignJobToSlave( account->slave(), simpleJob ); mJob = simpleJob; account->insertJob( mJob, jd ); - if ( mPartSpecifier.tqfind( "STRUCTURE", 0, false ) != -1 ) + if ( mPartSpecifier.find( "STRUCTURE", 0, false ) != -1 ) { connect( mJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotGetBodyStructureResult(KIO::Job *)) ); @@ -448,7 +448,7 @@ void ImapJob::slotGetMessageResult( KIO::Job * job ) * this means that the msg is not on the server anymore so delete it */ emit messageRetrieved( 0 ); tqparent->ignoreJobsForMessage( msg ); - int idx = tqparent->tqfind( msg ); + int idx = tqparent->find( msg ); if (idx != -1) tqparent->removeMsg( idx, true ); // the removeMsg will unGet the message, which will delete all // jobs, including this one @@ -583,7 +583,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data) ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; - if (data.tqfind("UID") != -1) + if (data.find("UID") != -1) { // split TQString oldUid = data.section(' ', 1, 1); @@ -598,7 +598,7 @@ void ImapJob::slotCopyMessageInfoData(KIO::Job * job, const TQString & data) for ( msg = (*it).msgList.first(); msg; msg = (*it).msgList.next() ) { ulong uid = msg->UID(); - index = olduids.tqfindIndex(uid); + index = olduids.findIndex(uid); if (index > -1) { // found, get the new uid @@ -622,7 +622,7 @@ void ImapJob::slotPutMessageInfoData(KIO::Job *job, const TQString &data) ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; - if ( data.tqfind("UID") != -1 ) + if ( data.find("UID") != -1 ) { ulong uid = ( data.right(data.length()-4) ).toInt(); if ( !(*it).msgList.isEmpty() ) diff --git a/kmail/importjob.cpp b/kmail/importjob.cpp index a84ecf519..fc41a46ba 100644 --- a/kmail/importjob.cpp +++ b/kmail/importjob.cpp @@ -273,7 +273,7 @@ static TQString folderNameForDirectoryName( const TQString &dirName ) Q_ASSERT( dirName.startsWith( "." ) ); const TQString end = ".directory"; const int expectedIndex = dirName.length() - end.length(); - if ( dirName.lower().tqfind( end ) != expectedIndex ) + if ( dirName.lower().find( end ) != expectedIndex ) return TQString(); TQString returnName = dirName.left( dirName.length() - end.length() ); returnName = returnName.right( returnName.length() - 1 ); diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp index 2135a9e79..5d156f8ec 100644 --- a/kmail/keyresolver.cpp +++ b/kmail/keyresolver.cpp @@ -555,7 +555,7 @@ namespace { static TQString canonicalAddress( const TQString & _address ) { const TQString address = KPIM::getEmailAddress( _address ); - if ( address.tqfind('@') == -1 ) { + if ( address.find('@') == -1 ) { // local address //char hostname[1024]; //gethostname(hostname,1024); diff --git a/kmail/khtmlparthtmlwriter.cpp b/kmail/khtmlparthtmlwriter.cpp index 64f085f92..174c2c3a2 100644 --- a/kmail/khtmlparthtmlwriter.cpp +++ b/kmail/khtmlparthtmlwriter.cpp @@ -140,7 +140,7 @@ namespace KMail { DOM::HTMLImageElement image( node ); KURL url( image.src().string() ); if ( url.protocol() == "cid" ) { - EmbeddedPartMap::const_iterator it = mEmbeddedPartMap.tqfind( url.path() ); + EmbeddedPartMap::const_iterator it = mEmbeddedPartMap.find( url.path() ); if ( it != mEmbeddedPartMap.end() ) { kdDebug(5006) << "Replacing " << url.prettyURL() << " by " << it.data() << endl; image.setSrc( it.data() ); diff --git a/kmail/kmaccount.cpp b/kmail/kmaccount.cpp index 796ac382f..20105acd8 100644 --- a/kmail/kmaccount.cpp +++ b/kmail/kmaccount.cpp @@ -493,7 +493,7 @@ void KMAccount::checkDone( bool newmail, ChecktqStatus status ) //----------------------------------------------------------------------------- void KMAccount::addToNewInFolder( TQString folderId, int num ) { - if ( mNewInFolder.tqfind( folderId ) == mNewInFolder.end() ) + if ( mNewInFolder.find( folderId ) == mNewInFolder.end() ) mNewInFolder[folderId] = num; else mNewInFolder[folderId] += num; diff --git a/kmail/kmacctcachedimap.cpp b/kmail/kmacctcachedimap.cpp index 0c89e6b13..76339dd65 100644 --- a/kmail/kmacctcachedimap.cpp +++ b/kmail/kmacctcachedimap.cpp @@ -287,7 +287,7 @@ void KMAcctCachedImap::addUnreadMsgCount( const KMFolderCachedImap *folder, // therefore doesn't need to be counted here const TQString folderId = folder->folder()->idString(); int newInFolder = countUnread; - if ( mUnreadBeforeCheck.tqfind( folderId ) != mUnreadBeforeCheck.end() ) + if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; if ( newInFolder > 0 ) addToNewInFolder( folderId, newInFolder ); @@ -417,12 +417,12 @@ TQStringList KMAcctCachedImap::deletedFolderPaths( const TQString& subFolderPath bool KMAcctCachedImap::isDeletedFolder( const TQString& subFolderPath ) const { - return mDeletedFolders.tqfind( subFolderPath ) != mDeletedFolders.end(); + return mDeletedFolders.find( subFolderPath ) != mDeletedFolders.end(); } bool KMAcctCachedImap::isPreviouslyDeletedFolder( const TQString& subFolderPath ) const { - return mPreviouslyDeletedFolders.tqfind( subFolderPath ) != mPreviouslyDeletedFolders.end(); + return mPreviouslyDeletedFolders.find( subFolderPath ) != mPreviouslyDeletedFolders.end(); } void KMAcctCachedImap::removeDeletedFolder( const TQString& subFolderPath ) @@ -459,7 +459,7 @@ FolderStorage* KMAcctCachedImap::rootFolder() const TQString KMAcctCachedImap::renamedFolder( const TQString& imapPath ) const { - TQMap::ConstIterator renit = mRenamedFolders.tqfind( imapPath ); + TQMap::ConstIterator renit = mRenamedFolders.find( imapPath ); if ( renit != mRenamedFolders.end() ) return (*renit).mNewName; return TQString(); diff --git a/kmail/kmacctimap.cpp b/kmail/kmacctimap.cpp index bb09d692d..d889b65b2 100644 --- a/kmail/kmacctimap.cpp +++ b/kmail/kmacctimap.cpp @@ -402,7 +402,7 @@ void KMAcctImap::postProcessNewMail( KMFolder * folder ) // count the unread messages const TQString folderId = folder->idString(); int newInFolder = folder->countUnread(); - if ( mUnreadBeforeCheck.tqfind( folderId ) != mUnreadBeforeCheck.end() ) + if ( mUnreadBeforeCheck.find( folderId ) != mUnreadBeforeCheck.end() ) newInFolder -= mUnreadBeforeCheck[folderId]; if ( newInFolder > 0 ) { addToNewInFolder( folderId, newInFolder ); @@ -580,7 +580,7 @@ void KMAcctImap::slotFolderSelected( KMFolderImap* folder, bool ) void KMAcctImap::execFilters(TQ_UINT32 serNum) { if ( !kmkernel->filterMgr()->atLeastOneFilterAppliesTo( id() ) ) return; - TQValueListIterator findIt = mFilterSerNums.tqfind( serNum ); + TQValueListIterator findIt = mFilterSerNums.find( serNum ); if ( findIt != mFilterSerNums.end() ) return; mFilterSerNums.append( serNum ); diff --git a/kmail/kmaddrbook.cpp b/kmail/kmaddrbook.cpp index 8fdc5554c..adc888a42 100644 --- a/kmail/kmaddrbook.cpp +++ b/kmail/kmaddrbook.cpp @@ -56,18 +56,18 @@ void KabcBridge::addresses(TQStringList& result) // includes lists for ( mit = emails.begin(); mit != emails.end(); ++mit ) { email = *mit; if (!email.isEmpty()) { - if (n.isEmpty() || (email.tqfind( '<' ) != -1)) + if (n.isEmpty() || (email.find( '<' ) != -1)) addr = TQString(); else { // do we really need quotes around this name ? - if (n.tqfind(needQuotes) != -1) + if (n.find(needQuotes) != -1) addr = '"' + n + endQuote; else addr = n + ' '; } - if (!addr.isEmpty() && (email.tqfind( '<' ) == -1) - && (email.tqfind( '>' ) == -1) - && (email.tqfind( ',' ) == -1)) + if (!addr.isEmpty() && (email.find( '<' ) == -1) + && (email.find( '>' ) == -1) + && (email.find( ',' ) == -1)) addr += '<' + email + '>'; else addr += email; @@ -126,7 +126,7 @@ TQStringList KabcBridge::categories() for ( TQStringList::ConstIterator itAux = aux.begin(); itAux != aux.end(); ++itAux ) { // don't have duplicates in allcategories - if ( allcategories.tqfind( *itAux ) == allcategories.end() ) + if ( allcategories.find( *itAux ) == allcategories.end() ) allcategories += *itAux; } } diff --git a/kmail/kmail.kcfg b/kmail/kmail.kcfg index 52a30a4d8..8054b9d82 100644 --- a/kmail/kmail.kcfg +++ b/kmail/kmail.kcfg @@ -451,14 +451,14 @@ Re\\s*:,Re\\[\\d+\\]:,Re\\d+: - + true Fwd:,FW: - + true diff --git a/kmail/kmailicalifaceimpl.cpp b/kmail/kmailicalifaceimpl.cpp index bf0e5b8c3..82084b134 100644 --- a/kmail/kmailicalifaceimpl.cpp +++ b/kmail/kmailicalifaceimpl.cpp @@ -260,7 +260,7 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, KMMessagePart msgPart; msgPart.setName( attachmentName ); - const int iSlash = attachmentMimetype.tqfind('/'); + const int iSlash = attachmentMimetype.find('/'); const TQCString sType = attachmentMimetype.left( iSlash ).latin1(); const TQCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1(); msgPart.setTypeStr( sType ); @@ -309,7 +309,7 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg, // Look for the attachment with the right mimetype bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s ) { - const int iSlash = mimetype.tqfind('/'); + const int iSlash = mimetype.find('/'); const TQCString sType = mimetype.left( iSlash ).latin1(); const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); DwBodyPart* part = findBodyPartByMimeType( msg, sType, sSubtype, true /* starts with sSubtype, to accept application/x-vnd.kolab.contact.distlist */ ); @@ -325,7 +325,7 @@ bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQ // Delete an attachment in an existing mail. // return value: wrong if attachment could not be deleted // -// This code could be optimized: for now we just tqreplace +// This code could be optimized: for now we just replace // the attachment by an empty dummy attachment since Mimelib // does not provide an option for deleting attachments yet. bool KMailICalIfaceImpl::deleteAttachment( KMMessage& msg, @@ -566,7 +566,7 @@ TQMap KMailICalIfaceImpl::incidencesKolab( const TQString& KMMessage* msg = f->storage()->readTemporaryMsg(i); #endif if ( msg ) { - const int iSlash = mimetype.tqfind('/'); + const int iSlash = mimetype.find('/'); const TQCString sType = mimetype.left( iSlash ).latin1(); const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1(); if ( sType.isEmpty() || sSubtype.isEmpty() ) { @@ -616,7 +616,7 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg ) TQ_UINT32 sernum = msg->getMsgSerNum(); // do we have an accumulator for this folder? - Accumulator *ac = mAccumulators.tqfind( tqparent->location() ); + Accumulator *ac = mAccumulators.find( tqparent->location() ); if( ac ) { TQString s; if ( !vPartFoundAndDecoded( msg, s ) ) return; @@ -637,7 +637,7 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg ) slotIncidenceAdded( msg->tqparent(), msg->getMsgSerNum() ); } - if ( mTheUnGetMes.tqcontains( sernum ) ) { + if ( mTheUnGetMes.contains( sernum ) ) { mTheUnGetMes.remove( sernum ); int i = 0; KMFolder* folder = 0; @@ -666,7 +666,7 @@ int KMailICalIfaceImpl::dimapAccounts() static TQString subresourceLabelForPresentation( const KMFolder * folder ) { - if( KMailICalIfaceImpl::getResourceMap()->tqcontains( folder->location() ) ) { + if( KMailICalIfaceImpl::getResourceMap()->contains( folder->location() ) ) { return folder->label(); } @@ -1044,7 +1044,7 @@ TQStringList KMailICalIfaceImpl::listAttachments(const TQString & resource, TQ_U TQString name; DwMediaType& contentType = part->Headers().ContentType(); if ( TQString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." ) - || TQString( contentType.SubtypeStr().c_str() ).tqcontains( "tnef" ) ) + || TQString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) ) continue; if ( !part->Headers().ContentDisposition().Filename().empty() ) name = part->Headers().ContentDisposition().Filename().c_str(); @@ -1131,7 +1131,7 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder, mUIDToSerNum.insert( uid, sernum ); // tell the resource if we didn't trigger this ourselves - if ( mInTransit.tqcontains( uid ) ) { + if ( mInTransit.contains( uid ) ) { mInTransit.remove( uid ); } incidenceAdded( type, folder->location(), sernum, format, s ); @@ -1213,7 +1213,7 @@ void KMailICalIfaceImpl::slotRefreshFolder( KMFolder* folder) if( mUseResourceIMAP && folder ) { if( folder == mCalendar || folder == mContacts || folder == mNotes || folder == mTasks - || folder == mJournals || mExtraFolders.tqfind( folder->location() ) ) { + || folder == mJournals || mExtraFolders.find( folder->location() ) ) { // Refresh the folder of this type KMail::FolderContentsType ct = folder->storage()->contentsType(); slotRefresh( s_folderContentsType[ct].contentsTypeStr ); @@ -1257,7 +1257,7 @@ KMFolder* KMailICalIfaceImpl::folderFromType( const TQString& type, bool KMailICalIfaceImpl::isResourceFolder( KMFolder* folder ) const { return mUseResourceIMAP && folder && - ( isStandardResourceFolder( folder ) || mExtraFolders.tqfind( folder->location() )!=0 ); + ( isStandardResourceFolder( folder ) || mExtraFolders.find( folder->location() )!=0 ); } bool KMailICalIfaceImpl::isStandardResourceFolder( KMFolder* folder ) const @@ -1286,7 +1286,7 @@ KFolderTreeItem::Type KMailICalIfaceImpl::folderType( KMFolder* folder ) const if( mUseResourceIMAP && folder ) { if( folder == mCalendar || folder == mContacts || folder == mNotes || folder == mTasks - || folder == mJournals || mExtraFolders.tqfind( folder->location() ) ) { + || folder == mJournals || mExtraFolders.find( folder->location() ) ) { KMail::FolderContentsType ct = folder->storage()->contentsType(); return s_folderContentsType[ct].treeItemType; } @@ -1352,7 +1352,7 @@ TQString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int languag // Find message matching a given UID KMMessage *KMailICalIfaceImpl::findMessageByUID( const TQString& uid, KMFolder* folder ) { - if( !folder || !mUIDToSerNum.tqcontains( uid ) ) return 0; + if( !folder || !mUIDToSerNum.contains( uid ) ) return 0; int i; KMFolder *aFolder; KMMsgDict::instance()->getLocation( mUIDToSerNum[uid], &aFolder, &i ); @@ -1387,7 +1387,7 @@ void KMailICalIfaceImpl::deleteMsg( KMMessage *msg ) // Commands are now delayed; can't use that anymore, we need immediate deletion //( new KMDeleteMsgCommand( msg->tqparent(), msg ) )->start(); KMFolder *srcFolder = msg->tqparent(); - int idx = srcFolder->tqfind(msg); + int idx = srcFolder->find(msg); assert(idx != -1); // kill existing jobs since we are about to delete the message srcFolder->ignoreJobsForMessage( msg ); @@ -1415,7 +1415,7 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder, // Check if already know that 'extra folder' const TQString location = folder->location(); - ExtraFolder* ef = mExtraFolders.tqfind( location ); + ExtraFolder* ef = mExtraFolders.find( location ); if ( ef && ef->folder ) { // Notify that the old folder resource is no longer available subresourceDeleted(folderContentsType( folder->storage()->contentsType() ), location ); @@ -1469,7 +1469,7 @@ KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type, if ( t < 1 || t > 5 ) return 0; - ExtraFolder* ef = mExtraFolders.tqfind( folder ); + ExtraFolder* ef = mExtraFolders.find( folder ); if ( ef && ef->folder && ef->folder->storage()->contentsType() == t ) return ef->folder; @@ -1478,7 +1478,7 @@ KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type, KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( KMFolder* folder ) const { - FolderInfoMap::ConstIterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::ConstIterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) return (*it).mStorageFormat; return globalStorageFormat(); @@ -1486,7 +1486,7 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( KMFolder* f void KMailICalIfaceImpl::setStorageFormat( KMFolder* folder, StorageFormat format ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) { (*it).mStorageFormat = format; } else { @@ -1500,7 +1500,7 @@ void KMailICalIfaceImpl::setStorageFormat( KMFolder* folder, StorageFormat forma void KMailICalIfaceImpl::addFolderChange( KMFolder* folder, FolderChanges changes ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() ) { (*it).mChanges = static_cast( (*it).mChanges | changes ); } else { // Otherwise, well, it's a folder we don't care about. @@ -1529,7 +1529,7 @@ KMailICalIfaceImpl::FolderInfo KMailICalIfaceImpl::readFolderInfo( const KMFolde void KMailICalIfaceImpl::folderSynced( KMFolder* folder, const KURL& folderURL ) { - FolderInfoMap::Iterator it = mFolderInfoMap.tqfind( folder ); + FolderInfoMap::Iterator it = mFolderInfoMap.find( folder ); if ( it != mFolderInfoMap.end() && (*it).mChanges ) { handleFolderSynced( folder, folderURL, (*it).mChanges ); (*it).mChanges = NoChange; @@ -1560,7 +1560,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) { /* Steffen said: you must issue an authenticated HTTP GET request to https://kolabserver/freebusy/trigger/user@domain/Folder/NestedFolder.pfb - (tqreplace .pfb with .xpfb for extended fb lists). */ + (replace .pfb with .xpfb for extended fb lists). */ KURL httpURL( folderURL ); // Keep username ("user@domain"), pass, and host from the imap url httpURL.setProtocol( "https" ); @@ -1569,7 +1569,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL ) // IMAP path is either /INBOX/ or /user/someone/ TQString path = folderURL.path( -1 ); Q_ASSERT( path.startsWith( "/" ) ); - int secondSlash = path.tqfind( '/', 1 ); + int secondSlash = path.find( '/', 1 ); if ( secondSlash == -1 ) { kdWarning() << "KCal::ResourceKolab::fromKMailFolderSynced path is too short: " << path << endl; return; @@ -1617,7 +1617,7 @@ void KMailICalIfaceImpl::slotFolderLocationChanged( const TQString &oldLocation, const TQString &newLocation ) { KMFolder *folder = findResourceFolder( oldLocation ); - ExtraFolder* ef = mExtraFolders.tqfind( oldLocation ); + ExtraFolder* ef = mExtraFolders.find( oldLocation ); if ( ef ) { // reuse the ExtraFolder entry, but adjust the key mExtraFolders.setAutoDelete( false ); @@ -1645,7 +1645,7 @@ KMFolder* KMailICalIfaceImpl::findResourceFolder( const TQString& resource ) return mJournals; // No luck. Try the extrafolders - ExtraFolder* ef = mExtraFolders.tqfind( resource ); + ExtraFolder* ef = mExtraFolders.find( resource ); if ( ef ) return ef->folder; @@ -1713,7 +1713,7 @@ void KMailICalIfaceImpl::readConfig() // configure things again. kdDebug(5006) << "Groupware folder " << parentName << " not found. Groupware functionality disabled" << endl; // Or maybe the inbox simply wasn't created on the first startup - KMAccount* account = kmkernel->acctMgr()->tqfind( GlobalSettings::self()->theIMAPResourceAccount() ); + KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() ); Q_ASSERT( account ); if ( account ) { // just in case we were connected already @@ -1922,8 +1922,8 @@ void KMailICalIfaceImpl::readConfig() KMFolderCachedImap *imapFolder = static_cast( storage ); const TQString attributes = imapFolder->folderAttributes(); - if ( attributes.tqcontains( "X-FolderClass" ) ) { - if ( !attributes.tqcontains( "X-SpecialFolder" ) || (*it)->location().tqcontains( "@" ) ) { + if ( attributes.contains( "X-FolderClass" ) ) { + if ( !attributes.contains( "X-SpecialFolder" ) || (*it)->location().contains( "@" ) ) { const Scalix::FolderAttributeParser parser( attributes ); if ( !parser.folderClass().isEmpty() ) { FolderContentsType type = Scalix::Utils::scalixIdToContentsType( parser.folderClass() ); @@ -1964,7 +1964,7 @@ void KMailICalIfaceImpl::slotCheckDone() //kdDebug(5006) << k_funcinfo << " folderParent=" << folderParent << endl; if ( folderParent ) // cool it exists now { - KMAccount* account = kmkernel->acctMgr()->tqfind( GlobalSettings::self()->theIMAPResourceAccount() ); + KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() ); if ( account ) disconnect( account, TQT_SIGNAL( finishedCheck( bool, ChecktqStatus ) ), this, TQT_SLOT( slotCheckDone() ) ); @@ -1993,7 +1993,7 @@ KMFolder* KMailICalIfaceImpl::initFolder( KMail::FolderContentsType contentsType i18n("There are multiple %1 default folders, please choose one:") .tqarg( localizedDefaultFolderName( contentsType ) ), labels ); if ( !selected.isEmpty() ) - result.folder = result.folders[ labels.tqfindIndex( selected ) ]; + result.folder = result.folders[ labels.findIndex( selected ) ]; } KMFolder* folder = result.folder; @@ -2051,7 +2051,7 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten KMFolderCachedImap *imapFolder = static_cast( storage ); const TQString attributes = imapFolder->folderAttributes(); - if ( attributes.tqcontains( "X-SpecialFolder" ) ) { + if ( attributes.contains( "X-SpecialFolder" ) ) { const Scalix::FolderAttributeParser parser( attributes ); if ( contentsType == Scalix::Utils::scalixIdToContentsType( parser.folderClass() ) ) { folder = *it; diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index 3f83fad61..bdd700bf8 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -229,7 +229,7 @@ void KMCommand::slotStart() this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) ); kmkernel->filterMgr()->ref(); - if (mMsgList.tqfind(0) != -1) { + if (mMsgList.find(0) != -1) { emit messagesTransfered( Failed ); return; } @@ -316,7 +316,7 @@ void KMCommand::transferSelectedMsgs() else { KMFolder *folder = mb->tqparent(); - int idx = folder->tqfind(mb); + int idx = folder->find(mb); if (idx < 0) continue; thisMsg = folder->getMsg(idx); } @@ -441,7 +441,7 @@ void KMCommand::slotTransferCancelled() if (!folder) continue; msg->setTransferInProgress(false); - int idx = folder->tqfind(msg); + int idx = folder->find(msg); if (idx > 0) folder->unGetMsg(idx); } mRetrievedMsgs.clear(); @@ -682,7 +682,7 @@ KMCommand::Result KMEditMsgCommand::execute() // edit is discarded, for n > 1. KMFolder *tqparent = msg->tqparent(); if ( tqparent ) - tqparent->take( tqparent->tqfind( msg ) ); + tqparent->take( tqparent->find( msg ) ); KMail::Composer * win = KMail::makeComposer(); msg->setTransferInProgress(false); // From here on on, the composer owns the message. @@ -774,11 +774,11 @@ static KURL subjectToUrl( const TQString & subject ) // https://issues.kolab.org/issue3805 const TQString filter = i18n( "*.mbox|email messages (*.mbox)\n*|all files (*)" ); TQString cleanSubject = subject.stripWhiteSpace() - .tqreplace( TQDir::separator(), '_' ) - .tqreplace( ": ", "_" ) - .tqreplace( ':', '_' ) - .tqreplace( '.', '_' ) - .tqreplace( '~', '_' ); + .replace( TQDir::separator(), '_' ) + .replace( ": ", "_" ) + .replace( ':', '_' ) + .replace( '.', '_' ) + .replace( '~', '_' ); return KFileDialog::getSaveURL( cleanSubject, filter ); } @@ -945,7 +945,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg) ++mMsgListIndex; // Get rid of the message. if ( msg && msg->tqparent() && msg->getMsgSerNum() && - mUngetMsgs.tqcontains( msg ) ) { + mUngetMsgs.contains( msg ) ) { int idx = -1; KMFolder * p = 0; KMMsgDict::instance()->getLocation( msg, &p, &idx ); @@ -1041,7 +1041,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) else { int startOfMessage = 0; if ( mMsgString.compare( 0, 5, "From ", 5 ) == 0 ) { - startOfMessage = mMsgString.tqfind( '\n' ); + startOfMessage = mMsgString.find( '\n' ); if ( startOfMessage == -1 ) { KMessageBox::sorry( parentWidget(), i18n( "The file does not contain a message." ) ); @@ -1060,7 +1060,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) } // check for multiple messages in the file bool multipleMessages = true; - int endOfMessage = mMsgString.tqfind( "\nFrom " ); + int endOfMessage = mMsgString.find( "\nFrom " ); if ( endOfMessage == -1 ) { endOfMessage = mMsgString.length(); multipleMessages = false; @@ -1403,7 +1403,7 @@ KMCommand::Result KMForwardDigestCommand::execute() dwh.MessageId().CreateDefault(); msgPartText += TQString( "Content-ID: %1\n" ).tqarg( dwh.MessageId().AsString().c_str() ); msgPartText += TQString( "Content-Description: %1" ).tqarg( msg->subject() ); - if ( !msg->subject().tqcontains( "(fwd)" ) ) + if ( !msg->subject().contains( "(fwd)" ) ) msgPartText += " (fwd)"; msgPartText += "\n\n"; // remove headers that shouldn't be forwarded @@ -1849,7 +1849,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, { while ( menu->count() ) { - TQPopupMenu *popup = menu->tqfindItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if (popup) delete popup; else @@ -1932,7 +1932,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, continue; KMFolder *child = static_cast(it); TQString label = child->label(); - label.tqreplace("&","&&"); + label.replace("&","&&"); if (child->child() && child->child()->first()) { // descend TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu"); @@ -1989,7 +1989,7 @@ KMCommand::Result KMCopyCommand::execute() { msg = static_cast(msgBase); } else { - idx = srcFolder->tqfind(msgBase); + idx = srcFolder->find(msgBase); assert(idx != -1); msg = srcFolder->getMsg(idx); // corrupt IMAP cache, see FolderStorage::getMsg() @@ -2307,7 +2307,7 @@ void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool succe void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, TQ_UINT32 serNum) { - if ( folder != mDestFolder || mLostBoys.tqfind( serNum ) == mLostBoys.end() ) { + if ( folder != mDestFolder || mLostBoys.find( serNum ) == mLostBoys.end() ) { //kdDebug(5006) << "KMMoveCommand::msgAddedToDestFolder different " // "folder or invalid serial number." << endl; return; @@ -2421,7 +2421,7 @@ KMCommand::Result KMUrlClickedCommand::execute() TQString query=mUrl.query(); while (!query.isEmpty()) { TQString queryPart; - int secondQuery = query.tqfind('?',1); + int secondQuery = query.find('?',1); if (secondQuery != -1) queryPart = query.left(secondQuery); else @@ -2572,9 +2572,9 @@ void KMSaveAttachmentsCommand::slotSaveAll() partNode *node = mAttachmentMap.begin().key(); // replace all ':' with '_' because ':' isn't allowed on FAT volumes TQString s = - node->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' ); + node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) - s = node->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' ); + s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = i18n("filename for an unnamed attachment", "attachment.1"); url = KFileDialog::getSaveURL( s, TQString(), parentWidget(), @@ -2598,9 +2598,9 @@ void KMSaveAttachmentsCommand::slotSaveAll() if ( !dirUrl.isEmpty() ) { curUrl = dirUrl; TQString s = - it.key()->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' ); + it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) - s = it.key()->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' ); + s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) { ++unnamedAtmCount; s = i18n("filename for the %1-th unnamed attachment", @@ -2619,22 +2619,22 @@ void KMSaveAttachmentsCommand::slotSaveAll() TQString origFile = curUrl.fileName(); TQString file = origFile; - while ( renameNumbering.tqcontains(file) ) { + while ( renameNumbering.contains(file) ) { file = origFile; int num = renameNumbering[file] + 1; - int dotIdx = file.tqfindRev('.'); + int dotIdx = file.findRev('.'); file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), TQString("_") + TQString::number(num) ); } curUrl.setFileName(file); // Increment the counter for both the old and the new filename - if ( !renameNumbering.tqcontains(origFile)) + if ( !renameNumbering.contains(origFile)) renameNumbering[origFile] = 1; else renameNumbering[origFile]++; if ( file != origFile ) { - if ( !renameNumbering.tqcontains(file)) + if ( !renameNumbering.contains(file)) renameNumbering[file] = 1; else renameNumbering[file]++; diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp index 328bbe021..45daa0c36 100644 --- a/kmail/kmcomposewin.cpp +++ b/kmail/kmcomposewin.cpp @@ -557,7 +557,7 @@ void KMComposeWin::addAttachmentsAndSend(const KURL::List &urls, const TQString connect(this, TQT_SIGNAL(attachmentAdded(const KURL&, bool)), TQT_SLOT(slotAttachedFile(const KURL&))); for( KURL::List::ConstIterator itr = urls.begin(); itr != urls.end(); ++itr ) { if (!addAttach( *itr )) - mAttachFilesPending.remove(mAttachFilesPending.tqfind(*itr)); // only remove one copy of the url + mAttachFilesPending.remove(mAttachFilesPending.find(*itr)); // only remove one copy of the url } if (mAttachFilesPending.isEmpty() && mAttachFilesSend == how) @@ -571,7 +571,7 @@ void KMComposeWin::slotAttachedFile(const KURL &url) { if (mAttachFilesPending.isEmpty()) return; - mAttachFilesPending.remove(mAttachFilesPending.tqfind(url)); // only remove one copy of url + mAttachFilesPending.remove(mAttachFilesPending.find(url)); // only remove one copy of url if (mAttachFilesPending.isEmpty()) { send(mAttachFilesSend); @@ -787,7 +787,7 @@ void KMComposeWin::writeConfig(void) mAutoSpellCheckingAction->isChecked() ); TQStringList transportHistory = GlobalSettings::self()->transportHistory(); transportHistory.remove(mTransport->currentText()); - if (KMTransportInfo::availableTransports().tqfindIndex(mTransport + if (KMTransportInfo::availableTransports().findIndex(mTransport ->currentText()) == -1) { transportHistory.prepend(mTransport->currentText()); } @@ -1219,8 +1219,8 @@ void KMComposeWin::getTransportMenu() int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) { - mActNowMenu->insertItem((*it).tqreplace("&", "&&"), id); - mActLaterMenu->insertItem((*it).tqreplace("&", "&&"), id); + mActNowMenu->insertItem((*it).replace("&", "&&"), id); + mActLaterMenu->insertItem((*it).replace("&", "&&"), id); } } @@ -1695,8 +1695,8 @@ static TQString cleanedUpHeaderString( const TQString & s ) { // remove invalid characters from the header strings TQString res( s ); - res.tqreplace( '\r', "" ); - res.tqreplace( '\n', " " ); + res.replace( '\r', "" ); + res.replace( '\n', " " ); return res.stripWhiteSpace(); } @@ -2773,7 +2773,7 @@ void KMComposeWin::slotAttachFile() //----------------------------------------------------------------------------- void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data) { - TQMap::Iterator it = mMapAtmLoadData.tqfind(job); + TQMap::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); TQBuffer buff((*it).data); buff.open(IO_WriteOnly | IO_Append); @@ -2785,10 +2785,10 @@ void KMComposeWin::slotAttachFileData(KIO::Job *job, const TQByteArray &data) //----------------------------------------------------------------------------- void KMComposeWin::slotAttachFileResult(KIO::Job *job) { - TQMap::Iterator it = mMapAtmLoadData.tqfind(job); + TQMap::Iterator it = mMapAtmLoadData.find(job); assert(it != mMapAtmLoadData.end()); KURL attachURL; - TQMap::iterator jit = mAttachJobs.tqfind(job); + TQMap::iterator jit = mAttachJobs.find(job); bool attachURLfound = (jit != mAttachJobs.end()); if (attachURLfound) { @@ -2847,7 +2847,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) TQString ext; if( !patterns.isEmpty() ) { ext = patterns[0]; - int i = ext.tqfindRev( '.' ); + int i = ext.findRev( '.' ); if( i == -1 ) ext.prepend( '.' ); else if( i > 0 ) @@ -2886,7 +2886,7 @@ void KMComposeWin::slotAttachFileResult(KIO::Job *job) !kmkernel->msgSender()->sendQuotedPrintable()); kdDebug(5006) << "autodetected cte: " << msgPart->cteStr() << endl; } - int slash = mimeType.tqfind( '/' ); + int slash = mimeType.find( '/' ); if( slash == -1 ) slash = mimeType.length(); msgPart->setTypeStr( mimeType.left( slash ).latin1() ); @@ -2998,7 +2998,7 @@ void KMComposeWin::slotInsertRecentFile(const KURL& u) KConfigGroupSaver saver( config, "Composer" ); TQStringList urls = config->readListEntry( "recent-urls" ); TQStringList encodings = config->readListEntry( "recent-encodings" ); - int index = urls.tqfindIndex( u.prettyURL() ); + int index = urls.findIndex( u.prettyURL() ); if (index != -1) { TQString encoding = encodings[ index ]; ld.encoding = encoding.latin1(); @@ -3725,7 +3725,7 @@ TQString KMComposeWin::addQuotesToText(const TQString &inputText) { TQString answer = TQString( inputText ); TQString indentStr = quotePrefixName(); - answer.tqreplace( '\n', '\n' + indentStr); + answer.replace( '\n', '\n' + indentStr); answer.prepend( indentStr ); answer += '\n'; return KMMessage::smartQuote( answer, GlobalSettings::self()->lineWrapWidth() ); @@ -3743,7 +3743,7 @@ TQString KMComposeWin::removeQuotesFromText(const TQString &inputText) // now remove all remaining leading quotes quotePrefix = '\n' + quotePrefixName(); rx = quotePrefix; - s.tqreplace(rx, "\n"); + s.replace(rx, "\n"); return s; } @@ -3918,7 +3918,7 @@ void KMComposeWin::slotUpdWinTitle(const TQString& text) // newlines tend to become boxes. if (text.isEmpty()) setCaption("("+i18n("unnamed")+")"); - else setCaption( s.tqreplace( TQChar('\n'), ' ' ) ); + else setCaption( s.replace( TQChar('\n'), ' ' ) ); } @@ -4605,15 +4605,15 @@ void KMComposeWin::slotCleanSpace() // Squeeze tabs and spaces TQRegExp squeeze( "[\t ]+" ); - s.tqreplace( squeeze, TQChar( ' ' ) ); + s.replace( squeeze, TQChar( ' ' ) ); // Remove trailing whitespace TQRegExp trailing( "\\s+$" ); - s.tqreplace( trailing, TQChar( '\n' ) ); + s.replace( trailing, TQChar( '\n' ) ); // Single space lines TQRegExp singleSpace( "[\n]{2,}" ); - s.tqreplace( singleSpace, TQChar( '\n' ) ); + s.replace( singleSpace, TQChar( '\n' ) ); // Restore the signature if ( restore ) @@ -4931,11 +4931,11 @@ void KMComposeWin::slotIdentityChanged( uint uoid ) } mEditor->setText( edtText ); } else { - const int pos = edtText.tqfind( mOldSigText ); + const int pos = edtText.find( mOldSigText ); if ( pos >= 0 && !mOldSigText.isEmpty() ) { const int oldLength = mOldSigText.length(); mOldSigText = "\n\n"+ ident.signature().rawText() + "\n"; // see insertSignature() - edtText = edtText.tqreplace( pos, oldLength, mOldSigText ); + edtText = edtText.replace( pos, oldLength, mOldSigText ); mEditor->setText( edtText ); } else { insertSignature( Append ); diff --git a/kmail/kmdict.cpp b/kmail/kmdict.cpp index 0ba60ed55..0ad9367be 100644 --- a/kmail/kmdict.cpp +++ b/kmail/kmdict.cpp @@ -54,7 +54,7 @@ void KMDict::clear() //----------------------------------------------------------------------------- -void KMDict::tqreplace( long key, KMDictItem *item ) +void KMDict::replace( long key, KMDictItem *item ) { insert( key, item ); removeFollowing( item, key ); // remove other items with same key @@ -104,7 +104,7 @@ void KMDict::removeFollowing(KMDictItem *item, long key) //----------------------------------------------------------------------------- -KMDictItem *KMDict::tqfind(long key) +KMDictItem *KMDict::find(long key) { int idx = (unsigned long)key % mSize; KMDictItem *item = mVecs[idx]; diff --git a/kmail/kmdict.h b/kmail/kmdict.h index 0b365acb6..6cbbefd5a 100644 --- a/kmail/kmdict.h +++ b/kmail/kmdict.h @@ -40,7 +40,7 @@ public: int size() { return mSize; } /** Inserts an item, replacing old ones with the same key. */ - void tqreplace(long key, KMDictItem *item); + void replace(long key, KMDictItem *item); /** Inserts an item without replacing ones with the same key. */ void insert(long key, KMDictItem *item); @@ -49,7 +49,7 @@ public: void remove(long key); /** Find an item by key. Returns pointer to it, or 0 if not found. */ - KMDictItem *tqfind(long key); + KMDictItem *find(long key); private: /** Removes all items _following_ @p item with key @p key. */ diff --git a/kmail/kmedit.cpp b/kmail/kmedit.cpp index dbbb53808..336901b37 100644 --- a/kmail/kmedit.cpp +++ b/kmail/kmedit.cpp @@ -122,7 +122,7 @@ void KMEdit::keyPressEvent( TQKeyEvent* e ) && newLine[leadingWhiteSpaceCount].isSpace() ) { ++leadingWhiteSpaceCount; } - newLine = newLine.tqreplace( 0, leadingWhiteSpaceCount, + newLine = newLine.replace( 0, leadingWhiteSpaceCount, lineText.left( bot ) ); removeParagraph( line ); insertParagraph( newLine, line ); @@ -383,7 +383,7 @@ KMSyntaxHighter::KMSyntaxHighter( TQTextEdit *textEdit, bool KMSyntaxHighter::isMisspelled( const TQString &word ) { - if ( mIgnoredWords.tqcontains( word ) ) { + if ( mIgnoredWords.contains( word ) ) { return false; } else { @@ -440,15 +440,15 @@ bool KMEdit::eventFilter(TQObject*o, TQEvent* e) (*mExtEditorTempFile->textStream()) << text(); mExtEditorTempFile->close(); - // tqreplace %f in the system line - sysLine.tqreplace( "%f", mExtEditorTempFile->name() ); + // replace %f in the system line + sysLine.replace( "%f", mExtEditorTempFile->name() ); mExtEditorProcess = new KProcess(); mExtEditorProcess->setUseShell( true ); sysLine += " "; while (!sysLine.isEmpty()) { - *mExtEditorProcess << sysLine.left(sysLine.tqfind(" ")).local8Bit(); - sysLine.remove(0, sysLine.tqfind(" ") + 1); + *mExtEditorProcess << sysLine.left(sysLine.find(" ")).local8Bit(); + sysLine.remove(0, sysLine.find(" ") + 1); } connect(mExtEditorProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(slotExternalEditorDone(KProcess*))); @@ -497,13 +497,13 @@ bool KMEdit::eventFilter(TQObject*o, TQEvent* e) { //Get word right clicked on const TQRegExp wordBoundary( "[\\s\\W]" ); - firstSpace = paraText.tqfindRev( wordBoundary, charPos ) + 1; - lastSpace = paraText.tqfind( wordBoundary, charPos ); + firstSpace = paraText.findRev( wordBoundary, charPos ) + 1; + lastSpace = paraText.find( wordBoundary, charPos ); if( lastSpace == -1 ) lastSpace = paraText.length(); TQString word = paraText.mid( firstSpace, lastSpace - firstSpace ); //Continue if this word was misspelled - if( !word.isEmpty() && mReplacements.tqcontains( word ) ) + if( !word.isEmpty() && mReplacements.contains( word ) ) { KPopupMenu p; diff --git a/kmail/kmfilter.cpp b/kmail/kmfilter.cpp index 2f6bbbd78..4441b8611 100644 --- a/kmail/kmfilter.cpp +++ b/kmail/kmfilter.cpp @@ -186,9 +186,9 @@ bool KMFilter::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder ) void KMFilter::setApplyOnAccount( uint id, bool aApply ) { - if (aApply && !mAccounts.tqcontains( id )) { + if (aApply && !mAccounts.contains( id )) { mAccounts.append( id ); - } else if (!aApply && mAccounts.tqcontains( id )) { + } else if (!aApply && mAccounts.contains( id )) { mAccounts.remove( id ); } } @@ -198,12 +198,12 @@ bool KMFilter::applyOnAccount( uint id ) const if ( applicability() == All ) return true; if ( applicability() == ButImap ) { - KMAccount *account = kmkernel->acctMgr()->tqfind( id ); + KMAccount *account = kmkernel->acctMgr()->find( id ); bool result = account && !dynamic_cast(account); return result; } if ( applicability() == Checked ) - return mAccounts.tqcontains( id ); + return mAccounts.contains( id ); return false; } @@ -236,9 +236,9 @@ void KMFilter::readConfig(KConfig* config) bApplyOnExplicit = true; mApplicability = ButImap; } else { - bApplyOnInbound = bool(sets.tqcontains("check-mail")); - bApplyOnOutbound = bool(sets.tqcontains("send-mail")); - bApplyOnExplicit = bool(sets.tqcontains("manual-filtering")); + bApplyOnInbound = bool(sets.contains("check-mail")); + bApplyOnOutbound = bool(sets.contains("send-mail")); + bApplyOnExplicit = bool(sets.contains("manual-filtering")); mApplicability = (AccountType)config->readNumEntry( "Applicability", ButImap ); } @@ -363,7 +363,7 @@ void KMFilter::purify() // Remove invalid accounts from mAccounts - just to be tidy TQValueListIterator it2 = mAccounts.begin(); while ( it2 != mAccounts.end() ) { - if ( !kmkernel->acctMgr()->tqfind( *it2 ) ) + if ( !kmkernel->acctMgr()->find( *it2 ) ) it2 = mAccounts.remove( it2 ); else ++it2; @@ -418,8 +418,8 @@ const TQString KMFilter::asString() const if ( mAccounts.isEmpty() ) result += " None"; else for ( it2 = mAccounts.begin() ; it2 != mAccounts.end() ; ++it2 ) - if ( kmkernel->acctMgr()->tqfind( *it2 ) ) - result += " " + kmkernel->acctMgr()->tqfind( *it2 )->name(); + if ( kmkernel->acctMgr()->find( *it2 ) ) + result += " " + kmkernel->acctMgr()->find( *it2 )->name(); result += "\n"; } if ( bStopProcessingHere ) diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp index ceef636e6..49378e9d5 100644 --- a/kmail/kmfilteraction.cpp +++ b/kmail/kmfilteraction.cpp @@ -266,7 +266,7 @@ void KMFilterActionWithStringList::applyParamWidgetValue( TQWidget* paramWidget void KMFilterActionWithStringList::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); ((TQComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 ); } @@ -277,7 +277,7 @@ void KMFilterActionWithStringList::clearParamWidget( TQWidget* paramWidget ) con void KMFilterActionWithStringList::argsFromString( const TQString argsStr ) { - int idx = mParameterList.tqfindIndex( argsStr ); + int idx = mParameterList.findIndex( argsStr ); if ( idx < 0 ) { mParameterList.append( argsStr ); idx = mParameterList.count() - 1; @@ -486,7 +486,7 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs // TQString( "%0 and %1 and %1" ).tqarg( 0 ).tqarg( 1 ) // returns "0 and 1 and %1", so we must call .arg as // many times as there are %n's, regardless of their multiplicity. - if ((*it) == -1) result.tqreplace( "%-1", tempFileName ); + if ((*it) == -1) result.replace( "%-1", tempFileName ); else result = result.tqarg( tempFileName ); } @@ -496,7 +496,7 @@ TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMs int idx = 0; while ( ( idx = header_rx.search( result, idx ) ) != -1 ) { TQString replacement = KProcess::quote( aMsg->headerField( TQString(header_rx.cap(1)).latin1() ) ); - result.tqreplace( idx, header_rx.matchedLength(), replacement ); + result.replace( idx, header_rx.matchedLength(), replacement ); idx += replacement.length(); } @@ -806,7 +806,7 @@ KMFilterActionSetqStatus::KMFilterActionSetqStatus() KMFilterAction::ReturnCode KMFilterActionSetqStatus::process(KMMessage* msg) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; KMMsgtqStatus status = stati[idx-1] ; @@ -833,7 +833,7 @@ void KMFilterActionSetqStatus::argsFromString( const TQString argsStr ) const TQString KMFilterActionSetqStatus::argsAsString() const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); KMMsgtqStatus status = stati[idx-1]; @@ -901,7 +901,7 @@ KMFilterActionFakeDisposition::KMFilterActionFakeDisposition() KMFilterAction::ReturnCode KMFilterActionFakeDisposition::process(KMMessage* msg) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return ErrorButGoOn; if ( idx == 1 ) // ignore @@ -929,7 +929,7 @@ void KMFilterActionFakeDisposition::argsFromString( const TQString argsStr ) const TQString KMFilterActionFakeDisposition::argsAsString() const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); if ( idx < 1 ) return TQString(); return TQString( TQChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) ); @@ -996,7 +996,7 @@ void KMFilterActionRemoveHeader::setParamWidgetValue( TQWidget* paramWidget ) co TQComboBox * cb = dynamic_cast(paramWidget); Q_ASSERT( cb ); - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); cb->clear(); cb->insertStringList( mParameterList ); if ( idx < 0 ) { @@ -1074,7 +1074,7 @@ TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* tqparent ) const void KMFilterActionAddHeader::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->clear(); @@ -1139,7 +1139,7 @@ void KMFilterActionAddHeader::argsFromString( const TQString argsStr ) mValue = l[1]; } - int idx = mParameterList.tqfindIndex( s ); + int idx = mParameterList.findIndex( s ); if ( idx < 0 ) { mParameterList.append( s ); idx = mParameterList.count() - 1; @@ -1196,7 +1196,7 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg) KRegExp3 rx = mRegExp; // KRegExp3::replace is not const. - TQString newValue = rx.tqreplace( msg->headerField( mParameter.latin1() ), + TQString newValue = rx.replace( msg->headerField( mParameter.latin1() ), mReplacementString ); msg->setHeaderField( mParameter.latin1(), newValue ); @@ -1224,7 +1224,7 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* tqparent ) c l->setFixedWidth( l->tqsizeHint().width() ); hbl->addWidget( l, 0 ); - TQLineEdit *le = new KLineEdit( w, "tqreplace" ); + TQLineEdit *le = new KLineEdit( w, "replace" ); hbl->addWidget( le, 1 ); setParamWidgetValue( w ); @@ -1233,7 +1233,7 @@ TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* tqparent ) c void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) const { - int idx = mParameterList.tqfindIndex( mParameter ); + int idx = mParameterList.findIndex( mParameter ); TQComboBox *cb = (TQComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); @@ -1250,7 +1250,7 @@ void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) c Q_ASSERT( rele ); rele->setText( mRegExp.pattern() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->setText( mReplacementString ); } @@ -1265,7 +1265,7 @@ void KMFilterActionRewriteHeader::applyParamWidgetValue( TQWidget* paramWidget ) Q_ASSERT( rele ); mRegExp.setPattern( rele->text() ); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); mReplacementString = le->text(); } @@ -1280,7 +1280,7 @@ void KMFilterActionRewriteHeader::clearParamWidget( TQWidget* paramWidget ) cons Q_ASSERT( rele ); rele->clear(); - TQLineEdit *le = (TQLineEdit*)paramWidget->child("tqreplace"); + TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace"); Q_ASSERT( le ); le->clear(); } @@ -1312,7 +1312,7 @@ void KMFilterActionRewriteHeader::argsFromString( const TQString argsStr ) mRegExp.setPattern( l[1] ); mReplacementString = l[2]; - int idx = mParameterList.tqfindIndex( s ); + int idx = mParameterList.findIndex( s ); if ( idx < 0 ) { mParameterList.append( s ); idx = mParameterList.count() - 1; @@ -1596,7 +1596,7 @@ static const TQString forwardFilterArgsSeperator = "@$$@"; void KMFilterActionForward::argsFromString( const TQString argsStr ) { - int seperatorPos = argsStr.tqfind( forwardFilterArgsSeperator ); + int seperatorPos = argsStr.find( forwardFilterArgsSeperator ); if ( seperatorPos == - 1 ) { // Old config, assume that the whole string is the addressee @@ -1745,7 +1745,7 @@ class PipeJob : public KPIM::ThreadWeaver::Job mMsg->setHeaderField( "X-KMail-Filtered", origSerNum ); if ( filterFolder && handler ) { bool oldtqStatus = handler->ignoreChanges( true ); - filterFolder->take( filterFolder->tqfind( mMsg ) ); + filterFolder->take( filterFolder->find( mMsg ) ); filterFolder->addMsg( mMsg ); handler->ignoreChanges( oldtqStatus ); } else { diff --git a/kmail/kmfiltermgr.cpp b/kmail/kmfiltermgr.cpp index b16769c58..565bbcc0f 100644 --- a/kmail/kmfiltermgr.cpp +++ b/kmail/kmfiltermgr.cpp @@ -128,10 +128,10 @@ void KMFilterMgr::endFiltering(KMMsgBase *msgBase) const KMFolder *tqparent = msgBase->tqparent(); if ( tqparent ) { if ( tqparent == MessageProperty::filterFolder( msgBase ) ) { - tqparent->take( tqparent->tqfind( msgBase ) ); + tqparent->take( tqparent->find( msgBase ) ); } else if ( ! MessageProperty::filterFolder( msgBase ) ) { - int index = tqparent->tqfind( msgBase ); + int index = tqparent->find( msgBase ); KMMessage *msg = tqparent->getMsg( index ); tqparent->take( index ); tqparent->addMsgKeepUID( msg ); diff --git a/kmail/kmfolder.cpp b/kmail/kmfolder.cpp index e8fa8a3d5..08fe43e01 100644 --- a/kmail/kmfolder.cpp +++ b/kmail/kmfolder.cpp @@ -432,14 +432,14 @@ int KMFolder::moveMsg(TQPtrList q, int* index_return ) return mStorage->moveMsg( q, index_return ); } -int KMFolder::tqfind( const KMMsgBase* msg ) const +int KMFolder::find( const KMMsgBase* msg ) const { - return mStorage ? mStorage->tqfind( msg ) : -1; + return mStorage ? mStorage->find( msg ) : -1; } -int KMFolder::tqfind( const KMMessage* msg ) const +int KMFolder::find( const KMMessage* msg ) const { - return mStorage ? mStorage->tqfind( msg ) : -1; + return mStorage ? mStorage->find( msg ) : -1; } int KMFolder::count( bool cache ) const @@ -717,8 +717,8 @@ TQString KMFolder::idString() const TQString escapedName = name(); /* Escape [ and ] as they are disallowed for kconfig sections and that is what the idString is primarily used for. */ - escapedName.tqreplace( "[", "%(" ); - escapedName.tqreplace( "]", "%)" ); + escapedName.replace( "[", "%(" ); + escapedName.replace( "]", "%)" ); return relativePath + escapedName; } @@ -901,7 +901,7 @@ bool KMFolder::isValidName( const TQString &folderName, TQString &message ) KMFolderType fldType = folderType(); // names of local folders must not contain a '/' - if ( folderName.tqfind( '/' ) != -1 && + if ( folderName.find( '/' ) != -1 && fldType != KMFolderTypeImap && fldType != KMFolderTypeCachedImap ) { message = i18n( "Folder names cannot contain the / (slash) character; please choose another folder name." ); @@ -928,7 +928,7 @@ bool KMFolder::isValidName( const TQString &folderName, TQString &message ) delimiter = ai->delimiterForFolder( mStorage ); } } - if ( !delimiter.isEmpty() && folderName.tqfind( delimiter ) != -1 ) { + if ( !delimiter.isEmpty() && folderName.find( delimiter ) != -1 ) { message = i18n( "Your IMAP server does not allow the character '%1'; please choose another folder name." ).tqarg( delimiter ); return false; } diff --git a/kmail/kmfolder.h b/kmail/kmfolder.h index 83a4a7a2f..67e77665e 100644 --- a/kmail/kmfolder.h +++ b/kmail/kmfolder.h @@ -260,8 +260,8 @@ public: int moveMsg(TQPtrList, int* index_return = 0); /** Returns the index of the given message or -1 if not found. */ - int tqfind(const KMMsgBase* msg) const; - int tqfind( const KMMessage * msg ) const; + int find(const KMMsgBase* msg) const; + int find( const KMMessage * msg ) const; /** Number of messages in this folder. */ int count(bool cache = false) const; diff --git a/kmail/kmfoldercachedimap.cpp b/kmail/kmfoldercachedimap.cpp index de9f4e007..d23a6ea5c 100644 --- a/kmail/kmfoldercachedimap.cpp +++ b/kmail/kmfoldercachedimap.cpp @@ -549,7 +549,7 @@ int KMFolderCachedImap::addMsgInternal( KMMessage* msg, bool newMail, if ( imapPath() == "/INBOX/" ) filter = true; } else { - if ( GlobalSettings::filterSourceFolders().tqcontains( folder()->id() ) ) + if ( GlobalSettings::filterSourceFolders().contains( folder()->id() ) ) filter = true; } if ( filter ) @@ -674,7 +674,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) mapReloaded = true; } - TQMap::Iterator it = uidMap.tqfind( uid ); + TQMap::Iterator it = uidMap.find( uid ); if( it != uidMap.end() ) { KMMsgBase *msg = getMsgBase( *it ); #if MAIL_LOSS_DEBUGGING @@ -701,7 +701,7 @@ KMMsgBase* KMFolderCachedImap::findByUID( ulong uid ) return 0; // There could be a problem in the maps. Rebuild them and try again reloadUidMap(); - it = uidMap.tqfind( uid ); + it = uidMap.find( uid ); if( it != uidMap.end() ) // Since the uid map is just rebuilt, no need for the sanity check return getMsgBase( *it ); @@ -1394,11 +1394,11 @@ void KMFolderCachedImap::buildSubFolderList() while( node ) { if( !node->isDir() ) { KMFolderCachedImap* storage = static_cast(static_cast(node)->storage()); - const bool folderIsNew = mNewlyCreatedSubfolders.tqcontains( TQGuardedPtr( storage ) ); + const bool folderIsNew = mNewlyCreatedSubfolders.contains( TQGuardedPtr( storage ) ); // Only sync folders that have been accepted by the server if ( !storage->imapPath().isEmpty() // and that were not just deleted from it - && !foldersForDeletionOnServer.tqcontains( storage->imapPath() ) ) { + && !foldersForDeletionOnServer.contains( storage->imapPath() ) ) { if ( mRecurse || folderIsNew ) { mSubfoldersForSync << storage; } @@ -1691,7 +1691,7 @@ bool KMFolderCachedImap::deleteMessages() TQMap::const_iterator it = uidMap.constBegin(); for( ; it != uidMap.end(); it++ ) { ulong uid ( it.key() ); - if( uid!=0 && !uidsOnServer.tqfind( uid ) ) { + if( uid!=0 && !uidsOnServer.find( uid ) ) { uids << TQString::number( uid ); msgsForDeletion.append( getMsgBase( *it ) ); } @@ -1832,28 +1832,28 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & return; } (*it).cdata += TQCString(data, data.size() + 1); - int pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST"); + int pos = (*it).cdata.find("\r\n--IMAPDIGEST"); if (pos > 0) { - int a = (*it).cdata.tqfind("\r\nX-uidValidity:"); + int a = (*it).cdata.find("\r\nX-uidValidity:"); if (a != -1) { - int b = (*it).cdata.tqfind("\r\n", a + 17); + int b = (*it).cdata.find("\r\n", a + 17); setUidValidity((*it).cdata.mid(a + 17, b - a - 17)); } - a = (*it).cdata.tqfind("\r\nX-Access:"); + a = (*it).cdata.find("\r\nX-Access:"); // Only trust X-Access (i.e. the imap select info) if we don't know mUserRights. // The latter is more accurate (checked on every sync) whereas X-Access is only // updated when selecting the folder again, which might not happen if using // RMB / Check Mail in this folder. We don't need two (potentially conflicting) // sources for the readonly setting, in any case. if (a != -1 && mUserRightsState != KMail::ACLJobs::Ok ) { - int b = (*it).cdata.tqfind("\r\n", a + 12); + int b = (*it).cdata.find("\r\n", a + 12); const TQString access = (*it).cdata.mid(a + 12, b - a - 12); setReadOnly( access == "Read only" ); } (*it).cdata.remove(0, pos); mFoundAnIMAPDigest = true; } - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); // Start with something largish when rebuilding the cache if ( uidsOnServer.size() == 0 ) uidsOnServer.resize( KMail::nextPrime( 2000 ) ); @@ -1869,16 +1869,16 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & // The below is optimized for speed, not prettiness. The commented out chunk // above was the solution copied from kmfolderimap, and it's 15-20% slower. const TQCString& entry( (*it).cdata ); - const int indexOfUID = entry.tqfind("X-UID", 16); + const int indexOfUID = entry.find("X-UID", 16); const int startOfUIDValue = indexOfUID + 7; - const int indexOfLength = entry.tqfind("X-Length", startOfUIDValue ); // we know length comes after UID + const int indexOfLength = entry.find("X-Length", startOfUIDValue ); // we know length comes after UID const int startOfLengthValue = indexOfLength + 10; - const int indexOfFlags = entry.tqfind("X-Flags", startOfLengthValue ); // we know flags comes last + const int indexOfFlags = entry.find("X-Flags", startOfLengthValue ); // we know flags comes last const int startOfFlagsValue = indexOfFlags + 9; - const int flags = entry.mid( startOfFlagsValue, entry.tqfind( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); - const ulong size = entry.mid( startOfLengthValue, entry.tqfind( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); - const ulong uid = entry.mid( startOfUIDValue, entry.tqfind( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); + const int flags = entry.mid( startOfFlagsValue, entry.find( '\r', startOfFlagsValue ) - startOfFlagsValue ).toInt(); + const ulong size = entry.mid( startOfLengthValue, entry.find( '\r', startOfLengthValue ) - startOfLengthValue ).toULong(); + const ulong uid = entry.mid( startOfUIDValue, entry.find( '\r', startOfUIDValue ) - startOfUIDValue ).toULong(); const bool deleted = ( flags & 8 ); if ( !deleted ) { @@ -1907,7 +1907,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & kdDebug(5006) << "Looking at uid " << uid << " high water is: " << lastUid() << " we should delete it" << endl; #endif // double check we deleted it since the last sync - if ( mDeletedUIDsSinceLastSync.tqcontains(uid) ) { + if ( mDeletedUIDsSinceLastSync.contains(uid) ) { if ( mUserRightsState != KMail::ACLJobs::Ok || ( mUserRights & KMail::ACLJobs::Delete ) ) { #if MAIL_LOSS_DEBUGGING kdDebug(5006) << "message with uid " << uid << " is gone from local cache. Must be deleted on server!!!" << endl; @@ -1942,7 +1942,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & #endif // The message is new since the last sync, but we might have just uploaded it, in which case // the uid map already contains it. - if ( !uidMap.tqcontains( uid ) ) { + if ( !uidMap.contains( uid ) ) { mMsgsForDownload << KMail::CachedImapJob::MsgForDownload(uid, flags, size); if( imapPath() == "/INBOX/" ) mUidsForDownload << uid; @@ -1958,7 +1958,7 @@ void KMFolderCachedImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & } (*it).cdata.remove(0, pos); (*it).done++; - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); } } @@ -2184,7 +2184,7 @@ void KMFolderCachedImap::slotListResult( const TQStringList& folderNames, if (!node->isDir() ) { KMFolderCachedImap *f = static_cast(static_cast(node)->storage()); - if ( mSubfolderNames.tqfindIndex(node->name()) == -1 ) { + if ( mSubfolderNames.findIndex(node->name()) == -1 ) { TQString name = node->name(); // as more than one namespace can be listed in the root folder we need to make sure // that the folder is within the current namespace @@ -2207,7 +2207,7 @@ void KMFolderCachedImap::slotListResult( const TQStringList& folderNames, /** * Store the folder attributes for every subfolder. */ - int index = mSubfolderNames.tqfindIndex( node->name() ); + int index = mSubfolderNames.findIndex( node->name() ); f->mFolderAttributes = folderAttributes[ index ]; } } else { @@ -2669,7 +2669,7 @@ void KMFolderCachedImap::updateAnnotationFolderType() { TQString oldType = mAnnotationFolderType; TQString oldSubType; - int dot = oldType.tqfind( '.' ); + int dot = oldType.find( '.' ); if ( dot != -1 ) { oldType.truncate( dot ); oldSubType = mAnnotationFolderType.mid( dot + 1 ); @@ -2728,7 +2728,7 @@ void KMFolderCachedImap::slotAnnotationResult(const TQString& entry, const TQStr if ( found ) { TQString type = value; TQString subtype; - int dot = value.tqfind( '.' ); + int dot = value.find( '.' ); if ( dot != -1 ) { type.truncate( dot ); subtype = value.mid( dot + 1 ); @@ -2852,11 +2852,11 @@ void KMFolderCachedImap::slotMultiUrlGetAnnotationResult( KIO::Job* job ) kdDebug(5006) << k_funcinfo << "Folder: " << folderPath << " has type: " << annotation << endl; // we're only interested in the main type TQString type(annotation); - int dot = annotation.tqfind( '.' ); + int dot = annotation.find( '.' ); if ( dot != -1 ) type.truncate( dot ); type = type.simplifyWhiteSpace(); - const int idx = mSubfolderPaths.tqfindIndex( folderPath ); + const int idx = mSubfolderPaths.findIndex( folderPath ); const bool isNoContent = mSubfolderMimeTypes[idx] == "inode/directory"; if ( ( isNoContent && type.isEmpty() ) || ( !type.isEmpty() && type != KMailICalIfaceImpl::annotationForContentsType( ContentsTypeMail ) ) ) { diff --git a/kmail/kmfoldercombobox.cpp b/kmail/kmfoldercombobox.cpp index e85144f0a..1135b25b7 100644 --- a/kmail/kmfoldercombobox.cpp +++ b/kmail/kmfoldercombobox.cpp @@ -114,9 +114,9 @@ void KMFolderComboBox::setFolder( KMFolder *aFolder ) TQValueList > folders; createFolderList( &names, &folders ); - int idx = folders.tqfindIndex( aFolder ); + int idx = folders.findIndex( aFolder ); if (idx == -1) - idx = folders.tqfindIndex( kmkernel->draftsFolder() ); + idx = folders.findIndex( kmkernel->draftsFolder() ); setCurrentItem( idx >= 0 ? idx : 0 ); mFolder = aFolder; diff --git a/kmail/kmfolderdir.cpp b/kmail/kmfolderdir.cpp index 32eb58343..1fd5dcd56 100644 --- a/kmail/kmfolderdir.cpp +++ b/kmail/kmfolderdir.cpp @@ -320,8 +320,8 @@ bool KMFolderDir::reload(void) // .foo.directory => foo TQString folderName = *it; - int right = folderName.tqfind( ".directory" ); - int left = folderName.tqfind( "." ); + int right = folderName.find( ".directory" ); + int left = folderName.find( "." ); Q_ASSERT( left != -1 && right != -1 ); folderName = folderName.mid( left + 1, right - 1 ); diff --git a/kmail/kmfolderimap.cpp b/kmail/kmfolderimap.cpp index 303b7b01f..21fb82d14 100644 --- a/kmail/kmfolderimap.cpp +++ b/kmail/kmfolderimap.cpp @@ -302,7 +302,7 @@ void KMFolderImap::removeMsg( const TQPtrList& msgList, bool quiet ) KMMessage *msg; while ( (msg = it.current()) != 0 ) { ++it; - int idx = tqfind(msg); + int idx = find(msg); assert( idx != -1); // ATTENTION port me to maildir KMFolderMbox::removeMsg(idx, quiet); @@ -327,7 +327,7 @@ void KMFolderImap::addMsgQuiet(KMMessage* aMsg) if (aFolder) { serNum = aMsg->getMsgSerNum(); kmkernel->undoStack()->pushSingleAction( serNum, aFolder, folder() ); - int idx = aFolder->tqfind( aMsg ); + int idx = aFolder->find( aMsg ); assert( idx != -1 ); aFolder->take( idx ); } @@ -412,7 +412,7 @@ int KMFolderImap::addMsg(TQPtrList& msgList, TQValueList& aIndex { if (!msg->isComplete()) { - int idx = msgParent->tqfind(msg); + int idx = msgParent->find(msg); assert(idx != -1); msg = msgParent->getMsg(idx); } @@ -544,8 +544,8 @@ void KMFolderImap::copyMsg(TQPtrList& msgList) TQPtrList KMFolderImap::splitMessageList(const TQString& set, TQPtrList& msgList) { - int lastcomma = set.tqfindRev(","); - int lastdub = set.tqfindRev(":"); + int lastcomma = set.findRev(","); + int lastdub = set.findRev(":"); int last = 0; if (lastdub > lastcomma) last = lastdub; else last = lastcomma; @@ -946,7 +946,7 @@ void KMFolderImap::checkFolders( const TQStringList& subfolderNames, KMFolderNode *node = folder()->child()->first(); while ( node ) { - if ( !node->isDir() && subfolderNames.tqfindIndex(node->name()) == -1 ) + if ( !node->isDir() && subfolderNames.findIndex(node->name()) == -1 ) { KMFolder* fld = static_cast(node); KMFolderImap* imapFld = static_cast( fld->storage() ); @@ -1004,11 +1004,11 @@ bool KMFolderImap::mailCheckInProgress() const void KMFolderImap::setChildrenState( TQString attributes ) { // update tqchildren state - if ( attributes.tqfind( "hastqchildren", 0, false ) != -1 ) + if ( attributes.find( "hastqchildren", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasChildren ); - } else if ( attributes.tqfind( "hasnotqchildren", 0, false ) != -1 || - attributes.tqfind( "noinferiors", 0, false ) != -1 ) + } else if ( attributes.find( "hasnotqchildren", 0, false ) != -1 || + attributes.find( "noinferiors", 0, false ) != -1 ) { setHasChildren( FolderStorage::HasNoChildren ); } else @@ -1123,26 +1123,26 @@ void KMFolderImap::slotCheckValidityResult(KIO::Job * job) close("checkvalidity"); } else { TQCString cstr((*it).data.data(), (*it).data.size() + 1); - int a = cstr.tqfind("X-uidValidity: "); - int b = cstr.tqfind("\r\n", a); + int a = cstr.find("X-uidValidity: "); + int b = cstr.find("\r\n", a); TQString uidv; if ( (b - a - 15) >= 0 ) uidv = cstr.mid(a + 15, b - a - 15); - a = cstr.tqfind("X-Access: "); - b = cstr.tqfind("\r\n", a); + a = cstr.find("X-Access: "); + b = cstr.find("\r\n", a); TQString access; if ( (b - a - 10) >= 0 ) access = cstr.mid(a + 10, b - a - 10); mReadOnly = access == "Read only"; - a = cstr.tqfind("X-Count: "); - b = cstr.tqfind("\r\n", a); + a = cstr.find("X-Count: "); + b = cstr.find("\r\n", a); int exists = -1; bool ok = false; if ( (b - a - 9) >= 0 ) exists = cstr.mid(a + 9, b - a - 9).toInt(&ok); if ( !ok ) exists = -1; - a = cstr.tqfind( "X-PermanentFlags: " ); - b = cstr.tqfind( "\r\n", a ); + a = cstr.find( "X-PermanentFlags: " ); + b = cstr.find( "\r\n", a ); if ( a >= 0 && (b - a - 18) >= 0 ) mPermanentFlags = cstr.mid( a + 18, b - a - 18 ).toInt(&ok); if ( !ok ) mPermanentFlags = 0; @@ -1296,7 +1296,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) mailUid = msgBase->UID(); // parse the uid from the server and the flags out of the list from // the server. Format: 1234, 1 - c = (*uid).tqfind(","); + c = (*uid).find(","); serverUid = (*uid).left( c ).toLong(); serverFlags = (*uid).mid( c+1 ).toInt(); if ( mailUid < serverUid ) { @@ -1326,7 +1326,7 @@ void KMFolderImap::slotListFolderResult(KIO::Job * job) } // strip the flags from the list of uids, so it can be reused for (uid = (*it).items.begin(); uid != (*it).items.end(); ++uid) - (*uid).truncate((*uid).tqfind(",")); + (*uid).truncate((*uid).find(",")); ImapAccountBase::jobData jd( TQString(), (*it).tqparent ); jd.total = (*it).items.count(); if (jd.total == 0) @@ -1525,23 +1525,23 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) ImapAccountBase::JobIterator it = account()->findJob(job); if ( it == account()->jobsEnd() ) return; (*it).cdata += TQCString(data, data.size() + 1); - int pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST"); + int pos = (*it).cdata.find("\r\n--IMAPDIGEST"); if ( pos == -1 ) { - // if we do not find the pattern in the complete string we will not tqfind + // if we do not find the pattern in the complete string we will not find // it in a substring. return; } if (pos > 0) { - int p = (*it).cdata.tqfind("\r\nX-uidValidity:"); + int p = (*it).cdata.find("\r\nX-uidValidity:"); if (p != -1) setUidValidity((*it).cdata - .mid(p + 17, (*it).cdata.tqfind("\r\n", p+1) - p - 17)); - int c = (*it).cdata.tqfind("\r\nX-Count:"); + .mid(p + 17, (*it).cdata.find("\r\n", p+1) - p - 17)); + int c = (*it).cdata.find("\r\nX-Count:"); if ( c != -1 ) { bool ok; int exists = (*it).cdata.mid( c+10, - (*it).cdata.tqfind("\r\n", c+1) - c-10 ).toInt(&ok); + (*it).cdata.find("\r\n", c+1) - c-10 ).toInt(&ok); if ( ok && exists < count() ) { kdDebug(5006) << "KMFolderImap::slotGetMessagesData - server has less messages (" << exists << ") then folder (" << count() << "), so reload" << endl; @@ -1558,7 +1558,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } (*it).cdata.remove(0, pos); } - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); int flags; while (pos >= 0) { @@ -1571,7 +1571,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) flags = msg->headerField("X-Flags").toInt(); ulong uid = msg->UID(); KMMsgMetaData *md = 0; - if ( mUidMetaDataMap.tqfind( uid ) ) { + if ( mUidMetaDataMap.find( uid ) ) { md = mUidMetaDataMap[uid]; } ulong serNum = 0; @@ -1601,7 +1601,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) // see if we have cached the msgIdMD5 and get the status + // serial number from there TQString id = msg->msgIdMD5(); - if ( mMetaDataMap.tqfind( id ) ) { + if ( mMetaDataMap.find( id ) ) { md = mMetaDataMap[id]; msg->setqStatus( md->status() ); if ( md->serNum() != 0 && serNum == 0 ) { @@ -1637,7 +1637,7 @@ void KMFolderImap::slotGetMessagesData(KIO::Job * job, const TQByteArray & data) } (*it).cdata.remove(0, pos); (*it).done++; - pos = (*it).cdata.tqfind("\r\n--IMAPDIGEST", 1); + pos = (*it).cdata.find("\r\n--IMAPDIGEST", 1); } // while } @@ -2395,7 +2395,7 @@ bool KMFolderImap::isMoveable() const //----------------------------------------------------------------------------- ulong KMFolderImap::serNumForUID( ulong uid ) { - if ( mUidMetaDataMap.tqfind( uid ) ) { + if ( mUidMetaDataMap.find( uid ) ) { KMMsgMetaData *md = mUidMetaDataMap[uid]; return md->serNum(); } else { @@ -2411,7 +2411,7 @@ void KMFolderImap::saveMsgMetaData( KMMessage* msg, ulong uid ) uid = msg->UID(); } ulong serNum = msg->getMsgSerNum(); - mUidMetaDataMap.tqreplace( uid, new KMMsgMetaData(msg->status(), serNum) ); + mUidMetaDataMap.replace( uid, new KMMsgMetaData(msg->status(), serNum) ); } //----------------------------------------------------------------------------- diff --git a/kmail/kmfolderindex.h b/kmail/kmfolderindex.h index e8ef5e7b6..28743c497 100644 --- a/kmail/kmfolderindex.h +++ b/kmail/kmfolderindex.h @@ -68,8 +68,8 @@ public: virtual const KMMsgBase* getMsgBase(int idx) const { return mMsgList[idx]; } virtual KMMsgBase* getMsgBase(int idx) { return mMsgList[idx]; } - virtual int tqfind(const KMMsgBase* msg) const { return mMsgList.tqfind((KMMsgBase*)msg); } - int tqfind( const KMMessage * msg ) const { return FolderStorage::tqfind( msg ); } + virtual int find(const KMMsgBase* msg) const { return mMsgList.find((KMMsgBase*)msg); } + int find( const KMMessage * msg ) const { return FolderStorage::find( msg ); } /** Registered unique serial number for the index file */ int serialIndexId() const { return mIndexId; } diff --git a/kmail/kmfoldermaildir.cpp b/kmail/kmfoldermaildir.cpp index fe19131fb..8c54e3c24 100644 --- a/kmail/kmfoldermaildir.cpp +++ b/kmail/kmfoldermaildir.cpp @@ -291,7 +291,7 @@ int KMFolderMaildir::compact( unsigned int startIndex, int nbMessages, const TQS continue; // first, make sure this isn't in the 'new' subdir - if ( entryList.tqcontains( filename ) ) + if ( entryList.contains( filename ) ) moveInternal(subdirNew + filename, subdirCur + filename, mi); // construct a valid filename. if it's already valid, then @@ -381,7 +381,7 @@ if( fileD0.open( IO_WriteOnly ) ) { if (msgParent==folder() && !kmkernel->folderIsDraftOrOutbox(folder())) return 0; - idx = msgParent->tqfind(aMsg); + idx = msgParent->find(aMsg); msgParent->getMsg( idx ); } @@ -596,7 +596,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& // actually be some other state (but not New) if (status == KMMsgStatusRead) { - if (file.tqfind(":2,") == -1) + if (file.find(":2,") == -1) status = KMMsgStatusUnread; else if (file.right(5) == ":2,RS") status |= KMMsgStatusReplied; @@ -636,7 +636,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& msgIdStr = msgIdStr.stripWhiteSpace(); if( !msgIdStr.isEmpty() ) { int rightAngle; - rightAngle = msgIdStr.tqfind( '>' ); + rightAngle = msgIdStr.find( '>' ); if( rightAngle != -1 ) msgIdStr.truncate( rightAngle + 1 ); } @@ -644,7 +644,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& replyToIdStr = replyToIdStr.stripWhiteSpace(); if( !replyToIdStr.isEmpty() ) { int rightAngle; - rightAngle = replyToIdStr.tqfind( '>' ); + rightAngle = replyToIdStr.find( '>' ); if( rightAngle != -1 ) replyToIdStr.truncate( rightAngle + 1 ); } @@ -652,7 +652,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& referencesStr = referencesStr.stripWhiteSpace(); if( !referencesStr.isEmpty() ) { int leftAngle, rightAngle; - leftAngle = referencesStr.tqfindRev( '<' ); + leftAngle = referencesStr.findRev( '<' ); if( ( leftAngle != -1 ) && ( replyToIdStr.isEmpty() || ( replyToIdStr[0] != '<' ) ) ) { // use the last reference, instead of missing In-Reply-To @@ -660,10 +660,10 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& } // find second last reference - leftAngle = referencesStr.tqfindRev( '<', leftAngle - 1 ); + leftAngle = referencesStr.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) referencesStr = referencesStr.mid( leftAngle ); - rightAngle = referencesStr.tqfindRev( '>' ); + rightAngle = referencesStr.findRev( '>' ); if( rightAngle != -1 ) referencesStr.truncate( rightAngle + 1 ); @@ -672,7 +672,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& // message In-Reply-To points to is not kept in this folder, // but e.g. in an Outbox replyToAuxIdStr = referencesStr; - rightAngle = referencesStr.tqfind( '>' ); + rightAngle = referencesStr.find( '>' ); if( rightAngle != -1 ) replyToAuxIdStr.truncate( rightAngle + 1 ); } @@ -697,7 +697,7 @@ void KMFolderMaildir::readFileHeaderIntern(const TQString& dir, const TQString& charset = ""; if ( !contentTypeStr.isEmpty() ) { - int cidx = contentTypeStr.tqfind( "charset=" ); + int cidx = contentTypeStr.find( "charset=" ); if ( cidx != -1 ) { charset = contentTypeStr.mid( cidx + 8 ); if ( !charset.isEmpty() && ( charset[0] == '"' ) ) { @@ -1046,7 +1046,7 @@ TQString KMFolderMaildir::constructValidFileName( const TQString & filename, if (!suffix_regex) suffix_regex_sd.setObject(suffix_regex, new TQRegExp(":2,?R?S?$")); - aFileName.truncate(aFileName.tqfindRev(*suffix_regex)); + aFileName.truncate(aFileName.findRev(*suffix_regex)); // only add status suffix if the message is neither new nor unread if (! ((status & KMMsgStatusNew) || (status & KMMsgStatusUnread)) ) diff --git a/kmail/kmfoldermbox.cpp b/kmail/kmfoldermbox.cpp index 75a584551..d77a8ae46 100644 --- a/kmail/kmfoldermbox.cpp +++ b/kmail/kmfoldermbox.cpp @@ -609,7 +609,7 @@ int KMFolderMbox::createIndexFromContents() msgIdStr = msgIdStr.stripWhiteSpace(); if( !msgIdStr.isEmpty() ) { int rightAngle; - rightAngle = msgIdStr.tqfind( '>' ); + rightAngle = msgIdStr.find( '>' ); if( rightAngle != -1 ) msgIdStr.truncate( rightAngle + 1 ); } @@ -617,7 +617,7 @@ int KMFolderMbox::createIndexFromContents() replyToIdStr = replyToIdStr.stripWhiteSpace(); if( !replyToIdStr.isEmpty() ) { int rightAngle; - rightAngle = replyToIdStr.tqfind( '>' ); + rightAngle = replyToIdStr.find( '>' ); if( rightAngle != -1 ) replyToIdStr.truncate( rightAngle + 1 ); } @@ -625,7 +625,7 @@ int KMFolderMbox::createIndexFromContents() referencesStr = referencesStr.stripWhiteSpace(); if( !referencesStr.isEmpty() ) { int leftAngle, rightAngle; - leftAngle = referencesStr.tqfindRev( '<' ); + leftAngle = referencesStr.findRev( '<' ); if( ( leftAngle != -1 ) && ( replyToIdStr.isEmpty() || ( replyToIdStr[0] != '<' ) ) ) { // use the last reference, instead of missing In-Reply-To @@ -633,10 +633,10 @@ int KMFolderMbox::createIndexFromContents() } // find second last reference - leftAngle = referencesStr.tqfindRev( '<', leftAngle - 1 ); + leftAngle = referencesStr.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) referencesStr = referencesStr.mid( leftAngle ); - rightAngle = referencesStr.tqfindRev( '>' ); + rightAngle = referencesStr.findRev( '>' ); if( rightAngle != -1 ) referencesStr.truncate( rightAngle + 1 ); @@ -645,7 +645,7 @@ int KMFolderMbox::createIndexFromContents() // message In-Reply-To points to is not kept in this folder, // but e.g. in an Outbox replyToAuxIdStr = referencesStr; - rightAngle = referencesStr.tqfind( '>' ); + rightAngle = referencesStr.find( '>' ); if( rightAngle != -1 ) replyToAuxIdStr.truncate( rightAngle + 1 ); } @@ -654,7 +654,7 @@ int KMFolderMbox::createIndexFromContents() charset = ""; if ( !contentTypeStr.isEmpty() ) { - int cidx = contentTypeStr.tqfind( "charset=" ); + int cidx = contentTypeStr.find( "charset=" ); if ( cidx != -1 ) { charset = contentTypeStr.mid( cidx + 8 ); if ( !charset.isEmpty() && ( charset[0] == '"' ) ) { @@ -965,7 +965,7 @@ int KMFolderMbox::addMsg( KMMessage* aMsg, int* aIndex_ret ) return 0; } - idx = msgParent->tqfind(aMsg); + idx = msgParent->find(aMsg); msgParent->getMsg( idx ); } @@ -1175,7 +1175,7 @@ int KMFolderMbox::compact( unsigned int startIndex, int nbMessages, FILE* tmpfil mtext.resize(20); fread(mtext.data(), 20, 1, mStream); if(i <= 0) { //woops we've reached the top of the file, last try.. - if ( mtext.tqcontains( "from ", false ) ) { + if ( mtext.contains( "from ", false ) ) { if (mtext.size() < (size_t)folder_offset) mtext.resize(folder_offset); if(fseek(mStream, chunk_offset, SEEK_SET) == -1 || diff --git a/kmail/kmfoldermgr.cpp b/kmail/kmfoldermgr.cpp index 383f562ac..e66e77761 100644 --- a/kmail/kmfoldermgr.cpp +++ b/kmail/kmfoldermgr.cpp @@ -219,7 +219,7 @@ KMFolder* KMFolderMgr::createFolder(const TQString& fName, bool sysFldr, //----------------------------------------------------------------------------- -KMFolder* KMFolderMgr::tqfind(const TQString& folderName, bool foldersOnly) +KMFolder* KMFolderMgr::find(const TQString& folderName, bool foldersOnly) { KMFolderNode* node; @@ -303,7 +303,7 @@ KMFolder* KMFolderMgr::findOrCreate(const TQString& aFolderName, bool sysFldr, { KMFolder* folder = 0; if ( id == 0 ) - folder = tqfind(aFolderName); + folder = find(aFolderName); else folder = findById(id); diff --git a/kmail/kmfoldermgr.h b/kmail/kmfoldermgr.h index 0565157ad..01009347a 100644 --- a/kmail/kmfoldermgr.h +++ b/kmail/kmfoldermgr.h @@ -33,13 +33,13 @@ public: /** Searches folder and returns it. Skips directories (objects of type KMFolderDir) if foldersOnly is TRUE. */ - virtual KMFolder* tqfind(const TQString& folderName, bool foldersOnly=TRUE); + virtual KMFolder* find(const TQString& folderName, bool foldersOnly=TRUE); /** Searches for a folder with the given id, recurses into directories */ virtual KMFolder* findIdString(const TQString& folderId, const uint id = 0, KMFolderDir *dir = 0); - /** Uses tqfind() to find given folder. If not found the folder is + /** Uses find() to find given folder. If not found the folder is * created. Directories are skipped. * If an id is passed this searches for it */ diff --git a/kmail/kmfoldersearch.cpp b/kmail/kmfoldersearch.cpp index e7fd1d269..d2345dce0 100644 --- a/kmail/kmfoldersearch.cpp +++ b/kmail/kmfoldersearch.cpp @@ -452,7 +452,7 @@ void KMFolderSearch::addSerNum(TQ_UINT32 serNum) << ": folder is " << aFolder << ", index is " << idx << endl; return; } - if(mFolders.tqfindIndex(aFolder) == -1) { + if(mFolders.findIndex(aFolder) == -1) { aFolder->open("foldersearch"); mFolders.append(aFolder); } @@ -698,7 +698,7 @@ KMFolderSearch::ignoreJobsForMessage( KMMessage* msg ) } -int KMFolderSearch::tqfind(const KMMsgBase* msg) const +int KMFolderSearch::find(const KMMsgBase* msg) const { int pos = 0; TQ_UINT32 serNum = msg->getMsgSerNum(); @@ -856,7 +856,7 @@ bool KMFolderSearch::readIndex() return false; } mSerNums.push_back(serNum); - if(mFolders.tqfindIndex(folder) == -1) { + if(mFolders.findIndex(folder) == -1) { if (mInvalid) //exceptional case for when folder has invalid ids return false; folder->open("foldersearch"); @@ -910,7 +910,7 @@ KMMsgInfo* KMFolderSearch::setIndexEntry(int idx, KMMessage *msg) { assert(idx >= 0 && idx < (int)mSerNums.count()); Q_UNUSED( idx ); - return msg->storage()->setIndexEntry(msg->tqparent()->tqfind(msg), msg); + return msg->storage()->setIndexEntry(msg->tqparent()->find(msg), msg); } void KMFolderSearch::clearIndex(bool, bool) @@ -954,9 +954,9 @@ void KMFolderSearch::examineAddedMessage(KMFolder *aFolder, TQ_UINT32 serNum) KMFolderOpener openFolder(folder, "foldersearch"); // if we are already checking this folder, refcount - if ( mFoldersCurrentlyBeingSearched.tqcontains( folder ) ) { + if ( mFoldersCurrentlyBeingSearched.contains( folder ) ) { unsigned int count = mFoldersCurrentlyBeingSearched[folder]; - mFoldersCurrentlyBeingSearched.tqreplace( folder, count+1 ); + mFoldersCurrentlyBeingSearched.replace( folder, count+1 ); } else { connect( folder->storage(), TQT_SIGNAL( searchDone( KMFolder*, TQ_UINT32, const KMSearchPattern*, bool ) ), @@ -978,7 +978,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, << " matches?" << matches << endl; KMFolderOpener openFolder(folder, "foldersearch"); - Q_ASSERT( mFoldersCurrentlyBeingSearched.tqcontains( folder ) ); + Q_ASSERT( mFoldersCurrentlyBeingSearched.contains( folder ) ); unsigned int count = mFoldersCurrentlyBeingSearched[folder]; if ( count == 1 ) { @@ -990,7 +990,7 @@ void KMFolderSearch::slotSearchExamineMsgDone( KMFolder* folder, const KMSearchPattern*, bool ) ) ); mFoldersCurrentlyBeingSearched.remove( folder ); } else { - mFoldersCurrentlyBeingSearched.tqreplace( folder, count-1 ); + mFoldersCurrentlyBeingSearched.replace( folder, count-1 ); } if ( !matches ) { @@ -1115,9 +1115,9 @@ void KMFolderSearch::propagateHeaderChanged(KMFolder *aFolder, int idx) KMFolderOpener openAFolder(aFolder, "foldersearch"); // if we are already checking this folder, refcount - if ( mFoldersCurrentlyBeingSearched.tqcontains( aFolder ) ) { + if ( mFoldersCurrentlyBeingSearched.contains( aFolder ) ) { unsigned int count = mFoldersCurrentlyBeingSearched[aFolder]; - mFoldersCurrentlyBeingSearched.tqreplace( aFolder, count+1 ); + mFoldersCurrentlyBeingSearched.replace( aFolder, count+1 ); } else { connect( aFolder->storage(), TQT_SIGNAL( searchDone( KMFolder*, TQ_UINT32, const KMSearchPattern*, bool ) ), diff --git a/kmail/kmfoldersearch.h b/kmail/kmfoldersearch.h index 88e34994f..728eb6842 100644 --- a/kmail/kmfoldersearch.h +++ b/kmail/kmfoldersearch.h @@ -181,7 +181,7 @@ public: virtual bool isReadOnly() const; virtual const KMMsgBase* getMsgBase(int idx) const; virtual KMMsgBase* getMsgBase(int idx); - virtual int tqfind(const KMMsgBase* msg) const; + virtual int find(const KMMsgBase* msg) const; virtual TQString indexLocation() const; virtual int writeIndex( bool createEmptyIndex = false ); DwString getDwString(int idx); diff --git a/kmail/kmfoldertree.cpp b/kmail/kmfoldertree.cpp index 32f6e3c44..6a280856f 100644 --- a/kmail/kmfoldertree.cpp +++ b/kmail/kmfoldertree.cpp @@ -136,7 +136,7 @@ TQPixmap KMFolderTreeItem::normalIcon(int size) const } // non-root search folders if ( protocol() == KMFolderTreeItem::Search ) { - icon = "mail_tqfind"; + icon = "mail_find"; } if ( mFolder && mFolder->noContent() ) { icon = "folder_grey"; @@ -1392,7 +1392,7 @@ void KMFolderTree::cleanupConfigFile() { if ((*grpIt).left(7) != "Folder-") continue; name = (*grpIt).mid(7); - if (folderMap.tqfind(name) == folderMap.end()) + if (folderMap.find(name) == folderMap.end()) { KMFolder* folder = kmkernel->findFolderById( name ); if ( folder ) { @@ -1634,8 +1634,8 @@ void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, else fldName = oldFldName; - fldName.tqreplace("/", ""); - fldName.tqreplace(TQRegExp("^\\."), ""); + fldName.replace("/", ""); + fldName.replace(TQRegExp("^\\."), ""); if (fldName.isEmpty()) fldName = i18n("unnamed"); @@ -1648,7 +1648,7 @@ void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, void KMFolderTree::slotUpdateCountsDelayed(KMFolder * folder) { // kdDebug(5006) << "KMFolderTree::slotUpdateCountsDelayed()" << endl; - if ( !mFolderToUpdateCount.tqcontains( folder->idString() ) ) + if ( !mFolderToUpdateCount.contains( folder->idString() ) ) { // kdDebug( 5006 )<< "adding " << folder->idString() << " to updateCountList " << endl; mFolderToUpdateCount.insert( folder->idString(),folder ); @@ -1851,7 +1851,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, { while ( menu->count() ) { - TQPopupMenu *popup = menu->tqfindItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if ( popup ) delete popup; else @@ -1897,7 +1897,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, continue; } TQString label = fti->text( 0 ); - label.tqreplace( "&","&&" ); + label.replace( "&","&&" ); if ( fti->firstChild() ) { // new level @@ -1985,7 +1985,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList > source if ( source ) sourceFolderName = source->label(); - if ( tqparent->hasNamedFolder( sourceFolderName ) || sourceFolderNames.tqcontains( sourceFolderName ) ) { + if ( tqparent->hasNamedFolder( sourceFolderName ) || sourceFolderNames.contains( sourceFolderName ) ) { KMessageBox::error( this, i18n("Cannot move or copy folder %1 here because a folder with the same name already exists.") .tqarg( sourceFolderName ) ); setDragEnabled( true ); @@ -2016,7 +2016,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList > source while ( folderDir && ( folderDir != &kmkernel->folderMgr()->dir() ) && ( folderDir != source->tqparent() ) ) { - if ( folderDir->tqfindRef( source ) != -1 ) + if ( folderDir->findRef( source ) != -1 ) { KMessageBox::error( this, message ); setDragEnabled( true ); @@ -2027,7 +2027,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList > source } if( source && source->child() && tqparent && - ( tqparent->path().tqfind( source->child()->path() + "/" ) == 0 ) ) { + ( tqparent->path().find( source->child()->path() + "/" ) == 0 ) ) { KMessageBox::error( this, message ); setDragEnabled( true ); return; @@ -2051,7 +2051,7 @@ void KMFolderTree::moveOrCopyFolder( TQValueList > source continue; KMFolderDir *childDir = (*it2)->tqparent(); do { - if ( parentDir == childDir || parentDir->tqfindRef( childDir->owner() ) != -1 ) { + if ( parentDir == childDir || parentDir->findRef( childDir->owner() ) != -1 ) { KMessageBox::error( this, i18n("Moving the selected folders is not possible") ); setDragEnabled( true ); return; @@ -2118,7 +2118,7 @@ void KMFolderTree::cutFolder() void KMFolderTree::pasteFolder() { KMFolderTreeItem *item = static_cast( currentItem() ); - if ( !mCopySourceFolders.isEmpty() && item && !mCopySourceFolders.tqcontains( item->folder() ) ) { + if ( !mCopySourceFolders.isEmpty() && item && !mCopySourceFolders.contains( item->folder() ) ) { moveOrCopyFolder( mCopySourceFolders, item->folder(), mCutFolder ); if ( mCutFolder ) mCopySourceFolders.clear(); diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp index f8e8fff8f..d8c30d074 100644 --- a/kmail/kmheaders.cpp +++ b/kmail/kmheaders.cpp @@ -952,7 +952,7 @@ void KMHeaders::msgAdded(int id) mItems[id] = hi; if ( !msgId.isEmpty() ) - mSortCacheItems.tqreplace(msgId, sci); + mSortCacheItems.replace(msgId, sci); /* Add to the list of potential parents for subject threading. But only if * we are top level. */ if (mSubjThreading && tqparent) { @@ -962,7 +962,7 @@ void KMHeaders::msgAdded(int id) subjMD5 = mFolder->getMsgBase(id)->strippedSubjectMD5(); } if( !subjMD5.isEmpty()) { - if ( !mSubjectLists.tqfind(subjMD5) ) + if ( !mSubjectLists.find(subjMD5) ) mSubjectLists.insert(subjMD5, new TQPtrList()); // insertion sort by date. See buildThreadTrees for details. int p=0; @@ -1006,7 +1006,7 @@ void KMHeaders::msgAdded(int id) if (msgId != otherMsg->replyToAuxIdMD5()) continue; else { - if (!otherId.isEmpty() && mSortCacheItems.tqfind(otherId)) + if (!otherId.isEmpty() && mSortCacheItems.find(otherId)) continue; else // Thread below us by aux id, but keep on the list of @@ -1163,11 +1163,11 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) } if ((!tqparent || sci->isImperfectlyThreaded()) - && !mImperfectlyThreadedList.tqcontainsRef(item)) + && !mImperfectlyThreadedList.containsRef(item)) mImperfectlyThreadedList.append(item); if (tqparent && !sci->isImperfectlyThreaded() - && mImperfectlyThreadedList.tqcontainsRef(item)) + && mImperfectlyThreadedList.containsRef(item)) mImperfectlyThreadedList.removeRef(item); } } @@ -1178,7 +1178,7 @@ void KMHeaders::msgRemoved(int id, TQString msgId ) mImperfectlyThreadedList.removeRef( removedItem ); #ifdef DEBUG // This should never happen, in this case the folders are inconsistent. - while ( mImperfectlyThreadedList.tqfindRef( removedItem ) != -1 ) { + while ( mImperfectlyThreadedList.findRef( removedItem ) != -1 ) { mImperfectlyThreadedList.remove(); kdDebug(5006) << "Remove doubled item from mImperfectlyThreadedList: " << removedItem << endl; } @@ -1268,7 +1268,7 @@ void KMHeaders::setThreadtqStatus(KMMsgtqStatus status, bool toggle) TQListViewItem *top = item; while ( top->tqparent() ) top = top->tqparent(); - if (!topOfThreads.tqcontains(top)) { + if (!topOfThreads.contains(top)) { topOfThreads.append(top); } } @@ -2950,7 +2950,7 @@ void KMHeaders::buildThreadingTree( TQMemArray sortCache ) KMMsgBase *mi = mFolder->getMsgBase(x); TQString md5 = mi->msgIdMD5(); if(!md5.isEmpty()) - mSortCacheItems.tqreplace(md5, sortCache[x]); + mSortCacheItems.replace(md5, sortCache[x]); } } @@ -2974,7 +2974,7 @@ void KMHeaders::buildSubjectThreadingTree( TQMemArray sortCache /* For each subject, keep a list of items with that subject * (stripped of prefixes) sorted by date. */ - if (!mSubjectLists.tqfind(subjMD5)) + if (!mSubjectLists.find(subjMD5)) mSubjectLists.insert(subjMD5, new TQPtrList()); /* Insertion sort by date. These lists are expected to be very small. * Also, since the messages are roughly ordered by date in the store, @@ -3596,7 +3596,7 @@ void KMHeaders::setCopiedMessages(const TQValueList< TQ_UINT32 > & msgs, bool mo bool KMHeaders::isMessageCut(TQ_UINT32 serNum) const { - return mMoveMessages && mCopiedMessages.tqcontains( serNum ); + return mMoveMessages && mCopiedMessages.contains( serNum ); } TQValueList< TQ_UINT32 > KMHeaders::selectedSernums() diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp index 931d15ea7..7a05280e9 100644 --- a/kmail/kmkernel.cpp +++ b/kmail/kmkernel.cpp @@ -425,7 +425,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc, for ( QCStringList::ConstIterator it = customHeaders.begin() ; it != customHeaders.end() ; ++it ) if ( !(*it).isEmpty() ) { - const int pos = (*it).tqfind( ':' ); + const int pos = (*it).find( ':' ); if ( pos > 0 ) { TQCString header, value; @@ -606,7 +606,7 @@ int KMKernel::openComposer (const TQString &to, const TQString &cc, void KMKernel::setDefaultTransport( const TQString & transport ) { TQStringList availTransports = KMail::TransportManager::transportNames(); - TQStringList::const_iterator it = availTransports.tqfind( transport ); + TQStringList::const_iterator it = availTransports.find( transport ); if ( it == availTransports.end() ) { kdWarning() << "The transport you entered is not available" << endl; return; @@ -814,7 +814,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, int retval; bool readFolderMsgIds = false; TQString _foldername = foldername.stripWhiteSpace(); - _foldername = _foldername.tqreplace('\\',""); //try to prevent ESCAPE Sequences + _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { mAddMessageMsgIds.clear(); @@ -840,7 +840,7 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, msg->fromString( messageText ); if (readFolderMsgIds) { - if ( foldername.tqcontains("/")) { + if ( foldername.contains("/")) { TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; @@ -937,8 +937,8 @@ int KMKernel::dcopAddMessage( const TQString & foldername,const KURL & msgUrl, msgId += msg->dateStr(); } - int k = mAddMessageMsgIds.tqfindIndex( msgId ); - //fprintf(stderr,"tqfind %s = %d\n",(const char *) msgId,k); + int k = mAddMessageMsgIds.findIndex( msgId ); + //fprintf(stderr,"find %s = %d\n",(const char *) msgId,k); if ( k == -1 ) { if ( !msgId.isEmpty() ) { @@ -1000,7 +1000,7 @@ int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, bool createNewFolder = false; TQString _foldername = foldername.stripWhiteSpace(); - _foldername = _foldername.tqreplace('\\',""); //try to prevent ESCAPE Sequences + _foldername = _foldername.replace('\\',""); //try to prevent ESCAPE Sequences if ( foldername != mAddMessageLastFolder ) { createNewFolder = true; @@ -1018,7 +1018,7 @@ int KMKernel::dcopAddMessage_fastImport( const TQString & foldername, msg->fromString( messageText ); if (createNewFolder) { - if ( foldername.tqcontains("/")) { + if ( foldername.contains("/")) { TQString tmp_fname = ""; KMFolder *folder = NULL; KMFolderDir *subfolder; @@ -1528,7 +1528,7 @@ void KMKernel::init() recreateCorruptIndexFiles(); the_searchFolderMgr = new KMFolderMgr(locateLocal("data","kmail/search"), KMSearchDir); - KMFolder *lsf = the_searchFolderMgr->tqfind( i18n("Last Search") ); + KMFolder *lsf = the_searchFolderMgr->find( i18n("Last Search") ); if (lsf) the_searchFolderMgr->remove( lsf ); @@ -1597,7 +1597,7 @@ void KMKernel::init() bool KMKernel::isCodecAsciiCompatible( const TQTextCodec *codec ) { - return !mNonAsciiCompatibleCodecs.tqcontains( codec ); + return !mNonAsciiCompatibleCodecs.contains( codec ); } void KMKernel::readConfig() @@ -1613,7 +1613,7 @@ void KMKernel::cleanupImapFolders() KMFolderNode *node = the_imapFolderMgr->dir().first(); while (node) { - if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id())) + if (node->isDir() || ((acct = the_acctMgr->find(node->id())) && ( acct->type() == "imap" )) ) { node = the_imapFolderMgr->dir().next(); @@ -1629,7 +1629,7 @@ void KMKernel::cleanupImapFolders() node = the_dimapFolderMgr->dir().first(); while (node) { - if (node->isDir() || ((acct = the_acctMgr->tqfind(node->id())) + if (node->isDir() || ((acct = the_acctMgr->find(node->id())) && ( acct->type() == "cachedimap" )) ) { node = the_dimapFolderMgr->dir().next(); @@ -1665,7 +1665,7 @@ void KMKernel::cleanupImapFolders() if (acct->type() != "cachedimap" ) continue; - KMFolder* fld = the_dimapFolderMgr->tqfind(TQString::number(acct->id())); + KMFolder* fld = the_dimapFolderMgr->find(TQString::number(acct->id())); if( fld ) cfld = static_cast( fld->storage() ); if (cfld == 0) { @@ -2016,7 +2016,7 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data) { // send the data in 64 KB chunks const int MAX_CHUNK_SIZE = 64*1024; - TQMap::Iterator it = mPutJobs.tqfind(job); + TQMap::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); int remainingBytes = (*it).data.size() - (*it).offset; if( remainingBytes > MAX_CHUNK_SIZE ) @@ -2039,7 +2039,7 @@ void KMKernel::slotDataReq(KIO::Job *job, TQByteArray &data) void KMKernel::slotResult(KIO::Job *job) { - TQMap::Iterator it = mPutJobs.tqfind(job); + TQMap::Iterator it = mPutJobs.find(job); assert(it != mPutJobs.end()); if (job->error()) { @@ -2108,7 +2108,7 @@ bool KMKernel::haveSystemTrayApplet() bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet ) { - if ( systemTrayApplets.tqfindIndex( applet ) == -1 ) { + if ( systemTrayApplets.findIndex( applet ) == -1 ) { systemTrayApplets.append( applet ); return true; } @@ -2119,7 +2119,7 @@ bool KMKernel::registerSystemTrayApplet( const KSystemTray* applet ) bool KMKernel::unregisterSystemTrayApplet( const KSystemTray* applet ) { TQValueList::iterator it = - systemTrayApplets.tqfind( applet ); + systemTrayApplets.find( applet ); if ( it != systemTrayApplets.end() ) { systemTrayApplets.remove( it ); return true; diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp index fd41d4a89..a32c61c99 100644 --- a/kmail/kmmainwidget.cpp +++ b/kmail/kmmainwidget.cpp @@ -939,7 +939,7 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, for ( TQStringList::const_iterator it = keys.begin(); it != keys.end(); ++it ) { - kdDebug(5006) << newInFolder.tqfind( *it ).data() << " new message(s) in " + kdDebug(5006) << newInFolder.find( *it ).data() << " new message(s) in " << *it << endl; KMFolder *folder = kmkernel->findFolderById( *it ); @@ -949,7 +949,7 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, if ( GlobalSettings::self()->verboseNewMailNotification() ) { summary += "
" + i18n( "1 new message in %1", "%n new messages in %1", - newInFolder.tqfind( *it ).data() ) + newInFolder.find( *it ).data() ) .tqarg( folder->prettyURL() ); } } @@ -1028,7 +1028,7 @@ void KMMainWidget::slotShowNewFromTemplate() TQString subj = mb->subject(); if ( subj.isEmpty() ) subj = i18n("No Subject"); mTemplateMenu->popupMenu()->insertItem( - KStringHandler::rsqueeze( subj.tqreplace( "&", "&&" ) ), idx ); + KStringHandler::rsqueeze( subj.replace( "&", "&&" ) ), idx ); } } @@ -2165,7 +2165,7 @@ void KMMainWidget::slotSelectFolder(KMFolder* folder) //----------------------------------------------------------------------------- void KMMainWidget::slotSelectMessage(KMMessage* msg) { - int idx = mFolder->tqfind(msg); + int idx = mFolder->find(msg); if (idx != -1) { mHeaders->setCurrentMsg(idx); if (mMsgView) @@ -2189,9 +2189,9 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() { TQString msgId( oldMsg->msgId() ); TQString prefix("DecryptedMsg."); - int oldIdx = msgId.tqfind(prefix, 0, false); + int oldIdx = msgId.find(prefix, 0, false); if( -1 == oldIdx ) { - int leftAngle = msgId.tqfindRev( '<' ); + int leftAngle = msgId.findRev( '<' ); msgId = msgId.insert( (-1 == leftAngle) ? 0 : ++leftAngle, prefix ); } else { @@ -2210,12 +2210,12 @@ void KMMainWidget::slotReplaceMsgByUnencryptedVersion() kdDebug(5006) << "KMMainWidget - adding unencrypted message to folder" << endl; mFolder->addMsg( newMsg ); /* Figure out its index in the folder for selecting. This must be count()-1, - * since we append. Be safe and do tqfind, though, just in case. */ - int newMsgIdx = mFolder->tqfind( newMsg ); + * since we append. Be safe and do find, though, just in case. */ + int newMsgIdx = mFolder->find( newMsg ); Q_ASSERT( newMsgIdx != -1 ); /* we need this unget, to have the message displayed correctly initially */ mFolder->unGetMsg( newMsgIdx ); - int idx = mFolder->tqfind( oldMsg ); + int idx = mFolder->find( oldMsg ); Q_ASSERT( idx != -1 ); /* only select here, so the old one is not un-Gotten before, which would * render the pointer we hold invalid so that find would fail */ @@ -2468,7 +2468,7 @@ void KMMainWidget::getAccountMenu() TQStringList::Iterator it; int id = 0; for(it = actList.begin(); it != actList.end() ; ++it, id++) - mActMenu->insertItem((*it).tqreplace("&", "&&"), id); + mActMenu->insertItem((*it).replace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2481,7 +2481,7 @@ void KMMainWidget::getTransportMenu() TQStringList::Iterator it; int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) - mSendMenu->insertItem((*it).tqreplace("&", "&&"), id); + mSendMenu->insertItem((*it).replace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2545,7 +2545,7 @@ void KMMainWidget::updateCustomTemplateMenus() KAction *action; switch ( t.type() ) { case CustomTemplates::TReply: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2557,7 +2557,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyc; break; case CustomTemplates::TReplyAll: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2569,7 +2569,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyallc; break; case CustomTemplates::TForward: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2581,7 +2581,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++forwardc; break; case CustomTemplates::TUniversal: - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2591,7 +2591,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyc; - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2601,7 +2601,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyAllActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyallc; - action = new KAction( (*it).tqreplace( "&", "&&" ), + action = new KAction( (*it).replace( "&", "&&" ), KShortcut::null(), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2767,10 +2767,10 @@ void KMMainWidget::setupActions() TQT_SLOT(slotDeleteThread()), actionCollection(), "delete_thread" ); - (void) new KAction( i18n("&Find Messages..."), "mail_tqfind", Key_S, TQT_TQOBJECT(this), + (void) new KAction( i18n("&Find Messages..."), "mail_find", Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotRequestFullSearchFromQuickSearch()), actionCollection(), "search_messages" ); - mFindInMessageAction = new KAction( i18n("&Find in Message..."), "tqfind", KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(this), + mFindInMessageAction = new KAction( i18n("&Find in Message..."), "find", KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(this), TQT_SLOT(slotFind()), actionCollection(), "find_in_messages" ); (void) new KAction( i18n("Select &All Messages"), KStdAccel::selectAll(), TQT_TQOBJECT(this), @@ -3608,7 +3608,7 @@ void KMMainWidget::removeDuplicates() if ( !id.isEmpty() ) { TQString subjMD5 = (*mFolder)[i]->strippedSubjectMD5(); int other = -1; - if ( idMD5s.tqcontains(id) ) + if ( idMD5s.contains(id) ) other = idMD5s[id].first(); else idMD5s[id].append( i ); @@ -3713,7 +3713,7 @@ void KMMainWidget::initializeFilterActions() for ( ;it != kmkernel->filterMgr()->filters().constEnd(); ++it ) { if (!(*it)->isEmpty() && (*it)->configureShortcut()) { filterName = TQString("Filter %1").tqarg((*it)->name()); - normalizedName = filterName.tqreplace(" ", "_"); + normalizedName = filterName.replace(" ", "_"); if (action(normalizedName.utf8())) continue; filterCommand = new KMMetaFilterActionCommand(*it, mHeaders, this); @@ -3803,7 +3803,7 @@ void KMMainWidget::slotShortcutChanged( KMFolder *folder ) TQString actionlabel = TQString( "FolderShortcut %1").tqarg( folder->prettyURL() ); TQString actionname = TQString( "FolderShortcut %1").tqarg( folder->idString() ); - TQString normalizedName = actionname.tqreplace(" ", "_"); + TQString normalizedName = actionname.replace(" ", "_"); KAction* action = new KAction(actionlabel, folder->shortcut(), c, TQT_SLOT(start()), actionCollection(), normalizedName.local8Bit()); diff --git a/kmail/kmmainwin.cpp b/kmail/kmmainwin.cpp index c2cb135ec..8e14e984a 100644 --- a/kmail/kmmainwin.cpp +++ b/kmail/kmmainwin.cpp @@ -122,9 +122,9 @@ void KMMainWin::displayStatusMsg(const TQString& aText) // ### FIXME: We should disable richtext/HTML (to avoid possible denial of service attacks), // but this code would double the size of the satus bar if the user hovers // over an -style email address :-( -// text.tqreplace("&", "&"); -// text.tqreplace("<", "<"); -// text.tqreplace(">", ">"); +// text.replace("&", "&"); +// text.replace("<", "<"); +// text.replace(">", ">"); statusBar()->changeItem(text, mMessageStatusId); } diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp index c083638d3..d4ef0ec49 100644 --- a/kmail/kmmessage.cpp +++ b/kmail/kmmessage.cpp @@ -246,10 +246,10 @@ bool KMMessage::transferInProgress() const void KMMessage::setTransferInProgress(bool value, bool force) { MessageProperty::setTransferInProgress( getMsgSerNum(), value, force ); - if ( !transferInProgress() && sPendingDeletes.tqcontains( this ) ) { + if ( !transferInProgress() && sPendingDeletes.contains( this ) ) { sPendingDeletes.remove( this ); if ( tqparent() ) { - int idx = tqparent()->tqfind( this ); + int idx = tqparent()->find( this ); if ( idx > 0 ) { tqparent()->removeMsg( idx ); } @@ -260,7 +260,7 @@ void KMMessage::setTransferInProgress(bool value, bool force) bool KMMessage::isUrgent() const { - return headerField( "Priority" ).tqcontains( "urgent", false ) + return headerField( "Priority" ).contains( "urgent", false ) || headerField( "X-Priority" ).startsWith( "2" ); } @@ -641,9 +641,9 @@ static bool flushPart(TQString &msg, TQStringList &part, static TQString stripSignature( const TQString & msg, bool clearSigned ) { if ( clearSigned ) - return msg.left( msg.tqfindRev( TQRegExp( "\n--\\s?\n" ) ) ); + return msg.left( msg.findRev( TQRegExp( "\n--\\s?\n" ) ) ); else - return msg.left( msg.tqfindRev( "\n-- \n" ) ); + return msg.left( msg.findRev( "\n-- \n" ) ); } TQString KMMessage::smartQuote( const TQString & msg, int maxLineLength ) @@ -845,14 +845,14 @@ TQString KMMessage::asQuotedString( const TQString& aHeaderStr, asPlainText( aStripSignature, allowDecryption ) : selection ; // Remove blank lines at the beginning: - const int firstNonWS = content.tqfind( TQRegExp( "\\S" ) ); - const int lineStart = content.tqfindRev( '\n', firstNonWS ); + const int firstNonWS = content.find( TQRegExp( "\\S" ) ); + const int lineStart = content.findRev( '\n', firstNonWS ); if ( lineStart >= 0 ) content.remove( 0, static_cast( lineStart ) ); const TQString indentStr = formatString( aIndentStr ); - content.tqreplace( '\n', '\n' + indentStr ); + content.replace( '\n', '\n' + indentStr ); content.prepend( indentStr ); content += '\n'; @@ -887,7 +887,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy, !tqparent()->mailingListPostAddress().isEmpty() ) { mailingListAddresses << tqparent()->mailingListPostAddress(); } - if ( headerField("List-Post").tqfind( "mailto:", 0, false ) != -1 ) { + if ( headerField("List-Post").find( "mailto:", 0, false ) != -1 ) { TQString listPost = headerField("List-Post"); TQRegExp rx( "]+)@([^>]+)>", false ); if ( rx.search( listPost, 0 ) != -1 ) // matched @@ -1108,14 +1108,14 @@ TQCString KMMessage::getRefStr() const if (refStr.isEmpty()) return headerField("Message-Id").latin1(); - i = refStr.tqfind('<'); - j = refStr.tqfind('>'); + i = refStr.find('<'); + j = refStr.find('>'); firstRef = refStr.mid(i, j-i+1); if (!firstRef.isEmpty()) retRefStr = firstRef + ' '; - i = refStr.tqfindRev('<'); - j = refStr.tqfindRev('>'); + i = refStr.findRev('<'); + j = refStr.findRev('>'); lastRef = refStr.mid(i, j-i+1); if (!lastRef.isEmpty() && lastRef != firstRef) @@ -1215,8 +1215,8 @@ void KMMessage::sanitizeHeaders( const TQStringList& whiteList ) while (field) { nextField = field->Next(); - if ( field->FieldNameStr().tqfind( "ontent" ) == DwString::npos - && !whiteList.tqcontains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) ) + if ( field->FieldNameStr().find( "ontent" ) == DwString::npos + && !whiteList.contains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) ) header.RemoveField(field); field = nextField; } @@ -1245,7 +1245,7 @@ KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString() */ ) TQStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding(); for ( TQStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) { TQString entry = (*it); - int sep = entry.tqfind( '/' ); + int sep = entry.find( '/' ); TQCString type = entry.left( sep ).latin1(); TQCString subtype = entry.mid( sep+1 ).latin1(); kdDebug( 5006 ) << "Looking for blacklisted type: " << type << "/" << subtype << endl; @@ -1442,7 +1442,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, // an MDN with any disposition type other than "failed" in response // to the request. TQString notificationOptions = headerField("Disposition-Notification-Options"); - if ( notificationOptions.tqcontains( "required", false ) ) { + if ( notificationOptions.contains( "required", false ) ) { // ### hacky; should parse... // There is a required option that we don't understand. We need to // ask the user what we should do: @@ -1476,7 +1476,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, TQString returnPath = returnPathList.isEmpty() ? TQString() : returnPathList.front().localPart + '@' + returnPathList.front().domain ; kdDebug(5006) << "clean return path: " << returnPath << endl; - if ( returnPath.isEmpty() || !receiptTo.tqcontains( returnPath, false ) ) { + if ( returnPath.isEmpty() || !receiptTo.contains( returnPath, false ) ) { if ( !allowGUI ) return 0; // don't setMDNSentState here! mode = requestAdviceOnMDN( returnPath.isEmpty() ? "mdnReturnPathEmpty" : @@ -1618,13 +1618,13 @@ TQString KMMessage::replaceHeadersInString( const TQString & s ) const { int idx = 0; if( ( idx = rxDate.search( result, idx ) ) != -1 ) { - result.tqreplace( idx, rxDate.matchedLength(), sDate ); + result.replace( idx, rxDate.matchedLength(), sDate ); } idx = 0; while ( ( idx = rx.search( result, idx ) ) != -1 ) { TQString replacement = headerField( TQString(rx.cap(1)).latin1() ); - result.tqreplace( idx, rx.matchedLength(), replacement ); + result.replace( idx, rx.matchedLength(), replacement ); idx += replacement.length(); } return result; @@ -2081,11 +2081,11 @@ TQString KMMessage::replyToId() const replyTo = headerField("In-Reply-To"); // search the end of the (first) message id in the In-Reply-To header - rightAngle = replyTo.tqfind( '>' ); + rightAngle = replyTo.find( '>' ); if (rightAngle != -1) replyTo.truncate( rightAngle + 1 ); // now search the start of the message id - leftAngle = replyTo.tqfindRev( '<' ); + leftAngle = replyTo.findRev( '<' ); if (leftAngle != -1) replyTo = replyTo.mid( leftAngle ); @@ -2094,14 +2094,14 @@ TQString KMMessage::replyToId() const // misconfigured Mutt. They look like this <"from foo"@bar.baz>, i.e. // they contain double quotes and spaces. We only check for '"'. if (!replyTo.isEmpty() && (replyTo[0] == '<') && - ( -1 == replyTo.tqfind( '"' ) ) ) + ( -1 == replyTo.find( '"' ) ) ) return replyTo; references = headerField("References"); - leftAngle = references.tqfindRev( '<' ); + leftAngle = references.findRev( '<' ); if (leftAngle != -1) references = references.mid( leftAngle ); - rightAngle = references.tqfind( '>' ); + rightAngle = references.find( '>' ); if (rightAngle != -1) references.truncate( rightAngle + 1 ); @@ -2126,11 +2126,11 @@ TQString KMMessage::references() const TQString references = headerField( "References" ); // keep the last two entries for threading - leftAngle = references.tqfindRev( '<' ); - leftAngle = references.tqfindRev( '<', leftAngle - 1 ); + leftAngle = references.findRev( '<' ); + leftAngle = references.findRev( '<', leftAngle - 1 ); if( leftAngle != -1 ) references = references.mid( leftAngle ); - rightAngle = references.tqfindRev( '>' ); + rightAngle = references.findRev( '>' ); if( rightAngle != -1 ) references.truncate( rightAngle + 1 ); @@ -2146,7 +2146,7 @@ TQString KMMessage::replyToAuxIdMD5() const TQString result = references(); // references contains two items, use the first one // (the second to last reference) - const int rightAngle = result.tqfind( '>' ); + const int rightAngle = result.find( '>' ); if( rightAngle != -1 ) result.truncate( rightAngle + 1 ); @@ -2182,11 +2182,11 @@ TQString KMMessage::msgId() const TQString msgId = headerField("Message-Id"); // search the end of the message id - const int rightAngle = msgId.tqfind( '>' ); + const int rightAngle = msgId.find( '>' ); if (rightAngle != -1) msgId.truncate( rightAngle + 1 ); // now search the start of the message id - const int leftAngle = msgId.tqfindRev( '<' ); + const int leftAngle = msgId.findRev( '<' ); if (leftAngle != -1) msgId = msgId.mid( leftAngle ); return msgId; @@ -3197,8 +3197,8 @@ bool KMMessage::deleteBodyPart( int partIndex ) dummyPart.setContentDescription( comment ); dummyPart.setBodyEncodedBinary( TQByteArray() ); TQCString cd = dummyPart.contentDisposition(); - if ( cd.tqfind( "inline", 0, false ) == 0 ) { - cd.tqreplace( 0, 10, "attachment" ); + if ( cd.find( "inline", 0, false ) == 0 ) { + cd.replace( 0, 10, "attachment" ); dummyPart.setContentDisposition( cd ); } else if ( cd.isEmpty() ) { dummyPart.setContentDisposition( "attachment" ); @@ -3251,14 +3251,14 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) int iL, i1, i2, iM; iL = additionalParam.length(); i1 = 0; - i2 = additionalParam.tqfind(';', i1, false); + i2 = additionalParam.find(';', i1, false); while ( i1 < iL ) { if( -1 == i2 ) i2 = iL; if( i1+1 < i2 ) { parAV = additionalParam.mid( i1, (i2-i1) ); - iM = parAV.tqfind('='); + iM = parAV.find('='); if( -1 < iM ) { parA = parAV.left( iM ).data(); @@ -3281,7 +3281,7 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart) ct.AddParameter( param ); } i1 = i2+1; - i2 = additionalParam.tqfind(';', i1, false); + i2 = additionalParam.find(';', i1, false); } } @@ -3975,7 +3975,7 @@ TQString KMMessage::expandAliases( const TQString& recipients ) // check whether the address is missing the domain part // FIXME: looking for '@' might be wrong - if ( receiver.tqfind('@') == -1 ) { + if ( receiver.find('@') == -1 ) { KConfigGroup general( KMKernel::config(), "General" ); TQString defaultdomain = general.readEntry( "Default domain" ); if( !defaultdomain.isEmpty() ) { @@ -4014,8 +4014,8 @@ TQString KMMessage::guessEmailAddressFromLoginName( const TQString& loginName ) const KUser user( loginName ); if ( user.isValid() ) { TQString fullName = user.fullName(); - if ( fullName.tqfind( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) - address = '"' + fullName.tqreplace( '\\', "\\" ).tqreplace( '"', "\\" ) + if ( fullName.find( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 ) + address = '"' + fullName.replace( '\\', "\\" ).replace( '"', "\\" ) + "\" <" + address + '>'; else address = fullName + " <" + address + '>'; diff --git a/kmail/kmmessage.h b/kmail/kmmessage.h index 32e79e2ad..e15732b95 100644 --- a/kmail/kmmessage.h +++ b/kmail/kmmessage.h @@ -713,7 +713,7 @@ public: bool removeLineBreaks = false ); /** Converts the email address(es) to (a) nice HTML mailto: anchor(s). - * If stripped is TRUE then the visible part of the anchor tqcontains + * If stripped is TRUE then the visible part of the anchor contains * only the name part and not the given emailAddr. */ static TQString emailAddrAsAnchor(const TQString& emailAddr, diff --git a/kmail/kmmsgbase.cpp b/kmail/kmmsgbase.cpp index eb8ed59e0..e69dcdfb0 100644 --- a/kmail/kmmsgbase.cpp +++ b/kmail/kmmsgbase.cpp @@ -142,7 +142,7 @@ void KMMsgBase::toggletqStatus(const KMMsgtqStatus atqStatus, int idx) } if (storage()) { if (idx < 0) - idx = storage()->tqfind( this ); + idx = storage()->find( this ); storage()->msgStatusChanged( oldtqStatus, status(), idx ); storage()->headerOfMsgChanged(this, idx); } @@ -258,7 +258,7 @@ void KMMsgBase::setqStatus(const KMMsgtqStatus atqStatus, int idx) if ( oldtqStatus != mtqStatus && storage() ) { if (idx < 0) - idx = storage()->tqfind( this ); + idx = storage()->find( this ); storage()->msgStatusChanged( oldtqStatus, status(), idx ); storage()->headerOfMsgChanged( this, idx ); } @@ -608,7 +608,7 @@ TQStringList KMMsgBase::supportedEncodings(bool usAscii) { TQTextCodec *codec = KGlobal::charsets()->codecForName(*it); TQString mimeName = (codec) ? TQString(codec->mimeName()).lower() : (*it); - if (mimeNames.tqfind(mimeName) == mimeNames.end()) + if (mimeNames.find(mimeName) == mimeNames.end()) { encodings.append(KGlobal::charsets()->languageForEncoding(*it) + " ( " + mimeName + " )"); @@ -665,7 +665,7 @@ TQString KMMsgBase::decodeRFC2047String(const TQCString& aStr, TQCString prefCha if ( str.isEmpty() ) return TQString(); - if ( str.tqfind( "=?" ) < 0 ) { + if ( str.find( "=?" ) < 0 ) { if ( !prefCharset.isEmpty() && kmkernel->isCodecAsciiCompatible( KMMsgBase::codecForName( prefCharset ) ) ) { if ( prefCharset == "us-ascii" ) { @@ -813,7 +813,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, start = pos; p = pos; while (p < strLength) { - if (!breakLine && (_str.tqat(p) == ' ' || dontQuote.tqfind(_str.tqat(p)) != -1)) + if (!breakLine && (_str.tqat(p) == ' ' || dontQuote.find(_str.tqat(p)) != -1)) start = p + 1; if (_str.tqat(p).tqunicode() >= 128 || _str.tqat(p).tqunicode() < 32) break; @@ -821,9 +821,9 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, } if (breakLine || p < strLength) { - while (dontQuote.tqfind(_str.tqat(start)) != -1) start++; + while (dontQuote.find(_str.tqat(start)) != -1) start++; stop = start; - while (stop < strLength && dontQuote.tqfind(_str.tqat(stop)) == -1) + while (stop < strLength && dontQuote.find(_str.tqat(stop)) == -1) stop++; result += _str.mid(pos, start - pos).latin1(); encLength = encodeRFC2047Quoted(codec->fromUnicode(_str. @@ -849,7 +849,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, if (result.right(5) == "?=\n ") { start--; result.truncate(result.length() - 1); } - int lastNewLine = result.tqfindRev("\n "); + int lastNewLine = result.findRev("\n "); if (!result.mid(lastNewLine).stripWhiteSpace().isEmpty() && result.length() - lastNewLine + encLength + 2 > maxLen) result += "\n "; @@ -946,12 +946,12 @@ TQCString KMMsgBase::encodeRFC2231StringAutoDetectCharset( const TQString &str, //----------------------------------------------------------------------------- TQString KMMsgBase::decodeRFC2231String(const TQCString& _str) { - int p = _str.tqfind('\''); + int p = _str.find('\''); if (p < 0) return kmkernel->networkCodec()->toUnicode(_str); TQCString charset = _str.left(p); - TQCString st = _str.mid(_str.tqfindRev('\'') + 1); + TQCString st = _str.mid(_str.findRev('\'') + 1); char ch, ch2; p = 0; while (p < (int)st.length()) @@ -996,10 +996,10 @@ TQCString KMMsgBase::extractRFC2231HeaderField( const TQCString &aStr, const TQC // Quoted values end at the ending quote if ( aStr[startPart] == '"' ) { startPart++; // the double quote isn't part of the filename - endPart = aStr.tqfind('"', startPart) - 1; + endPart = aStr.find('"', startPart) - 1; } else { - endPart = aStr.tqfind(';', startPart) - 1; + endPart = aStr.find(';', startPart) - 1; } if (endPart < 0) endPart = 32767; @@ -1081,7 +1081,7 @@ unsigned long KMMsgBase::getMsgSerNum() const if (msn) return msn; if (mParent) { - int index = mParent->tqfind((KMMsgBase*)this); + int index = mParent->find((KMMsgBase*)this); msn = KMMsgDict::instance()->getMsgSerNum(mParent, index); if (msn) MessageProperty::setSerialCache( this, msn ); @@ -1450,11 +1450,11 @@ void KMMsgBase::readConfig() sReplySubjPrefixes = composerGroup.readListEntry("reply-prefixes", ','); if (sReplySubjPrefixes.isEmpty()) sReplySubjPrefixes << "Re\\s*:" << "Re\\[\\d+\\]:" << "Re\\d+:"; - sReplaceSubjPrefix = composerGroup.readBoolEntry("tqreplace-reply-prefix", true); + sReplaceSubjPrefix = composerGroup.readBoolEntry("replace-reply-prefix", true); sForwardSubjPrefixes = composerGroup.readListEntry("forward-prefixes", ','); if (sForwardSubjPrefixes.isEmpty()) sForwardSubjPrefixes << "Fwd:" << "FW:"; - sReplaceForwSubjPrefix = composerGroup.readBoolEntry("tqreplace-forward-prefix", true); + sReplaceForwSubjPrefix = composerGroup.readBoolEntry("replace-forward-prefix", true); } //----------------------------------------------------------------------------- @@ -1469,7 +1469,7 @@ TQString KMMsgBase::stripOffPrefixes( const TQString& str ) // static TQString KMMsgBase::replacePrefixes( const TQString& str, const TQStringList& prefixRegExps, - bool tqreplace, + bool replace, const TQString& newPrefix ) { bool recognized = false; @@ -1489,8 +1489,8 @@ TQString KMMsgBase::replacePrefixes( const TQString& str, TQString tmp = str; if ( rx.search( tmp ) == 0 ) { recognized = true; - if ( tqreplace ) - return tmp.tqreplace( 0, rx.matchedLength(), newPrefix + ' ' ); + if ( replace ) + return tmp.replace( 0, rx.matchedLength(), newPrefix + ' ' ); } } if ( !recognized ) @@ -1508,10 +1508,10 @@ TQString KMMsgBase::cleanSubject() const //----------------------------------------------------------------------------- TQString KMMsgBase::cleanSubject( const TQStringList & prefixRegExps, - bool tqreplace, + bool replace, const TQString & newPrefix ) const { - return KMMsgBase::replacePrefixes( subject(), prefixRegExps, tqreplace, + return KMMsgBase::replacePrefixes( subject(), prefixRegExps, replace, newPrefix ); } diff --git a/kmail/kmmsgbase.h b/kmail/kmmsgbase.h index e3bf0029c..94d5d966e 100644 --- a/kmail/kmmsgbase.h +++ b/kmail/kmmsgbase.h @@ -414,7 +414,7 @@ public: **/ static TQString replacePrefixes( const TQString& str, const TQStringList& prefixRegExps, - bool tqreplace, + bool replace, const TQString& newPrefix ); /** Returns @p str with all "forward" and "reply" prefixes stripped off. @@ -427,7 +427,7 @@ public: sequence of whitespace-delimited prefixes at the beginning of #subject() is replaced by @p newPrefix **/ - TQString cleanSubject(const TQStringList& prefixRegExps, bool tqreplace, + TQString cleanSubject(const TQStringList& prefixRegExps, bool replace, const TQString& newPrefix) const; /** Return this mails subject, with all "forward" and "reply" diff --git a/kmail/kmmsgdict.cpp b/kmail/kmmsgdict.cpp index 223a8adf9..f49437928 100644 --- a/kmail/kmmsgdict.cpp +++ b/kmail/kmmsgdict.cpp @@ -215,15 +215,15 @@ unsigned long KMMsgDict::insert(unsigned long msgSerNum, } if (index == -1) - index = folder->tqfind(msg); + index = folder->find(msg); // Should not happen, indicates id file corruption - while (dict->tqfind((long)msn)) { + while (dict->find((long)msn)) { msn = getNextMsgSerNum(); folder->setDirty( true ); // rewrite id file } - // Insert into the dict. Don't use dict->tqreplace() as we _know_ + // Insert into the dict. Don't use dict->replace() as we _know_ // there is no entry with the same msn, we just made sure. KMMsgDictEntry *entry = new KMMsgDictEntry(folder->folder(), index); dict->insert((long)msn, entry); @@ -246,12 +246,12 @@ unsigned long KMMsgDict::insert(const KMMsgBase *msg, int index) //----------------------------------------------------------------------------- -void KMMsgDict::tqreplace(unsigned long msgSerNum, +void KMMsgDict::replace(unsigned long msgSerNum, const KMMsgBase *msg, int index) { KMFolderIndex* folder = static_cast( msg->storage() ); if ( !folder ) { - kdDebug(5006) << "KMMsgDict::tqreplace: Cannot replace the message serial " + kdDebug(5006) << "KMMsgDict::replace: Cannot replace the message serial " << "number, null pointer to storage. Requested serial: " << msgSerNum << endl; kdDebug(5006) << " Message info: Subject: " << msg->subject() << ", To: " @@ -260,7 +260,7 @@ void KMMsgDict::tqreplace(unsigned long msgSerNum, } if ( index == -1 ) - index = folder->tqfind( msg ); + index = folder->find( msg ); remove( msgSerNum ); KMMsgDictEntry *entry = new KMMsgDictEntry( folder->folder(), index ); @@ -279,7 +279,7 @@ void KMMsgDict::tqreplace(unsigned long msgSerNum, void KMMsgDict::remove(unsigned long msgSerNum) { long key = (long)msgSerNum; - KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->tqfind(key); + KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->find(key); if (!entry) return; @@ -319,7 +319,7 @@ void KMMsgDict::update(const KMMsgBase *msg, int index, int newIndex) void KMMsgDict::getLocation(unsigned long key, KMFolder **retFolder, int *retIndex) const { - KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->tqfind((long)key); + KMMsgDictEntry *entry = (KMMsgDictEntry *)dict->find((long)key); if (entry) { *retFolder = (KMFolder *)entry->folder; *retIndex = entry->index; @@ -448,7 +448,7 @@ int KMMsgDict::readFolderIds( FolderStorage& storage ) if (swapByteOrder) msn = kmail_swap_32(msn); - if (!readOk || dict->tqfind(msn)) { + if (!readOk || dict->find(msn)) { for (unsigned int i = 0; i < index; i++) { msn = rentry->getMsn(i); dict->remove((long)msn); @@ -468,7 +468,7 @@ int KMMsgDict::readFolderIds( FolderStorage& storage ) Q_ASSERT( msn != 0 ); } - // Insert into the dict. Don't use dict->tqreplace() as we _know_ + // Insert into the dict. Don't use dict->replace() as we _know_ // there is no entry with the same msn, we just made sure. KMMsgDictEntry *entry = new KMMsgDictEntry( storage.folder(), index); dict->insert((long)msn, entry); diff --git a/kmail/kmmsgdict.h b/kmail/kmmsgdict.h index a13165340..60fabf6c8 100644 --- a/kmail/kmmsgdict.h +++ b/kmail/kmmsgdict.h @@ -97,7 +97,7 @@ private: unsigned long insert(const KMMsgBase *msg, int index = -1); /** Set the serial number of @p msg to @p msgSerNum */ - void tqreplace(unsigned long msgSerNum, + void replace(unsigned long msgSerNum, const KMMsgBase *msg, int index = -1); /** Removes a message. */ diff --git a/kmail/kmmsgpart.cpp b/kmail/kmmsgpart.cpp index 9e71f285d..447993db8 100644 --- a/kmail/kmmsgpart.cpp +++ b/kmail/kmmsgpart.cpp @@ -45,7 +45,7 @@ KMMessagePart::KMMessagePart( TQDataStream & stream ) KPIM::kAsciiToUpper( mOriginalContentTypeStr.data() ); // set the type - int sep = mOriginalContentTypeStr.tqfind('/'); + int sep = mOriginalContentTypeStr.find('/'); mType = mOriginalContentTypeStr.left(sep); mSubtype = mOriginalContentTypeStr.mid(sep+1); @@ -406,7 +406,7 @@ TQCString KMMessagePart::bodyDecoded(void) const //kdWarning( result.length() != (unsigned int)len, 5006 ) // << "KMMessagePart::bodyDecoded(): body is binary but used as text!" << endl; - result = result.tqreplace( "\r\n", "\n" ); // CRLF -> LF conversion + result = result.replace( "\r\n", "\n" ); // CRLF -> LF conversion assert( mBodyDecodedSize < 0 || mBodyDecodedSize == len ); if ( mBodyDecodedSize < 0 ) @@ -425,7 +425,7 @@ void KMMessagePart::magicSetType(bool aAutoDecode) KMimeMagicResult * result = KMimeMagic::self()->findBufferType( body ); TQString mimetype = result->mimeType(); - const int sep = mimetype.tqfind('/'); + const int sep = mimetype.find('/'); mType = mimetype.left(sep).latin1(); mSubtype = mimetype.mid(sep+1).latin1(); } @@ -558,7 +558,7 @@ TQString KMMessagePart::fileName(void) const // Allow for multiple filname*0, filename*1, ... params (defined by RFC 2231) // in the Content-Disposision - if ( mContentDisposition.tqcontains( "filename*", false ) ) { + if ( mContentDisposition.contains( "filename*", false ) ) { // It's RFC 2231 encoded, so extract the file name with the 2231 method str = KMMsgBase::extractRFC2231HeaderField( mContentDisposition, "filename" ); @@ -568,7 +568,7 @@ TQString KMMessagePart::fileName(void) const // Standard RFC 2047-encoded // search the start of the filename - int startOfFilename = mContentDisposition.tqfind("filename=", 0, false); + int startOfFilename = mContentDisposition.find("filename=", 0, false); if (startOfFilename < 0) return TQString(); startOfFilename += 9; @@ -577,10 +577,10 @@ TQString KMMessagePart::fileName(void) const int endOfFilename; if ( '"' == mContentDisposition[startOfFilename] ) { startOfFilename++; // the double quote isn't part of the filename - endOfFilename = mContentDisposition.tqfind('"', startOfFilename) - 1; + endOfFilename = mContentDisposition.find('"', startOfFilename) - 1; } else { - endOfFilename = mContentDisposition.tqfind(';', startOfFilename) - 1; + endOfFilename = mContentDisposition.find(';', startOfFilename) - 1; } if (endOfFilename < 0) endOfFilename = 32767; diff --git a/kmail/kmmsgpartdlg.cpp b/kmail/kmmsgpartdlg.cpp index a56bee17d..167ff8deb 100644 --- a/kmail/kmmsgpartdlg.cpp +++ b/kmail/kmmsgpartdlg.cpp @@ -370,7 +370,7 @@ void KMMsgPartDialogCompat::setMsgPart( KMMessagePart * aMsgPart ) setMimeType( mMsgPart->typeStr(), mMsgPart->subtypeStr() ); setSize( mMsgPart->decodedSize() ); setInline( mMsgPart->contentDisposition() - .tqfind( TQRegExp("^\\s*inline", false) ) >= 0 ); + .find( TQRegExp("^\\s*inline", false) ) >= 0 ); } @@ -396,7 +396,7 @@ void KMMsgPartDialogCompat::applyChanges() if ( name != TQString( encName ) ) cDisp += "*=" + encName; else - cDisp += "=\"" + encName.tqreplace( '\\', "\\\\" ).tqreplace( '"', "\\\"" ) + '"'; + cDisp += "=\"" + encName.replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"'; mMsgPart->setContentDisposition( cDisp ); } @@ -408,7 +408,7 @@ void KMMsgPartDialogCompat::applyChanges() // apply Content-Type: TQCString type = mimeType().latin1(); TQCString subtype; - int idx = type.tqfind('/'); + int idx = type.find('/'); if ( idx < 0 ) subtype = ""; else { diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp index b8937dc06..19f0410a9 100644 --- a/kmail/kmreaderwin.cpp +++ b/kmail/kmreaderwin.cpp @@ -1694,7 +1694,7 @@ TQString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart, return TQString(); // strip off a leading path - int slashPos = fileName.tqfindRev( '/' ); + int slashPos = fileName.findRev( '/' ); if( -1 != slashPos ) fileName = fileName.mid( slashPos + 1 ); if( fileName.isEmpty() ) @@ -1764,8 +1764,8 @@ int KMReaderWin::msgPartFromUrl(const KURL &aUrl) if (!aUrl.isLocalFile()) return -1; TQString path = aUrl.path(); - uint right = path.tqfindRev('/'); - uint left = path.tqfindRev('.', right); + uint right = path.findRev('/'); + uint left = path.findRev('.', right); bool ok; int res = path.mid(left + 1, right - left - 1).toInt(&ok); @@ -1845,15 +1845,15 @@ bool foundSMIMEData( const TQString aUrl, displayName = ""; libName = ""; keyId = ""; - int i1 = aUrl.tqfind( showCertMan ); + int i1 = aUrl.find( showCertMan ); if( -1 < i1 ) { i1 += showCertMan.length(); - int i2 = aUrl.tqfind(" ### ", i1); + int i2 = aUrl.find(" ### ", i1); if( i1 < i2 ) { displayName = aUrl.mid( i1, i2-i1 ); i1 = i2+5; - i2 = aUrl.tqfind(" ### ", i1); + i2 = aUrl.find(" ### ", i1); if( i1 < i2 ) { libName = aUrl.mid( i1, i2-i1 ); @@ -2577,8 +2577,8 @@ KURL KMReaderWin::tempFileUrlFromPartNode( const partNode * node ) while ( it != end ) { TQString path = *it; it++; - uint right = path.tqfindRev('/'); - uint left = path.tqfindRev('.', right); + uint right = path.findRev('/'); + uint left = path.findRev('.', right); bool ok; int res = path.mid(left + 1, right - left - 1).toInt(&ok); diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp index 4af3d68a0..4c4340a2b 100644 --- a/kmail/kmsearchpattern.cpp +++ b/kmail/kmsearchpattern.cpp @@ -33,7 +33,7 @@ using KMail::FilterLog; #include static const char* funcConfigNames[] = - { "tqcontains", "tqcontains-not", "equals", "not-equal", "regexp", + { "contains", "contains-not", "equals", "not-equal", "regexp", "not-regexp", "greater", "less-or-equal", "less", "greater-or-equal", "is-in-addressbook", "is-not-in-addressbook" , "is-in-category", "is-not-in-category", "has-attachment", "has-no-attachment"}; @@ -281,10 +281,10 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, rc = ( ( function() & 1 ) == 1 ); else { start += headerLen; - size_t stop = aStr.tqfind( '\n', start ); + size_t stop = aStr.find( '\n', start ); char ch = '\0'; while ( stop != DwString::npos && ( ( ch = aStr.at( stop + 1 ) ) == ' ' || ch == '\t' ) ) - stop = aStr.tqfind( '\n', stop + 1 ); + stop = aStr.find( '\n', stop + 1 ); const int len = stop == DwString::npos ? aStr.length() - start : stop - start ; const TQCString codedValue( aStr.data() + start, len + 1 ); const TQString msgContents = KMMsgBase::decodeRFC2047String( codedValue ).stripWhiteSpace(); // FIXME: This needs to be changed for IDN support. @@ -294,11 +294,11 @@ bool KMSearchRuleString::matches( const DwString & aStr, KMMessage & msg, static const DwBoyerMoore to("\nTo: "); static const DwBoyerMoore cc("\nCc: "); static const DwBoyerMoore bcc("\nBcc: "); - // "tqcontains" "foo" is true if any of the fields tqcontains + // "contains" "foo" is true if any of the fields contains // "foo", while "does not contain" "foo" is true if none - // of the fields tqcontains "foo" + // of the fields contains "foo" if ( ( function() & 1 ) == 0 ) { - // positive function, e.g. "tqcontains" + // positive function, e.g. "contains" rc = ( matches( aStr, msg, &to, 2 ) || matches( aStr, msg, &cc, 2 ) || matches( aStr, msg, &bcc, 3 ) ); @@ -419,10 +419,10 @@ bool KMSearchRuleString::matchesInternal( const TQString & msgContents ) const return ( TQString::compare( msgContents.lower(), contents().lower() ) != 0 ); case KMSearchRule::FuncContains: - return ( msgContents.tqfind( contents(), 0, false ) >= 0 ); + return ( msgContents.find( contents(), 0, false ) >= 0 ); case KMSearchRule::FuncContainsNot: - return ( msgContents.tqfind( contents(), 0, false ) < 0 ); + return ( msgContents.find( contents(), 0, false ) < 0 ); case KMSearchRule::FuncRegExp: { @@ -576,10 +576,10 @@ bool KMSearchRuleNumerical::matchesInternal( long numericalValue, return ( numericalValue != numericalMsgContents ); case KMSearchRule::FuncContains: - return ( msgContents.tqfind( contents(), 0, false ) >= 0 ); + return ( msgContents.find( contents(), 0, false ) >= 0 ); case KMSearchRule::FuncContainsNot: - return ( msgContents.tqfind( contents(), 0, false ) < 0 ); + return ( msgContents.find( contents(), 0, false ) < 0 ); case KMSearchRule::FuncRegExp: { diff --git a/kmail/kmsearchpattern.h b/kmail/kmsearchpattern.h index 4c2cb75de..87533a250 100644 --- a/kmail/kmsearchpattern.h +++ b/kmail/kmsearchpattern.h @@ -90,7 +90,7 @@ public: /** Determine whether the rule is worth considering. It isn't if either the field is not set or the contents is empty. - KFilter should make sure that it's rule list tqcontains + KFilter should make sure that it's rule list contains only non-empty rules, as matches doesn't check this. */ virtual bool isEmpty() const = 0; @@ -299,7 +299,7 @@ public: under which it could be stored in the config file. As a TQPtrList with autoDelete enabled, it assumes that it is the - central repository for the rules it tqcontains. So if you want to + central repository for the rules it contains. So if you want to reuse a rule in another pattern, make a deep copy of that rule. @short An abstraction of a search over messages. diff --git a/kmail/kmsender.cpp b/kmail/kmsender.cpp index add465642..987e4928a 100644 --- a/kmail/kmsender.cpp +++ b/kmail/kmsender.cpp @@ -404,7 +404,7 @@ void KMSender::doSendMsg() if (mCurrentMsg->tqparent() && !imapSentFolder) { // for speed optimization, this code assumes that mCurrentMsg is the // last one in it's tqparent folder; make sure that's really the case: - assert( mCurrentMsg->tqparent()->tqfind( mCurrentMsg ) + assert( mCurrentMsg->tqparent()->find( mCurrentMsg ) == mCurrentMsg->tqparent()->count() - 1 ); // unGet this message: mCurrentMsg->tqparent()->unGetMsg( mCurrentMsg->tqparent()->count() -1 ); @@ -710,7 +710,7 @@ void KMSender::slotIdle() mFailedMessages++; // reset cached password TQMapIterator pc; - if ( (pc = mPasswdCache.tqfind( mMethodStr )) != mPasswdCache.end() ) { + if ( (pc = mPasswdCache.find( mMethodStr )) != mPasswdCache.end() ) { mPasswdCache.erase(pc); } // Sending of message failed. @@ -800,7 +800,7 @@ KMSendProc* KMSender::createSendProcFromString( const TQString & transport ) mTransportInfo->auth = false; mTransportInfo->encryption = "NONE"; TQString serverport = transport.mid(7); - int colon = serverport.tqfind(':'); + int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); mTransportInfo->port = serverport.mid(colon + 1); @@ -815,7 +815,7 @@ KMSendProc* KMSender::createSendProcFromString( const TQString & transport ) mTransportInfo->auth = false; mTransportInfo->encryption = "ssl"; TQString serverport = transport.mid(7); - int colon = serverport.tqfind(':'); + int colon = serverport.find(':'); if (colon != -1) { mTransportInfo->host = serverport.left(colon); mTransportInfo->port = serverport.mid(colon + 1); @@ -1019,7 +1019,7 @@ void KMSendSendmail::receivedStderr(KProcess *proc, char *buffer, int buflen) { assert(proc!=0); Q_UNUSED( proc ); - mLastErrorMessage.tqreplace(mLastErrorMessage.length(), buflen, buffer); + mLastErrorMessage.replace(mLastErrorMessage.length(), buflen, buffer); } @@ -1082,7 +1082,7 @@ bool KMSendSMTP::doSend( const TQString & sender, const TQStringList & to, const if (ti->auth) { - TQMapIterator tpc = mSender->mPasswdCache.tqfind( ti->name ); + TQMapIterator tpc = mSender->mPasswdCache.find( ti->name ); TQString tpwd = ( tpc != mSender->mPasswdCache.end() )?(*tpc):TQString(); if ( ti->passwd().isEmpty() ) diff --git a/kmail/kmservertest.cpp b/kmail/kmservertest.cpp index 67dc0f2d5..c7f96ce36 100644 --- a/kmail/kmservertest.cpp +++ b/kmail/kmservertest.cpp @@ -112,17 +112,17 @@ void KMServerTest::slotData(KIO::Job *, const TQString &data) void KMServerTest::slotMetaData( const KIO::MetaData & md ) { - KIO::MetaData::const_iterator it = md.tqfind( "PLAIN AUTH METHODS" ); + KIO::MetaData::const_iterator it = md.find( "PLAIN AUTH METHODS" ); if ( it != md.end() ) { mAuthNone = it.data(); kdDebug(5006) << "mAuthNone: " << mAuthNone << endl; } - it = md.tqfind( "TLS AUTH METHODS" ); + it = md.find( "TLS AUTH METHODS" ); if ( it != md.end() ) { mAuthTLS = it.data(); kdDebug(5006) << "mAuthTLS: " << mAuthTLS << endl; } - it = md.tqfind( "SSL AUTH METHODS" ); + it = md.find( "SSL AUTH METHODS" ); if ( it != md.end() ) { mAuthSSL = it.data(); kdDebug(5006) << "mAuthSSL: " << mAuthSSL << endl; @@ -142,7 +142,7 @@ void KMServerTest::slotSlaveResult(KIO::Slave *aSlave, int error, if (aSlave != mSlave) return; if ( mSSL && error == 0 ) { // add a dummy entry to the list of SSL capabilities so that the receiver - // of the capabilities signal can use mListSSL.isEmpty() in order to tqfind + // of the capabilities signal can use mListSSL.isEmpty() in order to find // out whether SSL is supported mListSSL.append("SSL"); } diff --git a/kmail/kmstartup.cpp b/kmail/kmstartup.cpp index fd3d7bd7e..4d82e9e19 100644 --- a/kmail/kmstartup.cpp +++ b/kmail/kmstartup.cpp @@ -173,7 +173,7 @@ void lockOrDie() { path_buffer[length] = '\0'; const TQString path = TQFile::decodeName(path_buffer); kdDebug() << k_funcinfo << path << endl; - const int pos = path.tqfindRev('/'); + const int pos = path.findRev('/'); const TQString fileName = path.mid(pos+1); kdDebug() << "Found process " << oldPid << " running. It's: " << fileName << endl; first_instance = fileName != "kmail" && fileName != "kontact"; diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp index 9742d6278..1c6bc0363 100644 --- a/kmail/kmsystemtray.cpp +++ b/kmail/kmsystemtray.cpp @@ -483,7 +483,7 @@ void KMSystemTray::updateNewMessages() int unread = fldr->countUnread(); TQMap, int>::Iterator it = - mFoldersWithUnread.tqfind(fldr); + mFoldersWithUnread.find(fldr); bool unmapped = (it == mFoldersWithUnread.end()); /** If the folder is not mapped yet, increment count by numUnread diff --git a/kmail/kmtransport.cpp b/kmail/kmtransport.cpp index 46ed0efc9..e5afc1c6d 100644 --- a/kmail/kmtransport.cpp +++ b/kmail/kmtransport.cpp @@ -522,7 +522,7 @@ void KMTransportDialog::makeSmtpPage() mSmtp.authDigestMd5 = new TQRadioButton( i18n("&DIGEST-MD5"), mSmtp.authGroup ); mSmtp.authNTLM = new TQRadioButton( i18n("&NTLM"), mSmtp.authGroup ); mSmtp.authGSSAPI = new TQRadioButton( i18n("&GSSAPI"), mSmtp.authGroup ); - if ( KProtocolInfo::capabilities("smtp").tqcontains("SASL") == 0 ) { + if ( KProtocolInfo::capabilities("smtp").contains("SASL") == 0 ) { mSmtp.authNTLM->hide(); mSmtp.authGSSAPI->hide(); } @@ -735,7 +735,7 @@ void KMTransportDialog::checkHighest(TQButtonGroup *btnGroup) { for ( int i = btnGroup->count() - 1; i >= 0 ; --i ) { - TQButton * btn = btnGroup->tqfind(i); + TQButton * btn = btnGroup->find(i); if (btn && btn->isEnabled()) { btn->animateClick(); @@ -756,7 +756,7 @@ void KMTransportDialog::slotSmtpCapabilities( const TQStringList & capaNormal, << authNone << ", " << authSSL << ", " << authTLS << " )" << endl; mSmtp.encryptionNone->setEnabled( !capaNormal.isEmpty() ); mSmtp.encryptionSSL->setEnabled( !capaSSL.isEmpty() ); - mSmtp.encryptionTLS->setEnabled( capaNormal.tqfindIndex("STARTTLS") != -1 ); + mSmtp.encryptionTLS->setEnabled( capaNormal.findIndex("STARTTLS") != -1 ); if ( authNone.isEmpty() && authSSL.isEmpty() && authTLS.isEmpty() ) { // slave doesn't seem to support "* AUTH METHODS" metadata (or server can't do AUTH) mAuthNone = authMethodsFromStringList( capaNormal ); diff --git a/kmail/listjob.cpp b/kmail/listjob.cpp index e126f3e56..e6726a9a5 100644 --- a/kmail/listjob.cpp +++ b/kmail/listjob.cpp @@ -230,7 +230,7 @@ void ListJob::slotListEntries( KIO::Job* job, const KIO::UDSEntryList& uds ) // Some servers send _lots_ of duplicates // This check is too slow for huge lists if ( mSubfolderPaths.count() > 100 || - mSubfolderPaths.tqfindIndex(url.path()) == -1 ) + mSubfolderPaths.findIndex(url.path()) == -1 ) { mSubfolderNames.append( name ); mSubfolderPaths.append( url.path() ); diff --git a/kmail/mailinglist-magic.cpp b/kmail/mailinglist-magic.cpp index 3c9efd147..0b646e94a 100644 --- a/kmail/mailinglist-magic.cpp +++ b/kmail/mailinglist-magic.cpp @@ -31,10 +31,10 @@ static TQString check_sender(const KMMessage *message, { header_name = "Sender"; header_value = header; - header = header.mid( 6, header.tqfind( '@' ) - 6 ); + header = header.mid( 6, header.find( '@' ) - 6 ); } else { - int index = header.tqfind( "-owner@ " ); + int index = header.find( "-owner@ " ); if ( index == -1 ) return TQString(); @@ -52,12 +52,12 @@ static TQString check_x_beenthere(const KMMessage *message, TQString &header_value ) { TQString header = message->headerField( "X-BeenThere" ); - if ( header.isNull() || header.tqfind( '@' ) == -1 ) + if ( header.isNull() || header.find( '@' ) == -1 ) return TQString(); header_name = "X-BeenThere"; header_value = header; - header.truncate( header.tqfind( '@' ) ); + header.truncate( header.find( '@' ) ); return header; } @@ -68,13 +68,13 @@ static TQString check_delivered_to(const KMMessage *message, { TQString header = message->headerField( "Delivered-To" ); if ( header.isNull() || header.left(13 ) != "mailing list" - || header.tqfind( '@' ) == -1 ) + || header.find( '@' ) == -1 ) return TQString(); header_name = "Delivered-To"; header_value = header; - return header.mid( 13, header.tqfind( '@' ) - 13 ); + return header.mid( 13, header.find( '@' ) - 13 ); } /* X-Mailing-List: ", ++start ) ) == -1 ) { + while ( (start = header.find( "<", start )) != -1 ) { + if ( (end = header.find( ">", ++start ) ) == -1 ) { kdDebug(5006)<getMsg( mParent->tqfind( mMsgList.first() ) ); + //KMMessage* msg = mParent->getMsg( mParent->find( mMsgList.first() ) ); msg->setComplete( true ); emit messageRetrieved( msg ); } diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp index cf3357fa3..c69aa525b 100644 --- a/kmail/messagecomposer.cpp +++ b/kmail/messagecomposer.cpp @@ -1527,7 +1527,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, innerDwPart->Assemble(); TQByteArray tmpbody = KMail::Util::ByteArray( innerDwPart->AsString() ); if ( mIsRichText ) { // and add our mp/a boundary - int boundPos = tmpbody.tqfind( '\n' ); + int boundPos = tmpbody.find( '\n' ); if( -1 < boundPos ) { TQCString bStr( ";\n boundary=\"" ); bStr += mSaveBoundary.c_str(); @@ -1590,7 +1590,7 @@ void MessageComposer::composeMessage( KMMessage& theMessage, // manually add a boundary definition to the Content-Type header if( !mMultipartMixedBoundary.isEmpty() ) { - int boundPos = mEncodedBody.tqfind( '\n' ); + int boundPos = mEncodedBody.find( '\n' ); if( -1 < boundPos ) { // insert new "boundary" parameter TQCString bStr( ";\n boundary=\"" ); @@ -1928,7 +1928,7 @@ bool MessageComposer::processStructuringInfo( const TQString bugURL, const TQCString boundaryCStr = KMime::multiPartBoundary(); // add "boundary" parameter if ( makeMultiMime( format, signing ) ) - mainHeader.tqreplace( "%boundary", boundaryCStr ); + mainHeader.replace( "%boundary", boundaryCStr ); if ( toplevelCT ) { if ( const char * str = toplevelContentDisposition( format, signing ) ) { diff --git a/kmail/messagecopyhelper.cpp b/kmail/messagecopyhelper.cpp index 84618ea87..916920168 100644 --- a/kmail/messagecopyhelper.cpp +++ b/kmail/messagecopyhelper.cpp @@ -43,7 +43,7 @@ MessageCopyHelper::MessageCopyHelper( const TQValueList< TQ_UINT32 > & msgs, continue; if ( f == dest ) continue; // already there - if ( !mOpenFolders.tqcontains( f ) ) {// not yet opened + if ( !mOpenFolders.contains( f ) ) {// not yet opened f->open( "messagecopyhelper" ); mOpenFolders.insert( f, 0 ); } diff --git a/kmail/messageproperty.cpp b/kmail/messageproperty.cpp index 91261540f..b8b37f915 100644 --- a/kmail/messageproperty.cpp +++ b/kmail/messageproperty.cpp @@ -42,14 +42,14 @@ TQMap MessageProperty::sSerialCache; bool MessageProperty::filtering( TQ_UINT32 serNum ) { - return sFolders.tqcontains( serNum ); + return sFolders.contains( serNum ); } void MessageProperty::setFiltering( TQ_UINT32 serNum, bool filter ) { assert(!filtering(serNum) || !filter); if (filter && !filtering(serNum)) - sFolders.tqreplace(serNum, TQGuardedPtr(0) ); + sFolders.replace(serNum, TQGuardedPtr(0) ); else if (!filter) sFolders.remove(serNum); } @@ -66,7 +66,7 @@ void MessageProperty::setFiltering( const KMMsgBase *msgBase, bool filter ) KMFolder* MessageProperty::filterFolder( TQ_UINT32 serNum ) { - TQMap >::const_iterator it = sFolders.tqfind( serNum ); + TQMap >::const_iterator it = sFolders.find( serNum ); return it == sFolders.constEnd() ? 0 : (*it).operator->(); } @@ -87,7 +87,7 @@ void MessageProperty::setFilterFolder( const KMMsgBase *msgBase, KMFolder* folde ActionScheduler* MessageProperty::filterHandler( TQ_UINT32 serNum ) { - TQMap >::const_iterator it = sHandlers.tqfind( serNum ); + TQMap >::const_iterator it = sHandlers.find( serNum ); return it == sHandlers.constEnd() ? 0 : (*it).operator->(); } @@ -111,14 +111,14 @@ void MessageProperty::setFilterHandler( const KMMsgBase *msgBase, ActionSchedule bool MessageProperty::transferInProgress( TQ_UINT32 serNum ) { - TQMap::const_iterator it = sTransfers.tqfind( serNum ); + TQMap::const_iterator it = sTransfers.find( serNum ); return it == sTransfers.constEnd() ? false : *it; } void MessageProperty::setTransferInProgress( TQ_UINT32 serNum, bool transfer, bool force ) { int transferInProgress = 0; - TQMap::const_iterator it = sTransfers.tqfind( serNum ); + TQMap::const_iterator it = sTransfers.find( serNum ); if (it != sTransfers.constEnd()) transferInProgress = *it; if ( force && !transfer ) @@ -145,7 +145,7 @@ void MessageProperty::setTransferInProgress( const KMMsgBase *msgBase, bool tran TQ_UINT32 MessageProperty::serialCache( const KMMsgBase *msgBase ) { - TQMap::const_iterator it = sSerialCache.tqfind( msgBase ); + TQMap::const_iterator it = sSerialCache.find( msgBase ); return it == sSerialCache.constEnd() ? 0 : *it; } diff --git a/kmail/mh2kmailr b/kmail/mh2kmailr index df76fec1e..d88905aae 100755 --- a/kmail/mh2kmailr +++ b/kmail/mh2kmailr @@ -14,13 +14,13 @@ fi MH_DIR=$1 -for d in `/usr/bin/tqfind $MH_DIR -type d -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do +for d in `/usr/bin/find $MH_DIR -type d -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do FOLDER=${d}.mbx # remove old kmail folder if any rm -f $FOLDER -for f in `/usr/bin/tqfind $d -type f -maxdepth 1 -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do +for f in `/usr/bin/find $d -type f -maxdepth 1 -print|sed -e :a -e 's/^.\{1,5\}$/ &/;ta'|sort`; do echo "From ???@??? 00:00:00 1997 +0000" >> $FOLDER cat $f >> $FOLDER done diff --git a/kmail/networkaccount.cpp b/kmail/networkaccount.cpp index b400b52a6..fa719c534 100644 --- a/kmail/networkaccount.cpp +++ b/kmail/networkaccount.cpp @@ -321,7 +321,7 @@ namespace KMail { if ( host().isEmpty() ) return; if ( checking ) { - if ( s_serverConnections.tqfind( host() ) != s_serverConnections.end() ) + if ( s_serverConnections.find( host() ) != s_serverConnections.end() ) s_serverConnections[host()] += 1; else s_serverConnections[host()] = 1; @@ -329,7 +329,7 @@ namespace KMail { << host() << " now is " << s_serverConnections[host()] << endl; } else { - if ( s_serverConnections.tqfind( host() ) != s_serverConnections.end() && + if ( s_serverConnections.find( host() ) != s_serverConnections.end() && s_serverConnections[host()] > 0 ) { s_serverConnections[host()] -= 1; kdDebug(5006) << "connections to server " << host() @@ -344,12 +344,12 @@ namespace KMail { kdDebug(5006) << "for host " << host() << " current connections=" - << (s_serverConnections.tqfind(host())==s_serverConnections.end() ? 0 : s_serverConnections[host()]) + << (s_serverConnections.find(host())==s_serverConnections.end() ? 0 : s_serverConnections[host()]) << " and limit is " << GlobalSettings::self()->maxConnectionsPerHost() << endl; bool connectionLimitForHostReached = !host().isEmpty() && GlobalSettings::self()->maxConnectionsPerHost() > 0 - && s_serverConnections.tqfind( host() ) != s_serverConnections.end() + && s_serverConnections.find( host() ) != s_serverConnections.end() && s_serverConnections[host()] >= GlobalSettings::self()->maxConnectionsPerHost(); kdDebug(5006) << "connection limit reached: " << connectionLimitForHostReached << endl; diff --git a/kmail/newfolderdialog.cpp b/kmail/newfolderdialog.cpp index d1e7de22f..11a52043b 100644 --- a/kmail/newfolderdialog.cpp +++ b/kmail/newfolderdialog.cpp @@ -121,7 +121,7 @@ NewFolderDialog::NewFolderDialog( TQWidget* tqparent, KMFolder *folder ) mContentsHBox = new TQHBoxLayout( 0, 0, 6, "mContentsHBox"); mContentsLabel = new TQLabel( privateLayoutWidget, "mContentsLabel" ); - mContentsLabel->setText( i18n( "Folder &tqcontains:" ) ); + mContentsLabel->setText( i18n( "Folder &contains:" ) ); mContentsHBox->addWidget( mContentsLabel ); mContentsComboBox = new TQComboBox( false, privateLayoutWidget, "mContentsComboBox" ); diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp index 0b79d98c0..db27f7f59 100644 --- a/kmail/objecttreeparser.cpp +++ b/kmail/objecttreeparser.cpp @@ -804,9 +804,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); #ifdef MARCS_DEBUG TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); - bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) ); + bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); dumpToFile( "dat_04_reader.encrypted", ciphertext.data(), ciphertext.size() ); @@ -916,9 +916,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, // ### while pinentry-qt appears) TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() ); TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 ); - bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && - (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) ); + bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) && + (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) ); if ( !cipherIsBinary ) { decryptedData = cipherStr; } @@ -939,12 +939,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, bool ObjectTreeParser::containsExternalReferences( const TQCString & str ) { TQRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:"); - int httpPos = str.tqfind( httpRegExp, 0 ); + int httpPos = str.find( httpRegExp, 0 ); while ( httpPos >= 0 ) { // look backwards for "href" if ( httpPos > 5 ) { - int hrefPos = str.tqfindRev( "href", httpPos - 5, true ); + int hrefPos = str.findRev( "href", httpPos - 5, true ); // if no 'href' is found or the distance between 'href' and '"http[s]:' // is larger than 7 (7 is the distance in 'href = "http[s]:') then // we assume that we have found an external reference @@ -952,7 +952,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, return true; } // find next occurrence of "http: or "https: - httpPos = str.tqfind( httpRegExp, httpPos + 6 ); + httpPos = str.find( httpRegExp, httpPos + 6 ); } return false; } @@ -979,12 +979,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, // We must fo this, or else we will see only 1st inlined html // attachment. It is IMHO enough to search only for and // put \0 there. - int i = cstr.tqfindRev("", -1, false); //case insensitive + int i = cstr.findRev("", -1, false); //case insensitive if ( 0 <= i ) cstr.truncate(i); else // just in case - search for { - i = cstr.tqfindRev("", -1, false); //case insensitive + i = cstr.findRev("", -1, false); //case insensitive if ( 0 <= i ) cstr.truncate(i); } // ---Sven's strip and from end of attachment end- @@ -1031,7 +1031,7 @@ static bool isMailmanMessage( partNode * curNode ) { return true; if ( headers.HasField("X-Mailer") && 0 == TQCString( headers.FieldBody("X-Mailer").AsString().c_str() ) - .tqfind("MAILMAN", 0, false) ) + .find("MAILMAN", 0, false) ) return true; return false; } @@ -1047,21 +1047,21 @@ namespace KMail { const TQCString delimZ2("--__--__--\n\n_____________"); const TQCString delimZ1("--__--__--\r\n\r\n_____________"); TQCString partStr, digestHeaderStr; - int thisDelim = cstr.tqfind(delim1.data(), 0, false); + int thisDelim = cstr.find(delim1.data(), 0, false); if ( thisDelim == -1 ) - thisDelim = cstr.tqfind(delim2.data(), 0, false); + thisDelim = cstr.find(delim2.data(), 0, false); if ( thisDelim == -1 ) { kdDebug(5006) << " Sorry: Old style Mailman message but no delimiter found." << endl; return false; } - int nextDelim = cstr.tqfind(delim1.data(), thisDelim+1, false); + int nextDelim = cstr.find(delim1.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delim2.data(), thisDelim+1, false); + nextDelim = cstr.find(delim2.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ1.data(), thisDelim+1, false); + nextDelim = cstr.find(delimZ1.data(), thisDelim+1, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ2.data(), thisDelim+1, false); + nextDelim = cstr.find(delimZ2.data(), thisDelim+1, false); if ( nextDelim < 0) return false; @@ -1081,15 +1081,15 @@ namespace KMail { curNode->setType( DwMime::kTypeMultipart ); curNode->setSubType( DwMime::kSubtypeDigest ); while( -1 < nextDelim ){ - int thisEoL = cstr.tqfind("\nMessage:", thisDelim, false); + int thisEoL = cstr.find("\nMessage:", thisDelim, false); if ( -1 < thisEoL ) thisDelim = thisEoL+1; else{ - thisEoL = cstr.tqfind("\n_____________", thisDelim, false); + thisEoL = cstr.find("\n_____________", thisDelim, false); if ( -1 < thisEoL ) thisDelim = thisEoL+1; } - thisEoL = cstr.tqfind('\n', thisDelim); + thisEoL = cstr.find('\n', thisDelim); if ( -1 < thisEoL ) thisDelim = thisEoL+1; else @@ -1101,10 +1101,10 @@ namespace KMail { partStr += cstr.mid( thisDelim, nextDelim-thisDelim ); TQCString subject("embedded message"); TQCString subSearch("\nSubject:"); - int subPos = partStr.tqfind(subSearch.data(), 0, false); + int subPos = partStr.find(subSearch.data(), 0, false); if ( -1 < subPos ){ subject = partStr.mid(subPos+subSearch.length()); - thisEoL = subject.tqfind('\n'); + thisEoL = subject.find('\n'); if ( -1 < thisEoL ) subject.truncate( thisEoL ); } @@ -1114,21 +1114,21 @@ namespace KMail { subject, true ); //mReader->queueHtml("


"); thisDelim = nextDelim+1; - nextDelim = cstr.tqfind(delim1.data(), thisDelim, false); + nextDelim = cstr.find(delim1.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delim2.data(), thisDelim, false); + nextDelim = cstr.find(delim2.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ1.data(), thisDelim, false); + nextDelim = cstr.find(delimZ1.data(), thisDelim, false); if ( -1 == nextDelim ) - nextDelim = cstr.tqfind(delimZ2.data(), thisDelim, false); + nextDelim = cstr.find(delimZ2.data(), thisDelim, false); } // reset curent node's Content-Type curNode->setType( DwMime::kTypeText ); curNode->setSubType( DwMime::kSubtypePlain ); - int thisEoL = cstr.tqfind("_____________", thisDelim); + int thisEoL = cstr.find("_____________", thisDelim); if ( -1 < thisEoL ){ thisDelim = thisEoL; - thisEoL = cstr.tqfind('\n', thisDelim); + thisEoL = cstr.find('\n', thisDelim); if ( -1 < thisEoL ) thisDelim = thisEoL+1; } @@ -1720,7 +1720,7 @@ namespace KMail { bool isSigned = smimeType == "signed-data"; bool isEncrypted = smimeType == "enveloped-data"; - // Analyze "signTestNode" node to tqfind/verify a signature. + // Analyze "signTestNode" node to find/verify a signature. // If zero this verification was successfully done after // decrypting via recursion by insertAndParseNewChildNode(). partNode* signTestNode = isEncrypted ? 0 : node; @@ -2252,7 +2252,7 @@ TQString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protoco } /* // add i18n support for 3rd party plug-ins here: - else if (0 <= cryptPlug->libName().tqfind( "yetanotherpluginname", 0, false )) { + else if (0 <= cryptPlug->libName().find( "yetanotherpluginname", 0, false )) { } */ @@ -2982,7 +2982,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) TQString line; /* search next occurrence of '\n' */ - pos = s.tqfind('\n', beg, FALSE); + pos = s.find('\n', beg, FALSE); if (pos == (unsigned int)(-1)) pos = length; @@ -3083,7 +3083,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) { // don't write empty
blocks (they have zero height) // ignore ^M DOS linebreaks - if( !line.tqreplace('\015', "").isEmpty() ) + if( !line.replace('\015', "").isEmpty() ) { htmlStr +=TQString( "
" ).tqarg( line.isRightToLeft() ? "rtl":"ltr" ); htmlStr += LinkLocator::convertToHtml( line, convertFlags ); diff --git a/kmail/objecttreeparser.h b/kmail/objecttreeparser.h index 2325b2423..b864ea618 100644 --- a/kmail/objecttreeparser.h +++ b/kmail/objecttreeparser.h @@ -253,7 +253,7 @@ namespace KMail { bool processToltecMail( partNode * node ); /** Checks whether @p str contains external references. To be precise, - we only check whether @p str tqcontains 'xxx="http[s]:' where xxx is + we only check whether @p str contains 'xxx="http[s]:' where xxx is not href. Obfuscated external references are ignored on purpose. */ static bool containsExternalReferences( const TQCString & str ); diff --git a/kmail/partNode.cpp b/kmail/partNode.cpp index 352698252..e4cb59221 100644 --- a/kmail/partNode.cpp +++ b/kmail/partNode.cpp @@ -516,7 +516,7 @@ void partNode::fillMimePartTree( KMMimePartTreeItem* parentItem, cntSize = size; } // remove linebreak+whitespace from folded Content-Description - cntDesc.tqreplace( TQRegExp("\\n\\s*"), " " ); + cntDesc.replace( TQRegExp("\\n\\s*"), " " ); if( parentItem ) mMimePartTreeItem = new KMMimePartTreeItem( parentItem, diff --git a/kmail/popaccount.cpp b/kmail/popaccount.cpp index 932b503e2..a37bc6d58 100644 --- a/kmail/popaccount.cpp +++ b/kmail/popaccount.cpp @@ -514,13 +514,13 @@ void PopAccount::slotJobFinished() { mUidForIdMap[hids.key()], Later));//TODO //set Action if already known - if( mHeaderDeleteUids.tqcontains( headersOnServer.current()->uid() ) ) { + if( mHeaderDeleteUids.contains( headersOnServer.current()->uid() ) ) { headersOnServer.current()->setAction(Delete); } - else if( mHeaderDownUids.tqcontains( headersOnServer.current()->uid() ) ) { + else if( mHeaderDownUids.contains( headersOnServer.current()->uid() ) ) { headersOnServer.current()->setAction(Down); } - else if( mHeaderLaterUids.tqcontains( headersOnServer.current()->uid() ) ) { + else if( mHeaderLaterUids.contains( headersOnServer.current()->uid() ) ) { headersOnServer.current()->setAction(Later); } } @@ -625,7 +625,7 @@ void PopAccount::slotJobFinished() { headersOnServer.current()->action() == Later) { //remove entries from the lists when the mails should not be downloaded //(deleted or downloaded later) - if ( mMsgsPendingDownload.tqcontains( headersOnServer.current()->id() ) ) { + if ( mMsgsPendingDownload.contains( headersOnServer.current()->id() ) ) { mMsgsPendingDownload.remove( headersOnServer.current()->id() ); } if (headersOnServer.current()->action() == Delete) { @@ -930,11 +930,11 @@ void PopAccount::slotData( KIO::Job* job, const TQByteArray &data) // otherwise stage is List Or Uidl TQString qdata = data; qdata = qdata.simplifyWhiteSpace(); // Workaround for Maillennium POP3/UNIBOX - int spc = qdata.tqfind( ' ' ); + int spc = qdata.find( ' ' ); if ( stage == List ) { if ( spc > 0 ) { TQString length = qdata.mid(spc+1); - if (length.tqfind(' ') != -1) length.truncate(length.tqfind(' ')); + if (length.find(' ') != -1) length.truncate(length.find(' ')); int len = length.toInt(); numBytes += len; TQString id = qdata.left(spc); @@ -989,8 +989,8 @@ void PopAccount::slotData( KIO::Job* job, const TQByteArray &data) int *size = new int; //malloc(size_of(int)); *size = mMsgsPendingDownload[id]; mSizeOfNextSeenMsgsDict.insert( uid, size ); - if ( mUidsOfSeenMsgsDict.tqfind( uid ) != 0 ) { - if ( mMsgsPendingDownload.tqcontains( id ) ) { + if ( mUidsOfSeenMsgsDict.find( uid ) != 0 ) { + if ( mMsgsPendingDownload.contains( id ) ) { mMsgsPendingDownload.remove( id ); } else diff --git a/kmail/recipientseditor.cpp b/kmail/recipientseditor.cpp index 387331cc6..2bdfe3998 100644 --- a/kmail/recipientseditor.cpp +++ b/kmail/recipientseditor.cpp @@ -456,7 +456,7 @@ void RecipientsView::slotReturnPressed( RecipientLine *line ) void RecipientsView::slotDownPressed( RecipientLine *line ) { - int pos = mLines.tqfind( line ); + int pos = mLines.find( line ); if ( pos >= (int)mLines.count() - 1 ) { emit focusDown(); } else if ( pos >= 0 ) { @@ -466,7 +466,7 @@ void RecipientsView::slotDownPressed( RecipientLine *line ) void RecipientsView::slotUpPressed( RecipientLine *line ) { - int pos = mLines.tqfind( line ); + int pos = mLines.find( line ); if ( pos > 0 ) { activateLine( mLines.at( pos - 1 ) ); } else { @@ -492,7 +492,7 @@ void RecipientsView::slotDeleteLine() return; RecipientLine *line = mCurDelLine; - int pos = mLines.tqfind( line ); + int pos = mLines.find( line ); int newPos; if ( pos == 0 ) newPos = pos + 1; diff --git a/kmail/recipientspicker.cpp b/kmail/recipientspicker.cpp index 0bbacbeae..11b2cec6f 100644 --- a/kmail/recipientspicker.cpp +++ b/kmail/recipientspicker.cpp @@ -294,13 +294,13 @@ RecipientItem::List RecipientsCollection::items() const bool RecipientsCollection::hasEquivalentItem( RecipientItem *item ) const { - return mKeyMap.tqfind( item->key() ) != mKeyMap.end(); + return mKeyMap.find( item->key() ) != mKeyMap.end(); } RecipientItem * RecipientsCollection::getEquivalentItem( RecipientItem *item) const { TQMap::ConstIterator it; - it = mKeyMap.tqfind( item->key() ); + it = mKeyMap.find( item->key() ); if ( it == mKeyMap.end() ) return 0; return (*it); @@ -505,7 +505,7 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) item->setAddressee( *it, *it3 ); TQMap::ConstIterator collIt; - collIt = collectionMap.tqfind( it->resource() ); + collIt = collectionMap.find( it->resource() ); if ( collIt != collectionMap.end() ) { (*collIt)->addItem( item ); } @@ -514,7 +514,7 @@ void RecipientsPicker::insertAddressBook( KABC::AddressBook *addressbook ) TQStringList::ConstIterator catIt; for( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { TQMap::ConstIterator catMapIt; - catMapIt = categoryMap.tqfind( *catIt ); + catMapIt = categoryMap.find( *catIt ); RecipientsCollection *collection; if ( catMapIt == categoryMap.end() ) { collection = new RecipientsCollection( *catIt ); diff --git a/kmail/renamejob.cpp b/kmail/renamejob.cpp index d4aa76f59..8f69e6f62 100644 --- a/kmail/renamejob.cpp +++ b/kmail/renamejob.cpp @@ -138,7 +138,7 @@ void RenameJob::execute() ImapAccountBase* account = static_cast(mStorage)->account(); // first rename it on the server mNewImapPath = mOldImapPath; - mNewImapPath = mNewImapPath.tqreplace( mOldName, mNewName ); + mNewImapPath = mNewImapPath.replace( mOldName, mNewName ); KURL src( account->getUrl() ); src.setPath( mOldImapPath ); KURL dst( account->getUrl() ); diff --git a/kmail/rulewidgethandlermanager.cpp b/kmail/rulewidgethandlermanager.cpp index 18a848149..42ef1ca4c 100644 --- a/kmail/rulewidgethandlermanager.cpp +++ b/kmail/rulewidgethandlermanager.cpp @@ -403,7 +403,7 @@ namespace { const KMSearchRule::Function id; const char *displayName; } TextFunctions[] = { - { KMSearchRule::FuncContains, I18N_NOOP( "tqcontains" ) }, + { KMSearchRule::FuncContains, I18N_NOOP( "contains" ) }, { KMSearchRule::FuncContainsNot, I18N_NOOP( "does not contain" ) }, { KMSearchRule::FuncEquals, I18N_NOOP( "equals" ) }, { KMSearchRule::FuncNotEqual, I18N_NOOP( "does not equal" ) }, @@ -738,7 +738,7 @@ namespace { const KMSearchRule::Function id; const char *displayName; } MessageFunctions[] = { - { KMSearchRule::FuncContains, I18N_NOOP( "tqcontains" ) }, + { KMSearchRule::FuncContains, I18N_NOOP( "contains" ) }, { KMSearchRule::FuncContainsNot, I18N_NOOP( "does not contain" ) }, { KMSearchRule::FuncRegExp, I18N_NOOP( "matches regular expr." ) }, { KMSearchRule::FuncNotRegExp, I18N_NOOP( "does not match reg. expr." ) }, diff --git a/kmail/scalix.cpp b/kmail/scalix.cpp index 5db8a168d..4910119d0 100644 --- a/kmail/scalix.cpp +++ b/kmail/scalix.cpp @@ -60,7 +60,7 @@ KMFolder* Utils::findStandardResourceFolder( KMFolderDir* folderParentDir, typeMap.insert( KMail::ContentsTypeNote, "IPF.StickyNote" ); typeMap.insert( KMail::ContentsTypeTask, "IPF.Task" ); - if ( !typeMap.tqcontains( contentsType ) ) + if ( !typeMap.contains( contentsType ) ) return 0; for ( uint i = 0; i < attributes.count(); ++i ) { diff --git a/kmail/searchjob.cpp b/kmail/searchjob.cpp index a9eb35365..1a979d4f9 100644 --- a/kmail/searchjob.cpp +++ b/kmail/searchjob.cpp @@ -305,7 +305,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg ) // imap and local search have to match if ( mLocalSearchPattern->matches( msg ) && ( mImapSearchHits.isEmpty() || - mImapSearchHits.tqfind( TQString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) { + mImapSearchHits.find( TQString::number(msg->UID() ) ) != mImapSearchHits.end() ) ) { TQ_UINT32 serNum = msg->getMsgSerNum(); mSearchSerNums.append( serNum ); matches = true; @@ -313,7 +313,7 @@ void SearchJob::slotSearchMessageArrived( KMMessage* msg ) } else if ( mLocalSearchPattern->op() == KMSearchPattern::OpOr ) { // imap or local search have to match if ( mLocalSearchPattern->matches( msg ) || - mImapSearchHits.tqfind( TQString::number(msg->UID()) ) != mImapSearchHits.end() ) { + mImapSearchHits.find( TQString::number(msg->UID()) ) != mImapSearchHits.end() ) { TQ_UINT32 serNum = msg->getMsgSerNum(); mSearchSerNums.append( serNum ); matches = true; diff --git a/kmail/searchwindow.cpp b/kmail/searchwindow.cpp index 24d08a069..6250d761d 100644 --- a/kmail/searchwindow.cpp +++ b/kmail/searchwindow.cpp @@ -110,7 +110,7 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, KMFolder *curFolder, bool modal): KDialogBase(0, name, modal, i18n("Find Messages"), User1 | User2 | Close, User1, false, - KGuiItem( i18n("&Search"), "tqfind" ), + KGuiItem( i18n("&Search"), "find" ), KStdGuiItem::stop()), mStopped(false), mCloseRequested(false), @@ -494,7 +494,7 @@ void SearchWindow::slotSearch() TQString fullName = baseName; int count = 0; KMFolder *folder; - while ((folder = mgr->tqfind(fullName))) { + while ((folder = mgr->find(fullName))) { if (folder->storage()->inherits("KMFolderSearch")) break; fullName = TQString("%1 %2").tqarg(baseName).tqarg(++count); @@ -563,7 +563,7 @@ void SearchWindow::slotAddMsg(int idx) KMMessage *msg = mFolder->getMsg(idx); TQString from, fName; KMFolder *pFolder = msg->tqparent(); - if (!mFolders.tqcontains(pFolder)) { + if (!mFolders.contains(pFolder)) { mFolders.append(pFolder); pFolder->open("searchwindow"); } @@ -648,7 +648,7 @@ void SearchWindow::renameSearchFolder() int i = 1; TQString name = mSearchFolderEdt->text(); while (i < 100) { - if (!kmkernel->searchFolderMgr()->tqfind( name )) { + if (!kmkernel->searchFolderMgr()->find( name )) { mFolder->rename( name ); kmkernel->searchFolderMgr()->contentsChanged(); break; diff --git a/kmail/simplefoldertree.h b/kmail/simplefoldertree.h index 92545c665..00632fbde 100644 --- a/kmail/simplefoldertree.h +++ b/kmail/simplefoldertree.h @@ -50,7 +50,7 @@ static int recurseFilter( TQListViewItem * item, const TQString& filter, int col } if ( filter.length() == 0 || - item->text( column ).tqfind( filter, 0, false ) >= 0 ) { + item->text( column ).find( filter, 0, false ) >= 0 ) { item->setVisible( true ); ++enabled; } diff --git a/kmail/snippetwidget.cpp b/kmail/snippetwidget.cpp index 442a36e15..4dba053ed 100644 --- a/kmail/snippetwidget.cpp +++ b/kmail/snippetwidget.cpp @@ -146,7 +146,7 @@ SnippetItem* SnippetWidget::makeItem( SnippetItem* tqparent, const TQString& nam { SnippetItem * item = new SnippetItem(tqparent, name, text); const TQString actionName = i18n("Snippet %1").tqarg(name); - const TQString normalizedName = TQString(actionName).tqreplace(" ", "_"); + const TQString normalizedName = TQString(actionName).replace(" ", "_"); if ( !mActionCollection->action(normalizedName.utf8().data() ) ) { KAction * action = new KAction( actionName, shortcut, item, TQT_SLOT( slotExecute() ), mActionCollection, @@ -578,9 +578,9 @@ TQString SnippetWidget::parseText(TQString text, TQString del) TQRect rMulti = _SnippetConfig.getMultiRect(); do { - iFound = text.tqfind(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this TQRegExp + iFound = text.find(TQRegExp("\\"+del+"[A-Za-z-_0-9\\s]*\\"+del), iEnd+1); //find the next variable by this TQRegExp if (iFound >= 0) { - iEnd = text.tqfind(del, iFound+1)+1; + iEnd = text.find(del, iFound+1)+1; strName = text.mid(iFound, iEnd-iFound); if ( strName != del+del ) { //if not doubel-delimiter @@ -601,7 +601,7 @@ TQString SnippetWidget::parseText(TQString text, TQString del) } if (iInMeth == 0) { //if input-method "single" is selected - str.tqreplace(strName, strNew); + str.replace(strName, strNew); } mapVar[strName] = strNew; @@ -616,7 +616,7 @@ TQString SnippetWidget::parseText(TQString text, TQString del) if (showMultiVarDialog( &mapVar, &_mapSaved, w, bh, oh )) { //generate and show the dialog TQMap::Iterator it; for ( it = mapVar.begin(); it != mapVar.end(); ++it ) { //walk through the map and do the replacement - str.tqreplace(it.key(), it.data()); + str.replace(it.key(), it.data()); } } else { return ""; diff --git a/kmail/templateparser.cpp b/kmail/templateparser.cpp index 775d9a938..dab5665e0 100644 --- a/kmail/templateparser.cpp +++ b/kmail/templateparser.cpp @@ -126,7 +126,7 @@ TQString TemplateParser::getFName( const TQString &str ) // last resort -- return 'name' from 'name@domain' int sep_pos; TQString res; - if ( ( sep_pos = str.tqfind( '@' ) ) > 0 ) { + if ( ( sep_pos = str.find( '@' ) ) > 0 ) { int i; for ( i = (sep_pos - 1); i >= 0; --i ) { TQChar c = str[i]; @@ -136,7 +136,7 @@ TQString TemplateParser::getFName( const TQString &str ) break; } } - } else if ( ( sep_pos = str.tqfind(',') ) > 0 ) { + } else if ( ( sep_pos = str.find(',') ) > 0 ) { unsigned int i; bool begin = false; for ( i = sep_pos; i < str.length(); ++i ) { @@ -169,7 +169,7 @@ TQString TemplateParser::getLName( const TQString &str ) // else format is 'First Last' int sep_pos; TQString res; - if ( ( sep_pos = str.tqfind(',') ) > 0 ) { + if ( ( sep_pos = str.find(',') ) > 0 ) { int i; for ( i = sep_pos; i >= 0; --i ) { TQChar c = str[i]; @@ -180,7 +180,7 @@ TQString TemplateParser::getLName( const TQString &str ) } } } else { - if ( ( sep_pos = str.tqfind( ' ' ) ) > 0 ) { + if ( ( sep_pos = str.find( ' ' ) ) > 0 ) { unsigned int i; bool begin = false; for ( i = sep_pos; i < str.length(); ++i ) { @@ -963,7 +963,7 @@ void TemplateParser::addProcessedBodyToMessage( const TQString &body ) // Converting to a string here, since DwMediaType does not have a HasParameter() function TQString ctStr = ct.AsString().c_str(); - if ( !ctStr.lower().tqcontains( "name=" ) && !ctStr.lower().tqcontains( "filename=" ) ) { + if ( !ctStr.lower().contains( "name=" ) && !ctStr.lower().contains( "filename=" ) ) { DwParameter *nameParameter = new DwParameter; nameParameter->SetAttribute( "name" ); nameParameter->SetValue( Util::dwString( KMMsgBase::encodeRFC2231StringAutoDetectCharset( diff --git a/kmail/tests/messagedicttests.cpp b/kmail/tests/messagedicttests.cpp index e11bc3915..cdb24f6d8 100644 --- a/kmail/tests/messagedicttests.cpp +++ b/kmail/tests/messagedicttests.cpp @@ -42,7 +42,7 @@ void MessageDictTester::testKMDictInsert() p("Insert: "); KMDictItem *item = new KMDictItem(); m_dict->insert( 12345, item ); - KMDictItem *found = m_dict->tqfind( 12345 ); + KMDictItem *found = m_dict->find( 12345 ); CHECK( item, found); } @@ -50,7 +50,7 @@ void MessageDictTester::testKMDictRemove() { p("Remove: "); m_dict->remove( 12345 ); - KMDictItem *item = m_dict->tqfind( 12345 ); + KMDictItem *item = m_dict->find( 12345 ); CHECK( item, (KMDictItem*)0 ); } @@ -65,13 +65,13 @@ void MessageDictTester::testKMDictClear() void MessageDictTester::testKMDictReplace() { - p("Check tqreplace: "); + p("Check replace: "); m_dict->init( 31 ); KMDictItem *oldItem = new KMDictItem(); KMDictItem *newItem = new KMDictItem(); m_dict->insert( 12345, oldItem ); - m_dict->tqreplace( 12345, newItem ); - KMDictItem *found = m_dict->tqfind( 12345 ); + m_dict->replace( 12345, newItem ); + KMDictItem *found = m_dict->find( 12345 ); CHECK( found, newItem ); } diff --git a/kmail/tests/mimelibtests.cpp b/kmail/tests/mimelibtests.cpp index 34a4f4692..b152fdcf6 100644 --- a/kmail/tests/mimelibtests.cpp +++ b/kmail/tests/mimelibtests.cpp @@ -39,8 +39,8 @@ KUNITTEST_MODULE_REGISTER_TESTER( MimeLibTester ); static TQString makePrintable( const TQCString& str ) { TQString a = str; - a = a.tqreplace( '\r', "\\r" ); - a = a.tqreplace( '\n', "\\n" ); + a = a.replace( '\r', "\\r" ); + a = a.replace( '\n', "\\n" ); return a; } #endif @@ -48,8 +48,8 @@ static TQString makePrintable( const TQCString& str ) static TQString makePrintable( const DwString& str ) { TQString a = KMail::Util::CString( str ); // ## we assume latin1 - a = a.tqreplace( '\r', "\\r" ); - a = a.tqreplace( '\n', "\\n" ); + a = a.replace( '\r', "\\r" ); + a = a.replace( '\n', "\\n" ); return a; } diff --git a/kmail/tests/utiltests.cpp b/kmail/tests/utiltests.cpp index ec6c13543..d0b3135be 100644 --- a/kmail/tests/utiltests.cpp +++ b/kmail/tests/utiltests.cpp @@ -30,8 +30,8 @@ void UtilTester::tearDown() static TQString makePrintable( const TQCString& str ) { TQString a = str; - a = a.tqreplace( '\r', "\\r" ); - a = a.tqreplace( '\n', "\\n" ); + a = a.replace( '\r', "\\r" ); + a = a.replace( '\n', "\\n" ); return a; } static TQString makePrintable( const TQByteArray& arr ) diff --git a/kmail/tips b/kmail/tips index 9aef85361..1defde798 100644 --- a/kmail/tips +++ b/kmail/tips @@ -18,7 +18,7 @@ subject and mailing lists with Tools->Create Filter?

added to the subject of some mailing lists by using the rewrite header filter action? Just use
rewrite header "Subject"
-   tqreplace "\s*\[mailing list name\]\s*"
+   replace "\s*\[mailing list name\]\s*"
    with ""

@@ -60,7 +60,7 @@ in the first edit field of a search rule?

...that you can filter out HTML only messages with the rule -

"Content-type" tqcontains "text/html"?
+
"Content-type" contains "text/html"?

diff --git a/kmail/transportmanager.cpp b/kmail/transportmanager.cpp index bde290905..e80d1cb27 100644 --- a/kmail/transportmanager.cpp +++ b/kmail/transportmanager.cpp @@ -60,7 +60,7 @@ namespace KMail { do { newId = kapp->random(); - } while ( usedIds.tqfind(newId) != usedIds.end() ); + } while ( usedIds.find(newId) != usedIds.end() ); return newId; } diff --git a/kmail/urlhandlermanager.cpp b/kmail/urlhandlermanager.cpp index 0ef6bfd24..7b88c0291 100644 --- a/kmail/urlhandlermanager.cpp +++ b/kmail/urlhandlermanager.cpp @@ -732,7 +732,7 @@ namespace { Q_UNUSED( window ); Q_UNUSED( url ); const TQString kmailImagePath = locate( "data", "kmail/pics/" ); - if ( imagePath.tqcontains( kmailImagePath ) ) { + if ( imagePath.contains( kmailImagePath ) ) { // Do nothing, don't start a drag return true; } @@ -745,7 +745,7 @@ namespace { Q_UNUSED( window ); Q_UNUSED( url ); const TQString kmailImagePath = locate( "data", "kmail/pics/" ); - return imagePath.tqcontains( kmailImagePath ); + return imagePath.contains( kmailImagePath ); } } diff --git a/kmail/vacation.cpp b/kmail/vacation.cpp index d3440a975..cee3a3cb1 100644 --- a/kmail/vacation.cpp +++ b/kmail/vacation.cpp @@ -212,7 +212,7 @@ namespace { static const GenericInformationExtractor::StateNode spamNodes[] = { { 0, GIE::CommandStart, "if", 1, 0, 0 }, // 0 { 0, GIE::TestStart, "header", 2, 0, 0 }, // 1 - { 0, GIE::TaggedArgument, "tqcontains", 3, 0, 0 }, // 2 + { 0, GIE::TaggedArgument, "contains", 3, 0, 0 }, // 2 // accept both string and string-list: { 0, GIE::StringArgument, "x-spam-flag", 9, 4, "x-spam-flag" }, // 3 @@ -232,7 +232,7 @@ namespace { { 0, GIE::TestEnd, 0, 16, 0, 0 }, // 15 - // block of command, tqfind "stop", take nested if's into account: + // block of command, find "stop", take nested if's into account: { 0, GIE::BlockStart, 0, 17, 0, 0 }, // 16 { 1, GIE::CommandStart, "stop", 20, 19, "stop" }, // 17 { -1, GIE::Any, 0, 17, 0, 0 }, // 18 @@ -259,7 +259,7 @@ namespace { // to understand this table, study the output of // libksieve/tests/parsertest - // 'if not address :domain :tqcontains ["from"] ["mydomain.org"] { keep; stop; }' + // 'if not address :domain :contains ["from"] ["mydomain.org"] { keep; stop; }' static const GenericInformationExtractor::StateNode domainNodes[] = { { 0, GIE::CommandStart, "if", 1, 0, 0 }, // 0 { 0, GIE::TestStart, "not", 2, 0, 0, }, // 1 @@ -267,8 +267,8 @@ namespace { // :domain and :contains in arbitrary order: { 0, GIE::TaggedArgument, "domain", 4, 5, 0 }, // 3 - { 0, GIE::TaggedArgument, "tqcontains", 7, 0, 0 }, // 4 - { 0, GIE::TaggedArgument, "tqcontains", 6, 0, 0 }, // 5 + { 0, GIE::TaggedArgument, "contains", 7, 0, 0 }, // 4 + { 0, GIE::TaggedArgument, "contains", 6, 0, 0 }, // 5 { 0, GIE::TaggedArgument, "domain", 7, 0, 0 }, // 6 // accept both string and string-list: @@ -288,7 +288,7 @@ namespace { { 0, GIE::TestEnd, 0, 18, 0, 0 }, // 17 { 0, GIE::TestEnd, 0, 19, 0, 0 }, // 18 - // block of commands, tqfind "stop", take nested if's into account: + // block of commands, find "stop", take nested if's into account: { 0, GIE::BlockStart, 0, 20, 0, 0 }, // 19 { 1, GIE::CommandStart, "stop", 23, 22, "stop" }, // 20 { -1, GIE::Any, 0, 20, 0, 0 }, // 21 @@ -448,9 +448,9 @@ namespace KMail { static inline TQString dotstuff( TQString s ) { if ( s.startsWith( "." ) ) - return '.' + s.tqreplace( "\n.", "\n.." ); + return '.' + s.replace( "\n.", "\n.." ); else - return s.tqreplace( "\n.", "\n.." ); + return s.replace( "\n.", "\n.." ); } TQString Vacation::composeScript( const TQString & messageText, @@ -464,18 +464,18 @@ namespace KMail { addressesArgument += ":addresses [ "; TQStringList sl; for ( AddrSpecList::const_iterator it = addrSpecs.begin() ; it != addrSpecs.end() ; ++it ) { - sl.push_back( '"' + (*it).asString().tqreplace( '\\', "\\\\" ).tqreplace( '"', "\\\"" ) + '"' ); + sl.push_back( '"' + (*it).asString().replace( '\\', "\\\\" ).replace( '"', "\\\"" ) + '"' ); aliases.push_back( (*it).asString() ); } addressesArgument += sl.join( ", " ) + " ] "; } TQString script = TQString::tqfromLatin1("require \"vacation\";\n\n" ); if ( !sendForSpam ) - script += TQString::tqfromLatin1( "if header :tqcontains \"X-Spam-Flag\" \"YES\"" + script += TQString::tqfromLatin1( "if header :contains \"X-Spam-Flag\" \"YES\"" " { keep; stop; }\n" ); // FIXME? if ( !domain.isEmpty() ) // FIXME - script += TQString::tqfromLatin1( "if not address :domain :tqcontains \"from\" \"%1\" { keep; stop; }\n" ).tqarg( domain ); + script += TQString::tqfromLatin1( "if not address :domain :contains \"from\" \"%1\" { keep; stop; }\n" ).tqarg( domain ); script += "vacation "; script += addressesArgument; @@ -608,7 +608,7 @@ namespace KMail { mSieveJob = 0; // job deletes itself after returning from this slot! if ( !mCheckOnly && mUrl.protocol() == "sieve" && !job->sieveCapabilities().isEmpty() && - !job->sieveCapabilities().tqcontains("vacation") ) { + !job->sieveCapabilities().contains("vacation") ) { KMessageBox::sorry( 0, i18n("Your server did not list \"vacation\" in " "its list of supported Sieve extensions;\n" "without it, KMail cannot install out-of-" diff --git a/kmailcvt/filter_evolution.cxx b/kmailcvt/filter_evolution.cxx index e2d0ff50e..417dd8e58 100644 --- a/kmailcvt/filter_evolution.cxx +++ b/kmailcvt/filter_evolution.cxx @@ -128,14 +128,14 @@ void FilterEvolution::importMBox(FilterInfo *info, const TQString& mboxName, con info->setCurrent(0); if( mboxName.length() > 20 ) { TQString tmp_info = mboxName; - tmp_info = tmp_info.tqreplace( mailDir, ".." ); - if (tmp_info.tqcontains("subfolders/")) + tmp_info = tmp_info.replace( mailDir, ".." ); + if (tmp_info.contains("subfolders/")) tmp_info.remove("subfolders/"); info->setFrom( tmp_info ); tmp_from = tmp_info; } else info->setFrom(mboxName); - if(targetDir.tqcontains("subfolders/")) { + if(targetDir.contains("subfolders/")) { TQString tmp_info = targetDir; tmp_info.remove("subfolders/"); info->setTo(tmp_info); diff --git a/kmailcvt/filter_evolution_v2.cxx b/kmailcvt/filter_evolution_v2.cxx index 55a4817e9..29b636b90 100644 --- a/kmailcvt/filter_evolution_v2.cxx +++ b/kmailcvt/filter_evolution_v2.cxx @@ -164,13 +164,13 @@ void FilterEvolution_v2::importMBox(FilterInfo *info, const TQString& mboxName, info->setCurrent(0); if( mboxName.length() > 20 ) { TQString tmp_info = mboxName; - tmp_info = tmp_info.tqreplace( mailDir, "../" ); - if (tmp_info.tqcontains(".sbd")) + tmp_info = tmp_info.replace( mailDir, "../" ); + if (tmp_info.contains(".sbd")) tmp_info.remove(".sbd"); info->setFrom( tmp_info ); } else info->setFrom(mboxName); - if(targetDir.tqcontains(".sbd")) { + if(targetDir.contains(".sbd")) { TQString tmp_info = targetDir; tmp_info.remove(".sbd"); info->setTo(tmp_info); @@ -206,12 +206,12 @@ void FilterEvolution_v2::importMBox(FilterInfo *info, const TQString& mboxName, TQString destFolder; TQString _targetDir = targetDir; if(!targetDir.isNull()) { - if(_targetDir.tqcontains(".sbd")) + if(_targetDir.contains(".sbd")) _targetDir.remove(".sbd"); destFolder += "Evolution-Import/" + _targetDir + "/" + filenameInfo.baseName(TRUE); // mboxName; } else { destFolder = "Evolution-Import/" + rootDir; - if(destFolder.tqcontains(".sbd")) + if(destFolder.contains(".sbd")) destFolder.remove(".sbd"); } diff --git a/kmailcvt/filter_pmail.cxx b/kmailcvt/filter_pmail.cxx index bc412f345..52c5c7fc6 100644 --- a/kmailcvt/filter_pmail.cxx +++ b/kmailcvt/filter_pmail.cxx @@ -228,8 +228,8 @@ void FilterPMail::importUnixMailFolder(const TQString& file) int n = 0, l = 0; /** Get the folder name */ - s.tqreplace( TQRegExp("mbx$"), "pmg"); - s.tqreplace( TQRegExp("MBX$"), "PMG"); + s.replace( TQRegExp("mbx$"), "pmg"); + s.replace( TQRegExp("MBX$"), "PMG"); f.setName(s); if (! f.open( IO_ReadOnly ) ) { inf->alert( i18n("Unable to open %1, skipping").tqarg( s ) ); diff --git a/kmailcvt/filter_thebat.cxx b/kmailcvt/filter_thebat.cxx index 1ec747789..2ea7dc580 100644 --- a/kmailcvt/filter_thebat.cxx +++ b/kmailcvt/filter_thebat.cxx @@ -169,16 +169,16 @@ void FilterTheBat::importFiles( FilterInfo *info, const TQString& FileName) if (tbb.atEnd()) break; - iFound = _tmp.tqcontains(regexp); + iFound = _tmp.contains(regexp); if(!iFound) { - iFound = _tmp.tqfindRev("!"); + iFound = _tmp.findRev("!"); if (iFound >= 0 && ((l-iFound) < 5) ) { int _i = tbb.at(); tbb.at((_i - iFound)); } } else { ++count; - endOfEmail = (tbb.at() - l + _tmp.tqfind(regexp)); + endOfEmail = (tbb.at() - l + _tmp.find(regexp)); offsets.append(endOfEmail); } } diff --git a/kmailcvt/filter_thunderbird.cxx b/kmailcvt/filter_thunderbird.cxx index e0c4060eb..301d29d0e 100644 --- a/kmailcvt/filter_thunderbird.cxx +++ b/kmailcvt/filter_thunderbird.cxx @@ -165,13 +165,13 @@ void FilterThunderbird::importMBox(FilterInfo *info, const TQString& mboxName, c info->setCurrent(0); if( mboxName.length() > 20 ) { TQString tmp_info = mboxName; - tmp_info = tmp_info.tqreplace( mailDir, "../" ); - if (tmp_info.tqcontains(".sbd")) + tmp_info = tmp_info.replace( mailDir, "../" ); + if (tmp_info.contains(".sbd")) tmp_info.remove(".sbd"); info->setFrom( tmp_info ); } else info->setFrom(mboxName); - if(targetDir.tqcontains(".sbd")) { + if(targetDir.contains(".sbd")) { TQString tmp_info = targetDir; tmp_info.remove(".sbd"); info->setTo(tmp_info); @@ -207,12 +207,12 @@ void FilterThunderbird::importMBox(FilterInfo *info, const TQString& mboxName, c TQString destFolder; TQString _targetDir = targetDir; if(!targetDir.isNull()) { - if(_targetDir.tqcontains(".sbd")) + if(_targetDir.contains(".sbd")) _targetDir.remove(".sbd"); destFolder += "Thunderbird-Import/" + _targetDir + "/" + filenameInfo.baseName(TRUE);// mboxName; } else { destFolder = "Thunderbird-Import/" + rootDir; - if(destFolder.tqcontains(".sbd")) + if(destFolder.contains(".sbd")) destFolder.remove(".sbd"); } diff --git a/kmobile/devices/gnokii/gnokii_mobile.cpp b/kmobile/devices/gnokii/gnokii_mobile.cpp index 7ceb5ea7c..2fef0da67 100644 --- a/kmobile/devices/gnokii/gnokii_mobile.cpp +++ b/kmobile/devices/gnokii/gnokii_mobile.cpp @@ -378,7 +378,7 @@ static gn_error read_phone_entry_highlevel( int index, const gn_memory_type memt // try to split Name into FamilyName and GivenName s = TQString(entry.name).simplifyWhiteSpace(); a->setFormattedName(s); - if (s.tqfind(',')!=-1) { + if (s.find(',')!=-1) { addrlist = TQStringList::split(',', s); if (addrlist.count()==2) { a->setFamilyName(addrlist[0].simplifyWhiteSpace()); diff --git a/kmobile/devices/gnokii/gnokiiconfig.cpp b/kmobile/devices/gnokii/gnokiiconfig.cpp index f5bcd648e..e8ad19bdd 100644 --- a/kmobile/devices/gnokii/gnokiiconfig.cpp +++ b/kmobile/devices/gnokii/gnokiiconfig.cpp @@ -85,7 +85,7 @@ void GnokiiConfig::getValues(TQString &model, TQString &connection, TQString &po void GnokiiConfig::slotCheckValues(const TQString &txt) { - bool disable_serial = (TQString("infrared irda").tqfind(txt,0,false)>=0); + bool disable_serial = (TQString("infrared irda").find(txt,0,false)>=0); textLabelBaudRate->setDisabled(disable_serial); cb_Baud->setDisabled(disable_serial); } diff --git a/kmobile/kioslave/kio_mobile.cpp b/kmobile/kioslave/kio_mobile.cpp index 94d803306..cc7482072 100644 --- a/kmobile/kioslave/kio_mobile.cpp +++ b/kmobile/kioslave/kio_mobile.cpp @@ -405,7 +405,7 @@ int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQStr { PRINT_DEBUG << TQString("getVCard(%1)\n").tqarg(path); - int index = path.tqfind('.'); + int index = path.find('.'); if (index>0) index = path.left(index).toInt(); if (index<0 || index>=m_dev.numAddresses(devName)) @@ -494,7 +494,7 @@ int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQStri { PRINT_DEBUG << TQString("getNote(%1)\n").tqarg(path); - int index = path.tqfind('_'); + int index = path.find('_'); if (index>0) index = path.left(index).toInt(); if (index<0 || index>=m_dev.numNotes(devName)) diff --git a/kmobile/kmobileitem.cpp b/kmobile/kmobileitem.cpp index cb4473f80..5469902ee 100644 --- a/kmobile/kmobileitem.cpp +++ b/kmobile/kmobileitem.cpp @@ -39,7 +39,7 @@ KMobileItem::KMobileItem(TQIconView *tqparent, KConfig *_config, KService::Ptr s setText(service->name()); m_tqdeviceDesktopFile = service->desktopEntryName(); m_tqdeviceConfigFile = TQString("kmobile_%1_rc").tqarg(text()); - m_tqdeviceConfigFile = m_tqdeviceConfigFile.tqreplace(' ', ""); + m_tqdeviceConfigFile = m_tqdeviceConfigFile.replace(' ', ""); m_iconName = service->icon(); }; @@ -118,9 +118,9 @@ void KMobileItem::writeKonquMimeFile() const { // strip path and file extension of icon name TQString icon = m_iconName; - int p = icon.tqfindRev('/'); + int p = icon.findRev('/'); if (p>=0) icon = icon.mid(p+1); - p = icon.tqfind('.'); + p = icon.find('.'); if (p>=0) icon = icon.left(p); TQString comment; diff --git a/knode/ChangeLog b/knode/ChangeLog index 646df19d0..f9585f5f5 100644 --- a/knode/ChangeLog +++ b/knode/ChangeLog @@ -130,7 +130,7 @@ changes between 0.1.13 and 0.3.2 - ability to display attachments inline - posting of MIME multipart-messages (attachments) - significantly improved composer: - + all standard editor features (tqfind, tqreplace, select all, ...) + + all standard editor features (find, replace, select all, ...) + spellchecker + optional external editor + nice attachment handling diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp index b5586c33c..dde18d69a 100644 --- a/knode/articlewidget.cpp +++ b/knode/articlewidget.cpp @@ -473,7 +473,7 @@ void ArticleWidget::displayArticle() text->decodedText( htmlTxt, true, cfgMgr->readNewsViewer()->removeTrailingNewlines() ); if ( mShowHtml ) { // strip & - int i = kMin( htmlTxt.tqfindRev( "", -1, false ), htmlTxt.tqfindRev( "", -1, false ) ); + int i = kMin( htmlTxt.findRev( "", -1, false ), htmlTxt.findRev( "", -1, false ) ); if ( i >= 0 ) htmlTxt.truncate( i ); html += htmlTxt; @@ -527,7 +527,7 @@ void ArticleWidget::displayErrorMessage( const TQString &msg ) mViewer->write( "" ); mViewer->write( i18n("An error occurred.") ); mViewer->write( "

" ); - mViewer->write( errMsg.tqreplace( "\n", "
" ) ); + mViewer->write( errMsg.replace( "\n", "
" ) ); mViewer->write( ""); mViewer->end(); @@ -535,7 +535,7 @@ void ArticleWidget::displayErrorMessage( const TQString &msg ) KNConfigManager *cfgMgr = knGlobals.configManager(); if ( cfgMgr->readNewsGeneral()->autoMark() && mArticle && mArticle->type() == KMime::Base::ATremote && !mArticle->isOrphant() && - ( msg.tqfind("430") != -1 || msg.tqfind("423") != -1 ) ) { + ( msg.find("430") != -1 || msg.find("423") != -1 ) ) { KNRemoteArticle::List l; l.append( static_cast( mArticle ) ); knGlobals.articleManager()->setRead( l, true ); @@ -610,7 +610,7 @@ void ArticleWidget::displayHeader() headerHtml += toHtmlString( KGlobal::locale()->formatDateTime(date->qdt(), false, true), None ); } else if ( hb->is("Newsgroups") ) { TQString groups = hb->asUnicodeString(); - groups.tqreplace( ',', ", " ); + groups.replace( ',', ", " ); headerHtml += toHtmlString( groups, ParseURL ); } else headerHtml += toHtmlString( hb->asUnicodeString(), ParseURL ); @@ -837,8 +837,8 @@ void ArticleWidget::displayAttachment( KMime::Content *att, int partNum ) if ( label.isEmpty() ) label = i18n("unnamed" ); // if label consists of only whitespace replace them by underscores - if ( (uint)label.tqcontains( ' ' ) == label.length() ) - label.tqreplace( TQRegExp( " ", true, true ), "_" ); + if ( (uint)label.contains( ' ' ) == label.length() ) + label.replace( TQRegExp( " ", true, true ), "_" ); label = toHtmlString( label, None ); // attachment comment @@ -928,7 +928,7 @@ int ArticleWidget::quotingDepth( const TQString &line, const TQString "eChar // skip spaces if ( line[i].isSpace() ) continue; - if ( quoteChars.tqfind( line[i] ) != -1 ) + if ( quoteChars.find( line[i] ) != -1 ) ++level; else break; @@ -989,7 +989,7 @@ TQString ArticleWidget::writeAttachmentToTempFile( KMime::Content *att, int part // strip off a leading path KMime::Headers::ContentType* ct = att->contentType(); TQString attName = ct->name(); - int slashPos = attName.tqfindRev( '/' ); + int slashPos = attName.findRev( '/' ); if( -1 != slashPos ) attName = attName.mid( slashPos + 1 ); if( attName.isEmpty() ) @@ -1158,7 +1158,7 @@ void ArticleWidget::slotURLClicked( const KURL &url, bool forceOpen) int partNum = 0; if ( url.protocol() == "file" || url.protocol() == "part" ) { if ( url.protocol() == "file" ) { - if ( !mAttachementMap.tqcontains( url.path() ) ) + if ( !mAttachementMap.contains( url.path() ) ) return; partNum = mAttachementMap[url.path()]; } @@ -1444,7 +1444,7 @@ void ArticleWidget::slotSaveAttachment() return; int partNum = 0; if ( mCurrentURL.protocol() == "file" ) { - if ( !mAttachementMap.tqcontains( mCurrentURL.path() ) ) + if ( !mAttachementMap.contains( mCurrentURL.path() ) ) return; partNum = mAttachementMap[mCurrentURL.path()]; } diff --git a/knode/filters/1.fltr b/knode/filters/1.fltr index 16e644570..f66021cd3 100644 --- a/knode/filters/1.fltr +++ b/knode/filters/1.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data= -tqcontains=true +contains=true enabled=false regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=false EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/filters/2.fltr b/knode/filters/2.fltr index f9f7b84fa..7b11f48e2 100644 --- a/knode/filters/2.fltr +++ b/knode/filters/2.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data= -tqcontains=true +contains=true enabled=false regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=true EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/filters/3.fltr b/knode/filters/3.fltr index 82139623e..e7c3e0f6e 100644 --- a/knode/filters/3.fltr +++ b/knode/filters/3.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data= -tqcontains=true +contains=true enabled=false regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=false EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/filters/4.fltr b/knode/filters/4.fltr index ee6cb67b8..4972266fd 100644 --- a/knode/filters/4.fltr +++ b/knode/filters/4.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data= -tqcontains=true +contains=true enabled=false regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=false EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/filters/5.fltr b/knode/filters/5.fltr index 1386f4d7e..24ca696b0 100644 --- a/knode/filters/5.fltr +++ b/knode/filters/5.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data= -tqcontains=true +contains=true enabled=false regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=true EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/filters/6.fltr b/knode/filters/6.fltr index 867e80292..7ad3d6124 100644 --- a/knode/filters/6.fltr +++ b/knode/filters/6.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data= -tqcontains=true +contains=true enabled=false regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=false EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/filters/7.fltr b/knode/filters/7.fltr index 07f16f3b9..81fec0cde 100644 --- a/knode/filters/7.fltr +++ b/knode/filters/7.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data=%MYNAME -tqcontains=true +contains=true enabled=true regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=false EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/filters/8.fltr b/knode/filters/8.fltr index dc0859ff1..5978c616f 100644 --- a/knode/filters/8.fltr +++ b/knode/filters/8.fltr @@ -6,7 +6,7 @@ val1=0 val2=0 [FROM] Data=%MYNAME -tqcontains=true +contains=true enabled=true regX=false [GENERAL] @@ -37,6 +37,6 @@ EN_R=false EN_US=false [SUBJECT] Data= -tqcontains=true +contains=true enabled=false regX=false diff --git a/knode/knaccountmanager.cpp b/knode/knaccountmanager.cpp index b62679a2f..01678265d 100644 --- a/knode/knaccountmanager.cpp +++ b/knode/knaccountmanager.cpp @@ -127,7 +127,7 @@ bool KNAccountManager::newAccount(KNNntpAccount *a) TQStringList entries(d.entryList("nntp.*", TQDir::Dirs)); int id = 1; - while (entries.tqfindIndex(TQString("nntp.%1").tqarg(id))!=-1) + while (entries.findIndex(TQString("nntp.%1").tqarg(id))!=-1) ++id; a->setId(id); diff --git a/knode/knarticle.cpp b/knode/knarticle.cpp index a46b98380..e253d2ef8 100644 --- a/knode/knarticle.cpp +++ b/knode/knarticle.cpp @@ -453,7 +453,7 @@ void KNAttachment::setMimeType(const TQString &s) m_imeType=s.latin1(); h_asChanged=true; - if(m_imeType.tqfind("text/", 0, false)==-1) { + if(m_imeType.find("text/", 0, false)==-1) { f_b64=true; e_ncoding.setCte(Headers::CEbase64); } diff --git a/knode/knarticlefactory.cpp b/knode/knarticlefactory.cpp index 37c1b4961..53eabd8bb 100644 --- a/knode/knarticlefactory.cpp +++ b/knode/knarticlefactory.cpp @@ -210,12 +210,12 @@ void KNArticleFactory::createReply(KNRemoteArticle *a, TQString selectedText, bo TQString name(a->from()->name()); if (name.isEmpty()) name = TQString::tqfromLatin1(a->from()->email()); - attribution.tqreplace(TQRegExp("%NAME"),name); - attribution.tqreplace(TQRegExp("%EMAIL"),TQString::tqfromLatin1(a->from()->email())); - attribution.tqreplace(TQRegExp("%DATE"),KGlobal::locale()->formatDateTime(a->date()->qdt(),false)); - attribution.tqreplace(TQRegExp("%MSID"),a->messageID()->asUnicodeString()); - attribution.tqreplace(TQRegExp("%GROUP"),g->groupname()); - attribution.tqreplace(TQRegExp("%L"),"\n"); + attribution.replace(TQRegExp("%NAME"),name); + attribution.replace(TQRegExp("%EMAIL"),TQString::tqfromLatin1(a->from()->email())); + attribution.replace(TQRegExp("%DATE"),KGlobal::locale()->formatDateTime(a->date()->qdt(),false)); + attribution.replace(TQRegExp("%MSID"),a->messageID()->asUnicodeString()); + attribution.replace(TQRegExp("%GROUP"),g->groupname()); + attribution.replace(TQRegExp("%L"),"\n"); attribution+="\n\n"; TQString quoted=attribution; @@ -876,11 +876,11 @@ KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, TQString &sig, T TQString name(origPost->from()->name()); if (name.isEmpty()) name = TQString::tqfromLatin1(origPost->from()->email()); - value.tqreplace(TQRegExp("%NAME"), name); - value.tqreplace(TQRegExp("%EMAIL"), TQString::tqfromLatin1(origPost->from()->email())); + value.replace(TQRegExp("%NAME"), name); + value.replace(TQRegExp("%EMAIL"), TQString::tqfromLatin1(origPost->from()->email())); } else - if(value.tqfind("%NAME") != -1 || value.tqfind("%EMAIL") != -1) + if(value.find("%NAME") != -1 || value.find("%EMAIL") != -1) continue; art->setHeader( new KMime::Headers::Generic( (TQCString("X-")+(*it).name()), art, value, pnt->charset() ) ); diff --git a/knode/knarticlemanager.cpp b/knode/knarticlemanager.cpp index 625f22f06..e871b1f5c 100644 --- a/knode/knarticlemanager.cpp +++ b/knode/knarticlemanager.cpp @@ -99,7 +99,7 @@ void KNArticleManager::saveArticleToFile(KNArticle *a, TQWidget *tqparent) else s.append(' '); fName = s.simplifyWhiteSpace(); - fName.tqreplace(TQRegExp("[\\s]"),"_"); + fName.replace(TQRegExp("[\\s]"),"_"); KNSaveHelper helper(fName,tqparent); TQFile *file = helper.getFile(i18n("Save Article")); diff --git a/knode/kncollectionviewitem.cpp b/knode/kncollectionviewitem.cpp index 0be47ddc3..245ea7778 100644 --- a/knode/kncollectionviewitem.cpp +++ b/knode/kncollectionviewitem.cpp @@ -157,10 +157,10 @@ TQString KNCollectionViewItem::squeezeFolderName( const TQString &text, int curPos = 0, nextPos = 0; TQString temp; while ( (uint)fm.width(t) > width && nextPos != -1 ) { - nextPos = t.tqfind('.', curPos); + nextPos = t.find('.', curPos); if ( nextPos != -1 ) { temp = t[curPos]; - t.tqreplace( curPos, nextPos - curPos, temp ); + t.replace( curPos, nextPos - curPos, temp ); curPos += 2; } } diff --git a/knode/kncomposer.cpp b/knode/kncomposer.cpp index 160ab38e5..60564d39d 100644 --- a/knode/kncomposer.cpp +++ b/knode/kncomposer.cpp @@ -343,7 +343,7 @@ KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString & if (firstEdit) { // now we place the cursor at the end of the quoted text / below the attribution line if (knGlobals.configManager()->postNewsComposer()->cursorOnTop()) { - int numLines = knGlobals.configManager()->postNewsComposer()->intro().tqcontains("%L"); + int numLines = knGlobals.configManager()->postNewsComposer()->intro().contains("%L"); v_iew->e_dit->setCursorPosition(numLines+1,0); } else @@ -411,7 +411,7 @@ int KNComposer::listOfResultOfCheckWord( const TQStringList & lst , const TQStri createGUI("kncomposerui.rc", false); unplugActionList("spell_result" ); m_listAction.clear(); - if ( !lst.tqcontains( selectWord ) ) + if ( !lst.contains( selectWord ) ) { TQStringList::ConstIterator it = lst.begin(); for ( ; it != lst.end() ; ++it ) @@ -534,7 +534,7 @@ void KNComposer::setMessageMode(MessageMode mode) if (m_ode == news_mail) { TQString s = v_iew->e_dit->textLine(0); - if (!s.tqcontains(i18n(""))) + if (!s.contains(i18n(""))) v_iew->e_dit->insertAt(i18n("\n\n"),0,0); } else { if (v_iew->e_dit->textLine(0)==i18n("")) { @@ -1173,7 +1173,7 @@ void KNComposer::slotToggleDoMail() if (knGlobals.configManager()->postNewsTechnical()->useExternalMailer()) { TQString s = v_iew->e_dit->textLine(0); - if (!s.tqcontains(i18n(""))) + if (!s.contains(i18n(""))) v_iew->e_dit->insertAt(i18n("\n\n"),0,0); TQString tmp; TQStringList textLines = v_iew->e_dit->processedText(); @@ -1293,8 +1293,8 @@ void KNComposer::slotExternalEditor() TQStringList command = TQStringList::split(' ',editorCommand); bool filenameAdded=false; for ( TQStringList::Iterator it = command.begin(); it != command.end(); ++it ) { - if ((*it).tqcontains("%f")) { - (*it).tqreplace(TQRegExp("%f"),e_ditorTempfile->name()); + if ((*it).contains("%f")) { + (*it).replace(TQRegExp("%f"),e_ditorTempfile->name()); filenameAdded=true; } (*e_xternalEditor) << (*it); @@ -1424,8 +1424,8 @@ void KNComposer::slotSubjectChanged(const TQString &t) { // replace newlines TQString subject = t; - subject.tqreplace( '\n', ' ' ); - subject.tqreplace( '\r', ' ' ); + subject.replace( '\n', ' ' ); + subject.replace( '\r', ' ' ); if ( subject != t ) // setText() sets the cursor to the end v_iew->s_ubject->setText( subject ); // update caption @@ -2046,13 +2046,13 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e) if( !paraText.at(charPos).isSpace() ) { //Get word right clicked on - firstSpace = paraText.tqfindRev( m_bound, charPos ) + 1; - lastSpace = paraText.tqfind( m_bound, charPos ); + firstSpace = paraText.findRev( m_bound, charPos ) + 1; + lastSpace = paraText.find( m_bound, charPos ); if( lastSpace == -1 ) lastSpace = paraText.length(); TQString word = paraText.mid( firstSpace, lastSpace - firstSpace ); //Continue if this word was misspelled - if( !word.isEmpty() && m_replacements.tqcontains( word ) ) + if( !word.isEmpty() && m_replacements.contains( word ) ) { KPopupMenu p; p.insertTitle( i18n("Suggestions") ); @@ -2140,9 +2140,9 @@ TQStringList KNComposer::Editor::processedText() TQString replacement; int tabPos; for (TQStringList::Iterator it = ret.begin(); it != ret.end(); ++it ) { - while ((tabPos=(*it).tqfind('\t'))!=-1) { + while ((tabPos=(*it).find('\t'))!=-1) { replacement.fill(TQChar(' '), 8-(tabPos%8)); - (*it).tqreplace(tabPos, 1, replacement); + (*it).replace(tabPos, 1, replacement); } } @@ -2159,7 +2159,7 @@ void KNComposer::Editor::slotPasteAsQuotation() s[i] = ' '; } s.prepend("> "); - s.tqreplace(TQRegExp("\n"),"\n> "); + s.replace(TQRegExp("\n"),"\n> "); insert(s); } } @@ -2186,7 +2186,7 @@ void KNComposer::Editor::slotAddQuotes() if (hasMarkedText()) { TQString s = markedText(); s.prepend("> "); - s.tqreplace(TQRegExp("\n"),"\n> "); + s.replace(TQRegExp("\n"),"\n> "); insert(s); } else { int l = currentLine(); @@ -2206,7 +2206,7 @@ void KNComposer::Editor::slotRemoveQuotes() TQString s = markedText(); if (s.left(2) == "> ") s.remove(0,2); - s.tqreplace(TQRegExp("\n> "),"\n"); + s.replace(TQRegExp("\n> "),"\n"); insert(s); } else { int l = currentLine(); @@ -2227,7 +2227,7 @@ void KNComposer::Editor::slotAddBox() if (hasMarkedText()) { TQString s = markedText(); s.prepend(",----[ ]\n"); - s.tqreplace(TQRegExp("\n"),"\n| "); + s.replace(TQRegExp("\n"),"\n| "); s.append("\n`----"); insert(s); } else { @@ -2245,9 +2245,9 @@ void KNComposer::Editor::slotRemoveBox() { if (hasMarkedText()) { TQString s = TQString::tqfromLatin1("\n") + markedText() + TQString::tqfromLatin1("\n"); - s.tqreplace(TQRegExp("\n,----[^\n]*\n"),"\n"); - s.tqreplace(TQRegExp("\n| "),"\n"); - s.tqreplace(TQRegExp("\n`----[^\n]*\n"),"\n"); + s.replace(TQRegExp("\n,----[^\n]*\n"),"\n"); + s.replace(TQRegExp("\n| "),"\n"); + s.replace(TQRegExp("\n`----[^\n]*\n"),"\n"); s.remove(0,1); s.truncate(s.length()-1); insert(s); @@ -2261,7 +2261,7 @@ void KNComposer::Editor::slotRemoveBox() setAutoUpdate(false); - // tqfind & remove box begin + // find & remove box begin int x = l; while ((x>=0)&&(textLine(x).left(5)!=",----")) x--; @@ -2278,7 +2278,7 @@ void KNComposer::Editor::slotRemoveBox() } } - // tqfind & remove box end + // find & remove box end x = l; while ((xtext().tqfind('/')==-1) { + if(m_imeType->text().find('/')==-1) { KMessageBox::sorry(this, i18n("You have set an invalid mime-type.\nPlease change it.")); return; } - else if(n_onTextAsText && m_imeType->text().tqfind("text/", 0, false)!=-1 && + else if(n_onTextAsText && m_imeType->text().find("text/", 0, false)!=-1 && KMessageBox::warningContinueCancel(this, i18n("You have changed the mime-type of this non-textual attachment\nto text. This might cause an error while loading or encoding the file.\nProceed?") ) == KMessageBox::Cancel) return; diff --git a/knode/kncomposerui.rc b/knode/kncomposerui.rc index 4e0ec378d..0a203d266 100644 --- a/knode/kncomposerui.rc +++ b/knode/kncomposerui.rc @@ -20,9 +20,9 @@ - + - +
&Attach @@ -91,8 +91,8 @@ - - + + Spell Result diff --git a/knode/knconfig.cpp b/knode/knconfig.cpp index 608e625a9..a16e459f0 100644 --- a/knode/knconfig.cpp +++ b/knode/knconfig.cpp @@ -149,7 +149,7 @@ TQString KNConfig::Identity::getSignature() else s_igContents = s_igText; - if (!s_igContents.isEmpty() && !s_igContents.tqcontains("\n-- \n") && !(s_igContents.left(4) == "-- \n")) + if (!s_igContents.isEmpty() && !s_igContents.contains("\n-- \n") && !(s_igContents.left(4) == "-- \n")) s_igContents.prepend("-- \n"); return s_igContents; @@ -801,7 +801,7 @@ void KNConfig::DisplayedHeaders::remove(KNDisplayedHeader *h) void KNConfig::DisplayedHeaders::up(KNDisplayedHeader *h) { - int idx = mHeaderList.tqfindIndex( h ); + int idx = mHeaderList.findIndex( h ); if ( idx != -1 ) { mHeaderList.remove( mHeaderList.at( idx ) ); mHeaderList.insert( mHeaderList.at( idx - 1 ), h ); @@ -812,7 +812,7 @@ void KNConfig::DisplayedHeaders::up(KNDisplayedHeader *h) void KNConfig::DisplayedHeaders::down(KNDisplayedHeader *h) { - int idx = mHeaderList.tqfindIndex( h ); + int idx = mHeaderList.findIndex( h ); if ( idx != -1 ) { mHeaderList.remove( mHeaderList.at( idx ) ); mHeaderList.insert( mHeaderList.at( idx + 1 ), h ); @@ -862,7 +862,7 @@ void KNConfig::Scoring::save() KNConfig::XHeader::XHeader(const TQString &s) { if(s.left(2)=="X-") { - int pos=s.tqfind(": "); + int pos=s.find(": "); if(pos!=-1) { n_ame=s.mid(2, pos-2).latin1(); pos+=2; @@ -999,7 +999,7 @@ int KNConfig::PostNewsTechnical::indexForCharset(const TQCString &str) TQCString KNConfig::PostNewsTechnical::findComposerCharset(TQCString cs) { - TQCString *ret=findComposerCSCache.tqfind(cs); + TQCString *ret=findComposerCSCache.find(cs); if (ret) return *ret; diff --git a/knode/knconfigwidgets.cpp b/knode/knconfigwidgets.cpp index dd7012c2c..a915fe17f 100644 --- a/knode/knconfigwidgets.cpp +++ b/knode/knconfigwidgets.cpp @@ -2131,7 +2131,7 @@ KNConfig::XHeaderConfDialog::XHeaderConfDialog(const TQString &h, TQWidget *p, c new TQLabel(":", page); v_alue=new KLineEdit(page); - int pos=h.tqfind(": ", 2); + int pos=h.find(": ", 2); if(pos!=-1) { n_ame->setText(h.mid(2, pos-2)); pos+=2; @@ -2157,7 +2157,7 @@ TQString KNConfig::XHeaderConfDialog::result() { TQString value = v_alue->text(); // just in case someone pastes a newline - value.tqreplace( '\n', ' ' ); + value.replace( '\n', ' ' ); return TQString( "X-%1: %2" ).tqarg( n_ame->text() ).tqarg( value ); } diff --git a/knode/knconvert.cpp b/knode/knconvert.cpp index da039f54a..70d447034 100644 --- a/knode/knconvert.cpp +++ b/knode/knconvert.cpp @@ -405,7 +405,7 @@ int KNConvert::Converter04::convertFolder(TQString srcPrefix, TQString dstPrefix buff.tqat(readBytes)='\0'; //terminate string; //remove "X-KNode-Overview" - int pos=buff.tqfind('\n'); + int pos=buff.find('\n'); if(pos>-1) buff.remove(0, pos+1); diff --git a/knode/knfiltermanager.cpp b/knode/knfiltermanager.cpp index 70f00b711..67302063a 100644 --- a/knode/knfiltermanager.cpp +++ b/knode/knfiltermanager.cpp @@ -205,7 +205,7 @@ void KNFilterManager::addFilter(KNArticleFilter *f) for ( TQValueList::Iterator it = mFilterList.begin(); it != mFilterList.end(); ++it ) activeFilters << (*it)->id(); int newId = 1; - while ( activeFilters.tqcontains( newId ) > 0 ) + while ( activeFilters.contains( newId ) > 0 ) newId++; f->setId( newId ); } @@ -369,7 +369,7 @@ void KNFilterManager::slotShowFilterChooser() int currentItem=0; if (currFilter) - currentItem=ids.tqfindIndex(currFilter->id()); + currentItem=ids.findIndex(currFilter->id()); if (currentItem==-1) currentItem=0; diff --git a/knode/knfolder.cpp b/knode/knfolder.cpp index e9839b994..68a43dcea 100644 --- a/knode/knfolder.cpp +++ b/knode/knfolder.cpp @@ -244,8 +244,8 @@ bool KNFolder::loadHdrs() //set overview bool end=false; - pos1=tmp.tqfind(' ')+1; - pos2=tmp.tqfind('\t', pos1); + pos1=tmp.find(' ')+1; + pos2=tmp.find('\t', pos1); if (pos2 == -1) { pos2=tmp.length(); end=true; @@ -254,7 +254,7 @@ bool KNFolder::loadHdrs() if (!end) { pos1=pos2+1; - pos2=tmp.tqfind('\t', pos1); + pos2=tmp.find('\t', pos1); if (pos2 == -1) { pos2=tmp.length(); end=true; @@ -264,7 +264,7 @@ bool KNFolder::loadHdrs() if (!end) { pos1=pos2+1; - pos2=tmp.tqfind('\t', pos1); + pos2=tmp.find('\t', pos1); if (pos2 == -1) { pos2=tmp.length(); end=true; diff --git a/knode/kngroup.cpp b/knode/kngroup.cpp index aad26b8b3..a6b3e6619 100644 --- a/knode/kngroup.cpp +++ b/knode/kngroup.cpp @@ -254,7 +254,7 @@ bool KNGroup::loadHdrs() // following lines contain one header per line for (uint i = buff.toUInt(); i > 0; --i) { buff = f.readLine(); - int pos = buff.tqfind(':'); + int pos = buff.find(':'); TQCString hdrName = buff.left( pos ); // skip headers we already set above and which we actually never should // find here, but however it still happens... (eg. #101355) @@ -457,10 +457,10 @@ void KNGroup::insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolCli if (!split.next()) break; data = split.string(); - int pos = hdr.tqfind(':'); + int pos = hdr.find(':'); hdrName = hdr.left( pos ); // if the header format is 'full' we have to strip the header name - if (hdr.tqfindRev("full") == (int)(hdr.length() - 4)) + if (hdr.findRev("full") == (int)(hdr.length() - 4)) data = data.right( data.length() - (hdrName.length() + 2) ); // add header @@ -558,7 +558,7 @@ int KNGroup::saveStaticData(int cnt,bool ovr) // optional headers ts << mOptionalHeaders.count() << '\n'; for (TQCString hdrName = mOptionalHeaders.first(); !hdrName.isNull(); hdrName = mOptionalHeaders.next()) { - hdrName = hdrName.left( hdrName.tqfind(':') ); + hdrName = hdrName.left( hdrName.find(':') ); KMime::Headers::Base *hdr = art->getHeaderByType( hdrName ); if ( hdr ) ts << hdrName << ": " << hdr->asUnicodeString() << '\n'; @@ -701,7 +701,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client) art=at(idx); if(art->threadingLevel()>1) { oldRef=art->idRef(); - ref=tqfindReference(art); + ref=findReference(art); if(ref) { // this method is called from the nntp-thread!!! #ifndef NDEBUG @@ -720,7 +720,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client) if(art->idRef()==-1 && !art->references()->isEmpty() ){ //hdr has references refCnt++; - if(tqfindReference(art)) + if(findReference(art)) foundCnt++; } else { @@ -866,7 +866,7 @@ void KNGroup::buildThreads(int cnt, KNProtocolClient *client) } -KNRemoteArticle* KNGroup::tqfindReference(KNRemoteArticle *a) +KNRemoteArticle* KNGroup::findReference(KNRemoteArticle *a) { int found=false; TQCString ref_mid; diff --git a/knode/kngroup.h b/knode/kngroup.h index b0c31f93f..387ff0f6e 100644 --- a/knode/kngroup.h +++ b/knode/kngroup.h @@ -134,7 +134,7 @@ class KNGroup : public KNArticleCollection , public KNJobItem { protected: void buildThreads(int cnt, KNProtocolClient *client=0); - KNRemoteArticle* tqfindReference(KNRemoteArticle *a); + KNRemoteArticle* findReference(KNRemoteArticle *a); int n_ewCount, l_astFetchCount, diff --git a/knode/kngroupbrowser.cpp b/knode/kngroupbrowser.cpp index c3ab27d98..584eae40c 100644 --- a/knode/kngroupbrowser.cpp +++ b/knode/kngroupbrowser.cpp @@ -217,7 +217,7 @@ void KNGroupBrowser::createListItems(TQListViewItem *tqparent) compare=gn->name.mid(prefix.length()); if(!expandit || !compare.startsWith(tlgn)) { - if((colon=compare.tqfind('.'))!=-1) { + if((colon=compare.find('.'))!=-1) { colon++; expandit=true; } else { @@ -316,7 +316,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt) bool notCheckNew = !newCB->isChecked(); bool notCheckStr = (filtertxt.isEmpty()); - bool isRegexp = filtertxt.tqcontains(TQRegExp("[^a-z0-9\\-\\+.]")); + bool isRegexp = filtertxt.contains(TQRegExp("[^a-z0-9\\-\\+.]")); bool doIncrementalUpdate = (!isRegexp && incrementalFilter && (filtertxt.left(lastFilter.length())==lastFilter)); @@ -327,7 +327,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt) for(KNGroupInfo *g=matchList->first(); g; g=matchList->next()) { if ((notCheckSub||g->subscribed)&& (notCheckNew||g->newGroup)&& - (notCheckStr||(g->name.tqfind(filtertxt)!=-1))) + (notCheckStr||(g->name.find(filtertxt)!=-1))) tempList->append(g); } @@ -339,7 +339,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt) for(KNGroupInfo *g=allList->first(); g; g=allList->next()) { if ((notCheckSub||g->subscribed)&& (notCheckNew||g->newGroup)&& - (notCheckStr||(isRegexp? (reg.search(g->name,0) != -1):(g->name.tqfind(filtertxt)!=-1)))) + (notCheckStr||(isRegexp? (reg.search(g->name,0) != -1):(g->name.find(filtertxt)!=-1)))) matchList->append(g); } } @@ -411,7 +411,7 @@ KNGroupBrowser::CheckItem::CheckItem(TQListView *v, const KNGroupInfo &gi, KNGro TQString des(gi.description); if (gi.status == KNGroup::moderated) { setText(0,gi.name+" (m)"); - if (!des.upper().tqcontains(i18n("moderated").upper())) + if (!des.upper().contains(i18n("moderated").upper())) des+=i18n(" (moderated)"); } setText(1,des); @@ -424,7 +424,7 @@ KNGroupBrowser::CheckItem::CheckItem(TQListViewItem *i, const KNGroupInfo &gi, K TQString des(gi.description); if (gi.status == KNGroup::moderated) { setText(0,gi.name+" (m)"); - if (!des.upper().tqcontains(i18n("moderated").upper())) + if (!des.upper().contains(i18n("moderated").upper())) des+=i18n(" (moderated)"); } setText(1,des); diff --git a/knode/kngroupmanager.cpp b/knode/kngroupmanager.cpp index 151efa0f0..c0677a0ad 100644 --- a/knode/kngroupmanager.cpp +++ b/knode/kngroupmanager.cpp @@ -111,7 +111,7 @@ bool KNGroupListData::readIn(KNProtocolClient *client) if(f.open(IO_ReadOnly)) { while(!f.atEnd()) { line = f.readLine(); - sepPos1 = line.tqfind(' '); + sepPos1 = line.find(' '); if (sepPos1==-1) { // no description name = TQString::fromUtf8(line); @@ -120,7 +120,7 @@ bool KNGroupListData::readIn(KNProtocolClient *client) } else { name = TQString::fromUtf8(line.left(sepPos1)); - sepPos2 = line.tqfind(' ',sepPos1+1); + sepPos2 = line.find(' ',sepPos1+1); if (sepPos2==-1) { // no status description = TQString::fromUtf8(line.right(line.length()-sepPos1-1)); status = KNGroup::unknown; @@ -139,7 +139,7 @@ bool KNGroupListData::readIn(KNProtocolClient *client) } } - if (subscribed.tqcontains(name)) { + if (subscribed.contains(name)) { subscribed.remove(name); // group names are unique, we wont find it again anyway... sub = true; } else @@ -201,7 +201,7 @@ void KNGroupListData::merge(TQSortedList* newGroups) bool subscribed; for (KNGroupInfo *i=newGroups->first(); i; i=newGroups->next()) { - if (groups->tqfind(i)>=0) { + if (groups->find(i)>=0) { subscribed = groups->current()->subscribed; groups->remove(); // avoid duplicates } else diff --git a/knode/knmainwidget.cpp b/knode/knmainwidget.cpp index 5ea58757c..2214cb836 100644 --- a/knode/knmainwidget.cpp +++ b/knode/knmainwidget.cpp @@ -484,7 +484,7 @@ void KNMainWidget::openURL(const KURL &url) } if (acc) { - bool isMID=(url.url().tqcontains('@')==1); + bool isMID=(url.url().contains('@')==1); if (!isMID) { TQString groupname=url.path(-1); @@ -678,7 +678,7 @@ void KNMainWidget::initActions() a_ctArtFilter->setShortcutConfigurable(false); a_ctArtFilterKeyb = new KAction(i18n("Filter"), Key_F6, actionCollection(), "view_Filter_Keyb"); a_ctArtFilterKeyb->plugAccel(a_ccel); - a_ctArtSearch = new KAction(i18n("&Search Articles..."),"mail_tqfind" , Key_F4 , TQT_TQOBJECT(this), + a_ctArtSearch = new KAction(i18n("&Search Articles..."),"mail_find" , Key_F4 , TQT_TQOBJECT(this), TQT_SLOT(slotArtSearch()), actionCollection(), "article_search"); a_ctArtRefreshList = new KAction(i18n("&Refresh List"),"reload", KStdAccel::shortcut(KStdAccel::Reload), TQT_TQOBJECT(this), TQT_SLOT(slotArtRefreshList()), actionCollection(), "view_Refresh"); @@ -963,7 +963,7 @@ void KNMainWidget::getSelectedThreads(KNRemoteArticle::List &l) art=static_cast ((static_cast(i))->art); // ignore the article if it is already in the list // (multiple aritcles are selected in one thread) - if ( l.tqfind(art) == l.end() ) + if ( l.find(art) == l.end() ) art->thread(l); } } @@ -1946,8 +1946,8 @@ void KNMainWidget::slotFetchArticleWithID() if (dlg->exec()) { TQString id = dlg->messageId().simplifyWhiteSpace(); - if (id.tqfind(TQRegExp("*@*",false,true))!=-1) { - if (id.tqfind(TQRegExp("<*>",false,true))==-1) // add "<>" when necessary + if (id.find(TQRegExp("*@*",false,true))!=-1) { + if (id.find(TQRegExp("<*>",false,true))==-1) // add "<>" when necessary id = TQString("<%1>").tqarg(id); if(!KNArticleWindow::raiseWindowForArticle(id.latin1())) { //article not yet opened diff --git a/knode/knnntpclient.cpp b/knode/knnntpclient.cpp index b81f13485..26473b6a1 100644 --- a/knode/knnntpclient.cpp +++ b/knode/knnntpclient.cpp @@ -115,7 +115,7 @@ void KNNntpClient::doFetchGroups() name = TQString::fromUtf8(line); - if (target->subscribed.tqcontains(name)) { + if (target->subscribed.contains(name)) { target->subscribed.remove(name); // group names are unique, we wont find it again anyway... subscribed = true; } else @@ -523,9 +523,9 @@ void KNNntpClient::doPostArticle() if (art->messageID(false)==0) { // article has no message ID => search for a ID in the response TQCString s = getCurrentLine(); - int start = s.tqfindRev(TQRegExp("<[^\\s]*@[^\\s]*>")); + int start = s.findRev(TQRegExp("<[^\\s]*@[^\\s]*>")); if (start != -1) { // post response includes a recommended id - int end = s.tqfind('>',start); + int end = s.find('>',start); art->messageID()->from7BitString(s.mid(start,end-start+1)); art->assemble(); #ifndef NDEBUG diff --git a/knode/knsearchdialog.cpp b/knode/knsearchdialog.cpp index 5f8ff1ada..72e98dd1f 100644 --- a/knode/knsearchdialog.cpp +++ b/knode/knsearchdialog.cpp @@ -36,7 +36,7 @@ KNSearchDialog::KNSearchDialog(searchType /*t*/, TQWidget *tqparent) setIcon(SmallIcon("knode")); TQGroupBox *bg=new TQGroupBox(this); - startBtn=new TQPushButton(SmallIcon("mail_tqfind"),i18n("Sea&rch"), bg); + startBtn=new TQPushButton(SmallIcon("mail_find"),i18n("Sea&rch"), bg); startBtn->setDefault(true); newBtn=new TQPushButton(SmallIcon("editclear"),i18n("C&lear"), bg); closeBtn=new KPushButton(KStdGuiItem::close(), bg); diff --git a/knode/knserverinfo.cpp b/knode/knserverinfo.cpp index 5b7dc407c..c0351349b 100644 --- a/knode/knserverinfo.cpp +++ b/knode/knserverinfo.cpp @@ -78,9 +78,9 @@ void KNServerInfo::readConf(KConfig *conf) readPassword(); TQString encStr = conf->readEntry( "encryption", "None" ); - if ( encStr.tqcontains( "SSL", false ) ) + if ( encStr.contains( "SSL", false ) ) mEncryption = SSL; - else if ( encStr.tqcontains( "TLS", false ) ) + else if ( encStr.contains( "TLS", false ) ) mEncryption = TLS; else mEncryption = None; diff --git a/knode/knstringfilter.cpp b/knode/knstringfilter.cpp index 1570da040..51fdc1bd3 100644 --- a/knode/knstringfilter.cpp +++ b/knode/knstringfilter.cpp @@ -47,7 +47,7 @@ bool KNStringFilter::doFilter(const TQString &s) TQRegExp matcher(expanded); ret = ( matcher.search(s) >= 0 ); } else - ret=(s.tqfind(expanded,0,false)!=-1); + ret=(s.find(expanded,0,false)!=-1); if(!con) ret=!ret; } @@ -69,15 +69,15 @@ void KNStringFilter::expand(KNGroup *g) } expanded = data; - expanded.tqreplace(TQRegExp("%MYNAME"), id->name()); - expanded.tqreplace(TQRegExp("%MYEMAIL"), id->email()); + expanded.replace(TQRegExp("%MYNAME"), id->name()); + expanded.replace(TQRegExp("%MYEMAIL"), id->email()); } void KNStringFilter::load(KSimpleConfig *conf) { - con=conf->readBoolEntry("tqcontains", true); + con=conf->readBoolEntry("contains", true); data=conf->readEntry("Data"); regExp=conf->readBoolEntry("regX", false); } @@ -86,7 +86,7 @@ void KNStringFilter::load(KSimpleConfig *conf) void KNStringFilter::save(KSimpleConfig *conf) { - conf->writeEntry("tqcontains", con); + conf->writeEntry("contains", con); conf->writeEntry("Data", data); conf->writeEntry("regX", regExp); } diff --git a/knode/utilities.cpp b/knode/utilities.cpp index 4c857a3e5..0927c9171 100644 --- a/knode/utilities.cpp +++ b/knode/utilities.cpp @@ -274,7 +274,7 @@ int KNHelper::selectDialog(TQWidget *tqparent, const TQString &caption, const TQ TQString s; for ( TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it ) { s = (*it); - s.tqreplace(TQRegExp("&"),""); // remove accelerators + s.replace(TQRegExp("&"),""); // remove accelerators list->insertItem(s); } @@ -427,7 +427,7 @@ TQString KNHelper::rewrapStringList(TQStringList text, int wrapAt, TQChar quoteC thisLine = thisLine.stripWhiteSpace(); if(!leftover.isEmpty()) { // don't break paragraphs, tables and quote levels - if(thisLine.isEmpty() || (thisPrefix!=lastPrefix) || thisLine.tqcontains(" ") || thisLine.tqcontains('\t')) + if(thisLine.isEmpty() || (thisPrefix!=lastPrefix) || thisLine.contains(" ") || thisLine.contains('\t')) appendTextWPrefix(quoted, leftover, wrapAt, lastPrefix); else thisLine.prepend(leftover+" "); diff --git a/knotes/knote.cpp b/knotes/knote.cpp index 17d482e37..f5ebfe3bf 100644 --- a/knotes/knote.cpp +++ b/knotes/knote.cpp @@ -82,7 +82,7 @@ int KNote::s_ppOffset = 0; KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *tqparent, const char *name ) : TQFrame( tqparent, name, WStyle_Customize | WStyle_NoBorder | WDestructiveClose ), m_label( 0 ), m_pushpin( 0 ), m_fold( 0 ), m_button( 0 ), m_tool( 0 ), m_editor( 0 ), - m_config( 0 ), m_journal( j ), m_tqfind( 0 ), + m_config( 0 ), m_journal( j ), m_find( 0 ), m_kwinConf( KSharedConfig::openConfig( "kwinrc", true ) ), m_busy( 0 ), m_deleteWhenIdle( false ), m_blockEmitDataChanged( false ) { @@ -264,7 +264,7 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *tqparent, const char bool closeLeft = false; m_kwinConf->setGroup( "Style" ); if ( m_kwinConf->readBoolEntry( "CustomButtonPositions" ) ) - closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).tqfind( 'X' ) > -1; + closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).find( 'X' ) > -1; TQPixmap pushpin_pix; if ( closeLeft ) @@ -575,33 +575,33 @@ void KNote::setColor( const TQColor& fg, const TQColor& bg ) emit sigColorChanged(); } -void KNote::tqfind( const TQString& pattern, long options ) +void KNote::find( const TQString& pattern, long options ) { - delete m_tqfind; - m_tqfind = new KFind( pattern, options, this ); + delete m_find; + m_find = new KFind( pattern, options, this ); - connect( m_tqfind, TQT_SIGNAL(highlight( const TQString &, int, int )), + connect( m_find, TQT_SIGNAL(highlight( const TQString &, int, int )), TQT_TQOBJECT(this), TQT_SLOT(slotHighlight( const TQString &, int, int )) ); - connect( m_tqfind, TQT_SIGNAL(findNext()), TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()) ); + connect( m_find, TQT_SIGNAL(findNext()), TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()) ); - m_tqfind->setData( plainText() ); + m_find->setData( plainText() ); slotFindNext(); } void KNote::slotFindNext() { // TODO: honor FindBackwards - // TODO: dialogClosed() -> delete m_tqfind + // TODO: dialogClosed() -> delete m_find // Let KFind inspect the text fragment, and display a dialog if a match is found - KFind::Result res = m_tqfind->find(); + KFind::Result res = m_find->find(); if ( res == KFind::NoMatch ) // i.e. at end-pos { m_editor->removeSelection( 1 ); emit sigFindFinished(); - delete m_tqfind; - m_tqfind = 0; + delete m_find; + m_find = 0; } else { @@ -1167,7 +1167,7 @@ void KNote::updateLayout() m_kwinConf->setGroup( "Style" ); if ( m_kwinConf->readBoolEntry( "CustomButtonPositions" ) ) - closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).tqfind( 'X' ) > -1; + closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).find( 'X' ) > -1; if ( s_ppOffset ) { diff --git a/knotes/knote.h b/knotes/knote.h index eb548955a..50a007dad 100644 --- a/knotes/knote.h +++ b/knotes/knote.h @@ -74,7 +74,7 @@ public: TQColor bgColor() const; void setColor( const TQColor& fg, const TQColor& bg ); - void tqfind( const TQString& pattern, long options ); + void find( const TQString& pattern, long options ); bool isModified() const; @@ -165,7 +165,7 @@ private: KNoteConfig *m_config; KCal::Journal *m_journal; - KFind *m_tqfind; + KFind *m_find; KPopupMenu *m_menu; KPopupMenu *m_edit_menu; diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp index 5f2d74fb2..7b38121c3 100644 --- a/knotes/knotesapp.cpp +++ b/knotes/knotesapp.cpp @@ -94,7 +94,7 @@ int KNotesApp::KNoteActionList::compareItems( TQPtrCollection::Item s1, TQPtrCol KNotesApp::KNotesApp() : DCOPObject("KNotesIface"), TQLabel( 0, 0, WType_TopLevel ), - m_alarm( 0 ), m_listener( 0 ), m_tqfind( 0 ), m_findPos( 0 ) + m_alarm( 0 ), m_listener( 0 ), m_find( 0 ), m_findPos( 0 ) { connect( kapp, TQT_SIGNAL(lastWindowClosed()), kapp, TQT_SLOT(quit()) ); @@ -521,8 +521,8 @@ void KNotesApp::slotOpenFindDialog() m_findPos = new TQDictIterator( m_noteList ); // this could be in an own method if searching without a dialog should be possible - delete m_tqfind; - m_tqfind = new KFind( findDia.pattern(), findDia.options(), this ); + delete m_find; + m_find = new KFind( findDia.pattern(), findDia.options(), this ); slotFindNext(); } @@ -533,13 +533,13 @@ void KNotesApp::slotFindNext() { KNote *note = **m_findPos; ++*m_findPos; - note->tqfind( m_tqfind->pattern(), m_tqfind->options() ); + note->find( m_find->pattern(), m_find->options() ); } else { - m_tqfind->displayFinalDialog(); - delete m_tqfind; - m_tqfind = 0; + m_find->displayFinalDialog(); + delete m_find; + m_find = 0; delete m_findPos; m_findPos = 0; } @@ -703,7 +703,7 @@ void KNotesApp::updateNoteActions() for ( TQDictIterator it( m_noteList ); it.current(); ++it ) { - KAction *action = new KAction( it.current()->name().tqreplace("&", "&&"), + KAction *action = new KAction( it.current()->name().replace("&", "&&"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotShowNote()), (TQObject *)0, it.current()->noteId().utf8() ); diff --git a/knotes/knotesapp.h b/knotes/knotesapp.h index fc167ddf5..6a65027fe 100644 --- a/knotes/knotesapp.h +++ b/knotes/knotesapp.h @@ -150,7 +150,7 @@ private: TQDict m_noteList; KNoteActionList m_noteActions; - KFind *m_tqfind; + KFind *m_find; TQDictIterator *m_findPos; KPopupMenu *m_note_menu; diff --git a/knotes/knotesappui.rc b/knotes/knotesappui.rc index a49a90285..d5d682733 100644 --- a/knotes/knotesappui.rc +++ b/knotes/knotesappui.rc @@ -7,7 +7,7 @@ - + diff --git a/knotes/knotesnetrecv.cpp b/knotes/knotesnetrecv.cpp index 829398ba0..2adf8e784 100644 --- a/knotes/knotesnetrecv.cpp +++ b/knotes/knotesnetrecv.cpp @@ -130,7 +130,7 @@ void KNotesNetworkReceiver::slotConnectionClosed() TQString noteText = TQString( *m_buffer ).stripWhiteSpace(); // First line is the note title or, in case of ATnotes, the id - int pos = noteText.tqfind( TQRegExp("[\r\n]") ); + int pos = noteText.find( TQRegExp("[\r\n]") ); TQString noteTitle = noteText.left( pos ).stripWhiteSpace() + m_titleAddon; noteText = noteText.mid( pos ).stripWhiteSpace(); diff --git a/kode/automakefile.cpp b/kode/automakefile.cpp index 8d14540c5..468059ae3 100644 --- a/kode/automakefile.cpp +++ b/kode/automakefile.cpp @@ -35,7 +35,7 @@ AutoMakefile::AutoMakefile() void AutoMakefile::addTarget( const Target &t ) { mTargets.append( t ); - if ( mTargetTypes.tqfind( t.type() ) == mTargetTypes.end() ) { + if ( mTargetTypes.find( t.type() ) == mTargetTypes.end() ) { mTargetTypes.append( t.type() ); } } @@ -47,10 +47,10 @@ void AutoMakefile::addEntry( const TQString &variable, const TQString &value ) return; } - TQStringList::ConstIterator it = mEntries.tqfind( variable ); + TQStringList::ConstIterator it = mEntries.find( variable ); if ( it == mEntries.end() ) { mEntries.append( variable ); - TQMap::Iterator it = mValues.tqfind( variable ); + TQMap::Iterator it = mValues.find( variable ); if ( it == mValues.end() ) { mValues.insert( variable, value ); } else { @@ -98,7 +98,7 @@ TQString AutoMakefile::text() const if ( t.type() != targetType ) continue; TQString name = t.name(); - name.tqreplace( '.', '_' ); + name.replace( '.', '_' ); out += name + "_SOURCES = " + t.sources() + '\n'; if ( !t.libAdd().isEmpty() ) diff --git a/kode/class.cpp b/kode/class.cpp index ef26ff73d..dc443c20d 100644 --- a/kode/class.cpp +++ b/kode/class.cpp @@ -78,12 +78,12 @@ void Class::setNameSpace( const TQString &nameSpace ) void Class::addInclude( const TQString &include, const TQString &forwardDeclaration ) { - if ( mIncludes.tqfind( include ) == mIncludes.end() ) { + if ( mIncludes.find( include ) == mIncludes.end() ) { mIncludes.append( include ); } if( !forwardDeclaration.isEmpty() && - mForwardDeclarations.tqfind( forwardDeclaration ) == + mForwardDeclarations.find( forwardDeclaration ) == mForwardDeclarations.end() ) { mForwardDeclarations.append( forwardDeclaration ); } @@ -94,7 +94,7 @@ void Class::addHeaderInclude( const TQString &include ) if ( include.isEmpty() ) return; - if ( mHeaderIncludes.tqfind( include ) == mHeaderIncludes.end() ) { + if ( mHeaderIncludes.find( include ) == mHeaderIncludes.end() ) { mHeaderIncludes.append( include ); } } diff --git a/kode/file.cpp b/kode/file.cpp index b71109ec1..ce8d2a3e8 100644 --- a/kode/file.cpp +++ b/kode/file.cpp @@ -78,7 +78,7 @@ void File::addInclude( const TQString &i ) TQString include = i; if( !include.endsWith( ".h" ) ) include.append( ".h" ); - if ( mIncludes.tqfind( include ) == mIncludes.end() ) { + if ( mIncludes.find( include ) == mIncludes.end() ) { mIncludes.append( include ); } } diff --git a/kode/kodemain.cpp b/kode/kodemain.cpp index dcc073edc..63746effe 100644 --- a/kode/kodemain.cpp +++ b/kode/kodemain.cpp @@ -167,14 +167,14 @@ int addProperty( KCmdLineArgs *args ) // out += line + "\n"; switch( state ) { case FindClass: -// if ( line.tqfind( TQRegExp( className ) ) >= 0 ) { - if ( line.tqfind( TQRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) { +// if ( line.find( TQRegExp( className ) ) >= 0 ) { + if ( line.find( TQRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) { kdDebug() << " FOUND CLASS" << endl; state = FindConstructor; } break; case FindConstructor: - if ( line.tqfind( TQRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) { + if ( line.find( TQRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) { kdDebug() << " FOUND CONSTRUCTOR" << endl; out += readAhead; readAhead = TQString(); @@ -212,9 +212,9 @@ int addProperty( KCmdLineArgs *args ) } } } - } else if ( line.tqfind( TQRegExp( "\\s*protected" ) ) >= 0 ) { + } else if ( line.find( TQRegExp( "\\s*protected" ) ) >= 0 ) { state = FindPrivate; - } else if ( line.tqfind( TQRegExp( "\\s*private" ) ) >= 0 ) { + } else if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) { if ( accessor.isEmpty() ) { addPropertyFunctions( out, type, name ); out += readAhead; @@ -235,7 +235,7 @@ int addProperty( KCmdLineArgs *args ) } break; case FindPrivate: - if ( line.tqfind( TQRegExp( "\\s*private" ) ) >= 0 ) { + if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) { if ( accessor.isEmpty() ) { out += readAhead; readAhead = TQString(); @@ -248,7 +248,7 @@ int addProperty( KCmdLineArgs *args ) break; case FindVariables: { - if ( line.tqfind( "m" + accessor.lower(), 0, false ) >= 0 ) { + if ( line.find( "m" + accessor.lower(), 0, false ) >= 0 ) { out += readAhead; readAhead = TQString(); addPropertyVariable( out, type, name ); @@ -309,8 +309,8 @@ int codify( KCmdLineArgs *args ) TQTextStream ts( &f ); TQString line; while( !( line = ts.readLine() ).isNull() ) { - line.tqreplace( "\\", "\\\\" ); - line.tqreplace( "\"", "\\\"" ); + line.replace( "\\", "\\\\" ); + line.replace( "\"", "\\\"" ); line = "code += \"" + line; line.append( "\";" ); std::cout << line.local8Bit().data() << std::endl; @@ -374,7 +374,7 @@ int create( KCmdLineArgs *args ) KABC::Addressee::List as = KABC::StdAddressBook::self()->findByEmail( authorEmail ); if ( as.isEmpty() ) { - kdDebug() << "Unable to tqfind '" << authorEmail << "' in address book." + kdDebug() << "Unable to find '" << authorEmail << "' in address book." << endl; } else { a = as.first(); diff --git a/kode/kwsdl/compiler.cpp b/kode/kwsdl/compiler.cpp index 507e8bd52..e3ccf4f8c 100644 --- a/kode/kwsdl/compiler.cpp +++ b/kode/kwsdl/compiler.cpp @@ -39,7 +39,7 @@ Compiler::Compiler() void Compiler::setWSDLUrl( const TQString &wsdlUrl ) { mWSDLUrl = wsdlUrl; - mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.tqfindRev( '/' ) ); + mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.findRev( '/' ) ); mParser.setSchemaBaseUrl( mWSDLBaseUrl ); } diff --git a/kode/kwsdl/converter.cpp b/kode/kwsdl/converter.cpp index 173ca7fb3..f8d258013 100644 --- a/kode/kwsdl/converter.cpp +++ b/kode/kwsdl/converter.cpp @@ -32,7 +32,7 @@ static TQString escapeEnum( const TQString &str ) { TQString enumStr = capitalize( str ); - return enumStr.tqreplace( "-", "_" ); + return enumStr.replace( "-", "_" ); } Converter::Converter() diff --git a/kode/kwsdl/kung/loader.cpp b/kode/kwsdl/kung/loader.cpp index 41f965bc2..8b0281ac8 100644 --- a/kode/kwsdl/kung/loader.cpp +++ b/kode/kwsdl/kung/loader.cpp @@ -35,7 +35,7 @@ Loader::Loader() void Loader::setWSDLUrl( const TQString &wsdlUrl ) { mWSDLUrl = wsdlUrl; - mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.tqfindRev( '/' ) ); + mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.findRev( '/' ) ); mParser.setSchemaBaseUrl( mWSDLBaseUrl ); } diff --git a/kode/kwsdl/namemapper.cpp b/kode/kwsdl/namemapper.cpp index 6d7ae6399..426498f5c 100644 --- a/kode/kwsdl/namemapper.cpp +++ b/kode/kwsdl/namemapper.cpp @@ -30,7 +30,7 @@ NameMapper::NameMapper() TQString NameMapper::escape( const TQString &name ) const { - if ( mKeyWords.tqcontains( name ) ) + if ( mKeyWords.contains( name ) ) return "_" + name; else return name; diff --git a/kode/kwsdl/parser.cpp b/kode/kwsdl/parser.cpp index b8512490b..6e2a37dc0 100644 --- a/kode/kwsdl/parser.cpp +++ b/kode/kwsdl/parser.cpp @@ -27,7 +27,7 @@ using namespace KWSDL; static TQString sns( const TQString &str ) { - int pos = str.tqfind( ':' ); + int pos = str.find( ':' ); if ( pos != -1 ) return str.mid( pos + 1 ); else diff --git a/kode/kwsdl/schema/parser.cpp b/kode/kwsdl/schema/parser.cpp index 4571f5cc6..148599751 100644 --- a/kode/kwsdl/schema/parser.cpp +++ b/kode/kwsdl/schema/parser.cpp @@ -200,7 +200,7 @@ void Parser::parseImport( const TQDomElement &element ) TQString location = element.attribute( "schemaLocation" ); if ( !location.isEmpty() ) { // don't import a schema twice - if ( mImportedSchemas.tqcontains( location ) ) + if ( mImportedSchemas.contains( location ) ) return; else mImportedSchemas.append( location ); diff --git a/kode/kwsdl/schema/qualifiedname.cpp b/kode/kwsdl/schema/qualifiedname.cpp index 41e6fd849..350bca32f 100644 --- a/kode/kwsdl/schema/qualifiedname.cpp +++ b/kode/kwsdl/schema/qualifiedname.cpp @@ -65,7 +65,7 @@ bool QualifiedName::operator==( const QualifiedName &qn ) const void QualifiedName::parse( const TQString &str ) { - int pos = str.tqfind( ':' ); + int pos = str.find( ':' ); if ( pos != -1 ) { mPrefix = str.left( pos ); mLocalName = str.mid( pos + 1 ); diff --git a/kode/kwsdl/schema/simpletype.cpp b/kode/kwsdl/schema/simpletype.cpp index 50242808f..d5dcf2fd9 100644 --- a/kode/kwsdl/schema/simpletype.cpp +++ b/kode/kwsdl/schema/simpletype.cpp @@ -202,7 +202,7 @@ void SimpleType::setFacetValue( const TQString &value ) mFacetValue.wsp = PRESERVE; else if ( value == "collapse" ) mFacetValue.wsp = COLLAPSE; - else if ( value == "tqreplace" ) + else if ( value == "replace" ) mFacetValue.wsp = REPLACE; else { qDebug( "Invalid facet value for whitespace" ); diff --git a/kode/kwsdl/typemapper.cpp b/kode/kwsdl/typemapper.cpp index 024b4f42d..3ec0a20a3 100644 --- a/kode/kwsdl/typemapper.cpp +++ b/kode/kwsdl/typemapper.cpp @@ -71,7 +71,7 @@ TQString TypeMapper::type( const Schema::Element *element ) const TQString type; // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) type = it.data().type; @@ -89,7 +89,7 @@ TQString TypeMapper::type( const Schema::Attribute *attribute ) const TQString type; // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) type = it.data().type; @@ -104,7 +104,7 @@ TQString TypeMapper::type( const Schema::Attribute *attribute ) const TQString TypeMapper::type( const TQString &typeName ) const { // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) return it.data().type; @@ -147,7 +147,7 @@ TQStringList TypeMapper::header( const Schema::Element *element ) const TQStringList headers; // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) headers.append( it.data().header ); @@ -167,7 +167,7 @@ TQMap TypeMapper::headerDec( const Schema::Element *element TQMap headers; // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) @@ -193,7 +193,7 @@ TQStringList TypeMapper::header( const Schema::Attribute *attribute ) const TQStringList headers; // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) headers.append( it.data().header ); @@ -210,7 +210,7 @@ TQMap TypeMapper::headerDec( const Schema::Attribute *attrib TQMap headers; // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) @@ -228,7 +228,7 @@ TQMap TypeMapper::headerDec( const Schema::Attribute *attrib TQStringList TypeMapper::header( const TQString &typeName ) const { - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) return it.data().header; @@ -249,7 +249,7 @@ TQMap TypeMapper::headerDec( const TQString &typeName ) cons TQMap headers; // check basic types - TQMap::ConstIterator it = mMap.tqfind( typeName ); + TQMap::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) diff --git a/kode/kxml_compiler/creator.cpp b/kode/kxml_compiler/creator.cpp index 66dccccbb..3d4983f93 100644 --- a/kode/kxml_compiler/creator.cpp +++ b/kode/kxml_compiler/creator.cpp @@ -137,7 +137,7 @@ void Creator::createClass( Element *element ) { TQString className = upperFirst( element->name ); - if ( mProcessedClasses.tqfind( className ) != mProcessedClasses.end() ) { + if ( mProcessedClasses.find( className ) != mProcessedClasses.end() ) { return; } @@ -621,7 +621,7 @@ void Creator::createElementParserDom( KODE::Class &c, Element *e ) void Creator::registerListTypedef( const TQString &type ) { - if ( !mListTypedefs.tqcontains( type ) ) mListTypedefs.append( type ); + if ( !mListTypedefs.contains( type ) ) mListTypedefs.append( type ); } void Creator::createListTypedefs() diff --git a/kode/kxml_compiler/kxml_compiler.cpp b/kode/kxml_compiler/kxml_compiler.cpp index a4f8178b3..71720d6b9 100644 --- a/kode/kxml_compiler/kxml_compiler.cpp +++ b/kode/kxml_compiler/kxml_compiler.cpp @@ -83,7 +83,7 @@ int main( int argc, char **argv ) TQString dtdFilename = args->url( 0 ).path(); TQString baseName = args->url( 0 ).fileName(); - int pos = baseName.tqfindRev( '.' ); + int pos = baseName.findRev( '.' ); if ( pos > 0 ) baseName = baseName.left( pos ); @@ -143,7 +143,7 @@ int main( int argc, char **argv ) for( it = start->elements.begin(); it != start->elements.end(); ++it ) { c.setExternalClassPrefix( c.upperFirst( (*it)->name ) ); c.createFileParser( *it ); - c.createFileWriter( *it, dtdFilename.tqreplace( "rng", "dtd" ) ); + c.createFileWriter( *it, dtdFilename.replace( "rng", "dtd" ) ); } c.createListTypedefs(); diff --git a/kode/kxml_compiler/parser.cpp b/kode/kxml_compiler/parser.cpp index 3a0c7c3f7..9a123581b 100644 --- a/kode/kxml_compiler/parser.cpp +++ b/kode/kxml_compiler/parser.cpp @@ -97,10 +97,10 @@ Element *Parser::parse( const TQDomElement &docElement ) parseElement( e1, d, Pattern() ); Element::List definitions; TQMap::ConstIterator it; - it = mDefinitionMap.tqfind( d->name ); + it = mDefinitionMap.find( d->name ); if ( it != mDefinitionMap.end() ) definitions = *it; definitions.append( d ); - mDefinitionMap.tqreplace( d->name, definitions ); + mDefinitionMap.replace( d->name, definitions ); } else if ( e1.tagName() == "start" ) { start = new Element; parseElement( e1, start, Pattern() ); @@ -192,7 +192,7 @@ void Parser::substituteReferences( Element *s ) r->substituted = true; } TQMap::ConstIterator it1; - it1 = mDefinitionMap.tqfind( r->name ); + it1 = mDefinitionMap.find( r->name ); if ( it1 != mDefinitionMap.end() ) { Element::List elements = *it1; Element::List::ConstIterator it4; diff --git a/kode/printer.cpp b/kode/printer.cpp index 761823dd3..6f36d30eb 100644 --- a/kode/printer.cpp +++ b/kode/printer.cpp @@ -328,7 +328,7 @@ void Printer::printHeader( const File &f ) // Create include guard TQString className = f.filename(); - className.tqreplace( "-", "_" ); + className.replace( "-", "_" ); TQString includeGuard; if ( !f.nameSpace().isEmpty() ) includeGuard += f.nameSpace().upper() + "_"; @@ -348,7 +348,7 @@ void Printer::printHeader( const File &f ) TQStringList includes = (*it).headerIncludes(); TQStringList::ConstIterator it2; for( it2 = includes.begin(); it2 != includes.end(); ++it2 ) { - if ( processed.tqfind( *it2 ) == processed.end() ) { + if ( processed.find( *it2 ) == processed.end() ) { out += "#include <" + *it2 + ">"; processed.append( *it2 ); } @@ -363,7 +363,7 @@ void Printer::printHeader( const File &f ) TQStringList decls = (*it).forwardDeclarations(); TQStringList::ConstIterator it2; for( it2 = decls.begin(); it2 != decls.end(); ++it2 ) { - if ( processed.tqfind( *it2 ) == processed.end() ) { + if ( processed.find( *it2 ) == processed.end() ) { out += "class " + *it2 + ";"; processed.append( *it2 ); } @@ -443,7 +443,7 @@ void Printer::printImplementation( const File &f, bool createHeaderInclude ) TQStringList includes = (*it).includes(); TQStringList::ConstIterator it2; for( it2 = includes.begin(); it2 != includes.end(); ++it2 ) { - if ( processed.tqfind( *it2 ) == processed.end() ) { + if ( processed.find( *it2 ) == processed.end() ) { out += "#include <" + *it2 + ">"; processed.append( *it2 ); } diff --git a/konsolekalendar/COPYING b/konsolekalendar/COPYING index b55fa1466..54754ab4b 100644 --- a/konsolekalendar/COPYING +++ b/konsolekalendar/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/konsolekalendar/ROADMAP b/konsolekalendar/ROADMAP index 6d8a4a27f..333366ec7 100644 --- a/konsolekalendar/ROADMAP +++ b/konsolekalendar/ROADMAP @@ -8,7 +8,7 @@ Inner Version| | From KDE version 1.3.4 | New remote calendar support | cvs 1.3.5 | Remove old input system.. | cvs 1.3.6 | Test..test..test it baby | cvs -1.4 | Start creating outputs try to tqfind | +1.4 | Start creating outputs try to find | | People who need these.. | cvs 1.5 | Implement possibility to execute app | cvs 1.5.1 | Do something;) diff --git a/konsolekalendar/konsolekalendarexports.cpp b/konsolekalendar/konsolekalendarexports.cpp index cc3edf875..af371d07e 100644 --- a/konsolekalendar/konsolekalendarexports.cpp +++ b/konsolekalendar/konsolekalendarexports.cpp @@ -174,21 +174,21 @@ bool KonsoleKalendarExports::exportAsTxtShort( TQTextStream *ts, *ts << "\t"; // Print Event Summary - *ts << event->summary().tqreplace( TQChar( '\n' ), TQChar( ' ' ) ); + *ts << event->summary().replace( TQChar( '\n' ), TQChar( ' ' ) ); // Print Event Location if ( !event->location().isEmpty() ) { if ( !event->summary().isEmpty() ) { *ts << ", "; } - *ts << event->location().tqreplace( TQChar( '\n' ), TQChar( ' ' ) ); + *ts << event->location().replace( TQChar( '\n' ), TQChar( ' ' ) ); } *ts << endl; // Print Event Description if ( !event->description().isEmpty() ) { *ts << "\t\t\t" - << event->description().tqreplace( TQChar( '\n' ), TQChar( ' ' ) ) + << event->description().replace( TQChar( '\n' ), TQChar( ' ' ) ) << endl; } @@ -204,7 +204,7 @@ TQString KonsoleKalendarExports::processField( TQString field, TQString dquote ) // 2. Surrounds field with double quotes TQString double_dquote = dquote + dquote; - TQString retField = dquote + field.tqreplace( dquote, double_dquote ) + dquote; + TQString retField = dquote + field.replace( dquote, double_dquote ) + dquote; return retField; } @@ -233,9 +233,9 @@ bool KonsoleKalendarExports::exportAsCSV( TQTextStream *ts, << delim << pF( "" ); } - *ts << delim << pF( event->summary().tqreplace( TQChar('\n'), TQChar(' ') ) ) - << delim << pF( event->location().tqreplace( TQChar('\n'), TQChar(' ') ) ) - << delim << pF( event->description().tqreplace( TQChar('\n'), TQChar(' ') ) ) + *ts << delim << pF( event->summary().replace( TQChar('\n'), TQChar(' ') ) ) + << delim << pF( event->location().replace( TQChar('\n'), TQChar(' ') ) ) + << delim << pF( event->description().replace( TQChar('\n'), TQChar(' ') ) ) << delim << pF( event->uid() ) << endl; diff --git a/kontact/Thoughts b/kontact/Thoughts index 720836a7a..991209a7c 100644 --- a/kontact/Thoughts +++ b/kontact/Thoughts @@ -285,7 +285,7 @@ s like that. d Yes, but of course one should always prefer in-process IPC if possible. DCOP d currently _works_ for Kontact, but that's all about it. It isn't exactly elegant. d The only advantange of the current approach is that we can allow the user to -d run one of the parts standalone. I am not really sure we want that. I used to tqfind +d run one of the parts standalone. I am not really sure we want that. I used to find d it desireable, but I am not sure anymore. MiB: But that's the whole idea behind Kontact---to be able to integrate apps diff --git a/kontact/interfaces/core.cpp b/kontact/interfaces/core.cpp index d47058276..997ad8c48 100644 --- a/kontact/interfaces/core.cpp +++ b/kontact/interfaces/core.cpp @@ -57,7 +57,7 @@ KParts::ReadOnlyPart *Core::createPart( const char *libname ) kdDebug(5601) << "Core::createPart(): " << libname << endl; TQMap::ConstIterator it; - it = mParts.tqfind( libname ); + it = mParts.find( libname ); if ( it != mParts.end() ) return it.data(); kdDebug(5601) << "Creating new KPart" << endl; diff --git a/kontact/plugins/kmail/kcmkmailsummary.cpp b/kontact/plugins/kmail/kcmkmailsummary.cpp index bc0d683e7..97fc9fad1 100644 --- a/kontact/plugins/kmail/kcmkmailsummary.cpp +++ b/kontact/plugins/kmail/kcmkmailsummary.cpp @@ -108,12 +108,12 @@ void KCMKMailSummary::initFolders() DCOPRef folderRef = kmail.call( "getFolder(TQString)", *it ); folderRef.call( "displayName()" ).get( displayName ); } - if ( (*it).tqcontains( '/' ) == 1 ) { - if ( mFolderMap.tqfind( *it ) == mFolderMap.end() ) + if ( (*it).contains( '/' ) == 1 ) { + if ( mFolderMap.find( *it ) == mFolderMap.end() ) mFolderMap.insert( *it, new TQListViewItem( mFolderView, displayName ) ); } else { - const int pos = (*it).tqfindRev( '/' ); + const int pos = (*it).findRev( '/' ); const TQString parentFolder = (*it).left( pos ); mFolderMap.insert( *it, new TQCheckListItem( mFolderMap[ parentFolder ], @@ -137,7 +137,7 @@ void KCMKMailSummary::loadFolders() TQMap::Iterator it; for ( it = mFolderMap.begin(); it != mFolderMap.end(); ++it ) { if ( TQCheckListItem *qli = dynamic_cast( it.data() ) ) { - if ( folders.tqcontains( it.key() ) ) { + if ( folders.contains( it.key() ) ) { qli->setOn( true ); mFolderView->ensureItemVisible( it.data() ); } else { diff --git a/kontact/plugins/kmail/summarywidget.cpp b/kontact/plugins/kmail/summarywidget.cpp index 2f67846ac..8f3b668b3 100644 --- a/kontact/plugins/kmail/summarywidget.cpp +++ b/kontact/plugins/kmail/summarywidget.cpp @@ -117,7 +117,7 @@ void SummaryWidget::updateFolderList( const TQStringList& folders ) TQStringList::ConstIterator it; DCOPRef kmail( "kmail", "KMailIface" ); for ( it = folders.begin(); it != folders.end(); ++it ) { - if ( activeFolders.tqcontains( *it ) ) { + if ( activeFolders.contains( *it ) ) { DCOPRef folderRef = kmail.call( "getFolder(TQString)", *it ); const int numMsg = folderRef.call( "messages()" ); const int numUnreadMsg = folderRef.call( "unreadMessages()" ); diff --git a/kontact/plugins/korganizer/summarywidget.cpp b/kontact/plugins/korganizer/summarywidget.cpp index 649f366c9..03be389c2 100644 --- a/kontact/plugins/korganizer/summarywidget.cpp +++ b/kontact/plugins/korganizer/summarywidget.cpp @@ -141,9 +141,9 @@ void SummaryWidget::updateView() // Fill Appointment Pixmap Field label = new TQLabel( this ); - if ( ev->categories().tqcontains( "Birthday" ) ) { + if ( ev->categories().contains( "Birthday" ) ) { label->setPixmap( pmb ); - } else if ( ev->categories().tqcontains( "Anniversary" ) ) { + } else if ( ev->categories().contains( "Anniversary" ) ) { label->setPixmap( pma ); } else { label->setPixmap( pm ); diff --git a/kontact/plugins/newsticker/kcmkontactknt.cpp b/kontact/plugins/newsticker/kcmkontactknt.cpp index 7c3d05875..63dc312e2 100644 --- a/kontact/plugins/newsticker/kcmkontactknt.cpp +++ b/kontact/plugins/newsticker/kcmkontactknt.cpp @@ -271,7 +271,7 @@ void KCMKontactKNT::deleteFeed() if ( !item ) return; - if ( mCustomFeeds.tqfind( item ) == mCustomFeeds.end() ) + if ( mCustomFeeds.find( item ) == mCustomFeeds.end() ) return; mCustomFeeds.remove( item ); @@ -317,7 +317,7 @@ void KCMKontactKNT::allCurrentChanged( TQListViewItem *item ) bool delState = false; if ( newsItem && newsItem->isSelected() ) { addState = true; - delState = (mCustomFeeds.tqfind( newsItem ) != mCustomFeeds.end()); + delState = (mCustomFeeds.find( newsItem ) != mCustomFeeds.end()); } mAddButton->setEnabled( addState ); diff --git a/kontact/plugins/specialdates/sdsummarywidget.cpp b/kontact/plugins/specialdates/sdsummarywidget.cpp index 136454adf..3a5f8b3a7 100644 --- a/kontact/plugins/specialdates/sdsummarywidget.cpp +++ b/kontact/plugins/specialdates/sdsummarywidget.cpp @@ -228,7 +228,7 @@ void SDSummaryWidget::updateView() // No reason to show the date year TQString savefmt = KGlobal::locale()->dateFormat(); KGlobal::locale()->setDateFormat( KGlobal::locale()-> - dateFormat().tqreplace( 'Y', ' ' ) ); + dateFormat().replace( 'Y', ' ' ) ); // Search for Birthdays and Anniversaries in the Addressbook KABC::AddressBook::Iterator it; diff --git a/kontact/plugins/summary/kcmkontactsummary.cpp b/kontact/plugins/summary/kcmkontactsummary.cpp index 1f7164f80..a2b5003b3 100644 --- a/kontact/plugins/summary/kcmkontactsummary.cpp +++ b/kontact/plugins/summary/kcmkontactsummary.cpp @@ -157,7 +157,7 @@ void KCMKontactSummary::load() if ( var.toBool() == true ) { PluginItem *item = new PluginItem( *it, mPluginView ); - if ( activeSummaries.tqfind( (*it)->pluginName() ) != activeSummaries.end() ) + if ( activeSummaries.find( (*it)->pluginName() ) != activeSummaries.end() ) item->setOn( true ); } } diff --git a/kontact/plugins/summary/summaryview_part.cpp b/kontact/plugins/summary/summaryview_part.cpp index 0589a9768..f9dbd83e6 100644 --- a/kontact/plugins/summary/summaryview_part.cpp +++ b/kontact/plugins/summary/summaryview_part.cpp @@ -168,7 +168,7 @@ void SummaryViewPart::updateWidgets() TQValueList::ConstIterator it = plugins.begin(); for ( ; it != end; ++it ) { Kontact::Plugin *plugin = *it; - if ( activeSummaries.tqfind( plugin->identifier() ) == activeSummaries.end() ) + if ( activeSummaries.find( plugin->identifier() ) == activeSummaries.end() ) continue; Kontact::Summary *summary = plugin->createSummaryWidget( mFrame ); @@ -181,8 +181,8 @@ void SummaryViewPart::updateWidgets() connect( summary, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ), this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) ); - if ( !mLeftColumnSummaries.tqcontains( plugin->identifier() ) && - !mRightColumnSummaries.tqcontains( plugin->identifier() ) ) { + if ( !mLeftColumnSummaries.contains( plugin->identifier() ) && + !mRightColumnSummaries.contains( plugin->identifier() ) ) { mLeftColumnSummaries.append( plugin->identifier() ); } @@ -197,13 +197,13 @@ void SummaryViewPart::updateWidgets() { TQStringList::Iterator strIt; for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) { - if ( loadedSummaries.tqfind( *strIt ) == loadedSummaries.end() ) { + if ( loadedSummaries.find( *strIt ) == loadedSummaries.end() ) { strIt = mLeftColumnSummaries.remove( strIt ); --strIt; } } for ( strIt = mRightColumnSummaries.begin(); strIt != mRightColumnSummaries.end(); ++strIt ) { - if ( loadedSummaries.tqfind( *strIt ) == loadedSummaries.end() ) { + if ( loadedSummaries.find( *strIt ) == loadedSummaries.end() ) { strIt = mRightColumnSummaries.remove( strIt ); --strIt; } @@ -223,12 +223,12 @@ void SummaryViewPart::updateWidgets() TQStringList::Iterator strIt; for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) { - if ( mSummaries.tqfind( *strIt ) != mSummaries.end() ) + if ( mSummaries.find( *strIt ) != mSummaries.end() ) mLeftColumn->addWidget( mSummaries[ *strIt ] ); } for ( strIt = mRightColumnSummaries.begin(); strIt != mRightColumnSummaries.end(); ++strIt ) { - if ( mSummaries.tqfind( *strIt ) != mSummaries.end() ) + if ( mSummaries.find( *strIt ) != mSummaries.end() ) mRightColumn->addWidget( mSummaries[ *strIt ] ); } @@ -247,18 +247,18 @@ void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, in return; if ( target == mFrame ) { - if ( mLeftColumn->tqfindWidget( widget ) == -1 && mRightColumn->tqfindWidget( widget ) == -1 ) + if ( mLeftColumn->findWidget( widget ) == -1 && mRightColumn->findWidget( widget ) == -1 ) return; } else { - if ( mLeftColumn->tqfindWidget( target ) == -1 && mRightColumn->tqfindWidget( target ) == -1 || - mLeftColumn->tqfindWidget( widget ) == -1 && mRightColumn->tqfindWidget( widget ) == -1 ) + if ( mLeftColumn->findWidget( target ) == -1 && mRightColumn->findWidget( target ) == -1 || + mLeftColumn->findWidget( widget ) == -1 && mRightColumn->findWidget( widget ) == -1 ) return; } - if ( mLeftColumn->tqfindWidget( widget ) != -1 ) { + if ( mLeftColumn->findWidget( widget ) != -1 ) { mLeftColumn->remove( widget ); mLeftColumnSummaries.remove( widgetName( widget ) ); - } else if ( mRightColumn->tqfindWidget( widget ) != -1 ) { + } else if ( mRightColumn->findWidget( widget ) != -1 ) { mRightColumn->remove( widget ); mRightColumnSummaries.remove( widgetName( widget ) ); } @@ -286,7 +286,7 @@ void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, in return; } - int targetPos = mLeftColumn->tqfindWidget( target ); + int targetPos = mLeftColumn->findWidget( target ); if ( targetPos != -1 ) { if ( tqalignment == TQt::AlignBottom ) targetPos++; @@ -294,7 +294,7 @@ void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, in mLeftColumn->insertWidget( targetPos, widget ); mLeftColumnSummaries.insert( mLeftColumnSummaries.at( targetPos ), widgetName( widget ) ); } else { - targetPos = mRightColumn->tqfindWidget( target ); + targetPos = mRightColumn->findWidget( target ); if ( tqalignment == TQt::AlignBottom ) targetPos++; @@ -346,7 +346,7 @@ TQStringList SummaryViewPart::configModules() const TQStringList cm = it.data()->configModules(); TQStringList::ConstIterator strIt; for ( strIt = cm.begin(); strIt != cm.end(); ++strIt ) - if ( !(*strIt).isEmpty() && !modules.tqcontains( *strIt ) ) + if ( !(*strIt).isEmpty() && !modules.contains( *strIt ) ) modules.append( *strIt ); } diff --git a/kontact/plugins/weather/summarywidget.cpp b/kontact/plugins/weather/summarywidget.cpp index 926f70a73..611a7c1c6 100644 --- a/kontact/plugins/weather/summarywidget.cpp +++ b/kontact/plugins/weather/summarywidget.cpp @@ -140,7 +140,7 @@ void SummaryWidget::updateView() .tqarg( i18n( "Rel. Humidity" ) ) .tqarg( (*it).relativeHumidity() ); - TQToolTip::add( label, labelText.tqreplace( " ", " " ) ); + TQToolTip::add( label, labelText.replace( " ", " " ) ); label = new TQLabel( cover, this ); label->tqsetAlignment( AlignLeft ); diff --git a/kontact/src/aboutdialog.cpp b/kontact/src/aboutdialog.cpp index 02e48e771..1bbd0ef6c 100644 --- a/kontact/src/aboutdialog.cpp +++ b/kontact/src/aboutdialog.cpp @@ -93,7 +93,7 @@ void AboutDialog::addAboutData( const TQString &title, const TQString &icon, text += "" + home + "
"; } - text.tqreplace( "\n", "
" ); + text.replace( "\n", "
" ); KActiveLabel *label = new KActiveLabel( text, topFrame ); label->tqsetAlignment( AlignTop ); diff --git a/kontact/src/mainwindow.cpp b/kontact/src/mainwindow.cpp index 8439b4fce..b719a57d5 100644 --- a/kontact/src/mainwindow.cpp +++ b/kontact/src/mainwindow.cpp @@ -226,7 +226,7 @@ void MainWindow::activatePluginModule() if ( !mActiveModule.isEmpty() ) { PluginList::ConstIterator end = mPlugins.end(); for ( PluginList::ConstIterator it = mPlugins.begin(); it != end; ++it ) - if ( ( *it )->identifier().tqcontains( mActiveModule ) ) { + if ( ( *it )->identifier().contains( mActiveModule ) ) { selectPlugin( *it ); return; } @@ -828,7 +828,7 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin ) mPartsStack->raiseWidget( view ); view->show(); - if ( mFocusWidgets.tqcontains( plugin->identifier() ) ) { + if ( mFocusWidgets.contains( plugin->identifier() ) ) { tqfocusWidget = mFocusWidgets[ plugin->identifier() ]; if ( tqfocusWidget ) tqfocusWidget->setFocus(); @@ -1101,7 +1101,7 @@ void MainWindow::readProperties( KConfig *config ) for ( ; it != end; ++it ) { Plugin *plugin = *it; if ( !plugin->isRunningStandalone() ) { - TQStringList::ConstIterator activePlugin = activePlugins.tqfind( plugin->identifier() ); + TQStringList::ConstIterator activePlugin = activePlugins.find( plugin->identifier() ); if ( activePlugin != activePlugins.end() ) { plugin->readProperties( config ); } diff --git a/kontact/src/profilemanager.cpp b/kontact/src/profilemanager.cpp index 005779414..50b2a71d4 100644 --- a/kontact/src/profilemanager.cpp +++ b/kontact/src/profilemanager.cpp @@ -152,7 +152,7 @@ void Kontact::ProfileManager::writeConfig() const Kontact::Profile Kontact::ProfileManager::readFromConfiguration( const TQString& configFile, bool isLocal ) { KConfig profileCfg( configFile, true /*read-only*/, false /*no KDE global*/ ); - const TQString configDir = configFile.left( configFile.tqfindRev( TQDir::separator(), -1 ) ); + const TQString configDir = configFile.left( configFile.findRev( TQDir::separator(), -1 ) ); profileCfg.setGroup( "Kontact Profile" ); const TQString id = profileCfg.readEntry( "Identifier" ); Kontact::Profile profile( id ); @@ -199,7 +199,7 @@ void Kontact::ProfileManager::readConfig() for ( ProfileMap::ConstIterator it = globalProfiles.begin(), end = globalProfiles.end(); it != end; ++it ) { - if ( !profiles.tqcontains( it.key() ) ) + if ( !profiles.contains( it.key() ) ) profiles[it.key()] = it.data(); } @@ -252,7 +252,7 @@ void Kontact::ProfileManager::saveToProfile( const TQString& id ) bool Kontact::ProfileManager::addProfile( const Kontact::Profile& profile, bool syncConfig ) { const TQString id = profile.id(); - if ( m_profiles.tqcontains( id ) ) + if ( m_profiles.contains( id ) ) return false; m_profiles[id] = profile; emit profileAdded( id ); @@ -266,7 +266,7 @@ bool Kontact::ProfileManager::addProfile( const Kontact::Profile& profile, bool void Kontact::ProfileManager::loadProfile( const TQString& id ) { - if ( !m_profiles.tqcontains( id ) ) + if ( !m_profiles.contains( id ) ) return; emit profileLoaded( id ); } @@ -278,7 +278,7 @@ void Kontact::ProfileManager::removeProfile( const Kontact::Profile& profile ) void Kontact::ProfileManager::removeProfile( const TQString& id ) { - if ( !m_profiles.tqcontains( id ) ) + if ( !m_profiles.contains( id ) ) return; Kontact::Profile profile = profileById( id ); if ( profile.isLocal() ) { @@ -292,7 +292,7 @@ void Kontact::ProfileManager::removeProfile( const TQString& id ) Kontact::ProfileManager::ExportError Kontact::ProfileManager::exportProfileToDirectory( const TQString& id, const TQString& path ) { - if ( !m_profiles.tqcontains( id ) ) + if ( !m_profiles.contains( id ) ) return SuccessfulExport; if ( !TQDir( path ).exists() ) @@ -332,7 +332,7 @@ TQString Kontact::ProfileManager::generateNewId() const while ( true ) { const TQString newId = KApplication::randomString( 10 ); - if ( !m_profiles.tqcontains( newId ) ) + if ( !m_profiles.contains( newId ) ) return newId; } } diff --git a/korganizer/COPYING b/korganizer/COPYING index b55fa1466..54754ab4b 100644 --- a/korganizer/COPYING +++ b/korganizer/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp index ad6c7e36f..cbb4e42f8 100644 --- a/korganizer/actionmanager.cpp +++ b/korganizer/actionmanager.cpp @@ -314,7 +314,7 @@ void ActionManager::initActions() mACollection, "edit_delete" ); if ( mIsPart ) { KStdAction::find( mCalendarView->dialogManager(), TQT_SLOT( showSearchDialog() ), - mACollection, "korganizer_tqfind" ); + mACollection, "korganizer_find" ); } else { KStdAction::find( mCalendarView->dialogManager(), TQT_SLOT( showSearchDialog() ), mACollection ); @@ -402,7 +402,7 @@ void ActionManager::initActions() //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ZOOM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // TODO: try to tqfind / create better icons for the following 4 actions + // TODO: try to find / create better icons for the following 4 actions new KAction( i18n( "Zoom In Horizontally" ), "viewmag+", 0, mCalendarView->viewManager(), TQT_SLOT( zoomInHorizontally() ), mACollection, "zoom_in_horizontally" ); @@ -998,7 +998,7 @@ bool ActionManager::saveURL() if ( result != KMessageBox::Continue ) return false; TQString filename = mURL.fileName(); - filename.tqreplace( filename.length() - 4, 4, ".ics" ); + filename.replace( filename.length() - 4, 4, ".ics" ); mURL.setFileName( filename ); if ( mURL.isLocalFile() ) { mFile = mURL.path(); @@ -1708,11 +1708,11 @@ void ActionManager::openEventEditor( const TQString & summary, return; // due to kmime shortcomings in KDE3, we need to assemble the result manually int begin = 0; - int end = head.tqfind( '\n' ); + int end = head.find( '\n' ); bool skipFolded = false; while ( end >= 0 && end > begin ) { - if ( head.tqfind( "Content-Type:", begin, false ) != begin && - head.tqfind( "Content-Transfer-Encoding:", begin, false ) != begin && + if ( head.find( "Content-Type:", begin, false ) != begin && + head.find( "Content-Transfer-Encoding:", begin, false ) != begin && !(skipFolded && (head[begin] == ' ' || head[end] == '\t')) ) { TQCString line = head.mid( begin, end - begin ); tf.file()->writeBlock( line.data(), line.length() ); @@ -1723,7 +1723,7 @@ void ActionManager::openEventEditor( const TQString & summary, } begin = end + 1; - end = head.tqfind( '\n', begin ); + end = head.find( '\n', begin ); if ( end < 0 && begin < (int)head.length() ) end = head.length() - 1; } diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 115be5ffc..e5203ae1b 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -364,7 +364,7 @@ TQPair CalendarView::viewSubResourceCalendar() KOIncidenceEditor *CalendarView::editorDialog( Incidence *incidence ) const { - if (mDialogList.tqfind(incidence) != mDialogList.end ()) + if (mDialogList.find(incidence) != mDialogList.end ()) return mDialogList[incidence]; else return 0; } @@ -631,7 +631,7 @@ void CalendarView::readFilterSettings( KConfig *config ) } config->setGroup( "General" ); - int pos = filterList.tqfindIndex( currentFilter ); + int pos = filterList.findIndex( currentFilter ); mCurrentFilter = 0; if ( pos>=0 ) { mCurrentFilter = mFilters.at( pos ); @@ -1976,7 +1976,7 @@ void CalendarView::updateFilter() TQStringList filters; CalFilter *filter; - int pos = mFilters.tqfind( mCurrentFilter ); + int pos = mFilters.find( mCurrentFilter ); if ( pos < 0 ) { mCurrentFilter = 0; } @@ -2563,7 +2563,7 @@ void CalendarView::updateCategories() allCats.sort(); TQStringList categories( KOPrefs::instance()->mCustomCategories ); for ( TQStringList::ConstIterator si = allCats.constBegin(); si != allCats.constEnd(); ++si ) { - if ( categories.tqfind( *si ) == categories.end() ) { + if ( categories.find( *si ) == categories.end() ) { categories.append( *si ); } } @@ -2797,7 +2797,7 @@ void CalendarView::getIncidenceHierarchy( Incidence *inc, Incidence::List &tqchildren ) { // protecion against looping hierarchies - if ( inc && !tqchildren.tqcontains( inc ) ) { + if ( inc && !tqchildren.contains( inc ) ) { Incidence::List::ConstIterator it; Incidence::List immediateChildren = inc->relations(); for ( it = immediateChildren.constBegin(); it != immediateChildren.constEnd(); ++it ) { diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index cd04ee98a..2c5aeec50 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -261,7 +261,7 @@ class KDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar:: /** Add an incidence to the active calendar. @param ical A calendar in iCalendar format containing the incidence. The - calendar must consist of a VCALENDAR component which tqcontains + calendar must consist of a VCALENDAR component which contains the incidence (VEVENT, VTODO, VJOURNAL or VFREEBUSY) and optionally a VTIMEZONE component. If there is more than one incidence, only the first is added to KOrganizer's calendar. diff --git a/korganizer/customlistviewitem.h b/korganizer/customlistviewitem.h index 485301552..ecf098121 100644 --- a/korganizer/customlistviewitem.h +++ b/korganizer/customlistviewitem.h @@ -44,7 +44,7 @@ class CustomListViewItem : public KListViewItem TQString key(int column, bool) const { - TQMap::ConstIterator it = mKeyMap.tqfind(column); + TQMap::ConstIterator it = mKeyMap.find(column); if (it == mKeyMap.end()) return text(column); else return *it; } diff --git a/korganizer/eventarchiver.cpp b/korganizer/eventarchiver.cpp index 0f7dfc33c..1738380b1 100644 --- a/korganizer/eventarchiver.cpp +++ b/korganizer/eventarchiver.cpp @@ -190,7 +190,7 @@ void EventArchiver::archiveIncidences( Calendar* calendar, const TQDate& /*limit uids << (*it)->uid(); } for( it = allIncidences.begin(); it != allIncidences.end(); ++it ) { - if ( !uids.tqcontains( (*it)->uid() ) ) { + if ( !uids.contains( (*it)->uid() ) ) { archiveCalendar.deleteIncidence( *it ); } } @@ -247,7 +247,7 @@ bool EventArchiver::isSubTreeComplete( const Todo *todo, const TQDate &limitDate } // This TQList is only to prevent infinit recursion - if ( checkedUids.tqcontains( todo->uid() ) ) { + if ( checkedUids.contains( todo->uid() ) ) { // Probably will never happen, calendar.cpp checks for this kdWarning() << "To-do hierarchy loop detected!"; return false; diff --git a/korganizer/freebusymanager.cpp b/korganizer/freebusymanager.cpp index 5309050ec..7093b5f01 100644 --- a/korganizer/freebusymanager.cpp +++ b/korganizer/freebusymanager.cpp @@ -252,12 +252,12 @@ void FreeBusyManager::publishFreeBusy() // // Substitute %u and %d [FIXME] // TQString defaultEmail = KOCore()::self()->email(); -// int emailpos = defaultEmail.tqfind( '@' ); +// int emailpos = defaultEmail.find( '@' ); // if (emailpos != -1) { // const TQString emailName = defaultEmail.left( emailpos ); // const TQString emailHost = defaultEmail.mid( emailpos + 1 ); -// targetURL = targetURL.url().tqreplace("%25u", emailName, true); -// targetURL = targetURL.url().tqreplace("%25d", emailHost, true); +// targetURL = targetURL.url().replace("%25u", emailName, true); +// targetURL = targetURL.url().replace("%25d", emailHost, true); // } targetURL.setUser( KOPrefs::instance()->mFreeBusyPublishUser ); targetURL.setPass( KOPrefs::instance()->mFreeBusyPublishPassword ); @@ -280,7 +280,7 @@ void FreeBusyManager::publishFreeBusy() // We need to massage the list a bit so that Outlook understands // it. - messageText = messageText.tqreplace( TQRegExp( "ORGANIZER\\s*:MAILTO:" ), + messageText = messageText.replace( TQRegExp( "ORGANIZER\\s*:MAILTO:" ), "ORGANIZER:" ); // Create a local temp file and save the message to it @@ -292,7 +292,7 @@ void FreeBusyManager::publishFreeBusy() #if 0 TQString defaultEmail = KOCore()::self()->email(); - TQString emailHost = defaultEmail.mid( defaultEmail.tqfind( '@' ) + 1 ); + TQString emailHost = defaultEmail.mid( defaultEmail.find( '@' ) + 1 ); // Put target string together KURL targetURL; @@ -309,7 +309,7 @@ void FreeBusyManager::publishFreeBusy() targetURL.setHost( server ); TQString fbname = KOPrefs::instance()->mPublishUserName; - int at = fbname.tqfind('@'); + int at = fbname.find('@'); if( at > 1 && fbname.length() > (uint)at ) { fbname = fbname.left(at); } @@ -318,7 +318,7 @@ void FreeBusyManager::publishFreeBusy() targetURL.setPass( KOPrefs::instance()->mPublishPassword ); } else { // we use something else - targetURL = KOPrefs::instance()->mPublishAnyURL.tqreplace( "%SERVER%", + targetURL = KOPrefs::instance()->mPublishAnyURL.replace( "%SERVER%", emailHost ); targetURL.setUser( KOPrefs::instance()->mPublishUserName ); targetURL.setPass( KOPrefs::instance()->mPublishPassword ); @@ -441,16 +441,16 @@ void FreeBusyManager::cancelRetrieval() KURL replaceVariablesURL( const KURL &url, const TQString &email ) { TQString emailName, emailHost; - int emailpos = email.tqfind( '@' ); + int emailpos = email.find( '@' ); if( emailpos >= 0 ) { emailName = email.left( emailpos ); emailHost = email.mid( emailpos + 1 ); } TQString saveStr = url.path(); - saveStr.tqreplace( TQRegExp( "%[Ee][Mm][Aa][Ii][Ll]%" ), email ); - saveStr.tqreplace( TQRegExp( "%[Nn][Aa][Mm][Ee]%" ), emailName ); - saveStr.tqreplace( TQRegExp( "%[Ss][Ee][Rr][Vv][Ee][Rr]%" ), emailHost ); + saveStr.replace( TQRegExp( "%[Ee][Mm][Aa][Ii][Ll]%" ), email ); + saveStr.replace( TQRegExp( "%[Nn][Aa][Mm][Ee]%" ), emailName ); + saveStr.replace( TQRegExp( "%[Ss][Ee][Rr][Vv][Ee][Rr]%" ), emailHost ); KURL retUrl( url ); retUrl.setPath( saveStr ); @@ -468,7 +468,7 @@ bool fbExists( const KURL &url ) TQByteArray data; if ( KIO::NetAccess::synchronousRun( job, 0, &data ) ) { TQString dataStr ( data ); - if ( dataStr.tqcontains( "BEGIN:VCALENDAR" ) ) { + if ( dataStr.contains( "BEGIN:VCALENDAR" ) ) { return true; } } @@ -522,7 +522,7 @@ KURL FreeBusyManager::freeBusyUrl( const TQString &email ) // Sanity check: Don't download if it's not a correct email // address (this also avoids downloading for "(empty email)"). - int emailpos = email.tqfind( '@' ); + int emailpos = email.find( '@' ); if( emailpos == -1 ) { return KURL(); } @@ -548,7 +548,7 @@ KURL FreeBusyManager::freeBusyUrl( const TQString &email ) } } - if ( sourceURL.url().tqcontains( TQRegExp( "\\.[xiv]fb$" ) ) ) { // user specified a fullpath + if ( sourceURL.url().contains( TQRegExp( "\\.[xiv]fb$" ) ) ) { // user specified a fullpath // do variable string replacements to the URL (MS Outlook style) KURL fullpathURL = replaceVariablesURL( sourceURL, email ); @@ -557,10 +557,10 @@ KURL FreeBusyManager::freeBusyUrl( const TQString &email ) // This means that if the trailing slash is not entered, we can treat this as a custom, non-Kolab URL! // In that case, just pass it on through with substitution for %u and %d // TODO: May want an explicit configuration option in kogroupwareprefspage.ui for this - if ((fullpathURL.url().tqendsWith("/", true) == false) || (fullpathURL.url().tqcontains("%25u", true)) || (fullpathURL.url().tqcontains("%25d", true))) { + if ((fullpathURL.url().tqendsWith("/", true) == false) || (fullpathURL.url().contains("%25u", true)) || (fullpathURL.url().contains("%25d", true))) { // A generic URL, substitute %u and %d - fullpathURL = fullpathURL.url().tqreplace("%25u", emailName, true); - fullpathURL = fullpathURL.url().tqreplace("%25d", emailHost, true); + fullpathURL = fullpathURL.url().replace("%25u", emailName, true); + fullpathURL = fullpathURL.url().replace("%25d", emailHost, true); } else { // This is (probably) a Kolab URL! diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index ee83b1f52..bff67c764 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -111,7 +111,7 @@ void JournalDateEntry::clear() // should only be called by the KOJournalView now. void JournalDateEntry::addJournal( Journal *j ) { - TQMap::Iterator pos = mEntries.tqfind( j ); + TQMap::Iterator pos = mEntries.find( j ); if ( pos != mEntries.end() ) return; JournalEntry *entry = new JournalEntry( j, this ); @@ -156,7 +156,7 @@ void JournalDateEntry::emitNewJournal() void JournalDateEntry::journalEdited( Journal *journal ) { - TQMap::Iterator pos = mEntries.tqfind( journal ); + TQMap::Iterator pos = mEntries.find( journal ); if ( pos == mEntries.end() ) return; pos.data()->setJournal( journal ); @@ -165,7 +165,7 @@ void JournalDateEntry::journalEdited( Journal *journal ) void JournalDateEntry::journalDeleted( Journal *journal ) { - TQMap::Iterator pos = mEntries.tqfind( journal ); + TQMap::Iterator pos = mEntries.find( journal ); if ( pos == mEntries.end() ) return; delete pos.data(); diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 8a49360f3..f9a1236e7 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1002,7 +1002,7 @@ void KOAgenda::performItemAction(const TQPoint& viewportPos) // erase current item (i.e. remove it from the multiItem list) firstItem = moveItem->nextMultiItem(); moveItem->hide(); - mItems.take( mItems.tqfind( moveItem ) ); + mItems.take( mItems.find( moveItem ) ); removeChild( moveItem ); mActionItem->removeMoveItem(moveItem); moveItem=firstItem; @@ -1019,7 +1019,7 @@ void KOAgenda::performItemAction(const TQPoint& viewportPos) // erase current item lastItem = moveItem->prevMultiItem(); moveItem->hide(); - mItems.take( mItems.tqfind(moveItem) ); + mItems.take( mItems.find(moveItem) ); removeChild( moveItem ); moveItem->removeMoveItem( moveItem ); moveItem = lastItem; @@ -1557,7 +1557,7 @@ TQMemArray KOAgenda::minContentsY() int ymin = item->cellYTop(); int index = item->cellXLeft(); if ( index>=0 && index<(int)(mSelectedDates.count()) ) { - if ( ymin < minArray[index] && mItemsToDelete.tqfindRef( item ) == -1 ) + if ( ymin < minArray[index] && mItemsToDelete.findRef( item ) == -1 ) minArray[index] = ymin; } } @@ -1574,7 +1574,7 @@ TQMemArray KOAgenda::maxContentsY() int ymax = item->cellYBottom(); int index = item->cellXLeft(); if ( index>=0 && index<(int)(mSelectedDates.count()) ) { - if ( ymax > maxArray[index] && mItemsToDelete.tqfindRef( item ) == -1 ) + if ( ymax > maxArray[index] && mItemsToDelete.findRef( item ) == -1 ) maxArray[index] = ymax; } } @@ -1769,7 +1769,7 @@ void KOAgenda::showAgendaItem( KOAgendaItem *agendaItem ) agendaItem->hide(); addChild( agendaItem ); - if ( !mItems.tqcontainsRef( agendaItem ) ) { + if ( !mItems.containsRef( agendaItem ) ) { mItems.append( agendaItem ); } placeSubCells( agendaItem ); @@ -1785,7 +1785,7 @@ bool KOAgenda::removeAgendaItem( KOAgendaItem *item ) TQPtrList conflictItems = thisItem->conflictItems(); removeChild( thisItem ); - int pos = mItems.tqfind( thisItem ); + int pos = mItems.find( thisItem ); if ( pos >= 0 ) { mItems.take( pos ); taken = true; diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index b9558c396..86dc54a72 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -624,7 +624,7 @@ void KOAgendaItem::setConflictItems( TQPtrList ci ) void KOAgendaItem::addConflictItem( KOAgendaItem *ci ) { - if ( mConflictItems.tqfind( ci ) < 0 ) mConflictItems.append( ci ); + if ( mConflictItems.find( ci ) < 0 ) mConflictItems.append( ci ); } TQString KOAgendaItem::label() const @@ -986,7 +986,7 @@ void KOAgendaItem::paintEvent( TQPaintEvent *ev ) p.setBackgroundColor( bgColor ); p.setPen( textColor ); TQString ws = ww->wrappedString(); - if ( ws.left( ws.length()-1 ).tqfind( '\n' ) >= 0 ) + if ( ws.left( ws.length()-1 ).find( '\n' ) >= 0 ) ww->drawText( &p, eventX, y, TQt::AlignAuto | KWordWrap::FadeOut ); else diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 526f1f619..ef884b848 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -1754,8 +1754,8 @@ bool KOAgendaView::filterByResource( Incidence *incidence ) if ( resourceCalendar()->subresourceType( subRes ) == "todo" ) { TQString calmatch = "/.INBOX.directory/Calendar"; TQString i18nmatch = "/.INBOX.directory/" + i18n( "Calendar" ); - if ( subResourceCalendar().tqcontains( calmatch ) || - subResourceCalendar().tqcontains( i18nmatch ) ) { + if ( subResourceCalendar().contains( calmatch ) || + subResourceCalendar().contains( i18nmatch ) ) { return true; } } diff --git a/korganizer/koattendeeeditor.cpp b/korganizer/koattendeeeditor.cpp index 51f838576..15493ef9a 100644 --- a/korganizer/koattendeeeditor.cpp +++ b/korganizer/koattendeeeditor.cpp @@ -250,7 +250,7 @@ void KOAttendeeEditor::fillOrganizerCombo() const TQStringList lst = KOPrefs::instance()->fullEmails(); TQStringList uniqueList; for( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - if ( uniqueList.tqfind( *it ) == uniqueList.end() ) + if ( uniqueList.find( *it ) == uniqueList.end() ) uniqueList << *it; } mOrganizerCombo->insertStringList( uniqueList ); @@ -566,7 +566,7 @@ KABC::Addressee::List KOAttendeeEditor::expandDistList( const TQString &text ) TQValueList::ConstIterator eit; for ( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; - if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) { + if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { aList.append( a ) ; } } @@ -581,7 +581,7 @@ KABC::Addressee::List KOAttendeeEditor::expandDistList( const TQString &text ) TQValueList::ConstIterator eit; for ( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; - if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) { + if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { aList.append( a ) ; } } diff --git a/korganizer/kocore.cpp b/korganizer/kocore.cpp index 51e436283..ce5d0c257 100644 --- a/korganizer/kocore.cpp +++ b/korganizer/kocore.cpp @@ -237,7 +237,7 @@ void KOCore::removeXMLGUIClient( TQWidget *wdg ) KXMLGUIClient* KOCore::xmlguiClient( TQWidget *wdg ) const { TQWidget *topLevel = wdg->tqtopLevelWidget(); - TQMap::ConstIterator it = mXMLGUIClients.tqfind( topLevel ); + TQMap::ConstIterator it = mXMLGUIClients.find( topLevel ); if ( it != mXMLGUIClients.end() ) return it.data(); @@ -279,7 +279,7 @@ KOrg::CalendarDecoration::List KOCore::calendarDecorations() for( it = plugins.begin(); it != plugins.end(); ++it ) { if ( (*it)->hasServiceType("Calendar/Decoration") ) { TQString name = (*it)->desktopEntryName(); - if ( selectedPlugins.tqfind( name ) != selectedPlugins.end() ) { + if ( selectedPlugins.find( name ) != selectedPlugins.end() ) { KOrg::CalendarDecoration *d = loadCalendarDecoration(*it); mCalendarDecorations.append( d ); } @@ -300,7 +300,7 @@ KOrg::Part::List KOCore::loadParts( KOrg::MainWindow *tqparent ) KTrader::OfferList plugins = availableParts(); KTrader::OfferList::ConstIterator it; for( it = plugins.begin(); it != plugins.end(); ++it ) { - if ( selectedPlugins.tqfind( (*it)->desktopEntryName() ) != + if ( selectedPlugins.find( (*it)->desktopEntryName() ) != selectedPlugins.end() ) { KOrg::Part *part = loadPart( *it, tqparent ); if ( part ) { @@ -326,7 +326,7 @@ KOrg::PrintPlugin::List KOCore::loadPrintPlugins() KTrader::OfferList plugins = availablePrintPlugins(); KTrader::OfferList::ConstIterator it; for( it = plugins.begin(); it != plugins.end(); ++it ) { - if ( selectedPlugins.tqfind( (*it)->desktopEntryName() ) != + if ( selectedPlugins.find( (*it)->desktopEntryName() ) != selectedPlugins.end() ) { KOrg::PrintPlugin *part = loadPrintPlugin( *it ); if ( part ) loadedPlugins.append( part ); diff --git a/korganizer/koeditorattachments.cpp b/korganizer/koeditorattachments.cpp index 0672ba092..d6534db3b 100644 --- a/korganizer/koeditorattachments.cpp +++ b/korganizer/koeditorattachments.cpp @@ -330,7 +330,7 @@ AttachmentIconView::AttachmentIconView( KOEditorAttachments* tqparent ) KURL AttachmentIconView::tempFileForAttachment( KCal::Attachment *attachment ) { - if ( mTempFiles.tqcontains( attachment ) ) { + if ( mTempFiles.contains( attachment ) ) { return mTempFiles[attachment]; } TQStringList patterns = KMimeType::mimeType( attachment->mimeType() )->patterns(); @@ -606,7 +606,7 @@ void KOEditorAttachments::handlePasteOrDrop( TQMimeSource* source ) for ( KURL::List::ConstIterator it = urls.constBegin(); it != urls.constEnd(); ++it ) { TQString label = (*jt++); - if ( mAttachments->tqfindItem( label ) ) { + if ( mAttachments->findItem( label ) ) { label += '~' + randomString( 3 ); } addUriAttachment( (*it).url(), TQString(), label, true ); @@ -619,7 +619,7 @@ void KOEditorAttachments::handlePasteOrDrop( TQMimeSource* source ) if ( label.isEmpty() ) { label = (*it).prettyURL(); } - if ( mAttachments->tqfindItem( label ) ) { + if ( mAttachments->findItem( label ) ) { label += '~' + randomString( 3 ); } addUriAttachment( (*it).url(), TQString(), label, true ); diff --git a/korganizer/koeditorfreebusy.cpp b/korganizer/koeditorfreebusy.cpp index fab937190..362509935 100644 --- a/korganizer/koeditorfreebusy.cpp +++ b/korganizer/koeditorfreebusy.cpp @@ -92,7 +92,7 @@ class FreeBusyItem : public KDGanttViewTaskItem TQString key( int column, bool ) const { - TQMap::ConstIterator it = mKeyMap.tqfind( column ); + TQMap::ConstIterator it = mKeyMap.find( column ); if ( it == mKeyMap.end() ) return listViewText( column ); else return *it; } diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index 67b2a9719..d55dfa3ae 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -632,7 +632,7 @@ void ExceptionsWidget::addException() { TQDate date = mExceptionDateEdit->date(); TQString dateStr = KGlobal::locale()->formatDate( date ); - if( !mExceptionList->tqfindItem( dateStr ) ) { + if( !mExceptionList->findItem( dateStr ) ) { mExceptionDates.append( date ); mExceptionList->insertItem( dateStr ); } diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 73857fd64..d7c1b1aa8 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp @@ -230,9 +230,9 @@ void KOEventEditor::setDates( const TQDateTime &from, const TQDateTime &to, bool void KOEventEditor::setTexts( const TQString &summary, const TQString &description ) { - if ( description.isEmpty() && summary.tqcontains("\n") ) { + if ( description.isEmpty() && summary.contains("\n") ) { mGeneral->setDescription( summary ); - int pos = summary.tqfind( "\n" ); + int pos = summary.find( "\n" ); mGeneral->setSummary( summary.left( pos ) ); } else { mGeneral->setSummary( summary ); diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp index 9d321221c..ec391c9ec 100644 --- a/korganizer/koincidenceeditor.cpp +++ b/korganizer/koincidenceeditor.cpp @@ -196,8 +196,8 @@ void KOIncidenceEditor::setupDesignerTabs( const TQString &type ) TQStringList list = KGlobal::dirs()->findAllResources( "data", "korganizer/designer/" + type + "/*.ui", true, true ); for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) { - const TQString &fn = (*it).mid( (*it).tqfindRev('/') + 1 ); - if ( activePages.tqfind( fn ) != activePages.end() ) { + const TQString &fn = (*it).mid( (*it).findRev('/') + 1 ); + if ( activePages.find( fn ) != activePages.end() ) { addDesignerTab( *it ); } } @@ -316,7 +316,7 @@ void KOIncidenceEditor::createEmbeddedURLPages( Incidence *i ) if ( !mAttachedDesignerFields.isEmpty() ) { for ( TQPtrList::Iterator it = mAttachedDesignerFields.begin(); it != mAttachedDesignerFields.end(); ++it ) { - if ( mDesignerFieldForWidget.tqcontains( *it ) ) { + if ( mDesignerFieldForWidget.contains( *it ) ) { mDesignerFields.remove( mDesignerFieldForWidget[ *it ] ); } } diff --git a/korganizer/kojournaleditor.cpp b/korganizer/kojournaleditor.cpp index 3570f6eca..23bdbe8f8 100644 --- a/korganizer/kojournaleditor.cpp +++ b/korganizer/kojournaleditor.cpp @@ -118,9 +118,9 @@ void KOJournalEditor::newJournal() void KOJournalEditor::setTexts( const TQString &summary, const TQString &description ) { - if ( description.isEmpty() && summary.tqcontains("\n") ) { + if ( description.isEmpty() && summary.contains("\n") ) { mGeneral->setDescription( summary ); - int pos = summary.tqfind( "\n" ); + int pos = summary.find( "\n" ); mGeneral->setSummary( summary.left( pos ) ); } else { mGeneral->setSummary( summary ); diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 412ef5a7e..b5742e471 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -64,7 +64,7 @@ KOJournalView::~KOJournalView() void KOJournalView::appendJournal( Journal*journal, const TQDate &dt) { JournalDateEntry *entry = 0; - if ( mEntries.tqcontains( dt ) ) { + if ( mEntries.contains( dt ) ) { entry = mEntries[dt]; } else { entry = new JournalDateEntry( calendar(), mVBox ); diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 09dc07dab..2bad209bd 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -352,7 +352,7 @@ void KOListView::addIncidences( const Incidence::List &incidenceList, const TQDa void KOListView::addIncidence( Incidence *incidence, const TQDate &date ) { - if ( mUidDict.tqfind( incidence->uid() ) ) { + if ( mUidDict.find( incidence->uid() ) ) { return; } diff --git a/korganizer/komailclient.cpp b/korganizer/komailclient.cpp index 423225977..b664e68f3 100644 --- a/korganizer/komailclient.cpp +++ b/korganizer/komailclient.cpp @@ -253,10 +253,10 @@ bool KOMailClient::send(const TQString &from,const TQString &_to,const TQString if (!kMailOpenComposer(to,cc,bcc ? from : "",subject,body,0,KURL())) return false; } else { TQString meth; - int idx = attachment.tqfind("METHOD"); + int idx = attachment.find("METHOD"); if (idx>=0) { - idx = attachment.tqfind(':',idx)+1; - const int newline = attachment.tqfind('\n',idx); + idx = attachment.find(':',idx)+1; + const int newline = attachment.find('\n',idx); meth = attachment.mid(idx, newline - idx - 1); meth = meth.lower().stripWhiteSpace(); } else { diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index dc52c312c..5b431f8e4 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -262,7 +262,7 @@ void KOPrefs::usrWriteConfig() void KOPrefs::setCategoryColor( const TQString &cat, const TQColor & color) { - mCategoryColors.tqreplace( cat, new TQColor( color ) ); + mCategoryColors.replace( cat, new TQColor( color ) ); } TQColor *KOPrefs::categoryColor( const TQString &cat ) @@ -285,7 +285,7 @@ void KOPrefs::setResourceColor ( const TQString &cal, const TQColor &color ) { // kdDebug(5850)<<"KOPrefs::setResourceColor: " << cal << " color: "<< // color.name()<tqfindIndex(text); + int i = tags->findIndex(text); if (i > 0) combo->setCurrentItem(i); } else { for(int i=0;icount();++i) { @@ -774,14 +774,14 @@ void KOPrefsDialogColors::updateCategories() void KOPrefsDialogColors::setCategoryColor() { - mCategoryDict.tqreplace(mCategoryCombo->currentText(), new TQColor(mCategoryButton->color())); + mCategoryDict.replace(mCategoryCombo->currentText(), new TQColor(mCategoryButton->color())); slotWidChanged(); } void KOPrefsDialogColors::updateCategoryColor() { TQString cat = mCategoryCombo->currentText(); - TQColor *color = mCategoryDict.tqfind(cat); + TQColor *color = mCategoryDict.find(cat); if (!color) { color = KOPrefs::instance()->categoryColor(cat); } @@ -823,7 +823,7 @@ void KOPrefsDialogColors::setResourceColor() { kdDebug( 5850) << "KOPrefsDialogColors::setResorceColor()" << endl; - mResourceDict.tqreplace( mResourceIdentifier[mResourceCombo->currentItem()], + mResourceDict.replace( mResourceIdentifier[mResourceCombo->currentItem()], new TQColor( mResourceButton->color() ) ); slotWidChanged(); } @@ -832,7 +832,7 @@ void KOPrefsDialogColors::updateResourceColor() { kdDebug( 5850 ) << "KOPrefsDialogColors::updateResourceColor()" << endl; TQString res= mResourceIdentifier[mResourceCombo->currentItem()]; - TQColor *color = mCategoryDict.tqfind(res); + TQColor *color = mCategoryDict.find(res); if( !color ) { color = KOPrefs::instance()->resourceColor( res ); } @@ -1150,7 +1150,7 @@ void KOPrefsDialogPlugins::usrReadConfig() KTrader::OfferList::ConstIterator it; for( it = plugins.begin(); it != plugins.end(); ++it ) { TQCheckListItem *item = new PluginItem( mListView, *it ); - if ( selectedPlugins.tqfind( (*it)->desktopEntryName() ) != + if ( selectedPlugins.find( (*it)->desktopEntryName() ) != selectedPlugins.end() ) { item->setOn( true ); } diff --git a/korganizer/korgac/alarmdialog.cpp b/korganizer/korgac/alarmdialog.cpp index 1a6c4dbee..f629a15a7 100644 --- a/korganizer/korgac/alarmdialog.cpp +++ b/korganizer/korgac/alarmdialog.cpp @@ -192,7 +192,7 @@ static TQString cleanSummary( const TQString &summary ) { uint maxLen = 45; TQString retStr = summary; - retStr.tqreplace( '\n', ' ' ); + retStr.replace( '\n', ' ' ); if ( retStr.length() > maxLen ) { maxLen -= etc.length(); retStr = retStr.left( maxLen ); diff --git a/korganizer/korganizer_part.rc b/korganizer/korganizer_part.rc index 5115d2269..da92935a0 100644 --- a/korganizer/korganizer_part.rc +++ b/korganizer/korganizer_part.rc @@ -39,7 +39,7 @@ - +
&View diff --git a/korganizer/korganizeriface.h b/korganizer/korganizeriface.h index 225f0f2d3..88ab61d50 100644 --- a/korganizer/korganizeriface.h +++ b/korganizer/korganizeriface.h @@ -48,7 +48,7 @@ class KOrganizerIface : virtual public DCOPObject /** Add an incidence to the active calendar. @param iCal A calendar in iCalendar format containing the incidence. The - calendar must consist of a VCALENDAR component which tqcontains + calendar must consist of a VCALENDAR component which contains the incidence (VEVENT, VTODO, VJOURNAL or VFREEBUSY) and optionally a VTIMEZONE component. If there is more than one incidence, only the first is added to KOrganizer's calendar. diff --git a/korganizer/korganizerui.rc b/korganizer/korganizerui.rc index 5ece25d32..82e97f713 100644 --- a/korganizer/korganizerui.rc +++ b/korganizer/korganizerui.rc @@ -122,7 +122,7 @@ - + diff --git a/korganizer/kotimelineview.cpp b/korganizer/kotimelineview.cpp index 93296daaf..072ea31f2 100644 --- a/korganizer/kotimelineview.cpp +++ b/korganizer/kotimelineview.cpp @@ -293,7 +293,7 @@ void KOTimelineView::insertIncidence(KCal::Incidence * incidence) for ( TQDate day = mStartDate; day <= mEndDate; day = day.addDays( 1 ) ) { Event::List events = calendar()->events( day, EventSortStartDate, SortDirectionAscending ); for ( Event::List::ConstIterator it = events.constBegin(); it != events.constEnd(); ++it ) { - if ( events.tqcontains( event ) ) + if ( events.contains( event ) ) insertIncidence( *it, day ); } } diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index cbf15d28d..8da491fb4 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -172,9 +172,9 @@ void KOTodoEditor::newTodo() void KOTodoEditor::setTexts( const TQString &summary, const TQString &description ) { - if ( description.isEmpty() && summary.tqcontains("\n") ) { + if ( description.isEmpty() && summary.contains("\n") ) { mGeneral->setDescription( summary ); - int pos = summary.tqfind( "\n" ); + int pos = summary.find( "\n" ); mGeneral->setSummary( summary.left( pos ) ); } else { mGeneral->setSummary( summary ); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 6b511f790..ecd680541 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -263,7 +263,7 @@ void KOTodoListView::contentsDropEvent( TQDropEvent *e ) TQStringList emails = KPIM::splitEmailAddrList( text ); for(TQStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { kdDebug(5850) << " Email: " << (*it) << endl; - int pos = (*it).tqfind("<"); + int pos = (*it).find("<"); TQString name = (*it).left(pos); TQString email = (*it).mid(pos); if (!email.isEmpty() && todoi) { @@ -563,7 +563,7 @@ void KOTodoView::updateView() mTodoMap.clear(); Todo::List::ConstIterator it; for( it = todoList.begin(); it != todoList.end(); ++it ) { - if ( !mTodoMap.tqcontains( *it ) ) { + if ( !mTodoMap.contains( *it ) ) { insertTodoItem( *it ); } } @@ -603,7 +603,7 @@ TQMap::ConstIterator // kdDebug(5850) << " has Related" << endl; TQMap::ConstIterator itemIterator; - itemIterator = mTodoMap.tqfind(relatedTodo); + itemIterator = mTodoMap.find(relatedTodo); if (itemIterator == mTodoMap.end()) { // kdDebug(5850) << " related not yet in list" << endl; itemIterator = insertTodoItem (relatedTodo); @@ -635,7 +635,7 @@ void KOTodoView::removeTodoItems() KOTodoViewItem *item; for ( item = mItemsToDelete.first(); item; item = mItemsToDelete.next() ) { Todo *todo = item->todo(); - if ( todo && mTodoMap.tqcontains( todo ) ) { + if ( todo && mTodoMap.contains( todo ) ) { mTodoMap.remove( todo ); } delete item; @@ -691,7 +691,7 @@ void KOTodoView::changeIncidenceDisplay(Incidence *incidence, int action) Todo *todo = static_cast(incidence); if ( todo ) { KOTodoViewItem *todoItem = 0; - if ( mTodoMap.tqcontains( todo ) ) { + if ( mTodoMap.contains( todo ) ) { todoItem = mTodoMap[todo]; } switch ( action ) { @@ -705,7 +705,7 @@ void KOTodoView::changeIncidenceDisplay(Incidence *incidence, int action) // correctly update changes in relations Todo*tqparent = dynamic_cast( todo->relatedTo() ); KOTodoViewItem*parentItem = 0; - if ( tqparent && mTodoMap.tqcontains(tqparent) ) { + if ( tqparent && mTodoMap.contains(tqparent) ) { parentItem = mTodoMap[ tqparent ]; } if ( todoItem->tqparent() != parentItem ) { @@ -1011,7 +1011,7 @@ TQPopupMenu *KOTodoView::getCategoryPopupMenu( KOTodoViewItem *todoItem ) ++it ) { int index = tempMenu->insertItem( *it ); mCategory[ index ] = *it; - if ( checkedCategories.tqfind( *it ) != checkedCategories.end() ) + if ( checkedCategories.find( *it ) != checkedCategories.end() ) tempMenu->setItemChecked( index, true ); } @@ -1030,7 +1030,7 @@ void KOTodoView::changedCategories(int index) Todo *oldTodo = todo->clone(); TQStringList categories = todo->categories (); - if ( categories.tqfind( mCategory[index] ) != categories.end() ) + if ( categories.find( mCategory[index] ) != categories.end() ) categories.remove( mCategory[index] ); else categories.insert( categories.end(), mCategory[index] ); diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 47aeb02b0..02369d91a 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -168,7 +168,7 @@ void KOTodoViewItem::construct() // Find sort id in description. It's the text behind the last '#' character // found in the description. White spaces are removed from beginning and end // of sort id. - int pos = mTodo->description().tqfindRev('#'); + int pos = mTodo->description().findRev('#'); if (pos < 0) { setText( KOTodoView::eDescriptionColumn, "" ); } else { diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 4f7c52fea..14e2f80aa 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -302,7 +302,7 @@ void KOWhatsNextView::appendEvent( Incidence *ev, const TQDateTime &start, void KOWhatsNextView::appendTodo( Incidence *ev ) { - if ( mTodos.tqfind( ev ) != mTodos.end() ) return; + if ( mTodos.find( ev ) != mTodos.end() ) return; mTodos.append( ev ); diff --git a/korganizer/mailscheduler.cpp b/korganizer/mailscheduler.cpp index b7b5ba69d..f810e9843 100644 --- a/korganizer/mailscheduler.cpp +++ b/korganizer/mailscheduler.cpp @@ -122,7 +122,7 @@ TQPtrList MailScheduler::retrieveTransactions() TQTextStream t( &f ); t.setEncoding( TQTextStream::Latin1 ); TQString messageString = t.read(); - messageString.tqreplace( TQRegExp( "\n[ \t]"), "" ); + messageString.replace( TQRegExp( "\n[ \t]"), "" ); messageString = TQString::fromUtf8( messageString.latin1() ); ScheduleMessage *mess = mFormat->parseScheduleMessage( mCalendar, messageString ); diff --git a/korganizer/plugins/projectview/koprojectview.cpp b/korganizer/plugins/projectview/koprojectview.cpp index c559a6960..3c7678e1a 100644 --- a/korganizer/plugins/projectview/koprojectview.cpp +++ b/korganizer/plugins/projectview/koprojectview.cpp @@ -188,7 +188,7 @@ void KOProjectView::updateView() mTodoMap.clear(); Todo::List::ConstIterator it; for( it = todoList.begin(); it != todoList.end(); ++it ) { - if ( !mTodoMap.tqcontains( *it ) ) { + if ( !mTodoMap.contains( *it ) ) { insertTodoItem( *it ); } } @@ -202,7 +202,7 @@ TQMap::ConstIterator if (relatedTodo) { // kdDebug(5850) << " has Related" << endl; TQMap::ConstIterator itemIterator; - itemIterator = mTodoMap.tqfind(relatedTodo); + itemIterator = mTodoMap.find(relatedTodo); if (itemIterator == mTodoMap.end()) { // kdDebug(5850) << " related not yet in list" << endl; itemIterator = insertTodoItem (relatedTodo); diff --git a/korganizer/printing/calprintdefaultplugins.cpp b/korganizer/printing/calprintdefaultplugins.cpp index 6fe3a5e39..1e162ecee 100644 --- a/korganizer/printing/calprintdefaultplugins.cpp +++ b/korganizer/printing/calprintdefaultplugins.cpp @@ -52,7 +52,7 @@ static TQString cleanString( const TQString &instr ) { TQString ret = instr; - return ret.tqreplace( '\n', ' ' ); + return ret.replace( '\n', ' ' ); } /************************************************************** diff --git a/korganizer/printing/calprinter.cpp b/korganizer/printing/calprinter.cpp index 54aacd18c..4097f1ed7 100644 --- a/korganizer/printing/calprinter.cpp +++ b/korganizer/printing/calprinter.cpp @@ -255,7 +255,7 @@ void CalPrintDialog::setOrientation( CalPrinter::ePrintOrientation orientation ) KOrg::PrintPlugin *CalPrintDialog::selectedPlugin() { int id = mTypeGroup->selectedId(); - if ( mPluginIDs.tqcontains( id ) ) { + if ( mPluginIDs.contains( id ) ) { return mPluginIDs[id]; } else { return 0; diff --git a/korganizer/printing/calprintpluginbase.cpp b/korganizer/printing/calprintpluginbase.cpp index 3df996528..63eb25f83 100644 --- a/korganizer/printing/calprintpluginbase.cpp +++ b/korganizer/printing/calprintpluginbase.cpp @@ -46,7 +46,7 @@ inline int round(const double x) static TQString cleanStr( const TQString &instr ) { TQString ret = instr; - return ret.tqreplace( '\n', ' ' ); + return ret.replace( '\n', ' ' ); } /****************************************************************** @@ -1602,7 +1602,7 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, TQPainter &p, // The problem is that relations() does not apply filters, so // we need to compare manually with the complete filtered list! Todo* subtodo = dynamic_cast( *it ); - if (subtodo && todoList.tqcontains( subtodo ) ) { + if (subtodo && todoList.contains( subtodo ) ) { drawTodo( count, subtodo, p, connectSubTodos, strikeoutCompleted, desc, posPriority, posSummary, posDueDt, posPercentComplete, level+1, x, y, width, pageHeight, todoList, &startpt ); @@ -1619,7 +1619,7 @@ void CalPrintPluginBase::drawTodo( int &count, Todo *todo, TQPainter &p, // The problem is that relations() does not apply filters, so // we need to compare manually with the complete filtered list! Todo* subtodo = dynamic_cast( *it ); - if ( subtodo && todoList.tqcontains( subtodo ) ) { + if ( subtodo && todoList.contains( subtodo ) ) { t.append( subtodo ); } } diff --git a/korganizer/printing/cellitem.cpp b/korganizer/printing/cellitem.cpp index 4dfc882f3..9551ac8ae 100644 --- a/korganizer/printing/cellitem.cpp +++ b/korganizer/printing/cellitem.cpp @@ -65,7 +65,7 @@ TQPtrList CellItem::placeItem( TQPtrList cells, int i; for( i = 0; i < maxSubCells; ++i ) { kdDebug(5855) << " Trying subcell " << i << endl; - if ( !subCellDict.tqfind( i ) ) { + if ( !subCellDict.find( i ) ) { kdDebug(5855) << " Use subcell " << i << endl; placeItem->setSubCell( i ); break; diff --git a/korganizer/resourceview.cpp b/korganizer/resourceview.cpp index 6c0bda0fd..9058df869 100644 --- a/korganizer/resourceview.cpp +++ b/korganizer/resourceview.cpp @@ -83,7 +83,7 @@ static TQString labelFromSubResName( ResourceCalendar *resource, const TQString static TQString labelFromIdentifier( ResourceCalendar *resource, const TQString &identifier ) { TQString subResLabel; - if ( identifier.tqcontains( "/.INBOX.directory/" ) ) { // my subresource + if ( identifier.contains( "/.INBOX.directory/" ) ) { // my subresource TQString subResName = identifier; subResName.remove( TQRegExp( "^.*/\\.INBOX\\.directory/" ) ); subResLabel = labelFromSubResName( resource, subResName ); @@ -391,7 +391,7 @@ void ResourceView::addResource() return; } - TQString type = types[ descs.tqfindIndex( desc ) ]; + TQString type = types[ descs.findIndex( desc ) ]; // Create new resource ResourceCalendar *resource = manager->createResource( type ); @@ -477,7 +477,7 @@ void ResourceView::slotSubresourceAdded( ResourceCalendar *resource, { Q_UNUSED( type ); - TQListViewItem *lvitem = mListView->tqfindItem( resource->resourceName(), 0 ); + TQListViewItem *lvitem = mListView->findItem( resource->resourceName(), 0 ); if ( !lvitem ) // Not found return; @@ -508,7 +508,7 @@ void ResourceView::slotSubresourceRemoved( ResourceCalendar *resource, void ResourceView::closeResource( ResourceCalendar *resource ) { - if ( mResourcesToClose.tqfind( resource ) >= 0 ) { + if ( mResourcesToClose.find( resource ) >= 0 ) { resource->close(); mResourcesToClose.remove( resource ); } @@ -595,7 +595,7 @@ void ResourceView::editResource() if ( item->isSubresource() ) { if ( resource->type() == "imap" || resource->type() == "scalix" ) { TQString identifier = item->resourceIdentifier(); - if ( !identifier.tqcontains( "/.INBOX.directory/" ) ) { + if ( !identifier.contains( "/.INBOX.directory/" ) ) { KMessageBox::sorry( this, i18n( "Cannot rename someone else's calendar folder." ) ); @@ -708,7 +708,7 @@ void ResourceView::contextMenuRequested ( TQListViewItem *lvitem, const TQPoint if ( item->isSubresource() && ( item->resource()->type() == "imap" || item->resource()->type() == "scalix" ) ) { - if ( item->resourceIdentifier().tqcontains( "/.INBOX.directory/" ) ) { + if ( item->resourceIdentifier().contains( "/.INBOX.directory/" ) ) { menu->insertItem( i18n("&Rename..."), this, TQT_SLOT( editResource() ) ); } } else { diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 03079cc90..a5a11134a 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -47,7 +47,7 @@ SearchDialog::SearchDialog(Calendar *calendar,TQWidget *tqparent) : KDialogBase(Plain,i18n("Find Events"),User1|Close,User1,tqparent,0,false,false, - KGuiItem( i18n("&Find"), "tqfind") ) + KGuiItem( i18n("&Find"), "find") ) { mCalendar = calendar; diff --git a/korganizer/templatemanagementdialog.cpp b/korganizer/templatemanagementdialog.cpp index e6ee19da2..f610a2fd1 100644 --- a/korganizer/templatemanagementdialog.cpp +++ b/korganizer/templatemanagementdialog.cpp @@ -72,7 +72,7 @@ void TemplateManagementDialog::slotAddTemplate() i18n("Please enter a name for the new template:"), i18n("New Template"), &ok ); if ( newTemplate.isEmpty() || !ok ) return; - if ( m_templates.tqfind( newTemplate) != m_templates.end() ) { + if ( m_templates.find( newTemplate) != m_templates.end() ) { int rc = KMessageBox::warningContinueCancel( this, i18n("A template with that name already exists, do you want to overwrite it?."), i18n("Duplicate Template Name"), i18n("Overwrite")); if ( rc == KMessageBox::Cancel ) { TQTimer::singleShot(0, this, TQT_SLOT( slotAddTemplate() ) ); diff --git a/korganizer/templatemanagementdialog.h b/korganizer/templatemanagementdialog.h index 134211c45..0a8fadf08 100644 --- a/korganizer/templatemanagementdialog.h +++ b/korganizer/templatemanagementdialog.h @@ -57,7 +57,7 @@ Q_OBJECT /* Emitted whenever the user wants to add teh current incidence as a template with the given name. */ void saveTemplate( const TQString& templateName ); - /* Emitted when the dialog changed the list of templates. Calling code can the tqreplace + /* Emitted when the dialog changed the list of templates. Calling code can the replace the list that was handed in with the one this signal transports. */ void templatesChanged( const TQStringList& templates ); diff --git a/korganizer/urihandler.cpp b/korganizer/urihandler.cpp index 7caad0e34..a9eb31ba9 100644 --- a/korganizer/urihandler.cpp +++ b/korganizer/urihandler.cpp @@ -80,10 +80,10 @@ bool UriHandler::process( TQWidget *tqparent, const TQString &uri ) kapp->startServiceByDesktopPath("kmail"); // parse string, show - int colon = uri.tqfind( ':' ); + int colon = uri.find( ':' ); // extract 'number' from 'kmail:/' TQString serialNumberStr = uri.mid( colon + 1 ); - serialNumberStr = serialNumberStr.left( serialNumberStr.tqfind( '/' ) ); + serialNumberStr = serialNumberStr.left( serialNumberStr.find( '/' ) ); KMailIface_stub kmailIface( "kmail", "KMailIface" ); kmailIface.showMail( serialNumberStr.toUInt(), TQString() ); diff --git a/korn/account_input.cpp b/korn/account_input.cpp index e3cb48f91..c7b35228e 100644 --- a/korn/account_input.cpp +++ b/korn/account_input.cpp @@ -136,8 +136,8 @@ TQString ComboInput::value() const void ComboInput::setValue( const TQString& value ) { - if( _list->tqcontains( value ) ) - _right->setCurrentItem( _list->keys().tqfindIndex( value ) ); + if( _list->contains( value ) ) + _right->setCurrentItem( _list->keys().findIndex( value ) ); else _right->setCurrentItem( -1 ); } diff --git a/korn/accountmanager.cpp b/korn/accountmanager.cpp index 5a93ec679..fec63a2b2 100644 --- a/korn/accountmanager.cpp +++ b/korn/accountmanager.cpp @@ -241,7 +241,7 @@ void AccountManager::playSound( const TQString& file ) void AccountManager::slotChanged( int count, KMailDrop* mailDrop ) { - Dropinfo *info = _dropInfo->tqfind( mailDrop ).data(); + Dropinfo *info = _dropInfo->find( mailDrop ).data(); info->newMessages = count > info->msgnr || ( count == info->msgnr && info->newMessages ); if( count > info->msgnr ) diff --git a/korn/dcopdrop.cpp b/korn/dcopdrop.cpp index 9cc4a9f05..aea90103e 100644 --- a/korn/dcopdrop.cpp +++ b/korn/dcopdrop.cpp @@ -74,11 +74,11 @@ bool DCOPDrop::readConfigGroup( const KConfigGroup &cfg ) bool DCOPDrop::readConfigGroup( const TQMap< TQString, TQString > &map, const Protocol * ) { - if( !map.tqcontains( "dcopname" ) ) + if( !map.contains( "dcopname" ) ) //The mapping MUST contain dcopname. kdDebug() << "mapping is niet compleet" << endl; - this->setDCOPName( *map.tqfind( "dcopname" ) ); + this->setDCOPName( *map.find( "dcopname" ) ); return true; } @@ -125,7 +125,7 @@ bool DCOPDrop::deleteMails( TQPtrList * ids, bool * ) for( const KornMailId *it = ids->first(); it; it = ids->next() ) { const KornIntId* id = dynamic_cast< const KornIntId* >( it ); - if( _msgList->tqcontains( id->getId() ) ) + if( _msgList->contains( id->getId() ) ) _msgList->erase( id->getId() ); } @@ -173,7 +173,7 @@ int DCOPDrop::addMessage( const TQString& subject, const TQString& message ) bool DCOPDrop::removeMessage( int id ) { - if( ! _msgList->tqcontains( id ) ) + if( ! _msgList->contains( id ) ) return false; delete (*_msgList)[ id ]; diff --git a/korn/imap_proto.cpp b/korn/imap_proto.cpp index 7d0f9873a..304fed5ed 100644 --- a/korn/imap_proto.cpp +++ b/korn/imap_proto.cpp @@ -65,34 +65,34 @@ void Imap_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObjec void Imap_Protocol::readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString > *metadata ) const { - if( map->tqcontains( "ssl" ) && *map->tqfind( "ssl" ) == "true" ) + if( map->contains( "ssl" ) && *map->find( "ssl" ) == "true" ) map->insert( "encryption", "ssl" ); - if( metadata->tqcontains( "tls" ) ) - map->insert( "encryption", TQString( "tls=%1" ).tqarg( *metadata->tqfind( "tls" ) ) ); - if( metadata->tqcontains( "auth" ) ) - map->insert( "auth", TQString( "auth=%1" ).tqarg( *metadata->tqfind( "auth" ) ) ); + if( metadata->contains( "tls" ) ) + map->insert( "encryption", TQString( "tls=%1" ).tqarg( *metadata->find( "tls" ) ) ); + if( metadata->contains( "auth" ) ) + map->insert( "auth", TQString( "auth=%1" ).tqarg( *metadata->find( "auth" ) ) ); } void Imap_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { TQString metadata; - if( map->tqcontains( "encryption" ) ) + if( map->contains( "encryption" ) ) { - if( *map->tqfind( "encryption" ) == "ssl" ) + if( *map->find( "encryption" ) == "ssl" ) map->insert( "ssl", "true" ); else { map->insert( "ssl", "false" ); - metadata += *map->tqfind( "encryption" ); + metadata += *map->find( "encryption" ); } map->erase( "encryption" ); } - if( map->tqcontains( "auth" ) ) + if( map->contains( "auth" ) ) { if( !metadata.isEmpty() ) metadata += ","; - metadata += *map->tqfind( "auth" ); + metadata += *map->find( "auth" ); map->erase( "auth" ); } diff --git a/korn/kconf_update/korn-3-4-config_change.cpp b/korn/kconf_update/korn-3-4-config_change.cpp index 4d0c46679..7ff7a922c 100644 --- a/korn/kconf_update/korn-3-4-config_change.cpp +++ b/korn/kconf_update/korn-3-4-config_change.cpp @@ -188,7 +188,7 @@ int main( int, char** ) } else if( currentGroup1.isNull() || !isKey ) continue; - if( mapping1.tqcontains( key_value.cap( 1 ) ) ) + if( mapping1.contains( key_value.cap( 1 ) ) ) { out << currentGroup1 << endl; out << mapping1[ key_value.cap( 1 ) ] << "=" << key_value.cap( 2 ) << endl; @@ -198,7 +198,7 @@ int main( int, char** ) out << "name=" << key_value.cap( 2 ) << endl; } } - else if( mapping2.tqcontains( key_value.cap( 1 ) ) ) + else if( mapping2.contains( key_value.cap( 1 ) ) ) { to_printed.insert( key_value.cap( 1 ), key_value.cap( 2 ) ); } diff --git a/korn/kio.cpp b/korn/kio.cpp index 54d0e773d..0977eb603 100644 --- a/korn/kio.cpp +++ b/korn/kio.cpp @@ -180,11 +180,11 @@ void KKioDrop::setKioServer(const TQString & proto, const TQString & server, int _ssl = ssl; //Checking for authentication-settings. - //if( _metadata->tqcontains("auth") ) + //if( _metadata->contains("auth") ) //{ // auth = (*_metadata)["auth"]; // *_metadata = metadata; - // if( ! _metadata->tqcontains("auth") ) + // if( ! _metadata->contains("auth") ) // (*_metadata)["auth"] = auth; //} else *_metadata = metadata; @@ -201,7 +201,7 @@ void KKioDrop::setUser(const TQString & user, const TQString & password, _kurl->setPath( mailbox ); if( ! auth.isEmpty() && auth != "Plain" ) (*_metadata)["auth"] = auth; - else if( _metadata->tqcontains( "auth" ) ) + else if( _metadata->contains( "auth" ) ) _metadata->erase( "auth" ); _valid = _kurl->isValid(); @@ -241,7 +241,7 @@ TQString KKioDrop::mailbox() const } TQString KKioDrop::auth() const { - return ( _metadata->tqcontains("auth")?(*_metadata)["auth"]:"" ); + return ( _metadata->contains("auth")?(*_metadata)["auth"]:"" ); } void KKioDrop::recheck() @@ -337,32 +337,32 @@ bool KKioDrop::readConfigGroup( const TQMap< TQString, TQString > &map, const Pr { TQString val, val2; - if( !map.tqcontains( "server" ) || !map.tqcontains( "port" ) || !map.tqcontains( "ssl" ) || !map.tqcontains( "username" ) || - !map.tqcontains( "mailbox" ) || !map.tqcontains( "password" ) || !map.tqcontains( "metadata" ) || !map.tqcontains( "name" ) ) + if( !map.contains( "server" ) || !map.contains( "port" ) || !map.contains( "ssl" ) || !map.contains( "username" ) || + !map.contains( "mailbox" ) || !map.contains( "password" ) || !map.contains( "metadata" ) || !map.contains( "name" ) ) { kdWarning() << "Bug: map niet compleet" << endl; return false; } - this->setName( (*map.tqfind( "name" )).utf8() ); + this->setName( (*map.find( "name" )).utf8() ); _protocol = protocol->getKIOProtocol(); if( !_protocol ) _protocol = Protocols::firstProtocol()->getKIOProtocol(); - val = *map.tqfind( "server" ); - setKioServer( val2, val, (*map.tqfind( "port" )).toInt(), KIO::MetaData(), *map.tqfind( "ssl" ) == "true", false ); + val = *map.find( "server" ); + setKioServer( val2, val, (*map.find( "port" )).toInt(), KIO::MetaData(), *map.find( "ssl" ) == "true", false ); - _kurl->setUser( *map.tqfind( "username" ) ); - _kurl->setPath( *map.tqfind( "mailbox" ) ); + _kurl->setUser( *map.find( "username" ) ); + _kurl->setPath( *map.find( "mailbox" ) ); - _kurl->setPass( *map.tqfind( "password" ) ); + _kurl->setPass( *map.find( "password" ) ); - TQStringList list = TQStringList::split( ',', *map.tqfind( "metadata" ) ); + TQStringList list = TQStringList::split( ',', *map.find( "metadata" ) ); TQStringList::Iterator it; for( it = list.begin(); it != list.end(); ++it ) { - int split = (*it).tqfind( "=" ); + int split = (*it).find( "=" ); if( split > 0 ) _metadata->insert( (*it).left( split ), (*it).right( (*it).length() - split - 1 ) ); } diff --git a/korn/kio_count.cpp b/korn/kio_count.cpp index faac9390b..e43b97060 100644 --- a/korn/kio_count.cpp +++ b/korn/kio_count.cpp @@ -292,7 +292,7 @@ void KIO_Count::entries( KIO::Job* job, const KIO::UDSEntryList &list ) if( ! fileinfo.name.isNull() && isFile ) { _new_mailurls->append( fileinfo ); - if( ! old_list.tqcontains( fileinfo.name ) && _kio->passivePopup() ) + if( ! old_list.contains( fileinfo.name ) && _kio->passivePopup() ) showPassive( fileinfo.name ); } } diff --git a/korn/kio_proto.cpp b/korn/kio_proto.cpp index fc0a45ac4..8434fe44b 100644 --- a/korn/kio_proto.cpp +++ b/korn/kio_proto.cpp @@ -63,13 +63,13 @@ void KIO_Protocol::readEntries( TQMap< TQString, TQString >* map ) const { TQMap< TQString, TQString> *metadata = new TQMap< TQString, TQString >; - if( map->tqcontains( "metadata" ) ) + if( map->contains( "metadata" ) ) { - TQStringList list = TQStringList::split( ",", *map->tqfind( "metadata" ) ); + TQStringList list = TQStringList::split( ",", *map->find( "metadata" ) ); TQStringList::Iterator it; for( it = list.begin(); it != list.end(); ++it ) { - int split = (*it).tqfind( '=' ); + int split = (*it).find( '=' ); metadata->insert( (*it).left( split ), (*it).right( (*it).length() - split - 1 ) ); } diff --git a/korn/kornaccountcfgimpl.cpp b/korn/kornaccountcfgimpl.cpp index 149fd55b0..56f64b765 100644 --- a/korn/kornaccountcfgimpl.cpp +++ b/korn/kornaccountcfgimpl.cpp @@ -80,8 +80,8 @@ void KornAccountCfgImpl::readConfig( KConfigGroup *config, TQMap< TQString, TQSt (*entries)[ "password" ] = KOrnPassword::readKOrnPassword( boxnr, accountnr, *config ); for( input = _accountinput->first(); input; input = _accountinput->next() ) - if( entries->tqcontains( input->configName() ) ) - input->setValue( *(entries->tqfind( input->configName() ) ) ); + if( entries->contains( input->configName() ) ) + input->setValue( *(entries->find( input->configName() ) ) ); this->edInterval->setText( _config->readEntry( "interval", "300" ) ); @@ -115,9 +115,9 @@ void KornAccountCfgImpl::writeConfig() protocol->writeEntries( map ); - if( map->tqcontains( "password" ) ) + if( map->contains( "password" ) ) { - KOrnPassword::writeKOrnPassword( _boxnr, _accountnr, *_config, *map->tqfind( "password" ) ); + KOrnPassword::writeKOrnPassword( _boxnr, _accountnr, *_config, *map->find( "password" ) ); map->erase( "password" ); } diff --git a/korn/maildir_proto.h b/korn/maildir_proto.h index 0023cfdc0..2ce5e9dbb 100644 --- a/korn/maildir_proto.h +++ b/korn/maildir_proto.h @@ -47,7 +47,7 @@ public: virtual TQString serverName() const { return i18n( "Path:" ); } virtual void recheckKURL( KURL &kurl, KIO::MetaData & ) - { kurl.setPath( kurl.host() + "/." + kurl.path().tqreplace( '/' , '.' ) + "/new" ); kurl.setHost( "" ); } + { kurl.setPath( kurl.host() + "/." + kurl.path().replace( '/' , '.' ) + "/new" ); kurl.setHost( "" ); } virtual void readSubjectKURL( KURL &, KIO::MetaData & ) { } virtual void deleteMailKURL( KURL &, KIO::MetaData & ) { } virtual void readMailKURL( KURL &, KIO::MetaData & ) { } diff --git a/korn/mailsubject.cpp b/korn/mailsubject.cpp index ee675906f..747d9ec7c 100644 --- a/korn/mailsubject.cpp +++ b/korn/mailsubject.cpp @@ -67,7 +67,7 @@ TQString KornMailSubject::decodeRFC2047String(const TQCString& aStr) if ( str.isEmpty() ) return TQString(); - if ( str.tqfind( "=?" ) < 0 ) { + if ( str.find( "=?" ) < 0 ) { // No need to decode return TQString(str); } diff --git a/korn/pop3_proto.cpp b/korn/pop3_proto.cpp index c42076426..c4ecd6b16 100644 --- a/korn/pop3_proto.cpp +++ b/korn/pop3_proto.cpp @@ -64,34 +64,34 @@ void Pop3_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObjec void Pop3_Protocol::readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString > *metadata ) const { - if( map->tqcontains( "ssl" ) && *map->tqfind( "ssl" ) == "true" ) + if( map->contains( "ssl" ) && *map->find( "ssl" ) == "true" ) map->insert( "encryption", "ssl" ); - if( metadata->tqcontains( "tls" ) ) - map->insert( "encryption", TQString( "tls=%1" ).tqarg( *metadata->tqfind( "tls" ) ) ); - if( metadata->tqcontains( "auth" ) ) + if( metadata->contains( "tls" ) ) + map->insert( "encryption", TQString( "tls=%1" ).tqarg( *metadata->find( "tls" ) ) ); + if( metadata->contains( "auth" ) ) map->insert( "auth", TQString( "auth=APOP" ) ); } void Pop3_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { TQString metadata; - if( map->tqcontains( "encryption" ) ) + if( map->contains( "encryption" ) ) { - if( *map->tqfind( "encryption" ) == "ssl" ) + if( *map->find( "encryption" ) == "ssl" ) map->insert( "ssl", "true" ); else { map->insert( "ssl", "false" ); - metadata += *map->tqfind( "encryption" ); + metadata += *map->find( "encryption" ); } map->erase( "encryption" ); } - if( map->tqcontains( "auth" ) ) + if( map->contains( "auth" ) ) { - if( !metadata.isEmpty() && ! (*map->tqfind( "auth" )).isEmpty() ) + if( !metadata.isEmpty() && ! (*map->find( "auth" )).isEmpty() ) metadata += ","; - metadata += *map->tqfind( "auth" ); + metadata += *map->find( "auth" ); map->erase( "auth" ); } diff --git a/korn/pop3_proto.h b/korn/pop3_proto.h index feaed812b..c828e595f 100644 --- a/korn/pop3_proto.h +++ b/korn/pop3_proto.h @@ -44,8 +44,8 @@ public: virtual TQStringList authList() const { return TQStringList::split( '|', "Plain|APOP", false ); } - virtual void readSubjectKURL( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().tqreplace( "/download/", "/headers/" ) ); } - virtual void deleteMailKURL ( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().tqreplace( "/download/", "/remove/" ) ); } + virtual void readSubjectKURL( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().replace( "/download/", "/headers/" ) ); } + virtual void deleteMailKURL ( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().replace( "/download/", "/remove/" ) ); } virtual bool commitDelete () const { return true; } virtual void deleteCommitKURL(KURL & kurl, KIO::MetaData & ) const { kurl.setPath( "commit" ); } diff --git a/korn/protocols.cpp b/korn/protocols.cpp index c35ce4bae..d604e0870 100644 --- a/korn/protocols.cpp +++ b/korn/protocols.cpp @@ -42,7 +42,7 @@ const Protocol* Protocols::getProto( const TQString& proto ) if( !protocols ) fillProtocols(); - return protocols->tqfind( proto ); + return protocols->find( proto ); } const Protocol* Protocols::firstProtocol() diff --git a/kresources/birthdays/resourcekabc.cpp b/kresources/birthdays/resourcekabc.cpp index f3be66d83..db0a7b77d 100644 --- a/kresources/birthdays/resourcekabc.cpp +++ b/kresources/birthdays/resourcekabc.cpp @@ -151,7 +151,7 @@ bool ResourceKABC::doLoad() bool hasCategory = false; TQStringList categories = (*it).categories(); for ( strIt = mCategories.begin(); strIt != endStrIt; ++strIt ) - if ( categories.tqcontains( *strIt ) ) { + if ( categories.contains( *strIt ) ) { hasCategory = true; break; } diff --git a/kresources/birthdays/resourcekabcconfig.cpp b/kresources/birthdays/resourcekabcconfig.cpp index 20a9aaf48..1f55138f1 100644 --- a/kresources/birthdays/resourcekabcconfig.cpp +++ b/kresources/birthdays/resourcekabcconfig.cpp @@ -92,7 +92,7 @@ void ResourceKABCConfig::loadSettings( KRES::Resource *resource ) const TQStringList categories = res->categories(); TQListViewItemIterator it( mCategoryView ); while ( it.current() ) { - if ( categories.tqcontains( it.current()->text( 0 ) ) ) { + if ( categories.contains( it.current()->text( 0 ) ) ) { TQCheckListItem *item = static_cast( it.current() ); item->setOn( true ); } diff --git a/kresources/blogging/API_Blogger.cpp b/kresources/blogging/API_Blogger.cpp index c5e3c4a62..5cdeec257 100644 --- a/kresources/blogging/API_Blogger.cpp +++ b/kresources/blogging/API_Blogger.cpp @@ -299,8 +299,8 @@ bool APIBlogger::readPostingFromMap( BlogPosting *post, const TQMap catStart ) { category = contents.mid( catStart, catEnd - catStart ); @@ -308,8 +308,8 @@ kdDebug() << " catTagOpen = " << catTagOpen << ", catTagClose = " << catTagClos contents = contents.remove( catStart - catTagOpen.length(), catEnd - catStart + catTagClose.length() + catTagOpen.length() ); } - int titleStart = contents.tqfind( titleTagOpen, 0, false ) + titleTagOpen.length(); - int titleEnd = contents.tqfind( titleTagClose, 0, false ); + int titleStart = contents.find( titleTagOpen, 0, false ) + titleTagOpen.length(); + int titleEnd = contents.find( titleTagClose, 0, false ); kdDebug() << " titleTagOpen = " << titleTagOpen << ", titleTagClose = " << titleTagClose << ", start - end : " << titleStart <<" - " << titleEnd << endl; kdDebug() << "Title start and end: " << titleStart << ", " << titleEnd << endl; if ( titleEnd > titleStart ) { diff --git a/kresources/blogging/xmlrpcjob.cpp b/kresources/blogging/xmlrpcjob.cpp index f20dff875..9a89cf5ab 100644 --- a/kresources/blogging/xmlrpcjob.cpp +++ b/kresources/blogging/xmlrpcjob.cpp @@ -337,7 +337,7 @@ kdDebug()<<"Demarshalling element \"" << elem.text() <<"\"" << endl; else if ( typeName == "datetime" || typeName == "datetime.iso8601" ) { TQString text( typeElement.text() ); - if ( text.tqfind( TQRegExp("^[0-9]{8,8}T") ) >= 0 ) { + if ( text.find( TQRegExp("^[0-9]{8,8}T") ) >= 0 ) { // It's in the format 20041120T...., so adjust it to correct // ISO 8601 Format 2004-11-20T..., else TQDateTime::fromString won't work: text = text.insert( 6, '-' ); diff --git a/kresources/caldav/preferences.cpp b/kresources/caldav/preferences.cpp index 11de07e98..6eb87e450 100644 --- a/kresources/caldav/preferences.cpp +++ b/kresources/caldav/preferences.cpp @@ -218,16 +218,16 @@ TQString CalDavPrefs::getFullUrl() { safeURL = t.toString(); - firstAt = safeURL.tqfind("@") + 1; - while (safeURL.tqfind("@", firstAt) != -1) { - safeURL.tqreplace(safeURL.tqfind("@", firstAt), 1, "%40"); + firstAt = safeURL.find("@") + 1; + while (safeURL.find("@", firstAt) != -1) { + safeURL.replace(safeURL.find("@", firstAt), 1, "%40"); } // Unencode the username, as Zimbra stupidly rejects the %40 - safeURL.tqreplace("%40", "@"); + safeURL.replace("%40", "@"); // Encode any spaces, as libcaldav stupidly fails otherwise - safeURL.tqreplace(" ", "%20"); + safeURL.replace(" ", "%20"); return safeURL; } @@ -245,16 +245,16 @@ TQString CalDavPrefs::getFullTasksUrl() { safeURL = t.toString(); - firstAt = safeURL.tqfind("@") + 1; - while (safeURL.tqfind("@", firstAt) != -1) { - safeURL.tqreplace(safeURL.tqfind("@", firstAt), 1, "%40"); + firstAt = safeURL.find("@") + 1; + while (safeURL.find("@", firstAt) != -1) { + safeURL.replace(safeURL.find("@", firstAt), 1, "%40"); } // Unencode the username, as Zimbra stupidly rejects the %40 - safeURL.tqreplace("%40", "@"); + safeURL.replace("%40", "@"); // Encode any spaces, as libcaldav stupidly fails otherwise - safeURL.tqreplace(" ", "%20"); + safeURL.replace(" ", "%20"); return safeURL; } @@ -272,16 +272,16 @@ TQString CalDavPrefs::getFullJournalsUrl() { safeURL = t.toString(); - firstAt = safeURL.tqfind("@") + 1; - while (safeURL.tqfind("@", firstAt) != -1) { - safeURL.tqreplace(safeURL.tqfind("@", firstAt), 1, "%40"); + firstAt = safeURL.find("@") + 1; + while (safeURL.find("@", firstAt) != -1) { + safeURL.replace(safeURL.find("@", firstAt), 1, "%40"); } // Unencode the username, as Zimbra stupidly rejects the %40 - safeURL.tqreplace("%40", "@"); + safeURL.replace("%40", "@"); // Encode any spaces, as libcaldav stupidly fails otherwise - safeURL.tqreplace(" ", "%20"); + safeURL.replace(" ", "%20"); return safeURL; } diff --git a/kresources/caldav/resource.cpp b/kresources/caldav/resource.cpp index d828037bf..db4546d82 100644 --- a/kresources/caldav/resource.cpp +++ b/kresources/caldav/resource.cpp @@ -403,8 +403,8 @@ void ResourceCalDav::loadFinished() { // TODO: I don't know why, but some schedules on http://caldav-test.ioda.net/ (I used it for testing) // have some lines separated by single \r rather than \n or \r\n. // ICalFormat fails to parse that. - data.tqreplace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line - data.tqreplace('\r', '\n'); + data.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line + data.replace('\r', '\n'); log("trying to parse..."); if (parseData(data)) { @@ -451,8 +451,8 @@ void ResourceCalDav::loadFinished() { // TODO: I don't know why, but some schedules on http://caldav-test.ioda.net/ (I used it for testing) // have some lines separated by single \r rather than \n or \r\n. // ICalFormat fails to parse that. - tasksData.tqreplace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line - tasksData.tqreplace('\r', '\n'); + tasksData.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line + tasksData.replace('\r', '\n'); log("trying to parse..."); if (parseTasksData(tasksData)) { @@ -499,8 +499,8 @@ void ResourceCalDav::loadFinished() { // TODO: I don't know why, but some schedules on http://caldav-test.ioda.net/ (I used it for testing) // have some lines separated by single \r rather than \n or \r\n. // ICalFormat fails to parse that. - journalsData.tqreplace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line - journalsData.tqreplace('\r', '\n'); + journalsData.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line + journalsData.replace('\r', '\n'); log("trying to parse..."); if (parseJournalsData(journalsData)) { @@ -726,7 +726,7 @@ TQString ResourceCalDav::getICalString(const Incidence::List& inc) { // Get the iCal header and footer header = ical.toString(&loc); - int location = header.tqfind("END:VCALENDAR", 0, true); + int location = header.find("END:VCALENDAR", 0, true); footer = header.mid(location, 0xffffffff); header.remove("END:VCALENDAR"); @@ -740,13 +740,13 @@ TQString ResourceCalDav::getICalString(const Incidence::List& inc) { data = data + footer; // Remove any line feeds/carriage returns/white spaces from the UID field as they WILL break libcaldav - int uidPos = data.tqfind("UID:", 0) + 4; - int nextPos = data.tqfindRev("\n", data.tqfind(":", uidPos)); + int uidPos = data.find("UID:", 0) + 4; + int nextPos = data.findRev("\n", data.find(":", uidPos)); TQString uidField = data.mid(uidPos, nextPos-uidPos); data.remove(uidPos, nextPos-uidPos); - uidField.tqreplace("\n", ""); - uidField.tqreplace("\r", ""); - uidField.tqreplace(" ", ""); + uidField.replace("\n", ""); + uidField.replace("\r", ""); + uidField.replace(" ", ""); data.insert(uidPos, uidField); return data; } @@ -888,11 +888,11 @@ bool ResourceCalDav::startWriting(const TQString& url, const TQString& tasksUrl, t->journalsAdded = ""; t->journalsChanged = ""; t->journalsDeleted = ""; - if (getICalString(currentIncidence).tqcontains("BEGIN:VEVENT") > 0) + if (getICalString(currentIncidence).contains("BEGIN:VEVENT") > 0) t->added = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VTODO") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VTODO") > 0) t->tasksAdded = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VJOURNAL") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VJOURNAL") > 0) t->journalsAdded = getICalString(currentIncidence); writingQueuePush(t); @@ -916,11 +916,11 @@ bool ResourceCalDav::startWriting(const TQString& url, const TQString& tasksUrl, t->journalsChanged = ""; t->journalsDeleted = ""; - if (getICalString(currentIncidence).tqcontains("BEGIN:VEVENT") > 0) + if (getICalString(currentIncidence).contains("BEGIN:VEVENT") > 0) t->changed = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VTODO") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VTODO") > 0) t->tasksChanged = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VJOURNAL") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VJOURNAL") > 0) t->journalsChanged = getICalString(currentIncidence); writingQueuePush(t); @@ -944,11 +944,11 @@ bool ResourceCalDav::startWriting(const TQString& url, const TQString& tasksUrl, t->journalsChanged = ""; t->journalsDeleted = ""; - if (getICalString(currentIncidence).tqcontains("BEGIN:VEVENT") > 0) + if (getICalString(currentIncidence).contains("BEGIN:VEVENT") > 0) t->deleted = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VTODO") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VTODO") > 0) t->tasksDeleted = getICalString(currentIncidence); - else if (getICalString(currentIncidence).tqcontains("BEGIN:VJOURNALS") > 0) + else if (getICalString(currentIncidence).contains("BEGIN:VJOURNALS") > 0) t->journalsDeleted = getICalString(currentIncidence); writingQueuePush(t); diff --git a/kresources/carddav/preferences.cpp b/kresources/carddav/preferences.cpp index 6511cfcb6..cf2cdbc5a 100644 --- a/kresources/carddav/preferences.cpp +++ b/kresources/carddav/preferences.cpp @@ -221,16 +221,16 @@ TQString CardDavPrefs::getFullUrl() { safeURL = t.toString(); - firstAt = safeURL.tqfind("@") + 1; - while (safeURL.tqfind("@", firstAt) != -1) { - safeURL.tqreplace(safeURL.tqfind("@", firstAt), 1, "%40"); + firstAt = safeURL.find("@") + 1; + while (safeURL.find("@", firstAt) != -1) { + safeURL.replace(safeURL.find("@", firstAt), 1, "%40"); } // Unencode the username, as Zimbra stupidly rejects the %40 - safeURL.tqreplace("%40", "@"); + safeURL.replace("%40", "@"); // Encode any spaces, as libcarddav stupidly fails otherwise - safeURL.tqreplace(" ", "%20"); + safeURL.replace(" ", "%20"); return safeURL; } diff --git a/kresources/carddav/resource.cpp b/kresources/carddav/resource.cpp index 9570d2b3c..4fb33af55 100644 --- a/kresources/carddav/resource.cpp +++ b/kresources/carddav/resource.cpp @@ -394,8 +394,8 @@ void ResourceCardDav::loadFinished() { TQString data = loader->data(); if (!data.isNull() && !data.isEmpty()) { - data.tqreplace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line - data.tqreplace('\r', '\n'); + data.replace("\r\n", "\n"); // to avoid \r\n becomes \n\n after the next line + data.replace('\r', '\n'); log("trying to parse..."); if (parseData(data)) { diff --git a/kresources/carddav/writer.cpp b/kresources/carddav/writer.cpp index aed9ddb66..7141bf303 100644 --- a/kresources/carddav/writer.cpp +++ b/kresources/carddav/writer.cpp @@ -58,8 +58,8 @@ int CardDavWriter::runJob(runtime_info* RT) { res = pushObjects(mChanged, carddav_modify_object_by_uri, OK, RT); if (OK == res) { kdDebug() << "pushing deleted objects"; - while (mDeleted.tqcontains("BEGIN:VCARD", TRUE) > 0) { - int endLocation = mDeleted.tqfind("END:VCARD", 0, TRUE); + while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) { + int endLocation = mDeleted.find("END:VCARD", 0, TRUE); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9); mDeleted = mDeleted.remove(0, endLocation+9); if (getUseURI() == false) @@ -82,8 +82,8 @@ int CardDavWriter::runJob(runtime_info* RT) { res = pushObjects(mChanged, carddav_add_object, OK, RT); if (OK == res) { kdDebug() << "pushing deleted objects"; - while (mDeleted.tqcontains("BEGIN:VCARD", TRUE) > 0) { - int endLocation = mDeleted.tqfind("END:VCARD", 0, TRUE); + while (mDeleted.contains("BEGIN:VCARD", TRUE) > 0) { + int endLocation = mDeleted.find("END:VCARD", 0, TRUE); TQString deletedCurSeq = mDeleted.mid(0, endLocation+9); mDeleted = mDeleted.remove(0, endLocation+9); if (getUseURI() == false) diff --git a/kresources/egroupware/debugdialog.cpp b/kresources/egroupware/debugdialog.cpp index 1660c85e0..57a6479f4 100644 --- a/kresources/egroupware/debugdialog.cpp +++ b/kresources/egroupware/debugdialog.cpp @@ -109,9 +109,9 @@ void DebugDialog::slotUser2() void DebugDialog::addText( const TQString &text, Type type ) { TQString htmlCode( text ); - htmlCode.tqreplace( "<", "<" ); - htmlCode.tqreplace( ">", ">" ); - htmlCode.tqreplace( "\n", "
" ); + htmlCode.replace( "<", "<" ); + htmlCode.replace( ">", ">" ); + htmlCode.replace( "\n", "
" ); mMessages.append( text ); if ( type == Input ) diff --git a/kresources/egroupware/kabc_resourcexmlrpc.cpp b/kresources/egroupware/kabc_resourcexmlrpc.cpp index 2e5053240..a02f568af 100644 --- a/kresources/egroupware/kabc_resourcexmlrpc.cpp +++ b/kresources/egroupware/kabc_resourcexmlrpc.cpp @@ -479,7 +479,7 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap catMap; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - TQMap::ConstIterator it = mCategoryMap.tqfind( *catIt ); + TQMap::ConstIterator it = mCategoryMap.find( *catIt ); if ( it == mCategoryMap.end() ) // new category catMap.insert( TQString::number( counter-- ), *catIt ); else @@ -575,9 +575,9 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap &mapLi mCategoryMap.insert( it.data().toString(), it.key().toInt() ); TQStringList categories = prefs->customCategories(); - if ( categories.tqfind( it.data().toString() ) == categories.end() ) + if ( categories.find( it.data().toString() ) == categories.end() ) categories.append( it.data().toString() ); prefs->mCustomCategories = categories; diff --git a/kresources/egroupware/kcal_resourcexmlrpc.cpp b/kresources/egroupware/kcal_resourcexmlrpc.cpp index 177ce9def..25f4c1f2d 100644 --- a/kresources/egroupware/kcal_resourcexmlrpc.cpp +++ b/kresources/egroupware/kcal_resourcexmlrpc.cpp @@ -651,7 +651,7 @@ void ResourceXMLRPC::loadEventCategoriesFinished( const TQValueList & for ( it = map.begin(); it != map.end(); ++it ) { mEventCategoryMap.insert( it.data().toString(), it.key().toInt() ); - if ( prefs.mCustomCategories.tqfind( it.data().toString() ) == prefs.mCustomCategories.end() ) + if ( prefs.mCustomCategories.find( it.data().toString() ) == prefs.mCustomCategories.end() ) prefs.mCustomCategories.append( it.data().toString() ); } @@ -756,7 +756,7 @@ void ResourceXMLRPC::loadTodoCategoriesFinished( const TQValueList &m for ( it = map.begin(); it != map.end(); ++it ) { mTodoCategoryMap.insert( it.data().toString(), it.key().toInt() ); - if ( prefs.mCustomCategories.tqfind( it.data().toString() ) == prefs.mCustomCategories.end() ) + if ( prefs.mCustomCategories.find( it.data().toString() ) == prefs.mCustomCategories.end() ) prefs.mCustomCategories.append( it.data().toString() ); } @@ -964,7 +964,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap &args TQMap catMap; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - TQMap::Iterator it = mEventCategoryMap.tqfind( *catIt ); + TQMap::Iterator it = mEventCategoryMap.find( *catIt ); if ( it == mEventCategoryMap.end() ) // new category catMap.insert( TQString::number( counter-- ), *catIt ); else @@ -1099,7 +1099,7 @@ void ResourceXMLRPC::writeTodo( Todo* todo, TQMap& args ) TQStringList::ConstIterator catIt; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - TQMap::Iterator it = mTodoCategoryMap.tqfind( *catIt ); + TQMap::Iterator it = mTodoCategoryMap.find( *catIt ); if ( it == mTodoCategoryMap.end() ) catMap.insert( TQString::number( counter-- ), *catIt ); else diff --git a/kresources/egroupware/todostatemapper.cpp b/kresources/egroupware/todostatemapper.cpp index 2539d23aa..ed87e9db6 100644 --- a/kresources/egroupware/todostatemapper.cpp +++ b/kresources/egroupware/todostatemapper.cpp @@ -114,7 +114,7 @@ void TodoStateMapper::addTodoState( const TQString &uid, int localState, const T TQString TodoStateMapper::remoteState( const TQString &uid, int localState ) { - if ( mTodoStateMap.tqfind( uid ) == mTodoStateMap.end() ) + if ( mTodoStateMap.find( uid ) == mTodoStateMap.end() ) kdError() << "TodoStateMapper: no entry for " << uid << " found" << endl; TodoStateMapEntry entry = mTodoStateMap[ uid ]; @@ -139,7 +139,7 @@ int TodoStateMapper::toLocal( const TQString &remoteState ) return 100; else { TQString number( remoteState ); - number.tqreplace( "%", "" ); + number.replace( "%", "" ); return number.toInt(); } } diff --git a/kresources/egroupware/xmlrpciface.cpp b/kresources/egroupware/xmlrpciface.cpp index 4a46a37eb..59b467bb2 100644 --- a/kresources/egroupware/xmlrpciface.cpp +++ b/kresources/egroupware/xmlrpciface.cpp @@ -202,10 +202,10 @@ TQString Query::marshal( const TQVariant &arg ) const case TQVariant::CString: { TQString result = arg.toString(); - result = result.tqreplace( "&", "&" ); - result = result.tqreplace( "\"", """ ); - result = result.tqreplace( "<", "<" ); - result = result.tqreplace( ">", ">" ); + result = result.replace( "&", "&" ); + result = result.replace( "\"", """ ); + result = result.replace( "<", "<" ); + result = result.replace( ">", ">" ); return "" + result + "\r\n"; } case TQVariant::Int: diff --git a/kresources/exchange/dateset.cpp b/kresources/exchange/dateset.cpp index e6393afa0..b26229022 100644 --- a/kresources/exchange/dateset.cpp +++ b/kresources/exchange/dateset.cpp @@ -48,7 +48,7 @@ void DateSet::add( TQDate const& date ) mDates->insert( 0, new TQPair( date, date ) ); return; } - int i = tqfind( date ); + int i = find( date ); mDates->insert( i, new TQPair( date, date ) ); tryMerge( i ); tryMerge( i-1 ); @@ -60,7 +60,7 @@ void DateSet::add( TQDate const& from, TQDate const& to ) mDates->insert( 0, new TQPair( from, to ) ); return; } - uint i = tqfind( from ); + uint i = find( from ); kdDebug() << "Adding range at position " << i << endl; mDates->insert( i, new TQPair( from, to ) ); @@ -87,7 +87,7 @@ void DateSet::remove( TQDate const& date ) return; } - uint i = tqfind( date ); + uint i = find( date ); if ( i == mDates->count() ) return; @@ -117,7 +117,7 @@ void DateSet::remove( TQDate const& from, TQDate const& to ) return; } - uint i = tqfind( from ); + uint i = find( from ); if ( i == mDates->count() ) return; @@ -155,13 +155,13 @@ void DateSet::remove( TQDate const& from, TQDate const& to ) } } -bool DateSet::tqcontains( TQDate const& date ) +bool DateSet::contains( TQDate const& date ) { if (mDates->isEmpty()) { return false; } - uint i = tqfind( date ); + uint i = find( date ); // kdDebug() << "contains looking for " << date.toString() << " at range " << i << endl; if ( i == mDates->count() ) return false; @@ -172,13 +172,13 @@ bool DateSet::tqcontains( TQDate const& date ) } // returns true if and only if the whole range is in the set -bool DateSet::tqcontains( TQDate const& from, TQDate const& to ) +bool DateSet::contains( TQDate const& from, TQDate const& to ) { if (mDates->isEmpty()) { return false; } - uint i = tqfind( from ); + uint i = find( from ); if ( i == mDates->count() ) return false; @@ -192,7 +192,7 @@ bool DateSet::tqcontains( TQDate const& from, TQDate const& to ) // If mDates is empty, return 0. // If date is later than the last item in mDates, return mDates->count() -int DateSet::tqfind( TQDate const& date ) +int DateSet::find( TQDate const& date ) { if ( mDates->isEmpty() ) return 0; diff --git a/kresources/exchange/dateset.h b/kresources/exchange/dateset.h index 99c02a5c7..693aa4a31 100644 --- a/kresources/exchange/dateset.h +++ b/kresources/exchange/dateset.h @@ -34,8 +34,8 @@ class DateRange { DateRange( TQDate const& from, TQDate const& to ) : mFrom( from ), mTo( to ) { } bool operator< ( const DateRange& r ) { return mFrom < r.from(); } - bool tqcontains( TQDate const& d ) { return ( mFrom <= d && d <= mTo ); } - bool tqcontains( TQDate const& from, TQDate const& to ) { return ( mFrom <= from && to <= mTo ); } + bool contains( TQDate const& d ) { return ( mFrom <= d && d <= mTo ); } + bool contains( TQDate const& from, TQDate const& to ) { return ( mFrom <= from && to <= mTo ); } TQDate from() { return mFrom; } TQDate to() { return mTo; } @@ -68,11 +68,11 @@ class DateSet { void remove( TQDate const& date ); void remove( TQDate const& from, TQDate const& to ); - bool tqcontains( TQDate const& date ); + bool contains( TQDate const& date ); // returns true if and only if the whole range is in the set - bool tqcontains( TQDate const& from, TQDate const& to ); + bool contains( TQDate const& from, TQDate const& to ); - int tqfind( TQDate const &date ); + int find( TQDate const &date ); void print(); protected: diff --git a/kresources/exchange/resourceexchange.cpp b/kresources/exchange/resourceexchange.cpp index de9158755..b58a750f2 100644 --- a/kresources/exchange/resourceexchange.cpp +++ b/kresources/exchange/resourceexchange.cpp @@ -233,7 +233,7 @@ void ResourceExchange::slotMonitorNotify( const TQValueList& IDs, const TQ * 3. Event modified that we have in cache * 4. Something else happened that isn't relevant to us * Update cache, then notify whoever's watching us - * We may be able to tqfind (1) and (3) by looking at the + * We may be able to find (1) and (3) by looking at the * DAV:getlastmodified property * (2) is trickier: we might have to resort to checking * all uids in the cache @@ -298,7 +298,7 @@ void ResourceExchange::changeIncidence( Incidence *incidence ) kdDebug() << "ResourceExchange::changeIncidence(): " << incidence->summary() << endl; - if ( mChangedIncidences.tqfind( incidence ) == mChangedIncidences.end() ) { + if ( mChangedIncidences.find( incidence ) == mChangedIncidences.end() ) { mChangedIncidences.append( incidence ); } } @@ -481,7 +481,7 @@ Event::List ResourceExchange::rawEventsForDate( const TQDate &qd, // kdDebug() << "Now is " << now.toString() << endl; // kdDebug() << "mDates: " << mDates << endl; TQDate start = TQDate( qd.year(), qd.month(), 1 ); // First day of month - if ( mDates && ( !mDates->tqcontains( start ) || + if ( mDates && ( !mDates->contains( start ) || (*mCacheDates)[start].secsTo( now ) > mCachedSeconds ) ) { TQDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month // Get events that occur in this period from the cache @@ -505,7 +505,7 @@ Event::List ResourceExchange::rawEventsForDate( const TQDate &qd, // are really new. Event::List eventsAfter = mCache->rawEvents(); for ( it = eventsAfter.begin(); it != eventsAfter.end(); ++it ) { - if ( eventsBefore.tqfind( *it ) == eventsBefore.end() ) { + if ( eventsBefore.find( *it ) == eventsBefore.end() ) { // it's a new event downloaded by downloadSynchronous -> install observer (*it)->registerObserver( this ); } diff --git a/kresources/featureplan/kcal_resourcefeatureplan.cpp b/kresources/featureplan/kcal_resourcefeatureplan.cpp index 692a85846..e108247fa 100644 --- a/kresources/featureplan/kcal_resourcefeatureplan.cpp +++ b/kresources/featureplan/kcal_resourcefeatureplan.cpp @@ -119,7 +119,7 @@ void ResourceFeaturePlan::insertCategories( const Category::List &categories, Todo *todo = new Todo; TQString summary = f->summary(); - int pos = summary.tqfind( '\n' ); + int pos = summary.find( '\n' ); if ( pos > 0 ) summary = summary.left( pos ) + "..."; todo->setSummary( summary ); diff --git a/kresources/groupdav/groupdavglobals.cpp b/kresources/groupdav/groupdavglobals.cpp index ed1ad09b8..10716000d 100644 --- a/kresources/groupdav/groupdavglobals.cpp +++ b/kresources/groupdav/groupdavglobals.cpp @@ -96,7 +96,7 @@ bool GroupDavGlobals::getFolderHasSubs( const TQDomNode &folderNode ) KIO::Job *GroupDavGlobals::createListFoldersJob( const KURL &url ) { TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" ); TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" ); WebdavHandler::addElement( doc, prop, "d:displayname" ); WebdavHandler::addElement( doc, prop, "d:resourcetype" ); @@ -110,7 +110,7 @@ KIO::Job *GroupDavGlobals::createListFoldersJob( const KURL &url ) KIO::TransferJob *GroupDavGlobals::createListItemsJob( const KURL &url ) { TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addDavElement( doc, prop, "getetag" ); // WebdavHandler::addDavElement( doc, prop, "getcontenttype" ); diff --git a/kresources/groupware/kabc_resourcegroupwareconfig.cpp b/kresources/groupware/kabc_resourcegroupwareconfig.cpp index 7232fd1e0..efdc7ec42 100644 --- a/kresources/groupware/kabc_resourcegroupwareconfig.cpp +++ b/kresources/groupware/kabc_resourcegroupwareconfig.cpp @@ -193,7 +193,7 @@ void ResourceGroupwareConfig::updateAddressBookView() Groupware::AddressBook::List::ConstIterator abIt; for ( abIt = addressBooks.begin(); abIt != addressBooks.end(); ++abIt ) { AddressBookItem *item = new AddressBookItem( mAddressBookView, *abIt ); - if ( selectedRead.tqfind( (*abIt).id ) != selectedRead.end() ) + if ( selectedRead.find( (*abIt).id ) != selectedRead.end() ) item->setOn( true ); mAddressBookBox->insertItem( (*abIt).name ); diff --git a/kresources/groupwise/kabc_resourcegroupwise.cpp b/kresources/groupwise/kabc_resourcegroupwise.cpp index 6ac8a880a..e6570b46e 100644 --- a/kresources/groupwise/kabc_resourcegroupwise.cpp +++ b/kresources/groupwise/kabc_resourcegroupwise.cpp @@ -665,13 +665,13 @@ bool ResourceGroupwise::shouldFetchSystemAddressBook() { TQStringList ids = mPrefs->readAddressBooks(); - return ( appIsWhiteListedForSAB() && ids.tqfind( mPrefs->systemAddressBook() ) != ids.end() ); + return ( appIsWhiteListedForSAB() && ids.find( mPrefs->systemAddressBook() ) != ids.end() ); } bool ResourceGroupwise::shouldFetchUserAddressBooks() { TQStringList ids = mPrefs->readAddressBooks(); - return ( ids.count() > 1 || ids.tqfind( mPrefs->systemAddressBook() ) == ids.end() ); + return ( ids.count() > 1 || ids.find( mPrefs->systemAddressBook() ) == ids.end() ); } KURL ResourceGroupwise::createAccessUrl( BookType bookType, AccessMode mode, unsigned long lastSequenceNumber, unsigned long lastPORebuildTime ) @@ -732,7 +732,7 @@ void ResourceGroupwise::storeDeltaInfo() bool ResourceGroupwise::appIsWhiteListedForSAB() { - if ( !mPrefs->systemAddressBookWhiteList().tqcontains( tqApp->argv()[ 0 ] ) ) + if ( !mPrefs->systemAddressBookWhiteList().contains( tqApp->argv()[ 0 ] ) ) { kdDebug() << "Application " << tqApp->argv()[ 0 ] << " is _blacklisted_ to load the SAB" << endl; return false; diff --git a/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp b/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp index a5ccb74fc..220769077 100644 --- a/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp +++ b/kresources/groupwise/kabc_resourcegroupwiseconfig.cpp @@ -168,7 +168,7 @@ void ResourceGroupwiseConfig::saveAddressBookSettings() // if so, clear the resource to clear the SAB data that is no longer required. // also, set the sequence numbers to 0 so that we know the SAB should be re-fetched in its entirety the next time we do load it TQString sab = mResource->prefs()->systemAddressBook(); - if ( ( mReadAddressBookIds.tqfind( sab ) != mReadAddressBookIds.end() ) && ( selectedRead.tqfind( sab ) == selectedRead.end() ) ) + if ( ( mReadAddressBookIds.find( sab ) != mReadAddressBookIds.end() ) && ( selectedRead.find( sab ) == selectedRead.end() ) ) { mResource->clearCache(); mResource->prefs()->setLastSequenceNumber( 0 ); @@ -195,14 +195,14 @@ void ResourceGroupwiseConfig::updateAddressBookView() GroupWise::AddressBook::List::ConstIterator abIt; for ( abIt = addressBooks.begin(); abIt != addressBooks.end(); ++abIt ) { AddressBookItem *item = new AddressBookItem( mAddressBookView, *abIt ); - if ( selectedRead.tqfind( (*abIt).id ) != selectedRead.end() ) + if ( selectedRead.find( (*abIt).id ) != selectedRead.end() ) item->setOn( true ); mAddressBookBox->insertItem( (*abIt).name ); mWriteAddressBookIds.append( (*abIt).id ); } - int index = mWriteAddressBookIds.tqfindIndex( mResource->prefs()->writeAddressBook() ); + int index = mWriteAddressBookIds.findIndex( mResource->prefs()->writeAddressBook() ); mAddressBookBox->setCurrentItem( index ); } diff --git a/kresources/groupwise/kioslave/groupwise.cpp b/kresources/groupwise/kioslave/groupwise.cpp index 8689309b4..6ea0c8ed4 100644 --- a/kresources/groupwise/kioslave/groupwise.cpp +++ b/kresources/groupwise/kioslave/groupwise.cpp @@ -106,12 +106,12 @@ void Groupwise::get( const KURL &url ) TQString path = url.path(); debugMessage( "Path: " + path ); - if ( path.tqcontains( "/freebusy" ) ) { + if ( path.contains( "/freebusy" ) ) { getFreeBusy( url ); - } else if ( path.tqcontains( "/calendar" ) ) { + } else if ( path.contains( "/calendar" ) ) { getCalendar( url ); - } else if ( path.tqcontains( "/addressbook" ) ) { - if ( url.query().tqcontains( "update=true" ) ) + } else if ( path.contains( "/addressbook" ) ) { + if ( url.query().contains( "update=true" ) ) updateAddressbook( url ); else getAddressbook( url ); @@ -169,8 +169,8 @@ void Groupwise::getFreeBusy( const KURL &url ) // Sanitise local Nuernberg email addresses kdDebug() << "Email before sanitizing: " << email << endl; - email = email.tqreplace(TQRegExp("\\.EMEA5-1\\.EMEA5" ), "" ); - email = email.tqreplace(TQRegExp("\\.Suse.INTERNET" ), "" ); + email = email.replace(TQRegExp("\\.EMEA5-1\\.EMEA5" ), "" ); + email = email.replace(TQRegExp("\\.Suse.INTERNET" ), "" ); kdDebug() << "Email after sanitizing: " << email << endl; TQString u = soapUrl( url ); diff --git a/kresources/groupwise/soap/contactconverter.cpp b/kresources/groupwise/soap/contactconverter.cpp index 605d14d69..d4ab5f6a4 100644 --- a/kresources/groupwise/soap/contactconverter.cpp +++ b/kresources/groupwise/soap/contactconverter.cpp @@ -313,7 +313,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) std::vector list = contact->emailList->email; std::vector::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { - if ( emails.tqfind( stringToTQString( *it ) ) == emails.end() ) + if ( emails.find( stringToTQString( *it ) ) == emails.end() ) emails.append( stringToTQString( *it ) ); } } @@ -618,12 +618,12 @@ ngwt__ImAddressList* ContactConverter::convertImAddresses( const KABC::Addressee void ContactConverter::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { - int colon = str.tqfind( ':' ); + int colon = str.find( ':' ); if ( colon != -1 ) { TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); - int dash = tmp.tqfind( '-' ); + int dash = tmp.find( '-' ); if ( dash != -1 ) { app = tmp.left( dash ); name = tmp.mid( dash + 1 ); diff --git a/kresources/groupwise/soap/groupwiseserver.cpp b/kresources/groupwise/soap/groupwiseserver.cpp index 3aee84877..93a3f0a27 100644 --- a/kresources/groupwise/soap/groupwiseserver.cpp +++ b/kresources/groupwise/soap/groupwiseserver.cpp @@ -60,7 +60,7 @@ static TQMap mServerMap; int myOpen( struct soap *soap, const char *endpoint, const char *host, int port ) { TQMap::ConstIterator it; - it = mServerMap.tqfind( soap ); + it = mServerMap.find( soap ); if ( it == mServerMap.end() ) { soap->error = SOAP_FAULT; return SOAP_INVALID_SOCKET; @@ -72,7 +72,7 @@ int myOpen( struct soap *soap, const char *endpoint, const char *host, int port int myClose( struct soap *soap ) { TQMap::ConstIterator it; - it = mServerMap.tqfind( soap ); + it = mServerMap.find( soap ); if ( it == mServerMap.end() ) return SOAP_FAULT; return (*it)->gSoapClose( soap ); @@ -81,7 +81,7 @@ int myClose( struct soap *soap ) int mySendCallback( struct soap *soap, const char *s, size_t n ) { TQMap::ConstIterator it; - it = mServerMap.tqfind( soap ); + it = mServerMap.find( soap ); if ( it == mServerMap.end() ) return SOAP_FAULT; return (*it)->gSoapSendCallback( soap, s, n ); @@ -90,7 +90,7 @@ int mySendCallback( struct soap *soap, const char *s, size_t n ) size_t myReceiveCallback( struct soap *soap, char *s, size_t n ) { TQMap::ConstIterator it; - it = mServerMap.tqfind( soap ); + it = mServerMap.find( soap ); if ( it == mServerMap.end() ) { kdDebug() << "No soap object found" << endl; soap->error = SOAP_FAULT; diff --git a/kresources/groupwise/soap/gwjobs.cpp b/kresources/groupwise/soap/gwjobs.cpp index 7a95cf6e8..6f5918597 100644 --- a/kresources/groupwise/soap/gwjobs.cpp +++ b/kresources/groupwise/soap/gwjobs.cpp @@ -84,7 +84,7 @@ void ReadAddressBooksJob::run() } else { TQString id = GWConverter::stringToTQString( (*it)->id ); kdDebug() << "Reading ID: " << id << endl; - if ( mAddressBookIds.tqfind( id ) != mAddressBookIds.end() ) { + if ( mAddressBookIds.find( id ) != mAddressBookIds.end() ) { readAddressBook( *(*it)->id ); mProgress += 100; } @@ -438,7 +438,7 @@ void ReadCalendarJob::run() // perform consistency checks kdDebug() << "Total count of items of all types in folders we read: " << totalItems << endl; kdDebug() << "Folders we read contained " << totals.appointments << " appointments, " << totals.notes << " notes, and " << totals.tasks << " tasks." << endl; - kdDebug() << "Local calendar now tqcontains " << mCalendar->rawEvents().count() << " events and " << mCalendar->rawJournals().count() << " journals, and " << mCalendar->rawTodos().count() << " todos." << endl; + kdDebug() << "Local calendar now contains " << mCalendar->rawEvents().count() << " events and " << mCalendar->rawJournals().count() << " journals, and " << mCalendar->rawTodos().count() << " todos." << endl; if ( totals.appointments == mCalendar->rawEvents().count() ) kdDebug() << "All events accounted for." << endl; else diff --git a/kresources/groupwise/soap/ksslsocket.cpp b/kresources/groupwise/soap/ksslsocket.cpp index c07708799..30e8bb643 100644 --- a/kresources/groupwise/soap/ksslsocket.cpp +++ b/kresources/groupwise/soap/ksslsocket.cpp @@ -150,12 +150,12 @@ void KSSLSocket::setMetaData( const TQString &key, const TQVariant &data ) bool KSSLSocket::hasMetaData( const TQString &key ) { - return d->metaData.tqcontains(key); + return d->metaData.contains(key); } TQString KSSLSocket::metaData( const TQString &key ) { - if( d->metaData.tqcontains(key) ) + if( d->metaData.contains(key) ) return d->metaData[key]; return TQString(); } diff --git a/kresources/groupwise/soap/soapC.cpp b/kresources/groupwise/soap/soapC.cpp index 17c52d602..b446bc4ba 100644 --- a/kresources/groupwise/soap/soapC.cpp +++ b/kresources/groupwise/soap/soapC.cpp @@ -12992,7 +12992,7 @@ static const struct soap_code_map soap_codes_ngwt__FilterOp[] = { (long)lt, "lt" }, { (long)gte, "gte" }, { (long)lte, "lte" }, - { (long)tqcontains, "tqcontains" }, + { (long)contains, "contains" }, { (long)containsWord, "containsWord" }, { (long)begins, "begins" }, { (long)exists, "exists" }, diff --git a/kresources/groupwise/soap/soapStub.h b/kresources/groupwise/soap/soapStub.h index 7ba6692e9..829237fda 100644 --- a/kresources/groupwise/soap/soapStub.h +++ b/kresources/groupwise/soap/soapStub.h @@ -115,7 +115,7 @@ enum ngwt__FilterDate {Today = 0, Tomorrow = 1, ThisMonth = 2, ThisWeek = 3, Thi #ifndef SOAP_TYPE_ngwt__FilterOp #define SOAP_TYPE_ngwt__FilterOp (357) /* ngwt:FilterOp */ -enum ngwt__FilterOp {and_ = 0, or_ = 1, not_ = 2, eq = 3, ne = 4, gt = 5, lt = 6, gte = 7, lte = 8, tqcontains = 9, containsWord = 10, begins = 11, exists = 12, notExist = 13, isOf = 14, isNotOf = 15, fieldEqual = 16, fieldGTE = 17, fieldGT = 18, fieldLTE = 19, fieldLT = 20, fieldNE = 21, fieldDateEqual = 22}; +enum ngwt__FilterOp {and_ = 0, or_ = 1, not_ = 2, eq = 3, ne = 4, gt = 5, lt = 6, gte = 7, lte = 8, contains = 9, containsWord = 10, begins = 11, exists = 12, notExist = 13, isOf = 14, isNotOf = 15, fieldEqual = 16, fieldGTE = 17, fieldGT = 18, fieldLTE = 19, fieldLT = 20, fieldNE = 21, fieldDateEqual = 22}; #endif #ifndef SOAP_TYPE_ngwt__FolderACLtqStatus diff --git a/kresources/groupwise/soap/stdsoap2.h b/kresources/groupwise/soap/stdsoap2.h index 3a337402a..603d4def9 100644 --- a/kresources/groupwise/soap/stdsoap2.h +++ b/kresources/groupwise/soap/stdsoap2.h @@ -1257,8 +1257,8 @@ struct soap_dom_element struct soap_dom_element &add(struct soap_dom_attribute&); soap_dom_iterator begin(); soap_dom_iterator end(); - soap_dom_iterator tqfind(const char *nstr, const char *name); - soap_dom_iterator tqfind(int type); + soap_dom_iterator find(const char *nstr, const char *name); + soap_dom_iterator find(int type); void unlink(); soap_dom_element(); soap_dom_element(struct soap *soap); diff --git a/kresources/kolab/kabc/contact.cpp b/kresources/kolab/kabc/contact.cpp index 474eafa3d..b75355f5a 100644 --- a/kresources/kolab/kabc/contact.cpp +++ b/kresources/kolab/kabc/contact.cpp @@ -1115,16 +1115,16 @@ void Contact::setFields( const KABC::Addressee* addressee ) for( TQStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) { // KABC::Addressee doesn't offer a real way to iterate over customs, other than splitting strings ourselves // The format is "app-name:value". - int pos = (*it).tqfind( '-' ); + int pos = (*it).find( '-' ); if ( pos == -1 ) continue; TQString app = (*it).left( pos ); if ( app == "KOLAB" ) continue; TQString name = (*it).mid( pos + 1 ); - pos = name.tqfind( ':' ); + pos = name.find( ':' ); if ( pos == -1 ) continue; TQString value = name.mid( pos + 1 ); name = name.left( pos ); - if ( !knownCustoms.tqcontains( name ) ) { + if ( !knownCustoms.contains( name ) ) { //kdDebug() << k_funcinfo << "app=" << app << " name=" << name << " value=" << value << endl; Custom c; if ( app != "KADDRESSBOOK" ) // that's the default @@ -1162,8 +1162,8 @@ void Contact::saveTo( KABC::Addressee* addressee ) for ( ; mit != mDistrListMembers.end(); ++mit ) { TQString displayName = (*mit).displayName; // fixup the display name DistributionList::assumes neither ',' nor ';' is present - displayName.tqreplace( ',', ' ' ); - displayName.tqreplace( ';', ' ' ); + displayName.replace( ',', ' ' ); + displayName.replace( ';', ' ' ); distrList.insertEntry( displayName, (*mit).email ); } addressee->insertCustom( "KADDRESSBOOK", "DistributionList", distrList.custom( "KADDRESSBOOK", "DistributionList" ) ); diff --git a/kresources/kolab/kabc/resourcekolab.cpp b/kresources/kolab/kabc/resourcekolab.cpp index 0acabb09b..ff19fb50d 100644 --- a/kresources/kolab/kabc/resourcekolab.cpp +++ b/kresources/kolab/kabc/resourcekolab.cpp @@ -335,7 +335,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr ) const TQString uid = addr.uid(); TQString subResource; TQ_UINT32 sernum; - if ( mUidMap.tqfind( uid ) != mUidMap.end() ) { + if ( mUidMap.find( uid ) != mUidMap.end() ) { subResource = mUidMap[ uid ].resource(); if ( !subresourceWritable( subResource ) ) { kdWarning() << "Wow! Something tried to update a non-writable addressee! Fix this caller: " << kdBacktrace() << endl; @@ -398,7 +398,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr ) kdDebug(5650) << "kmailUpdate returned, now sernum=" << sernum << " for uid=" << uid << endl; mUidMap[ uid ] = StorageReference( subResource, sernum ); // This is ugly, but it's faster than doing - // mAddrMap.tqfind(addr.uid()), which would give the same :-( + // mAddrMap.find(addr.uid()), which would give the same :-( // Reason for this: The Changed attribute of Addressee should // be mutable const_cast(addr).setChanged( false ); @@ -416,7 +416,7 @@ void KABC::ResourceKolab::insertAddressee( const Addressee& addr ) const TQString uid = addr.uid(); //kdDebug(5650) << k_funcinfo << uid << endl; bool ok = false; - if ( mUidMap.tqcontains( uid ) ) { + if ( mUidMap.contains( uid ) ) { mUidsPendingUpdate.append( uid ); } else { mUidsPendingAdding.append( uid ); @@ -431,7 +431,7 @@ void KABC::ResourceKolab::insertAddressee( const Addressee& addr ) void KABC::ResourceKolab::removeAddressee( const Addressee& addr ) { const TQString uid = addr.uid(); - if ( mUidMap.tqfind( uid ) == mUidMap.end() ) return; + if ( mUidMap.find( uid ) == mUidMap.end() ) return; //kdDebug(5650) << k_funcinfo << uid << endl; const TQString resource = mUidMap[ uid ].resource(); if ( !subresourceWritable( resource ) ) { @@ -468,8 +468,8 @@ bool KABC::ResourceKolab::fromKMailAddIncidence( const TQString& type, //kdDebug(5650) << k_funcinfo << uid << endl; // Emit "addressbook changed" if this comes from kmail and not from the GUI - if ( !mUidsPendingAdding.tqcontains( uid ) - && !mUidsPendingUpdate.tqcontains( uid ) ) { + if ( !mUidsPendingAdding.contains( uid ) + && !mUidsPendingUpdate.contains( uid ) ) { addressBook()->emitAddressBookChanged(); } else { mUidsPendingAdding.remove( uid ); @@ -490,9 +490,9 @@ void KABC::ResourceKolab::fromKMailDelIncidence( const TQString& type, //kdDebug(5650) << k_funcinfo << uid << endl; // Can't be in both, by contract - if ( mUidsPendingDeletion.tqcontains( uid ) ) { + if ( mUidsPendingDeletion.contains( uid ) ) { mUidsPendingDeletion.remove( uid ); - } else if ( mUidsPendingUpdate.tqcontains( uid ) ) { + } else if ( mUidsPendingUpdate.contains( uid ) ) { // It's good to know if was deleted, but we are waiting on a new one to // replace it, so let's just sit tight. } else { @@ -523,7 +523,7 @@ void KABC::ResourceKolab::fromKMailAddSubresource( const TQString& type, { if( type != s_kmailContentsType ) return; - if ( mSubResources.tqcontains( subResource ) ) + if ( mSubResources.contains( subResource ) ) // Already registered return; @@ -540,7 +540,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const TQString& type, { if( type != s_kmailContentsType ) return; - if ( !mSubResources.tqcontains( subResource ) ) + if ( !mSubResources.contains( subResource ) ) // Not registered return; @@ -597,7 +597,7 @@ TQStringList KABC::ResourceKolab::subresources() const bool KABC::ResourceKolab::subresourceActive( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].active(); } @@ -609,7 +609,7 @@ bool KABC::ResourceKolab::subresourceActive( const TQString& subresource ) const bool KABC::ResourceKolab::subresourceWritable( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].writable(); } return false; //better a safe default @@ -617,7 +617,7 @@ bool KABC::ResourceKolab::subresourceWritable( const TQString& subresource ) con int KABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].completionWeight(); } @@ -628,7 +628,7 @@ int KABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresourc TQString KABC::ResourceKolab::subresourceLabel( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].label(); } @@ -638,7 +638,7 @@ TQString KABC::ResourceKolab::subresourceLabel( const TQString& subresource ) co void KABC::ResourceKolab::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight ) { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { mSubResources[ subresource ].setCompletionWeight( completionWeight ); } else { kdDebug(5650) << "setSubresourceCompletionWeight: subresource " << subresource << " not found" << endl; @@ -657,7 +657,7 @@ TQMap KABC::ResourceKolab::uidToResourceMap() const void KABC::ResourceKolab::setSubresourceActive( const TQString &subresource, bool active ) { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { mSubResources[ subresource ].setActive( active ); load(); } else { diff --git a/kresources/kolab/kcal/resourcekolab.cpp b/kresources/kolab/kcal/resourcekolab.cpp index da2cee412..2107642b6 100644 --- a/kresources/kolab/kcal/resourcekolab.cpp +++ b/kresources/kolab/kcal/resourcekolab.cpp @@ -285,7 +285,7 @@ void ResourceKolab::removeIncidences( const TQCString& incidenceType ) // better call event(uid), todo(uid) etc. directly. // A faster but hackish way would probably be to check the type of the resource, - // like mEventSubResources.tqfind( it.data().resource() ) != mEventSubResources.end() ? + // like mEventSubResources.find( it.data().resource() ) != mEventSubResources.end() ? const TQString& uid = it.key(); if ( incidenceType == "Event" && mCalendar.event( uid ) ) mUidMap.remove( it ); @@ -310,7 +310,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase ) const TQString uid = incidencebase->uid(); //kdDebug() << k_funcinfo << uid << endl; - if ( mUidsPendingUpdate.tqcontains( uid ) || mUidsPendingAdding.tqcontains( uid ) ) { + if ( mUidsPendingUpdate.contains( uid ) || mUidsPendingAdding.contains( uid ) ) { /* We are currently processing this event ( removing and readding or * adding it ). If so, ignore this update. Keep the last of these around * and process once we hear back from KMail on this event. */ @@ -336,7 +336,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase ) if ( i ) { bool ignoreThisUpdate = false; - if ( !mLastKnownRevisions.tqcontains( uid ) ) { + if ( !mLastKnownRevisions.contains( uid ) ) { mLastKnownRevisions[uid] = i->revision(); } @@ -355,7 +355,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase ) TQString subResource; TQ_UINT32 sernum = 0; - if ( mUidMap.tqcontains( uid ) ) { + if ( mUidMap.contains( uid ) ) { subResource = mUidMap[ uid ].resource(); sernum = mUidMap[ uid ].serialNumber(); mUidsPendingUpdate.append( uid ); @@ -543,7 +543,7 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const T // behold, sernum is an in-parameter const bool rc = kmailUpdate( subresource, sernum, data, mimetype, subject, customHeaders, attURLs, attMimeTypes, attNames, deletedAtts ); // update the serial number - if ( mUidMap.tqcontains( incidencebase->uid() ) ) { + if ( mUidMap.contains( incidencebase->uid() ) ) { mUidMap[ incidencebase->uid() ].setSerialNumber( sernum ); } @@ -629,7 +629,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s // Lets not warn the user 100 times that there's no writable resource // and not ask 100 times which resource to use - if ( !mBatchAddingInProgress || !mLastUsedResources.tqcontains( type ) ) { + if ( !mBatchAddingInProgress || !mLastUsedResources.contains( type ) ) { subResource = findWritableResource( type, *map, text ); mLastUsedResources[type] = subResource; } else { @@ -676,7 +676,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s } } } else { /* KMail told us */ - const bool ourOwnUpdate = mUidsPendingUpdate.tqcontains( uid ); + const bool ourOwnUpdate = mUidsPendingUpdate.contains( uid ); kdDebug( 5650 ) << "addIncidence: ourOwnUpdate " << ourOwnUpdate << endl; /* Check if we updated this one, which means kmail deleted and added it. * We know the new state, so lets just not do much at all. The old incidence @@ -692,7 +692,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s * unless the folder is read-only, in which case the user should not be * offered a means of putting mails in a folder she'll later be unable to * upload. Skip the incidence, in this case. */ - if ( mUidMap.tqcontains( uid ) ) { + if ( mUidMap.contains( uid ) ) { if ( mUidMap[ uid ].resource() == subResource ) { if ( (*map)[ subResource ].writable() ) { kdDebug( 5650 ) << "lets resolve the conflict " << endl; @@ -716,7 +716,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s } /* Add to the cache if the add didn't come from KOrganizer, in which case * we've already added it, and listen to updates from KOrganizer for it. */ - if ( !mUidsPendingAdding.tqcontains( uid ) ) { + if ( !mUidsPendingAdding.contains( uid ) ) { mCalendar.addIncidence( incidence ); incidence->registerObserver( this ); } @@ -726,14 +726,14 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s } } /* Check if there are updates for this uid pending and if so process them. */ - if ( KCal::IncidenceBase *update = mPendingUpdates.tqfind( uid ) ) { + if ( KCal::IncidenceBase *update = mPendingUpdates.find( uid ) ) { mSilent = false; // we do want to tell KMail mPendingUpdates.remove( uid ); incidenceUpdated( update ); } else { /* If the uid was added by KMail, KOrganizer needs to be told, so * schedule emitting of the resourceChanged signal. */ - if ( !mUidsPendingAdding.tqcontains( uid ) ) { + if ( !mUidsPendingAdding.contains( uid ) ) { if ( !ourOwnUpdate ) mResourceChangedTimer.changeInterval( 100 ); } else { mUidsPendingAdding.remove( uid ); @@ -752,7 +752,7 @@ bool ResourceKolab::addEvent( KCal::Event *event ) bool ResourceKolab::addEvent( KCal::Event *event, const TQString &subResource ) { - if ( mUidMap.tqcontains( event->uid() ) ) { + if ( mUidMap.contains( event->uid() ) ) { return true; //noop } else { return addIncidence( event, subResource, 0 ); @@ -776,7 +776,7 @@ bool ResourceKolab::deleteIncidence( KCal::Incidence* incidence ) } const TQString uid = incidence->uid(); - if( !mUidMap.tqcontains( uid ) ) return false; // Odd + if( !mUidMap.contains( uid ) ) return false; // Odd /* The user told us to delete, tell KMail */ if ( !mSilent ) { kmailDeleteIncidence( mUidMap[ uid ].resource(), @@ -832,7 +832,7 @@ bool ResourceKolab::addTodo( KCal::Todo *todo ) bool ResourceKolab::addTodo( KCal::Todo *todo, const TQString &subResource ) { - if ( mUidMap.tqcontains( todo->uid() ) ) { + if ( mUidMap.contains( todo->uid() ) ) { return true; //noop } else { return addIncidence( todo, subResource, 0 ); @@ -876,7 +876,7 @@ bool ResourceKolab::addJournal( KCal::Journal *journal ) bool ResourceKolab::addJournal( KCal::Journal *journal, const TQString &subResource ) { - if ( mUidMap.tqcontains( journal->uid() ) ) + if ( mUidMap.contains( journal->uid() ) ) return true; //noop else return addIncidence( journal, subResource, 0 ); @@ -921,12 +921,12 @@ KCal::Alarm::List ResourceKolab::relevantAlarms( const KCal::Alarm::List &alarms KCal::Alarm *a = (*it); ++it; const TQString &uid = a->tqparent()->uid(); - if ( mUidMap.tqcontains( uid ) ) { + if ( mUidMap.contains( uid ) ) { const TQString &sr = mUidMap[ uid ].resource(); Kolab::SubResource *subResource = 0; - if ( mEventSubResources.tqcontains( sr ) ) + if ( mEventSubResources.contains( sr ) ) subResource = &( mEventSubResources[ sr ] ); - else if ( mTodoSubResources.tqcontains( sr ) ) + else if ( mTodoSubResources.contains( sr ) ) subResource = &( mTodoSubResources[ sr ] ); assert( subResource ); if ( subResource->alarmRelevant() ) @@ -1009,16 +1009,16 @@ void ResourceKolab::fromKMailDelIncidence( const TQString& type, if ( !subresourceActive( subResource ) ) return; // Can't be in both, by contract - if ( mUidsPendingDeletion.tqfind( uid ) != mUidsPendingDeletion.end() ) { - mUidsPendingDeletion.remove( mUidsPendingDeletion.tqfind( uid ) ); - } else if ( mUidsPendingUpdate.tqcontains( uid ) ) { + if ( mUidsPendingDeletion.find( uid ) != mUidsPendingDeletion.end() ) { + mUidsPendingDeletion.remove( mUidsPendingDeletion.find( uid ) ); + } else if ( mUidsPendingUpdate.contains( uid ) ) { // It's good to know if was deleted, but we are waiting on a new one to // replace it, so let's just sit tight. } else { TQString uidToUse; TQPair p( uid, subResource ); - if ( mOriginalUID2fakeUID.tqcontains( p ) ) { + if ( mOriginalUID2fakeUID.contains( p ) ) { // Incidence with the same uid in a different folder... // use the UID that addIncidence(...) generated uidToUse = mOriginalUID2fakeUID[p]; @@ -1073,7 +1073,7 @@ void ResourceKolab::fromKMailAddSubresource( const TQString& type, // Not ours return; - if ( map->tqcontains( subResource ) ) + if ( map->contains( subResource ) ) // Already registered return; @@ -1093,7 +1093,7 @@ void ResourceKolab::fromKMailDelSubresource( const TQString& type, ResourceMap* map = subResourceMap( type ); if ( !map ) // not ours return; - if ( map->tqcontains( subResource ) ) + if ( map->contains( subResource ) ) map->erase( subResource ); else // Not registered @@ -1122,11 +1122,11 @@ TQStringList ResourceKolab::subresources() const const TQString ResourceKolab::labelForSubresource( const TQString& subresource ) const { - if ( mEventSubResources.tqcontains( subresource ) ) + if ( mEventSubResources.contains( subresource ) ) return mEventSubResources[ subresource ].label(); - if ( mTodoSubResources.tqcontains( subresource ) ) + if ( mTodoSubResources.contains( subresource ) ) return mTodoSubResources[ subresource ].label(); - if ( mJournalSubResources.tqcontains( subresource ) ) + if ( mJournalSubResources.contains( subresource ) ) return mJournalSubResources[ subresource ].label(); return subresource; } @@ -1146,11 +1146,11 @@ bool ResourceKolab::subresourceActive( const TQString& subresource ) const // before it opens the resource :-( Make sure we are open const_cast( this )->doOpen(); - if ( mEventSubResources.tqcontains( subresource ) ) + if ( mEventSubResources.contains( subresource ) ) return mEventSubResources[ subresource ].active(); - if ( mTodoSubResources.tqcontains( subresource ) ) + if ( mTodoSubResources.contains( subresource ) ) return mTodoSubResources[ subresource ].active(); - if ( mJournalSubResources.tqcontains( subresource ) ) + if ( mJournalSubResources.contains( subresource ) ) return mJournalSubResources[ subresource ].active(); // Safe default bet: @@ -1163,15 +1163,15 @@ void ResourceKolab::setSubresourceActive( const TQString &subresource, bool v ) { ResourceMap *map = 0; const char* mimeType = 0; - if ( mEventSubResources.tqcontains( subresource ) ) { + if ( mEventSubResources.contains( subresource ) ) { map = &mEventSubResources; mimeType = eventAttachmentMimeType; } - if ( mTodoSubResources.tqcontains( subresource ) ) { + if ( mTodoSubResources.contains( subresource ) ) { map = &mTodoSubResources; mimeType = todoAttachmentMimeType; } - if ( mJournalSubResources.tqcontains( subresource ) ) { + if ( mJournalSubResources.contains( subresource ) ) { map = &mJournalSubResources; mimeType = journalAttachmentMimeType; } @@ -1194,11 +1194,11 @@ bool ResourceKolab::subresourceWritable( const TQString& subresource ) const // before it opens the resource :-( Make sure we are open const_cast( this )->doOpen(); - if ( mEventSubResources.tqcontains( subresource ) ) + if ( mEventSubResources.contains( subresource ) ) return mEventSubResources[ subresource ].writable(); - if ( mTodoSubResources.tqcontains( subresource ) ) + if ( mTodoSubResources.contains( subresource ) ) return mTodoSubResources[ subresource ].writable(); - if ( mJournalSubResources.tqcontains( subresource ) ) + if ( mJournalSubResources.contains( subresource ) ) return mJournalSubResources[ subresource ].writable(); return false; //better a safe default @@ -1236,11 +1236,11 @@ bool ResourceKolab::addSubresource( const TQString& resource, const TQString& tq kdDebug(5650) << "KCal Kolab resource - adding subresource: " << resource << endl; TQString contentsType = kmailCalendarContentsType; if ( !tqparent.isEmpty() ) { - if ( mEventSubResources.tqcontains( tqparent ) ) + if ( mEventSubResources.contains( tqparent ) ) contentsType = kmailCalendarContentsType; - else if ( mTodoSubResources.tqcontains( tqparent ) ) + else if ( mTodoSubResources.contains( tqparent ) ) contentsType = kmailTodoContentsType; - else if ( mJournalSubResources.tqcontains( tqparent ) ) + else if ( mJournalSubResources.contains( tqparent ) ) contentsType = kmailJournalContentsType; } else { TQStringList contentTypeChoices; @@ -1269,10 +1269,10 @@ bool ResourceKolab::removeSubresource( const TQString& resource ) TQString ResourceKolab::subresourceIdentifier( Incidence *incidence ) { TQString uid = incidence->uid(); - if ( mUidMap.tqcontains( uid ) ) + if ( mUidMap.contains( uid ) ) return mUidMap[ uid ].resource(); else - if ( mNewIncidencesMap.tqcontains( uid ) ) + if ( mNewIncidencesMap.contains( uid ) ) return mNewIncidencesMap[ uid ]; else return TQString(); @@ -1311,11 +1311,11 @@ bool ResourceKolab::unloadSubResource( const TQString& subResource ) TQString ResourceKolab::subresourceType( const TQString &resource ) { - if ( mEventSubResources.tqcontains( resource ) ) + if ( mEventSubResources.contains( resource ) ) return "event"; - if ( mTodoSubResources.tqcontains( resource ) ) + if ( mTodoSubResources.contains( resource ) ) return "todo"; - if ( mJournalSubResources.tqcontains( resource ) ) + if ( mJournalSubResources.contains( resource ) ) return "journal"; return TQString(); } diff --git a/kresources/kolab/knotes/resourcekolab.cpp b/kresources/kolab/knotes/resourcekolab.cpp index cf386218a..132decdf5 100644 --- a/kresources/kolab/knotes/resourcekolab.cpp +++ b/kresources/kolab/knotes/resourcekolab.cpp @@ -178,12 +178,12 @@ KCal::Journal* ResourceKolab::addNote( const TQString& data, const TQString& sub Q_ASSERT( journal ); bool addedOk = journal && - !mUidMap.tqcontains( journal->uid() ) && + !mUidMap.contains( journal->uid() ) && addNote( journal, subresource, sernum ); // for debugging - if ( journal && mUidMap.tqcontains( journal->uid() ) ) { - kdDebug(5500) << "mUidMap already tqcontains " << journal->uid() << endl; + if ( journal && mUidMap.contains( journal->uid() ) ) { + kdDebug(5500) << "mUidMap already contains " << journal->uid() << endl; } if ( !addedOk ) { @@ -232,7 +232,7 @@ bool ResourceKolab::addNote( KCal::Journal *journal, const TQString &subresource bool ResourceKolab::deleteNote( KCal::Journal* journal ) { const TQString uid = journal->uid(); - if ( !mUidMap.tqcontains( uid ) ) + if ( !mUidMap.contains( uid ) ) // Odd return false; @@ -271,7 +271,7 @@ void ResourceKolab::incidenceUpdated( KCal::IncidenceBase* i ) { TQString subResource; TQ_UINT32 sernum; - if ( mUidMap.tqcontains( i->uid() ) ) { + if ( mUidMap.contains( i->uid() ) ) { subResource = mUidMap[ i->uid() ].resource(); sernum = mUidMap[ i->uid() ].serialNumber(); } else { // can this happen? @@ -352,7 +352,7 @@ void ResourceKolab::fromKMailAddSubresource( const TQString& type, // Not ours return; - if ( mSubResources.tqcontains( subResource ) ) + if ( mSubResources.contains( subResource ) ) // Already registered return; @@ -372,7 +372,7 @@ void ResourceKolab::fromKMailDelSubresource( const TQString& type, // Not ours return; - if ( !mSubResources.tqcontains( subResource ) ) + if ( !mSubResources.contains( subResource ) ) // Not registered return; @@ -440,7 +440,7 @@ TQStringList ResourceKolab::subresources() const bool ResourceKolab::subresourceActive( const TQString& res ) const { - if ( mSubResources.tqcontains( res ) ) { + if ( mSubResources.contains( res ) ) { return mSubResources[ res ].active(); } @@ -452,7 +452,7 @@ bool ResourceKolab::subresourceActive( const TQString& res ) const bool ResourceKolab::subresourceWritable( const TQString& res ) const { - if ( mSubResources.tqcontains( res ) ) { + if ( mSubResources.contains( res ) ) { return mSubResources[ res ].writable(); } diff --git a/kresources/kolab/shared/kmailconnection.cpp b/kresources/kolab/shared/kmailconnection.cpp index d9ffd98d5..8e584fb2a 100644 --- a/kresources/kolab/shared/kmailconnection.cpp +++ b/kresources/kolab/shared/kmailconnection.cpp @@ -82,10 +82,10 @@ bool KMailConnection::connectToKMail() // someone, probably ourselves, already offers the interface, if not stop here const QCStringList services = kapp->dcopClient()->registeredApplications(); for ( uint i = 0; i < services.count(); ++i ) { - if ( services[i].tqfind( "anonymous" ) == 0 ) // querying anonymous-XXXXX deadlocks as well, what are those anyway? + if ( services[i].find( "anonymous" ) == 0 ) // querying anonymous-XXXXX deadlocks as well, what are those anyway? continue; const QCStringList objs = kapp->dcopClient()->remoteObjects( services[i] ); - if ( objs.tqcontains( dcopObjectId ) ) { + if ( objs.contains( dcopObjectId ) ) { dcopService = services[i]; break; } diff --git a/kresources/lib/calendaradaptor.cpp b/kresources/lib/calendaradaptor.cpp index 9c6084b92..88685bdfe 100644 --- a/kresources/lib/calendaradaptor.cpp +++ b/kresources/lib/calendaradaptor.cpp @@ -75,11 +75,11 @@ bool CalendarAdaptor::localItemHasChanged( const TQString &localId ) if ( !i ) return false; if ( !mResource->deletedIncidences().isEmpty() && - mResource->deletedIncidences().tqfind( i ) + mResource->deletedIncidences().find( i ) != mResource->deletedIncidences().end() ) return true; if ( !mResource->changedIncidences().isEmpty() && - mResource->changedIncidences().tqfind( i ) + mResource->changedIncidences().find( i ) != mResource->changedIncidences().end() ) return true; diff --git a/kresources/lib/folderconfig.cpp b/kresources/lib/folderconfig.cpp index f8feb456f..f5af726ac 100644 --- a/kresources/lib/folderconfig.cpp +++ b/kresources/lib/folderconfig.cpp @@ -73,12 +73,12 @@ void FolderConfig::setFolderLister( FolderLister *f ) TQValueList types; TQValueList suptypes( mFolderLister->supportedTypes() ); - if ( suptypes.tqcontains( FolderLister::Event ) ) types << FolderListView::Event; - if ( suptypes.tqcontains( FolderLister::Todo ) ) types << FolderListView::Todo; - if ( suptypes.tqcontains( FolderLister::Journal ) ) types << FolderListView::Journal; - if ( suptypes.tqcontains( FolderLister::Contact ) ) types << FolderListView::Contact; - if ( suptypes.tqcontains( FolderLister::All ) ) types << FolderListView::All; - if ( suptypes.tqcontains( FolderLister::Unknown ) ) types << FolderListView::Unknown; + if ( suptypes.contains( FolderLister::Event ) ) types << FolderListView::Event; + if ( suptypes.contains( FolderLister::Todo ) ) types << FolderListView::Todo; + if ( suptypes.contains( FolderLister::Journal ) ) types << FolderListView::Journal; + if ( suptypes.contains( FolderLister::Contact ) ) types << FolderListView::Contact; + if ( suptypes.contains( FolderLister::All ) ) types << FolderListView::All; + if ( suptypes.contains( FolderLister::Unknown ) ) types << FolderListView::Unknown; mFolderList->setEnabledTypes( types ); connect( mFolderLister, TQT_SIGNAL( foldersRead() ), TQT_SLOT( updateFolderList() ) ); diff --git a/kresources/lib/folderlister.cpp b/kresources/lib/folderlister.cpp index 9436a6f92..eec969c26 100644 --- a/kresources/lib/folderlister.cpp +++ b/kresources/lib/folderlister.cpp @@ -50,11 +50,11 @@ void FolderLister::setWriteDestinationId( KPIM::FolderLister::ContentType type, TQString FolderLister::writeDestinationId( KPIM::FolderLister::ContentType type ) const { - if ( mWriteDestinationId.tqcontains( type ) ) { + if ( mWriteDestinationId.contains( type ) ) { return mWriteDestinationId[type]; - } else if ( mWriteDestinationId.tqcontains( KPIM::FolderLister::All ) ) { + } else if ( mWriteDestinationId.contains( KPIM::FolderLister::All ) ) { return mWriteDestinationId[ KPIM::FolderLister::All ]; - } else if ( mWriteDestinationId.tqcontains( KPIM::FolderLister::Unknown ) ) { + } else if ( mWriteDestinationId.contains( KPIM::FolderLister::Unknown ) ) { return mWriteDestinationId[ KPIM::FolderLister::Unknown ]; } else return TQString(); } @@ -151,7 +151,7 @@ void FolderLister::readConfig( KPIM::GroupwarePrefsBase *newprefs ) for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { e.type = (FolderLister::ContentType)( e.type | contentTypeFromString( *it ) ); } - if ( active.tqfind( e.id ) != active.end() ) e.active = true; + if ( active.find( e.id ) != active.end() ) e.active = true; mFolders.append( e ); } @@ -196,7 +196,7 @@ void FolderLister::writeConfig( GroupwarePrefsBase *newprefs ) TQStringList defaultFolders; #define writeDestination(type) \ - if ( mWriteDestinationId.tqcontains( type ) ) \ + if ( mWriteDestinationId.contains( type ) ) \ defaultFolders << mWriteDestinationId[type]; \ else defaultFolders << TQString(); writeDestination( KPIM::FolderLister::Event ); @@ -262,7 +262,7 @@ void FolderLister::doRetrieveFolder( const KURL &u ) KURL url( u ); if ( adaptor() ) adaptor()->adaptDownloadUrl( url ); - if ( mUrls.tqcontains( url ) || mProcessedPathes.tqcontains( url.path(-1) ) ) { + if ( mUrls.contains( url ) || mProcessedPathes.contains( url.path(-1) ) ) { kdDebug()<<"Item "< &types ) kdDebug() << "FolderListView::setEnabledTypes" << endl; for ( int i = 0; i< columns(); ++i ) removeColumn( i ); mTypes = types; - if ( !mTypes.tqcontains( FolderName ) ) mTypes.prepend( FolderName ); + if ( !mTypes.contains( FolderName ) ) mTypes.prepend( FolderName ); mColumnMap[FolderName] = addColumn( i18n("Folder") ); mTypeMap[mColumnMap[FolderName]] = FolderName; - if ( mTypes.tqcontains( Event ) ) { + if ( mTypes.contains( Event ) ) { mColumnMap[Event] = addColumn( i18n("Short column header meaning default for new events", "Events") ); mTypeMap[mColumnMap[Event]] = Event; } else mColumnMap[Event] = -1; - if ( mTypes.tqcontains( Todo ) ) { + if ( mTypes.contains( Todo ) ) { mColumnMap[Todo] = addColumn( i18n("Short column header meaning default for new to-dos", "Todos") ); mTypeMap[mColumnMap[Todo]] = Todo; } else mColumnMap[Todo] = -1; - if ( mTypes.tqcontains( Journal ) ) { + if ( mTypes.contains( Journal ) ) { mColumnMap[Journal] = addColumn( i18n("Short column header meaning default for new journals", "Journals") ); mTypeMap[mColumnMap[Journal]] = Journal; } else mColumnMap[Journal] = -1; - if ( mTypes.tqcontains( Contact ) ) { + if ( mTypes.contains( Contact ) ) { mColumnMap[Contact] = addColumn( i18n("Short column header meaning default for new contacts", "Contacts") ); mTypeMap[mColumnMap[Contact]] = Contact; } else mColumnMap[Contact] = -1; - if ( mTypes.tqcontains( All ) ) { + if ( mTypes.contains( All ) ) { mColumnMap[All] = addColumn( i18n("Short column header meaning default for all items", "All") ); mTypeMap[mColumnMap[All]] = All; } else mColumnMap[All] = -1; - if ( mTypes.tqcontains( Unknown ) ) { + if ( mTypes.contains( Unknown ) ) { mColumnMap[Unknown] = addColumn( i18n("Short column header meaning default for unknown new items", "Unknown") ); mTypeMap[mColumnMap[Unknown]] = Unknown; } else mColumnMap[Unknown] = -1; @@ -103,27 +103,27 @@ void FolderListView::showPopupMenu( FolderListItem *i, const TQPoint &globalPos m.setItemChecked( id, i->isOn() ); m.insertSeparator(); - if ( ( folder.type & KPIM::FolderLister::Event ) && (mTypes.tqcontains( Event ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Event ) && (mTypes.contains( Event ) ) ) { id = m.insertItem( i18n("Default for New &Events"), this, TQT_SLOT(slotPopupHandler(int)), 0, Event ); m.setItemChecked( id, i->isDefault( Event ) ); } - if ( ( folder.type & KPIM::FolderLister::Todo ) && (mTypes.tqcontains( Todo ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Todo ) && (mTypes.contains( Todo ) ) ) { id = m.insertItem( i18n("Default for New &Todos"), this, TQT_SLOT(slotPopupHandler(int)), 0, Todo ); m.setItemChecked( id, i->isDefault( Todo ) ); } - if ( ( folder.type & KPIM::FolderLister::Journal ) && (mTypes.tqcontains( Journal ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Journal ) && (mTypes.contains( Journal ) ) ) { id = m.insertItem( i18n("Default for New &Journals"), this, TQT_SLOT(slotPopupHandler(int)), 0, Journal ); m.setItemChecked( id, i->isDefault( Journal ) ); } - if ( ( folder.type & KPIM::FolderLister::Contact ) && (mTypes.tqcontains( Contact ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Contact ) && (mTypes.contains( Contact ) ) ) { id = m.insertItem( i18n("Default for New &Contacts"), this, TQT_SLOT(slotPopupHandler(int)), 0, Contact ); m.setItemChecked( id, i->isDefault( Contact ) ); } - if ( ( folder.type == KPIM::FolderLister::All ) && (mTypes.tqcontains( All ) ) ) { + if ( ( folder.type == KPIM::FolderLister::All ) && (mTypes.contains( All ) ) ) { id = m.insertItem( i18n("Default for All New &Items"), this, TQT_SLOT(slotPopupHandler(int)), 0, All ); m.setItemChecked( id, i->isDefault( All ) ); } - if ( ( folder.type == KPIM::FolderLister::Unknown ) && (mTypes.tqcontains( Unknown ) ) ) { + if ( ( folder.type == KPIM::FolderLister::Unknown ) && (mTypes.contains( Unknown ) ) ) { id = m.insertItem( i18n("Default for &Unknown New Items"), this, TQT_SLOT(slotPopupHandler(int)), 0, Unknown ); m.setItemChecked( id, i->isDefault( Unknown ) ); } @@ -184,7 +184,7 @@ void FolderListItem::activate( int column, const TQPoint &localPos ) default: return; } - if ( !TQRect( x, 0, w, BoxSize ).tqcontains( localPos ) ) + if ( !TQRect( x, 0, w, BoxSize ).contains( localPos ) ) changeProperty( prop ); } @@ -293,4 +293,4 @@ void FolderListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int col, i //END #include "folderlistview.moc" -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kresources/lib/folderlistview.h b/kresources/lib/folderlistview.h index e4d5a56de..0c99d913c 100644 --- a/kresources/lib/folderlistview.h +++ b/kresources/lib/folderlistview.h @@ -55,8 +55,8 @@ class FolderListView : public KListView void emitChanged() { emit changed(); }; void setEnabledTypes( const TQValueList &types ); - int columnForType( Property prop ) const { if ( mColumnMap.tqcontains(prop) ) return mColumnMap[prop]; else return -1;} - Property typeForColumn( int col ) const { if ( mTypeMap.tqcontains( col ) ) return mTypeMap[col]; else return Unknown; } + int columnForType( Property prop ) const { if ( mColumnMap.contains(prop) ) return mColumnMap[prop]; else return -1;} + Property typeForColumn( int col ) const { if ( mTypeMap.contains( col ) ) return mTypeMap[col]; else return Unknown; } private slots: /* Display a popupmenu for item i at item position */ @@ -127,4 +127,4 @@ class FolderListItem : public TQCheckListItem #endif -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kresources/lib/groupwaredataadaptor.cpp b/kresources/lib/groupwaredataadaptor.cpp index 88ca09c10..d77c0e550 100644 --- a/kresources/lib/groupwaredataadaptor.cpp +++ b/kresources/lib/groupwaredataadaptor.cpp @@ -78,7 +78,7 @@ kdDebug()<<"GroupwareUploadItem::createUploadNewJob, baseurl=" << baseurl.url() if ( job ) { kdDebug() << "Adding If-None-Match " << endl; TQString header; - if ( job->outgoingMetaData().tqcontains("customHTTPHeader") ) { + if ( job->outgoingMetaData().contains("customHTTPHeader") ) { header = job->outgoingMetaData()["customHTTPHeader"]; header += "\r\n"; } @@ -96,7 +96,7 @@ kdDebug()<<"GroupwareUploadItem::createUploadJob" << endl; if ( job && adaptor ) { kdDebug()<<"Adding If-Match header: " << adaptor->idMapper()->fingerprint( uid() ) << endl; TQString header; - if ( job->outgoingMetaData().tqcontains("customHTTPHeader") ) { + if ( job->outgoingMetaData().contains("customHTTPHeader") ) { header = job->outgoingMetaData()["customHTTPHeader"]; header += "\r\n"; } @@ -262,7 +262,7 @@ bool GroupwareDataAdaptor::interpretUploadNewJob( KIO::Job *job, const TQString TQString GroupwareDataAdaptor::uidFromJob( KIO::Job *job ) const { kdDebug()<<"GroupwareDataAdaptor::uidFromJob( "< supportedTypes() = 0; virtual bool supports( FolderLister::ContentType type ) { - return supportedTypes().tqcontains( type ); + return supportedTypes().contains( type ); } diff --git a/kresources/lib/groupwaredownloadjob.cpp b/kresources/lib/groupwaredownloadjob.cpp index 5cf494b97..f363dbc20 100644 --- a/kresources/lib/groupwaredownloadjob.cpp +++ b/kresources/lib/groupwaredownloadjob.cpp @@ -229,9 +229,9 @@ void GroupwareDownloadJob::slotItemToDownload( const KURL &remoteURL, { KURL url( remoteURL ); adaptor()->adaptDownloadUrl( url ); - if ( !mItemsForDownload.tqcontains( url ) && - !mItemsDownloading.tqcontains( url ) && - !mItemsDownloaded.tqcontains( url ) ) { + if ( !mItemsForDownload.contains( url ) && + !mItemsDownloading.contains( url ) && + !mItemsDownloaded.contains( url ) ) { mItemsForDownload.insert( url, type ); } } @@ -240,7 +240,7 @@ void GroupwareDownloadJob::slotItemToDownload( const KURL &remoteURL, void GroupwareDownloadJob::slotItemOnServer( const KURL &remoteURL ) { kdDebug()<<"GroupwareDownloadJob::slotItemOnServer( " << remoteURL.url() << ")" << endl; - if ( !mCurrentlyOnServer.tqcontains( remoteURL ) ) { + if ( !mCurrentlyOnServer.contains( remoteURL ) ) { mCurrentlyOnServer.append( remoteURL ); } } @@ -249,9 +249,9 @@ kdDebug()<<"GroupwareDownloadJob::slotItemOnServer( " << remoteURL.url() << ")" void GroupwareDownloadJob::slotItemDownloadError( const KURL &remoteURL, const TQString &/*error*/ ) { // TODO: Error handling! - if ( mItemsDownloading.tqcontains( remoteURL ) ) { + if ( mItemsDownloading.contains( remoteURL ) ) { mItemsDownloadError[ remoteURL ] = mItemsDownloading[ remoteURL ]; - } else if ( mItemsForDownload.tqcontains( remoteURL ) ) { + } else if ( mItemsForDownload.contains( remoteURL ) ) { mItemsDownloadError[ remoteURL ] = mItemsForDownload[ remoteURL ]; } } @@ -261,15 +261,15 @@ void GroupwareDownloadJob::slotItemDownloaded( const TQString &localID, const KURL &remoteURL, const TQString &fingerprint ) { kdDebug()<<"GroupwareDownloadJob::slotItemDownloaded( " << localID << ", " << remoteURL.url() << ", " << fingerprint << ")" << endl; - if ( mItemsForDownload.tqcontains( remoteURL ) ) { + if ( mItemsForDownload.contains( remoteURL ) ) { mItemsDownloaded[ remoteURL ] = mItemsForDownload[ remoteURL ]; mItemsForDownload.remove( remoteURL ); } - if ( mItemsDownloading.tqcontains( remoteURL ) ) { + if ( mItemsDownloading.contains( remoteURL ) ) { mItemsDownloaded[ remoteURL ] = mItemsDownloading[ remoteURL ]; mItemsDownloading.remove( remoteURL ); } - if ( !mItemsDownloaded.tqcontains( remoteURL ) ) { + if ( !mItemsDownloaded.contains( remoteURL ) ) { mItemsDownloaded[ remoteURL ] = KPIM::FolderLister::Unknown; } adaptor()->idMapper()->setRemoteId( localID, remoteURL.path() ); diff --git a/kresources/lib/webdavhandler.cpp b/kresources/lib/webdavhandler.cpp index 9ae500e52..180740662 100644 --- a/kresources/lib/webdavhandler.cpp +++ b/kresources/lib/webdavhandler.cpp @@ -154,10 +154,10 @@ bool WebdavHandler::extractStringList( const TQDomElement &node, const TQString const TQString WebdavHandler::getEtagFromHeaders( const TQString& headers ) { - int start = headers.tqfind( "etag:", 0, false ); + int start = headers.find( "etag:", 0, false ); if ( start < 0 ) return TQString(); start += 6; - return headers.mid( start, headers.tqfind( "\n", start ) - start ); + return headers.mid( start, headers.find( "\n", start ) - start ); } //TODO: should not call libical functions directly -- better to make diff --git a/kresources/newexchange/exchangeconvertercalendar.cpp b/kresources/newexchange/exchangeconvertercalendar.cpp index 3ff05eef0..d093faf18 100644 --- a/kresources/newexchange/exchangeconvertercalendar.cpp +++ b/kresources/newexchange/exchangeconvertercalendar.cpp @@ -432,7 +432,7 @@ kdDebug()<<"ExchangeConverterCalendar::readIncidence: ERROR: No UID given"< 0 ) { diff --git a/kresources/newexchange/exchangeglobals.cpp b/kresources/newexchange/exchangeglobals.cpp index b17302386..ef27580f0 100644 --- a/kresources/newexchange/exchangeglobals.cpp +++ b/kresources/newexchange/exchangeglobals.cpp @@ -90,7 +90,7 @@ bool ExchangeGlobals::getFolderHasSubs( const TQDomNode &folderNode ) KIO::Job *ExchangeGlobals::createListFoldersJob( const KURL &url ) { TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" ); TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" ); WebdavHandler::addElement( doc, prop, "d:displayname" ); WebdavHandler::addElement( doc, prop, "d:contentclass" ); @@ -104,7 +104,7 @@ KIO::Job *ExchangeGlobals::createListFoldersJob( const KURL &url ) KIO::TransferJob *ExchangeGlobals::createListItemsJob( const KURL &url ) { TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" ); TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" ); WebdavHandler::addElement( doc, prop, "d:getetag" ); WebdavHandler::addElement( doc, prop, "d:contentclass" ); @@ -126,7 +126,7 @@ kdDebug() << "Person=" << KPIM::FolderLister::Contact << ", " // Don't use an request! TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propfind" ); TQDomElement prop = WebdavHandler::addElement( doc, root, "d:prop" ); TQDomAttr att_h = doc.createAttribute( "xmlns:h" ); att_h.setValue( "urn:schemas:mailheader:" ); diff --git a/kresources/scalix/kabc/resourcescalix.cpp b/kresources/scalix/kabc/resourcescalix.cpp index e9193c4b2..94cec32a2 100644 --- a/kresources/scalix/kabc/resourcescalix.cpp +++ b/kresources/scalix/kabc/resourcescalix.cpp @@ -317,7 +317,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr ) const TQString uid = addr.uid(); TQString subResource; TQ_UINT32 sernum; - if ( mUidMap.tqfind( uid ) != mUidMap.end() ) { + if ( mUidMap.find( uid ) != mUidMap.end() ) { subResource = mUidMap[ uid ].resource(); if ( !subresourceWritable( subResource ) ) { kdWarning() << "Wow! Something tried to update a non-writable addressee! Fix this caller: " << kdBacktrace() << endl; @@ -359,7 +359,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr ) kdDebug(5650) << "kmailUpdate returned, now sernum=" << sernum << " for uid=" << uid << endl; mUidMap[ uid ] = StorageReference( subResource, sernum ); // This is ugly, but it's faster than doing - // mAddrMap.tqfind(addr.uid()), which would give the same :-( + // mAddrMap.find(addr.uid()), which would give the same :-( // Reason for this: The Changed attribute of Addressee should // be mutable const_cast(addr).setChanged( false ); @@ -377,7 +377,7 @@ void KABC::ResourceScalix::insertAddressee( const Addressee& addr ) const TQString uid = addr.uid(); //kdDebug(5650) << k_funcinfo << uid << endl; bool ok = false; - if ( mUidMap.tqcontains( uid ) ) { + if ( mUidMap.contains( uid ) ) { mUidsPendingUpdate.append( uid ); } else { mUidsPendingAdding.append( uid ); @@ -392,7 +392,7 @@ void KABC::ResourceScalix::insertAddressee( const Addressee& addr ) void KABC::ResourceScalix::removeAddressee( const Addressee& addr ) { const TQString uid = addr.uid(); - if ( mUidMap.tqfind( uid ) == mUidMap.end() ) return; + if ( mUidMap.find( uid ) == mUidMap.end() ) return; //kdDebug(5650) << k_funcinfo << uid << endl; const TQString resource = mUidMap[ uid ].resource(); if ( !subresourceWritable( resource ) ) { @@ -429,8 +429,8 @@ bool KABC::ResourceScalix::fromKMailAddIncidence( const TQString& type, //kdDebug(5650) << k_funcinfo << uid << endl; // Emit "addressbook changed" if this comes from kmail and not from the GUI - if ( !mUidsPendingAdding.tqcontains( uid ) - && !mUidsPendingUpdate.tqcontains( uid ) ) { + if ( !mUidsPendingAdding.contains( uid ) + && !mUidsPendingUpdate.contains( uid ) ) { addressBook()->emitAddressBookChanged(); } else { mUidsPendingAdding.remove( uid ); @@ -451,9 +451,9 @@ void KABC::ResourceScalix::fromKMailDelIncidence( const TQString& type, //kdDebug(5650) << k_funcinfo << uid << endl; // Can't be in both, by contract - if ( mUidsPendingDeletion.tqcontains( uid ) ) { + if ( mUidsPendingDeletion.contains( uid ) ) { mUidsPendingDeletion.remove( uid ); - } else if ( mUidsPendingUpdate.tqcontains( uid ) ) { + } else if ( mUidsPendingUpdate.contains( uid ) ) { // It's good to know if was deleted, but we are waiting on a new one to // replace it, so let's just sit tight. } else { @@ -483,7 +483,7 @@ void KABC::ResourceScalix::fromKMailAddSubresource( const TQString& type, { if( type != s_kmailContentsType ) return; - if ( mSubResources.tqcontains( subResource ) ) + if ( mSubResources.contains( subResource ) ) // Already registered return; @@ -500,7 +500,7 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const TQString& type, { if( type != s_kmailContentsType ) return; - if ( !mSubResources.tqcontains( subResource ) ) + if ( !mSubResources.contains( subResource ) ) // Not registered return; @@ -557,7 +557,7 @@ TQStringList KABC::ResourceScalix::subresources() const bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].active(); } @@ -569,7 +569,7 @@ bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) cons bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].writable(); } return false; //better a safe default @@ -577,7 +577,7 @@ bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) co int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].completionWeight(); } @@ -588,7 +588,7 @@ int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresour TQString KABC::ResourceScalix::subresourceLabel( const TQString& subresource ) const { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].label(); } @@ -598,7 +598,7 @@ TQString KABC::ResourceScalix::subresourceLabel( const TQString& subresource ) c void KABC::ResourceScalix::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight ) { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { mSubResources[ subresource ].setCompletionWeight( completionWeight ); } else { kdDebug(5650) << "setSubresourceCompletionWeight: subresource " << subresource << " not found" << endl; @@ -617,7 +617,7 @@ TQMap KABC::ResourceScalix::uidToResourceMap() const void KABC::ResourceScalix::setSubresourceActive( const TQString &subresource, bool active ) { - if ( mSubResources.tqcontains( subresource ) ) { + if ( mSubResources.contains( subresource ) ) { mSubResources[ subresource ].setActive( active ); load(); } else { diff --git a/kresources/scalix/kcal/resourcescalix.cpp b/kresources/scalix/kcal/resourcescalix.cpp index a67585ee0..2848a353a 100644 --- a/kresources/scalix/kcal/resourcescalix.cpp +++ b/kresources/scalix/kcal/resourcescalix.cpp @@ -249,7 +249,7 @@ void ResourceScalix::removeIncidences( const TQCString& incidenceType ) // better call event(uid), todo(uid) etc. directly. // A faster but hackish way would probably be to check the type of the resource, - // like mEventSubResources.tqfind( it.data().resource() ) != mEventSubResources.end() ? + // like mEventSubResources.find( it.data().resource() ) != mEventSubResources.end() ? const TQString& uid = it.key(); if ( incidenceType == "Event" && mCalendar.event( uid ) ) mUidMap.remove( it ); @@ -276,17 +276,17 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* incidencebase ) const TQString uid = incidencebase->uid(); - if ( mUidsPendingUpdate.tqcontains( uid ) || mUidsPendingAdding.tqcontains( uid ) ) { + if ( mUidsPendingUpdate.contains( uid ) || mUidsPendingAdding.contains( uid ) ) { /* We are currently processing this event ( removing and readding or * adding it ). If so, ignore this update. Keep the last of these around * and process once we hear back from KMail on this event. */ - mPendingUpdates.tqreplace( uid, incidencebase ); + mPendingUpdates.replace( uid, incidencebase ); return; } TQString subResource; TQ_UINT32 sernum = 0; - if ( mUidMap.tqcontains( uid ) ) { + if ( mUidMap.contains( uid ) ) { subResource = mUidMap[ uid ].resource(); sernum = mUidMap[ uid ].serialNumber(); mUidsPendingUpdate.append( uid ); @@ -390,7 +390,7 @@ bool ResourceScalix::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const // behold, sernum is an in-parameter const bool rc = kmailUpdate( subresource, sernum, data, mimetype, subject, customHeaders ); // update the serial number - if ( mUidMap.tqcontains( incidencebase->uid() ) ) { + if ( mUidMap.contains( incidencebase->uid() ) ) { mUidMap[ incidencebase->uid() ].setSerialNumber( sernum ); } return rc; @@ -450,7 +450,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _ * We know the new state, so lets just not do much at all. The old incidence * in the calendar remains valid, but the serial number changed, so we need to * update that */ - if ( ourOwnUpdate = mUidsPendingUpdate.tqcontains( uid ) ) { + if ( ourOwnUpdate = mUidsPendingUpdate.contains( uid ) ) { mUidsPendingUpdate.remove( uid ); mUidMap.remove( uid ); mUidMap[ uid ] = StorageReference( subResource, sernum ); @@ -460,7 +460,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _ * unless the folder is read-only, in which case the user should not be * offered a means of putting mails in a folder she'll later be unable to * upload. Skip the incidence, in this case. */ - if ( mUidMap.tqcontains( uid ) + if ( mUidMap.contains( uid ) && ( mUidMap[ uid ].resource() == subResource ) ) { if ( (*map)[ subResource ].writable() ) { resolveConflict( incidence, subResource, sernum ); @@ -472,7 +472,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _ } /* Add to the cache if the add didn't come from KOrganizer, in which case * we've already added it, and listen to updates from KOrganizer for it. */ - if ( !mUidsPendingAdding.tqcontains( uid ) ) { + if ( !mUidsPendingAdding.contains( uid ) ) { mCalendar.addIncidence( incidence ); incidence->registerObserver( this ); } @@ -482,14 +482,14 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _ } } /* Check if there are updates for this uid pending and if so process them. */ - if ( KCal::IncidenceBase *update = mPendingUpdates.tqfind( uid ) ) { + if ( KCal::IncidenceBase *update = mPendingUpdates.find( uid ) ) { mSilent = false; // we do want to tell KMail mPendingUpdates.remove( uid ); incidenceUpdated( update ); } else { /* If the uid was added by KMail, KOrganizer needs to be told, so * schedule emitting of the resourceChanged signal. */ - if ( !mUidsPendingAdding.tqcontains( uid ) ) { + if ( !mUidsPendingAdding.contains( uid ) ) { if ( !ourOwnUpdate ) mResourceChangedTimer.changeInterval( 100 ); } else { mUidsPendingAdding.remove( uid ); @@ -504,7 +504,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _ bool ResourceScalix::addEvent( KCal::Event* event ) { - if ( mUidMap.tqcontains( event->uid() ) ) + if ( mUidMap.contains( event->uid() ) ) return true; //noop else return addIncidence( event, TQString(), 0 ); @@ -521,7 +521,7 @@ bool ResourceScalix::deleteIncidence( KCal::Incidence* incidence ) if ( incidence->isReadOnly() ) return false; const TQString uid = incidence->uid(); - if( !mUidMap.tqcontains( uid ) ) return false; // Odd + if( !mUidMap.contains( uid ) ) return false; // Odd /* The user told us to delete, tell KMail */ if ( !mSilent ) { kmailDeleteIncidence( mUidMap[ uid ].resource(), @@ -572,7 +572,7 @@ KCal::Event::List ResourceScalix::rawEvents( const TQDate& start, bool ResourceScalix::addTodo( KCal::Todo* todo ) { - if ( mUidMap.tqcontains( todo->uid() ) ) + if ( mUidMap.contains( todo->uid() ) ) return true; //noop else return addIncidence( todo, TQString(), 0 ); @@ -606,7 +606,7 @@ KCal::Todo::List ResourceScalix::rawTodosForDate( const TQDate& date ) bool ResourceScalix::addJournal( KCal::Journal* journal ) { - if ( mUidMap.tqcontains( journal->uid() ) ) + if ( mUidMap.contains( journal->uid() ) ) return true; //noop else return addIncidence( journal, TQString(), 0 ); @@ -689,9 +689,9 @@ void ResourceScalix::fromKMailDelIncidence( const TQString& type, if ( !subresourceActive( subResource ) ) return; // Can't be in both, by contract - if ( mUidsPendingDeletion.tqcontains( uid ) ) { + if ( mUidsPendingDeletion.contains( uid ) ) { mUidsPendingDeletion.remove( uid ); - } else if ( mUidsPendingUpdate.tqcontains( uid ) ) { + } else if ( mUidsPendingUpdate.contains( uid ) ) { // It's good to know if was deleted, but we are waiting on a new one to // replace it, so let's just sit tight. } else { @@ -741,7 +741,7 @@ void ResourceScalix::fromKMailAddSubresource( const TQString& type, // Not ours return; - if ( map->tqcontains( subResource ) ) + if ( map->contains( subResource ) ) // Already registered return; @@ -760,7 +760,7 @@ void ResourceScalix::fromKMailDelSubresource( const TQString& type, ResourceMap* map = subResourceMap( type ); if ( !map ) // not ours return; - if ( map->tqcontains( subResource ) ) + if ( map->contains( subResource ) ) map->erase( subResource ); else // Not registered @@ -807,11 +807,11 @@ TQStringList ResourceScalix::subresources() const const TQString ResourceScalix::labelForSubresource( const TQString& subresource ) const { - if ( mEventSubResources.tqcontains( subresource ) ) + if ( mEventSubResources.contains( subresource ) ) return mEventSubResources[ subresource ].label(); - if ( mTodoSubResources.tqcontains( subresource ) ) + if ( mTodoSubResources.contains( subresource ) ) return mTodoSubResources[ subresource ].label(); - if ( mJournalSubResources.tqcontains( subresource ) ) + if ( mJournalSubResources.contains( subresource ) ) return mJournalSubResources[ subresource ].label(); return subresource; } @@ -819,10 +819,10 @@ ResourceScalix::labelForSubresource( const TQString& subresource ) const TQString ResourceScalix::subresourceIdentifier( Incidence *incidence ) { TQString uid = incidence->uid(); - if ( mUidMap.tqcontains( uid ) ) + if ( mUidMap.contains( uid ) ) return mUidMap[ uid ].resource(); else - if ( mNewIncidencesMap.tqcontains( uid ) ) + if ( mNewIncidencesMap.contains( uid ) ) return mNewIncidencesMap[ uid ]; else return TQString(); @@ -843,11 +843,11 @@ bool ResourceScalix::subresourceActive( const TQString& subresource ) const // before it opens the resource :-( Make sure we are open const_cast( this )->doOpen(); - if ( mEventSubResources.tqcontains( subresource ) ) + if ( mEventSubResources.contains( subresource ) ) return mEventSubResources[ subresource ].active(); - if ( mTodoSubResources.tqcontains( subresource ) ) + if ( mTodoSubResources.contains( subresource ) ) return mTodoSubResources[ subresource ].active(); - if ( mJournalSubResources.tqcontains( subresource ) ) + if ( mJournalSubResources.contains( subresource ) ) return mJournalSubResources[ subresource ].active(); // Safe default bet: @@ -860,11 +860,11 @@ void ResourceScalix::setSubresourceActive( const TQString &subresource, bool v ) { ResourceMap *map = 0; - if ( mEventSubResources.tqcontains( subresource ) ) + if ( mEventSubResources.contains( subresource ) ) map = &mEventSubResources; - if ( mTodoSubResources.tqcontains( subresource ) ) + if ( mTodoSubResources.contains( subresource ) ) map = &mTodoSubResources; - if ( mJournalSubResources.tqcontains( subresource ) ) + if ( mJournalSubResources.contains( subresource ) ) map = &mJournalSubResources; if ( map && ( ( *map )[ subresource ].active() != v ) ) { diff --git a/kresources/scalix/kioslave/scalix.cpp b/kresources/scalix/kioslave/scalix.cpp index d5603af92..36b2aa776 100644 --- a/kresources/scalix/kioslave/scalix.cpp +++ b/kresources/scalix/kioslave/scalix.cpp @@ -73,7 +73,7 @@ void Scalix::get( const KURL &url ) TQString path = url.path(); - if ( path.tqcontains( "/freebusy/" ) ) { + if ( path.contains( "/freebusy/" ) ) { retrieveFreeBusy( url ); } else { error( KIO::ERR_SLAVE_DEFINED, i18n( "Unknown path. Known path is '/freebusy/'" ) ); @@ -84,7 +84,7 @@ void Scalix::put( const KURL& url, int, bool, bool ) { TQString path = url.path(); - if ( path.tqcontains( "/freebusy/" ) ) { + if ( path.contains( "/freebusy/" ) ) { publishFreeBusy( url ); } else { error( KIO::ERR_SLAVE_DEFINED, i18n( "Unknown path. Known path is '/freebusy/'" ) ); @@ -134,12 +134,12 @@ void Scalix::publishFreeBusy( const KURL &url ) TQString path = url.path(); // extract user name - int lastSlash = path.tqfindRev( '/' ); + int lastSlash = path.findRev( '/' ); if ( lastSlash != -1 ) requestUser = path.mid( lastSlash + 1 ); // extract calendar name - int secondSlash = path.tqfind( '/', 1 ); + int secondSlash = path.find( '/', 1 ); if ( secondSlash != -1 ) calendar = path.mid( secondSlash + 1, lastSlash - secondSlash - 1 ); diff --git a/kresources/scalix/knotes/resourcescalix.cpp b/kresources/scalix/knotes/resourcescalix.cpp index b9d5b54ca..69922283e 100644 --- a/kresources/scalix/knotes/resourcescalix.cpp +++ b/kresources/scalix/knotes/resourcescalix.cpp @@ -166,7 +166,7 @@ KCal::Journal* ResourceScalix::addNote( const TQString& data, const TQString& su journal = static_cast( formatter.fromString( data ) ); Q_ASSERT( journal ); - if( journal && !mUidMap.tqcontains( journal->uid() ) ) + if( journal && !mUidMap.contains( journal->uid() ) ) if ( addNote( journal, subresource, sernum ) ) return journal; else @@ -212,7 +212,7 @@ bool ResourceScalix::addNote( KCal::Journal* journal, bool ResourceScalix::deleteNote( KCal::Journal* journal ) { const TQString uid = journal->uid(); - if ( !mUidMap.tqcontains( uid ) ) + if ( !mUidMap.contains( uid ) ) // Odd return false; @@ -253,7 +253,7 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i ) { TQString subResource; TQ_UINT32 sernum; - if ( mUidMap.tqcontains( i->uid() ) ) { + if ( mUidMap.contains( i->uid() ) ) { subResource = mUidMap[ i->uid() ].resource(); sernum = mUidMap[ i->uid() ].serialNumber(); } else { // can this happen? @@ -327,7 +327,7 @@ void ResourceScalix::fromKMailAddSubresource( const TQString& type, // Not ours return; - if ( mSubResources.tqcontains( subResource ) ) + if ( mSubResources.contains( subResource ) ) // Already registered return; @@ -347,7 +347,7 @@ void ResourceScalix::fromKMailDelSubresource( const TQString& type, // Not ours return; - if ( !mSubResources.tqcontains( subResource ) ) + if ( !mSubResources.contains( subResource ) ) // Not registered return; @@ -411,7 +411,7 @@ TQStringList ResourceScalix::subresources() const bool ResourceScalix::subresourceActive( const TQString& res ) const { - if ( mSubResources.tqcontains( res ) ) { + if ( mSubResources.contains( res ) ) { return mSubResources[ res ].active(); } diff --git a/kresources/scalix/scalixadmin/otherusermanager.cpp b/kresources/scalix/scalixadmin/otherusermanager.cpp index cacb94742..a3c19de12 100644 --- a/kresources/scalix/scalixadmin/otherusermanager.cpp +++ b/kresources/scalix/scalixadmin/otherusermanager.cpp @@ -30,7 +30,7 @@ OtherUserManager::~OtherUserManager() void OtherUserManager::addOtherUser( const TQString &email ) { - if ( !mOtherUsers.tqcontains( email ) ) { + if ( !mOtherUsers.contains( email ) ) { mOtherUsers.append( email ); emit changed(); } diff --git a/kresources/slox/kabcresourceslox.cpp b/kresources/slox/kabcresourceslox.cpp index 82d5c60a5..ba3d41156 100644 --- a/kresources/slox/kabcresourceslox.cpp +++ b/kresources/slox/kabcresourceslox.cpp @@ -194,7 +194,7 @@ bool ResourceSlox::asyncLoad() } TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->folderId() ); @@ -246,7 +246,7 @@ void ResourceSlox::slotResult( KIO::Job *job ) TQString uid = "kresources_slox_kabc_" + item.sloxId; if ( item.status == SloxItem::Delete ) { TQMap::Iterator it; - it = mAddrMap.tqfind( uid ); + it = mAddrMap.find( uid ); if ( it != mAddrMap.end() ) { mAddrMap.remove( it ); changed = true; @@ -269,7 +269,7 @@ void ResourceSlox::slotResult( KIO::Job *job ) a.setResource( this ); a.setChanged( false ); - mAddrMap.tqreplace( a.uid(), a ); + mAddrMap.replace( a.uid(), a ); // TODO: Do we need to try to associate addressees with slox accounts? @@ -306,13 +306,13 @@ void ResourceSlox::slotUploadResult( KIO::Job *job ) TQValueList::ConstIterator it; for( it = items.begin(); it != items.end(); ++it ) { SloxItem item = *it; - if ( !item.response.tqcontains( "200" ) ) { + if ( !item.response.contains( "200" ) ) { savingError( this, item.response + "\n" + item.responseDescription ); continue; } if ( item.status == SloxItem::New ) { TQMap::Iterator search_res; - search_res = mAddrMap.tqfind( item.clientId ); + search_res = mAddrMap.find( item.clientId ); if ( search_res != mAddrMap.end() ) { // use the id provided by the server Addressee a = *search_res; @@ -320,7 +320,7 @@ void ResourceSlox::slotUploadResult( KIO::Job *job ) a.setUid( "kresources_slox_kabc_" + item.sloxId ); a.setResource( this ); a.setChanged( false ); - mAddrMap.tqreplace( a.uid(), a ); + mAddrMap.replace( a.uid(), a ); saveCache(); } } @@ -603,7 +603,7 @@ void ResourceSlox::createAddresseeFields( TQDomDocument &doc, TQDomElement &prop else pnSaveMap = mPhoneNumberSloxMap; for ( PhoneNumber::List::ConstIterator it = pnlist.begin() ; it != pnlist.end(); ++it ) { - if ( pnSaveMap.tqcontains( (*it).type() ) ) { + if ( pnSaveMap.contains( (*it).type() ) ) { TQStringList l = pnSaveMap[(*it).type()]; TQString fn = l.first(); l.remove( l.begin() ); diff --git a/kresources/slox/kcalresourceslox.cpp b/kresources/slox/kcalresourceslox.cpp index 132f19ca1..cb477038c 100644 --- a/kresources/slox/kcalresourceslox.cpp +++ b/kresources/slox/kcalresourceslox.cpp @@ -213,7 +213,7 @@ void KCalResourceSlox::requestEvents() } TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->calendarFolderId() ); @@ -258,7 +258,7 @@ void KCalResourceSlox::requestTodos() } TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( LastSync ), lastsync ); WebdavHandler::addSloxElement( this, doc, prop, fieldName( FolderId ), mPrefs->taskFolderId() ); @@ -1113,7 +1113,7 @@ void KCalResourceSlox::slotUploadResult( KIO::Job *job ) if ( !status.isNull() ) { TQDomElement statusElement = status.toElement(); TQString response = statusElement.text(); - if ( !response.tqcontains( "200" ) ) { + if ( !response.contains( "200" ) ) { TQString error = "'" + mUploadedIncidence->summary() + "'\n"; error += response; TQDomNode dn = propstat.namedItem( "responsedescription" ); diff --git a/kresources/slox/sloxaccounts.cpp b/kresources/slox/sloxaccounts.cpp index de694b4f5..a32df5fa2 100644 --- a/kresources/slox/sloxaccounts.cpp +++ b/kresources/slox/sloxaccounts.cpp @@ -65,7 +65,7 @@ void SloxAccounts::insertUser( const TQString &id, const KABC::Addressee &a ) { kdDebug() << "SloxAccount::insertUser() " << id << endl; - mUsers.tqreplace( id, a ); + mUsers.replace( id, a ); TQString email = a.preferredEmail(); @@ -78,7 +78,7 @@ void SloxAccounts::insertUser( const TQString &id, const KABC::Addressee &a ) KABC::Addressee SloxAccounts::lookupUser( const TQString &id ) { TQMap::ConstIterator it; - it = mUsers.tqfind( id ); + it = mUsers.find( id ); if ( it == mUsers.end() ) { requestAccounts(); return KABC::Addressee(); @@ -99,7 +99,7 @@ TQString SloxAccounts::lookupId( const TQString &email ) } requestAccounts(); - int pos = email.tqfind( '@' ); + int pos = email.find( '@' ); if ( pos < 0 ) return email; else return email.left( pos ); } @@ -127,7 +127,7 @@ void SloxAccounts::requestAccounts() url.setPath( "/servlet/webdav.groupuser/" ); TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( mRes, doc, prop, "user", "*" ); WebdavHandler::addSloxElement( mRes, doc, prop, "group", "*" ); @@ -207,7 +207,7 @@ void SloxAccounts::readAccounts() TQDomElement e = n.toElement(); TQString tag = e.tagName(); // remove XML namespace - tag = tag.right( tag.length() - ( tag.tqfind( ':' ) + 1 ) ); + tag = tag.right( tag.length() - ( tag.find( ':' ) + 1 ) ); TQString value = e.text(); if ( tag == "uid" ) id = value; else if ( tag == "mail" ) a.insertEmail( value, true ); diff --git a/kresources/slox/sloxfolderdialog.cpp b/kresources/slox/sloxfolderdialog.cpp index d58a18e1d..f2fe58a92 100644 --- a/kresources/slox/sloxfolderdialog.cpp +++ b/kresources/slox/sloxfolderdialog.cpp @@ -70,7 +70,7 @@ void SloxFolderDialog::createFolderViewItem( SloxFolder *folder ) return; if ( folder->type() != mFolderType && folder->type() != Unbound ) return; - if( mManager->folders().tqcontains( folder->parentId() ) ) { + if( mManager->folders().contains( folder->parentId() ) ) { SloxFolder *tqparent = mManager->folders()[folder->parentId()]; createFolderViewItem( tqparent ); if ( tqparent->item ) diff --git a/kresources/slox/sloxfoldermanager.cpp b/kresources/slox/sloxfoldermanager.cpp index 7894ec93a..41864caf8 100644 --- a/kresources/slox/sloxfoldermanager.cpp +++ b/kresources/slox/sloxfoldermanager.cpp @@ -65,7 +65,7 @@ void SloxFolderManager::requestFolders() url.setPath( "/servlet/webdav.folders/file.xml" ); TQDomDocument doc; - TQDomElement root = WebdavHandler::addDavElement( doc, doc, "proptqfind" ); + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "propfind" ); TQDomElement prop = WebdavHandler::addDavElement( doc, root, "prop" ); WebdavHandler::addSloxElement( mRes, doc, prop, "objectmode", "NEW_AND_MODIFIED" ); WebdavHandler::addSloxElement( mRes, doc, prop, "lastsync", "0" ); diff --git a/kresources/tvanytime/COPYING b/kresources/tvanytime/COPYING index 2ad70b8b1..c13faf0dd 100644 --- a/kresources/tvanytime/COPYING +++ b/kresources/tvanytime/COPYING @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kresources/tvanytime/kcal_resourcetvanytime.cpp b/kresources/tvanytime/kcal_resourcetvanytime.cpp index 2ce2e9e49..6ee6dd1c3 100644 --- a/kresources/tvanytime/kcal_resourcetvanytime.cpp +++ b/kresources/tvanytime/kcal_resourcetvanytime.cpp @@ -288,8 +288,8 @@ bool ResourceTVAnytime::readServiceInformation( const TQDomDocument & serviceInf Service s; TQDomElement e3 = n3.toElement(); if (s.loadXML( e3 ) ) { - s.setActive( mActiveServices.tqcontains( s.id() ) ); - bool newService = !mServiceMap.tqcontains( s.id() ); + s.setActive( mActiveServices.contains( s.id() ) ); + bool newService = !mServiceMap.contains( s.id() ); if ( newService ) { mServiceMap.insert( s.id(), s ); @@ -331,7 +331,7 @@ bool ResourceTVAnytime::readService( const TQString & serviceId ) if ( entryDate < TQDate::tqcurrentDate() || ( entryDate > TQDate::tqcurrentDate().addDays( prefs()->days() - 1 ) ) ) continue; - if ( !dates.tqcontains( re.cap( 1 ) ) ) + if ( !dates.contains( re.cap( 1 ) ) ) dates.append( re.cap( 1 ) ); } } @@ -454,7 +454,7 @@ bool ResourceTVAnytime::subresourceActive( const TQString & subresource ) const void ResourceTVAnytime::setSubresourceActive( const TQString & subresource, bool active ) { - if ( mServiceMap.tqcontains( subresource ) ) + if ( mServiceMap.contains( subresource ) ) { Service s = mServiceMap[ subresource ]; if ( s.active() != active ) diff --git a/ktnef/lib/ktnefparser.cpp b/ktnef/lib/ktnefparser.cpp index 41bb2b687..a81022046 100644 --- a/ktnef/lib/ktnefparser.cpp +++ b/ktnef/lib/ktnefparser.cpp @@ -465,7 +465,7 @@ void KTNEFParser::checkCurrent( int key ) d->current_ = new KTNEFAttach(); else { - if ( d->current_->attributes().tqcontains( key ) ) + if ( d->current_->attributes().contains( key ) ) { if (d->current_->offset() >= 0 ) { @@ -554,11 +554,11 @@ TQString formatRecipient( const TQMap& props ) { TQString s, dn, addr, t; TQMap::ConstIterator it; - if ( ( it = props.tqfind( 0x3001 ) ) != props.end() ) + if ( ( it = props.find( 0x3001 ) ) != props.end() ) dn = ( *it )->valueString(); - if ( ( it = props.tqfind( 0x3003 ) ) != props.end() ) + if ( ( it = props.find( 0x3003 ) ) != props.end() ) addr = ( *it )->valueString(); - if ( ( it = props.tqfind( 0x0C15 ) ) != props.end() ) + if ( ( it = props.find( 0x0C15 ) ) != props.end() ) switch ( ( *it )->value().toInt() ) { case 0: t = "From:"; break; @@ -855,7 +855,7 @@ bool KTNEFParser::readMAPIProperties( TQMap& props, KTNEFAtt break; } // do not remove potential existing similar entry - if ( ( it = props.tqfind( key ) ) == props.end() ) + if ( ( it = props.find( key ) ) == props.end() ) { p = new KTNEFProperty( key, ( mapi.type & 0x0FFF ), mapi.value, mapi.name.value ); props[ p->key() ] = p; diff --git a/ktnef/lib/ktnefpropertyset.cpp b/ktnef/lib/ktnefpropertyset.cpp index b67c1ffba..ec3ee2b51 100644 --- a/ktnef/lib/ktnefpropertyset.cpp +++ b/ktnef/lib/ktnefpropertyset.cpp @@ -30,7 +30,7 @@ KTNEFPropertySet::~KTNEFPropertySet() void KTNEFPropertySet::addProperty( int key, int type, const TQVariant& value, const TQVariant& name, bool overwrite ) { - TQMap::ConstIterator it = properties_.tqfind( key ); + TQMap::ConstIterator it = properties_.find( key ); if ( it != properties_.end() ) { if ( overwrite ) @@ -45,7 +45,7 @@ void KTNEFPropertySet::addProperty( int key, int type, const TQVariant& value, c TQString KTNEFPropertySet::findProp(int key, const TQString& fallback, bool upper) { - TQMap::Iterator it = properties_.tqfind( key ); + TQMap::Iterator it = properties_.find( key ); if( properties_.end() != it ) return upper ? KTNEFProperty::formatValue( (*it)->value(), false ).upper() : KTNEFProperty::formatValue( (*it)->value(), false ); @@ -100,7 +100,7 @@ const TQMap& KTNEFPropertySet::properties() const TQVariant KTNEFPropertySet::property( int key ) const { - TQMap::ConstIterator it = properties_.tqfind( key ); + TQMap::ConstIterator it = properties_.find( key ); if ( it == properties_.end() ) return TQVariant(); else @@ -122,7 +122,7 @@ void KTNEFPropertySet::clear( bool deleteAll ) void KTNEFPropertySet::addAttribute( int key, int type, const TQVariant& value, bool overwrite ) { - TQMap::ConstIterator it = attributes_.tqfind( key ); + TQMap::ConstIterator it = attributes_.find( key ); if ( it != attributes_.end() ) { if ( overwrite ) @@ -146,7 +146,7 @@ const TQMap& KTNEFPropertySet::attributes() const TQVariant KTNEFPropertySet::attribute( int key ) const { - TQMap::ConstIterator it = attributes_.tqfind( key ); + TQMap::ConstIterator it = attributes_.find( key ); if ( it == attributes_.end() ) return TQVariant(); else diff --git a/ktnef/lib/ktnefwriter.cpp b/ktnef/lib/ktnefwriter.cpp index 2264b15ec..dde202ec7 100644 --- a/ktnef/lib/ktnefwriter.cpp +++ b/ktnef/lib/ktnefwriter.cpp @@ -100,7 +100,7 @@ TQ_UINT32 mergeTagAndType( TQ_UINT32 tag, TQ_UINT32 type ) { */ bool KTNEFWriter::writeProperty( TQDataStream &stream, int &bytes, int tag) { TQMap& properties = mData->properties.properties(); - TQMap::Iterator it = properties.tqfind( tag ); + TQMap::Iterator it = properties.find( tag ); if ( it == properties.end() ) return false; @@ -417,7 +417,7 @@ void KTNEFWriter::addAttendee( const TQString& /*cn*/, Role /*r*/, PartStat /*p* // I assume this is the same as the sender? // U also assume that this is like "Name
" void KTNEFWriter::setOrganizer( const TQString& organizer ) { - int i = organizer.tqfind( '<' ); + int i = organizer.find( '<' ); if ( i == -1 ) return; diff --git a/ktnef/lib/mapi.cpp b/ktnef/lib/mapi.cpp index e4f6f85cf..f47c5065d 100644 --- a/ktnef/lib/mapi.cpp +++ b/ktnef/lib/mapi.cpp @@ -197,7 +197,7 @@ TQString mapiTagString( int key ) for ( int i=0; MAPI_TagStrings[ i ].str; i++ ) MAPI_TagMap[ MAPI_TagStrings[ i ].tag ] = i18n(MAPI_TagStrings[ i ].str); } - TQMap::ConstIterator it = MAPI_TagMap.tqfind( key ); + TQMap::ConstIterator it = MAPI_TagMap.find( key ); if ( it == MAPI_TagMap.end() ) return TQString().sprintf( "0x%04X", key ); else @@ -211,7 +211,7 @@ TQString mapiNamedTagString( int key, int tag ) for ( int i=0; MAPI_NamedTagStrings[ i ].str; i++ ) MAPI_NamedTagMap[ MAPI_NamedTagStrings[ i ].tag ] = i18n(MAPI_NamedTagStrings[ i ].str); } - TQMap::ConstIterator it = MAPI_NamedTagMap.tqfind( key ); + TQMap::ConstIterator it = MAPI_NamedTagMap.find( key ); if ( it == MAPI_NamedTagMap.end() ) if ( tag >= 0 ) return TQString().sprintf( "0x%04X [0x%04X]: ", tag, key ) + *it; diff --git a/libemailfunctions/email.cpp b/libemailfunctions/email.cpp index 78de8f8de..cf3e4196b 100644 --- a/libemailfunctions/email.cpp +++ b/libemailfunctions/email.cpp @@ -300,7 +300,7 @@ KPIM::EmailParseResult KPIM::isValidEmailAddress( const TQString& aStr ) bool tooManyAtsFlag = false; - int atCount = aStr.tqcontains('@'); + int atCount = aStr.contains('@'); if ( atCount > 1 ) { tooManyAtsFlag = true;; } else if ( atCount == 0 ) { @@ -524,12 +524,12 @@ bool KPIM::isValidSimpleEmailAddress( const TQString& aStr ) return false; } - int atChar = aStr.tqfindRev( '@' ); + int atChar = aStr.findRev( '@' ); TQString domainPart = aStr.mid( atChar + 1); TQString localPart = aStr.left( atChar ); bool tooManyAtsFlag = false; bool inQuotedString = false; - int atCount = localPart.tqcontains( '@' ); + int atCount = localPart.contains( '@' ); unsigned int strlen = localPart.length(); for ( unsigned int index=0; index < strlen; index++ ) { @@ -832,7 +832,7 @@ TQString KPIM::normalizedAddress( const TQString & displayName, //----------------------------------------------------------------------------- TQString KPIM::decodeIDN( const TQString & addrSpec ) { - const int atPos = addrSpec.tqfindRev( '@' ); + const int atPos = addrSpec.findRev( '@' ); if ( atPos == -1 ) return addrSpec; @@ -847,7 +847,7 @@ TQString KPIM::decodeIDN( const TQString & addrSpec ) //----------------------------------------------------------------------------- TQString KPIM::encodeIDN( const TQString & addrSpec ) { - const int atPos = addrSpec.tqfindRev( '@' ); + const int atPos = addrSpec.findRev( '@' ); if ( atPos == -1 ) return addrSpec; @@ -979,7 +979,7 @@ TQString KPIM::quoteNameIfNecessary( const TQString &str ) if ( ( quoted[0] == '"' ) && ( quoted[quoted.length() - 1] == '"' ) ) { quoted = "\"" + escapeQuotes( quoted.mid( 1, quoted.length() - 2 ) ) + "\""; } - else if ( quoted.tqfind( needQuotes ) != -1 ) { + else if ( quoted.find( needQuotes ) != -1 ) { quoted = "\"" + escapeQuotes( quoted ) + "\""; } diff --git a/libemailfunctions/idmapper.cpp b/libemailfunctions/idmapper.cpp index d90ad8171..52cfeed83 100644 --- a/libemailfunctions/idmapper.cpp +++ b/libemailfunctions/idmapper.cpp @@ -98,7 +98,7 @@ bool IdMapper::save() TQMap::Iterator it; for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) { TQString fingerprint( "" ); - if ( mFingerprintMap.tqcontains( it.key() ) ) + if ( mFingerprintMap.contains( it.key() ) ) fingerprint = mFingerprintMap[ it.key() ]; content += it.key() + "\x02\x02" + it.data().toString() + "\x02\x02" + fingerprint + "\r\n"; } @@ -117,7 +117,7 @@ void IdMapper::clear() void IdMapper::setRemoteId( const TQString &localId, const TQString &remoteId ) { - mIdMap.tqreplace( localId, remoteId ); + mIdMap.replace( localId, remoteId ); } void IdMapper::removeRemoteId( const TQString &remoteId ) @@ -134,7 +134,7 @@ void IdMapper::removeRemoteId( const TQString &remoteId ) TQString IdMapper::remoteId( const TQString &localId ) const { TQMap::ConstIterator it; - it = mIdMap.tqfind( localId ); + it = mIdMap.find( localId ); if ( it != mIdMap.end() ) return it.data().toString(); @@ -159,7 +159,7 @@ TQString IdMapper::asString() const TQMap::ConstIterator it; for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) { TQString fp; - if ( mFingerprintMap.tqcontains( it.key() ) ) + if ( mFingerprintMap.contains( it.key() ) ) fp = mFingerprintMap[ it.key() ]; content += it.key() + "\t" + it.data().toString() + "\t" + fp + "\r\n"; } @@ -174,7 +174,7 @@ void IdMapper::setFingerprint( const TQString &localId, const TQString &fingerpr const TQString& IdMapper::fingerprint( const TQString &localId ) const { - if ( mFingerprintMap.tqcontains( localId ) ) + if ( mFingerprintMap.contains( localId ) ) return mFingerprintMap[ localId ]; else return TQString(); diff --git a/libkcal/COPYING b/libkcal/COPYING index 21e21126c..b05ce7184 100644 --- a/libkcal/COPYING +++ b/libkcal/COPYING @@ -128,7 +128,7 @@ included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means -all the source code for all modules it tqcontains, plus any associated +all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. diff --git a/libkcal/assignmentvisitor.cpp b/libkcal/assignmentvisitor.cpp index 4cc52b7c6..023df8572 100644 --- a/libkcal/assignmentvisitor.cpp +++ b/libkcal/assignmentvisitor.cpp @@ -120,4 +120,4 @@ bool AssignmentVisitor::visit( FreeBusy *freebusy ) return true; } -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/libkcal/assignmentvisitor.h b/libkcal/assignmentvisitor.h index 046de61cb..2be0215cc 100644 --- a/libkcal/assignmentvisitor.h +++ b/libkcal/assignmentvisitor.h @@ -119,4 +119,4 @@ class AssignmentVisitor : public IncidenceBase::Visitor } #endif -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/libkcal/attachmenthandler.cpp b/libkcal/attachmenthandler.cpp index 4922cb12d..a465a7748 100644 --- a/libkcal/attachmenthandler.cpp +++ b/libkcal/attachmenthandler.cpp @@ -47,7 +47,7 @@ namespace KCal { -Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, const TQString &attachmentName, +Attachment *AttachmentHandler::find( TQWidget *tqparent, const TQString &attachmentName, Incidence *incidence ) { if ( !incidence ) { @@ -86,7 +86,7 @@ Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, const TQString &attac return a; } -Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, +Attachment *AttachmentHandler::find( TQWidget *tqparent, const TQString &attachmentName, const TQString &uid ) { if ( uid.isEmpty() ) { @@ -105,10 +105,10 @@ Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, return 0; } - return tqfind( tqparent, attachmentName, incidence ); + return find( tqparent, attachmentName, incidence ); } -Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, const TQString &attachmentName, +Attachment *AttachmentHandler::find( TQWidget *tqparent, const TQString &attachmentName, ScheduleMessage *message ) { if ( !message ) { @@ -124,7 +124,7 @@ Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, const TQString &attac return 0; } - return tqfind( tqparent, attachmentName, incidence ); + return find( tqparent, attachmentName, incidence ); } static KTempFile *s_tempFile = 0; @@ -185,18 +185,18 @@ bool AttachmentHandler::view( TQWidget *tqparent, Attachment *attachment ) bool AttachmentHandler::view( TQWidget *tqparent, const TQString &attachmentName, Incidence *incidence ) { - return view( tqparent, tqfind( tqparent, attachmentName, incidence ) ); + return view( tqparent, find( tqparent, attachmentName, incidence ) ); } bool AttachmentHandler::view( TQWidget *tqparent, const TQString &attachmentName, const TQString &uid ) { - return view( tqparent, tqfind( tqparent, attachmentName, uid ) ); + return view( tqparent, find( tqparent, attachmentName, uid ) ); } bool AttachmentHandler::view( TQWidget *tqparent, const TQString &attachmentName, ScheduleMessage *message ) { - return view( tqparent, tqfind( tqparent, attachmentName, message ) ); + return view( tqparent, find( tqparent, attachmentName, message ) ); } bool AttachmentHandler::saveAs( TQWidget *tqparent, Attachment *attachment ) @@ -240,18 +240,18 @@ bool AttachmentHandler::saveAs( TQWidget *tqparent, Attachment *attachment ) bool AttachmentHandler::saveAs( TQWidget *tqparent, const TQString &attachmentName, Incidence *incidence ) { - return saveAs( tqparent, tqfind( tqparent, attachmentName, incidence ) ); + return saveAs( tqparent, find( tqparent, attachmentName, incidence ) ); } bool AttachmentHandler::saveAs( TQWidget *tqparent, const TQString &attachmentName, const TQString &uid ) { - return saveAs( tqparent, tqfind( tqparent, attachmentName, uid ) ); + return saveAs( tqparent, find( tqparent, attachmentName, uid ) ); } bool AttachmentHandler::saveAs( TQWidget *tqparent, const TQString &attachmentName, ScheduleMessage *message ) { - return saveAs( tqparent, tqfind( tqparent, attachmentName, message ) ); + return saveAs( tqparent, find( tqparent, attachmentName, message ) ); } } diff --git a/libkcal/attachmenthandler.h b/libkcal/attachmenthandler.h index 7fc97382d..5bbeef46c 100644 --- a/libkcal/attachmenthandler.h +++ b/libkcal/attachmenthandler.h @@ -55,7 +55,7 @@ namespace AttachmentHandler { @return a pointer to the Attachment object located; 0 if no such attachment could be found. */ - Attachment *tqfind( TQWidget *tqparent, const TQString &attachmentName, Incidence *incidence ); + Attachment *find( TQWidget *tqparent, const TQString &attachmentName, Incidence *incidence ); /** Finds the attachment in the user's calendar, by @p attachmentName and a scheduler message; @@ -67,7 +67,7 @@ namespace AttachmentHandler { @return a pointer to the Attachment object located; 0 if no such attachment could be found. */ - Attachment *tqfind( TQWidget *tqparent, const TQString &attachmentName, ScheduleMessage *message ); + Attachment *find( TQWidget *tqparent, const TQString &attachmentName, ScheduleMessage *message ); /** Finds the attachment in the user's calendar, by @p attachmentName and @p uid. @@ -78,7 +78,7 @@ namespace AttachmentHandler { @return a pointer to the Attachment object located; 0 if no such attachment could be found. */ - Attachment *tqfind( TQWidget *tqparent, const TQString &attachmentName, const TQString &uid ); + Attachment *find( TQWidget *tqparent, const TQString &attachmentName, const TQString &uid ); /** Launches a viewer on the specified attachment. diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index a5f919324..4ff7137e6 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -162,7 +162,7 @@ TQStringList Calendar::categories() thisCats = (*i)->categories(); for ( TQStringList::ConstIterator si = thisCats.constBegin(); si != thisCats.constEnd(); ++si ) { - if ( cats.tqfind( *si ) == cats.end() ) { + if ( cats.find( *si ) == cats.end() ) { cats.append( *si ); } } @@ -883,7 +883,7 @@ void Calendar::removeRelations( Incidence *incidence ) Incidence::List::ConstIterator it; for ( it = relations.begin(); it != relations.end(); ++it ) { Incidence *i = *it; - if ( !mOrphanUids.tqfind( i->uid() ) ) { + if ( !mOrphanUids.find( i->uid() ) ) { mOrphans.insert( uid, i ); mOrphanUids.insert( i->uid(), i ); i->setRelatedTo( 0 ); @@ -935,7 +935,7 @@ void Calendar::removeRelations( Incidence *incidence ) void Calendar::registerObserver( Observer *observer ) { - if( !mObservers.tqcontains( observer ) ) + if( !mObservers.contains( observer ) ) mObservers.append( observer ); mNewObserver = true; } diff --git a/libkcal/calendarresources.cpp b/libkcal/calendarresources.cpp index 9bec7a648..df3c19855 100644 --- a/libkcal/calendarresources.cpp +++ b/libkcal/calendarresources.cpp @@ -324,7 +324,7 @@ bool CalendarResources::addIncidence( Incidence *incidence, kdDebug(5800)<< "CalendarResources: validRes is " << validRes << endl; ResourceCalendar *oldResource = 0; - if ( mResourceMap.tqcontains( incidence ) ) { + if ( mResourceMap.contains( incidence ) ) { oldResource = mResourceMap[incidence]; } mResourceMap[incidence] = resource; @@ -430,7 +430,7 @@ bool CalendarResources::deleteEvent( Event *event ) kdDebug(5800) << "CalendarResources::deleteEvent" << endl; bool status; - if ( mResourceMap.tqfind( event ) != mResourceMap.end() ) { + if ( mResourceMap.find( event ) != mResourceMap.end() ) { status = mResourceMap[event]->deleteEvent( event ); if ( status ) mPendingDeleteFromResourceMap = true; @@ -487,7 +487,7 @@ bool CalendarResources::deleteTodo( Todo *todo ) kdDebug(5800) << "CalendarResources::deleteTodo" << endl; bool status; - if ( mResourceMap.tqfind( todo ) != mResourceMap.end() ) { + if ( mResourceMap.find( todo ) != mResourceMap.end() ) { status = mResourceMap[todo]->deleteTodo( todo ); if ( status ) mPendingDeleteFromResourceMap = true; @@ -686,7 +686,7 @@ bool CalendarResources::deleteJournal( Journal *journal ) kdDebug(5800) << "CalendarResources::deleteJournal" << endl; bool status; - if ( mResourceMap.tqfind( journal ) != mResourceMap.end() ) { + if ( mResourceMap.find( journal ) != mResourceMap.end() ) { status = mResourceMap[journal]->deleteJournal( journal ); if ( status ) mPendingDeleteFromResourceMap = true; @@ -771,7 +771,7 @@ void CalendarResources::connectResource( ResourceCalendar *resource ) ResourceCalendar *CalendarResources::resource( Incidence *incidence ) { - if ( mResourceMap.tqfind( incidence ) != mResourceMap.end() ) { + if ( mResourceMap.find( incidence ) != mResourceMap.end() ) { return mResourceMap[ incidence ]; } return 0; @@ -960,7 +960,7 @@ void CalendarResources::endAddingIncidences() int CalendarResources::incrementChangeCount( ResourceCalendar *r ) { - if ( !mChangeCounts.tqcontains( r ) ) { + if ( !mChangeCounts.contains( r ) ) { mChangeCounts.insert( r, 0 ); } @@ -973,7 +973,7 @@ int CalendarResources::incrementChangeCount( ResourceCalendar *r ) int CalendarResources::decrementChangeCount( ResourceCalendar *r ) { - if ( !mChangeCounts.tqcontains( r ) ) { + if ( !mChangeCounts.contains( r ) ) { kdError() << "No change count for resource." << endl; return 0; } diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp index 01df32963..c065bf448 100644 --- a/libkcal/calfilter.cpp +++ b/libkcal/calfilter.cpp @@ -125,7 +125,7 @@ bool CalFilter::filterIncidence(Incidence *incidence) const if ( !todo->attendees().isEmpty() ) { Attendee::List::ConstIterator it; for( it = attendees.begin(); it != attendees.end(); ++it ) { - if ( mEmailList.tqfind( (*it)->email() ) != mEmailList.end() ) { + if ( mEmailList.find( (*it)->email() ) != mEmailList.end() ) { iAmOneOfTheAttendees = true; break; } diff --git a/libkcal/calhelper.cpp b/libkcal/calhelper.cpp index 73940b5d8..89a67fb3d 100644 --- a/libkcal/calhelper.cpp +++ b/libkcal/calhelper.cpp @@ -45,7 +45,7 @@ bool CalHelper::isMyKolabIncidence( Calendar *calendar, Incidence *incidence ) CalendarResourceManager::Iterator it; for ( it = manager->begin(); it != manager->end(); ++it ) { TQString subRes = (*it)->subresourceIdentifier( incidence ); - if ( !subRes.isEmpty() && !subRes.tqcontains( "/.INBOX.directory/" ) ) { + if ( !subRes.isEmpty() && !subRes.contains( "/.INBOX.directory/" ) ) { return false; } } @@ -126,7 +126,7 @@ bool CalHelper::hasMyWritableEventsFolders( const TQString &family ) if ( (*it)->type() == "imap" || (*it)->type() == "kolab" ) { if ( (*it)->subresourceType( ( *subIt ) ) == "todo" || (*it)->subresourceType( ( *subIt ) ) == "journal" || - !(*subIt).tqcontains( "/.INBOX.directory/" ) ) { + !(*subIt).contains( "/.INBOX.directory/" ) ) { continue; } } diff --git a/libkcal/compat.cpp b/libkcal/compat.cpp index 4a1a38fda..8268f9785 100644 --- a/libkcal/compat.cpp +++ b/libkcal/compat.cpp @@ -37,15 +37,15 @@ Compat *CompatFactory::createCompat( const TQString &productId ) Compat *compat = 0; - int korg = productId.tqfind( "KOrganizer" ); - int outl9 = productId.tqfind( "Outlook 9.0" ); -// int kcal = productId.tqfind( "LibKCal" ); + int korg = productId.find( "KOrganizer" ); + int outl9 = productId.find( "Outlook 9.0" ); +// int kcal = productId.find( "LibKCal" ); // TODO: Use the version of LibKCal to determine the compat class... if ( korg >= 0 ) { - int versionStart = productId.tqfind( " ", korg ); + int versionStart = productId.find( " ", korg ); if ( versionStart >= 0 ) { - int versionStop = productId.tqfind( TQRegExp( "[ /]" ), versionStart + 1 ); + int versionStop = productId.find( TQRegExp( "[ /]" ), versionStart + 1 ); if ( versionStop >= 0 ) { TQString version = productId.mid( versionStart + 1, versionStop - versionStart - 1 ); @@ -54,7 +54,7 @@ Compat *CompatFactory::createCompat( const TQString &productId ) int versionNum = version.section( ".", 0, 0 ).toInt() * 10000 + version.section( ".", 1, 1 ).toInt() * 100 + version.section( ".", 2, 2 ).toInt(); - int releaseStop = productId.tqfind( "/", versionStop ); + int releaseStop = productId.find( "/", versionStop ); TQString release; if ( releaseStop > versionStop ) { release = productId.mid( versionStop+1, releaseStop-versionStop-1 ); @@ -217,7 +217,7 @@ void CompatPre31::fixRecurrence( Incidence *incidence ) TQValueList months = r->byMonths(); for ( TQValueListConstIterator it = days.begin(); it != days.end(); ++it ) { int newmonth = TQDate( r->startDt().date().year(), 1, 1).addDays( (*it) - 1 ).month(); - if ( !months.tqcontains( newmonth ) ) + if ( !months.contains( newmonth ) ) months.append( newmonth ); } r->setByMonths( months ); diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp index b79166a2d..ca31645a8 100644 --- a/libkcal/customproperties.cpp +++ b/libkcal/customproperties.cpp @@ -44,7 +44,7 @@ bool CustomProperties::operator==( const CustomProperties &other ) const TQMap::ConstIterator it; for( it = mProperties.begin(); it != mProperties.end(); ++it ) { TQMap::ConstIterator itOther = - other.mProperties.tqfind( it.key() ); + other.mProperties.find( it.key() ); if ( itOther == other.mProperties.end() ) { return false; @@ -87,7 +87,7 @@ void CustomProperties::setNonKDECustomProperty(const TQCString &name, const TQSt void CustomProperties::removeNonKDECustomProperty(const TQCString &name) { - TQMap::Iterator it = mProperties.tqfind(name); + TQMap::Iterator it = mProperties.find(name); if (it != mProperties.end()) { mProperties.remove(it); customPropertyUpdated(); @@ -96,7 +96,7 @@ void CustomProperties::removeNonKDECustomProperty(const TQCString &name) TQString CustomProperties::nonKDECustomProperty(const TQCString &name) const { - TQMap::ConstIterator it = mProperties.tqfind(name); + TQMap::ConstIterator it = mProperties.find(name); if (it == mProperties.end()) return TQString(); return it.data(); @@ -123,7 +123,7 @@ TQMap CustomProperties::customProperties() const bool CustomProperties::checkName(const TQCString &name) { - // Check that the property name starts with 'X-' and tqcontains + // Check that the property name starts with 'X-' and contains // only the permitted characters const char* n = name; int len = name.length(); diff --git a/libkcal/dndfactory.cpp b/libkcal/dndfactory.cpp index 9ebae51d4..086323b0d 100644 --- a/libkcal/dndfactory.cpp +++ b/libkcal/dndfactory.cpp @@ -232,7 +232,7 @@ Incidence::List DndFactory::pasteIncidences( const TQDate &newDate, const TQTime // update relations for ( it = list.constBegin(); it != list.constEnd(); ++it ) { Incidence *inc = *it; - if ( oldUidToNewInc.tqcontains( inc->relatedToUid() ) ) { + if ( oldUidToNewInc.contains( inc->relatedToUid() ) ) { Incidence *parentInc = oldUidToNewInc[inc->relatedToUid()]; inc->setRelatedToUid( parentInc->uid() ); inc->setRelatedTo( parentInc ); diff --git a/libkcal/dummyscheduler.cpp b/libkcal/dummyscheduler.cpp index 882a7fce0..7a824f08a 100644 --- a/libkcal/dummyscheduler.cpp +++ b/libkcal/dummyscheduler.cpp @@ -95,7 +95,7 @@ TQPtrList DummyScheduler::retrieveTransactions() while (!messageLine.isNull()) { // kdDebug(5800) << "++++++++" << messageLine << endl; messageString += messageLine + "\n"; - if (messageLine.tqfind("END:VCALENDAR") >= 0) { + if (messageLine.find("END:VCALENDAR") >= 0) { kdDebug(5800) << "---------------" << messageString << endl; ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar, messageString); diff --git a/libkcal/htmlexport.cpp b/libkcal/htmlexport.cpp index cbe3f6d7e..4bedf8806 100644 --- a/libkcal/htmlexport.cpp +++ b/libkcal/htmlexport.cpp @@ -172,14 +172,14 @@ void HtmlExport::createMonthView(TQTextStream *ts) *ts << " "; *ts << "" "
" << TQString::number(start.day()); - if (mHolidayMap.tqcontains(start)) { + if (mHolidayMap.contains(start)) { *ts << " " << mHolidayMap[start] << ""; } @@ -332,13 +332,13 @@ void HtmlExport::createTodoList ( TQTextStream *ts ) Todo *subev = ev; if ( ev->relatedTo() ) { if ( ev->relatedTo()->type()=="Todo" ) { - if ( rawTodoList.tqfind( static_cast( ev->relatedTo() ) ) == + if ( rawTodoList.find( static_cast( ev->relatedTo() ) ) == rawTodoList.end() ) { rawTodoList.append( static_cast( ev->relatedTo() ) ); } } } - it = rawTodoList.tqfind( subev ); + it = rawTodoList.find( subev ); ++it; } @@ -589,7 +589,7 @@ void HtmlExport::formatAttendees( TQTextStream *ts, Incidence *event ) TQString HtmlExport::breakString(const TQString &text) { - int number = text.tqcontains("\n"); + int number = text.contains("\n"); if(number < 0) { return text; } else { @@ -598,7 +598,7 @@ TQString HtmlExport::breakString(const TQString &text) int pos = 0; TQString tmp; for(int i=0;i<=number;i++) { - pos = tmpText.tqfind("\n"); + pos = tmpText.find("\n"); tmp = tmpText.left(pos); tmpText = tmpText.right(tmpText.length() - pos - 1); out += tmp + "
"; @@ -640,28 +640,28 @@ void HtmlExport::createFooter( TQTextStream *ts ) TQString HtmlExport::cleanChars(const TQString &text) { TQString txt = text; - txt = txt.tqreplace( "&", "&" ); - txt = txt.tqreplace( "<", "<" ); - txt = txt.tqreplace( ">", ">" ); - txt = txt.tqreplace( "\"", """ ); - txt = txt.tqreplace( TQString::fromUtf8("ä"), "ä" ); - txt = txt.tqreplace( TQString::fromUtf8("á"), "á" ); - txt = txt.tqreplace( TQString::fromUtf8("à"), "à" ); - txt = txt.tqreplace( TQString::fromUtf8("â"), "â" ); - txt = txt.tqreplace( TQString::fromUtf8("Ä"), "Ä" ); - txt = txt.tqreplace( TQString::fromUtf8("ó"), "ó" ); - txt = txt.tqreplace( TQString::fromUtf8("ô"), "ô" ); - txt = txt.tqreplace( TQString::fromUtf8("ö"), "ö" ); - txt = txt.tqreplace( TQString::fromUtf8("Ö"), "Ö" ); - txt = txt.tqreplace( TQString::fromUtf8("ü"), "ü" ); - txt = txt.tqreplace( TQString::fromUtf8("Ãœ"), "Ü" ); - txt = txt.tqreplace( TQString::fromUtf8("ß"), "ß" ); - txt = txt.tqreplace( TQString::fromUtf8("€"), "€" ); - txt = txt.tqreplace( TQString::fromUtf8("é"), "é" ); - txt = txt.tqreplace( TQString::fromUtf8("ë"), "ë" ); - txt = txt.tqreplace( TQString::fromUtf8("è"), "è" ); - txt = txt.tqreplace( TQString::fromUtf8("ñ"), "ñ" ); - txt = txt.tqreplace( TQString::fromUtf8("ç"), "ç" ); + txt = txt.replace( "&", "&" ); + txt = txt.replace( "<", "<" ); + txt = txt.replace( ">", ">" ); + txt = txt.replace( "\"", """ ); + txt = txt.replace( TQString::fromUtf8("ä"), "ä" ); + txt = txt.replace( TQString::fromUtf8("á"), "á" ); + txt = txt.replace( TQString::fromUtf8("à"), "à" ); + txt = txt.replace( TQString::fromUtf8("â"), "â" ); + txt = txt.replace( TQString::fromUtf8("Ä"), "Ä" ); + txt = txt.replace( TQString::fromUtf8("ó"), "ó" ); + txt = txt.replace( TQString::fromUtf8("ô"), "ô" ); + txt = txt.replace( TQString::fromUtf8("ö"), "ö" ); + txt = txt.replace( TQString::fromUtf8("Ö"), "Ö" ); + txt = txt.replace( TQString::fromUtf8("ü"), "ü" ); + txt = txt.replace( TQString::fromUtf8("Ãœ"), "Ü" ); + txt = txt.replace( TQString::fromUtf8("ß"), "ß" ); + txt = txt.replace( TQString::fromUtf8("€"), "€" ); + txt = txt.replace( TQString::fromUtf8("é"), "é" ); + txt = txt.replace( TQString::fromUtf8("ë"), "ë" ); + txt = txt.replace( TQString::fromUtf8("è"), "è" ); + txt = txt.replace( TQString::fromUtf8("ñ"), "ñ" ); + txt = txt.replace( TQString::fromUtf8("ç"), "ç" ); return txt; } diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index bf57e88ce..50879378e 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -73,7 +73,7 @@ static TQString quoteForParam( const TQString &text ) { TQString tmp = text; tmp.remove( '"' ); - if ( tmp.tqcontains( ';' ) || tmp.tqcontains( ':' ) || tmp.tqcontains( ',' ) ) + if ( tmp.contains( ';' ) || tmp.contains( ':' ) || tmp.contains( ',' ) ) return tmp; // libical quotes in this case already, see icalparameter_as_ical_string() return TQString::tqfromLatin1( "\"" ) + tmp + TQString::tqfromLatin1( "\"" ); } diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 05fc721cc..0c27da432 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -369,7 +369,7 @@ Incidence::List Incidence::relations() const void Incidence::addRelation( Incidence *event ) { - if ( mRelations.tqfind( event ) == mRelations.end() ) { + if ( mRelations.find( event ) == mRelations.end() ) { mRelations.append( event ); } } diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 52e08080f..d5dbef56c 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -394,7 +394,7 @@ unsigned long IncidenceBase::pilotId() const void IncidenceBase::registerObserver( IncidenceBase::Observer *observer ) { - if( !mObservers.tqcontains( observer ) ) mObservers.append( observer ); + if( !mObservers.contains( observer ) ) mObservers.append( observer ); } void IncidenceBase::unRegisterObserver( IncidenceBase::Observer *observer ) diff --git a/libkcal/incidenceformatter.cpp b/libkcal/incidenceformatter.cpp index 36f988752..49c3967aa 100644 --- a/libkcal/incidenceformatter.cpp +++ b/libkcal/incidenceformatter.cpp @@ -74,7 +74,7 @@ static TQString htmlAddLink( const TQString &ref, const TQString &text, static TQString htmlAddTag( const TQString & tag, const TQString & text ) { - int numLineBreaks = text.tqcontains( "\n" ); + int numLineBreaks = text.contains( "\n" ); TQString str = "<" + tag + ">"; TQString tmpText = text; TQString tmpStr = str; @@ -83,7 +83,7 @@ static TQString htmlAddTag( const TQString & tag, const TQString & text ) int pos = 0; TQString tmp; for( int i = 0; i <= numLineBreaks; i++ ) { - pos = tmpText.tqfind( "\n" ); + pos = tmpText.find( "\n" ); tmp = tmpText.left( pos ); tmpText = tmpText.right( tmpText.length() - pos - 1 ); tmpStr += tmp + "
"; @@ -2278,7 +2278,7 @@ static bool incidenceOwnedByMe( Calendar *calendar, Incidence *incidence ) return true; } const TQString subRes = res->subresourceIdentifier( incidence ); - if ( !subRes.tqcontains( "/.INBOX.directory/" ) ) { + if ( !subRes.contains( "/.INBOX.directory/" ) ) { return false; } return true; @@ -2907,9 +2907,9 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) TQString sSenderSearchKeyEmail( tnefMsg->findProp( 0x0C1D ) ); if( !sSenderSearchKeyEmail.isEmpty() ) { - int colon = sSenderSearchKeyEmail.tqfind( ':' ); + int colon = sSenderSearchKeyEmail.find( ':' ); // May be e.g. "SMTP:KHZ@KDE.ORG" - if( sSenderSearchKeyEmail.tqfind( ':' ) == -1 ) + if( sSenderSearchKeyEmail.find( ':' ) == -1 ) sSenderSearchKeyEmail.remove( 0, colon+1 ); } @@ -2920,7 +2920,7 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) it != attendees.end(); ++it ) { // Skip all entries that have no '@' since these are // no mail addresses - if( (*it).tqfind('@') == -1 ) { + if( (*it).find('@') == -1 ) { s = (*it).stripWhiteSpace(); Attendee *attendee = new Attendee( s, s, true ); @@ -2966,12 +2966,12 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) if( !s.isEmpty() ) event->setOrganizer( s ); - s = tnefMsg->findProp( 0x8516 ).tqreplace( TQChar( '-' ), TQString() ) - .tqreplace( TQChar( ':' ), TQString() ); + s = tnefMsg->findProp( 0x8516 ).replace( TQChar( '-' ), TQString() ) + .replace( TQChar( ':' ), TQString() ); event->setDtStart( TQDateTime::fromString( s ) ); // ## Format?? - s = tnefMsg->findProp( 0x8517 ).tqreplace( TQChar( '-' ), TQString() ) - .tqreplace( TQChar( ':' ), TQString() ); + s = tnefMsg->findProp( 0x8517 ).replace( TQChar( '-' ), TQString() ) + .replace( TQChar( ':' ), TQString() ); event->setDtEnd( TQDateTime::fromString( s ) ); s = tnefMsg->findProp( 0x8208 ); @@ -2988,8 +2988,8 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) // PENDING(khz): is this value in local timezone? Must it be // adjusted? Most likely this is a bug in the server or in // Outlook - we ignore it for now. - s = tnefMsg->findProp( 0x8202 ).tqreplace( TQChar( '-' ), TQString() ) - .tqreplace( TQChar( ':' ), TQString() ); + s = tnefMsg->findProp( 0x8202 ).replace( TQChar( '-' ), TQString() ) + .replace( TQChar( ':' ), TQString() ); // ### libkcal always uses tqcurrentDateTime() // event->setDtStamp(TQDateTime::fromString(s)); @@ -3010,12 +3010,12 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) Alarm *alarm = new Alarm(event); TQDateTime highNoonTime = pureISOToLocalTQDateTime( tnefMsg->findProp( 0x8502 ) - .tqreplace( TQChar( '-' ), "" ) - .tqreplace( TQChar( ':' ), "" ) ); + .replace( TQChar( '-' ), "" ) + .replace( TQChar( ':' ), "" ) ); TQDateTime wakeMeUpTime = pureISOToLocalTQDateTime( tnefMsg->findProp( 0x8560, "" ) - .tqreplace( TQChar( '-' ), "" ) - .tqreplace( TQChar( ':' ), "" ) ); + .replace( TQChar( '-' ), "" ) + .replace( TQChar( ':' ), "" ) ); alarm->setTime(wakeMeUpTime); if( highNoonTime.isValid() && wakeMeUpTime.isValid() ) @@ -3047,8 +3047,8 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) addressee.insertCustom( "KADDRESSBOOK", "X-Profession", stringProp( tnefMsg, MAPI_TAG_PR_PROFESSION ) ); TQString s = tnefMsg->findProp( MAPI_TAG_PR_WEDDING_ANNIVERSARY ) - .tqreplace( TQChar( '-' ), TQString() ) - .tqreplace( TQChar( ':' ), TQString() ); + .replace( TQChar( '-' ), TQString() ) + .replace( TQChar( ':' ), TQString() ); if( !s.isEmpty() ) addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", s ); @@ -3114,8 +3114,8 @@ TQString IncidenceFormatter::msTNEFToVPart( const TQByteArray& tnef ) addressee.insertPhoneNumber( KABC::PhoneNumber( nr, KABC::PhoneNumber::Fax | KABC::PhoneNumber::Work ) ); s = tnefMsg->findProp( MAPI_TAG_PR_BIRTHDAY ) - .tqreplace( TQChar( '-' ), TQString() ) - .tqreplace( TQChar( ':' ), TQString() ); + .replace( TQChar( '-' ), TQString() ) + .replace( TQChar( ':' ), TQString() ); if( !s.isEmpty() ) addressee.setBirthday( TQDateTime::fromString( s ) ); @@ -3218,25 +3218,25 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Event *event, const tmp = "
" + i18n("Event start", "From: %1"); if (event->doesFloat()) - ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt, false ).tqreplace(" ", " ") ); + ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt, false ).replace(" ", " ") ); else - ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt ).tqreplace(" ", " ") ); + ret += tmp.tqarg( IncidenceFormatter::dateToString( startDt ).replace(" ", " ") ); tmp = "
" + i18n("Event end","To: %1"); if (event->doesFloat()) - ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt, false ).tqreplace(" ", " ") ); + ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt, false ).replace(" ", " ") ); else - ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt ).tqreplace(" ", " ") ); + ret += tmp.tqarg( IncidenceFormatter::dateToString( endDt ).replace(" ", " ") ); } else { ret += "
"+i18n("Date: %1"). - tqarg( IncidenceFormatter::dateToString( startDt, false ).tqreplace(" ", " ") ); + tqarg( IncidenceFormatter::dateToString( startDt, false ).replace(" ", " ") ); if ( !event->doesFloat() ) { const TQString dtStartTime = - IncidenceFormatter::timeToString( startDt, true ).tqreplace( " ", " " ); + IncidenceFormatter::timeToString( startDt, true ).replace( " ", " " ); const TQString dtEndTime = - IncidenceFormatter::timeToString( endDt, true ).tqreplace( " ", " " ); + IncidenceFormatter::timeToString( endDt, true ).replace( " ", " " ); if ( dtStartTime == dtEndTime ) { // to prevent 'Time: 17:00 - 17:00' tmp = "
" + i18n("time for event,   to prevent ugly line breaks", "Time: %1"). @@ -3268,7 +3268,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ ret += "
" + i18n("Start: %1"). tqarg( IncidenceFormatter::dateTimeToString( startDt, floats, false ). - tqreplace( " ", " " ) ); + replace( " ", " " ) ); } if ( todo->hasDueDate() && todo->dtDue().isValid() ) { @@ -3283,7 +3283,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ ret += "
" + i18n("Due: %1"). tqarg( IncidenceFormatter::dateTimeToString( dueDt, floats, false ). - tqreplace( " ", " " ) ); + replace( " ", " " ) ); } // Print priority and completed info here, for lack of a better place @@ -3297,7 +3297,7 @@ TQString IncidenceFormatter::ToolTipVisitor::dateRangeText( Todo *todo, const TQ ret += "
"; if ( todo->isCompleted() ) { ret += "" + i18n( "Completed:" ) + "" + " "; - ret += todo->completedStr().tqreplace( " ", " " ); + ret += todo->completedStr().replace( " ", " " ); } else { ret += "" + i18n( "Percent Done:" ) + "" + " "; ret += i18n( "%1%" ).tqarg( todo->percentComplete() ); @@ -3475,7 +3475,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden TQString tmp = ""; // header - tmp += "" + incidence->summary().tqreplace( "\n", "
" ) + "
"; + tmp += "" + incidence->summary().replace( "\n", "
" ) + "
"; //NOTE: using
seems to confuse TQt3 tooltips in some cases so use "-----" tmp += "
----------
"; @@ -3492,7 +3492,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden if ( !incidence->location().isEmpty() ) { tmp += "
"; tmp += "" + i18n( "Location:" ) + "" + " "; - tmp += incidence->location().tqreplace( "\n", "
" ); + tmp += incidence->location().replace( "\n", "
" ); } TQString durStr = IncidenceFormatter::durationString( incidence ); @@ -3515,7 +3515,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden } tmp += "
----------
"; tmp += "" + i18n( "Description:" ) + "" + "
"; - tmp += desc.tqreplace( "\n", "
" ); + tmp += desc.replace( "\n", "
" ); tmp += "
----------"; } diff --git a/libkcal/listbase.h b/libkcal/listbase.h index ac9e628ec..2ce1dfa14 100644 --- a/libkcal/listbase.h +++ b/libkcal/listbase.h @@ -67,7 +67,7 @@ class ListBase : public TQValueList bool removeRef( T *t ) { - TQValueListIterator it = tqfind( t ); + TQValueListIterator it = find( t ); if ( it == TQValueList::end() ) { return false; } else { diff --git a/libkcal/person.cpp b/libkcal/person.cpp index c5e15c15f..00f17ed84 100644 --- a/libkcal/person.cpp +++ b/libkcal/person.cpp @@ -64,7 +64,7 @@ TQString Person::fullName() const // Taken from KABC::Addressee::fullEmail TQString name = mName; TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ); - bool weNeedToQuote = name.tqfind( needQuotes ) != -1; + bool weNeedToQuote = name.find( needQuotes ) != -1; if ( weNeedToQuote ) { if ( name[0] != '"' ) name.prepend( '"' ); diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp index b7f13fd54..7b7954b71 100644 --- a/libkcal/qtopiaformat.cpp +++ b/libkcal/qtopiaformat.cpp @@ -140,7 +140,7 @@ class TQtopiaParser : public TQXmlDefaultHandler todo->setUid( uid ); TQString description = attributes.value( "Description" ); - int pos = description.tqfind( '\n' ); + int pos = description.find( '\n' ); if ( pos > 0 ) { TQString summary = description.left( pos ); todo->setSummary( summary ); @@ -242,7 +242,7 @@ class TQtopiaParser : public TQXmlDefaultHandler static TQString category( const TQString &id ) { - TQMap::ConstIterator it = mCategoriesMap.tqfind( id ); + TQMap::ConstIterator it = mCategoriesMap.find( id ); if ( it == mCategoriesMap.end() ) return id; else return *it; } diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 47169ae47..d4e47a528 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp @@ -112,13 +112,13 @@ bool Recurrence::operator==( const Recurrence& r2 ) const void Recurrence::addObserver( Observer *observer ) { - if ( !mObservers.tqcontains( observer ) ) + if ( !mObservers.contains( observer ) ) mObservers.append( observer ); } void Recurrence::removeObserver( Observer *observer ) { - if ( mObservers.tqcontains( observer ) ) + if ( mObservers.contains( observer ) ) mObservers.remove( observer ); } @@ -269,7 +269,7 @@ bool Recurrence::recursOn(const TQDate &qd) const { TimeList tms; // First handle dates. Exrules override - if ( mExDates.tqcontains( qd ) ) return false; + if ( mExDates.contains( qd ) ) return false; // For all-day events a matching exrule excludes the whole day // since exclusions take precedence over inclusions, we know it can't occur on that day. if ( doesFloat() ) { @@ -279,7 +279,7 @@ bool Recurrence::recursOn(const TQDate &qd) const } } - if ( mRDates.tqcontains( qd ) ) return true; + if ( mRDates.contains( qd ) ) return true; bool recurs = false; @@ -328,14 +328,14 @@ bool Recurrence::recursOn(const TQDate &qd) const bool Recurrence::recursAt( const TQDateTime &dt ) const { // if it's excluded anyway, don't bother to check if it recurs at all. - if ( mExDateTimes.tqcontains( dt )) return false; - if ( mExDates.tqcontains( dt.date() )) return false; + if ( mExDateTimes.contains( dt )) return false; + if ( mExDates.contains( dt.date() )) return false; for ( RecurrenceRule::List::ConstIterator rr = mExRules.begin(); rr != mExRules.end(); ++rr ) { if ( (*rr)->recursAt( dt ) ) return false; } // Check explicit recurrences, then rrules. - bool occurs = ( startDateTime() == dt ) || mRDateTimes.tqcontains( dt ); + bool occurs = ( startDateTime() == dt ) || mRDateTimes.contains( dt ); if ( occurs ) return true; for ( RecurrenceRule::List::ConstIterator rr = mRRules.begin(); rr != mRRules.end(); ++rr ) { @@ -624,7 +624,7 @@ void Recurrence::addMonthlyPos( short pos, const TQBitArray &days ) for ( int i = 0; i < 7; ++i ) { if ( days.testBit(i) ) { RecurrenceRule::WDayPos p( pos, i + 1 ); - if ( !positions.tqcontains( p ) ) { + if ( !positions.contains( p ) ) { changed = true; positions.append( p ); } @@ -646,7 +646,7 @@ void Recurrence::addMonthlyPos( short pos, ushort day ) TQValueList positions = rrule->byDays(); RecurrenceRule::WDayPos p( pos, day ); - if ( !positions.tqcontains( p ) ) { + if ( !positions.contains( p ) ) { positions.append( p ); rrule->setByDays( positions ); updated(); @@ -661,7 +661,7 @@ void Recurrence::addMonthlyDate( short day ) if ( !rrule ) return; TQValueList monthDays = rrule->byMonthDays(); - if ( !monthDays.tqcontains( day ) ) { + if ( !monthDays.contains( day ) ) { monthDays.append( day ); rrule->setByMonthDays( monthDays ); updated(); @@ -682,7 +682,7 @@ void Recurrence::addYearlyDay( int day ) if ( !rrule ) return; TQValueList days = rrule->byYearDays(); - if ( !days.tqcontains( day ) ) { + if ( !days.contains( day ) ) { days << day; rrule->setByYearDays( days ); updated(); @@ -710,7 +710,7 @@ void Recurrence::addYearlyMonth( short month ) if ( !rrule ) return; TQValueList months = rrule->byMonths(); - if ( !months.tqcontains(month) ) { + if ( !months.contains(month) ) { months << month; rrule->setByMonths( months ); updated(); @@ -722,7 +722,7 @@ TimeList Recurrence::recurTimesOn( const TQDate &date ) const { TimeList times; // The whole day is excepted - if ( mExDates.tqcontains( date ) ) return times; + if ( mExDates.contains( date ) ) return times; // EXRULE takes precedence over RDATE entries, so for floating events, // a matching excule also excludes the whole day automatically if ( doesFloat() ) { diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h index ea0bbd33b..f50be8bd5 100644 --- a/libkcal/recurrence.h +++ b/libkcal/recurrence.h @@ -410,13 +410,13 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer void addYearlyPos( short pos, const TQBitArray &days ); /** Returns the day numbers within a yearly recurrence. - * @return the days of the year for the event. E.g. if the list tqcontains + * @return the days of the year for the event. E.g. if the list contains * 60, this means the recurrence happens on day 60 of the year, i.e. * on Feb 29 in leap years and March 1 in non-leap years. */ TQValueList yearDays() const; /** Returns the dates within a yearly recurrence. - * @return the days of the month for the event. E.g. if the list tqcontains + * @return the days of the month for the event. E.g. if the list contains * 13, this means the recurrence happens on the 13th of the month. * The months for the recurrence can be obtained through * yearlyMonths(). If this list is empty, the month of the start @@ -424,7 +424,7 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer */ TQValueList yearDates() const; /** Returns the months within a yearly recurrence. - * @return the months for the event. E.g. if the list tqcontains + * @return the months for the event. E.g. if the list contains * 11, this means the recurrence happens in November. * The days for the recurrence can be obtained either through * yearDates() if they are given as dates within the month or @@ -435,7 +435,7 @@ class LIBKCAL_EXPORT Recurrence : public RecurrenceRule::Observer /** Returns the positions within a yearly recurrence. * @return the positions for the event, either within a month (if months * are set through addYearlyMonth()) or within the year. - * E.g. if the list tqcontains {Pos=3, Day=5}, this means the third + * E.g. if the list contains {Pos=3, Day=5}, this means the third * friday. If a month is set this position is understoodas third * Friday in the given months, otherwise as third Friday of the * year. diff --git a/libkcal/recurrencerule.cpp b/libkcal/recurrencerule.cpp index 733e3f5ec..946141df7 100644 --- a/libkcal/recurrencerule.cpp +++ b/libkcal/recurrencerule.cpp @@ -541,13 +541,13 @@ bool RecurrenceRule::operator==( const RecurrenceRule& r ) const void RecurrenceRule::addObserver( Observer *observer ) { - if ( !mObservers.tqcontains( observer ) ) + if ( !mObservers.contains( observer ) ) mObservers.append( observer ); } void RecurrenceRule::removeObserver( Observer *observer ) { - if ( mObservers.tqcontains( observer ) ) + if ( mObservers.contains( observer ) ) mObservers.remove( observer ); } diff --git a/libkcal/resourcecached.cpp b/libkcal/resourcecached.cpp index 82732bab1..0e9f34052 100644 --- a/libkcal/resourcecached.cpp +++ b/libkcal/resourcecached.cpp @@ -485,7 +485,7 @@ void ResourceCached::calendarIncidenceAdded( Incidence *i ) #endif TQMap::ConstIterator it; - it = mAddedIncidences.tqfind( i ); + it = mAddedIncidences.find( i ); if ( it == mAddedIncidences.end() ) { mAddedIncidences.insert( i, true ); } @@ -501,7 +501,7 @@ void ResourceCached::calendarIncidenceChanged( Incidence *i ) #endif TQMap::ConstIterator it; - it = mChangedIncidences.tqfind( i ); + it = mChangedIncidences.find( i ); // FIXME: If you modify an added incidence, there's no need to add it to mChangedIncidences! if ( it == mChangedIncidences.end() ) { mChangedIncidences.insert( i, true ); @@ -530,7 +530,7 @@ void ResourceCached::calendarIncidenceDeleted( Incidence *i ) } else { TQMap::ConstIterator it; - it = mDeletedIncidences.tqfind( i ); + it = mDeletedIncidences.find( i ); if ( it == mDeletedIncidences.end() ) { mDeletedIncidences.insert( i, true ); } diff --git a/libkcal/resourcelocaldir.cpp b/libkcal/resourcelocaldir.cpp index ce9d8c8f1..f1e00f327 100644 --- a/libkcal/resourcelocaldir.cpp +++ b/libkcal/resourcelocaldir.cpp @@ -193,7 +193,7 @@ bool ResourceLocalDir::doSave() bool ResourceLocalDir::doSave( Incidence *incidence ) { - if ( mDeletedIncidences.tqcontains( incidence ) ) { + if ( mDeletedIncidences.contains( incidence ) ) { mDeletedIncidences.remove( incidence ); return true; } diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 973f8c227..62cbf4cb4 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp @@ -270,7 +270,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) if (!anEvent->description().isEmpty()) { VObject *d = addPropValue(vtodo, VCDescriptionProp, anEvent->description().local8Bit()); - if (anEvent->description().tqfind('\n') != -1) + if (anEvent->description().find('\n') != -1) addPropValue(d, VCEncodingProp, VCQuotedPrintableProp); } @@ -530,7 +530,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent) if (!anEvent->description().isEmpty()) { VObject *d = addPropValue(vevent, VCDescriptionProp, anEvent->description().local8Bit()); - if (anEvent->description().tqfind('\n') != -1) + if (anEvent->description().find('\n') != -1) addPropValue(d, VCEncodingProp, VCQuotedPrintableProp); } @@ -701,19 +701,19 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo) deleteStr(s); tmpStr = tmpStr.simplifyWhiteSpace(); int emailPos1, emailPos2; - if ((emailPos1 = tmpStr.tqfind('<')) > 0) { + if ((emailPos1 = tmpStr.find('<')) > 0) { // both email address and name - emailPos2 = tmpStr.tqfindRev('>'); + emailPos2 = tmpStr.findRev('>'); a = new Attendee(tmpStr.left(emailPos1 - 1), tmpStr.mid(emailPos1 + 1, emailPos2 - (emailPos1 + 1))); - } else if (tmpStr.tqfind('@') > 0) { + } else if (tmpStr.find('@') > 0) { // just an email address a = new Attendee(0, tmpStr); } else { // just a name // WTF??? Replacing the spaces of a name and using this as email? - TQString email = tmpStr.tqreplace( ' ', '.' ); + TQString email = tmpStr.replace( ' ', '.' ); a = new Attendee(tmpStr,email); } @@ -917,18 +917,18 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) deleteStr(s); tmpStr = tmpStr.simplifyWhiteSpace(); int emailPos1, emailPos2; - if ((emailPos1 = tmpStr.tqfind('<')) > 0) { + if ((emailPos1 = tmpStr.find('<')) > 0) { // both email address and name - emailPos2 = tmpStr.tqfindRev('>'); + emailPos2 = tmpStr.findRev('>'); a = new Attendee(tmpStr.left(emailPos1 - 1), tmpStr.mid(emailPos1 + 1, emailPos2 - (emailPos1 + 1))); - } else if (tmpStr.tqfind('@') > 0) { + } else if (tmpStr.find('@') > 0) { // just an email address a = new Attendee(0, tmpStr); } else { // just a name - TQString email = tmpStr.tqreplace( ' ', '.' ); + TQString email = tmpStr.replace( ' ', '.' ); a = new Attendee(tmpStr,email); } @@ -1012,8 +1012,8 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) // kdDebug() << " It's a supported type " << endl; // Immediately after the type is the frequency - int index = tmpStr.tqfind(' '); - int last = tmpStr.tqfindRev(' ') + 1; // find last entry + int index = tmpStr.find(' '); + int last = tmpStr.findRev(' ') + 1; // find last entry int rFreq = tmpStr.mid(typelen, (index-1)).toInt(); ++index; // advance to beginning of stuff after freq @@ -1086,7 +1086,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) else { // e.g. MD1 3 #0 while (index < last) { - int index2 = tmpStr.tqfind(' ', index); + int index2 = tmpStr.find(' ', index); short tmpDay = tmpStr.mid(index, (index2-index)).toShort(); index = index2-1; if (tmpStr.mid(index, 1) == "-") @@ -1108,7 +1108,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) else { // e.g. YM1 3 #0 while (index < last) { - int index2 = tmpStr.tqfind(' ', index); + int index2 = tmpStr.find(' ', index); short tmpMonth = tmpStr.mid(index, (index2-index)).toShort(); index = index2 + 1; anEvent->recurrence()->addYearlyMonth( tmpMonth ); @@ -1127,7 +1127,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) else { // e.g. YD1 123 #0 while (index < last) { - int index2 = tmpStr.tqfind(' ', index); + int index2 = tmpStr.find(' ', index); short tmpDay = tmpStr.mid(index, (index2-index)).toShort(); index = index2+1; anEvent->recurrence()->addYearlyDay( tmpDay ); @@ -1146,7 +1146,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent) int rDuration = tmpStr.mid(index, tmpStr.length()-index).toInt(); if ( rDuration > 0 ) anEvent->recurrence()->setDuration( rDuration ); - } else if ( tmpStr.tqfind('T', index) != -1 ) { + } else if ( tmpStr.find('T', index) != -1 ) { TQDate rEndDate = (ISOToTQDateTime(tmpStr.mid(index, tmpStr.length()-index))).date(); anEvent->recurrence()->setEndDateTime( rEndDate ); } diff --git a/libkdenetwork/libgpgme-copy/assuan/assuan-defs.h b/libkdenetwork/libgpgme-copy/assuan/assuan-defs.h index 9ee417a92..fa04f0b29 100644 --- a/libkdenetwork/libgpgme-copy/assuan/assuan-defs.h +++ b/libkdenetwork/libgpgme-copy/assuan/assuan-defs.h @@ -310,7 +310,7 @@ char *stpcpy (char *dest, const char *src); #define setenv _assuan_setenv #define unsetenv _assuan_unsetenv #define clearenv _assuan_clearenv -int setenv (const char *name, const char *value, int tqreplace); +int setenv (const char *name, const char *value, int replace); #endif #ifndef HAVE_PUTC_UNLOCKED int putc_unlocked (int c, FILE *stream); diff --git a/libkdenetwork/libgpgme-copy/assuan/assuan.h b/libkdenetwork/libgpgme-copy/assuan/assuan.h index 3ae24248b..8d0a3960d 100644 --- a/libkdenetwork/libgpgme-copy/assuan/assuan.h +++ b/libkdenetwork/libgpgme-copy/assuan/assuan.h @@ -402,8 +402,8 @@ assuan_error_t assuan_set_okay_line (assuan_context_t ctx, const char *line); assuan_error_t assuan_write_status (assuan_context_t ctx, const char *keyword, const char *text); -/* Negotiate a file descriptor. If LINE tqcontains "FD=N", returns N - assuming a local file descriptor. If LINE tqcontains "FD" reads a +/* Negotiate a file descriptor. If LINE contains "FD=N", returns N + assuming a local file descriptor. If LINE contains "FD" reads a file descriptor via CTX and stores it in *RDF (the CTX must be capable of passing file descriptors). */ assuan_error_t assuan_command_parse_fd (assuan_context_t ctx, char *line, diff --git a/libkdenetwork/libgpgme-copy/gpgme/ChangeLog b/libkdenetwork/libgpgme-copy/gpgme/ChangeLog index 4985741db..4f1038fb3 100644 --- a/libkdenetwork/libgpgme-copy/gpgme/ChangeLog +++ b/libkdenetwork/libgpgme-copy/gpgme/ChangeLog @@ -362,7 +362,7 @@ to prototype. * verify.c (parse_notation): Likewise for invocation. * conversion.c (_gpgme_decode_percent_string): Likewise to - declaration. If set, do not tqreplace '\0' characters with a + declaration. If set, do not replace '\0' characters with a printable string. * gpgme.h (struct _gpgme_key_sig): New field notations. * ops.h (_gpgme_parse_notation): New prototype. diff --git a/libkdepim/addresseediffalgo.cpp b/libkdepim/addresseediffalgo.cpp index 1de2dddcc..361ec631f 100644 --- a/libkdepim/addresseediffalgo.cpp +++ b/libkdepim/addresseediffalgo.cpp @@ -135,12 +135,12 @@ void AddresseeDiffAlgo::diffList( const TQString &id, const TQValueList &left, const TQValueList &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/libkdepim/addresseeemailselection.cpp b/libkdepim/addresseeemailselection.cpp index 589e7e334..d0862fa27 100644 --- a/libkdepim/addresseeemailselection.cpp +++ b/libkdepim/addresseeemailselection.cpp @@ -150,7 +150,7 @@ bool AddresseeEmailSelection::itemMatches( const KABC::Addressee &addressee, uin bool AddresseeEmailSelection::itemEquals( const KABC::Addressee &addressee, uint index, const TQString &pattern ) const { return (pattern == addressee.formattedName() + " " + email( addressee, index )) || - (addressee.emails().tqcontains( pattern )); + (addressee.emails().contains( pattern )); } TQString AddresseeEmailSelection::distributionListText( const KABC::DistributionList *distributionList ) const diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp index 9e42085b5..63473a6f1 100644 --- a/libkdepim/addresseelineedit.cpp +++ b/libkdepim/addresseelineedit.cpp @@ -285,13 +285,13 @@ void AddresseeLineEdit::insert( const TQString &t ) KURL url( newText ); newText = url.path(); } - else if ( newText.tqfind(" at ") != -1 ) { + else if ( newText.find(" at ") != -1 ) { // Anti-spam stuff - newText.tqreplace( " at ", "@" ); - newText.tqreplace( " dot ", "." ); + newText.replace( " at ", "@" ); + newText.replace( " dot ", "." ); } - else if ( newText.tqfind("(at)") != -1 ) { - newText.tqreplace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); + else if ( newText.find("(at)") != -1 ) { + newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); } TQString contents = text(); @@ -567,7 +567,7 @@ void AddresseeLineEdit::loadContacts() KABC::Resource::Iterator it; for ( it = resource->begin(); it != resource->end(); ++it ) { TQString uid = (*it).uid(); - TQMap::const_iterator wit = uidToResourceMap.tqfind( uid ); + TQMap::const_iterator wit = uidToResourceMap.find( uid ); const TQString subresourceLabel = resabc->subresourceLabel( *wit ); const int weight = ( wit != uidToResourceMap.end() ) ? resabc->subresourceCompletionWeight( *wit ) : 80; const int idx = addCompletionSource( subresourceLabel, weight ); @@ -641,7 +641,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int const TQString givenName = addr.givenName(); const TQString familyName= addr.familyName(); const TQString nickName = addr.nickName(); - const TQString domain = email.mid( email.tqfind( '@' ) + 1 ); + const TQString domain = email.mid( email.find( '@' ) + 1 ); TQString fullEmail = addr.fullEmail( email ); //TODO: let user decide what fields to use in lookup, e.g. company, city, ... @@ -698,7 +698,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int * We remove the in getAdjustedCompletionItems. */ if ( isPrefEmail == prefEmailWeight ) - fullEmail.tqreplace( " <", " <" ); + fullEmail.replace( " <", " <" ); addCompletionItem( fullEmail, weight + isPrefEmail, source, &keyWords ); isPrefEmail = 0; @@ -727,7 +727,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int bool bDone = false; int i = -1; - while( ( i = name.tqfindRev(' ') ) > 1 && !bDone ) { + while( ( i = name.findRev(' ') ) > 1 && !bDone ) { TQString sLastName( name.mid( i+1 ) ); if( ! sLastName.isEmpty() && 2 <= sLastName.length() && // last names must be at least 2 chars long @@ -758,7 +758,7 @@ void AddresseeLineEdit::addCompletionItem( const TQString& string, int weight, i { // Check if there is an exact match for item already, and use the max weight if so. // Since there's no way to get the information from KCompletion, we have to keep our own TQMap - CompletionItemsMap::iterator it = s_completionItemMap->tqfind( string ); + CompletionItemsMap::iterator it = s_completionItemMap->find( string ); if ( it != s_completionItemMap->end() ) { weight = TQMAX( ( *it ).first, weight ); ( *it ).first = weight; @@ -798,7 +798,7 @@ void AddresseeLineEdit::startLoadingLDAPEntries() TQString s( *s_LDAPText ); // TODO cache last? TQString prevAddr; - int n = s.tqfindRev( ',' ); + int n = s.findRev( ',' ); if ( n >= 0 ) { prevAddr = s.left( n + 1 ) + ' '; s = s.mid( n + 1, 255 ).stripWhiteSpace(); @@ -821,7 +821,7 @@ void AddresseeLineEdit::slotLDAPSearchData( const KPIM::LdapResultList& adrs ) addr.setNameFromString( (*it).name ); addr.setEmails( (*it).email ); - if ( !s_ldapClientToCompletionSourceMap->tqcontains( (*it).clientNumber ) ) + if ( !s_ldapClientToCompletionSourceMap->contains( (*it).clientNumber ) ) updateLDAPWeights(); // we got results from a new source, so update the completion sources addContact( addr, (*it).completionWeight, (*s_ldapClientToCompletionSourceMap)[ (*it ).clientNumber ] ); @@ -872,13 +872,13 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS // item, if there is one TQListBoxItem* item = 0; if ( oldCurrentText.isEmpty() - || ( item = completionBox->tqfindItem( oldCurrentText ) ) == 0 ) { + || ( item = completionBox->findItem( oldCurrentText ) ) == 0 ) { item = completionBox->item( 1 ); } if ( item ) { if ( itemUnderMouse ) { - TQListBoxItem *newItemUnderMouse = completionBox->tqfindItem( oldTextUnderMouse ); + TQListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse ); // if the mouse was over an item, before, but now that's elsewhere, // move the cursor, so folks don't accidently click the wrong item if ( newItemUnderMouse ) { @@ -900,7 +900,7 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS if ( autoSuggest ) { - int index = items.first().tqfind( m_searchString ); + int index = items.first().find( m_searchString ); TQString newText = items.first().mid( index ); setUserSelection(false); setCompletedText(newText,true); @@ -1020,13 +1020,13 @@ KCompletion::CompOrder KPIM::AddresseeLineEdit::completionOrder() int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source, int weight ) { - TQMap::iterator it = s_completionSourceWeights->tqfind( source ); + TQMap::iterator it = s_completionSourceWeights->find( source ); if ( it == s_completionSourceWeights->end() ) s_completionSourceWeights->insert( source, weight ); else (*s_completionSourceWeights)[source] = weight; - int sourceIndex = s_completionSources->tqfindIndex( source ); + int sourceIndex = s_completionSources->findIndex( source ); if ( sourceIndex == -1 ) { s_completionSources->append( source ); return s_completionSources->size() - 1; @@ -1228,7 +1228,7 @@ const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool ful TQMap sections; TQStringList sortedItems; for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it, ++i ) { - CompletionItemsMap::const_iterator cit = s_completionItemMap->tqfind(*it); + CompletionItemsMap::const_iterator cit = s_completionItemMap->find(*it); if ( cit == s_completionItemMap->end() ) continue; int idx = (*cit).second; @@ -1236,14 +1236,14 @@ const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool ful if ( s_completion->order() == KCompletion::Weighted ) { if ( lastSourceIndex == -1 || lastSourceIndex != idx ) { const TQString sourceLabel( (*s_completionSources)[idx] ); - if ( sections.tqfind(idx) == sections.end() ) { + if ( sections.find(idx) == sections.end() ) { items.insert( it, sourceLabel ); } lastSourceIndex = idx; } (*it) = (*it).prepend( s_completionItemIndentString ); // remove preferred email sort added in addContact() - (*it).tqreplace( " <", " <" ); + (*it).replace( " <", " <" ); } sections[idx].append( *it ); diff --git a/libkdepim/addresseeselector.cpp b/libkdepim/addresseeselector.cpp index 70d587bae..d947baa1a 100644 --- a/libkdepim/addresseeselector.cpp +++ b/libkdepim/addresseeselector.cpp @@ -47,7 +47,7 @@ class AddresseeSelector::AddressBookManager void addAddressBook( const TQString &title, SelectionItem::List &list ); void clear(); - bool tqcontains( uint index, const SelectionItem& ); + bool contains( uint index, const SelectionItem& ); private: struct AddressBookEntry { @@ -79,7 +79,7 @@ TQStringList AddresseeSelector::AddressBookManager::titles() const void AddresseeSelector::AddressBookManager::addResource( KABC::Resource *resource ) { - if ( mResources.tqfind( resource ) == mResources.end() ) + if ( mResources.find( resource ) == mResources.end() ) mResources.append( resource ); } @@ -101,7 +101,7 @@ void AddresseeSelector::AddressBookManager::clear() mAddressBooks.clear(); } -bool AddresseeSelector::AddressBookManager::tqcontains( uint index, const SelectionItem &item ) +bool AddresseeSelector::AddressBookManager::contains( uint index, const SelectionItem &item ) { if ( index == 0 ) // the 'all' entry return true; @@ -362,7 +362,7 @@ void AddresseeSelector::updateAddresseeView() SelectionItem::List::Iterator it; for ( it = mSelectionItems.begin(); it != mSelectionItems.end(); ++it ) { - if ( mAddressBookManager->tqcontains( addressBookIndex, *it ) ) { + if ( mAddressBookManager->contains( addressBookIndex, *it ) ) { if ( (*it).distributionList() == 0 ) { if ( mAddresseeFilter->text().isEmpty() || mSelection->itemMatches( (*it).addressee(), (*it).index(), diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index f291e4e1d..82f0305e1 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -238,11 +238,11 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr smsURL = TQString(" (%2)" ).tqarg( number ).tqarg( i18n( "SMS") ); dynamicPart += rowFmtStr - .tqarg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) + .tqarg( (*phoneIt).typeLabel().replace( " ", " " ) ) .tqarg( TQString::tqfromLatin1( "%2%3" ).tqarg( url ).tqarg( number ).tqarg( smsURL ) ); } else { dynamicPart += rowFmtStr - .tqarg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) + .tqarg( (*phoneIt).typeLabel().replace( " ", " " ) ) .tqarg( number ); } } @@ -296,7 +296,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr TQString formattedAddress; formattedAddress = TQStyleSheet::escape( (*addrIt).formattedAddress().stripWhiteSpace() ); - formattedAddress = formattedAddress.tqreplace( '\n', "
" ); + formattedAddress = formattedAddress.replace( '\n', "
" ); TQString link = "" + formattedAddress + ""; @@ -312,7 +312,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr } } else { TQString link = "" + - (*addrIt).label().tqreplace( '\n', "
" ) + "
"; + (*addrIt).label().replace( '\n', "
" ) + ""; if ( linkMask & AddressLinks ) { dynamicPart += rowFmtStr @@ -321,7 +321,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr } else { dynamicPart += rowFmtStr .tqarg( KABC::Address::typeLabel( (*addrIt).type() ) ) - .tqarg( (*addrIt).label().tqreplace( '\n', "
" ) ); + .tqarg( (*addrIt).label().replace( '\n', "
" ) ); } } } @@ -333,7 +333,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr // the data afterwards (keeps us safe from possible % signs // in either one). notes = TQStyleSheet::escape( addr.note() ); - notes = rowFmtStr.tqarg( i18n( "Notes" ) ).tqarg( notes.tqreplace( '\n', "
" ) ) ; + notes = rowFmtStr.tqarg( i18n( "Notes" ) ).tqarg( notes.replace( '\n', "
" ) ) ; } TQString customData; @@ -359,7 +359,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr customEntry.remove( "KADDRESSBOOK-X-" ); customEntry.remove( "KADDRESSBOOK-" ); - int pos = customEntry.tqfind( ':' ); + int pos = customEntry.find( ':' ); TQString key = customEntry.left( pos ); const TQString value = customEntry.mid( pos + 1 ); @@ -367,7 +367,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( key == "BlogFeed" || key == "IMAddress" ) continue; - const TQMap::ConstIterator keyIt = titleMap.tqfind( key ); + const TQMap::ConstIterator keyIt = titleMap.find( key ); if ( keyIt != titleMap.end() ) key = keyIt.data(); @@ -419,7 +419,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr // @STYLE@ - construct the string by parts, substituting in // the styles first. There are lots of appends, but we need to // do it this way to avoid cases where the substituted string - // tqcontains %1 and the like. + // contains %1 and the like. // TQString strAddr = TQString::tqfromLatin1( "
" @@ -591,7 +591,7 @@ void AddresseeView::phoneNumberClicked( const TQString &number ) return; } - commandLine.tqreplace( "%N", number ); + commandLine.replace( "%N", number ); KRun::runCommand( commandLine ); } @@ -623,8 +623,8 @@ void AddresseeView::sendSMS( const TQString &number, const TQString &text ) *stream << text; file.close(); - commandLine.tqreplace( "%N", number ); - commandLine.tqreplace( "%F", file.name() ); + commandLine.replace( "%N", number ); + commandLine.replace( "%F", file.name() ); KRun::runCommand( commandLine ); } @@ -640,7 +640,7 @@ void AddresseeView::faxNumberClicked( const TQString &number ) return; } - commandLine.tqreplace( "%N", number ); + commandLine.replace( "%N", number ); KRun::runCommand( commandLine ); } diff --git a/libkdepim/addressesdialog.cpp b/libkdepim/addressesdialog.cpp index e874ac017..d73ab63f8 100644 --- a/libkdepim/addressesdialog.cpp +++ b/libkdepim/addressesdialog.cpp @@ -176,7 +176,7 @@ AddresseeViewItem::email() const bool AddresseeViewItem::matches(const TQString& txt) const { - return d->address.realName().tqcontains(txt, false) || d->address.preferredEmail().tqcontains(txt, false); + return d->address.realName().contains(txt, false) || d->address.preferredEmail().contains(txt, false); } void AddresseeViewItem::setSelected(bool selected) @@ -402,7 +402,7 @@ AddressesDialog::allToAddressesNoDuplicates() const TQValueList::ConstIterator eit; for( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; - if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) { + if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { aList.append( a ) ; } } @@ -415,7 +415,7 @@ AddressesDialog::allToAddressesNoDuplicates() const TQValueList::ConstIterator eit; for( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; - if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) { + if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { aList.append( a ) ; } } @@ -678,7 +678,7 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *tqparent, AddresseeViewItem* address = itr.current(); ++itr; - if (selectedToAvailableMapping.tqfind(address) != 0) + if (selectedToAvailableMapping.find(address) != 0) { continue; } @@ -1043,11 +1043,11 @@ AddressesDialog::filterChanged( const TQString& txt ) } p2 = static_cast( p2->nextSibling() ); } - if ( !pcount && !p->text( 0 ).tqcontains( txt, false ) ) { + if ( !pcount && !p->text( 0 ).contains( txt, false ) ) { p->setVisible( false ); } distlistgroupVisible += pcount; - if ( p->text( 0 ).tqcontains( txt, false ) ) { + if ( p->text( 0 ).contains( txt, false ) ) { distlistgroupVisible++; } } diff --git a/libkdepim/calendardiffalgo.cpp b/libkdepim/calendardiffalgo.cpp index dc22fd30e..d1eb29b32 100644 --- a/libkdepim/calendardiffalgo.cpp +++ b/libkdepim/calendardiffalgo.cpp @@ -202,12 +202,12 @@ void CalendarDiffAlgo::diffList( const TQString &id, const TQValueList &left, const TQValueList &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index 982e11517..5b39139e4 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp @@ -58,7 +58,7 @@ void CategorySelectDialog::setCategories( const TQStringList &categoryList ) TQStringList::ConstIterator it; for ( it = categoryList.begin(); it != categoryList.end(); ++it ) - if ( mPrefs->mCustomCategories.tqfind( *it ) == mPrefs->mCustomCategories.end() ) + if ( mPrefs->mCustomCategories.find( *it ) == mPrefs->mCustomCategories.end() ) mPrefs->mCustomCategories.append( *it ); for ( it = mPrefs->mCustomCategories.begin(); diff --git a/libkdepim/designerfields.cpp b/libkdepim/designerfields.cpp index 31a3b7f8a..e1f767998 100644 --- a/libkdepim/designerfields.cpp +++ b/libkdepim/designerfields.cpp @@ -78,7 +78,7 @@ void DesignerFields::initGUI( const TQString &uiFile ) << "KDatePicker"; while ( it.current() ) { - if ( allowedTypes.tqcontains( it.current()->className() ) ) { + if ( allowedTypes.contains( it.current()->className() ) ) { TQString name = it.current()->name(); if ( name.startsWith( "X_" ) ) { name = name.mid( 2 ); @@ -174,7 +174,7 @@ void DesignerFields::load( DesignerFields::Storage *storage ) for ( it2 = keys.begin(); it2 != keys.end(); ++it2 ) { TQString value = storage->read( *it2 ); - TQMap::ConstIterator it = mWidgets.tqfind( *it2 ); + TQMap::ConstIterator it = mWidgets.find( *it2 ); if ( it != mWidgets.end() ) { if ( it.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast( it.data() ); @@ -244,7 +244,7 @@ void DesignerFields::setReadOnly( bool readOnly ) { TQMap::Iterator it; for ( it = mWidgets.begin(); it != mWidgets.end(); ++it ) - if ( mDisabledWidgets.tqfind( it.data() ) == mDisabledWidgets.end() ) + if ( mDisabledWidgets.find( it.data() ) == mDisabledWidgets.end() ) it.data()->setEnabled( !readOnly ); } diff --git a/libkdepim/diffalgo.cpp b/libkdepim/diffalgo.cpp index 428316568..21c476861 100644 --- a/libkdepim/diffalgo.cpp +++ b/libkdepim/diffalgo.cpp @@ -75,7 +75,7 @@ void DiffAlgo::conflictField( const TQString &id, const TQString &leftValue, void DiffAlgo::addDisplay( DiffAlgoDisplay *display ) { - if ( mDisplays.tqfind( display ) == mDisplays.end() ) + if ( mDisplays.find( display ) == mDisplays.end() ) mDisplays.append( display ); } diff --git a/libkdepim/kabcresourcecached.cpp b/libkdepim/kabcresourcecached.cpp index 7e6842bfb..d46156f6d 100644 --- a/libkdepim/kabcresourcecached.cpp +++ b/libkdepim/kabcresourcecached.cpp @@ -165,8 +165,8 @@ void ResourceCached::slotKABCSave() void ResourceCached::insertAddressee( const Addressee &addr ) { - if ( !mAddrMap.tqcontains( addr.uid() ) ) { // new contact - if ( mDeletedAddressees.tqcontains( addr.uid() ) ) { + if ( !mAddrMap.contains( addr.uid() ) ) { // new contact + if ( mDeletedAddressees.contains( addr.uid() ) ) { // it was first removed, then added, so it's an update... mDeletedAddressees.remove( addr.uid() ); @@ -178,7 +178,7 @@ void ResourceCached::insertAddressee( const Addressee &addr ) mAddrMap.insert( addr.uid(), addr ); mAddedAddressees.insert( addr.uid(), addr ); } else { - KABC::Addressee oldAddressee = mAddrMap.tqfind( addr.uid() ).data(); + KABC::Addressee oldAddressee = mAddrMap.find( addr.uid() ).data(); if ( oldAddressee != addr ) { mAddrMap.remove( addr.uid() ); mAddrMap.insert( addr.uid(), addr ); @@ -189,12 +189,12 @@ void ResourceCached::insertAddressee( const Addressee &addr ) void ResourceCached::removeAddressee( const Addressee &addr ) { - if ( mAddedAddressees.tqcontains( addr.uid() ) ) { + if ( mAddedAddressees.contains( addr.uid() ) ) { mAddedAddressees.remove( addr.uid() ); return; } - if ( mDeletedAddressees.tqfind( addr.uid() ) == mDeletedAddressees.end() ) + if ( mDeletedAddressees.find( addr.uid() ) == mDeletedAddressees.end() ) mDeletedAddressees.insert( addr.uid(), addr ); mAddrMap.remove( addr.uid() ); diff --git a/libkdepim/kcmdesignerfields.cpp b/libkdepim/kcmdesignerfields.cpp index 10edf6f8b..bc7ddb747 100644 --- a/libkdepim/kcmdesignerfields.cpp +++ b/libkdepim/kcmdesignerfields.cpp @@ -60,7 +60,7 @@ class PageItem : public TQCheckListItem : TQCheckListItem( tqparent, "", TQCheckListItem::CheckBox ), mPath( path ), mIsActive( false ) { - mName = path.mid( path.tqfindRev( '/' ) + 1 ); + mName = path.mid( path.findRev( '/' ) + 1 ); TQWidget *wdg = TQWidgetFactory::create( mPath, 0, 0 ); if ( wdg ) { @@ -85,7 +85,7 @@ class PageItem : public TQCheckListItem allowedTypes.insert( "KDatePicker", i18n( "Date" ) ); while ( it.current() ) { - if ( allowedTypes.tqfind( it.current()->className() ) != allowedTypes.end() ) { + if ( allowedTypes.find( it.current()->className() ) != allowedTypes.end() ) { TQString name = it.current()->name(); if ( name.startsWith( "X_" ) ) { new TQListViewItem( this, name, @@ -217,7 +217,7 @@ void KCMDesignerFields::loadActivePages(const TQStringList& ai) while ( it.current() ) { if ( it.current()->tqparent() == 0 ) { PageItem *item = static_cast( it.current() ); - if ( ai.tqfind( item->name() ) != ai.end() ) { + if ( ai.find( item->name() ) != ai.end() ) { item->setOn( true ); item->setIsActive( true ); } @@ -361,7 +361,7 @@ void KCMDesignerFields::updatePreview( TQListViewItem *item ) "
%7%8
" ) .tqarg( i18n( "Key:" ) ) - .tqarg( item->text( 0 ).tqreplace("X_","X-") ) + .tqarg( item->text( 0 ).replace("X_","X-") ) .tqarg( i18n( "Type:" ) ) .tqarg( item->text( 1 ) ) .tqarg( i18n( "Classname:" ) ) diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp index 118c92c21..65dc3b8b3 100644 --- a/libkdepim/kdateedit.cpp +++ b/libkdepim/kdateedit.cpp @@ -49,7 +49,7 @@ class DateValidator : public TQValidator if ( length <= 0 ) return Intermediate; - if ( mKeywords.tqcontains( str.lower() ) ) + if ( mKeywords.contains( str.lower() ) ) return Acceptable; bool ok = false; @@ -214,7 +214,7 @@ TQDate KDateEdit::parseDate( bool *replaced ) const if ( text.isEmpty() ) result = TQDate(); - else if ( mKeywordMap.tqcontains( text.lower() ) ) { + else if ( mKeywordMap.contains( text.lower() ) ) { TQDate today = TQDate::tqcurrentDate(); int i = mKeywordMap[ text.lower() ]; if ( i >= 100 ) { @@ -286,7 +286,7 @@ bool KDateEdit::eventFilter( TQObject *object, TQEvent *event ) case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonPress: { TQMouseEvent *mouseEvent = (TQMouseEvent*)event; - if ( !TQT_TQRECT_OBJECT(mPopup->rect()).tqcontains( mouseEvent->pos() ) ) { + if ( !TQT_TQRECT_OBJECT(mPopup->rect()).contains( mouseEvent->pos() ) ) { TQPoint globalPos = mPopup->mapToGlobal( mouseEvent->pos() ); if ( TQApplication::widgetAt( globalPos, true ) == this ) { // The date picker is being closed by a click on the diff --git a/libkdepim/kfileio.h b/libkdepim/kfileio.h index 8365f1e29..928175b6f 100644 --- a/libkdepim/kfileio.h +++ b/libkdepim/kfileio.h @@ -17,7 +17,7 @@ class TQString; namespace KPIM { -/** Load a file. Returns a pointer to the memory-block that tqcontains +/** Load a file. Returns a pointer to the memory-block that contains * the loaded file. Returns a null string if the file could not be loaded. * If withDialogs is FALSE no warning dialogs are opened if there are * problems. diff --git a/libkdepim/kimportdialog.cpp b/libkdepim/kimportdialog.cpp index 904415982..0e08eec29 100644 --- a/libkdepim/kimportdialog.cpp +++ b/libkdepim/kimportdialog.cpp @@ -323,7 +323,7 @@ void KImportDialog::readFile( int rows ) pDialog.setAutoClose(true); KProgress *progress = pDialog.progressBar(); - progress->setTotalSteps( mFile.tqcontains(mSeparator, false) ); + progress->setTotalSteps( mFile.contains(mSeparator, false) ); progress->setValue(0); int progressValue = 0; @@ -443,7 +443,7 @@ void KImportDialog::setCellText(int row, int col, const TQString& text) if ((mTable->numRows() - 1) < row) mTable->setNumRows(row + 1); if ((mTable->numCols() - 1) < col) mTable->setNumCols(col + 1); - KImportColumn *c = mColumnDict.tqfind(col); + KImportColumn *c = mColumnDict.find(col); TQString formattedText; if (c) formattedText = c->preview(text,findFormat(col)); else formattedText = text; @@ -492,7 +492,7 @@ void KImportDialog::tableSelected() TQTableSelection selection = mTable->selection(mTable->currentSelection()); TQListViewItem *item = mHeaderList->firstChild(); - KImportColumn *col = mColumnDict.tqfind(selection.leftCol()); + KImportColumn *col = mColumnDict.find(selection.leftCol()); if (col) { while(item) { if (item->text(0) == col->header()) { @@ -550,9 +550,9 @@ void KImportDialog::assignColumn(TQListViewItem *item) for(int i=selection.leftCol();i<=selection.rightCol();++i) { if (i >= 0) { mTable->horizontalHeader()->setLabel(i,colItem->text(0)); - mColumnDict.tqreplace(i,colItem->column()); + mColumnDict.replace(i,colItem->column()); int format = mFormatCombo->currentItem() + 1; - mFormats.tqreplace(i,format); + mFormats.replace(i,format); colItem->column()->addColId(i); } } @@ -616,8 +616,8 @@ void KImportDialog::assignTemplate() continue; KImportColumn *col = mColumns.at(i); mTable->horizontalHeader()->setLabel( tableColumn, col->header() ); - mColumnDict.tqreplace( tableColumn, col ); - mFormats.tqreplace( tableColumn, format ); + mColumnDict.replace( tableColumn, col ); + mFormats.replace( tableColumn, format ); col->addColId( tableColumn ); } @@ -633,7 +633,7 @@ void KImportDialog::removeColumn() for(int i=selection.leftCol();i<=selection.rightCol();++i) { if (i >= 0) { mTable->horizontalHeader()->setLabel(i,TQString::number(i+1)); - KImportColumn *col = mColumnDict.tqfind(i); + KImportColumn *col = mColumnDict.find(i); if (col) { mColumnDict.remove(i); mFormats.remove(i); @@ -674,7 +674,7 @@ void KImportDialog::applyConverter() int KImportDialog::findFormat(int column) { - TQMap::ConstIterator formatIt = mFormats.tqfind(column); + TQMap::ConstIterator formatIt = mFormats.find(column); int format; if (formatIt == mFormats.end()) format = KImportColumn::FormatUndefined; else format = *formatIt; @@ -698,7 +698,7 @@ void KImportDialog::addColumn(KImportColumn *col) void KImportDialog::setData( uint row, uint col, const TQString &value ) { TQString val = value; - val.tqreplace( "\\n", "\n" ); + val.replace( "\\n", "\n" ); if ( row >= mData.count() ) { mData.resize( row + 1 ); @@ -713,7 +713,7 @@ void KImportDialog::setData( uint row, uint col, const TQString &value ) rowVector->resize( col + 1 ); } - KImportColumn *c = mColumnDict.tqfind( col ); + KImportColumn *c = mColumnDict.find( col ); if ( c ) rowVector->at( col ) = c->preview( val, findFormat(col) ); else @@ -734,7 +734,7 @@ void KImportDialog::saveTemplate() if ( fileName.isEmpty() ) return; - if ( !fileName.tqcontains( ".desktop" ) ) + if ( !fileName.contains( ".desktop" ) ) fileName += ".desktop"; TQString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) ); diff --git a/libkdepim/kmailcompletion.cpp b/libkdepim/kmailcompletion.cpp index 98a3cb9ee..7e71ec78c 100644 --- a/libkdepim/kmailcompletion.cpp +++ b/libkdepim/kmailcompletion.cpp @@ -44,8 +44,8 @@ TQString KMailCompletion::makeCompletion( const TQString &string ) // this should be in postProcessMatch, but postProcessMatch is const and will not allow nextMatch if ( !match.isEmpty() ){ const TQString firstMatch( match ); - while ( match.tqfind( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) { - /* local email do not require @domain part, if match is an address we'll tqfind + while ( match.find( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) { + /* local email do not require @domain part, if match is an address we'll find * last+first in m_keyMap and we'll know that match is already a valid email. * * Distribution list do not have last+first entry, they will be in mailAddr @@ -53,7 +53,7 @@ TQString KMailCompletion::makeCompletion( const TQString &string ) const TQStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword bool isEmail = false; for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) - if ( (*sit).tqfind( "<" + match + ">" ) != -1 || (*sit) == match ) { + if ( (*sit).find( "<" + match + ">" ) != -1 || (*sit) == match ) { isEmail = true; break; } @@ -77,7 +77,7 @@ void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const Q_ASSERT( keyWords != 0 ); for ( TQStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) { TQStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword - if ( emailList.tqfind( email ) == emailList.end() ) //add email if not there + if ( emailList.find( email ) == emailList.end() ) //add email if not there emailList.append( email ); addItem( (*it),weight ); //inform KCompletion about keyword } diff --git a/libkdepim/kmailcompletion.h b/libkdepim/kmailcompletion.h index 254507c19..868e1b2b8 100644 --- a/libkdepim/kmailcompletion.h +++ b/libkdepim/kmailcompletion.h @@ -60,7 +60,7 @@ class KMailCompletion : public KCompletion * Items may be added with KCompletion::addItem, those will only be returned as match if they * are in one of these formats: * \li contains localpart@domain - * \li tqcontains + * \li contains * or if they have also been added with this function. */ void addItemWithKeys( const TQString& email, int weight, const TQStringList * keyWords); diff --git a/libkdepim/komposer/core/core.cpp b/libkdepim/komposer/core/core.cpp index bffae60ed..3618b88ee 100644 --- a/libkdepim/komposer/core/core.cpp +++ b/libkdepim/komposer/core/core.cpp @@ -158,7 +158,7 @@ Core::selectEditor( Komposer::Editor *editor ) TQPtrList *partList = const_cast*>( m_partManager->parts() ); - if ( partList->tqfind( part ) == -1 ) + if ( partList->find( part ) == -1 ) addPart( part ); m_partManager->setActivePart( part ); diff --git a/libkdepim/komposer/core/pluginmanager.cpp b/libkdepim/komposer/core/pluginmanager.cpp index 50ef26a96..30d52ffcd 100644 --- a/libkdepim/komposer/core/pluginmanager.cpp +++ b/libkdepim/komposer/core/pluginmanager.cpp @@ -305,7 +305,7 @@ PluginManager::loadPluginInternal( const TQString &pluginId ) return 0; } - if ( d->loadedPlugins.tqcontains( info ) ) + if ( d->loadedPlugins.contains( info ) ) return d->loadedPlugins[ info ]; int error = 0; @@ -408,7 +408,7 @@ PluginManager::plugin( const TQString &pluginId ) const if ( !info ) return 0; - if ( d->loadedPlugins.tqcontains( info ) ) + if ( d->loadedPlugins.contains( info ) ) return d->loadedPlugins[ info ]; else return 0; diff --git a/libkdepim/komposer/core/prefsmodule.cpp b/libkdepim/komposer/core/prefsmodule.cpp index 1c088e9e8..3b82f96d3 100644 --- a/libkdepim/komposer/core/prefsmodule.cpp +++ b/libkdepim/komposer/core/prefsmodule.cpp @@ -110,7 +110,7 @@ EditorSelection::readConfig() TQString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString(); m_editorsCombo->insertItem( name ); - if ( m_reference.tqcontains( name ) ) + if ( m_reference.contains( name ) ) m_editorsCombo->setCurrentItem( i ); } } diff --git a/libkdepim/komposer/plugins/default/defaulteditor.cpp b/libkdepim/komposer/plugins/default/defaulteditor.cpp index c75f63920..96458ae3d 100644 --- a/libkdepim/komposer/plugins/default/defaulteditor.cpp +++ b/libkdepim/komposer/plugins/default/defaulteditor.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -86,10 +86,10 @@ DefaultEditor::changeSignature( const TQString &sig ) { TQString text = m_textEdit->text(); - int sigStart = text.tqfindRev( "-- " ); + int sigStart = text.findRev( "-- " ); TQString sigText = TQString( "-- \n%1" ).tqarg( sig ); - text.tqreplace( sigStart, text.length(), sigText ); + text.replace( sigStart, text.length(), sigText ); } void diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp index 55a6a799f..730ed8f52 100644 --- a/libkdepim/kpimprefs.cpp +++ b/libkdepim/kpimprefs.cpp @@ -79,7 +79,7 @@ const TQString KPimPrefs::timezone() int len = readlink( "/etc/localtime", zonefilebuf, PATH_MAX ); if ( len > 0 && len < PATH_MAX ) { zone = TQString::fromLocal8Bit( zonefilebuf, len ); - zone = zone.mid( zone.tqfind( "zoneinfo/" ) + 9 ); + zone = zone.mid( zone.find( "zoneinfo/" ) + 9 ); kdDebug(5300) << "system timezone from /etc/localtime is " << zone << endl; } else { diff --git a/libkdepim/kpixmapregionselectorwidget.cpp b/libkdepim/kpixmapregionselectorwidget.cpp index a6d992f54..46e65524a 100644 --- a/libkdepim/kpixmapregionselectorwidget.cpp +++ b/libkdepim/kpixmapregionselectorwidget.cpp @@ -227,7 +227,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) }; TQCursor cursor; - if ( m_selectedRegion.tqcontains( mev->pos() ) + if ( m_selectedRegion.contains( mev->pos() ) && m_selectedRegion!=m_originalPixmap.rect() ) { m_state=Moving; diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp index bb2bdca79..38adc8fa3 100644 --- a/libkdepim/kprefsdialog.cpp +++ b/libkdepim/kprefsdialog.cpp @@ -768,7 +768,7 @@ void KPrefsDialog::autoCreate() TQWidget *page; TQGridLayout *tqlayout; int currentRow; - if ( !mGroupPages.tqcontains( group ) ) { + if ( !mGroupPages.contains( group ) ) { page = addPage( group ); tqlayout = new TQGridLayout( page ); mGroupPages.insert( group, page ); @@ -804,7 +804,7 @@ void KPrefsDialog::autoCreate() addWid( wid ); - mCurrentRows.tqreplace( group, ++currentRow ); + mCurrentRows.replace( group, ++currentRow ); } } diff --git a/libkdepim/kregexp3.cpp b/libkdepim/kregexp3.cpp index ca9725ba2..c4efa96f1 100644 --- a/libkdepim/kregexp3.cpp +++ b/libkdepim/kregexp3.cpp @@ -37,7 +37,7 @@ #include #endif -TQString KRegExp3::tqreplace( const TQString & str, +TQString KRegExp3::replace( const TQString & str, const TQString & replacementStr, int start, bool global ) { @@ -69,16 +69,16 @@ TQString KRegExp3::tqreplace( const TQString & str, if ( pos < 0 ) { literalStrs << replacementStr.mid( oldpos ) - .tqreplace( bbrx, "\\" ) - .tqreplace( brx, "" ); + .replace( bbrx, "\\" ) + .replace( brx, "" ); #ifdef DEBUG_KREGEXP3 kdDebug() << " No more matches. Last literal is \"" + literalStrs.last() + "\"" << endl; #endif break; } else { literalStrs << replacementStr.mid( oldpos, pos-oldpos ) - .tqreplace( bbrx, "\\" ) - .tqreplace( brx, "" ); + .replace( bbrx, "\\" ) + .replace( brx, "" ); #ifdef DEBUG_KREGEXP3 kdDebug() << TQString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl; kdDebug() << " Searching for corresponding digit(s):" << endl; diff --git a/libkdepim/kregexp3.h b/libkdepim/kregexp3.h index 64a874d3a..c58feb9d1 100644 --- a/libkdepim/kregexp3.h +++ b/libkdepim/kregexp3.h @@ -36,11 +36,11 @@ #include -/** @short A TQRegExp (TQt3.x) with a tqreplace() method. +/** @short A TQRegExp (TQt3.x) with a replace() method. This class is simply there to provide a namespace for some nice enhancements of the mighty TQRegExp (TQt3 version) regular - expression engine, namely the method tqreplace(), which can be + expression engine, namely the method replace(), which can be used to do search-and-replace like one is used to from perl or sed. It "simply" adds the ability to define a replacement string which @@ -105,7 +105,7 @@ public: Equivalent to the /g switch to perl's s/// operator. @return The modified string. */ - TQString tqreplace( const TQString & str, + TQString replace( const TQString & str, const TQString & replacementStr, int start=0, bool global=TRUE ); }; diff --git a/libkdepim/kscoring.cpp b/libkdepim/kscoring.cpp index 58595b933..cf02d88f4 100644 --- a/libkdepim/kscoring.cpp +++ b/libkdepim/kscoring.cpp @@ -47,19 +47,19 @@ static TQString toXml(const TQString& str) uint i = 0; while ( i < len ) { if (tmp[(int)i] == '<') { - tmp.tqreplace(i, 1, "<"); + tmp.replace(i, 1, "<"); len += 3; i += 4; } else if (tmp[(int)i] == '"') { - tmp.tqreplace(i, 1, """); + tmp.replace(i, 1, """); len += 5; i += 6; } else if (tmp[(int)i] == '&') { - tmp.tqreplace(i, 1, "&"); + tmp.replace(i, 1, "&"); len += 4; i += 5; } else if (tmp[(int)i] == '>') { - tmp.tqreplace(i, 1, ">"); + tmp.replace(i, 1, ">"); len += 3; i += 4; } else { @@ -91,7 +91,7 @@ NotifyDialog::NotifyDialog(TQWidget* p) void NotifyDialog::slotShowAgainToggled(bool flag) { - dict.tqreplace(msg,!flag); + dict.replace(msg,!flag); kdDebug(5100) << "note \"" << note << "\" will popup again: " << flag << endl; } @@ -101,7 +101,7 @@ void NotifyDialog::display(ScorableArticle& a, const TQString& s) if (!me) me = new NotifyDialog(); me->msg = s; - NotesMap::Iterator i = dict.tqfind(s); + NotesMap::Iterator i = dict.find(s); if (i == dict.end() || i.data()) { TQString msg = i18n("Article\n%1
%2
caused the following" " note to appear:
%3"). @@ -109,7 +109,7 @@ void NotifyDialog::display(ScorableArticle& a, const TQString& s) arg(a.subject()). arg(s); me->note->setText(msg); - if ( i == dict.end() ) i = dict.tqreplace(s,false); + if ( i == dict.end() ) i = dict.replace(s,false); me->adjustSize(); me->exec(); } @@ -348,10 +348,10 @@ NotifyCollection::~NotifyCollection() void NotifyCollection::addNote(const ScorableArticle& a, const TQString& note) { - article_list *l = notifyList.tqfind(note); + article_list *l = notifyList.find(note); if (!l) { notifyList.insert(note,new article_list); - l = notifyList.tqfind(note); + l = notifyList.find(note); } article_info i; i.from = a.from(); @@ -514,7 +514,7 @@ bool KScoringExpression::match(ScorableArticle& a) const res = (head.lower() == expr_str.lower()); break; case CONTAINS: - res = (head.lower().tqfind(expr_str.lower()) >= 0); + res = (head.lower().find(expr_str.lower()) >= 0); break; case MATCH: case MATCHCS: @@ -936,7 +936,7 @@ KScoringRule* KScoringManager::addRule(const ScorableArticle& a, TQString group, KScoringRule* KScoringManager::addRule(KScoringRule* expr) { - int i = allRules.tqfindRef(expr); + int i = allRules.findRef(expr); if (i == -1) { // only add a rule we don't know addRuleInternal(expr); @@ -965,7 +965,7 @@ void KScoringManager::addRuleInternal(KScoringRule *e) void KScoringManager::cancelNewRule(KScoringRule *r) { // if e was'nt previously added to the list of rules, we delete it - int i = allRules.tqfindRef(r); + int i = allRules.findRef(r); if (i == -1) { kdDebug(5100) << "deleting rule " << r->getName() << endl; deleteRule(r); @@ -1002,7 +1002,7 @@ void KScoringManager::setRuleName(KScoringRule *r, const TQString& s) void KScoringManager::deleteRule(KScoringRule *r) { - int i = allRules.tqfindRef(r); + int i = allRules.findRef(r); if (i != -1) { allRules.remove(); emit changedRules(); @@ -1019,8 +1019,8 @@ void KScoringManager::editRule(KScoringRule *e, TQWidget *w) void KScoringManager::moveRuleAbove( KScoringRule *above, KScoringRule *below ) { - int aindex = allRules.tqfindRef( above ); - int bindex = allRules.tqfindRef( below ); + int aindex = allRules.findRef( above ); + int bindex = allRules.findRef( below ); if ( aindex <= 0 || bindex < 0 ) return; if ( aindex < bindex ) @@ -1031,8 +1031,8 @@ void KScoringManager::moveRuleAbove( KScoringRule *above, KScoringRule *below ) void KScoringManager::moveRuleBelow( KScoringRule *below, KScoringRule *above ) { - int bindex = allRules.tqfindRef( below ); - int aindex = allRules.tqfindRef( above ); + int bindex = allRules.findRef( below ); + int aindex = allRules.findRef( above ); if ( bindex < 0 || bindex >= (int)allRules.count() - 1 || aindex < 0 ) return; if ( bindex < aindex ) diff --git a/libkdepim/ksubscription.cpp b/libkdepim/ksubscription.cpp index 512ef3453..f5aef4a4b 100644 --- a/libkdepim/ksubscription.cpp +++ b/libkdepim/ksubscription.cpp @@ -511,7 +511,7 @@ void KSubscription::filterChanged( TQListViewItem* item, const TQString & text ) continue; } if ( !text.isEmpty() && - gr->text(0).tqfind(text, 0, false) == -1) + gr->text(0).find(text, 0, false) == -1) { // searchfield gr->setVisible(false); diff --git a/libkdepim/kwidgetlister.cpp b/libkdepim/kwidgetlister.cpp index 98c6062be..bc9d89803 100644 --- a/libkdepim/kwidgetlister.cpp +++ b/libkdepim/kwidgetlister.cpp @@ -125,7 +125,7 @@ void KWidgetLister::addWidgetAtEnd(TQWidget *w) { if (!w) w = this->createWidget(this); - mLayout->insertWidget( mLayout->tqfindWidget( mButtonBox ), w ); + mLayout->insertWidget( mLayout->findWidget( mButtonBox ), w ); mWidgetList.append( w ); w->show(); enableControls(); diff --git a/libkdepim/kxface.cpp b/libkdepim/kxface.cpp index 6af87cef9..c8d11447f 100644 --- a/libkdepim/kxface.cpp +++ b/libkdepim/kxface.cpp @@ -94,8 +94,8 @@ TQString KXFace::fromImage( const TQImage &image ) buffer.open( IO_WriteOnly ); scaledImg.save( &buffer, "XBM" ); TQString xbm( ba ); - xbm.remove( 0, xbm.tqfind( "{" ) + 1 ); - xbm.truncate( xbm.tqfind( "}" ) ); + xbm.remove( 0, xbm.find( "{" ) + 1 ); + xbm.truncate( xbm.find( "}" ) ); xbm.remove( " " ); xbm.remove( "," ); xbm.remove( "0x" ); @@ -132,8 +132,8 @@ TQString KXFace::fromImage( const TQImage &image ) tmp[i-1] = t; } } - tmp.tqreplace( TQRegExp( "(\\w{12})" ), "\\1\n" ); - tmp.tqreplace( TQRegExp( "(\\w{4})" ), "0x\\1," ); + tmp.replace( TQRegExp( "(\\w{12})" ), "\\1\n" ); + tmp.replace( TQRegExp( "(\\w{4})" ), "0x\\1," ); len = tmp.length(); char *fbuf = (char *)malloc( len + 1 ); strncpy( fbuf, (const char *)tmp, len ); diff --git a/libkdepim/ldapclient.cpp b/libkdepim/ldapclient.cpp index 2f29b7633..a7dcfcd26 100644 --- a/libkdepim/ldapclient.cpp +++ b/libkdepim/ldapclient.cpp @@ -196,7 +196,7 @@ void LdapClient::finishCurrentObject() mCurrentObject.dn = mLdif.dn(); const TQString sClass( mCurrentObject.objectClass.lower() ); if( sClass == "groupofnames" || sClass == "kolabgroupofnames" ){ - LdapAttrMap::ConstIterator it = mCurrentObject.attrs.tqfind("mail"); + LdapAttrMap::ConstIterator it = mCurrentObject.attrs.find("mail"); if( it == mCurrentObject.attrs.end() ){ // No explicit mail address found so far? // Fine, then we use the address stored in the DN. @@ -423,11 +423,11 @@ void LdapSearch::startSearch( const TQString& txt ) cancelSearch(); - int pos = txt.tqfind( '\"' ); + int pos = txt.find( '\"' ); if( pos >= 0 ) { ++pos; - int pos2 = txt.tqfind( '\"', pos ); + int pos2 = txt.find( '\"', pos ); if( pos2 >= 0 ) mSearchText = txt.mid( pos , pos2 - pos ); else @@ -575,7 +575,7 @@ void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) // must use the correct SMTP server, by definition. // //mail = (*it1).client->base().simplifyWhiteSpace(); - //mail.tqreplace( ",dc=", ".", false ); + //mail.replace( ",dc=", ".", false ); //if( mail.startsWith("dc=", false) ) // mail.remove(0, 3); //mail.prepend( '@' ); diff --git a/libkdepim/linklocator.cpp b/libkdepim/linklocator.cpp index e0c4c0d24..399c5d3b3 100644 --- a/libkdepim/linklocator.cpp +++ b/libkdepim/linklocator.cpp @@ -92,14 +92,14 @@ TQString LinkLocator::getUrl() // handle cases like this: http://foobar.org/ int start = mPos; while(mPos < (int)mText.length() && mText[mPos] > ' ' && mText[mPos] != '"' && - TQString("<>()[]").tqfind(mText[mPos]) == -1) + TQString("<>()[]").find(mText[mPos]) == -1) { ++mPos; } /* some URLs really end with: # / & - _ */ const TQString allowedSpecialChars = TQString("#/&-_"); while(mPos > start && mText[mPos-1].isPunct() && - allowedSpecialChars.tqfind(mText[mPos-1]) == -1 ) + allowedSpecialChars.find(mText[mPos-1]) == -1 ) { --mPos; } @@ -128,7 +128,7 @@ bool LinkLocator::atUrl() const // the character directly before the URL must not be a letter, a number or // any other character allowed in a dot-atom (RFC 2822). if( ( mPos > 0 ) && ( mText[mPos-1].isLetterOrNumber() || - ( allowedSpecialChars.tqfind( mText[mPos-1] ) != -1 ) ) ) + ( allowedSpecialChars.find( mText[mPos-1] ) != -1 ) ) ) return false; TQChar ch = mText[mPos]; @@ -179,9 +179,9 @@ TQString LinkLocator::getEmailAddress() while ( start >= 0 && mText[start].tqunicode() < 128 && ( mText[start].isLetterOrNumber() || mText[start] == '@' || // allow @ to find invalid email addresses - allowedSpecialChars.tqfind( mText[start] ) != -1 ) ) { + allowedSpecialChars.find( mText[start] ) != -1 ) ) { if ( mText[start] == '@' ) - return TQString(); // local part tqcontains '@' -> no email address + return TQString(); // local part contains '@' -> no email address --start; } ++start; @@ -200,7 +200,7 @@ TQString LinkLocator::getEmailAddress() mText[end] == '.' || mText[end] == '-' ) ) { if ( mText[end] == '@' ) - return TQString(); // domain part tqcontains '@' -> no email address + return TQString(); // domain part contains '@' -> no email address if ( mText[end] == '.' ) dotPos = TQMIN( dotPos, end ); // remember index of first dot in domain ++end; @@ -305,7 +305,7 @@ TQString LinkLocator::convertToHtml(const TQString& plainText, int flags, else hyperlink = str; - str = str.tqreplace('&', "&"); + str = str.replace('&', "&"); result += "" + str + ""; x += locator.mPos - start; continue; @@ -314,12 +314,12 @@ TQString LinkLocator::convertToHtml(const TQString& plainText, int flags, if(!str.isEmpty()) { // len is the length of the local part - int len = str.tqfind('@'); + int len = str.find('@'); TQString localPart = str.left(len); // remove the local part from the result (as '&'s have been expanded to // & we have to take care of the 4 additional characters per '&') - result.truncate(result.length() - len - (localPart.tqcontains('&')*4)); + result.truncate(result.length() - len - (localPart.contains('&')*4)); x -= len; result += "" + str + ""; @@ -390,11 +390,11 @@ TQString LinkLocator::getEmoticon() return TQString(); const TQString smiley = mText.mid( mPos, smileyLen ); - if ( !s_smileyEmoticonNameMap->tqcontains( smiley ) ) + if ( !s_smileyEmoticonNameMap->contains( smiley ) ) return TQString(); // that's not a (known) smiley TQString htmlRep; - if ( s_smileyEmoticonHTMLCache->tqcontains( smiley ) ) { + if ( s_smileyEmoticonHTMLCache->contains( smiley ) ) { htmlRep = (*s_smileyEmoticonHTMLCache)[smiley]; } else { diff --git a/libkdepim/pluginloaderbase.cpp b/libkdepim/pluginloaderbase.cpp index 9be0ffd05..40a4beb2f 100644 --- a/libkdepim/pluginloaderbase.cpp +++ b/libkdepim/pluginloaderbase.cpp @@ -58,7 +58,7 @@ namespace KPIM { } const PluginMetaData * PluginLoaderBase::infoForName( const TQString & type ) const { - return mPluginMap.tqcontains( type ) ? &(mPluginMap[type]) : 0 ; + return mPluginMap.contains( type ) ? &(mPluginMap[type]) : 0 ; } @@ -114,7 +114,7 @@ namespace KPIM { void * PluginLoaderBase::mainFunc( const TQString & type, const char * mf_name ) const { - if ( type.isEmpty() || !mPluginMap.tqcontains( type ) ) + if ( type.isEmpty() || !mPluginMap.contains( type ) ) return 0; const TQString libName = mPluginMap[ type ].library; diff --git a/libkdepim/progressdialog.cpp b/libkdepim/progressdialog.cpp index 580830dec..e12a1b758 100644 --- a/libkdepim/progressdialog.cpp +++ b/libkdepim/progressdialog.cpp @@ -309,7 +309,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) { TransactionItem *tqparent = 0; if ( item->tqparent() ) { - if ( mTransactionsToListviewItems.tqcontains( item->tqparent() ) ) { + if ( mTransactionsToListviewItems.contains( item->tqparent() ) ) { tqparent = mTransactionsToListviewItems[ item->tqparent() ]; tqparent->addSubTransaction( item ); } @@ -317,7 +317,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) const bool first = mTransactionsToListviewItems.empty(); TransactionItem *ti = mScrollView->addTransactionItem( item, first ); if ( ti ) - mTransactionsToListviewItems.tqreplace( item, ti ); + mTransactionsToListviewItems.replace( item, ti ); if ( first && mWasLastShown ) TQTimer::singleShot( 1000, this, TQT_SLOT( slotShow() ) ); @@ -326,7 +326,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) void ProgressDialog::slotTransactionCompleted( ProgressItem *item ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; mTransactionsToListviewItems.remove( item ); ti->setItemComplete(); @@ -347,7 +347,7 @@ void ProgressDialog::slotTransactionCanceled( ProgressItem* ) void ProgressDialog::slotTransactionProgress( ProgressItem *item, unsigned int progress ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setProgress( progress ); } @@ -356,7 +356,7 @@ void ProgressDialog::slotTransactionProgress( ProgressItem *item, void ProgressDialog::slotTransactiontqStatus( ProgressItem *item, const TQString& status ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setqStatus( status ); } @@ -365,7 +365,7 @@ void ProgressDialog::slotTransactiontqStatus( ProgressItem *item, void ProgressDialog::slotTransactionLabel( ProgressItem *item, const TQString& label ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setLabel( label ); } @@ -375,7 +375,7 @@ void ProgressDialog::slotTransactionLabel( ProgressItem *item, void ProgressDialog::slotTransactionUsesCrypto( ProgressItem *item, bool value ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setCrypto( value ); } @@ -383,7 +383,7 @@ void ProgressDialog::slotTransactionUsesCrypto( ProgressItem *item, void ProgressDialog::slotTransactionUsesBusyIndicator( KPIM::ProgressItem *item, bool value ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; if ( value ) ti->setTotalSteps( 0 ); diff --git a/libkdepim/progressmanager.cpp b/libkdepim/progressmanager.cpp index de305212d..9dd80c9dc 100644 --- a/libkdepim/progressmanager.cpp +++ b/libkdepim/progressmanager.cpp @@ -66,7 +66,7 @@ void ProgressItem::setComplete() void ProgressItem::addChild( ProgressItem *kiddo ) { - mChildren.tqreplace( kiddo, true ); + mChildren.replace( kiddo, true ); } void ProgressItem::removeChild( ProgressItem *kiddo ) diff --git a/libkdepim/qutf7codec.cpp b/libkdepim/qutf7codec.cpp index 630dcaa25..db6589cd9 100644 --- a/libkdepim/qutf7codec.cpp +++ b/libkdepim/qutf7codec.cpp @@ -183,7 +183,7 @@ public: qWarning("TQUtf7Decoder: 8bit char found in input. " "Parser has been re-initialized!"); resetParser(); - result += TQChar::tqreplacement; + result += TQChar::replacement; continue; } diff --git a/libkdepim/spellingfilter.cpp b/libkdepim/spellingfilter.cpp index a08610983..cc94968d4 100644 --- a/libkdepim/spellingfilter.cpp +++ b/libkdepim/spellingfilter.cpp @@ -89,7 +89,7 @@ void SpellingFilter::TextCensor::censorQuotations(const TQString& quotePrefix) int len = mPos - start; TQString spaces; spaces.fill(' ', len); - mText.tqreplace(start, len, spaces); + mText.replace(start, len, spaces); //kdDebug(5006) << "censored quotation [" // << start << ", " << mPos << ")" << endl; @@ -116,7 +116,7 @@ void SpellingFilter::TextCensor::censorUrls() // Replace url with spaces url.fill(' '); - mText.tqreplace(start, url.length(), url); + mText.replace(start, url.length(), url); //kdDebug(5006) << "censored url [" // << start << ", " << mPos << ")" << endl; @@ -141,7 +141,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses() // Replace address with spaces address.fill(' '); - mText.tqreplace(start, address.length(), address); + mText.replace(start, address.length(), address); //kdDebug(5006) << "censored addr [" // << start << ", "<< mPos << ")" << endl; @@ -156,13 +156,13 @@ void SpellingFilter::TextCensor::censorString(const TQString& s) while(mPos != -1) { // Find start of string - mPos = mText.tqfind(s, mPos); + mPos = mText.find(s, mPos); if(mPos != -1) { // Replace string with spaces TQString spaces; spaces.fill(' ', s.length()); - mText.tqreplace(mPos, s.length(), spaces); + mText.replace(mPos, s.length(), spaces); mPos += s.length(); //kdDebug(5006) << "censored string [" @@ -187,7 +187,7 @@ bool SpellingFilter::TextCensor::atLineStart() const void SpellingFilter::TextCensor::skipLine() { - mPos = mText.tqfind('\n', mPos); + mPos = mText.find('\n', mPos); if(mPos == -1) mPos = static_cast(mText.length()); else diff --git a/libkdepim/tests/test_kregexp.cpp b/libkdepim/tests/test_kregexp.cpp index 0644bbba5..511687d07 100644 --- a/libkdepim/tests/test_kregexp.cpp +++ b/libkdepim/tests/test_kregexp.cpp @@ -9,7 +9,7 @@ main() // test for http://bugs.kde.org/show_bug.cgi?id=54886 KRegExp3 reg("^"); - TQString res = reg.tqreplace(TQString::tqfromLatin1("Fun stuff"), + TQString res = reg.replace(TQString::tqfromLatin1("Fun stuff"), TQString::tqfromLatin1("[fun] ")); kdDebug() << res << endl; diff --git a/libkholidays/kholidays.cpp b/libkholidays/kholidays.cpp index 6af3998fb..3b4ec63a2 100644 --- a/libkholidays/kholidays.cpp +++ b/libkholidays/kholidays.cpp @@ -47,7 +47,7 @@ TQStringList KHolidays::locations() TQStringList::ConstIterator it; for ( it = files.begin(); it != files.end(); ++it ) - locs.append( (*it).mid((*it).tqfindRev('_') + 1) ); + locs.append( (*it).mid((*it).findRev('_') + 1) ); return locs; } diff --git a/libkholidays/parseholiday.c b/libkholidays/parseholiday.c index 1d5b84cf7..c215515e5 100644 --- a/libkholidays/parseholiday.c +++ b/libkholidays/parseholiday.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, you may create a larger work that tqcontains +/* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof diff --git a/libkholidays/parseholiday.h b/libkholidays/parseholiday.h index 3802c4d5a..709aa5671 100644 --- a/libkholidays/parseholiday.h +++ b/libkholidays/parseholiday.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, you may create a larger work that tqcontains +/* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp index fc3af97b0..eb8deb8a2 100644 --- a/libkmime/kmime_content.cpp +++ b/libkmime/kmime_content.cpp @@ -85,7 +85,7 @@ void Content::setContent(TQStrList *l) void Content::setContent(const TQCString &s) { - int pos=s.tqfind("\n\n", 0); + int pos=s.find("\n\n", 0); if(pos>-1) { h_ead=s.left(++pos); //header *must* end with "\n" !! b_ody=s.mid(pos+1, s.length()-pos-1); @@ -313,9 +313,9 @@ TQCString Content::encodedContent(bool useCrLf) // add proper mime headers... if (convertNonMimeBinaries) { - h_ead.tqreplace(TQRegExp("MIME-Version: .*\\n"),""); - h_ead.tqreplace(TQRegExp("Content-Type: .*\\n"),""); - h_ead.tqreplace(TQRegExp("Content-Transfer-Encoding: .*\\n"),""); + h_ead.replace(TQRegExp("MIME-Version: .*\\n"),""); + h_ead.replace(TQRegExp("Content-Type: .*\\n"),""); + h_ead.replace(TQRegExp("Content-Transfer-Encoding: .*\\n"),""); h_ead+="MIME-Version: 1.0\n"; h_ead+=contentType(true)->as7BitString()+"\n"; h_ead+=contentTransferEncoding(true)->as7BitString()+"\n"; @@ -537,7 +537,7 @@ void Content::addContent(Content *c, bool prepend) for(Headers::Base *h=srcHdrs.first(); h; h=srcHdrs.next()) { if(h->isMimeHeader()) { //remove from this content - idx=h_eaders->tqfindRef(h); + idx=h_eaders->findRef(h); h_eaders->take(idx); //append to new content main->h_eaders->append(h); @@ -582,7 +582,7 @@ void Content::removeContent(Content *c, bool del) if(del) c_ontents->removeRef(c); else { - idx=c_ontents->tqfindRef(c); + idx=c_ontents->findRef(c); c_ontents->take(idx); } @@ -604,7 +604,7 @@ void Content::removeContent(Content *c, bool del) if(h->isMimeHeader()) { removeHeader(h->type()); //remove the old header first h_eaders->append(h); //now append the new one - idx=main->h_eaders->tqfindRef(h); + idx=main->h_eaders->findRef(h); main->h_eaders->take(idx); //remove from the old content kdDebug(5003) << "Content::removeContent(Content *c, bool del) : mime-header moved: " << h->as7BitString() << endl; @@ -652,7 +652,7 @@ void Content::toStream(TQTextStream &ts, bool scrambleFromLines) TQCString ret=encodedContent(false); if (scrambleFromLines) - ret.tqreplace(TQRegExp("\\n\\nFrom "), "\n\n>From "); + ret.replace(TQRegExp("\\n\\nFrom "), "\n\n>From "); ts << ret; } @@ -664,14 +664,14 @@ Headers::Generic* Content::getNextHeader(TQCString &head) bool folded(false); Headers::Generic *header=0; - pos1 = head.tqfind(": "); + pos1 = head.find(": "); if (pos1>-1) { //there is another header pos2=pos1+=2; //skip the name if (head[pos2]!='\n') { // check if the header is not empty while(1) { - pos2=head.tqfind("\n", pos2+1); + pos2=head.find("\n", pos2+1); if(pos2==-1 || pos2==len || ( head[pos2+1]!=' ' && head[pos2+1]!='\t') ) //break if we reach the end of the string, honor folded lines break; else @@ -684,7 +684,7 @@ Headers::Generic* Content::getNextHeader(TQCString &head) if (!folded) header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1)); else - header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).tqreplace(TQRegExp("\\s*\\n\\s*")," ")); + header = new Headers::Generic(head.left(pos1-2), this, head.mid(pos1, pos2-pos1).replace(TQRegExp("\\s*\\n\\s*")," ")); head.remove(0,pos2+1); } @@ -816,8 +816,8 @@ int Content::lineCount() { int ret=0; if(type()==ATmimeContent) - ret+=h_ead.tqcontains('\n'); - ret+=b_ody.tqcontains('\n'); + ret+=h_ead.contains('\n'); + ret+=b_ody.contains('\n'); if(c_ontents && !c_ontents->isEmpty()) for(Content *c=c_ontents->first(); c; c=c_ontents->next()) diff --git a/libkmime/kmime_content.h b/libkmime/kmime_content.h index 692f3afe4..1d2aac2d3 100644 --- a/libkmime/kmime_content.h +++ b/libkmime/kmime_content.h @@ -110,7 +110,7 @@ class KDE_EXPORT Content : public Base { void changeEncoding(Headers::contentEncoding e); //saves the encoded content to the given textstream - // scrambleFromLines: tqreplace "\nFrom " with "\n>From ", this is + // scrambleFromLines: replace "\nFrom " with "\n>From ", this is // needed to avoid problem with mbox-files void toStream(TQTextStream &ts, bool scrambleFromLines=false); diff --git a/libkmime/kmime_headers.cpp b/libkmime/kmime_headers.cpp index 40a016343..85d4c4049 100644 --- a/libkmime/kmime_headers.cpp +++ b/libkmime/kmime_headers.cpp @@ -582,9 +582,9 @@ void AddressField::from7BitString(const TQCString &s) TQCString n; //so what do we have here ? - if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) - else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe - else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com + if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) + else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe + else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com else { //broken From header => just decode it n_ame=decodeRFC2047String(s, &e_ncCS, defaultCS(), forceCS()); return; @@ -598,11 +598,11 @@ void AddressField::from7BitString(const TQCString &s) case 1: pos1=0; - pos2=s.tqfind('<'); + pos2=s.find('<'); if(pos2!=-1) { n=s.mid(pos1, pos2-pos1).stripWhiteSpace(); pos1=pos2+1; - pos2=s.tqfind('>', pos1); + pos2=s.find('>', pos1); if(pos2!=-1) e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace(); } @@ -611,11 +611,11 @@ void AddressField::from7BitString(const TQCString &s) case 2: pos1=0; - pos2=s.tqfind('('); + pos2=s.find('('); if(pos2!=-1) { e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace(); pos1=pos2+1; - pos2=s.tqfind(')', pos1); + pos2=s.find(')', pos1); if(pos2!=-1) n=s.mid(pos1, pos2-pos1).stripWhiteSpace(); } @@ -664,9 +664,9 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs) e_ncCS=cachedCharset(cs); //so what do we have here ? - if(s.tqfind( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) - else if(s.tqfind( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe - else if(s.tqfind( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com + if(s.find( TQRegExp("*@*(*)", false, true) )!=-1) type=2; // From: foo@bar.com (John Doe) + else if(s.find( TQRegExp("*<*@*>", false, true) )!=-1) type=1; // From: John Doe + else if(s.find( TQRegExp("*@*", false, true) )!=-1) type=0; // From: foo@bar.com else { //broken From header => just copy it n_ame=s; return; @@ -680,11 +680,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs) case 1: pos1=0; - pos2=s.tqfind('<'); + pos2=s.find('<'); if(pos2!=-1) { n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace(); pos1=pos2+1; - pos2=s.tqfind('>', pos1); + pos2=s.find('>', pos1); if(pos2!=-1) e_mail=s.mid(pos1, pos2-pos1).latin1(); } @@ -693,11 +693,11 @@ void AddressField::fromUnicodeString(const TQString &s, const TQCString &cs) case 2: pos1=0; - pos2=s.tqfind('('); + pos2=s.find('('); if(pos2!=-1) { e_mail=s.mid(pos1, pos2-pos1).stripWhiteSpace().latin1(); pos1=pos2+1; - pos2=s.tqfind(')', pos1); + pos2=s.find(')', pos1); if(pos2!=-1) n_ame=s.mid(pos1, pos2-pos1).stripWhiteSpace(); } @@ -978,7 +978,7 @@ TQCString Newsgroups::firstGroup() { int pos=0; if(!g_roups.isEmpty()) { - pos=g_roups.tqfind(','); + pos=g_roups.find(','); if(pos==-1) return g_roups; else @@ -1107,10 +1107,10 @@ TQCString References::next() TQCString ret; if(p_os!=0) { - pos2=r_ef.tqfindRev('>', p_os); + pos2=r_ef.findRev('>', p_os); p_os=0; if(pos2!=-1) { - pos1=r_ef.tqfindRev('<', pos2); + pos1=r_ef.findRev('<', pos2); if(pos1!=-1) { ret=r_ef.mid(pos1, pos2-pos1+1); p_os=pos1; @@ -1129,12 +1129,12 @@ TQCString References::at(unsigned int i) while(pos1!=-1 && cnt < i+1) { pos2=pos1-1; - pos1=r_ef.tqfindRev('<', pos2); + pos1=r_ef.findRev('<', pos2); cnt++; } if(pos1!=-1) { - pos2=r_ef.tqfind('>', pos1); + pos2=r_ef.find('>', pos1); if(pos2!=-1) ret=r_ef.mid(pos1, pos2-pos1+1); } @@ -1154,7 +1154,7 @@ void References::append(const TQCString &s) // remove bogus references TQStringList::Iterator it = lst.begin(); while (it != lst.end()) { - if (-1==(*it).tqfind(exp)) + if (-1==(*it).find(exp)) it = lst.remove(it); else it++; @@ -1233,7 +1233,7 @@ TQString UserAgent::asUnicodeString() void ContentType::from7BitString(const TQCString &s) { - int pos=s.tqfind(';'); + int pos=s.find(';'); if(pos==-1) m_imeType=s.simplifyWhiteSpace(); @@ -1274,7 +1274,7 @@ TQString ContentType::asUnicodeString() TQCString ContentType::mediaType() { - int pos=m_imeType.tqfind('/'); + int pos=m_imeType.find('/'); if(pos==-1) return m_imeType; else @@ -1284,7 +1284,7 @@ TQCString ContentType::mediaType() TQCString ContentType::subType() { - int pos=m_imeType.tqfind('/'); + int pos=m_imeType.find('/'); if(pos==-1) return TQCString(); else @@ -1453,9 +1453,9 @@ TQCString ContentType::getParameter(const char *name) { TQCString ret; int pos1=0, pos2=0; - pos1=p_arams.tqfind(name, 0, false); + pos1=p_arams.find(name, 0, false); if(pos1!=-1) { - if( (pos2=p_arams.tqfind(';', pos1))==-1 ) + if( (pos2=p_arams.find(';', pos1))==-1 ) pos2=p_arams.length(); pos1+=strlen(name)+1; ret=p_arams.mid(pos1, pos2-pos1); @@ -1475,12 +1475,12 @@ void ContentType::setParameter(const TQCString &name, const TQCString &value, bo else param=name+"="+value; - pos1=p_arams.tqfind(name.data(), 0, false); + pos1=p_arams.find(name.data(), 0, false); if(pos1==-1) { p_arams+="; "+param; } else { - pos2=p_arams.tqfind(';', pos1); + pos2=p_arams.find(';', pos1); if(pos2==-1) pos2=p_arams.length(); p_arams.remove(pos1, pos2-pos1); @@ -1559,7 +1559,7 @@ void CDisposition::from7BitString(const TQCString &s) d_isp=CDattachment; else d_isp=CDinline; - int pos=s.tqfind("filename=", 0, false); + int pos=s.find("filename=", 0, false); TQCString fn; if(pos>-1) { pos+=9; @@ -1602,7 +1602,7 @@ void CDisposition::fromUnicodeString(const TQString &s, const TQCString &cs) d_isp=CDattachment; else d_isp=CDinline; - int pos=s.tqfind("filename=", 0, false); + int pos=s.find("filename=", 0, false); if(pos>-1) { pos+=9; f_ilename=s.mid(pos, s.length()-pos); diff --git a/libkmime/kmime_headers.h b/libkmime/kmime_headers.h index 40ae18b8a..69f139a57 100644 --- a/libkmime/kmime_headers.h +++ b/libkmime/kmime_headers.h @@ -605,7 +605,7 @@ class KDE_EXPORT Subject : public Generics::GUnstructured { virtual const char* type() { return "Subject"; } bool isReply() { - return ( asUnicodeString().tqfind( TQString("Re:"), 0, false ) == 0 ); + return ( asUnicodeString().find( TQString("Re:"), 0, false ) == 0 ); } }; @@ -651,7 +651,7 @@ class KDE_EXPORT Control : public Base { virtual bool isEmpty() { return (c_trlMsg.isEmpty()); } virtual const char* type() { return "Control"; } - bool isCancel() { return (c_trlMsg.tqfind("cancel", 0, false)!=-1); } + bool isCancel() { return (c_trlMsg.find("cancel", 0, false)!=-1); } protected: TQCString c_trlMsg; @@ -708,7 +708,7 @@ class KDE_EXPORT Newsgroups : public Base { virtual const char* type() { return "Newsgroups"; } TQCString firstGroup(); - bool isCrossposted() { return ( g_roups.tqfind(',')>-1 ); } + bool isCrossposted() { return ( g_roups.find(',')>-1 ); } TQStringList getGroups(); protected: diff --git a/libkmime/kmime_mdn.cpp b/libkmime/kmime_mdn.cpp index 9d654bc78..bba37023c 100644 --- a/libkmime/kmime_mdn.cpp +++ b/libkmime/kmime_mdn.cpp @@ -240,9 +240,9 @@ namespace MDN { // headers that are only present for certain disposition {types,modifiers}: if ( d == Failed ) result += "Failure: " + encodeRFC2047String( spec, "utf-8" ) + "\n"; - else if ( m.tqcontains( Error ) ) + else if ( m.contains( Error ) ) result += "Error: " + encodeRFC2047String( spec, "utf-8" ) + "\n"; - else if ( m.tqcontains( Warning ) ) + else if ( m.contains( Warning ) ) result += "Warning: " + encodeRFC2047String( spec, "utf-8" ) + "\n"; return result; diff --git a/libkmime/kmime_message.cpp b/libkmime/kmime_message.cpp index a7ce3ca8a..0d516ecc7 100644 --- a/libkmime/kmime_message.cpp +++ b/libkmime/kmime_message.cpp @@ -96,7 +96,7 @@ void Message::assemble() newHead+=contentTransferEncoding()->as7BitString()+"\n"; //X-Headers - int pos=h_ead.tqfind("\nX-"); + int pos=h_ead.find("\nX-"); if(pos>-1) //we already have some x-headers => "recycle" them newHead+=h_ead.mid(pos+1, h_ead.length()-pos-1); else if(h_eaders && !h_eaders->isEmpty()) { diff --git a/libkmime/kmime_newsarticle.cpp b/libkmime/kmime_newsarticle.cpp index 8989f6a07..1b16ad71f 100644 --- a/libkmime/kmime_newsarticle.cpp +++ b/libkmime/kmime_newsarticle.cpp @@ -104,7 +104,7 @@ void NewsArticle::assemble() newHead+=contentTransferEncoding()->as7BitString()+"\n"; //X-Headers - int pos=h_ead.tqfind("\nX-"); + int pos=h_ead.find("\nX-"); if(pos>-1) //we already have some x-headers => "recycle" them newHead+=h_ead.mid(pos+1, h_ead.length()-pos); else if(h_eaders && !h_eaders->isEmpty()) { diff --git a/libkmime/kmime_parsers.cpp b/libkmime/kmime_parsers.cpp index a7f758bf0..bd07c2375 100644 --- a/libkmime/kmime_parsers.cpp +++ b/libkmime/kmime_parsers.cpp @@ -39,7 +39,7 @@ bool MultiPart::parse() //find the first valid boundary while(1) { - if( (pos1=s_rc.tqfind(b.data(), pos1))==-1 || pos1==0 || s_rc[pos1-1]=='\n' ) //valid boundary found or no boundary at all + if( (pos1=s_rc.find(b.data(), pos1))==-1 || pos1==0 || s_rc[pos1-1]=='\n' ) //valid boundary found or no boundary at all break; pos1+=blen; //boundary found but not valid => skip it; } @@ -56,11 +56,11 @@ bool MultiPart::parse() while(pos1>-1 && pos2>-1) { //skip the rest of the line for the first boundary - the message-part starts here - if( (pos1=s_rc.tqfind('\n', pos1))>-1 ) { //now search the next linebreak + if( (pos1=s_rc.find('\n', pos1))>-1 ) { //now search the next linebreak //now find the next valid boundary pos2=++pos1; //pos1 and pos2 point now to the beginning of the next line after the boundary while(1) { - if( (pos2=s_rc.tqfind(b.data(), pos2))==-1 || s_rc[pos2-1]=='\n' ) //valid boundary or no more boundaries found + if( (pos2=s_rc.find(b.data(), pos2))==-1 || s_rc[pos2-1]=='\n' ) //valid boundary or no more boundaries found break; pos2+=blen; //boundary is invalid => skip it; } @@ -77,7 +77,7 @@ bool MultiPart::parse() pos2+=blen; //pos2 points now to the first charakter after the boundary if(s_rc[pos2]=='-' && s_rc[pos2+1]=='-') { //end-boundary pos1=pos2+2; //pos1 points now to the character directly after the end-boundary - if( (pos1=s_rc.tqfind('\n', pos1))>-1 ) //skipt the rest of this line + if( (pos1=s_rc.find('\n', pos1))>-1 ) //skipt the rest of this line e_pilouge=s_rc.mid(pos1+1, s_rc.length()-pos1-1); //everything after the end-boundary is considered as the epilouge pos1=-1; pos2=-1; //break @@ -108,7 +108,7 @@ TQCString NonMimeParser::guessMimeType(const TQCString& fileName) int pos; if(!fileName.isEmpty()) { - pos=fileName.tqfindRev('.'); + pos=fileName.findRev('.'); if(pos++ != -1) { tmp=fileName.mid(pos, fileName.length()-pos).upper(); if(tmp=="JPG" || tmp=="JPEG") mimeType="image/jpeg"; @@ -152,9 +152,9 @@ bool UUEncoded::parse() bool containsBegin=false, containsEnd=false; TQCString tmp,fileName; - if( (beginPos=s_rc.tqfind(TQRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) { + if( (beginPos=s_rc.find(TQRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) { containsBegin=true; - uuStart=s_rc.tqfind('\n', beginPos); + uuStart=s_rc.find('\n', beginPos); if(uuStart==-1) {//no more line breaks found, we give up success = false; break; @@ -163,7 +163,7 @@ bool UUEncoded::parse() } else beginPos=currentPos; - if ( (endPos=s_rc.tqfind("\nend",(uuStart>0)? uuStart-1:0))==-1 ) + if ( (endPos=s_rc.find("\nend",(uuStart>0)? uuStart-1:0))==-1 ) endPos=s_rc.length(); //no end found else containsEnd=true; @@ -194,7 +194,7 @@ bool UUEncoded::parse() len=rx.matchedLength(); if(pos!=-1) { tmp=s_ubject.mid(pos, len); - pos=tmp.tqfind('/'); + pos=tmp.find('/'); p_artNr=tmp.left(pos).toInt(); t_otalNr=tmp.right(tmp.length()-pos-1).toInt(); } else { @@ -216,7 +216,7 @@ bool UUEncoded::parse() m_imeTypes.append(guessMimeType(fileName)); firstIteration=false; - int next = s_rc.tqfind('\n', endPos+1); + int next = s_rc.find('\n', endPos+1); if(next==-1) { //no more line breaks found, we give up success = false; break; @@ -249,19 +249,19 @@ bool YENCEncoded::yencMeta(TQCString& src, const TQCString& name, int* value) bool found = false; TQCString sought=name + "="; - int iPos=src.tqfind( sought.data() ); + int iPos=src.find( sought.data() ); if (iPos>-1) { - int pos1=src.tqfind(' ', iPos); - int pos2=src.tqfind('\r', iPos); - int pos3=src.tqfind('\t', iPos); - int pos4=src.tqfind('\n', iPos); + int pos1=src.find(' ', iPos); + int pos2=src.find('\r', iPos); + int pos3=src.find('\t', iPos); + int pos4=src.find('\n', iPos); if (pos2>=0 && (pos1<0 || pos1>pos2)) pos1=pos2; if (pos3>=0 && (pos1<0 || pos1>pos3)) pos1=pos3; if (pos4>=0 && (pos1<0 || pos1>pos4)) pos1=pos4; - iPos=src.tqfindRev( '=', pos1)+1; + iPos=src.findRev( '=', pos1)+1; if (iPos='0' && c<='9') { @@ -284,16 +284,16 @@ bool YENCEncoded::parse() bool containsPart=false; TQCString fileName,mimeType; - if ((beginPos=s_rc.tqfind("=ybegin ", currentPos))>-1 && ( beginPos==0 || s_rc.at( beginPos-1)=='\n') ) { - yencStart=s_rc.tqfind( '\n', beginPos); + if ((beginPos=s_rc.find("=ybegin ", currentPos))>-1 && ( beginPos==0 || s_rc.at( beginPos-1)=='\n') ) { + yencStart=s_rc.find( '\n', beginPos); if (yencStart==-1) { // no more line breaks found, give up success = false; break; } else { yencStart++; - if (s_rc.tqfind("=ypart", yencStart)==yencStart) { + if (s_rc.find("=ypart", yencStart)==yencStart) { containsPart=true; - yencStart=s_rc.tqfind( '\n', yencStart); + yencStart=s_rc.find( '\n', yencStart); if ( yencStart== -1) { success=false; break; @@ -305,14 +305,14 @@ bool YENCEncoded::parse() // Filenames can contain any embedded chars until end of line TQCString meta=s_rc.mid(beginPos, yencStart-beginPos); - int namePos=meta.tqfind("name="); + int namePos=meta.find("name="); if (namePos== -1) { success=false; break; } - int eolPos=meta.tqfind('\r', namePos); + int eolPos=meta.find('\r', namePos); if (eolPos== -1) - eolPos=meta.tqfind('\n', namePos); + eolPos=meta.find('\n', namePos); if (eolPos== -1) { success=false; break; @@ -424,7 +424,7 @@ bool YENCEncoded::parse() } // pos now points to =yend; get end data - eolPos=s_rc.tqfind('\n', pos); + eolPos=s_rc.find('\n', pos); if (eolPos== -1) { success=false; diff --git a/libkmime/kmime_util.cpp b/libkmime/kmime_util.cpp index 6fea9fc84..624e0dae3 100644 --- a/libkmime/kmime_util.cpp +++ b/libkmime/kmime_util.cpp @@ -48,7 +48,7 @@ TQStrIList l_anguageCache; const char* cachedCharset(const TQCString &name) { - int idx=c_harsetCache.tqfind(name.data()); + int idx=c_harsetCache.find(name.data()); if(idx>-1) return c_harsetCache.at(idx); @@ -59,7 +59,7 @@ const char* cachedCharset(const TQCString &name) const char* cachedLanguage(const TQCString &name) { - int idx=l_anguageCache.tqfind(name.data()); + int idx=l_anguageCache.find(name.data()); if(idx>-1) return l_anguageCache.at(idx); @@ -134,7 +134,7 @@ TQString decodeRFC2047String(const TQCString &src, const char **usedCS, const int maxLen=400; int i; - if(src.tqfind("=?") < 0) + if(src.find("=?") < 0) result = src.copy(); else { result.truncate(src.length()); @@ -262,7 +262,7 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset, codec=KGlobal::charsets()->codecForName(usedCS, ok); } - if (usedCS.tqfind("8859-")>=0) // use "B"-Encoding for non iso-8859-x charsets + if (usedCS.find("8859-")>=0) // use "B"-Encoding for non iso-8859-x charsets useTQEncoding=true; encoded8Bit=codec->fromUnicode(src); @@ -377,7 +377,7 @@ TQCString extractHeader(const TQCString &src, const char *name) pos1 = 0; } else { n.prepend("\n"); - pos1 = src.tqfind(n.data(),0,false); + pos1 = src.find(n.data(),0,false); } if (pos1>-1) { //there is a header with the given name @@ -389,7 +389,7 @@ TQCString extractHeader(const TQCString &src, const char *name) if (src[pos2]!='\n') { // check if the header is not empty while(1) { - pos2=src.tqfind("\n", pos2+1); + pos2=src.find("\n", pos2+1); if(pos2==-1 || pos2==len || ( src[pos2+1]!=' ' && src[pos2+1]!='\t') ) //break if we reach the end of the string, honor folded lines break; else @@ -402,7 +402,7 @@ TQCString extractHeader(const TQCString &src, const char *name) if (!folded) return src.mid(pos1, pos2-pos1); else - return (src.mid(pos1, pos2-pos1).tqreplace(TQRegExp("\\s*\\n\\s*")," ")); + return (src.mid(pos1, pos2-pos1).replace(TQRegExp("\\s*\\n\\s*")," ")); } else { return TQCString(0); //header not found @@ -413,7 +413,7 @@ TQCString extractHeader(const TQCString &src, const char *name) TQCString CRLFtoLF(const TQCString &s) { TQCString ret=s.copy(); - ret.tqreplace(TQRegExp("\\r\\n"), "\n"); + ret.replace(TQRegExp("\\r\\n"), "\n"); return ret; } @@ -421,7 +421,7 @@ TQCString CRLFtoLF(const TQCString &s) TQCString CRLFtoLF(const char *s) { TQCString ret=s; - ret.tqreplace(TQRegExp("\\r\\n"), "\n"); + ret.replace(TQRegExp("\\r\\n"), "\n"); return ret; } @@ -429,7 +429,7 @@ TQCString CRLFtoLF(const char *s) TQCString LFtoCRLF(const TQCString &s) { TQCString ret=s.copy(); - ret.tqreplace(TQRegExp("\\n"), "\r\n"); + ret.replace(TQRegExp("\\n"), "\r\n"); return ret; } @@ -559,13 +559,13 @@ DateFormatter::custom(time_t t) const if ( mCustomFormat.isEmpty() ) return TQString(); - int z = mCustomFormat.tqfind("Z"); + int z = mCustomFormat.find("Z"); TQDateTime d; TQString ret = mCustomFormat; d.setTime_t(t); if ( z != -1 ) { - ret.tqreplace(z,1,zone(t)); + ret.replace(z,1,zone(t)); } ret = d.toString(ret); diff --git a/libkmime/kqcstringsplitter.cpp b/libkmime/kqcstringsplitter.cpp index d406691c3..b97ddb979 100644 --- a/libkmime/kqcstringsplitter.cpp +++ b/libkmime/kqcstringsplitter.cpp @@ -52,7 +52,7 @@ bool KTQCStringSplitter::first() start=0; - end=src.tqfind(sep.data(), start); + end=src.find(sep.data(), start); if(end!=-1) { dst=src.mid(start, end); @@ -83,7 +83,7 @@ bool KTQCStringSplitter::last() end=src.length(); - start=src.tqfindRev(sep.data(),end); + start=src.findRev(sep.data(),end); if(start!=-1) { dst=src.mid(start, end-start); @@ -106,7 +106,7 @@ bool KTQCStringSplitter::next() if(start< (int) src.length()) { - end=src.tqfind(sep.data(), start); + end=src.find(sep.data(), start); if(end!=-1) { dst=src.mid(start, end-start); @@ -142,7 +142,7 @@ bool KTQCStringSplitter::prev() if(end>0) { - start=src.tqfindRev(sep.data(),end); + start=src.findRev(sep.data(),end); if(start!=-1) dst=src.mid(start, end-start); diff --git a/libkmime/tests/run_codec_tests b/libkmime/tests/run_codec_tests index 62f5f2d60..62908eeec 100755 --- a/libkmime/tests/run_codec_tests +++ b/libkmime/tests/run_codec_tests @@ -19,7 +19,7 @@ failedTests=0 # loop over all .expected files in the directory # specified by the single argument: -for i in $(tqfind "$@" -type f -name '*.expected'); do +for i in $(find "$@" -type f -name '*.expected'); do dirName="$(dirname "$i")" if [ "$dirName" != "$oldDirName" ]; then oldDirName="$dirName" diff --git a/libkpgp/kpgp.cpp b/libkpgp/kpgp.cpp index 3abd1d79f..6035112c8 100644 --- a/libkpgp/kpgp.cpp +++ b/libkpgp/kpgp.cpp @@ -1044,7 +1044,7 @@ Module::prepareMessageForDecryption( const TQCString& msg, start = 0; else { - start = msg.tqfind( "\n-----BEGIN PGP" ) + 1; + start = msg.find( "\n-----BEGIN PGP" ) + 1; if( start == 0 ) { nonPgpBlocks.append( msg ); @@ -1062,20 +1062,20 @@ Module::prepareMessageForDecryption( const TQCString& msg, else pgpBlock = UnknownBlock; - nextEnd = msg.tqfind( "\n-----END PGP", start + 15 ); + nextEnd = msg.find( "\n-----END PGP", start + 15 ); if( nextEnd == -1 ) { nonPgpBlocks.append( msg.mid( lastEnd+1 ) ); break; } - nextStart = msg.tqfind( "\n-----BEGIN PGP", start + 15 ); + nextStart = msg.find( "\n-----BEGIN PGP", start + 15 ); if( ( nextStart == -1 ) || ( nextEnd < nextStart ) || ( pgpBlock == ClearsignedBlock ) ) { // most likely we found a PGP block (but we don't check if it's valid) // store the preceding non-PGP block nonPgpBlocks.append( msg.mid( lastEnd+1, start-lastEnd-1 ) ); - lastEnd = msg.tqfind( "\n", nextEnd + 14 ); + lastEnd = msg.find( "\n", nextEnd + 14 ); if( lastEnd == -1 ) { pgpBlocks.append( new Block( msg.mid( start ) ) ); @@ -1086,7 +1086,7 @@ Module::prepareMessageForDecryption( const TQCString& msg, { pgpBlocks.append( new Block( msg.mid( start, lastEnd+1-start ) ) ); if( ( nextStart != -1 ) && ( nextEnd > nextStart ) ) - nextStart = msg.tqfind( "\n-----BEGIN PGP", lastEnd+1 ); + nextStart = msg.find( "\n-----BEGIN PGP", lastEnd+1 ); } } @@ -1333,7 +1333,7 @@ Module::checkForPGP(void) havePgp=FALSE; path = getenv("PATH"); - while((index = path.tqfind(":",lastindex+1)) != -1) + while((index = path.find(":",lastindex+1)) != -1) { pSearchPaths.append(path.mid(lastindex+1,index-lastindex-1)); lastindex = index; @@ -1487,12 +1487,12 @@ Module::canonicalAddress( const TQString& _adress ) address = address.stripWhiteSpace(); // just leave pure e-mail address. - if((index = address.tqfind("<")) != -1) - if((index2 = address.tqfind("@",index+1)) != -1) - if((index2 = address.tqfind(">",index2+1)) != -1) + if((index = address.find("<")) != -1) + if((index2 = address.find("@",index+1)) != -1) + if((index2 = address.find(">",index2+1)) != -1) return address.mid(index,index2-index+1); - if((index = address.tqfind("@")) == -1) + if((index = address.find("@")) == -1) { // local address //char hostname[1024]; @@ -1502,8 +1502,8 @@ Module::canonicalAddress( const TQString& _adress ) } else { - int index1 = address.tqfindRev(" ",index); - int index2 = address.tqfind(" ",index); + int index1 = address.findRev(" ",index); + int index2 = address.find(" ",index); if(index2 == -1) index2 = address.length(); return "<" + address.mid(index1+1 ,index2-index1-1) + ">"; } @@ -1705,7 +1705,7 @@ Module::keysForAddress( const TQString& address ) return KeyIDList(); } TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.tqcontains( addr ) ) { + if( addressDataDict.contains( addr ) ) { return addressDataDict[addr].keyIds; } else { @@ -1720,7 +1720,7 @@ Module::setKeysForAddress( const TQString& address, const KeyIDList& keyIds ) return; } TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.tqcontains( addr ) ) { + if( addressDataDict.contains( addr ) ) { addressDataDict[addr].keyIds = keyIds; } else { @@ -1782,7 +1782,7 @@ EncryptPref Module::encryptionPreference( const TQString& address ) { TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.tqcontains( addr ) ) { + if( addressDataDict.contains( addr ) ) { return addressDataDict[addr].encrPref; } else { @@ -1798,7 +1798,7 @@ Module::setEncryptionPreference( const TQString& address, return; } TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.tqcontains( addr ) ) { + if( addressDataDict.contains( addr ) ) { addressDataDict[addr].encrPref = pref; } else { diff --git a/libkpgp/kpgpbase.cpp b/libkpgp/kpgpbase.cpp index b9ad4d63d..f3a79216e 100644 --- a/libkpgp/kpgpbase.cpp +++ b/libkpgp/kpgpbase.cpp @@ -164,7 +164,7 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP ) } else if (pollin.revents & POLLOUT) { // search end of next line - if ((len2 = input.tqfind('\n', i)) == -1) + if ((len2 = input.find('\n', i)) == -1) len2 = input_length - i; else len2 = len2 - i + 1; @@ -598,7 +598,7 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG ) else if (poller[STD_IN].revents & POLLOUT) { if (!input.isEmpty()) { // search end of next line - if ((len2 = input.tqfind('\n', input_pos)) == -1) + if ((len2 = input.find('\n', input_pos)) == -1) len2 = input_length - input_pos; else len2 = len2 - input_pos + 1; diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp index be96b5da9..97db773a7 100644 --- a/libkpgp/kpgpbase2.cpp +++ b/libkpgp/kpgpbase2.cpp @@ -118,16 +118,16 @@ Base2::encsign( Block& block, const KeyIDList& recipients, bool bad = FALSE; unsigned int num = 0; TQCString badkeys = ""; - if (error.tqfind("Cannot find the public key") != -1) + if (error.find("Cannot find the public key") != -1) { index = 0; num = 0; - while((index = error.tqfind("Cannot find the public key",index)) + while((index = error.find("Cannot find the public key",index)) != -1) { bad = TRUE; - index = error.tqfind('\'',index); - int index2 = error.tqfind('\'',index+1); + index = error.find('\'',index); + int index2 = error.find('\'',index+1); if (num++) badkeys += ", "; badkeys += error.mid(index, index2-index+1); @@ -149,15 +149,15 @@ Base2::encsign( Block& block, const KeyIDList& recipients, status |= ERROR; } } - if (error.tqfind("skipping userid") != -1) + if (error.find("skipping userid") != -1) { index = 0; num = 0; - while((index = error.tqfind("skipping userid",index)) + while((index = error.find("skipping userid",index)) != -1) { bad = TRUE; - int index2 = error.tqfind('\n',index+16); + int index2 = error.find('\n',index+16); if (num++) badkeys += ", "; badkeys += error.mid(index+16, index2-index-16); @@ -187,12 +187,12 @@ Base2::encsign( Block& block, const KeyIDList& recipients, #endif if(passphrase != 0) { - if(error.tqfind("Pass phrase is good") != -1) + if(error.find("Pass phrase is good") != -1) { //kdDebug(5100) << "Base: Good Passphrase!" << endl; status |= SIGNED; } - if( error.tqfind("Bad pass phrase") != -1) + if( error.find("Bad pass phrase") != -1) { errMsg = i18n("Bad passphrase; could not sign."); status |= BADPHRASE; @@ -200,7 +200,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, status |= ERROR; } } - if (error.tqfind("Signature error") != -1) + if (error.find("Signature error") != -1) { errMsg = i18n("Signing failed: please check your PGP User Identity, " "the PGP setup, and the key rings."); @@ -208,7 +208,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, status |= ERR_SIGNING; status |= ERROR; } - if (error.tqfind("Encryption error") != -1) + if (error.find("Encryption error") != -1) { errMsg = i18n("Encryption failed: please check your PGP setup " "and the key rings."); @@ -238,16 +238,16 @@ Base2::decrypt( Block& block, const char *passphrase ) // pgp2.6 has sometimes problems with the ascii armor pgp5.0 produces // this hack can solve parts of the problem - if(error.tqfind("ASCII armor corrupted.") != -1) + if(error.find("ASCII armor corrupted.") != -1) { kdDebug(5100) << "removing ASCII armor header" << endl; - int index1 = input.tqfind("-----BEGIN PGP SIGNED MESSAGE-----"); + int index1 = input.find("-----BEGIN PGP SIGNED MESSAGE-----"); if(index1 != -1) - index1 = input.tqfind("-----BEGIN PGP SIGNATURE-----", index1); + index1 = input.find("-----BEGIN PGP SIGNATURE-----", index1); else - index1 = input.tqfind("-----BEGIN PGP MESSAGE-----"); - index1 = input.tqfind('\n', index1); - index2 = input.tqfind("\n\n", index1); + index1 = input.find("-----BEGIN PGP MESSAGE-----"); + index1 = input.find('\n', index1); + index2 = input.find("\n\n", index1); input.remove(index1, index2 - index1); exitqStatus = run(PGP2 " +batchmode +language=en -f", passphrase); if( !output.isEmpty() ) @@ -282,19 +282,19 @@ Base2::decrypt( Block& block, const char *passphrase ) * * You do not have the secret key needed to decrypt this file. */ - if(error.tqfind("File is encrypted.") != -1) + if(error.find("File is encrypted.") != -1) { //kdDebug(5100) << "kpgpbase: message is encrypted" << endl; status |= ENCRYPTED; - if((index = error.tqfind("Key for user ID:")) != -1) + if((index = error.find("Key for user ID:")) != -1) { // Find out the key for which the phrase is needed index += 17; - index2 = error.tqfind('\n', index); + index2 = error.find('\n', index); block.setRequiredUserId( error.mid(index, index2 - index) ); //kdDebug(5100) << "Base: key needed is \"" << block.requiredUserId() << "\"!\n"; - if((passphrase != 0) && (error.tqfind("Bad pass phrase") != -1)) + if((passphrase != 0) && (error.find("Bad pass phrase") != -1)) { errMsg = i18n("Bad passphrase; could not decrypt."); kdDebug(5100) << "Base: passphrase is bad" << endl; @@ -314,14 +314,14 @@ Base2::decrypt( Block& block, const char *passphrase ) #if 0 // ##### FIXME: This information is anyway currently not used // I'll change it to always determine the recipients. - index = error.tqfind("can only be read by:"); + index = error.find("can only be read by:"); if(index != -1) { - index = error.tqfind('\n',index); - int end = error.tqfind("\n\n",index); + index = error.find('\n',index); + int end = error.find("\n\n",index); mRecipients.clear(); - while( (index2 = error.tqfind('\n',index+1)) <= end ) + while( (index2 = error.find('\n',index+1)) <= end ) { TQCString item = error.mid(index+1,index2-index-1); item.stripWhiteSpace(); @@ -392,19 +392,19 @@ Base2::decrypt( Block& block, const char *passphrase ) * Signature made 2001/09/09 16:01 GMT using 1024-bit key, key ID 12345678 */ - if((index = error.tqfind("File has signature")) != -1) + if((index = error.find("File has signature")) != -1) { // move index to start of next line - index = error.tqfind('\n', index+18) + 1; + index = error.find('\n', index+18) + 1; //kdDebug(5100) << "Base: message is signed" << endl; status |= SIGNED; // get signature date and signature key ID - if ((index2 = error.tqfind("Signature made", index)) != -1) { + if ((index2 = error.find("Signature made", index)) != -1) { index2 += 15; - int index3 = error.tqfind("using", index2); + int index3 = error.find("using", index2); block.setSignatureDate( error.mid(index2, index3-index2-1) ); kdDebug(5100) << "Message was signed on '" << block.signatureDate() << "'\n"; - index3 = error.tqfind("key ID ", index3) + 7; + index3 = error.find("key ID ", index3) + 7; block.setSignatureKeyId( error.mid(index3,8) ); kdDebug(5100) << "Message was signed with key '" << block.signatureKeyId() << "'\n"; } @@ -415,38 +415,38 @@ Base2::decrypt( Block& block, const char *passphrase ) block.setSignatureKeyId( "" ); } - if( ( index2 = error.tqfind("Key matching expected", index) ) != -1) + if( ( index2 = error.find("Key matching expected", index) ) != -1) { status |= UNKNOWN_SIG; status |= GOODSIG; - int index3 = error.tqfind("Key ID ", index2) + 7; + int index3 = error.find("Key ID ", index2) + 7; block.setSignatureKeyId( error.mid(index3,8) ); block.setSignatureUserId( TQString() ); } - else if( (index2 = error.tqfind("Good signature from", index)) != -1 ) + else if( (index2 = error.find("Good signature from", index)) != -1 ) { status |= GOODSIG; // get signer - index = error.tqfind('"',index2+19); - index2 = error.tqfind('"', index+1); + index = error.find('"',index2+19); + index2 = error.find('"', index+1); block.setSignatureUserId( error.mid(index+1, index2-index-1) ); } - else if( (index2 = error.tqfind("Bad signature from", index)) != -1 ) + else if( (index2 = error.find("Bad signature from", index)) != -1 ) { status |= ERROR; // get signer - index = error.tqfind('"',index2+19); - index2 = error.tqfind('"', index+1); + index = error.find('"',index2+19); + index2 = error.find('"', index+1); block.setSignatureUserId( error.mid(index+1, index2-index-1) ); } - else if( error.tqfind("Keyring file", index) != -1 ) + else if( error.find("Keyring file", index) != -1 ) { // #### fix this hack status |= UNKNOWN_SIG; status |= GOODSIG; // this is a hack... // determine file name of missing keyring file - index = error.tqfind('\'', index) + 1; - index2 = error.tqfind('\'', index); + index = error.find('\'', index) + 1; + index2 = error.find('\'', index); block.setSignatureUserId( i18n("The keyring file %1 does not exist.\n" "Please check your PGP setup.").tqarg(TQString(error.mid(index, index2-index))) ); } @@ -547,7 +547,7 @@ Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns ) // put all new keys into a map, remove duplicates while ( !publicKeys.isEmpty() ) { Key * key = publicKeys.take( 0 ); - if ( !map.tqcontains( key->primaryFingerprint() ) ) + if ( !map.contains( key->primaryFingerprint() ) ) map.insert( key->primaryFingerprint(), key ); else delete key; @@ -626,10 +626,10 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) { /* if( secretKeys ) - index = output.tqfind( "\nsec" ); + index = output.find( "\nsec" ); else */ - index = output.tqfind( "\npub" ); + index = output.find( "\npub" ); if( index == -1 ) return 0; else @@ -641,7 +641,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) int index2; // search the end of the current line - if( ( index2 = output.tqfind( '\n', index ) ) == -1 ) + if( ( index2 = output.find( '\n', index ) ) == -1 ) break; if( !strncmp( output.data() + index, "pub", 3 ) || @@ -699,19 +699,19 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) pos = index + 4; while( output[pos] == ' ' ) pos++; - pos2 = output.tqfind( '/', pos ); + pos2 = output.find( '/', pos ); subkey->setKeyLength( output.mid( pos, pos2-pos ).toUInt() ); // Key ID pos = pos2 + 1; - pos2 = output.tqfind( ' ', pos ); + pos2 = output.find( ' ', pos ); subkey->setKeyID( output.mid( pos, pos2-pos ) ); // Creation Date pos = pos2 + 1; while( output[pos] == ' ' ) pos++; - pos2 = output.tqfind( ' ', pos ); + pos2 = output.find( ' ', pos ); int year = output.mid( pos, 4 ).toInt(); int month = output.mid( pos+5, 2 ).toInt(); int day = output.mid( pos+8, 2 ).toInt(); @@ -754,8 +754,8 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) TQCString fingerprint = output.mid( pos, index2-pos ); // remove white space from the fingerprint - for ( int idx = 0 ; (idx = fingerprint.tqfind(' ', idx)) >= 0 ; ) - fingerprint.tqreplace( idx, 1, "" ); + for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) + fingerprint.replace( idx, 1, "" ); subkey->setFingerprint( fingerprint ); } @@ -827,10 +827,10 @@ Base2::parseTrustDataForKey( Key* key, const TQCString& str ) UserIDList userIDs = key->userIDs(); // search the trust data belonging to this key - int index = str.tqfind( '\n' ) + 1; + int index = str.find( '\n' ) + 1; while( ( index > 0 ) && ( strncmp( str.data() + index+2, keyID.data(), 8 ) != 0 ) ) - index = str.tqfind( '\n', index ) + 1; + index = str.find( '\n', index ) + 1; if( index == 0 ) return; @@ -846,7 +846,7 @@ Base2::parseTrustDataForKey( Key* key, const TQCString& str ) int index2; // search the end of the current line - if( ( index2 = str.tqfind( '\n', index ) ) == -1 ) + if( ( index2 = str.find( '\n', index ) ) == -1 ) break; // check if trust info for the next key starts @@ -908,9 +908,9 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) else { if( secretKeys ) - index = output.tqfind( "\nsec" ); + index = output.find( "\nsec" ); else - index = output.tqfind( "\npub" ); + index = output.find( "\npub" ); if( index == -1 ) return keys; else @@ -922,7 +922,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) int index2; // search the end of the current line - if( ( index2 = output.tqfind( '\n', index ) ) == -1 ) + if( ( index2 = output.find( '\n', index ) ) == -1 ) break; if( !strncmp( output.data() + index, "pub", 3 ) || @@ -979,19 +979,19 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) pos = index + 4; while( output[pos] == ' ' ) pos++; - pos2 = output.tqfind( '/', pos ); + pos2 = output.find( '/', pos ); subkey->setKeyLength( output.mid( pos, pos2-pos ).toUInt() ); // Key ID pos = pos2 + 1; - pos2 = output.tqfind( ' ', pos ); + pos2 = output.find( ' ', pos ); subkey->setKeyID( output.mid( pos, pos2-pos ) ); // Creation Date pos = pos2 + 1; while( output[pos] == ' ' ) pos++; - pos2 = output.tqfind( ' ', pos ); + pos2 = output.find( ' ', pos ); int year = output.mid( pos, 4 ).toInt(); int month = output.mid( pos+5, 2 ).toInt(); int day = output.mid( pos+8, 2 ).toInt(); @@ -1035,8 +1035,8 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) pos2 = pos + 18; TQCString fingerprint = output.mid( pos, index2-pos ); // remove white space from the fingerprint - for ( int idx = 0 ; (idx = fingerprint.tqfind(' ', idx)) >= 0 ; ) - fingerprint.tqreplace( idx, 1, "" ); + for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) + fingerprint.replace( idx, 1, "" ); subkey->setFingerprint( fingerprint ); } diff --git a/libkpgp/kpgpbase5.cpp b/libkpgp/kpgpbase5.cpp index 46ded2c73..288957399 100644 --- a/libkpgp/kpgpbase5.cpp +++ b/libkpgp/kpgpbase5.cpp @@ -112,7 +112,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients, if (signonly) { input.append("\n"); - input.tqreplace(TQRegExp("[ \t]+\n"), "\n"); //strip trailing whitespace + input.replace(TQRegExp("[ \t]+\n"), "\n"); //strip trailing whitespace } //We have to do this otherwise it's all in vain @@ -123,7 +123,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients, status = ERROR; // now parse the returned info - if(error.tqfind("Cannot unlock private key") != -1) + if(error.find("Cannot unlock private key") != -1) { errMsg = i18n("The passphrase you entered is invalid."); status |= ERROR; @@ -133,16 +133,16 @@ Base5::encsign( Block& block, const KeyIDList& recipients, //{ TQCString aStr; index = -1; - while((index = error.tqfind("WARNING: The above key",index+1)) != -1) + while((index = error.find("WARNING: The above key",index+1)) != -1) { - int index2 = error.tqfind("But you previously",index); - int index3 = error.tqfind("WARNING: The above key",index+1); + int index2 = error.find("But you previously",index); + int index3 = error.find("WARNING: The above key",index+1); if(index2 == -1 || (index2 > index3 && index3 != -1)) { // the key wasn't valid, no encryption to this person // extract the person - index2 = error.tqfind('\n',index); - index3 = error.tqfind('\n',index2+1); + index2 = error.find('\n',index); + index3 = error.find('\n',index2+1); aStr += error.mid(index2+1, index3-index2-1); aStr += ", "; } @@ -150,7 +150,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients, if(!aStr.isEmpty()) { aStr.truncate(aStr.length()-2); - if(error.tqfind("No valid keys found") != -1) + if(error.find("No valid keys found") != -1) errMsg = i18n("The key(s) you want to encrypt your message " "to are not trusted. No encryption done."); else @@ -161,10 +161,10 @@ Base5::encsign( Block& block, const KeyIDList& recipients, status |= BADKEYS; } //} - if((index = error.tqfind("No encryption keys found for")) != -1) + if((index = error.find("No encryption keys found for")) != -1) { - index = error.tqfind(':',index); - int index2 = error.tqfind('\n',index); + index = error.find(':',index); + int index2 = error.find('\n',index); errMsg = i18n("Missing encryption key(s) for:\n%1") .tqarg(TQString(error.mid(index,index2-index))); @@ -178,8 +178,8 @@ Base5::encsign( Block& block, const KeyIDList& recipients, // dash-escape the input if (input[0] == '-') input = "- " + input; - for ( int idx = 0 ; (idx = input.tqfind("\n-", idx)) >= 0 ; idx += 4 ) - input.tqreplace(idx, 2, "\n- -"); + for ( int idx = 0 ; (idx = input.find("\n-", idx)) >= 0 ; idx += 4 ) + input.replace(idx, 2, "\n- -"); output = "-----BEGIN PGP SIGNED MESSAGE-----\n\n" + input + "\n" + output; } @@ -212,7 +212,7 @@ Base5::decrypt( Block& block, const char *passphrase ) // lets parse the returned information. int index; - index = error.tqfind("Cannot decrypt message"); + index = error.find("Cannot decrypt message"); if(index != -1) { //kdDebug(5100) << "message is encrypted" << endl; @@ -220,7 +220,7 @@ Base5::decrypt( Block& block, const char *passphrase ) // ok. we have an encrypted message. Is the passphrase bad, // or do we not have the secret key? - if(error.tqfind("Need a pass phrase") != -1) + if(error.find("Need a pass phrase") != -1) { if(passphrase != 0) { @@ -242,15 +242,15 @@ Base5::decrypt( Block& block, const char *passphrase ) #if 0 // ##### FIXME: This information is anyway currently not used // I'll change it to always determine the recipients. - index = error.tqfind("can only be decrypted by:"); + index = error.find("can only be decrypted by:"); if(index != -1) { - index = error.tqfind('\n',index); - int end = error.tqfind("\n\n",index); + index = error.find('\n',index); + int end = error.find("\n\n",index); mRecipients.clear(); int index2; - while( (index2 = error.tqfind('\n',index+1)) <= end ) + while( (index2 = error.find('\n',index+1)) <= end ) { TQCString item = error.mid(index+1,index2-index-1); item.stripWhiteSpace(); @@ -260,7 +260,7 @@ Base5::decrypt( Block& block, const char *passphrase ) } #endif } - index = error.tqfind("Good signature"); + index = error.find("Good signature"); if(index != -1) { //kdDebug(5100) << "good signature" << endl; @@ -268,18 +268,18 @@ Base5::decrypt( Block& block, const char *passphrase ) status |= GOODSIG; // get key ID of signer - index = error.tqfind("Key ID ", index) + 7; + index = error.find("Key ID ", index) + 7; block.setSignatureKeyId( error.mid(index, 8) ); // get signer - index = error.tqfind('"',index) + 1; - int index2 = error.tqfind('"', index); + index = error.find('"',index) + 1; + int index2 = error.find('"', index); block.setSignatureUserId( error.mid(index, index2-index) ); /// ### FIXME get signature date block.setSignatureDate( "" ); } - index = error.tqfind("BAD signature"); + index = error.find("BAD signature"); if(index != -1) { //kdDebug(5100) << "BAD signature" << endl; @@ -287,21 +287,21 @@ Base5::decrypt( Block& block, const char *passphrase ) status |= ERROR; // get key ID of signer - index = error.tqfind("Key ID ", index) + 7; + index = error.find("Key ID ", index) + 7; block.setSignatureKeyId( error.mid(index, 8) ); // get signer - index = error.tqfind('"',index) + 1; - int index2 = error.tqfind('"', index); + index = error.find('"',index) + 1; + int index2 = error.find('"', index); block.setSignatureUserId( error.mid(index, index2-index) ); /// ### FIXME get signature date block.setSignatureDate( "" ); } - index = error.tqfind("Signature by unknown key"); + index = error.find("Signature by unknown key"); if(index != -1) { - index = error.tqfind("keyid: 0x",index) + 9; + index = error.find("keyid: 0x",index) + 9; block.setSignatureKeyId( error.mid(index, 8) ); block.setSignatureUserId( TQString() ); // FIXME: not a very good solution... @@ -483,7 +483,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) int eol; // search the end of the current line - eol = output.tqfind( '\n', offset ); + eol = output.find( '\n', offset ); if( ( eol == -1 ) || ( eol == offset ) ) break; @@ -525,7 +525,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) pos = offset + 4; while( output[pos] == ' ' ) pos++; - pos2 = output.tqfind( ' ', pos ); + pos2 = output.find( ' ', pos ); subkey->setKeyLength( output.mid( pos, pos2-pos ).toUInt() ); //kdDebug(5100) << "Key Length: "<keyLength()<setKeyID( output.mid( pos, pos2-pos ) ); //kdDebug(5100) << "Key ID: "<keyID()<setExpirationDate( -1 ); @@ -595,7 +595,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) pos = pos2 + 1; while( output[pos] == ' ' ) pos++; - pos2 = output.tqfind( ' ', pos ); + pos2 = output.find( ' ', pos ); if( !strncmp( output.data() + pos, "RSA", 3 ) ) { sign = true; @@ -653,11 +653,11 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) f20 Fingerprint20 = 226F 4B63 6DA2 7389 91D1 2A49 D58A 3EC1 5214 181E */ - int pos = output.tqfind( '=', offset+3 ) + 2; + int pos = output.find( '=', offset+3 ) + 2; TQCString fingerprint = output.mid( pos, eol-pos ); // remove white space from the fingerprint - for ( int idx = 0 ; (idx = fingerprint.tqfind(' ', idx)) >= 0 ; ) - fingerprint.tqreplace( idx, 1, "" ); + for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) + fingerprint.replace( idx, 1, "" ); assert( subkey != 0 ); subkey->setFingerprint( fingerprint ); //kdDebug(5100)<<"Fingerprint: "<userIDs(); // search the start of the trust data - int offset = str.tqfind( "\n\n KeyID" ) + 9; + int offset = str.find( "\n\n KeyID" ) + 9; if( offset == -1 + 9 ) return; - offset = str.tqfind( '\n', offset ) + 1; + offset = str.find( '\n', offset ) + 1; if( offset == -1 + 1 ) return; @@ -788,7 +788,7 @@ Base5::parseTrustDataForKey( Key* key, const TQCString& str ) int eol; // search the end of the current line - if( ( eol = str.tqfind( '\n', offset ) ) == -1 ) + if( ( eol = str.find( '\n', offset ) ) == -1 ) break; if( str[offset+23] != ' ' ) diff --git a/libkpgp/kpgpbase6.cpp b/libkpgp/kpgpbase6.cpp index 440ac6e20..0972a46e1 100644 --- a/libkpgp/kpgpbase6.cpp +++ b/libkpgp/kpgpbase6.cpp @@ -66,15 +66,15 @@ Base6::decrypt( Block& block, const char *passphrase ) } // encrypted message - if( error.tqfind("File is encrypted.") != -1) + if( error.find("File is encrypted.") != -1) { //kdDebug(5100) << "kpgpbase: message is encrypted" << endl; status |= ENCRYPTED; - if((index = error.tqfind("Key for user ID")) != -1) + if((index = error.find("Key for user ID")) != -1) { // Find out the key for which the phrase is needed - index = error.tqfind(':', index) + 2; - index2 = error.tqfind('\n', index); + index = error.find(':', index) + 2; + index2 = error.find('\n', index); block.setRequiredUserId( error.mid(index, index2 - index) ); //kdDebug(5100) << "Base: key needed is \"" << block.requiredUserId() << "\"!\n"; @@ -90,7 +90,7 @@ Base6::decrypt( Block& block, const char *passphrase ) status |= ERROR; } } - else if( error.tqfind("You do not have the secret key needed to decrypt this file.") != -1) + else if( error.find("You do not have the secret key needed to decrypt this file.") != -1) { errMsg = i18n("You do not have the secret key for this message."); //kdDebug(5100) << "Base: no secret key for this message" << endl; @@ -123,46 +123,46 @@ Base6::decrypt( Block& block, const char *passphrase ) * File is signed. Good signature from user "Joe User ". * Signature made 2001/12/05 13:09 GMT */ - if(((index = error.tqfind("File is signed.")) != -1) - || (error.tqfind("Good signature") != -1 )) + if(((index = error.find("File is signed.")) != -1) + || (error.find("Good signature") != -1 )) { //kdDebug(5100) << "Base: message is signed" << endl; status |= SIGNED; // determine the signature date - if( ( index2 = error.tqfind( "Signature made", index ) ) != -1 ) + if( ( index2 = error.find( "Signature made", index ) ) != -1 ) { index2 += 15; - int eol = error.tqfind( '\n', index2 ); + int eol = error.find( '\n', index2 ); block.setSignatureDate( error.mid( index2, eol-index2 ) ); kdDebug(5100) << "Message was signed on '" << block.signatureDate() << "'\n"; } else block.setSignatureDate( TQCString() ); // determine signature status and signature key - if( error.tqfind("signature not checked") != -1) + if( error.find("signature not checked") != -1) { - index = error.tqfind("KeyID:",index); + index = error.find("KeyID:",index); block.setSignatureKeyId( error.mid(index+9,8) ); block.setSignatureUserId( TQString() ); status |= UNKNOWN_SIG; status |= GOODSIG; } - else if((index = error.tqfind("Good signature")) != -1 ) + else if((index = error.find("Good signature")) != -1 ) { status |= GOODSIG; // get signer - index = error.tqfind('"',index)+1; - index2 = error.tqfind('"', index); + index = error.find('"',index)+1; + index2 = error.find('"', index); block.setSignatureUserId( error.mid(index, index2-index) ); // get key ID of signer - index = error.tqfind("KeyID:",index2); + index = error.find("KeyID:",index2); if (index == -1) block.setSignatureKeyId( TQCString() ); else block.setSignatureKeyId( error.mid(index+9,8) ); } - else if( error.tqfind("Can't find the right public key") != -1 ) + else if( error.find("Can't find the right public key") != -1 ) { // #### fix this hack // #### This doesn't happen with PGP 6.5.8 because it seems to @@ -253,28 +253,28 @@ Base6::pubKeys() if (error.length() > 1) error.truncate(error.length()-1); TQStrList publicKeys; - index = error.tqfind("bits/keyID",1); // skip first to "\n" + index = error.find("bits/keyID",1); // skip first to "\n" if (index ==-1) { - index = error.tqfind("Type bits",1); // skip first to "\n" + index = error.find("Type bits",1); // skip first to "\n" if (index == -1) return 0; else compatibleMode = 0; } - while( (index = error.tqfind("\n",index)) != -1) + while( (index = error.find("\n",index)) != -1) { //parse line TQCString line; - if( (index2 = error.tqfind("\n",index+1)) != -1) + if( (index2 = error.find("\n",index+1)) != -1) // skip last line { int index3; if (compatibleMode) { - int index_pub = error.tqfind("pub ",index); - int index_sec = error.tqfind("sec ",index); + int index_pub = error.find("pub ",index); + int index_sec = error.find("sec ",index); if (index_pub < 0) index3 = index_sec; else if (index_sec < 0) @@ -284,8 +284,8 @@ Base6::pubKeys() } else { - int index_rsa = error.tqfind("RSA ",index); - int index_dss = error.tqfind("DSS ",index); + int index_rsa = error.find("RSA ",index); + int index_dss = error.find("DSS ",index); if (index_rsa < 0) index3 = index_dss; else if (index_dss < 0) @@ -301,14 +301,14 @@ Base6::pubKeys() line = line.stripWhiteSpace(); } else { // line with new key - int index4 = error.tqfind(TQRegExp("/\\d{2}/\\d{2} "), index); + int index4 = error.find(TQRegExp("/\\d{2}/\\d{2} "), index); line = error.mid(index4+7,index2-index4-7); } //kdDebug(5100) << "Base: found key for " << (const char *)line << endl; // don't add PGP's comments to the key list if (strncmp(line.data(),"*** KEY EXPIRED ***",19) && - line.tqfind(TQRegExp("^expires \\d{4}/\\d{2}/\\d{2}")) < 0 && + line.find(TQRegExp("^expires \\d{4}/\\d{2}/\\d{2}")) < 0 && strncmp(line.data(),"*** DEFAULT SIGNING KEY ***",27)) { publicKeys.append(line); } @@ -327,10 +327,10 @@ Base6::pubKeys() } index = 0; - while ( (index = error.tqfind("\n >", index)) != -1 ) { + while ( (index = error.find("\n >", index)) != -1 ) { TQCString line; index += 4; - index2 = error.tqfind(" \"", index); + index2 = error.find(" \"", index); line = error.mid(index, index2-index+1).stripWhiteSpace(); //kdDebug(5100) << "Base6: found key group for " << line << endl; @@ -362,7 +362,7 @@ Base6::isVersion6() return 0; } - if( error.tqfind("Version 6") != -1) + if( error.find("Version 6") != -1) { //kdDebug(5100) << "kpgpbase: pgp version 6.x detected" << endl; return 1; @@ -399,7 +399,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) int eol; // search the end of the current line - if( ( eol = output.tqfind( '\n', offset ) ) == -1 ) + if( ( eol = output.find( '\n', offset ) ) == -1 ) break; //kdDebug(5100) << "Parsing: " << output.mid(offset, eol-offset) << endl; @@ -465,7 +465,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) pos = offset + 4; while( output[pos] == ' ' ) pos++; - pos2 = output.tqfind( ' ', pos ); + pos2 = output.find( ' ', pos ); subkey->setKeyLength( output.mid( pos, pos2-pos ).toUInt() ); //kdDebug(5100) << "Key Length: "<keyLength()<setKeyID( output.mid( pos, pos2-pos ) ); //kdDebug(5100) << "Key ID: "<keyID()<= 0 ; ) - fingerprint.tqreplace( idx, 1, "" ); + for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) + fingerprint.replace( idx, 1, "" ); //kdDebug(5100)<<"Fingerprint: "<userIDs(); // search the start of the trust data - int offset = str.tqfind( "\n\n KeyID" ); + int offset = str.find( "\n\n KeyID" ); if( offset == -1 ) return; - offset = str.tqfind( '\n', offset ) + 1; + offset = str.find( '\n', offset ) + 1; if( offset == 0 ) return; @@ -800,7 +800,7 @@ Base6::parseTrustDataForKey( Key* key, const TQCString& str ) int eol; // search the end of the current line - if( ( eol = str.tqfind( '\n', offset ) ) == -1 ) + if( ( eol = str.find( '\n', offset ) ) == -1 ) break; if( str[offset+23] != ' ' ) diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp index b04b31bf2..ecb5af195 100644 --- a/libkpgp/kpgpbaseG.cpp +++ b/libkpgp/kpgpbaseG.cpp @@ -38,9 +38,9 @@ BaseG::BaseG() { // determine the version of gpg (the method is equivalent to gpgme's method) runGpg( "--version", 0 ); - int eol = output.tqfind( '\n' ); + int eol = output.find( '\n' ); if( eol > 0 ) { - int pos = output.tqfindRev( ' ', eol - 1 ); + int pos = output.findRev( ' ', eol - 1 ); if( pos != -1 ) { mVersion = output.mid( pos + 1, eol - pos - 1 ); kdDebug(5100) << "found GnuPG " << mVersion << endl; @@ -138,11 +138,11 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, // (expired or revoked key) // gpg: 23456789: no info to calculate a trust probability // (untrusted key, 23456789 is the key Id of the encryption sub key) - while((index = error.tqfind("skipped: ",index)) != -1) + while((index = error.find("skipped: ",index)) != -1) { bad = TRUE; - index = error.tqfind('\'',index); - int index2 = error.tqfind('\'',index+1); + index = error.find('\'',index); + int index2 = error.find('\'',index+1); badkeys += error.mid(index, index2-index+1) + ", "; num++; } @@ -178,14 +178,14 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, // Example 4 (unusable secret key, sign & encrypt): // gpg: skipped `0xAC0EB35D': unusable secret key // gpg: [stdin]: sign+encrypt failed: unusable secret key - if( error.tqfind("bad passphrase") != -1 ) + if( error.find("bad passphrase") != -1 ) { errMsg = i18n("Signing failed because the passphrase is wrong."); status |= BADPHRASE; status |= ERR_SIGNING; status |= ERROR; } - else if( error.tqfind("unusable secret key") != -1 ) + else if( error.find("unusable secret key") != -1 ) { errMsg = i18n("Signing failed because your secret key is unusable."); status |= ERR_SIGNING; @@ -213,7 +213,7 @@ BaseG::decrypt( Block& block, const char *passphrase ) clear(); input = block.text(); exitqStatus = runGpg("--batch --decrypt", passphrase); - if( !output.isEmpty() && ( error.tqfind( "gpg: quoted printable" ) == -1 ) ) + if( !output.isEmpty() && ( error.find( "gpg: quoted printable" ) == -1 ) ) block.setProcessedText( output ); block.setError( error ); @@ -244,13 +244,13 @@ BaseG::decrypt( Block& block, const char *passphrase ) // gpg: public key decryption failed: bad passphrase // gpg: encrypted with 2048-bit ELG-E key, ID 23456789, created 2000-02-02 // "Foo Bar (home) " - if( error.tqfind( "gpg: encrypted with" ) != -1 ) + if( error.find( "gpg: encrypted with" ) != -1 ) { //kdDebug(5100) << "kpgpbase: message is encrypted" << endl; status |= ENCRYPTED; - if( error.tqfind( "\ngpg: decryption failed" ) != -1 ) + if( error.find( "\ngpg: decryption failed" ) != -1 ) { - if( ( index = error.tqfind( "bad passphrase" ) ) != -1 ) + if( ( index = error.find( "bad passphrase" ) ) != -1 ) { if( passphrase != 0 ) { @@ -262,15 +262,15 @@ BaseG::decrypt( Block& block, const char *passphrase ) else { // Search backwards the user ID of the needed key - index2 = error.tqfindRev('"', index) - 1; - index = error.tqfindRev(" \"", index2) + 7; + index2 = error.findRev('"', index) - 1; + index = error.findRev(" \"", index2) + 7; // The conversion from UTF8 is necessary because gpg stores and // prints user IDs in UTF8 block.setRequiredUserId( TQString::fromUtf8( error.mid( index, index2 - index + 1 ) ) ); kdDebug(5100) << "Base: key needed is \"" << block.requiredUserId() << "\"!" << endl; } } - else if( error.tqfind( "secret key not available" ) != -1 ) + else if( error.find( "secret key not available" ) != -1 ) { // no secret key fitting this message status |= NO_SEC_KEY; @@ -283,14 +283,14 @@ BaseG::decrypt( Block& block, const char *passphrase ) #if 0 // ##### FIXME: This information is anyway currently not used // I'll change it to always determine the recipients. - index = error.tqfind("can only be read by:"); + index = error.find("can only be read by:"); if(index != -1) { - index = error.tqfind('\n',index); - int end = error.tqfind("\n\n",index); + index = error.find('\n',index); + int end = error.find("\n\n",index); mRecipients.clear(); - while( (index2 = error.tqfind('\n',index+1)) <= end ) + while( (index2 = error.find('\n',index+1)) <= end ) { TQCString item = error.mid(index+1,index2-index-1); item.stripWhiteSpace(); @@ -304,48 +304,48 @@ BaseG::decrypt( Block& block, const char *passphrase ) // Example 1 (unknown signature key): // gpg: Signature made Wed 02 Jan 2002 11:26:33 AM CET using DSA key ID 2E250C64 // gpg: Can't check signature: public key not found - if((index = error.tqfind("Signature made")) != -1) + if((index = error.find("Signature made")) != -1) { //kdDebug(5100) << "Base: message is signed" << endl; status |= SIGNED; // get signature date and signature key ID // Example: Signature made Sun 06 May 2001 03:49:27 PM CEST using DSA key ID 12345678 - index2 = error.tqfind("using", index+15); + index2 = error.find("using", index+15); block.setSignatureDate( error.mid(index+15, index2-(index+15)-1) ); kdDebug(5100) << "Message was signed on '" << block.signatureDate() << "'\n"; - index2 = error.tqfind("key ID ", index2) + 7; + index2 = error.find("key ID ", index2) + 7; block.setSignatureKeyId( error.mid(index2,8) ); kdDebug(5100) << "Message was signed with key '" << block.signatureKeyId() << "'\n"; // move index to start of next line - index = error.tqfind('\n', index2)+1; + index = error.find('\n', index2)+1; - if ((error.tqfind("Key matching expected", index) != -1) - || (error.tqfind("Can't check signature", index) != -1)) + if ((error.find("Key matching expected", index) != -1) + || (error.find("Can't check signature", index) != -1)) { status |= UNKNOWN_SIG; status |= GOODSIG; block.setSignatureUserId( TQString() ); } - else if( error.tqfind("Good signature", index) != -1 ) + else if( error.find("Good signature", index) != -1 ) { status |= GOODSIG; // get the primary user ID of the signer - index = error.tqfind('"',index); - index2 = error.tqfind('\n',index+1); - index2 = error.tqfindRev('"', index2-1); + index = error.find('"',index); + index2 = error.find('\n',index+1); + index2 = error.findRev('"', index2-1); block.setSignatureUserId( error.mid( index+1, index2-index-1 ) ); } - else if( error.tqfind("BAD signature", index) != -1 ) + else if( error.find("BAD signature", index) != -1 ) { //kdDebug(5100) << "BAD signature" << endl; status |= ERROR; // get the primary user ID of the signer - index = error.tqfind('"',index); - index2 = error.tqfind('\n',index+1); - index2 = error.tqfindRev('"', index2-1); + index = error.find('"',index); + index2 = error.find('\n',index+1); + index2 = error.findRev('"', index2-1); block.setSignatureUserId( error.mid( index+1, index2-index-1 ) ); } - else if( error.tqfind("Can't find the right public key", index) != -1 ) + else if( error.find("Can't find the right public key", index) != -1 ) { // #### fix this hack // I think this can't happen anymore because if the pubring is missing @@ -389,7 +389,7 @@ BaseG::readPublicKey( const KeyID& keyID, if( !strncmp( output.data(), "pub:", 4 ) ) offset = 0; else { - offset = output.tqfind( "\npub:" ); + offset = output.find( "\npub:" ); if( offset == -1 ) return 0; else @@ -536,7 +536,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) { int eol; // search the end of the current line - if( ( eol = output.tqfind( '\n', index ) ) == -1 ) + if( ( eol = output.find( '\n', index ) ) == -1 ) break; bool bIsPublicKey = false; @@ -555,7 +555,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) Subkey *subkey = new Subkey( TQCString(), !bIsPublicKey ); int pos = index + 4; // begin of 2nd field - int pos2 = output.tqfind( ':', pos ); + int pos2 = output.find( ':', pos ); for( int field = 2; field <= 12; field++ ) { switch( field ) @@ -652,7 +652,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) break; } pos = pos2 + 1; - pos2 = output.tqfind( ':', pos ); + pos2 = output.find( ':', pos ); } key->addSubkey( subkey ); } @@ -663,7 +663,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) UserID *userID = new UserID( "" ); int pos = index + 4; // begin of 2nd field - int pos2 = output.tqfind( ':', pos ); + int pos2 = output.find( ':', pos ); for( int field=2; field <= 10; field++ ) { switch( field ) @@ -710,13 +710,13 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) break; case 10: // User-ID TQCString uid = output.mid( pos, pos2-pos ); - // tqreplace "\xXX" with the corresponding character; + // replace "\xXX" with the corresponding character; // other escaped characters, i.e. \n, \r etc., are ignored // because they shouldn't appear in user IDs - for ( int idx = 0 ; (idx = uid.tqfind( "\\x", idx )) >= 0 ; ++idx ) { + for ( int idx = 0 ; (idx = uid.find( "\\x", idx )) >= 0 ; ++idx ) { char str[2] = "x"; str[0] = (char) TQString( uid.mid( idx + 2, 2 ) ).toShort( 0, 16 ); - uid.tqreplace( idx, 4, str ); + uid.replace( idx, 4, str ); } TQString uidString = TQString::fromUtf8( uid.data() ); // check whether uid was utf-8 encoded @@ -785,7 +785,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) break; } pos = pos2 + 1; - pos2 = output.tqfind( ':', pos ); + pos2 = output.find( ':', pos ); } // user IDs are printed in UTF-8 by gpg (if one uses --with-colons) @@ -801,8 +801,8 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) // search the fingerprint (it's in the 10th field) int pos = index + 4; for( int i = 0; i < 8; i++ ) - pos = output.tqfind( ':', pos ) + 1; - int pos2 = output.tqfind( ':', pos ); + pos = output.find( ':', pos ) + 1; + int pos2 = output.find( ':', pos ); key->setFingerprint( keyID, output.mid( pos, pos2-pos ) ); } @@ -830,9 +830,9 @@ BaseG::parseKeyList( const TQCString& output, bool secretKeys ) offset = 0; else { if( secretKeys ) - offset = output.tqfind( "\nsec:" ); + offset = output.find( "\nsec:" ); else - offset = output.tqfind( "\npub:" ); + offset = output.find( "\npub:" ); if( offset == -1 ) return keys; else diff --git a/libkpgp/kpgpkey.cpp b/libkpgp/kpgpkey.cpp index b646fdf1d..8a8ed48b8 100644 --- a/libkpgp/kpgpkey.cpp +++ b/libkpgp/kpgpkey.cpp @@ -209,7 +209,7 @@ bool Key::matchesUserID(const TQString& str, bool cs) return false; for (UserIDListIterator it(mUserIDs); it.current(); ++it) { - if (((*it)->text().tqfind(str, 0, cs)) != -1) + if (((*it)->text().find(str, 0, cs)) != -1) return true; } diff --git a/libkpgp/kpgpui.cpp b/libkpgp/kpgpui.cpp index eccc58e15..cb07abc41 100644 --- a/libkpgp/kpgpui.cpp +++ b/libkpgp/kpgpui.cpp @@ -205,7 +205,7 @@ Config::Config( TQWidget *tqparent, const char *name, bool encrypt ) msg = i18n( "

When this option is enabled, the application will " "always show you a list of public keys from which you can " "choose the one it will use for encryption. If it is off, " - "the application will only show the dialog if it cannot tqfind " + "the application will only show the dialog if it cannot find " "the right key or if there are several which could be used. " "

" ); TQWhatsThis::add( showKeyApprovalDlg, msg ); @@ -432,7 +432,7 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList, (*it)->primaryUserID() ); // select and open the given key - if( keyIds.tqfindIndex( curKeyId ) != -1 ) { + if( keyIds.findIndex( curKeyId ) != -1 ) { if( 0 == firstSelectedItem ) { firstSelectedItem = primaryUserID; } @@ -920,7 +920,7 @@ void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ ) // extended selection mode a normal left click deselects // the not clicked items. if( 0 < selectedCount ) { - if( -1 == mKeyIds.tqfindIndex( lvi->text(0).local8Bit() ) ) { + if( -1 == mKeyIds.findIndex( lvi->text(0).local8Bit() ) ) { // some items of this key are selected and the key wasn't selected // before => the user selected something kdDebug(5100) << "selectedCount: "< selectedCount ) && - ( -1 != mKeyIds.tqfindIndex( lvi->text(0).local8Bit() ) ) ) { + ( -1 != mKeyIds.findIndex( lvi->text(0).local8Bit() ) ) ) { // some items of this key are unselected and the key was selected // before => the user deselected something kdDebug(5100) << "selectedCount: "<\r\n" " \r\n" - "\r\n"; + "\r\n"; KIO::DavJob* job = new KIO::DavJob( url, (int) KIO::DAV_PROPFIND, query, false ); job->addMetaData( "davDepth", "0" ); diff --git a/libkpimexchange/core/exchangedownload.cpp b/libkpimexchange/core/exchangedownload.cpp index cb941711f..e5a09b530 100644 --- a/libkpimexchange/core/exchangedownload.cpp +++ b/libkpimexchange/core/exchangedownload.cpp @@ -255,7 +255,7 @@ void ExchangeDownload::handleAppointments( const TQDomDocument &response, continue; } TQString uid = uidElement.text(); - if ( ! m_uids.tqcontains( uid ) ) { + if ( ! m_uids.contains( uid ) ) { m_uids[uid] = 1; handleRecurrence(uid); successCount++; @@ -308,7 +308,7 @@ void ExchangeDownload::handleRecurrence( TQString uid ) void ExchangeDownload::readAppointment( const KURL& url ) { TQDomDocument doc; - TQDomElement root = addElement( doc, doc, "DAV:", "proptqfind" ); + TQDomElement root = addElement( doc, doc, "DAV:", "propfind" ); TQDomElement prop = addElement( doc, root, "DAV:", "prop" ); addElement( doc, prop, "urn:schemas:calendar:", "uid" ); addElement( doc, prop, "urn:schemas:calendar:", "timezoneid" ); diff --git a/libkpimexchange/core/exchangemonitor.cpp b/libkpimexchange/core/exchangemonitor.cpp index b88510daf..c9f8c627a 100644 --- a/libkpimexchange/core/exchangemonitor.cpp +++ b/libkpimexchange/core/exchangemonitor.cpp @@ -200,7 +200,7 @@ void ExchangeMonitor::slotSubscribeResult( KIO::Job * job ) TQStringList headers = TQStringList::split( "\n", job->queryMetaData( "HTTP-Headers" ) ); for ( TQStringList::Iterator it = headers.begin(); it != headers.end(); ++it ) { - int colon = (*it).tqfind( ": " ); + int colon = (*it).find( ": " ); if ( colon<0 ) continue; TQString tag = (*it).left( colon ).stripWhiteSpace().lower(); TQString value = (*it).mid( colon+1 ).stripWhiteSpace(); @@ -261,7 +261,7 @@ void ExchangeMonitor::slotUnsubscribeResult( KIO::Job * job ) kdDebug() << "Subscription ID.text(): " << subscriptionID.text() << endl; bool ok; ID id = subscriptionID.text().toLong( &ok ); - if ( ! status.text().tqcontains( "200" ) || !ok) { + if ( ! status.text().contains( "200" ) || !ok) { kdError() << "UNSUBSCRIBE result is not 200 or no subscription ID found" << endl; emit error( ExchangeClient::ServerResponseError, "UNSUBSCRIBE yields an error response: \n" + response.toString() ); } @@ -346,7 +346,7 @@ void ExchangeMonitor::slotPollResult( KIO::Job * job ) TQDomElement item = responses.item( i ).toElement(); TQDomElement status = item.namedItem( "status" ).toElement(); TQDomElement subscriptionID = item.namedItem( "subscriptionID" ).toElement(); - if ( status.text().tqcontains( "200" ) ) { + if ( status.text().contains( "200" ) ) { kdDebug() << "subscriptionID: " << subscriptionID.text() << endl; IDList IDs = makeIDList( subscriptionID.text() ); TQValueList urls; @@ -355,7 +355,7 @@ void ExchangeMonitor::slotPollResult( KIO::Job * job ) urls += mSubscriptionMap[ *it ]; } emit notify( IDs, urls ); - } else if ( ! status.text().tqcontains( "204" ) ) { + } else if ( ! status.text().contains( "204" ) ) { kdWarning() << "POLL result is not 200 or 204, what's up?" << endl; emit error( ExchangeClient::ServerResponseError, "Poll result is wrong: \n" + response.toString() ); } diff --git a/libkpimexchange/core/exchangeupload.cpp b/libkpimexchange/core/exchangeupload.cpp index 50159fecf..4317a2565 100644 --- a/libkpimexchange/core/exchangeupload.cpp +++ b/libkpimexchange/core/exchangeupload.cpp @@ -139,7 +139,7 @@ void ExchangeUpload::tryExist() kdDebug() << "Trying to see whether " << url.prettyURL() << " exists" << endl; TQDomDocument doc; - TQDomElement root = addElement( doc, doc, "DAV:", "proptqfind" ); + TQDomElement root = addElement( doc, doc, "DAV:", "propfind" ); TQDomElement prop = addElement( doc, root, "DAV:", "prop" ); addElement( doc, prop, "DAV:", "displayname" ); addElement( doc, prop, "urn:schemas:calendar", "uid" ); @@ -256,7 +256,7 @@ void ExchangeUpload::startUpload( const KURL &url ) offsetString = TQString( "+%1:%2" ).tqarg(tzOffset/60, 2).tqarg( tzOffset%60, 2 ); else offsetString = TQString( "-%1:%2" ).tqarg((-tzOffset)/60, 2).tqarg( (-tzOffset)%60, 2 ); - offsetString = offsetString.tqreplace( TQRegExp(" "), "0" ); + offsetString = offsetString.replace( TQRegExp(" "), "0" ); kdDebug() << "Timezone offset: " << tzOffset << " : " << offsetString << endl; kdDebug() << "ExchangeUpload::mTimeZoneId=" << mTimeZoneId << endl; @@ -292,8 +292,8 @@ void ExchangeUpload::startUpload( const KURL &url ) KCal::ICalFormat *format = new KCal::ICalFormat(); TQString recurstr = format->toString( recurrence->defaultRRule() ); // Strip leading "RRULE\n :" and whitespace - recurstr = recurstr.tqreplace( TQRegExp("^[A-Z]*[\\s]*:"), "").stripWhiteSpace(); - kdDebug() << "Recurrence rule after tqreplace: \"" << recurstr << "\"" << endl; + recurstr = recurstr.replace( TQRegExp("^[A-Z]*[\\s]*:"), "").stripWhiteSpace(); + kdDebug() << "Recurrence rule after replace: \"" << recurstr << "\"" << endl; delete format; TQDomElement rrule = addElement( doc, prop, "urn:schemas:calendar:", "rrule" ); addElement( doc, rrule, "xml:", "v", recurstr ); @@ -360,8 +360,8 @@ void ExchangeUpload::slotPatchResult( KIO::Job *job ) .toElement(); kdDebug() << "status: " << status.text() << endl; kdDebug() << "propstat: " << propstat.text() << endl; - if ( ! ( status.text().tqcontains( "201" ) || - propstat.text().tqcontains( "200" ) ) ) + if ( ! ( status.text().contains( "201" ) || + propstat.text().contains( "200" ) ) ) emit finished( this, ExchangeClient::EventWriteError, "Upload error response: \n" + response.toString() ); else diff --git a/libkpimidentities/identity.cpp b/libkpimidentities/identity.cpp index 1305a2603..a9b63b857 100644 --- a/libkpimidentities/identity.cpp +++ b/libkpimidentities/identity.cpp @@ -146,7 +146,7 @@ TQString Signature::withSeparator( bool * ok ) const if ( signature.startsWith( TQString::tqfromLatin1("-- \n") ) ) // already have signature separator at start of sig: return TQString::tqfromLatin1("\n") += signature; - else if ( signature.tqfind( TQString::tqfromLatin1("\n-- \n") ) != -1 ) + else if ( signature.find( TQString::tqfromLatin1("\n-- \n") ) != -1 ) // already have signature separator inside sig; don't prepend '\n' // to improve abusing signatures as templates: return signature; @@ -531,7 +531,7 @@ TQString Identity::fullEmailAddr(void) const // add DTQUOTE's if necessary: bool needsQuotes=false; for (unsigned int i=0; i < mFullName.length(); i++) { - if ( specials.tqcontains( mFullName[i] ) ) + if ( specials.contains( mFullName[i] ) ) needsQuotes = true; else if ( mFullName[i] == '\\' || mFullName[i] == '"' ) { needsQuotes = true; diff --git a/libkpimidentities/identitycombo.cpp b/libkpimidentities/identitycombo.cpp index a33c98466..636483c74 100644 --- a/libkpimidentities/identitycombo.cpp +++ b/libkpimidentities/identitycombo.cpp @@ -66,7 +66,7 @@ void IdentityCombo::setCurrentIdentity( const Identity & identity ) { } void IdentityCombo::setCurrentIdentity( const TQString & name ) { - int idx = mIdentityManager->identities().tqfindIndex( name ); + int idx = mIdentityManager->identities().findIndex( name ); if ( idx < 0 ) return; if ( idx == currentItem() ) return; @@ -78,7 +78,7 @@ void IdentityCombo::setCurrentIdentity( const TQString & name ) { } void IdentityCombo::setCurrentIdentity( uint uoid ) { - int idx = mUoidList.tqfindIndex( uoid ); + int idx = mUoidList.findIndex( uoid ); if ( idx < 0 ) return; if ( idx == currentItem() ) return; @@ -109,7 +109,7 @@ void IdentityCombo::slotIdentityManagerChanged() { uint oldIdentity = mUoidList[ currentItem() ]; reloadUoidList(); - int idx = mUoidList.tqfindIndex( oldIdentity ); + int idx = mUoidList.findIndex( oldIdentity ); blockSignals( true ); reloadCombo(); diff --git a/libkpimidentities/identitymanager.cpp b/libkpimidentities/identitymanager.cpp index 4cc53e816..8d1fa8449 100644 --- a/libkpimidentities/identitymanager.cpp +++ b/libkpimidentities/identitymanager.cpp @@ -117,7 +117,7 @@ void IdentityManager::commit() // find added and changed identities: for ( TQValueList::ConstIterator it = mShadowIdentities.begin() ; it != mShadowIdentities.end() ; ++it ) { - TQValueList::Iterator uoid = seenUOIDs.tqfind( (*it).uoid() ); + TQValueList::Iterator uoid = seenUOIDs.find( (*it).uoid() ); if ( uoid != seenUOIDs.end() ) { const Identity & orig = identityForUoid( *uoid ); // look it up in mIdentities if ( *it != orig ) { @@ -351,7 +351,7 @@ const Identity & IdentityManager::defaultIdentity() const { bool IdentityManager::setAsDefault( const TQString & name ) { // First, check if the identity actually exists: TQStringList names = shadowIdentities(); - if ( names.tqfind( name ) == names.end() ) return false; + if ( names.find( name ) == names.end() ) return false; // Then, change the default as requested: for ( Iterator it = modifyBegin() ; it != modifyEnd() ; ++it ) (*it).setIsDefault( (*it).identityName() == name ); @@ -488,7 +488,7 @@ int IdentityManager::newUoid() do { uoid = kapp->random(); - } while ( usedUOIDs.tqfind( uoid ) != usedUOIDs.end() ); + } while ( usedUOIDs.find( uoid ) != usedUOIDs.end() ); return uoid; } diff --git a/mimelib/LICENSE b/mimelib/LICENSE index aaf47afb6..623b6258a 100644 --- a/mimelib/LICENSE +++ b/mimelib/LICENSE @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which tqcontains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it tqcontains, plus any +code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/mimelib/Tutorial b/mimelib/Tutorial index 2833dd033..dfa98156a 100644 --- a/mimelib/Tutorial +++ b/mimelib/Tutorial @@ -18,7 +18,7 @@ following objectives in mind: MIME++ classes directly model the elements of the BNF grammar specified in RFC-822, RFC-2045, and RFC-2046. For this reason, I recommend that you understand these RFCs and keep a copy of them handy as you learn MIME++. -If you know C++ well, and if you are familiar with the RFCs, you should tqfind +If you know C++ well, and if you are familiar with the RFCs, you should find MIME++ easy to learn and use. If you are new to C++ and object-oriented programming, you will find in MIME++ some very good object-oriented techinques, and hopefully you will learn a lot. @@ -94,7 +94,7 @@ broken-down representation. If you add a new DwField object (representing a new header field) to the DwHeaders object (representing the header), the is-modified flag will be set for the DwHeaders object, indicating that the string representation of the DwHeaders object will have to be re-assembled -from the header fields that it tqcontains. When a node's is-modified flag is +from the header fields that it contains. When a node's is-modified flag is set, it also notifies its tqparent node to set its is-modified flag. Thus, when the DwHeaders object's is-modified flag is set, the DwMessage object that is its tqparent will also have its is-modified flag set. That way, when diff --git a/mimelib/binhex.cpp b/mimelib/binhex.cpp index 6ea079616..735c08a30 100644 --- a/mimelib/binhex.cpp +++ b/mimelib/binhex.cpp @@ -662,14 +662,14 @@ int DwBinhex::Decode() DwBinhexDecodeCtx ctx; ctx.mBinhexChars = mBinhexChars; // Find the preamble - ctx.mPos = ctx.mBinhexChars.tqfind("(This file must be converted " + ctx.mPos = ctx.mBinhexChars.find("(This file must be converted " "with BinHex", 0); if (ctx.mPos == DwString::npos) { return -1; // error! } ctx.mPos += 40; // Advance to just past the colon - ctx.mPos = ctx.mBinhexChars.tqfind((char) ':', ctx.mPos); + ctx.mPos = ctx.mBinhexChars.find((char) ':', ctx.mPos); if (ctx.mPos == DwString::npos) { return -1; // error! } diff --git a/mimelib/doc/addrlist.html b/mimelib/doc/addrlist.html index 5a5a413fd..20a588d10 100644 --- a/mimelib/doc/addrlist.html +++ b/mimelib/doc/addrlist.html @@ -52,7 +52,7 @@ protected:

DwAddressList represents a list of addresses as described in RFC-822. In MIME++, DwAddressList is a container for objects -of type DwAddress, and it tqcontains +of type DwAddress, and it contains various member functions to manage its contained objects. DwAddressList is also a DwFieldBody. This reflects the diff --git a/mimelib/doc/body.html b/mimelib/doc/body.html index 06a3e8225..fb6c42c00 100644 --- a/mimelib/doc/body.html +++ b/mimelib/doc/body.html @@ -176,7 +176,7 @@ is not the child of a DwEntity (i.e., be determined.

This function calls the Parse() member function of any -DwBodyPart or DwMessage object it tqcontains. +DwBodyPart or DwMessage object it contains.

You should call this member function after you add a DwBodyPart object to a multipart body, or add a @@ -219,7 +219,7 @@ returns the DwMessage encapsulated in it. aMessage)

For a DwBody with content type of message, this member function -sets the DwMessage object it tqcontains. +sets the DwMessage object it contains.

static DwBody* NewBody(const DwString& aStr, DwMessageComponent* aParent) diff --git a/mimelib/doc/bodypart.html b/mimelib/doc/bodypart.html index 4021b4de3..93f281b5d 100644 --- a/mimelib/doc/bodypart.html +++ b/mimelib/doc/bodypart.html @@ -47,7 +47,7 @@ of headers and a body. A body part is different from a message in that a body part is part of a multipart body.

In MIME++, a DwBodyPart is a subclass of -DwEntity; therefore, it tqcontains +DwEntity; therefore, it contains both a DwHeaders object and a DwBody object, and it is contained in a multipart DwBody object. diff --git a/mimelib/doc/entity.html b/mimelib/doc/entity.html index c2f8d3161..64a1cdbff 100644 --- a/mimelib/doc/entity.html +++ b/mimelib/doc/entity.html @@ -58,7 +58,7 @@ be a DwMessage object. If a DwEntity object is an intermediate node, its tqparent must be a DwBody object. The child nodes of a DwEntity object are the DwHeaders and -DwBody objects it tqcontains. +DwBody objects it contains.

Since DwEntity is an abstract base class, you cannot create instances of it directly. DwEntity has two derived classes, @@ -108,7 +108,7 @@ executes the parse method for DwEntity objects. The parse method creates or updates the broken-down representation from the string representation. For DwEntity objects, the parse method parses the string representation and sets the values of the -DwHeaders and DwBody objects it tqcontains. +DwHeaders and DwBody objects it contains. This member function also calls the Parse() member functions of the contained DwHeaders and DwBody objects.

diff --git a/mimelib/doc/field.html b/mimelib/doc/field.html index 68d4a9ed3..c744877c4 100644 --- a/mimelib/doc/field.html +++ b/mimelib/doc/field.html @@ -69,14 +69,14 @@ According to RFC-822, a field contains a field name and a field body. In MIME++, a DwField contains three elements: a DwString that contains its field name, a DwString that contains its field body, and a -DwFieldBody object that tqcontains +DwFieldBody object that contains a broken-down (that is, parsed) version of its field body.

In the tree (broken-down) representation of message, a DwField object is always an intermediate node, having a tqparent node and a single child node. The tqparent node is the -DwHeaders object that tqcontains -it. The child node is the DwFieldBody object it tqcontains. +DwHeaders object that contains +it. The child node is the DwFieldBody object it contains.

To get and set the field name, use the member functions FieldNameStr() and SetFieldNameStr(). To @@ -234,7 +234,7 @@ The static member function CreateFieldBody() is called from the Parse() member function and is responsible for creating a DwFieldBody object for this particular field. A typical scenario might go as follows: This member function examines the field name -for this field, finds that it tqcontains "To", creates a +for this field, finds that it contains "To", creates a DwAddressList object to contain the field body, calls the Parse() member function for the DwAddressList, and sets the DwAddressList diff --git a/mimelib/doc/headers.html b/mimelib/doc/headers.html index 97b063adb..939b340ee 100644 --- a/mimelib/doc/headers.html +++ b/mimelib/doc/headers.html @@ -167,7 +167,7 @@ but you access it through the Headers() member function of for you.

While DwHeaders has public member functions for managing -the list of DwField objects it tqcontains, you will normally +the list of DwField objects it contains, you will normally use convenience functions to access the field bodies of the header fields directly. You can access the field body for a specific well-known header field by using the member function diff --git a/mimelib/doc/mailbox.html b/mimelib/doc/mailbox.html index 4a25dc4e7..385bd8a23 100644 --- a/mimelib/doc/mailbox.html +++ b/mimelib/doc/mailbox.html @@ -66,7 +66,7 @@ deprecated according to RFC-1123. In MIME++, an RFC-822 mailbox is represented by a DwMailbox object. DwMailbox is a subclass of DwAddress, which reflects the -fact that a mailbox is also an address. A DwMailbox tqcontains +fact that a mailbox is also an address. A DwMailbox contains strings representing the full name, local-part, route, and domain of a mailbox.

In the tree (broken-down) representation of message, a @@ -77,7 +77,7 @@ but no child nodes. Its tqparent node must be a DwMailboxList object.

DwMailbox has member functions for getting or setting the -strings it tqcontains. +strings it contains.

DwMailbox object can be included in a list of DwMailbox objects. To get the next diff --git a/mimelib/doc/mboxlist.html b/mimelib/doc/mboxlist.html index e68b41e5c..2bbe8d95e 100644 --- a/mimelib/doc/mboxlist.html +++ b/mimelib/doc/mboxlist.html @@ -54,7 +54,7 @@ protected:

DwMailboxList represents a list of mailboxes as described in RFC-822. In MIME++, DwMailboxList is a container for objects -of type DwMailbox, and it tqcontains +of type DwMailbox, and it contains various member functions to manage its contained objects. DwAddressList is also a DwFieldBody. This reflects the diff --git a/mimelib/doc/message.html b/mimelib/doc/message.html index 1a3892f74..bb3fcf220 100644 --- a/mimelib/doc/message.html +++ b/mimelib/doc/message.html @@ -44,7 +44,7 @@ A message contains both a collection of header fields and a body. In the terminology of RFC-2045, the general term for the headers-body combination is entity. In MIME++, DwMessage is a direct subclass of -DwEntity, and therefore tqcontains +DwEntity, and therefore contains both a DwHeaders object and a DwBody object.

@@ -52,7 +52,7 @@ In the tree (broken-down) representation of message, a DwMessage object is almost always a root node, having child nodes but no tqparent node. The child nodes are the DwHeaders object and the DwBody object it -tqcontains. A DwMessage may sometimes be an intermediate node. +contains. A DwMessage may sometimes be an intermediate node. In this special case, the tqparent node is a DwBody object of type "message/*" and the DwMessage object represents an encapsulated message. diff --git a/mimelib/doc/string.html b/mimelib/doc/string.html index fe16aed4d..80db3700c 100644 --- a/mimelib/doc/string.html +++ b/mimelib/doc/string.html @@ -59,25 +59,25 @@ public: DwString& insert(size_t aPos1, const char* aCstr); DwString& insert(size_t aPos1, size_t aLen2, char aChar); DwString& erase(size_t aPos=0, size_t aLen=npos); - DwString& tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr); - DwString& tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr, + DwString& replace(size_t aPos1, size_t aLen1, const DwString& aStr); + DwString& replace(size_t aPos1, size_t aLen1, const DwString& aStr, size_t aPos2, size_t aLen2); - DwString& tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, + DwString& replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2); - DwString& tqreplace(size_t aPos1, size_t aLen1, const char* aCstr); - DwString& tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); + DwString& replace(size_t aPos1, size_t aLen1, const char* aCstr); + DwString& replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); size_t copy(char* aBuf, size_t aLen, size_t aPos=0) const; void swap(DwString& aStr); const char* c_str() const; const char* data() const; - size_t tqfind(const DwString& aStr, size_t aPos=0) const; - size_t tqfind(const char* aBuf, size_t aPos, size_t aLen) const; - size_t tqfind(const char* aCstr, size_t aPos=0) const; - size_t tqfind(char aChar, size_t aPos=0) const; - size_t rtqfind(const DwString& aStr, size_t aPos=npos) const; - size_t rtqfind(const char* aBuf, size_t aPos, size_t aLen) const; - size_t rtqfind(const char* aCstr, size_t aPos=npos) const; - size_t rtqfind(char aChar, size_t aPos=npos) const; + size_t find(const DwString& aStr, size_t aPos=0) const; + size_t find(const char* aBuf, size_t aPos, size_t aLen) const; + size_t find(const char* aCstr, size_t aPos=0) const; + size_t find(char aChar, size_t aPos=0) const; + size_t rfind(const DwString& aStr, size_t aPos=npos) const; + size_t rfind(const char* aBuf, size_t aPos, size_t aLen) const; + size_t rfind(const char* aCstr, size_t aPos=npos) const; + size_t rfind(char aChar, size_t aPos=npos) const; size_t find_first_of(const DwString& aStr, size_t aPos=0) const; size_t find_first_of(const char* aBuf, size_t aPos, size_t aLen) const; size_t find_first_of(const char* aCstr, size_t aPos=0) const; @@ -115,8 +115,8 @@ protected: size_t mStart; size_t mLength; void _copy(); - void _tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2); - void _tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); + void _replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2); + void _replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); friend void mem_free(char*); public: @@ -374,14 +374,14 @@ Erases (removes) at most aLen characters beginning at position aPos from this string. The function will not erase more characters than what are available. Returns *this.

- DwString& tqreplace(size_t + DwString& replace(size_t aPos1, size_t aLen1, const DwString& aStr)
-DwString& tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr, +DwString& replace(size_t aPos1, size_t aLen1, const DwString& aStr, size_t aPos2, size_t aLen2)
-DwString& tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, size_t +DwString& replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2)
-DwString& tqreplace(size_t aPos1, size_t aLen1, const char* aCstr)
-DwString& tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) +DwString& replace(size_t aPos1, size_t aLen1, const char* aCstr)
+DwString& replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar)

Removes aLen1 characters beginning at position @@ -441,11 +441,11 @@ The characters in the returned string should not be modified, and should be considered invalid after any call to a non-const member function or another call to c_str().

- size_t tqfind(const DwString& + size_t find(const DwString& aStr, size_t aPos=0) const
-size_t tqfind(const char* aBuf, size_t aPos, size_t aLen) const
-size_t tqfind(const char* aCstr, size_t aPos=0) const
-size_t tqfind(char aChar, size_t aPos=0) const
+size_t find(const char* aBuf, size_t aPos, size_t aLen) const
+size_t find(const char* aCstr, size_t aPos=0) const
+size_t find(char aChar, size_t aPos=0) const

Performs a forward search for a sequence of characters in the DwString object. The return value is the position of the @@ -466,11 +466,11 @@ the sequence of characters in the NUL-terminated string The fourth version searches beginning at position aPos for the character aChar.

- size_t rtqfind(const DwString& + size_t rfind(const DwString& aStr, size_t aPos=npos) const
-size_t rtqfind(const char* aBuf, size_t aPos, size_t aLen) const
-size_t rtqfind(const char* aCstr, size_t aPos=npos) const
-size_t rtqfind(char aChar, size_t aPos=npos) const
+size_t rfind(const char* aBuf, size_t aPos, size_t aLen) const
+size_t rfind(const char* aCstr, size_t aPos=npos) const
+size_t rfind(char aChar, size_t aPos=npos) const

Performs a reverse search for a sequence of characters in the DwString object. The return value is the position of the diff --git a/mimelib/dwstring.cpp b/mimelib/dwstring.cpp index b8686e417..9a46bfa8b 100644 --- a/mimelib/dwstring.cpp +++ b/mimelib/dwstring.cpp @@ -365,7 +365,7 @@ DwString::DwString(const char* aBuf, size_t aLen) mRep = new_rep_reference(sEmptyRep); mStart = 0; mLength = 0; - _tqreplace(0, mLength, aBuf, aLen); + _replace(0, mLength, aBuf, aLen); } @@ -400,7 +400,7 @@ DwString::DwString(const char* aCstr) mLength = 0; if ( aCstr ) { size_t len = strlen(aCstr); - _tqreplace(0, mLength, aCstr, len); + _replace(0, mLength, aCstr, len); } } @@ -418,7 +418,7 @@ DwString::DwString(size_t aLen, char aChar) mRep = new_rep_reference(sEmptyRep); mStart = 0; mLength = 0; - _tqreplace(0, mLength, aLen, aChar); + _replace(0, mLength, aLen, aChar); } @@ -476,7 +476,7 @@ void DwString::resize(size_t aLen, char aChar) } // expanding string else if (aLen > mLength) { - _tqreplace(mLength, 0, aLen-mLength, aChar); + _replace(mLength, 0, aLen-mLength, aChar); } } @@ -534,10 +534,10 @@ DwString& DwString::append(const DwString& aStr, size_t aPos, size_t len = DW_MIN(aLen, aStr.mLength - pos); if (&aStr == this) { DwString temp(aStr); - _tqreplace(mLength, 0, &temp.mRep->mBuffer[temp.mStart+pos], len); + _replace(mLength, 0, &temp.mRep->mBuffer[temp.mStart+pos], len); } else { - _tqreplace(mLength, 0, &aStr.mRep->mBuffer[aStr.mStart+pos], len); + _replace(mLength, 0, &aStr.mRep->mBuffer[aStr.mStart+pos], len); } return *this; } @@ -547,7 +547,7 @@ DwString& DwString::append(const char* aBuf, size_t aLen) { assert(aBuf != 0); if (aBuf != 0) { - _tqreplace(mLength, 0, aBuf, aLen); + _replace(mLength, 0, aBuf, aLen); } return *this; } @@ -557,14 +557,14 @@ DwString& DwString::append(const char* aCstr) { assert(aCstr != 0); size_t len = (aCstr) ? strlen(aCstr) : 0; - _tqreplace(mLength, 0, aCstr, len); + _replace(mLength, 0, aCstr, len); return *this; } DwString& DwString::append(size_t aLen, char aChar) { - _tqreplace(mLength, 0, aLen, aChar); + _replace(mLength, 0, aLen, aChar); return *this; } @@ -601,7 +601,7 @@ DwString& DwString::assign(const char* aBuf, size_t aLen) { assert(aBuf != 0); assert(aLen != (size_t)-1); - _tqreplace(0, mLength, aBuf, aLen); + _replace(0, mLength, aBuf, aLen); return *this; } @@ -610,7 +610,7 @@ DwString& DwString::assign(const char* aCstr) { assert(aCstr != 0); size_t len = (aCstr) ? strlen(aCstr) : 0; - _tqreplace(0, mLength, aCstr, len); + _replace(0, mLength, aCstr, len); return *this; } @@ -618,7 +618,7 @@ DwString& DwString::assign(const char* aCstr) DwString& DwString::assign(size_t aLen, char aChar) { assert(aLen != (size_t)-1); - _tqreplace(0, mLength, aLen, aChar); + _replace(0, mLength, aLen, aChar); return *this; } @@ -638,10 +638,10 @@ DwString& DwString::insert(size_t aPos1, const DwString& aStr, size_t len2 = DW_MIN(aLen2, aStr.mLength - pos2); if (&aStr == this) { DwString temp(aStr); - _tqreplace(aPos1, 0, &temp.mRep->mBuffer[temp.mStart+pos2], len2); + _replace(aPos1, 0, &temp.mRep->mBuffer[temp.mStart+pos2], len2); } else { - _tqreplace(aPos1, 0, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); + _replace(aPos1, 0, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); } return *this; } @@ -650,7 +650,7 @@ DwString& DwString::insert(size_t aPos1, const DwString& aStr, DwString& DwString::insert(size_t aPos, const char* aBuf, size_t aLen) { assert(aBuf != 0); - _tqreplace(aPos, 0, aBuf, aLen); + _replace(aPos, 0, aBuf, aLen); return *this; } @@ -659,14 +659,14 @@ DwString& DwString::insert(size_t aPos, const char* aCstr) { assert(aCstr != 0); size_t len = (aCstr) ? strlen(aCstr) : 0; - _tqreplace(aPos, 0, aCstr, len); + _replace(aPos, 0, aCstr, len); return *this; } DwString& DwString::insert(size_t aPos, size_t aLen, char aChar) { - _tqreplace(aPos, 0, aLen, aChar); + _replace(aPos, 0, aLen, aChar); return *this; } @@ -676,18 +676,18 @@ DwString& DwString::erase(size_t aPos, size_t aLen) assert(aPos <= mLength); size_t pos = DW_MIN(aPos, mLength); size_t len = DW_MIN(aLen, mLength - pos); - _tqreplace(pos, len, "", 0); + _replace(pos, len, "", 0); return *this; } -DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr) +DwString& DwString::replace(size_t aPos1, size_t aLen1, const DwString& aStr) { - return tqreplace(aPos1, aLen1, aStr, 0, aStr.mLength); + return replace(aPos1, aLen1, aStr, 0, aStr.mLength); } -DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr, +DwString& DwString::replace(size_t aPos1, size_t aLen1, const DwString& aStr, size_t aPos2, size_t aLen2) { assert(aPos2 <= aStr.mLength); @@ -695,35 +695,35 @@ DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr, size_t len2 = DW_MIN(aLen2, aStr.mLength - pos2); if (&aStr == this) { DwString temp(aStr); - _tqreplace(aPos1, aLen1, &temp.mRep->mBuffer[temp.mStart+pos2], len2); + _replace(aPos1, aLen1, &temp.mRep->mBuffer[temp.mStart+pos2], len2); } else { - _tqreplace(aPos1, aLen1, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); + _replace(aPos1, aLen1, &aStr.mRep->mBuffer[aStr.mStart+pos2], len2); } return *this; } -DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, +DwString& DwString::replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2) { - _tqreplace(aPos1, aLen1, aBuf, aLen2); + _replace(aPos1, aLen1, aBuf, aLen2); return *this; } -DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, const char* aCstr) +DwString& DwString::replace(size_t aPos1, size_t aLen1, const char* aCstr) { size_t len2 = (aCstr) ? strlen(aCstr) : 0; - _tqreplace(aPos1, aLen1, aCstr, len2); + _replace(aPos1, aLen1, aCstr, len2); return *this; } -DwString& DwString::tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, +DwString& DwString::replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) { - _tqreplace(aPos1, aLen1, aLen2, aChar); + _replace(aPos1, aLen1, aLen2, aChar); return *this; } @@ -755,13 +755,13 @@ void DwString::swap(DwString& aStr) } -size_t DwString::tqfind(const DwString& aStr, size_t aPos) const +size_t DwString::find(const DwString& aStr, size_t aPos) const { - return tqfind(&aStr.mRep->mBuffer[aStr.mStart], aPos, aStr.mLength); + return find(&aStr.mRep->mBuffer[aStr.mStart], aPos, aStr.mLength); } -size_t DwString::tqfind(const char* aBuf, size_t aPos, size_t aLen) const +size_t DwString::find(const char* aBuf, size_t aPos, size_t aLen) const { assert(aBuf != 0); if (aBuf == 0) return (size_t)-1; @@ -781,16 +781,16 @@ size_t DwString::tqfind(const char* aBuf, size_t aPos, size_t aLen) const } -size_t DwString::tqfind(const char* aCstr, size_t aPos) const +size_t DwString::find(const char* aCstr, size_t aPos) const { assert(aCstr != 0); if (aCstr == 0) return (size_t)-1; size_t len = strlen(aCstr); - return tqfind(aCstr, aPos, len); + return find(aCstr, aPos, len); } -size_t DwString::tqfind(char aChar, size_t aPos) const +size_t DwString::find(char aChar, size_t aPos) const { if (aPos >= mLength) return (size_t)-1; const char* buf = mRep->mBuffer + mStart; @@ -801,13 +801,13 @@ size_t DwString::tqfind(char aChar, size_t aPos) const } -size_t DwString::rtqfind(const DwString& aStr, size_t aPos) const +size_t DwString::rfind(const DwString& aStr, size_t aPos) const { - return rtqfind(&aStr.mRep->mBuffer[aStr.mStart], aPos, aStr.mLength); + return rfind(&aStr.mRep->mBuffer[aStr.mStart], aPos, aStr.mLength); } -size_t DwString::rtqfind(const char* aBuf, size_t aPos, size_t aLen) const +size_t DwString::rfind(const char* aBuf, size_t aPos, size_t aLen) const { assert(aBuf != 0); if (aBuf == 0) return (size_t)-1; @@ -827,15 +827,15 @@ size_t DwString::rtqfind(const char* aBuf, size_t aPos, size_t aLen) const } -size_t DwString::rtqfind(const char* aCstr, size_t aPos) const +size_t DwString::rfind(const char* aCstr, size_t aPos) const { assert(aCstr != 0); size_t len = (aCstr) ? strlen(aCstr) : 0; - return rtqfind(aCstr, aPos, len); + return rfind(aCstr, aPos, len); } -size_t DwString::rtqfind(char aChar, size_t aPos) const +size_t DwString::rfind(char aChar, size_t aPos) const { size_t pos = DW_MIN(aPos, mLength - 1); const char* buf = mRep->mBuffer + mStart; @@ -1246,7 +1246,7 @@ void DwString::_copy() } -void DwString::_tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2) +void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2) { assert(aPos1 <= mLength); assert(aBuf != 0); @@ -1338,7 +1338,7 @@ void DwString::_tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, size_t a } -void DwString::_tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) +void DwString::_replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar) { assert(aPos1 <= mLength); size_t pos1 = DW_MIN(aPos1, mLength); diff --git a/mimelib/mimelib/body.h b/mimelib/mimelib/body.h index d62cb608c..129c19dc0 100644 --- a/mimelib/mimelib/body.h +++ b/mimelib/mimelib/body.h @@ -152,7 +152,7 @@ public: //. be determined. //. //. This function calls the {\tt Parse()} member function of any - //. {\tt DwBodyPart} or {\tt DwMessage} object it tqcontains. + //. {\tt DwBodyPart} or {\tt DwMessage} object it contains. //. //. You should call this member function after you add a {\tt DwBodyPart} //. object to a multipart body, or add a {\tt DwMessage} object to a @@ -189,7 +189,7 @@ public: void SetMessage(DwMessage* aMessage); //. For a {\tt DwBody} with content type of message, this member function - //. sets the {\tt DwMessage} object it tqcontains. + //. sets the {\tt DwMessage} object it contains. static DwBody* NewBody(const DwString& aStr, DwMessageComponent* aParent); //. Creates a new {\tt DwBody} object on the free store. diff --git a/mimelib/mimelib/entity.h b/mimelib/mimelib/entity.h index d1f60e7fa..1f2c3f6db 100644 --- a/mimelib/mimelib/entity.h +++ b/mimelib/mimelib/entity.h @@ -53,7 +53,7 @@ class DwBody; //. A {\tt DwEntity} object that is a root node must also be a {\tt DwMessage} //. object. If a {\tt DwEntity} object is an intermediate node, its tqparent //. must be a {\tt DwBody} object. The child nodes of a {\tt DwEntity} -//. object are the {\tt DwHeaders} and {\tt DwBody} objects it tqcontains. +//. object are the {\tt DwHeaders} and {\tt DwBody} objects it contains. //. //. Since {\tt DwEntity} is an abstract base class, you cannot create //. instances of it directly. {\tt DwEntity} has two derived classes, @@ -101,7 +101,7 @@ public: //. method creates or updates the broken-down representation from the //. string representation. For {\tt DwEntity} objects, the parse //. method parses the string representation and sets the values of - //. the {\tt DwHeaders} and {\tt DwBody} objects it tqcontains. This + //. the {\tt DwHeaders} and {\tt DwBody} objects it contains. This //. member function also calls the {\tt Parse()} member functions //. of the contained {\tt DwHeaders} and {\tt DwBody} objects. //. diff --git a/mimelib/mimelib/field.h b/mimelib/mimelib/field.h index 70f584668..eac95494d 100644 --- a/mimelib/mimelib/field.h +++ b/mimelib/mimelib/field.h @@ -52,8 +52,8 @@ class DwFieldBody; //. //. In the tree (broken-down) representation of message, a {\tt DwField} //. object is always an intermediate node, having a tqparent node and a single -//. child node. The tqparent node is the {\tt DwHeaders} object that tqcontains -//. it. The child node is the {\tt DwFieldBody} object it tqcontains. +//. child node. The tqparent node is the {\tt DwHeaders} object that contains +//. it. The child node is the {\tt DwFieldBody} object it contains. //. //. To get and set the field name, use the member functions //. {\tt FieldNameStr()} and {\tt SetFieldNameStr()}. @@ -190,7 +190,7 @@ public: //. {\tt DwFieldBody} object for this particular field. A typical //. scenario might go as follows: //. This member function examines the field name for this field, - //. finds that it tqcontains "To", creates a {\tt DwAddressList} object + //. finds that it contains "To", creates a {\tt DwAddressList} object //. to contain the field body, calls the {\tt Parse()} member //. function for the {\tt DwAddressList}, and sets the {\tt DwAddressList} //. object as this {\tt DwField} object's {\tt DwFieldBody}. diff --git a/mimelib/mimelib/headers.h b/mimelib/mimelib/headers.h index 6598cc528..a2011776e 100644 --- a/mimelib/mimelib/headers.h +++ b/mimelib/mimelib/headers.h @@ -87,7 +87,7 @@ class DwText; //. //. In the tree (broken-down) representation of a message, a {\tt DwHeaders} //. object is an intermediate node, having both a tqparent node and several -//. child nodes. The tqparent node is the {\tt DwEntity} object that tqcontains +//. child nodes. The tqparent node is the {\tt DwEntity} object that contains //. it. The child nodes are the {\tt DwField} objects in the list it manages. //. (See the man page for {\tt DwMessageComponent} for a discussion of //. the tree representation of a message.) @@ -97,7 +97,7 @@ class DwText; //. which creates the {\tt DwHeaders} object for you. //. //. While {\tt DwHeaders} has public member functions for managing the list -//. of {\tt DwField} objects it tqcontains, you will normally use convenience +//. of {\tt DwField} objects it contains, you will normally use convenience //. functions to access the field bodies of the header fields directly. //. You can access the field body for a specific well-known header field //. by using the member function {\tt ()}, where {\tt } is diff --git a/mimelib/mimelib/mailbox.h b/mimelib/mimelib/mailbox.h index 0d158ecf2..f118e38ee 100644 --- a/mimelib/mimelib/mailbox.h +++ b/mimelib/mimelib/mailbox.h @@ -41,7 +41,7 @@ //+ Description //. RFC-822 defines a {\it mailbox} as an entity that can be the recipient //. of a message. A mailbox is more specific than an {\it address}, which -//. may be either a mailbox or a {\it group}. An RFC-822 mailbox tqcontains +//. may be either a mailbox or a {\it group}. An RFC-822 mailbox contains //. a full name, a {\it local-part}, an optional {\it route}, and a //. {\it domain}. For example, in the mailbox //. @@ -53,7 +53,7 @@ //. //. In MIME++, an RFC-822 mailbox is represented by a {\tt DwMailbox} object. //. {\tt DwMailbox} is a subclass of {\tt DwAddress}, which reflects the -//. fact that a mailbox is also an address. A {\tt DwMailbox} tqcontains +//. fact that a mailbox is also an address. A {\tt DwMailbox} contains //. strings representing the full name, local-part, route, and domain //. of a mailbox. //. @@ -63,7 +63,7 @@ //. {\tt DwMailboxList} object. //. //. {\tt DwMailbox} has member functions for getting or setting the strings -//. it tqcontains. +//. it contains. //. //. {\tt DwMailbox} object can be included in a list of {\tt DwMailbox} //. objects. To get the next {\tt DwMailbox} object in a list, use the diff --git a/mimelib/mimelib/message.h b/mimelib/mimelib/message.h index 8ce31abc1..3cfac7013 100644 --- a/mimelib/mimelib/message.h +++ b/mimelib/mimelib/message.h @@ -45,7 +45,7 @@ //. In the tree (broken-down) representation of message, a {\tt DwMessage} //. object is almost always a root node, having child nodes but no tqparent node. //. The child nodes are the {\tt DwHeaders} object and the {\tt DwBody} object -//. it tqcontains. A {\tt DwMessage} may sometimes be an intermediate node. In +//. it contains. A {\tt DwMessage} may sometimes be an intermediate node. In //. this special case, the tqparent node is a {\tt DwBody} object of type //. "message/*" and the {\tt DwMessage} object represents an encapsulated //. message. diff --git a/mimelib/mimelib/string.h b/mimelib/mimelib/string.h index 556d67940..35cf4f8dd 100644 --- a/mimelib/mimelib/string.h +++ b/mimelib/mimelib/string.h @@ -285,13 +285,13 @@ public: //. available. //. Returns {\tt *this}. - DwString& tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr); - DwString& tqreplace(size_t aPos1, size_t aLen1, const DwString& aStr, + DwString& replace(size_t aPos1, size_t aLen1, const DwString& aStr); + DwString& replace(size_t aPos1, size_t aLen1, const DwString& aStr, size_t aPos2, size_t aLen2); - DwString& tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, + DwString& replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2); - DwString& tqreplace(size_t aPos1, size_t aLen1, const char* aCstr); - DwString& tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); + DwString& replace(size_t aPos1, size_t aLen1, const char* aCstr); + DwString& replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); //. Removes {\tt aLen1} characters beginning at position {\tt aPos1} //. and inserts other characters. //. Returns {\tt *this}. @@ -338,10 +338,10 @@ public: //. should be considered invalid after any call to a non-const member //. function or another call to {\tt c_str()}. - size_t tqfind(const DwString& aStr, size_t aPos=0) const; - size_t tqfind(const char* aBuf, size_t aPos, size_t aLen) const; - size_t tqfind(const char* aCstr, size_t aPos=0) const; - size_t tqfind(char aChar, size_t aPos=0) const; + size_t find(const DwString& aStr, size_t aPos=0) const; + size_t find(const char* aBuf, size_t aPos, size_t aLen) const; + size_t find(const char* aCstr, size_t aPos=0) const; + size_t find(char aChar, size_t aPos=0) const; //. Performs a forward search for a sequence of characters in the //. {\tt DwString} object. The return value is the position of the //. sequence in the string if found, or {\tt DwString::npos} if not @@ -360,10 +360,10 @@ public: //. The fourth version searches beginning at position {\tt aPos} for //. the character {\tt aChar}. - size_t rtqfind(const DwString& aStr, size_t aPos=npos) const; - size_t rtqfind(const char* aBuf, size_t aPos, size_t aLen) const; - size_t rtqfind(const char* aCstr, size_t aPos=npos) const; - size_t rtqfind(char aChar, size_t aPos=npos) const; + size_t rfind(const DwString& aStr, size_t aPos=npos) const; + size_t rfind(const char* aBuf, size_t aPos, size_t aLen) const; + size_t rfind(const char* aCstr, size_t aPos=npos) const; + size_t rfind(char aChar, size_t aPos=npos) const; //. Performs a reverse search for a sequence of characters in the //. {\tt DwString} object. The return value is the position of the //. sequence in the string if found, or {\tt DwString::npos} if not @@ -557,8 +557,8 @@ protected: size_t mLength; void _copy(); - void _tqreplace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2); - void _tqreplace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); + void _replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2); + void _replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar); private: static const size_t kEmptyBufferSize; diff --git a/plugins/kmail/bodypartformatter/text_calendar.cpp b/plugins/kmail/bodypartformatter/text_calendar.cpp index d07e6cb11..b615452a9 100644 --- a/plugins/kmail/bodypartformatter/text_calendar.cpp +++ b/plugins/kmail/bodypartformatter/text_calendar.cpp @@ -118,10 +118,10 @@ CalendarManager::CalendarManager() const TQStringList subResources = (*it)->subresources(); TQMap prefixSet; // KDE4: TQSet for ( TQStringList::ConstIterator subIt = subResources.begin(); subIt != subResources.end(); ++subIt ) { - if ( !(*subIt).tqcontains( "/.INBOX.directory/" ) ) + if ( !(*subIt).contains( "/.INBOX.directory/" ) ) // we don't care about shared folders continue; - prefixSet.insert( (*subIt).left( (*subIt).tqfind( "/.INBOX.directory/" ) ), 0 ); + prefixSet.insert( (*subIt).left( (*subIt).find( "/.INBOX.directory/" ) ), 0 ); } if ( prefixSet.count() > 1 ) multipleKolabResources = true; diff --git a/plugins/kmail/bodypartformatter/text_vcard.cpp b/plugins/kmail/bodypartformatter/text_vcard.cpp index a084aea13..9752336a7 100644 --- a/plugins/kmail/bodypartformatter/text_vcard.cpp +++ b/plugins/kmail/bodypartformatter/text_vcard.cpp @@ -133,7 +133,7 @@ namespace { #else Addressee::List al = vcc.parseVCards( vCard ); #endif - int index = path.right( path.length() - path.tqfindRev( ":" ) - 1 ).toInt(); + int index = path.right( path.length() - path.findRev( ":" ) - 1 ).toInt(); if ( index == -1 ) return true; KABC::Addressee a = al[index]; if ( a.isEmpty() ) return true; @@ -151,7 +151,7 @@ namespace { #else Addressee::List al = vcc.parseVCards( vCard ); #endif - int index = path.right( path.length() - path.tqfindRev( ":" ) - 1 ).toInt(); + int index = path.right( path.length() - path.findRev( ":" ) - 1 ).toInt(); if ( index >= 0 ) { return al[index]; } diff --git a/translate b/translate index 232c2c047..0a19b1bf1 100644 --- a/translate +++ b/translate @@ -58,7 +58,7 @@ scripts/merge_all.sh svn diff -for i in `tqfind -name kdepim`; do +for i in `find -name kdepim`; do cd $i || exit 1 for t in `svn status 2>&1 | grep '^M' | gawk '{print $2}'`; do diff --git a/wizards/groupwisewizard.cpp b/wizards/groupwisewizard.cpp index 52b6c1af2..47126b0ad 100644 --- a/wizards/groupwisewizard.cpp +++ b/wizards/groupwisewizard.cpp @@ -406,8 +406,8 @@ void GroupwiseWizard::slotAboutToShowPage( TQWidget *page ) if ( page == mEmailPage ) { if ( mEmailEdit->text().isEmpty() ) { TQString host = GroupwiseConfig::host(); - int pos = host.tqfindRev( "." ); - if ( pos > 0 ) pos = host.tqfindRev( ".", pos - 1 ); + int pos = host.findRev( "." ); + if ( pos > 0 ) pos = host.findRev( ".", pos - 1 ); if ( pos > 0 ) host = host.mid( pos + 1 ); TQString email = GroupwiseConfig::user() + "@" + host; mEmailEdit->setText( email ); diff --git a/wizards/kmailchanges.cpp b/wizards/kmailchanges.cpp index 86fd05b3f..d5a9fc8c2 100644 --- a/wizards/kmailchanges.cpp +++ b/wizards/kmailchanges.cpp @@ -280,16 +280,16 @@ void CreateDisconnectedImapAccount::apply() es.setSetting( KEMailSettings::EmailAddress, mEmail ); KPIM::IdentityManager identityManager; - if ( !identityManager.allEmails().tqcontains( mEmail ) ) { + if ( !identityManager.allEmails().contains( mEmail ) ) { // Not sure how to name the identity. First one is "Default", next one mAccountName, but then... // let's use the server name after that. TQString accountName = mAccountName; const TQStringList identities = identityManager.identities(); - if ( identities.tqfind( accountName ) != identities.end() ) { + if ( identities.find( accountName ) != identities.end() ) { accountName = mServer; int i = 2; // And if there's already one, number them - while ( identities.tqfind( accountName ) != identities.end() ) { + while ( identities.find( accountName ) != identities.end() ) { accountName = mServer + " " + TQString::number( i++ ); } } diff --git a/wizards/kolabkmailchanges.cpp b/wizards/kolabkmailchanges.cpp index a38c7fd7b..a0eef1fa9 100644 --- a/wizards/kolabkmailchanges.cpp +++ b/wizards/kolabkmailchanges.cpp @@ -108,7 +108,7 @@ void createKMailChanges( KConfigPropagator::Change::List& changes ) TQString defaultDomain = KolabConfig::self()->server(); const TQString server = KolabConfig::self()->server(); TQString user = KolabConfig::self()->user(); - int pos = user.tqfind( "@" ); + int pos = user.find( "@" ); // with kolab the userid _is_ the full email if ( pos > 0 ) { // The user typed in a full email address. Assume it's correct diff --git a/wizards/kolabwizard.cpp b/wizards/kolabwizard.cpp index 6aad529e5..651336a85 100644 --- a/wizards/kolabwizard.cpp +++ b/wizards/kolabwizard.cpp @@ -59,7 +59,7 @@ class SetupLDAPSearchAccount : public KConfigPropagator::Change // If the user gave a full email address, the domain name // of that overrides the server name for the ldap dn const TQString user = KolabConfig::self()->user(); - int pos = user.tqfind( "@" ); + int pos = user.find( "@" ); if ( pos > 0 ) { const TQString h = user.mid( pos+1 ); if ( !h.isEmpty() ) @@ -72,7 +72,7 @@ class SetupLDAPSearchAccount : public KConfigPropagator::Change c.writeEntry( "Default domain", basedn ); } - basedn.tqreplace(".",",dc="); + basedn.replace(".",",dc="); basedn.prepend("dc="); // Set the changes @@ -181,7 +181,7 @@ class KolabPropagator : public KConfigPropagator TQString user = KolabConfig::self()->user(); // We now use the full email address in the freebusy URL - //int pos = user.tqfind( "@" ); + //int pos = user.find( "@" ); //if ( pos > 0 ) user = user.left( pos ); KURL publishURL = freeBusyBaseUrl; diff --git a/wizards/servertypemanager.cpp b/wizards/servertypemanager.cpp index d7c9287f7..fec5bd120 100644 --- a/wizards/servertypemanager.cpp +++ b/wizards/servertypemanager.cpp @@ -54,7 +54,7 @@ TQStringList ServerTypeManager::identifiers() const TQString ServerTypeManager::title( const TQString& identifier ) const { - ServerTypeFactoryMap::ConstIterator it = mServerTypeFactoryMap.tqfind( identifier ); + ServerTypeFactoryMap::ConstIterator it = mServerTypeFactoryMap.find( identifier ); if ( it == mServerTypeFactoryMap.end() ) return TQString(); else @@ -63,9 +63,9 @@ TQString ServerTypeManager::title( const TQString& identifier ) const ServerType* ServerTypeManager::serverType( const TQString& identifier ) { - ServerTypeMap::ConstIterator serverIt = mServerTypeMap.tqfind( identifier ); + ServerTypeMap::ConstIterator serverIt = mServerTypeMap.find( identifier ); if ( serverIt == mServerTypeMap.end() ) { // none server type loaded yet - ServerTypeFactoryMap::Iterator it = mServerTypeFactoryMap.tqfind( identifier ); + ServerTypeFactoryMap::Iterator it = mServerTypeFactoryMap.find( identifier ); if ( it == mServerTypeFactoryMap.end() ) // no factory for this type return 0; -- cgit v1.2.1