From 9a3f0aacd44fb866833ebcb852df3cd31475cb33 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: [PATCH] rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- drkonqi/backtrace.cpp | 10 +-- drkonqi/debugger.cpp | 4 +- kappfinder/common.cpp | 10 +-- kappfinder/toplevel.cpp | 10 +-- kate/app/kateapp.cpp | 2 +- kate/app/katedocmanager.cpp | 4 +- kate/app/kateexternaltools.cpp | 10 +-- kate/app/katefileselector.cpp | 4 +- kate/app/kategrepdialog.cpp | 12 +-- kate/app/katemdi.cpp | 6 +- kate/app/kateviewmanager.cpp | 2 +- kate/app/kateviewspacecontainer.cpp | 14 ++-- kate/app/kwritemain.cpp | 4 +- kcminit/main.cpp | 4 +- kcontrol/background/bgadvanced.cpp | 4 +- kcontrol/background/bgdialog.cpp | 22 ++--- kcontrol/background/bgrender.cpp | 14 ++-- kcontrol/background/bgsettings.cpp | 22 ++--- kcontrol/clock/dtime.cpp | 8 +- kcontrol/clock/tzone.cpp | 2 +- kcontrol/colors/colorscm.cpp | 8 +- kcontrol/colors/widgetcanvas.cpp | 6 +- kcontrol/crypto/crypto.cpp | 20 ++--- kcontrol/css/template.cpp | 6 +- kcontrol/display/display.cpp | 2 +- kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp | 2 +- .../plugins/ikws/kuriikwsfiltereng.cpp | 44 +++++----- .../plugins/ikws/searchproviderdlg.cpp | 4 +- .../localdomain/localdomainurifilter.cpp | 6 +- .../plugins/shorturi/kshorturifilter.cpp | 30 +++---- kcontrol/filetypes/filetypesview.cpp | 8 +- kcontrol/filetypes/typeslistitem.cpp | 22 ++--- kcontrol/fonts/kxftconfig.cpp | 36 ++++---- kcontrol/icons/icons.cpp | 8 +- kcontrol/icons/iconthemes.cpp | 2 +- kcontrol/info/info_fbsd.cpp | 26 +++--- kcontrol/info/info_linux.cpp | 14 ++-- kcontrol/info/info_netbsd.cpp | 16 ++-- kcontrol/info/info_openbsd.cpp | 12 +-- kcontrol/info/info_svr4.cpp | 4 +- kcontrol/info/opengl.cpp | 8 +- kcontrol/input/core/themepage.cpp | 2 +- kcontrol/input/xcursor/themepage.cpp | 16 ++-- kcontrol/ioslaveinfo/kcmioslaveinfo.cpp | 10 +-- kcontrol/joystick/joywidget.cpp | 6 +- kcontrol/kcontrol/helpwidget.cpp | 2 +- kcontrol/kcontrol/moduleiconview.cpp | 2 +- kcontrol/kcontrol/modulemenu.cpp | 4 +- kcontrol/kcontrol/modules.cpp | 8 +- kcontrol/kcontrol/moduletreeview.cpp | 4 +- kcontrol/kcontrol/toplevel.cpp | 2 +- kcontrol/kded/kcmkded.cpp | 12 +-- kcontrol/kdm/kbackedcombobox.cpp | 2 +- kcontrol/kdm/kdm-appear.cpp | 4 +- kcontrol/kdm/kdm-conv.cpp | 10 +-- kcontrol/kdm/kdm-users.cpp | 12 +-- kcontrol/kdm/main.cpp | 16 ++-- kcontrol/keys/commandShortcuts.cpp | 4 +- kcontrol/keys/kaccelaction.h | 2 +- kcontrol/keys/keyconfig.cpp | 12 +-- kcontrol/keys/shortcuts.cpp | 12 +-- kcontrol/keys/treeview.cpp | 14 ++-- .../kfontinst/kcmfontinst/KCmFontInst.cpp | 6 +- kcontrol/kfontinst/kfile-plugin/KFileFont.cpp | 68 +++++++-------- kcontrol/kfontinst/kfontinst/FontEngine.cpp | 2 +- kcontrol/kfontinst/kfontinst/Fontmap.cpp | 14 ++-- kcontrol/kfontinst/kfontinst/Main.cpp | 2 +- kcontrol/kfontinst/kfontinst/XConfig.cpp | 4 +- kcontrol/kfontinst/kio/KioFonts.cpp | 48 +++++------ kcontrol/kfontinst/kio/KioFonts.h | 2 +- kcontrol/kfontinst/lib/FcEngine.cpp | 56 ++++++------- kcontrol/kfontinst/lib/Misc.cpp | 14 ++-- kcontrol/kicker/advancedDialog.cpp | 2 +- kcontrol/kicker/applettab_impl.cpp | 4 +- kcontrol/kicker/lookandfeeltab_impl.cpp | 12 +-- kcontrol/kicker/main.cpp | 2 +- kcontrol/kicker/positiontab_impl.cpp | 2 +- kcontrol/kio/fakeuaprovider.cpp | 26 +++--- kcontrol/kio/kcookiesmanagement.cpp | 2 +- kcontrol/kio/kcookiespolicies.cpp | 2 +- kcontrol/kio/kmanualproxydlg.cpp | 2 +- kcontrol/kio/policydlg.h | 6 +- kcontrol/kio/smbrodlg.cpp | 2 +- kcontrol/kio/uagentproviderdlg.cpp | 2 +- kcontrol/kio/useragentdlg.cpp | 26 +++--- kcontrol/konq/desktopbehavior_impl.cpp | 6 +- kcontrol/konqhtml/domainlistview.cpp | 2 +- kcontrol/konqhtml/filteropts.cpp | 4 +- kcontrol/konqhtml/jspolicies.cpp | 10 +-- kcontrol/konsole/schemaeditor.cpp | 4 +- kcontrol/krdb/krdb.cpp | 12 +-- kcontrol/kthememanager/ktheme.cpp | 16 ++-- kcontrol/kthememanager/kthememanager.cpp | 6 +- kcontrol/locale/kcmlocale.cpp | 14 ++-- kcontrol/locale/localemon.cpp | 2 +- kcontrol/locale/localenum.cpp | 2 +- kcontrol/privacy/kprivacymanager.cpp | 2 +- kcontrol/randr/krandrmodule.cpp | 18 ++-- kcontrol/randr/krandrpassivepopup.cpp | 6 +- kcontrol/randr/krandrtray.cpp | 2 +- kcontrol/samba/kcmsambaimports.cpp | 14 ++-- kcontrol/samba/kcmsambastatistics.cpp | 16 ++-- kcontrol/samba/ksmbstatus.cpp | 20 ++--- kcontrol/screensaver/saverconfig.cpp | 2 +- kcontrol/screensaver/scrnsave.cpp | 4 +- kcontrol/style/kcmstyle.cpp | 10 +-- kcontrol/usbview/kcmusb.cpp | 8 +- kcontrol/usbview/usbdevices.cpp | 6 +- kdcop/kdcoplistview.cpp | 8 +- kdcop/kdcopwindow.cpp | 10 +-- kdebugdialog/kdebugdialog.cpp | 2 +- kdebugdialog/klistdebugdialog.cpp | 8 +- kdebugdialog/main.cpp | 2 +- kdepasswd/kcm/chfnprocess.cpp | 8 +- kdepasswd/passwd.cpp | 4 +- kdeprint/descriptions/sortthem.cpp | 2 +- kdeprint/kdeprintfax/conffilters.cpp | 2 +- kdeprint/kdeprintfax/defcmds.cpp | 2 +- kdeprint/kdeprintfax/faxab.cpp | 2 +- kdeprint/kdeprintfax/faxctrl.cpp | 20 ++--- kdeprint/kdeprintfax/kdeprintfax.cpp | 12 +-- kdeprint/kjobviewer/kjobviewer.cpp | 4 +- kdeprint/slave/kio_print.cpp | 4 +- kdesktop/desktop.cc | 6 +- kdesktop/init.cc | 2 +- kdesktop/kcustommenu.cc | 2 +- kdesktop/kdiconview.cc | 20 ++--- kdesktop/kxdglauncher.cpp | 6 +- kdesktop/lock/lockdlg.cc | 2 +- kdesktop/lock/lockprocess.cc | 2 +- kdesktop/lock/main.cc | 2 +- kdesktop/main.cc | 2 +- kdesktop/minicli.cpp | 8 +- kdesktop/pixmapserver.cc | 24 +++--- kdesu/kdesud/handler.cpp | 6 +- kdesu/kdesud/kdesud.cpp | 2 +- kdesu/kdesud/repo.cpp | 14 ++-- kdialog/kdialog.cpp | 4 +- kdm/kfrontend/kconsole.cpp | 2 +- kdm/kfrontend/kdmshutdown.cpp | 4 +- kdm/kfrontend/kgdialog.cpp | 2 +- kdm/kfrontend/kgreeter.cpp | 16 ++-- kdm/kfrontend/kgverify.cpp | 4 +- kdm/kfrontend/themer/kdmitem.cpp | 18 ++-- kdm/kfrontend/themer/kdmlabel.cpp | 6 +- kdm/kfrontend/themer/kdmpixmap.cpp | 2 +- kdm/kfrontend/themer/kdmthemer.cpp | 4 +- kdmlib/dmctl.cpp | 18 ++-- kdmlib/kgreet_classic.cpp | 8 +- kdmlib/kgreet_winbind.cpp | 16 ++-- kfind/kdatecombo.cpp | 4 +- kfind/kfinddlg.cpp | 2 +- kfind/kftabdlg.cpp | 4 +- kfind/kfwin.cpp | 2 +- kfind/kquery.cpp | 18 ++-- khelpcenter/docentry.cpp | 2 +- khelpcenter/docmetainfo.cpp | 4 +- khelpcenter/formatter.cpp | 6 +- khelpcenter/glossary.cpp | 2 +- khelpcenter/history.cpp | 2 +- khelpcenter/htmlsearch/htmlsearch.cpp | 10 +-- khelpcenter/htmlsearch/kcmhtmlsearch.cpp | 4 +- khelpcenter/htmlsearch/ktagcombobox.cpp | 6 +- khelpcenter/infotree.cpp | 8 +- khelpcenter/kcmhelpcenter.cpp | 10 +-- khelpcenter/navigator.cpp | 6 +- khelpcenter/scrollkeepertreebuilder.cpp | 2 +- khelpcenter/searchengine.cpp | 38 ++++----- khelpcenter/searchhandler.cpp | 18 ++-- khelpcenter/toc.cpp | 2 +- khelpcenter/view.cpp | 4 +- khotkeys/app/app.cpp | 2 +- khotkeys/kcontrol/condition_list_widget.cpp | 2 +- khotkeys/shared/actions.cpp | 8 +- khotkeys/shared/gestures.cpp | 4 +- khotkeys/shared/input.cpp | 8 +- khotkeys/shared/khotkeysglobal.cpp | 2 +- khotkeys/shared/settings.cpp | 2 +- khotkeys/shared/triggers.cpp | 8 +- khotkeys/shared/voices.cpp | 4 +- khotkeys/shared/windows.cpp | 4 +- kicker/applets/clock/clock.cpp | 22 ++--- kicker/applets/clock/zone.cpp | 4 +- kicker/applets/launcher/quickaddappsmenu.cpp | 2 +- kicker/applets/launcher/quickbutton.cpp | 2 +- kicker/applets/launcher/quicklauncher.cpp | 2 +- kicker/applets/media/mediaapplet.cpp | 6 +- kicker/applets/media/preferencesdialog.cpp | 4 +- kicker/applets/minipager/pagerbutton.cpp | 4 +- kicker/applets/naughty/NaughtyApplet.cpp | 2 +- .../applets/naughty/NaughtyProcessMonitor.cpp | 14 ++-- kicker/applets/swallow/swallow.cpp | 2 +- .../applets/systemtray/systemtrayapplet.cpp | 18 ++-- .../extensions/dockbar/dockbarextension.cpp | 2 +- kicker/extensions/kasbar/kasbar.cpp | 2 +- kicker/extensions/kasbar/kasbar.h | 2 +- kicker/extensions/kasbar/kastaskitem.cpp | 2 +- kicker/kicker/buttons/knewbutton.cpp | 6 +- kicker/kicker/core/applethandle.cpp | 4 +- kicker/kicker/core/container_extension.cpp | 4 +- kicker/kicker/core/containerarea.cpp | 8 +- kicker/kicker/core/containerarealayout.cpp | 4 +- kicker/kicker/core/extensionmanager.cpp | 8 +- kicker/kicker/core/main.cpp | 2 +- kicker/kicker/core/pluginmanager.cpp | 4 +- kicker/kicker/kicker-3.4-reverseLayout.cpp | 2 +- .../kicker/plugins/kickoff-beagle-plugin.cpp | 10 +-- kicker/kicker/ui/addapplet.cpp | 6 +- kicker/kicker/ui/addapplet_mnu.cpp | 4 +- kicker/kicker/ui/addbutton_mnu.cpp | 2 +- kicker/kicker/ui/addextension_mnu.cpp | 2 +- kicker/kicker/ui/appletop_mnu.cpp | 2 +- kicker/kicker/ui/browser_mnu.cpp | 14 ++-- kicker/kicker/ui/exe_dlg.cpp | 4 +- kicker/kicker/ui/itemview.cpp | 14 ++-- kicker/kicker/ui/k_mnu.cpp | 2 +- kicker/kicker/ui/k_new_mnu.cpp | 82 +++++++++---------- kicker/kicker/ui/kickoff_bar.cpp | 4 +- kicker/kicker/ui/query.cpp | 4 +- kicker/kicker/ui/removeapplet_mnu.cpp | 2 +- kicker/kicker/ui/removeextension_mnu.cpp | 2 +- kicker/kicker/ui/service_mnu.cpp | 34 ++++---- kicker/libkicker/global.cpp | 2 +- kicker/libkicker/panelbutton.cpp | 6 +- kicker/menuext/kate/katesessionmenu.cpp | 2 +- .../menuext/konsole/konsolebookmarkmenu.cpp | 2 +- kicker/menuext/prefmenu/prefmenu.cpp | 12 +-- kicker/menuext/recentdocs/recentdocsmenu.cpp | 8 +- kicker/menuext/remote/remotemenu.cpp | 4 +- kicker/menuext/system/systemmenu.cpp | 2 +- kicker/menuext/tom/tom.cc | 14 ++-- kicker/taskbar/taskbar.cpp | 20 ++--- kicker/taskbar/taskcontainer.cpp | 12 +-- kicker/taskbar/taskcontainer.h | 6 +- kicker/taskmanager/tasklmbmenu.cpp | 2 +- kicker/taskmanager/taskmanager.cpp | 14 ++-- kicker/taskmanager/taskmanager.h | 2 +- kicker/taskmanager/taskrmbmenu.cpp | 4 +- kioslave/cgi/cgi.cpp | 6 +- kioslave/finger/kio_finger.cpp | 2 +- kioslave/fish/fish.cpp | 36 ++++---- kioslave/floppy/kio_floppy.cpp | 26 +++--- kioslave/home/homeimpl.cpp | 4 +- kioslave/home/kdedmodule/homedirnotify.cpp | 4 +- kioslave/info/info.cc | 4 +- kioslave/ldap/kio_ldap.cpp | 6 +- kioslave/mac/kio_mac.cpp | 34 ++++---- kioslave/man/kio_man.cpp | 76 ++++++++--------- kioslave/man/man2html.cpp | 36 ++++---- kioslave/media/kcmodule/notifiermodule.cpp | 2 +- .../media/kcmodule/serviceconfigdialog.cpp | 2 +- .../libmediacommon/actionlistboxitem.cpp | 2 +- kioslave/media/libmediacommon/medium.cpp | 2 +- kioslave/media/libmediacommon/medium.h | 4 +- .../media/libmediacommon/notifieraction.cpp | 2 +- .../libmediacommon/notifieropenaction.cpp | 2 +- .../libmediacommon/notifierserviceaction.cpp | 4 +- .../media/libmediacommon/notifiersettings.cpp | 10 +-- kioslave/media/mediaimpl.cpp | 2 +- kioslave/media/mediamanager/fstabbackend.cpp | 80 +++++++++--------- kioslave/media/mediamanager/halbackend.cpp | 40 ++++----- .../media/mediamanager/linuxcdpolling.cpp | 16 ++-- kioslave/media/mediamanager/medialist.cpp | 22 ++--- .../media/mediamanager/removablebackend.cpp | 16 ++-- .../media/medianotifier/medianotifier.cpp | 4 +- .../mounthelper/kio_media_mounthelper.cpp | 4 +- .../media/propsdlgplugin/propertiespage.cpp | 50 +++++------ kioslave/nfs/kio_nfs.cpp | 22 ++--- kioslave/nntp/nntp.cpp | 30 +++---- kioslave/pop3/pop3.cc | 22 ++--- .../remote/kdedmodule/remotedirnotify.cpp | 2 +- kioslave/remote/kio_remote.cpp | 4 +- kioslave/remote/remoteimpl.cpp | 2 +- kioslave/sftp/ksshprocess.cpp | 50 +++++------ kioslave/sftp/process.cpp | 6 +- kioslave/smb/kio_smb_auth.cpp | 2 +- kioslave/smb/kio_smb_browse.cpp | 12 +-- kioslave/smb/kio_smb_mount.cpp | 2 +- kioslave/smtp/capabilities.h | 2 +- kioslave/smtp/interactivesmtpserver.h | 8 +- kioslave/smtp/request.cc | 4 +- kioslave/smtp/smtp.cc | 2 +- kioslave/smtp/test_commands.cc | 2 +- .../system/kdedmodule/systemdirnotify.cpp | 2 +- kioslave/system/systemimpl.cpp | 4 +- kioslave/tar/tar.cc | 2 +- kioslave/thumbnail/textcreator.cpp | 2 +- kioslave/thumbnail/thumbnail.cpp | 2 +- kioslave/trash/ktrash.cpp | 2 +- kioslave/trash/testtrash.cpp | 14 ++-- kioslave/trash/trashimpl.cpp | 8 +- klipper/popupproxy.cpp | 4 +- klipper/urlgrabber.cpp | 10 +-- kmenuedit/menufile.cpp | 6 +- kmenuedit/menuinfo.cpp | 10 +-- kmenuedit/treeview.cpp | 26 +++--- knetattach/knetattach.ui.h | 2 +- konqueror/KonquerorIface.cc | 2 +- konqueror/about/konq_aboutpage.cc | 4 +- konqueror/client/kfmclient.cc | 2 +- konqueror/iconview/konq_iconview.cc | 2 +- konqueror/keditbookmarks/kbookmarkmerger.cpp | 2 +- konqueror/keditbookmarks/listview.cpp | 10 +-- konqueror/keditbookmarks/testlink.cpp | 10 +-- konqueror/konq_actions.cc | 2 +- konqueror/konq_combo.cc | 10 +-- konqueror/konq_factory.cc | 2 +- konqueror/konq_guiclients.cc | 2 +- konqueror/konq_main.cc | 2 +- konqueror/konq_mainwindow.cc | 82 +++++++++---------- konqueror/konq_profiledlg.cc | 8 +- konqueror/konq_view.cc | 14 ++-- konqueror/konq_viewmgr.cc | 8 +- konqueror/listview/konq_infolistviewwidget.cc | 4 +- konqueror/listview/konq_listview.cc | 4 +- konqueror/listview/konq_listviewwidget.cc | 14 ++-- konqueror/listview/konq_textviewwidget.cc | 2 +- konqueror/listview/konq_treeviewwidget.cc | 2 +- .../kremoteencodingplugin.cpp | 2 +- konqueror/sidebar/konqsidebar.cpp | 2 +- konqueror/sidebar/sidebar_widget.cpp | 26 +++--- .../trees/bookmark_module/bookmark_module.cpp | 2 +- .../trees/dirtree_module/dirtree_item.cpp | 2 +- .../trees/dirtree_module/dirtree_module.cpp | 2 +- .../trees/history_module/history_module.cpp | 6 +- konqueror/sidebar/trees/konq_sidebartree.cpp | 10 +-- .../trees/konq_sidebartreetoplevelitem.cpp | 2 +- konqueror/sidebar/trees/konqsidebar_tree.cpp | 2 +- konsole/konsole/TEHistory.cpp | 2 +- konsole/konsole/TEWidget.cpp | 8 +- konsole/konsole/TEmulation.cpp | 8 +- konsole/konsole/keytrans.cpp | 10 +-- konsole/konsole/konsole.cpp | 82 +++++++++---------- konsole/konsole/konsole_part.cpp | 4 +- konsole/konsole/konsolebookmarkmenu.cpp | 2 +- konsole/konsole/main.cpp | 4 +- konsole/konsole/schema.cpp | 4 +- konsole/konsole/session.cpp | 6 +- kpager/desktop.cpp | 8 +- kpersonalizer/kcountrypage.cpp | 8 +- kpersonalizer/kfindlanguage.cpp | 22 ++--- kpersonalizer/ksysinfo.cpp | 30 +++---- kscreensaver/random.cpp | 4 +- ksmserver/legacy.cpp | 10 +-- ksmserver/server.cpp | 12 +-- ksmserver/shutdowndlg.cpp | 14 ++-- ksmserver/startup.cpp | 4 +- ksplashml/kcmksplash/installer.cpp | 12 +-- ksplashml/themeengine/objkstheme.cpp | 2 +- ksplashml/themeengine/themeengine.cpp | 2 +- kstart/kstart.cpp | 6 +- ksysguard/gui/SensorDisplayLib/LogFile.cc | 2 +- ksysguard/gui/SensorDisplayLib/ProcessList.cc | 8 +- .../gui/SensorDisplayLib/SensorDisplay.cc | 2 +- ksysguard/gui/WorkSheet.cc | 2 +- ksysguard/gui/Workspace.cc | 18 ++-- ksysguard/gui/ksgrd/SensorAgent.cc | 2 +- ksysguard/gui/ksgrd/SensorManager.cc | 16 ++-- ksysguard/gui/ksysguard.cc | 8 +- kwin/activation.cpp | 6 +- kwin/bridge.cpp | 2 +- kwin/client.cpp | 10 +-- kwin/clients/b2/b2client.cpp | 2 +- kwin/clients/keramik/embedtool.cpp | 4 +- kwin/clients/keramik/keramik.cpp | 4 +- kwin/clients/kwmtheme/kwmthemeclient.cpp | 2 +- kwin/clients/plastik/plastikclient.cpp | 22 ++--- kwin/clients/quartz/quartz.cpp | 2 +- kwin/events.cpp | 4 +- kwin/geometry.cpp | 12 +-- kwin/group.cpp | 30 +++---- kwin/kcmkwin/kwindecoration/buttons.cpp | 42 +++++----- kwin/kcmkwin/kwinoptions/windows.cpp | 2 +- kwin/kcmkwin/kwinrules/main.cpp | 2 +- kwin/layers.cpp | 18 ++-- kwin/lib/kdecoration_plugins_p.cpp | 2 +- kwin/lib/kdecorationfactory.cpp | 2 +- kwin/main.cpp | 2 +- kwin/manage.cpp | 2 +- kwin/options.cpp | 2 +- kwin/rules.cpp | 2 +- kwin/rules.h | 4 +- kwin/sm.cpp | 4 +- kwin/tabbox.cpp | 18 ++-- kwin/useractions.cpp | 4 +- kwin/workspace.cpp | 40 ++++----- kxkb/extension.cpp | 6 +- kxkb/kcmlayout.cpp | 16 ++-- kxkb/kxkb.cpp | 4 +- kxkb/kxkbconfig.cpp | 18 ++-- kxkb/pixmap.cpp | 2 +- kxkb/rules.cpp | 12 +-- kxkb/x11helper.cpp | 38 ++++----- libkonq/favicons/favicons.cpp | 4 +- libkonq/kivdirectoryoverlay.cc | 2 +- libkonq/knewmenu.cc | 6 +- libkonq/konq_historymgr.cc | 6 +- libkonq/konq_iconviewwidget.cc | 20 ++--- libkonq/konq_pixmapprovider.cc | 4 +- libkonq/konq_popupmenu.cc | 30 +++---- libkonq/konq_propsview.cc | 18 ++-- libkonq/konq_propsview.h | 2 +- libkonq/konq_settings.cc | 4 +- libkonq/konq_sound.cc | 2 +- libkonq/konq_undo.cc | 8 +- nsplugins/nspluginloader.cpp | 2 +- nsplugins/plugin_part.cpp | 4 +- nsplugins/pluginscan.cpp | 16 ++-- nsplugins/viewer/nsplugin.cpp | 2 +- nsplugins/viewer/qxteventloop.cpp | 6 +- 410 files changed, 1915 insertions(+), 1915 deletions(-) diff --git a/drkonqi/backtrace.cpp b/drkonqi/backtrace.cpp index acc09e2cc..3cd86fc22 100644 --- a/drkonqi/backtrace.cpp +++ b/drkonqi/backtrace.cpp @@ -137,7 +137,7 @@ bool BackTrace::usefulBacktrace() { // remove crap if( !m_krashconf->removeFromBacktraceRegExp().isEmpty()) - m_strBt.tqreplace(TQRegExp( m_krashconf->removeFromBacktraceRegExp()), TQString()); + m_strBt.replace(TQRegExp( m_krashconf->removeFromBacktraceRegExp()), TQString()); if( m_krashconf->disableChecks()) return true; @@ -146,16 +146,16 @@ bool BackTrace::usefulBacktrace() // how many " ?? " in the bt ? int unknown = 0; if( !m_krashconf->invalidStackFrameRegExp().isEmpty()) - unknown = strBt.tqcontains( TQRegExp( m_krashconf->invalidStackFrameRegExp())); + unknown = strBt.contains( TQRegExp( m_krashconf->invalidStackFrameRegExp())); // how many stack frames in the bt ? int frames = 0; if( !m_krashconf->frameRegExp().isEmpty()) - frames = strBt.tqcontains( TQRegExp( m_krashconf->frameRegExp())); + frames = strBt.contains( TQRegExp( m_krashconf->frameRegExp())); else - frames = strBt.tqcontains('\n'); + frames = strBt.contains('\n'); bool tooShort = false; if( !m_krashconf->neededInValidBacktraceRegExp().isEmpty()) - tooShort = ( strBt.tqfind( TQRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 ); + tooShort = ( strBt.find( TQRegExp( m_krashconf->neededInValidBacktraceRegExp())) == -1 ); return !m_strBt.isNull() && !tooShort && (unknown < frames); } diff --git a/drkonqi/debugger.cpp b/drkonqi/debugger.cpp index b63025563..d90fc38d3 100644 --- a/drkonqi/debugger.cpp +++ b/drkonqi/debugger.cpp @@ -110,8 +110,8 @@ void KrashDebugger :: slotSave() else { TQString defname = m_krashconf->execName() + TQString::tqfromLatin1( ".kcrash" ); - if( defname.tqcontains( '/' )) - defname = defname.mid( defname.tqfindRev( '/' ) + 1 ); + if( defname.contains( '/' )) + defname = defname.mid( defname.findRev( '/' ) + 1 ); TQString filename = KFileDialog::getSaveFileName(defname, TQString::null, this, i18n("Select Filename")); if (!filename.isEmpty()) { diff --git a/kappfinder/common.cpp b/kappfinder/common.cpp index c5cea0df5..71ae2319e 100644 --- a/kappfinder/common.cpp +++ b/kappfinder/common.cpp @@ -61,13 +61,13 @@ bool scanDesktopFile( TQPtrList &appCache, const TQString &templ, // find out the name of the file to store destName = templ; - int pos = templ.tqfind( "kappfinder/apps/" ); + int pos = templ.find( "kappfinder/apps/" ); if ( pos > 0 ) destName = destName.mid( pos + strlen( "kappfinder/apps/" ) ); // calculate real dir and filename destName = destDir + destName; - pos = destName.tqfindRev( '/' ); + pos = destName.findRev( '/' ); if ( pos > 0 ) { destDir = destName.left( pos ); destName = destName.mid( pos + 1 ); @@ -77,7 +77,7 @@ bool scanDesktopFile( TQPtrList &appCache, const TQString &templ, TQString exec = desktop.readPathEntry( "TryExec" ); if ( exec.isEmpty() ) exec = desktop.readPathEntry( "Exec" ); - pos = exec.tqfind( ' ' ); + pos = exec.find( ' ' ); if ( pos > 0 ) exec = exec.left( pos ); @@ -117,7 +117,7 @@ void createDesktopFiles( TQPtrList &appCache, int &added ) destDir += "/"; TQDir d; int pos = -1; - while ( ( pos = destDir.tqfind( '/', pos + 1 ) ) >= 0 ) { + while ( ( pos = destDir.find( '/', pos + 1 ) ) >= 0 ) { TQString path = destDir.left( pos + 1 ); d = path; if ( !d.exists() ) @@ -144,7 +144,7 @@ void decorateDirs( TQString destDir ) for ( it = dirs.begin(); it != dirs.end(); ++it ) { // find out the name of the file to store TQString destName = *it; - int pos = destName.tqfind( "kappfinder/apps/" ); + int pos = destName.find( "kappfinder/apps/" ); if ( pos > 0 ) destName = destName.mid( pos + strlen( "kappfinder/apps/" ) ); diff --git a/kappfinder/toplevel.cpp b/kappfinder/toplevel.cpp index 389beacda..e5cf13ec8 100644 --- a/kappfinder/toplevel.cpp +++ b/kappfinder/toplevel.cpp @@ -100,7 +100,7 @@ TopLevel::TopLevel( const TQString &destDir, TQWidget *parent, const char *name adjustSize(); mDestDir = destDir; - mDestDir = mDestDir.tqreplace( TQRegExp( "^~/" ), TQDir::homeDirPath() + "/" ); + mDestDir = mDestDir.replace( TQRegExp( "^~/" ), TQDir::homeDirPath() + "/" ); KStartupInfo::appStarted(); @@ -183,9 +183,9 @@ void TopLevel::slotScan() mProgress->setProgress( mProgress->progress() + 1 ); TQString desktopName = *it; - int i = desktopName.tqfindRev('/'); + int i = desktopName.findRev('/'); desktopName = desktopName.mid(i+1); - i = desktopName.tqfindRev('.'); + i = desktopName.findRev('.'); if (i != -1) desktopName = desktopName.left(i); @@ -207,9 +207,9 @@ void TopLevel::slotScan() // copy over the desktop file, if exists if ( scanDesktopFile( mAppCache, *it, mDestDir ) ) { TQString relPath = *it; - int pos = relPath.tqfind( "kappfinder/apps/" ); + int pos = relPath.find( "kappfinder/apps/" ); relPath = relPath.mid( pos + strlen( "kappfinder/apps/" ) ); - relPath = relPath.left( relPath.tqfindRev( '/' ) + 1 ); + relPath = relPath.left( relPath.findRev( '/' ) + 1 ); TQStringList dirList = TQStringList::split( '/', relPath ); TQListViewItem *dirItem = 0; diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp index 3518c6308..9d9c7ba15 100644 --- a/kate/app/kateapp.cpp +++ b/kate/app/kateapp.cpp @@ -375,7 +375,7 @@ KateMainWindow *KateApp::activeMainWindow () if (m_mainWindows.isEmpty()) return 0; - int n = m_mainWindows.tqfindIndex ((KateMainWindow *)activeWindow()); + int n = m_mainWindows.findIndex ((KateMainWindow *)activeWindow()); if (n < 0) n=0; diff --git a/kate/app/katedocmanager.cpp b/kate/app/katedocmanager.cpp index 7674935b4..5ef081de7 100644 --- a/kate/app/katedocmanager.cpp +++ b/kate/app/katedocmanager.cpp @@ -194,7 +194,7 @@ const KateDocumentInfo *KateDocManager::documentInfo (Kate::Document *doc) int KateDocManager::findDocument (Kate::Document *doc) { - return m_docList.tqfind (doc); + return m_docList.find (doc); } uint KateDocManager::documents () @@ -306,7 +306,7 @@ bool KateDocManager::closeDocument(class Kate::Document *doc,bool closeURL) KateApp::self()->mainWindow(i)->viewManager()->closeViews(documentNumber); } - if ( closeURL && m_tempFiles.tqcontains( documentNumber ) ) + if ( closeURL && m_tempFiles.contains( documentNumber ) ) { TQFileInfo fi( m_tempFiles[ documentNumber ].first.path() ); if ( fi.lastModified() <= m_tempFiles[ documentNumber ].second /*|| diff --git a/kate/app/kateexternaltools.cpp b/kate/app/kateexternaltools.cpp index 1a2d60a53..4ed9c3d95 100644 --- a/kate/app/kateexternaltools.cpp +++ b/kate/app/kateexternaltools.cpp @@ -127,7 +127,7 @@ bool KateExternalTool::checkExec() bool KateExternalTool::valid( const TQString &mt ) const { - return mimetypes.isEmpty() || mimetypes.tqcontains( mt ); + return mimetypes.isEmpty() || mimetypes.contains( mt ); } //END KateExternalTool @@ -330,8 +330,8 @@ void KateExternalToolsMenuAction::reload() bool sepadded = false; for (TQStringList::iterator itg = dtools.begin(); itg != dtools.end(); ++itg ) { - if ( ! tools.tqcontains( *itg ) && - ! removed.tqcontains( *itg ) ) + if ( ! tools.contains( *itg ) && + ! removed.contains( *itg ) ) { if ( ! sepadded ) { @@ -394,7 +394,7 @@ void KateExternalToolsMenuAction::slotDocumentChanged() if ( action ) { l = action->tool->mimetypes; - b = ( ! l.count() || l.tqcontains( mt ) ); + b = ( ! l.count() || l.contains( mt ) ); action->setEnabled( b ); } } @@ -745,7 +745,7 @@ void KateExternalToolsConfigWidget::slotNew() // This is sticky, it does not change again, so that shortcuts sticks // TODO check for dups - t->acname = "externaltool_" + TQString(t->name).tqreplace( TQRegExp("\\W+"), "" ); + t->acname = "externaltool_" + TQString(t->name).replace( TQRegExp("\\W+"), "" ); new ToolItem ( lbTools, t->icon.isEmpty() ? blankIcon() : SmallIcon( t->icon ), t ); diff --git a/kate/app/katefileselector.cpp b/kate/app/katefileselector.cpp index fb1a3187b..3a01cda28 100644 --- a/kate/app/katefileselector.cpp +++ b/kate/app/katefileselector.cpp @@ -692,13 +692,13 @@ void KFSConfigPage::init() KAction *ac; TQListBox *lb; for ( TQStringList::Iterator it=allActions.begin(); it != allActions.end(); ++it ) { - lb = l.tqcontains( *it ) ? acSel->selectedListBox() : acSel->availableListBox(); + lb = l.contains( *it ) ? acSel->selectedListBox() : acSel->availableListBox(); if ( *it == "bookmarks" || *it == "sync_dir" ) ac = fileSelector->actionCollection()->action( (*it).latin1() ); else ac = fileSelector->dirOperator()->actionCollection()->action( (*it).latin1() ); if ( ac ) - new ActionLBItem( lb, SmallIcon( ac->icon() ), ac->text().tqreplace( re, "" ), *it ); + new ActionLBItem( lb, SmallIcon( ac->icon() ), ac->text().replace( re, "" ), *it ); } // sync diff --git a/kate/app/kategrepdialog.cpp b/kate/app/kategrepdialog.cpp index 943dff495..ebc461618 100644 --- a/kate/app/kategrepdialog.cpp +++ b/kate/app/kategrepdialog.cpp @@ -286,11 +286,11 @@ void GrepTool::itemSelected(const TQString& item) TQString filename, linenumber; TQString str = item; - if ( (pos = str.tqfind(':')) != -1) + if ( (pos = str.find(':')) != -1) { filename = str.left(pos); str = str.mid(pos+1); - if ( (pos = str.tqfind(':')) != -1) + if ( (pos = str.find(':')) != -1) { filename = m_workingDir + TQDir::separator() + filename; linenumber = str.left(pos); @@ -302,7 +302,7 @@ void GrepTool::itemSelected(const TQString& item) void GrepTool::processOutput() { int pos; - while ( (pos = buf.tqfind('\n')) != -1) + while ( (pos = buf.find('\n')) != -1) { TQString item = buf.mid(2,pos-2); if (!item.isEmpty()) @@ -329,7 +329,7 @@ void GrepTool::slotSearch() return; } - if ( ! leTemplate->text().tqcontains("%s") ) + if ( ! leTemplate->text().contains("%s") ) { leTemplate->setFocus(); return; @@ -347,9 +347,9 @@ void GrepTool::slotSearch() TQString s = cmbPattern->currentText(); if ( ! cbRegex->isChecked() ) - s.tqreplace( TQRegExp( "([^\\w'()<>])" ), "\\\\1" ); + s.replace( TQRegExp( "([^\\w'()<>])" ), "\\\\1" ); TQString pattern = leTemplate->text(); - pattern.tqreplace( "%s", s ); + pattern.replace( "%s", s ); childproc = new KProcess(); childproc->setWorkingDirectory( m_workingDir ); diff --git a/kate/app/katemdi.cpp b/kate/app/katemdi.cpp index c2b490fd9..9a809c374 100644 --- a/kate/app/katemdi.cpp +++ b/kate/app/katemdi.cpp @@ -340,7 +340,7 @@ ToolView *Sidebar::addWidget (const TQPixmap &icon, const TQString &text, ToolVi bool Sidebar::removeWidget (ToolView *widget) { - if (!m_widgetToId.tqcontains(widget)) + if (!m_widgetToId.contains(widget)) return false; removeTab(m_widgetToId[widget]); @@ -370,7 +370,7 @@ bool Sidebar::removeWidget (ToolView *widget) bool Sidebar::showWidget (ToolView *widget) { - if (!m_widgetToId.tqcontains(widget)) + if (!m_widgetToId.contains(widget)) return false; // hide other non-persistent views @@ -395,7 +395,7 @@ bool Sidebar::showWidget (ToolView *widget) bool Sidebar::hideWidget (ToolView *widget) { - if (!m_widgetToId.tqcontains(widget)) + if (!m_widgetToId.contains(widget)) return false; bool anyVis = false; diff --git a/kate/app/kateviewmanager.cpp b/kate/app/kateviewmanager.cpp index b7cb1f360..6d95efbb0 100644 --- a/kate/app/kateviewmanager.cpp +++ b/kate/app/kateviewmanager.cpp @@ -215,7 +215,7 @@ void KateViewManager::slotCloseTab() if (m_viewSpaceContainerList.count() <= 1) return; if (!m_currentContainer) return; - int pos = m_viewSpaceContainerList.tqfind (m_currentContainer); + int pos = m_viewSpaceContainerList.find (m_currentContainer); if (pos == -1) return; diff --git a/kate/app/kateviewspacecontainer.cpp b/kate/app/kateviewspacecontainer.cpp index afd92fc55..d3a834629 100644 --- a/kate/app/kateviewspacecontainer.cpp +++ b/kate/app/kateviewspacecontainer.cpp @@ -275,7 +275,7 @@ void KateViewSpaceContainer::activateView ( Kate::View *view ) } setActiveView (view); - m_viewList.tqfindRef (view); + m_viewList.findRef (view); mainWindow()->toolBar ()->tqsetUpdatesEnabled (false); @@ -337,7 +337,7 @@ void KateViewSpaceContainer::slotViewChanged() void KateViewSpaceContainer::activateNextView() { - uint i = m_viewSpaceList.tqfind (activeViewSpace())+1; + uint i = m_viewSpaceList.find (activeViewSpace())+1; if (i >= m_viewSpaceList.count()) i=0; @@ -348,7 +348,7 @@ void KateViewSpaceContainer::activateNextView() void KateViewSpaceContainer::activatePrevView() { - int i = m_viewSpaceList.tqfind (activeViewSpace())-1; + int i = m_viewSpaceList.find (activeViewSpace())-1; if (i < 0) i=m_viewSpaceList.count()-1; @@ -521,7 +521,7 @@ void KateViewSpaceContainer::removeViewSpace (KateViewSpace *viewspace) // Figure out where to put views that are still needed KateViewSpace* next; - if (m_viewSpaceList.tqfind(viewspace) == 0) + if (m_viewSpaceList.find(viewspace) == 0) next = m_viewSpaceList.next(); else next = m_viewSpaceList.prev(); @@ -684,12 +684,12 @@ void KateViewSpaceContainer::saveSplitterConfig( KateMDI::Splitter* s, int idx, TQString n; // name for child list, see below // For KateViewSpaces, ask them to save the file list. if ( obj->isA("KateViewSpace") ) { - n = TQString(viewConfGrp+"-ViewSpace %1").arg( m_viewSpaceList.tqfind((KateViewSpace*)obj) ); - ((KateViewSpace*)obj)->saveConfig ( config, m_viewSpaceList.tqfind((KateViewSpace*)obj), viewConfGrp); + n = TQString(viewConfGrp+"-ViewSpace %1").arg( m_viewSpaceList.find((KateViewSpace*)obj) ); + ((KateViewSpace*)obj)->saveConfig ( config, m_viewSpaceList.find((KateViewSpace*)obj), viewConfGrp); // save active viewspace if ( ((KateViewSpace*)obj)->isActiveSpace() ) { config->setGroup(viewConfGrp); - config->writeEntry("Active Viewspace", m_viewSpaceList.tqfind((KateViewSpace*)obj) ); + config->writeEntry("Active Viewspace", m_viewSpaceList.find((KateViewSpace*)obj) ); } } // For KateSplitters, recurse diff --git a/kate/app/kwritemain.cpp b/kate/app/kwritemain.cpp index 947f97067..98a64ed67 100644 --- a/kate/app/kwritemain.cpp +++ b/kate/app/kwritemain.cpp @@ -458,7 +458,7 @@ void KWrite::readProperties(KConfig *config) void KWrite::saveProperties(KConfig *config) { writeConfig(config); - config->writeEntry("DocumentNumber",docList.tqfind(m_view->document()) + 1); + config->writeEntry("DocumentNumber",docList.find(m_view->document()) + 1); if (KTextEditor::sessionConfigInterface(m_view)) KTextEditor::sessionConfigInterface(m_view)->writeSessionConfig(config); @@ -485,7 +485,7 @@ void KWrite::saveGlobalProperties(KConfig *config) //save documents TQString buf = TQString("Window %1").arg(z); config->setGroup(buf); - config->writeEntry("DocumentNumber",docList.tqfind(winList.tqat(z-1)->view()->document()) + 1); + config->writeEntry("DocumentNumber",docList.find(winList.tqat(z-1)->view()->document()) + 1); } } diff --git a/kcminit/main.cpp b/kcminit/main.cpp index 92dd3409d..226b22287 100644 --- a/kcminit/main.cpp +++ b/kcminit/main.cpp @@ -113,10 +113,10 @@ void KCMInit::runModules( int phase ) TQString libName = TQString("kcm_%1").arg(library); // try to load the library - if (! alreadyInitialized.tqcontains( libName.ascii() )) { + if (! alreadyInitialized.contains( libName.ascii() )) { if (!runModule(libName, service)) { libName = TQString("libkcm_%1").arg(library); - if (! alreadyInitialized.tqcontains( libName.ascii() )) { + if (! alreadyInitialized.contains( libName.ascii() )) { runModule(libName, service); alreadyInitialized.append( libName.ascii() ); } diff --git a/kcontrol/background/bgadvanced.cpp b/kcontrol/background/bgadvanced.cpp index 644cfc9df..0f97753e4 100644 --- a/kcontrol/background/bgadvanced.cpp +++ b/kcontrol/background/bgadvanced.cpp @@ -240,7 +240,7 @@ void BGAdvancedDialog::updateUI() void BGAdvancedDialog::removeProgram(const TQString &name) { - if (m_programItems.tqfind(name)) + if (m_programItems.find(name)) { delete m_programItems[name]; m_programItems.remove(name); @@ -265,7 +265,7 @@ void BGAdvancedDialog::addProgram(const TQString &name) void BGAdvancedDialog::selectProgram(const TQString &name) { - if (m_programItems.tqfind(name)) + if (m_programItems.find(name)) { TQListViewItem *item = m_programItems[name]; dlg->m_listPrograms->ensureItemVisible(item); diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp index b166704ad..1e681c3d6 100644 --- a/kcontrol/background/bgdialog.cpp +++ b/kcontrol/background/bgdialog.cpp @@ -510,7 +510,7 @@ void BGDialog::loadWallpaperFilesList() { KSimpleConfig fileConfig(*it); fileConfig.setGroup("Wallpaper"); - int slash = (*it).tqfindRev('/') + 1; + int slash = (*it).findRev('/') + 1; TQString directory = (*it).left(slash); TQString imageCaption = fileConfig.readEntry("Name"); @@ -524,14 +524,14 @@ void BGDialog::loadWallpaperFilesList() { if (imageCaption.isEmpty()) { imageCaption = fileName; - imageCaption.tqreplace('_', ' '); + imageCaption.replace('_', ' '); imageCaption = KStringHandler::capwords(imageCaption); } // avoid name collisions TQString rs = imageCaption; TQString lrs = rs.lower(); - for (int n = 1; papers.tqfind(lrs) != papers.end(); ++n) + for (int n = 1; papers.find(lrs) != papers.end(); ++n) { rs = imageCaption + " (" + TQString::number(n) + ')'; lrs = rs.lower(); @@ -562,8 +562,8 @@ void BGDialog::loadWallpaperFilesList() { if (imageCaption.isEmpty()) { - int slash = (*it).tqfindRev('/') + 1; - int endDot = (*it).tqfindRev('.'); + int slash = (*it).findRev('/') + 1; + int endDot = (*it).findRev('.'); // strip the extension if it exists if (endDot != -1 && endDot > slash) @@ -571,14 +571,14 @@ void BGDialog::loadWallpaperFilesList() { else imageCaption = (*it).mid(slash); - imageCaption.tqreplace('_', ' '); + imageCaption.replace('_', ' '); imageCaption = KStringHandler::capwords(imageCaption); } // avoid name collisions TQString rs = imageCaption; TQString lrs = rs.lower(); - for (int n = 1; papers.tqfind(lrs) != papers.end(); ++n) + for (int n = 1; papers.find(lrs) != papers.end(); ++n) { rs = imageCaption + " (" + TQString::number(n) + ')'; lrs = rs.lower(); @@ -606,12 +606,12 @@ void BGDialog::setWallpaper(const TQString &s) KComboBox *comboWallpaper = m_urlWallpaperBox; comboWallpaper->blockSignals(true); - if (m_wallpaper.tqfind(s) == m_wallpaper.end()) + if (m_wallpaper.find(s) == m_wallpaper.end()) { int i = comboWallpaper->count(); TQString imageCaption; - int slash = s.tqfindRev('/') + 1; - int endDot = s.tqfindRev('.'); + int slash = s.findRev('/') + 1; + int endDot = s.findRev('.'); // strip the extension if it exists if (endDot != -1 && endDot > slash) @@ -750,7 +750,7 @@ void BGDialog::updateUI() case KBackgroundSettings::Pattern: { - int i = m_patterns.tqfindIndex(r->KBackgroundPattern::name()); + int i = m_patterns.findIndex(r->KBackgroundPattern::name()); if (i >= 0) m_comboPattern->setCurrentItem(NR_PREDEF_PATTERNS+i); else diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp index c6195e718..65ef3c12b 100644 --- a/kcontrol/background/bgrender.cpp +++ b/kcontrol/background/bgrender.cpp @@ -124,7 +124,7 @@ TQString KBackgroundRenderer::buildCommand() if (cmd.isEmpty()) return TQString(); - while ((pos = cmd.tqfind('%', pos)) != -1) { + while ((pos = cmd.find('%', pos)) != -1) { if (pos == (int) (cmd.length() - 1)) break; @@ -132,24 +132,24 @@ TQString KBackgroundRenderer::buildCommand() switch (cmd.tqat(pos+1).latin1()) { case 'f': createTempFile(); - cmd.tqreplace(pos, 2, KShellProcess::quote(m_Tempfile->name())); + cmd.replace(pos, 2, KShellProcess::quote(m_Tempfile->name())); pos += m_Tempfile->name().length() - 2; break; case 'x': num.setNum(m_Size.width()); - cmd.tqreplace(pos, 2, num); + cmd.replace(pos, 2, num); pos += num.length() - 2; break; case 'y': num.setNum(m_Size.height()); - cmd.tqreplace(pos, 2, num); + cmd.replace(pos, 2, num); pos += num.length() - 2; break; case '%': - cmd.tqreplace(pos, 2, "%"); + cmd.replace(pos, 2, "%"); pos--; break; default: @@ -584,7 +584,7 @@ void KBackgroundRenderer::fastWallpaperBlend() m_Pixmap.convertFromImage( m_Wallpaper ); return; } - else if( m_WallpaperRect.tqcontains( TQRect( TQPoint( 0, 0 ), m_Size )) + else if( m_WallpaperRect.contains( TQRect( TQPoint( 0, 0 ), m_Size )) && !m_Wallpaper.hasAlphaBuffer()) // wallpaper covers all and no blending m_Pixmap = TQPixmap( m_Size ); else if (m_Background.size() == m_Size) @@ -1251,7 +1251,7 @@ void KVirtualBGRenderer::screenDone(int _desk, int _screen) Q_UNUSED(_screen); const KBackgroundRenderer * sender = dynamic_cast(this->sender()); - int screen = m_renderer.tqfind(sender); + int screen = m_renderer.find(sender); if (screen == -1) //?? return; diff --git a/kcontrol/background/bgsettings.cpp b/kcontrol/background/bgsettings.cpp index 6548b066d..c98376cc4 100644 --- a/kcontrol/background/bgsettings.cpp +++ b/kcontrol/background/bgsettings.cpp @@ -122,7 +122,7 @@ void KBackgroundPattern::readSettings() m_Pattern = m_pConfig->readPathEntry("File"); m_Comment = m_pConfig->readEntry("Comment"); if (m_Comment.isEmpty()) - m_Comment = m_File.mid(m_File.tqfindRev('/')+1); + m_Comment = m_File.mid(m_File.findRev('/')+1); } @@ -190,10 +190,10 @@ TQStringList KBackgroundPattern::list() TQStringList::Iterator it; for (it=lst.begin(); it!=lst.end(); ++it) { // Strip path and suffix - int pos = (*it).tqfindRev('/'); + int pos = (*it).findRev('/'); if (pos != -1) (*it) = (*it).mid(pos+1); - pos = (*it).tqfindRev('.'); + pos = (*it).findRev('.'); if (pos != -1) (*it) = (*it).left(pos); } @@ -401,10 +401,10 @@ TQStringList KBackgroundProgram::list() TQStringList::Iterator it; for (it=lst.begin(); it!=lst.end(); ++it) { // Strip path and suffix - int pos = (*it).tqfindRev('/'); + int pos = (*it).findRev('/'); if (pos != -1) (*it) = (*it).mid(pos+1); - pos = (*it).tqfindRev('.'); + pos = (*it).findRev('.'); if (pos != -1) (*it) = (*it).left(pos); } @@ -665,7 +665,7 @@ void KBackgroundSettings::setWallpaperList(TQStringList list) } updateWallpaperFiles(); // Try to keep the current wallpaper (-1 to set position to one before it) - m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName) - 1; + m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName) - 1; changeWallpaper(m_CurrentWallpaper < 0); } @@ -751,7 +751,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_BackgroundMode = defBackgroundMode; s = m_pConfig->readEntry("BackgroundMode", "invalid"); - if (m_BMMap.tqcontains(s)) { + if (m_BMMap.contains(s)) { int mode = m_BMMap[s]; // consistency check if ( ((mode != Pattern) && (mode != Program)) || @@ -763,7 +763,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_BlendMode = defBlendMode; s = m_pConfig->readEntry("BlendMode", "invalid"); - if (m_BlMMap.tqcontains(s)) { + if (m_BlMMap.contains(s)) { m_BlendMode = m_BlMMap[s]; } @@ -784,14 +784,14 @@ void KBackgroundSettings::readSettings(bool reparse) m_MultiMode = defMultiMode; s = m_pConfig->readEntry("MultiWallpaperMode"); - if (m_MMMap.tqcontains(s)) { + if (m_MMMap.contains(s)) { int mode = m_MMMap[s]; m_MultiMode = mode; } updateWallpaperFiles(); if( !m_CurrentWallpaperName.isEmpty()) - m_CurrentWallpaper = m_WallpaperFiles.tqfindIndex(m_CurrentWallpaperName); + m_CurrentWallpaper = m_WallpaperFiles.findIndex(m_CurrentWallpaperName); if(m_CurrentWallpaper < 0) m_CurrentWallpaper = 0; @@ -799,7 +799,7 @@ void KBackgroundSettings::readSettings(bool reparse) m_WallpaperMode = defWallpaperMode; m_Wallpaper = m_pConfig->readPathEntry("Wallpaper"); s = m_pConfig->readEntry("WallpaperMode", "invalid"); - if (m_WMMap.tqcontains(s)) { + if (m_WMMap.contains(s)) { int mode = m_WMMap[s]; // consistency check. if ((mode == NoWallpaper) || !m_Wallpaper.isEmpty() || (m_MultiMode == InOrder || m_MultiMode == Random)) diff --git a/kcontrol/clock/dtime.cpp b/kcontrol/clock/dtime.cpp index 7de5c7890..ef3f73ac1 100644 --- a/kcontrol/clock/dtime.cpp +++ b/kcontrol/clock/dtime.cpp @@ -272,7 +272,7 @@ void Dtime::save() list.append(timeServerList->currentText()); for ( int i=0; icount();i++ ) { TQString text = timeServerList->text(i); - if( list.tqfind(text) == list.end()) + if( list.find(text) == list.end()) list.append(text); // Limit so errors can go away and not stored forever if( list.count() == 10) @@ -284,9 +284,9 @@ void Dtime::save() if(setDateTimeAuto->isChecked() && !ntpUtility.isEmpty()){ // NTP Time setting TQString timeServer = timeServerList->currentText(); - if( timeServer.tqfind( TQRegExp(".*\\(.*\\)$") ) != -1 ) { - timeServer.tqreplace( TQRegExp(".*\\("), "" ); - timeServer.tqreplace( TQRegExp("\\).*"), "" ); + if( timeServer.find( TQRegExp(".*\\(.*\\)$") ) != -1 ) { + timeServer.replace( TQRegExp(".*\\("), "" ); + timeServer.replace( TQRegExp("\\).*"), "" ); // Would this be better?: s/^.*\(([^)]*)\).*$/\1/ } KProcess proc; diff --git a/kcontrol/clock/tzone.cpp b/kcontrol/clock/tzone.cpp index 9812fcd7c..53325c9c5 100644 --- a/kcontrol/clock/tzone.cpp +++ b/kcontrol/clock/tzone.cpp @@ -113,7 +113,7 @@ void Tzone::save() for (TQString line = is.readLine(); !line.isNull(); line = is.readLine()) { - if (line.tqfind("TZ=") == 0) + if (line.find("TZ=") == 0) { *ts << "TZ=" << selectedzone << endl; found = true; diff --git a/kcontrol/colors/colorscm.cpp b/kcontrol/colors/colorscm.cpp index 38a4ea444..aad75704b 100644 --- a/kcontrol/colors/colorscm.cpp +++ b/kcontrol/colors/colorscm.cpp @@ -444,7 +444,7 @@ void KColorScheme::slotSave( ) if (!entry) return; sCurrentScheme = entry->path; KSimpleConfig *config = new KSimpleConfig(sCurrentScheme ); - int i = sCurrentScheme.tqfindRev('/'); + int i = sCurrentScheme.findRev('/'); if (i >= 0) sCurrentScheme = sCurrentScheme.mid(i+1); @@ -800,7 +800,7 @@ void KColorScheme::readScheme( int index ) sCurrentScheme = entry->path; config = new KSimpleConfig(sCurrentScheme, true); config->setGroup("Color Scheme"); - int i = sCurrentScheme.tqfindRev('/'); + int i = sCurrentScheme.findRev('/'); if (i >= 0) sCurrentScheme = sCurrentScheme.mid(i+1); } @@ -905,7 +905,7 @@ int KColorScheme::findSchemeByName(const TQString &scheme) return 1; TQString search = scheme; - int i = search.tqfindRev('/'); + int i = search.findRev('/'); if (i >= 0) search = search.mid(i+1); @@ -972,7 +972,7 @@ void KColorScheme::insertEntry(const TQString &sFile, const TQString &sName) { KColorSchemeEntry *newEntry = new KColorSchemeEntry(sFile, sName, true); mSchemeList->inSort(newEntry); - int newIndex = mSchemeList->tqfindRef(newEntry)+nSysSchemes; + int newIndex = mSchemeList->findRef(newEntry)+nSysSchemes; sList->insertItem(sName, newIndex); sList->setCurrentItem(newIndex); } diff --git a/kcontrol/colors/widgetcanvas.cpp b/kcontrol/colors/widgetcanvas.cpp index 9b7e6e720..0f5d035b6 100644 --- a/kcontrol/colors/widgetcanvas.cpp +++ b/kcontrol/colors/widgetcanvas.cpp @@ -64,7 +64,7 @@ void WidgetCanvas::paintEvent(TQPaintEvent *) void WidgetCanvas::mousePressEvent( TQMouseEvent *me ) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.tqcontains( me->pos() ) ) { + if ( hotspots[i].rect.contains( me->pos() ) ) { emit widgetSelected( hotspots[i].number ); return; } @@ -73,7 +73,7 @@ void WidgetCanvas::mousePressEvent( TQMouseEvent *me ) void WidgetCanvas::mouseMoveEvent( TQMouseEvent *me ) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.tqcontains( me->pos() ) ) { + if ( hotspots[i].rect.contains( me->pos() ) ) { if ( i != currentHotspot ) { TQString tip = tips[hotspots[i].number]; TQToolTip::remove( this ); @@ -91,7 +91,7 @@ void WidgetCanvas::dropEvent( TQDropEvent *e) TQColor c; if (KColorDrag::decode( e, c)) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.tqcontains( e->pos() ) ) { + if ( hotspots[i].rect.contains( e->pos() ) ) { emit colorDropped( hotspots[i].number, c); return; } diff --git a/kcontrol/crypto/crypto.cpp b/kcontrol/crypto/crypto.cpp index f6b3c9b16..e8f2d7ac0 100644 --- a/kcontrol/crypto/crypto.cpp +++ b/kcontrol/crypto/crypto.cpp @@ -128,7 +128,7 @@ OtherCertItem::OtherCertItem( TQListView *view, const TQString& sub, const TQStr m_module = module; KSSLX509Map cert(sub); setText(0, cert.getValue("O")); - setText(1, cert.getValue("CN").tqreplace("\n", ", ")); + setText(1, cert.getValue("CN").replace("\n", ", ")); if (_exp.date().year() > 3000 || _exp.date().year() < 1900) _exp.setDate(TQDate(3000,1,1)); @@ -151,7 +151,7 @@ YourCertItem::YourCertItem( TQListView *view, TQString pkcs, TQString pass, TQSt { m_module = module; KSSLX509Map cert(name); - TQString tmp = cert.getValue("CN").tqreplace("\n", ", "); + TQString tmp = cert.getValue("CN").replace("\n", ", "); setText(0, tmp); setText(1, cert.getValue("Email")); _pkcs = pkcs; @@ -180,10 +180,10 @@ KSSLX509Map mcert(name); TQString tmp; setText(0, mcert.getValue("O")); tmp = mcert.getValue("OU"); - tmp.tqreplace("\n", ", "); + tmp.replace("\n", ", "); setText(1, tmp); tmp = mcert.getValue("CN"); - tmp.tqreplace("\n", ", "); + tmp.replace("\n", ", "); setText(2, tmp); _name = name; _cert = cert; @@ -1921,7 +1921,7 @@ void KCryptoConfig::slotCAImport() { if (certStore) { KOSSL::self()->X509_STORE_free(certStore); certStore = NULL; } - if (certtext.tqcontains("-----BEGIN CERTIFICATE-----")) { + if (certtext.contains("-----BEGIN CERTIFICATE-----")) { qf.reset(); certtext = TQString(); while (!qf.atEnd()) { @@ -1929,10 +1929,10 @@ void KCryptoConfig::slotCAImport() { qf.readLine(xx, qf.size()); certtext += xx; } - certtext = certtext.tqreplace("-----BEGIN CERTIFICATE-----", TQString()); - certtext = certtext.tqreplace("-----END CERTIFICATE-----", TQString()); + certtext = certtext.replace("-----BEGIN CERTIFICATE-----", TQString()); + certtext = certtext.replace("-----END CERTIFICATE-----", TQString()); certtext = certtext.stripWhiteSpace(); - certtext = certtext.tqreplace("\n", TQString()); + certtext = certtext.replace("\n", TQString()); } else { // Must [could?] be DER qf.close(); @@ -2350,7 +2350,7 @@ SSL_CONST SSL_METHOD *meth; break; // Leak of sc*? TQString scn(sc->name); - if (scn.tqcontains("ADH-") || scn.tqcontains("NULL-") || scn.tqcontains("DES-CBC3-SHA") || scn.tqcontains("FZA-")) { + if (scn.contains("ADH-") || scn.contains("NULL-") || scn.contains("DES-CBC3-SHA") || scn.contains("FZA-")) { continue; } k = SSL_CIPHER_get_bits(sc, &j); @@ -2378,7 +2378,7 @@ SSL_CONST SSL_METHOD *meth; break; // Leak of sc*? TQString scn(sc->name); - if (scn.tqcontains("ADH-") || scn.tqcontains("NULL-") || scn.tqcontains("DES-CBC3-SHA") || scn.tqcontains("FZA-")) { + if (scn.contains("ADH-") || scn.contains("NULL-") || scn.contains("DES-CBC3-SHA") || scn.contains("FZA-")) { continue; } k = SSL_CIPHER_get_bits(sc, &j); diff --git a/kcontrol/css/template.cpp b/kcontrol/css/template.cpp index a34839ef2..e237ed796 100644 --- a/kcontrol/css/template.cpp +++ b/kcontrol/css/template.cpp @@ -23,16 +23,16 @@ bool CSSTemplate::expand(TQString destname, const TQMap &dict { line = is.readLine(); - int start = line.tqfind('$'); + int start = line.find('$'); if (start >= 0) { - int end = line.tqfind('$', start+1); + int end = line.find('$', start+1); if (end >= 0) { TQString expr = line.mid(start+1, end-start-1); TQString res = dict[expr]; - line.tqreplace(start, end-start+1, res); + line.replace(start, end-start+1, res); } } os << line << endl; diff --git a/kcontrol/display/display.cpp b/kcontrol/display/display.cpp index 9e3293965..189d4723b 100644 --- a/kcontrol/display/display.cpp +++ b/kcontrol/display/display.cpp @@ -85,7 +85,7 @@ void KCMDisplay::save() void KCMDisplay::moduleChanged( bool isChanged ) { - TQMap::Iterator currentModule = m_modules.tqfind(static_cast(TQT_TQWIDGET(const_cast(TQT_TQOBJECT_CONST(sender()))))); + TQMap::Iterator currentModule = m_modules.find(static_cast(TQT_TQWIDGET(const_cast(TQT_TQOBJECT_CONST(sender()))))); Q_ASSERT(currentModule != m_modules.end()); if (currentModule.data() == isChanged) return; diff --git a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp index 6604a5a08..fc92c945d 100644 --- a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp +++ b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp @@ -459,7 +459,7 @@ SearchProviderItem *FilterOptions::displaySearchProvider(SearchProvider *p, bool item = new SearchProviderItem(m_dlg->lvSearchProviders, p); - if (m_favoriteEngines.tqfind(p->desktopEntryName())!=m_favoriteEngines.end()) + if (m_favoriteEngines.find(p->desktopEntryName())!=m_favoriteEngines.end()) item->setOn(true); for (itemCount = 1; itemCount < totalCount; itemCount++) diff --git a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp index 0e800a36c..9f3a245fc 100644 --- a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp +++ b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp @@ -64,7 +64,7 @@ TQString KURISearchFilterEngine::webShortcutQuery( const TQString& typedString ) if (m_bWebShortcutsEnabled) { TQString search = typedString; - int pos = search.tqfind(m_cKeywordDelimiter); + int pos = search.find(m_cKeywordDelimiter); TQString key; if (pos > -1) @@ -98,7 +98,7 @@ TQString KURISearchFilterEngine::autoWebSearchQuery( const TQString& typedString if (m_bWebShortcutsEnabled && !m_defaultSearchEngine.isEmpty()) { // Make sure we ignore supported protocols, e.g. "smb:", "http:" - int pos = typedString.tqfind(':'); + int pos = typedString.find(':'); if (pos == -1 || !KProtocolInfo::isKnownProtocol(typedString.left(pos))) { @@ -147,7 +147,7 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map, int i = 0; int n = 0; TQString s = userquery.mid (pos, qsexpr.matchedLength()); - while ((i = s.tqfind(" ")) != -1) + while ((i = s.find(" ")) != -1) { s = s.replace (i, 1, "%20"); n++; @@ -163,11 +163,11 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map, // Back-substitute quoted strings (%20 -> " "): { int i = 0; - while ((i = userquery.tqfind("%20")) != -1) - userquery = userquery.tqreplace(i, 3, " "); + while ((i = userquery.find("%20")) != -1) + userquery = userquery.replace(i, 3, " "); for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) - *it = (*it).tqreplace("%20", " "); + *it = (*it).replace("%20", " "); } PIDDBG << "Generating substitution map:\n"; @@ -187,23 +187,23 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map, v = l[i-1]; // Back-substitute quoted strings (%20 -> " "): - while ((j = v.tqfind("%20")) != -1) - v = v.tqreplace(j, 3, " "); + while ((j = v.find("%20")) != -1) + v = v.replace(j, 3, " "); // Insert partial queries (referenced by \1 ... \n) to map: - map.tqreplace(TQString::number(i), v); + map.replace(TQString::number(i), v); PDVAR (" map['" + nr + "']", map[nr]); // Insert named references (referenced by \name) to map: j = 0; - if ((i>0) && (pos = v.tqfind("=")) > 0) + if ((i>0) && (pos = v.find("=")) > 0) { TQString s = v.mid(pos + 1); TQString k = v.left(pos); // Back-substitute references contained in references (e.g. '\refname' substitutes to 'thisquery=\0') - while ((j = s.tqfind("%5C")) != -1) s = s.tqreplace(j, 3, "\\"); - map.tqreplace(k, s); + while ((j = s.find("%5C")) != -1) s = s.replace(j, 3, "\\"); + map.replace(k, s); PDVAR (" map['" + k + "']", map[k]); } } @@ -231,12 +231,12 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Check, if old style '\1' is found and replace it with \{@} (compatibility mode): { int pos = -1; - if ((pos = newurl.tqfind("\\1")) >= 0) + if ((pos = newurl.find("\\1")) >= 0) { PIDDBG << "WARNING: Using compatibility mode for newurl='" << newurl << "'. Please replace old style '\\1' with new style '\\{0}' " "in the query definition.\n"; - newurl = newurl.tqreplace(pos, 2, "\\{@}"); + newurl = newurl.replace(pos, 2, "\\{@}"); } } @@ -275,7 +275,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Substitute a range of keywords if (range.search(rlitem, 0) >= 0) { - int pos = rlitem.tqfind("-"); + int pos = rlitem.find("-"); int first = rlitem.left(pos).toInt(); int last = rlitem.right(rlitem.length()-pos-1).toInt(); @@ -307,7 +307,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & v = encodeString(s, encodingMib); PDVAR (" default", s); } - else if (map.tqcontains(rlitem)) + else if (map.contains(rlitem)) { // Use value from substitution map: found = true; @@ -340,7 +340,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Encode '+', otherwise it would be interpreted as space in the resulting url: int vpos = 0; - while ((vpos = v.tqfind('+')) != -1) + while ((vpos = v.find('+')) != -1) v = v.replace (vpos, 1, "%2B"); } @@ -353,7 +353,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & i++; } - newurl = newurl.tqreplace(pos, reflist.matchedLength(), v); + newurl = newurl.replace(pos, reflist.matchedLength(), v); } // Special handling for \{@}; @@ -370,7 +370,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap & // Substitute \{@} with list of unmatched query strings int vpos = 0; - while ((vpos = newurl.tqfind("\\@")) != -1) + while ((vpos = newurl.find("\\@")) != -1) newurl = newurl.replace (vpos, 2, v); } } @@ -397,7 +397,7 @@ TQString KURISearchFilterEngine::formatResult( const TQString& url, { // Return nothing if userquery is empty and it contains // substitution strings... - if (query.isEmpty() && url.tqfind(TQRegExp(TQRegExp::escape("\\{"))) > 0) + if (query.isEmpty() && url.find(TQRegExp(TQRegExp::escape("\\{"))) > 0) return TQString::null; // Debug info of map: @@ -427,13 +427,13 @@ TQString KURISearchFilterEngine::formatResult( const TQString& url, PDVAR ("query definition", url); // Add charset indicator for the query to substitution map: - map.tqreplace("ikw_charset", cseta); + map.replace("ikw_charset", cseta); // Add charset indicator for the fallback query to substitution map: TQString csetb = cset2; if (csetb.isEmpty()) csetb = "iso-8859-1"; - map.tqreplace("wsc_charset", csetb); + map.replace("wsc_charset", csetb); TQString newurl = substituteQuery (url, map, userquery, csetacodec->mibEnum()); diff --git a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp index 183d2a288..586f947ff 100644 --- a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp +++ b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp @@ -60,7 +60,7 @@ SearchProviderDialog::SearchProviderDialog(SearchProvider *provider, m_dlg->leName->setText(m_provider->name()); m_dlg->leQuery->setText(m_provider->query()); m_dlg->leShortcut->setText(m_provider->keys().join(",")); - m_dlg->cbCharset->setCurrentItem(m_provider->charset().isEmpty() ? 0 : charsets.tqfindIndex(m_provider->charset())); + m_dlg->cbCharset->setCurrentItem(m_provider->charset().isEmpty() ? 0 : charsets.findIndex(m_provider->charset())); m_dlg->leName->setEnabled(false); m_dlg->leQuery->setFocus(); } @@ -81,7 +81,7 @@ void SearchProviderDialog::slotChanged() void SearchProviderDialog::slotOk() { - if ((m_dlg->leQuery->text().tqfind("\\{") == -1) + if ((m_dlg->leQuery->text().find("\\{") == -1) && KMessageBox::warningContinueCancel(0, i18n("The URI does not contain a \\{...} placeholder for the user query.\n" "This means that the same page is always going to be visited, " diff --git a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp index a893e9f3a..f81fda73d 100644 --- a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp +++ b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp @@ -71,8 +71,8 @@ bool LocalDomainURIFilter::filterURI( KURIFilterData& data ) const bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const { // find() returns -1 when no match -> left()/truncate() are noops then - TQString host( cmd.left( cmd.tqfind( '/' ) ) ); - host.truncate( host.tqfind( ':' ) ); // Remove port number + TQString host( cmd.left( cmd.find( '/' ) ) ); + host.truncate( host.find( ':' ) ); // Remove port number if( !(host == last_host && last_time > time( NULL ) - 5 ) ) { @@ -95,7 +95,7 @@ bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const last_result = proc.wait( 1 ) && proc.normalExit() && !proc.exitStatus(); if( !m_fullname.isEmpty() ) - cmd.tqreplace( 0, host.length(), m_fullname ); + cmd.replace( 0, host.length(), m_fullname ); } return last_result; diff --git a/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp b/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp index 40d97e29d..bee6e99c4 100644 --- a/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp +++ b/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp @@ -66,7 +66,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false ) // Match FQDN_PATTERN exp.setPattern( QFL1(FQDN_PATTERN) ); - if ( cmd.tqcontains( exp ) ) + if ( cmd.contains( exp ) ) { if (verbose) kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd @@ -85,7 +85,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false ) // Match IPv4 addresses exp.setPattern( QFL1(IPv4_PATTERN) ); - if ( cmd.tqcontains( exp ) ) + if ( cmd.contains( exp ) ) { if (verbose) kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd @@ -95,7 +95,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false ) // Match IPv6 addresses exp.setPattern( QFL1(IPv6_PATTERN) ); - if ( cmd.tqcontains( exp ) ) + if ( cmd.contains( exp ) ) { if (verbose) kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd @@ -121,7 +121,7 @@ static TQString removeArgs( const TQString& _cmd ) do { - spacePos = cmd.tqfind( ' ', spacePos+1 ); + spacePos = cmd.find( ' ', spacePos+1 ); } while ( spacePos > 1 && cmd[spacePos - 1] == '\\' ); if( spacePos > 0 ) @@ -182,7 +182,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const // You mean caching the last filtering, to try and reuse it, to save stat()s? (David) const TQString starthere_proto = QFL1("start-here:"); - if (cmd.tqfind(starthere_proto, 0, true) == 0 ) + if (cmd.find(starthere_proto, 0, true) == 0 ) { setFilteredURI( data, KURL("system:/") ); setURIType( data, KURIFilterData::LOCAL_DIR ); @@ -193,8 +193,8 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const const TQString man_proto = QFL1("man:"); const TQString info_proto = QFL1("info:"); if( cmd[0] == '#' || - cmd.tqfind( man_proto, 0, true ) == 0 || - cmd.tqfind( info_proto, 0, true ) == 0 ) + cmd.find( man_proto, 0, true ) == 0 || + cmd.find( info_proto, 0, true ) == 0 ) { if( cmd.left(2) == QFL1("##") ) cmd = QFL1("info:/") + cmd.mid(2); @@ -213,7 +213,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const if ( cmd.startsWith( TQString::tqfromLatin1( "\\\\") ) ) { // make sure path is unix style - cmd.tqreplace('\\', '/'); + cmd.replace('\\', '/'); cmd.prepend( TQString::tqfromLatin1( "smb:" ) ); setFilteredURI( data, KURL( cmd )); setURIType( data, KURIFilterData::NET_PROTOCOL ); @@ -257,7 +257,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const if( path[0] == '~' ) { - int slashPos = path.tqfind('/'); + int slashPos = path.find('/'); if( slashPos == -1 ) slashPos = path.length(); if( slashPos == 1 ) // ~/ @@ -293,7 +293,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const const char* exp = getenv( path.mid( 1, r.matchedLength() - 1 ).local8Bit().data() ); if(exp) { - path.tqreplace( 0, r.matchedLength(), TQString::fromLocal8Bit(exp) ); + path.replace( 0, r.matchedLength(), TQString::fromLocal8Bit(exp) ); expanded = true; } } @@ -303,7 +303,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const { // Look for #ref again, after $ and ~ expansion (testcase: $QTDIR/doc/html/functions.html#s) // Can't use KURL here, setPath would escape it... - int pos = path.tqfind('#'); + int pos = path.find('#'); if ( pos > -1 ) { ref = path.mid( pos + 1 ); @@ -354,12 +354,12 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const if ( !exists ) { // Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter // If the app using this filter doesn't support it, well, it'll simply error out itself - int lastSlash = path.tqfindRev( '/' ); - if ( lastSlash > -1 && path.tqfind( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments + int lastSlash = path.findRev( '/' ); + if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments { TQString fileName = path.mid( lastSlash + 1 ); TQString testPath = path.left( lastSlash + 1 ); - if ( ( fileName.tqfind( '*' ) != -1 || fileName.tqfind( '[' ) != -1 || fileName.tqfind( '?' ) != -1 ) + if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 ) && stat( TQFile::encodeName(testPath).data(), &buff ) == 0 ) { nameFilter = fileName; @@ -453,7 +453,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const // Okay this is the code that allows users to supply custom matches for // specific URLs using Qt's regexp class. This is hard-coded for now. // TODO: Make configurable at some point... - if ( !cmd.tqcontains( ' ' ) ) + if ( !cmd.contains( ' ' ) ) { TQValueList::ConstIterator it; for( it = m_urlHints.begin(); it != m_urlHints.end(); ++it ) diff --git a/kcontrol/filetypes/filetypesview.cpp b/kcontrol/filetypes/filetypesview.cpp index 940d4afa3..45c700fd9 100644 --- a/kcontrol/filetypes/filetypesview.cpp +++ b/kcontrol/filetypes/filetypesview.cpp @@ -174,11 +174,11 @@ void FileTypesView::readFileTypes() TQValueListIterator it2(mimetypes.begin()); for (; it2 != mimetypes.end(); ++it2) { TQString mimetype = (*it2)->name(); - int index = mimetype.tqfind("/"); + int index = mimetype.find("/"); TQString maj = mimetype.left(index); TQString min = mimetype.right(mimetype.length() - index+1); - TQMapIterator mit = m_majorMap.tqfind( maj ); + TQMapIterator mit = m_majorMap.find( maj ); if ( mit == m_majorMap.end() ) { groupItem = new TypesListItem( typesLV, maj ); m_majorMap.insert( maj, groupItem ); @@ -196,7 +196,7 @@ void FileTypesView::readFileTypes() void FileTypesView::slotEmbedMajor(const TQString &major, bool &embed) { TypesListItem *groupItem; - TQMapIterator mit = m_majorMap.tqfind( major ); + TQMapIterator mit = m_majorMap.find( major ); if ( mit == m_majorMap.end() ) return; @@ -425,7 +425,7 @@ void FileTypesView::slotDatabaseChanged() TQValueList::Iterator it = m_itemsModified.begin(); for( ; it != m_itemsModified.end(); ++it ) { TQString name = (*it)->name(); - if ( removedList.tqfind( name ) == removedList.end() ) // if not deleted meanwhile + if ( removedList.find( name ) == removedList.end() ) // if not deleted meanwhile (*it)->refresh(); } m_itemsModified.clear(); diff --git a/kcontrol/filetypes/typeslistitem.cpp b/kcontrol/filetypes/typeslistitem.cpp index 21061b065..3380f86f9 100644 --- a/kcontrol/filetypes/typeslistitem.cpp +++ b/kcontrol/filetypes/typeslistitem.cpp @@ -92,7 +92,7 @@ void TypesListItem::init(KMimeType::Ptr mimetype) m_bFullInit = false; m_mimetype = mimetype; - int index = mimetype->name().tqfind("/"); + int index = mimetype->name().find("/"); if (index != -1) { m_major = mimetype->name().left(index); m_minor = mimetype->name().right(mimetype->name().length() - @@ -343,18 +343,18 @@ void TypesListItem::sync() continue; // Only those which were added in init() // Look in the correct list... - if ( (isApplication && ! m_appServices.tqcontains( pService->desktopEntryPath() )) - || (!isApplication && !m_embedServices.tqcontains( pService->desktopEntryPath() )) + if ( (isApplication && ! m_appServices.contains( pService->desktopEntryPath() )) + || (!isApplication && !m_embedServices.contains( pService->desktopEntryPath() )) ) { // The service was in m_appServices but has been removed // create a new .desktop file without this mimetype if( s_changedServices == NULL ) deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); - TQStringList mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + TQStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : pService->serviceTypes(); - if ( mimeTypeList.tqcontains( name() ) ) { + if ( mimeTypeList.contains( name() ) ) { // The mimetype is listed explicitly in the .desktop files, so // just remove it and we're done KConfig *desktop; @@ -370,12 +370,12 @@ void TypesListItem::sync() } desktop->setDesktopGroup(); - mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : desktop->readListEntry("MimeType", ';'); // Remove entry and the number that might follow. TQStringList::Iterator it; - for(;(it = mimeTypeList.tqfind(name())) != mimeTypeList.end();) + for(;(it = mimeTypeList.find(name())) != mimeTypeList.end();) { it = mimeTypeList.remove(it); if (it != mimeTypeList.end()) @@ -438,7 +438,7 @@ KMimeType::Ptr TypesListItem::findImplicitAssociation(const TQString &desktop) if( s_changedServices == NULL ) deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); - TQStringList mimeTypeList = s_changedServices->tqcontains( s->desktopEntryPath()) + TQStringList mimeTypeList = s_changedServices->contains( s->desktopEntryPath()) ? (*s_changedServices)[ s->desktopEntryPath() ] : s->serviceTypes(); for(TQStringList::ConstIterator it = mimeTypeList.begin(); @@ -477,10 +477,10 @@ void TypesListItem::saveServices( KConfig & profile, TQStringList services, cons // merge new mimetype if( s_changedServices == NULL ) deleter.setObject( s_changedServices, new TQMap< TQString, TQStringList > ); - TQStringList mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + TQStringList mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : pService->serviceTypes(); - if (!mimeTypeList.tqcontains(name()) && !inheritsMimetype(m_mimetype, mimeTypeList)) + if (!mimeTypeList.contains(name()) && !inheritsMimetype(m_mimetype, mimeTypeList)) { KConfig *desktop; if ( pService->type() == TQString("Service") ) @@ -495,7 +495,7 @@ void TypesListItem::saveServices( KConfig & profile, TQStringList services, cons } desktop->setDesktopGroup(); - mimeTypeList = s_changedServices->tqcontains( pService->desktopEntryPath()) + mimeTypeList = s_changedServices->contains( pService->desktopEntryPath()) ? (*s_changedServices)[ pService->desktopEntryPath() ] : desktop->readListEntry("MimeType", ';'); mimeTypeList.append(name()); diff --git a/kcontrol/fonts/kxftconfig.cpp b/kcontrol/fonts/kxftconfig.cpp index 95888e4db..fa4dc788e 100644 --- a/kcontrol/fonts/kxftconfig.cpp +++ b/kcontrol/fonts/kxftconfig.cpp @@ -52,7 +52,7 @@ TQString KXftConfig::contractHome(TQString path) unsigned int len = home.length(); if(path.length() == len || path[len] == '/') - return path.tqreplace(0, len, TQString::tqfromLatin1("~")); + return path.replace(0, len, TQString::tqfromLatin1("~")); } } @@ -62,7 +62,7 @@ TQString KXftConfig::contractHome(TQString path) TQString KXftConfig::expandHome(TQString path) { if(!path.isEmpty() && '~'==path[0]) - return 1==path.length() ? TQDir::homeDirPath() : path.tqreplace(0, 1, TQDir::homeDirPath()); + return 1==path.length() ? TQDir::homeDirPath() : path.replace(0, 1, TQDir::homeDirPath()); return path; } @@ -88,9 +88,9 @@ static TQString dirSyntax(const TQString &d) { TQString ds(d); - ds.tqreplace("//", "/"); + ds.replace("//", "/"); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos!=(((int)ds.length())-1)) ds.append('/'); @@ -106,7 +106,7 @@ static TQString xDirSyntax(const TQString &d) if(!d.isNull()) { TQString ds(d); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos==(((int)ds.length())-1)) ds.remove(slashPos, 1); @@ -143,7 +143,7 @@ static TQString getDir(const TQString &f) { TQString d(f); - int slashPos=d.tqfindRev('/'); + int slashPos=d.findRev('/'); if(-1!=slashPos) d.remove(slashPos+1, d.length()); @@ -191,11 +191,11 @@ TQString getConfigFile(bool system) if(fExists(f)) { - if(system || 0==fileSyntax(f).tqfind(home)) // For nonsystem, only consider file within $HOME + if(system || 0==fileSyntax(f).find(home)) // For nonsystem, only consider file within $HOME files.append(f); } #if (FC_VERSION>=20300) - if(system && dExists(f) && (-1!=f.tqfind(TQRegExp("/conf\\.d/?$")) || -1!=f.tqfind(TQRegExp("/conf\\.d?$"))) ) + if(system && dExists(f) && (-1!=f.find(TQRegExp("/conf\\.d/?$")) || -1!=f.find(TQRegExp("/conf\\.d?$"))) ) return dirSyntax(f)+constKdeRootFcFile; // This ones good enough for me! #endif } @@ -208,7 +208,7 @@ TQString getConfigFile(bool system) end(files.end()); for(; it!=end; ++it) - if(-1!=(*it).tqfind(TQRegExp(system ? "/local\\.conf$" : "/\\.?fonts\\.conf$"))) + if(-1!=(*it).find(TQRegExp(system ? "/local\\.conf$" : "/\\.?fonts\\.conf$"))) return *it; return files.front(); // Just return the 1st one... } @@ -645,13 +645,13 @@ bool KXftConfig::apply() TQString str(m_doc.toString()); int idx; - if(0!=str.tqfind("str)) + if(0==dir.find(item->str)) return true; return false; @@ -1291,7 +1291,7 @@ void KXftConfig::applySubPixelType() if(m_subPixel.node.isNull()) m_doc.documentElement().appendChild(matchNode); else - m_doc.documentElement().tqreplaceChild(matchNode, m_subPixel.node); + m_doc.documentElement().replaceChild(matchNode, m_subPixel.node); m_subPixel.node=matchNode; } @@ -1323,7 +1323,7 @@ void KXftConfig::applyHintStyle() if(m_hint.node.isNull()) m_doc.documentElement().appendChild(matchNode); else - m_doc.documentElement().tqreplaceChild(matchNode, m_hint.node); + m_doc.documentElement().replaceChild(matchNode, m_hint.node); m_hint.node=matchNode; } } @@ -1344,7 +1344,7 @@ void KXftConfig::applyHinting() if(m_hinting.node.isNull()) m_doc.documentElement().appendChild(matchNode); else - m_doc.documentElement().tqreplaceChild(matchNode, m_hinting.node); + m_doc.documentElement().replaceChild(matchNode, m_hinting.node); m_hinting.node=matchNode; } diff --git a/kcontrol/icons/icons.cpp b/kcontrol/icons/icons.cpp index 5ad1ae759..6c9e154f7 100644 --- a/kcontrol/icons/icons.cpp +++ b/kcontrol/icons/icons.cpp @@ -202,22 +202,22 @@ void KIconConfig::initDefaults() mEffects[i][2] = mDefaultEffect[2]; } // Animate desktop icons by default - int group = mGroups.tqfindIndex( "Desktop" ); + int group = mGroups.findIndex( "Desktop" ); if ( group != -1 ) mbAnimated[group] = true; // This is the new default in KDE 2.2, in sync with the kiconeffect of kdelibs Nolden 2001/06/11 - int activeState = mStates.tqfindIndex( "Active" ); + int activeState = mStates.findIndex( "Active" ); if ( activeState != -1 ) { - int group = mGroups.tqfindIndex( "Desktop" ); + int group = mGroups.findIndex( "Desktop" ); if ( group != -1 ) { mEffects[ group ][ activeState ].type = KIconEffect::ToGamma; mEffects[ group ][ activeState ].value = 0.7; } - group = mGroups.tqfindIndex( "Panel" ); + group = mGroups.findIndex( "Panel" ); if ( group != -1 ) { mEffects[ group ][ activeState ].type = KIconEffect::ToGamma; diff --git a/kcontrol/icons/iconthemes.cpp b/kcontrol/icons/iconthemes.cpp index d932c2e18..5d7f924a9 100644 --- a/kcontrol/icons/iconthemes.cpp +++ b/kcontrol/icons/iconthemes.cpp @@ -138,7 +138,7 @@ void IconThemesConfig::loadThemes() tname=name; // Just in case we have duplicated icon theme names on separate directories - for (int i=2; m_themeNames.tqfind(tname)!=m_themeNames.end() ; i++) + for (int i=2; m_themeNames.find(tname)!=m_themeNames.end() ; i++) tname=TQString("%1-%2").arg(name).arg(i); m_iconThemes->insertItem(new TQListViewItem(m_iconThemes,name, diff --git a/kcontrol/info/info_fbsd.cpp b/kcontrol/info/info_fbsd.cpp index 3f67b4b7a..3ccd1c086 100644 --- a/kcontrol/info/info_fbsd.cpp +++ b/kcontrol/info/info_fbsd.cpp @@ -347,24 +347,24 @@ bool GetInfo_Devices (TQListView *lbox) TQString GetController(const TQString &line) { - if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.tqfind(":") < 6) ) { + if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.find(":") < 6) ) { TQString controller = line; - controller.remove(0, controller.tqfind(" at ")+4); - if (controller.tqfind("-slave") != -1) { - controller.remove(controller.tqfind("-slave"), controller.length()); - } else if (controller.tqfind("-master") != -1) { - controller.remove(controller.tqfind("-master"), controller.length()); + controller.remove(0, controller.find(" at ")+4); + if (controller.find("-slave") != -1) { + controller.remove(controller.find("-slave"), controller.length()); + } else if (controller.find("-master") != -1) { + controller.remove(controller.find("-master"), controller.length()); } else controller=TQString::null; if (!controller.isNull()) return controller; } - if (line.tqfind(" on ") != -1) { + if (line.find(" on ") != -1) { TQString controller; controller = line; - controller.remove(0, controller.tqfind(" on ")+4); - if (controller.tqfind(" ") != -1) - controller.remove(controller.tqfind(" "), controller.length()); + controller.remove(0, controller.find(" on ")+4); + if (controller.find(" ") != -1) + controller.remove(controller.find(" "), controller.length()); return controller; } return TQString::null; @@ -373,13 +373,13 @@ TQString GetController(const TQString &line) Device *GetDevice(const TQString &line) { Device *dev; - int colon = line.tqfind(":"); + int colon = line.find(":"); if (colon == -1) return 0; dev = new Device; dev->name = line.mid(0, colon); - dev->description = line.mid(line.tqfind("<")+1, line.length()); - dev->description.remove(dev->description.tqfind(">"), dev->description.length()); + dev->description = line.mid(line.find("<")+1, line.length()); + dev->description.remove(dev->description.find(">"), dev->description.length()); return dev; } diff --git a/kcontrol/info/info_linux.cpp b/kcontrol/info/info_linux.cpp index 196029781..18287c45f 100644 --- a/kcontrol/info/info_linux.cpp +++ b/kcontrol/info/info_linux.cpp @@ -109,7 +109,7 @@ bool GetInfo_ReadfromFile(TQListView * lbox, const char *FileName, line = stream.readLine(); if (!line.isEmpty()) { if (!splitChar.isNull()) { - int pos = line.tqfind(splitChar); + int pos = line.find(splitChar); s1 = line.left(pos-1).stripWhiteSpace(); s2 = line.mid(pos+1).stripWhiteSpace(); } @@ -228,11 +228,11 @@ bool GetInfo_Devices(TQListView * lBox) while (!stream.atEnd()) { line = stream.readLine(); if (!line.isEmpty()) { - if (-1 != line.tqfind("character device",0,false)) { + if (-1 != line.find("character device",0,false)) { parent = new TQListViewItem(lBox,parent,i18n("Character Devices")); parent->setPixmap(0,SmallIcon("chardevice")); parent->setOpen(true); - } else if (-1 != line.tqfind("block device",0,false)) { + } else if (-1 != line.find("block device",0,false)) { parent = new TQListViewItem(lBox,parent,i18n("Block Devices")); parent->setPixmap(0,SmallIcon("blockdevice")); parent->setOpen(true); @@ -293,7 +293,7 @@ static void cleanPassword(TQString & str) while (index >= 0) { - index = str.tqfind(passwd, index, FALSE); + index = str.find(passwd, index, FALSE); if (index >= 0) { index += passwd.length(); while (index < (int) str.length() && @@ -473,7 +473,7 @@ bool GetInfo_Partitions(TQListView * lbox) while (file->readLine(buf, sizeof( buf )) > 0) { str = TQString::fromLocal8Bit(buf); if (str.length()) { - int p = str.tqfind(' '); /* find first space. */ + int p = str.find(' '); /* find first space. */ if (p) str.remove(p, 1024); /* erase all chars including space. */ Mounted_Partitions.append(str); @@ -503,7 +503,7 @@ bool GetInfo_Partitions(TQListView * lbox) #endif { total = avail = 0; /* initialize size.. */ - found_in_List = (Mounted_Partitions.tqcontains(FS_NAME) > 0); + found_in_List = (Mounted_Partitions.contains(FS_NAME) > 0); if (found_in_List && statfs(FS_FILE, &sfs) == 0) { total = ((LONG_TYPE) sfs.f_blocks) * sfs.f_bsize; avail = (getuid()? sfs.f_bavail : sfs.f_bfree) @@ -573,7 +573,7 @@ bool GetInfo_CD_ROM(TQListView * lBox) if (-1 != rx.search(line)) { TQString text = rx.cap(1); TQString value = rx.cap(2); - if (!text.tqcontains('#')) { + if (!text.contains('#')) { if (value == "0") value = KStdGuiItem::no().plainText(); if (value == "1") diff --git a/kcontrol/info/info_netbsd.cpp b/kcontrol/info/info_netbsd.cpp index 8eb9acf2e..b779eac29 100644 --- a/kcontrol/info/info_netbsd.cpp +++ b/kcontrol/info/info_netbsd.cpp @@ -125,18 +125,18 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter, TQListViewItem *olditem = NULL; while(!(s = t->readLine().local8Bit()).isEmpty()) { if (!seencpu) { - if (s.tqcontains("cpu")) + if (s.contains("cpu")) seencpu = true; else continue; } - if (s.tqcontains("boot device") || - s.tqcontains("WARNING: old BSD partition ID!")) + if (s.contains("boot device") || + s.contains("WARNING: old BSD partition ID!")) break; if (!filter - || (filter[0] == '^' && s.tqfind(&filter[1]) == 0) - || (filter[0] != '^' && s.tqcontains(filter))) { + || (filter[0] == '^' && s.find(&filter[1]) == 0) + || (filter[0] != '^' && s.contains(filter))) { if (func) func(lBox, s); else @@ -163,7 +163,7 @@ AddIRQLine(TQListView *lBox, TQString s) int pos, irqnum; char numstr[3]; - pos = s.tqfind(" irq "); + pos = s.find(" irq "); irqnum = (pos < 0) ? 0 : atoi(&s.ascii()[pos+5]); if (irqnum) snprintf(numstr, 3, "%02d", irqnum); @@ -221,7 +221,7 @@ bool GetInfo_Sound (TQListView *lbox) s = lvitem->text(0); // The autoconf message is in form 'audio0 at auvia0: ...' - if (s.tqfind("audio") == 0 && (pos = s.tqfind(" at ")) > 0) { + if (s.find("audio") == 0 && (pos = s.find(" at ")) > 0) { pos += 4; // skip " at " start = s.ascii() + pos; len = (int) strcspn(start, ":\n\t "); @@ -253,7 +253,7 @@ bool GetInfo_SCSI (TQListView *lbox) for(; lvitem; lvitem = lvitem->nextSibling()) { TQString s = lvitem->text(0); - if (s.tqcontains("seconds for devices to settle")) { + if (s.contains("seconds for devices to settle")) { lbox->removeItem(lvitem); break; } diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp index 6a68e33cb..12ec8ee2d 100644 --- a/kcontrol/info/info_openbsd.cpp +++ b/kcontrol/info/info_openbsd.cpp @@ -122,16 +122,16 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter, TQListViewItem *olditem = NULL; while(!(s = t->readLine()).isNull()) { if (!seencpu) { - if (s.tqcontains("cpu")) + if (s.contains("cpu")) seencpu = true; else continue; } - if (s.tqcontains("boot device") || - s.tqcontains("WARNING: old BSD partition ID!")) + if (s.contains("boot device") || + s.contains("WARNING: old BSD partition ID!")) break; - if (!filter || s.tqcontains(filter)) { + if (!filter || s.contains(filter)) { if (func) { func(lBox, s, &opaque, false); } @@ -180,7 +180,7 @@ void AddIRQLine(TQListView *lBox, TQString s, void **opaque, bool ending) return; } - pos = s.tqfind(" irq "); + pos = s.find(" irq "); irqnum = (pos < 0) ? 0 : atoi(&p[pos+5]); if (irqnum) { s.sprintf("%02d%s", irqnum, p); @@ -232,7 +232,7 @@ bool GetInfo_Sound (TQListView *lbox) char *dev; s = lvitem->text(0); - if ((pos = s.tqfind("at ")) >= 0) { + if ((pos = s.find("at ")) >= 0) { pos += 3; // skip "at " start = end = s.ascii(); for(; (*end!=':') && (*end!='\n'); end++); diff --git a/kcontrol/info/info_svr4.cpp b/kcontrol/info/info_svr4.cpp index 1f71246b7..ba491a50e 100644 --- a/kcontrol/info/info_svr4.cpp +++ b/kcontrol/info/info_svr4.cpp @@ -55,9 +55,9 @@ bool GetInfo_ReadfromFile( TQListView *lBox, char *Name, char splitchar ) } TQString s1 = TQString::fromLocal8Bit(buf); - TQString s2 = s1.mid(s1.tqfind(splitchar)+1); + TQString s2 = s1.mid(s1.find(splitchar)+1); - s1.truncate(s1.tqfind(splitchar)); + s1.truncate(s1.find(splitchar)); if(!(s1.isEmpty() || s2.isEmpty())) olditem = new TQListViewItem(lBox, olditem, s1, s2); } diff --git a/kcontrol/info/opengl.cpp b/kcontrol/info/opengl.cpp index c92d85721..f04a93d06 100644 --- a/kcontrol/info/opengl.cpp +++ b/kcontrol/info/opengl.cpp @@ -107,7 +107,7 @@ static bool get_dri_device() TQTextStream stream(&file); TQString line = stream.readLine(); if (!line.isEmpty()) { - dri_info.module = line.mid(0, line.tqfind(0x20)); + dri_info.module = line.mid(0, line.find(0x20)); // possible formats, for regression testing // line = " PCI:01:00:0"; @@ -115,8 +115,8 @@ static bool get_dri_device() TQRegExp rx = TQRegExp("\\b[Pp][Cc][Ii][:]([0-9a-fA-F]+[:])?([0-9a-fA-F]+[:][0-9a-fA-F]+[:.][0-9a-fA-F]+)\\b"); if (rx.search(line)>0) { dri_info.pci = rx.cap(2); - int end = dri_info.pci.tqfindRev(':'); - int end2 = dri_info.pci.tqfindRev('.'); + int end = dri_info.pci.findRev(':'); + int end2 = dri_info.pci.findRev('.'); if (end2>end) end=end2; dri_info.pci[end]='.'; @@ -151,7 +151,7 @@ static bool get_dri_device() { TQStringList pci_info; if (ReadPipe("sysctl -n hw.dri.0.name",pci_info)) { - dri_info.module = pci_info[0].mid(0, pci_info[0].tqfind(0x20)); + dri_info.module = pci_info[0].mid(0, pci_info[0].find(0x20)); } return false; } diff --git a/kcontrol/input/core/themepage.cpp b/kcontrol/input/core/themepage.cpp index 73ab04b8c..eed2fd319 100644 --- a/kcontrol/input/core/themepage.cpp +++ b/kcontrol/input/core/themepage.cpp @@ -130,7 +130,7 @@ void ThemePage::load( bool useDefaults ) currentTheme = whiteCursor ? "SmallWhite" : "SmallBlack"; selectedTheme = currentTheme; - TQListViewItem *item = listview->tqfindItem( currentTheme, DirColumn ); + TQListViewItem *item = listview->findItem( currentTheme, DirColumn ); item->setSelected( true ); } diff --git a/kcontrol/input/xcursor/themepage.cpp b/kcontrol/input/xcursor/themepage.cpp index 2a0255857..93221df17 100644 --- a/kcontrol/input/xcursor/themepage.cpp +++ b/kcontrol/input/xcursor/themepage.cpp @@ -122,7 +122,7 @@ ThemePage::ThemePage( TQWidget* parent, const char* name ) ( !icons.exists() && !TQFileInfo( TQDir::homeDirPath() ).isWritable() ) ) installButton->setEnabled( false ); - if ( !themeDirs.tqcontains( path ) ) + if ( !themeDirs.contains( path ) ) installButton->setEnabled( false ); selectionChanged( listview->currentItem() ); @@ -170,9 +170,9 @@ void ThemePage::load( bool useDefaults ) currentTheme = "system"; // Find the theme in the listview and select it - TQListViewItem *item = listview->tqfindItem( currentTheme, DirColumn ); + TQListViewItem *item = listview->findItem( currentTheme, DirColumn ); if( !item ) - item = listview->tqfindItem( "system", DirColumn ); + item = listview->findItem( "system", DirColumn ); selectedTheme = item->text( DirColumn ); listview->setSelected( item, true ); listview->ensureItemVisible( item ); @@ -260,7 +260,7 @@ void ThemePage::removeClicked() KIO::del( u ); // Remove the theme from the listview and from the themeinfo dict - delete listview->tqfindItem( selectedTheme, DirColumn ); + delete listview->findItem( selectedTheme, DirColumn ); themeInfo.remove( selectedTheme ); listview->setSelected( listview->currentItem(), true ); @@ -371,7 +371,7 @@ void ThemePage::insertTheme( const TQString &path ) info->writable = true; // If an item with the same name already exists, remove it - delete listview->tqfindItem( dirName, DirColumn ); + delete listview->findItem( dirName, DirColumn ); // Create the listview item and insert it into the list. KListViewItem *item = new KListViewItem( listview, name, desc, /*hidden*/ dirName ); @@ -395,7 +395,7 @@ const TQStringList ThemePage::getThemeBaseDirs() const TQString path = XcursorLibraryPath(); #endif // Expand all occurences of ~ to the home dir - path.tqreplace( "~/", TQDir::homeDirPath() + '/' ); + path.replace( "~/", TQDir::homeDirPath() + '/' ); return TQStringList::split( ':', path ); } @@ -414,7 +414,7 @@ bool ThemePage::isCursorTheme( const TQString &theme, const int depth ) const continue; const TQStringList subdirs( dir.entryList( TQDir::Dirs ) ); - if ( subdirs.tqcontains( theme ) ) + if ( subdirs.contains( theme ) ) { const TQString path = *it + '/' + theme; const TQString indexfile = path + "/index.theme"; @@ -471,7 +471,7 @@ void ThemePage::insertThemes() // in the list. Xcursor will use the first theme it finds in that // case, and since we use the same search order that should also be // the theme we end up adding to the list. - if ( listview->tqfindItem( *it, DirColumn ) ) + if ( listview->findItem( *it, DirColumn ) ) continue; const TQString path = dir.path() + '/' + *it; diff --git a/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp b/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp index cb0f7de11..e2014a1ca 100644 --- a/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp +++ b/kcontrol/ioslaveinfo/kcmioslaveinfo.cpp @@ -97,13 +97,13 @@ KCMIOSlaveInfo::KCMIOSlaveInfo(TQWidget *parent, const char *name, const TQStrin void KCMIOSlaveInfo::slaveHelp( KIO::Job *, const TQByteArray &data) { if ( data.size() == 0 ) { // EOF - int index = helpData.tqfind( "toUnicode( helpData ); - index = text.tqfind( "
" ); + index = text.find( "
" ); text = text.mid( index ); - index = text.tqfind( "setText(text); return; diff --git a/kcontrol/joystick/joywidget.cpp b/kcontrol/joystick/joywidget.cpp index 0f2349050..3d9eaf0d4 100644 --- a/kcontrol/joystick/joywidget.cpp +++ b/kcontrol/joystick/joywidget.cpp @@ -213,7 +213,7 @@ void JoyWidget::restoreCurrDev() { // try to find the current open device in the combobox list TQListBoxItem *item; - item = device->listBox()->tqfindItem(joydev->device(), TQt::Contains); + item = device->listBox()->findItem(joydev->device(), TQt::Contains); if ( !item ) // the current open device is one the user entered (not in the list) device->setCurrentText(joydev->device()); @@ -230,7 +230,7 @@ void JoyWidget::deviceChanged(const TQString &dev) int start, stop; TQString devName; - if ( (start = dev.tqfind("/dev")) == -1 ) + if ( (start = dev.find("/dev")) == -1 ) { KMessageBox::sorry(this, i18n("The given device name is invalid (does not contain /dev).\n" @@ -241,7 +241,7 @@ void JoyWidget::deviceChanged(const TQString &dev) return; } - if ( (stop = dev.tqfind(")", start)) != -1 ) // seems to be text selected from our list + if ( (stop = dev.find(")", start)) != -1 ) // seems to be text selected from our list devName = dev.mid(start, stop - start); else devName = dev.mid(start); diff --git a/kcontrol/kcontrol/helpwidget.cpp b/kcontrol/kcontrol/helpwidget.cpp index 9cb2037eb..9b5ec5006 100644 --- a/kcontrol/kcontrol/helpwidget.cpp +++ b/kcontrol/kcontrol/helpwidget.cpp @@ -69,7 +69,7 @@ bool HelpWidget::clicked(const TQString & _url) if ( _url.isNull() ) return true; - if ( _url.tqfind('@') > -1 ) { + if ( _url.find('@') > -1 ) { kapp->invokeMailer(_url); return true; } diff --git a/kcontrol/kcontrol/moduleiconview.cpp b/kcontrol/kcontrol/moduleiconview.cpp index c8e9bdc01..c6df5cb71 100644 --- a/kcontrol/kcontrol/moduleiconview.cpp +++ b/kcontrol/kcontrol/moduleiconview.cpp @@ -92,7 +92,7 @@ void ModuleIconView::fill() // go-back node ModuleIconItem *i = new ModuleIconItem(this, i18n("Back"), icon); i->setOrderNo(0); - int last_slash = _path.tqfindRev('/', -2); + int last_slash = _path.findRev('/', -2); if (last_slash == -1) i->setTag(TQString::null); else diff --git a/kcontrol/kcontrol/modulemenu.cpp b/kcontrol/kcontrol/modulemenu.cpp index 908b6003e..ad60eda5a 100644 --- a/kcontrol/kcontrol/modulemenu.cpp +++ b/kcontrol/kcontrol/modulemenu.cpp @@ -70,7 +70,7 @@ void ModuleMenu::fill(KPopupMenu *parentMenu, const TQString &parentPath) // Item names may contain ampersands. To avoid them being converted to // accelators, replace them with two ampersands. TQString name = group->caption(); - name.tqreplace("&", "&&"); + name.replace("&", "&&"); parentMenu->insertItem(KGlobal::iconLoader()->loadIcon(group->icon(), KIcon::Desktop, KIcon::SizeSmall) , name, menu); @@ -85,7 +85,7 @@ void ModuleMenu::fill(KPopupMenu *parentMenu, const TQString &parentPath) // Item names may contain ampersands. To avoid them being converted to // accelators, replace them with two ampersands. TQString name = module->moduleName(); - name.tqreplace("&", "&&"); + name.replace("&", "&&"); int realid = parentMenu->insertItem(KGlobal::iconLoader()->loadIcon(module->icon(), KIcon::Desktop, KIcon::SizeSmall) , name, id); diff --git a/kcontrol/kcontrol/modules.cpp b/kcontrol/kcontrol/modules.cpp index 11317c2d2..b2ece7c33 100644 --- a/kcontrol/kcontrol/modules.cpp +++ b/kcontrol/kcontrol/modules.cpp @@ -174,7 +174,7 @@ void ConfigModule::runAsRoot() // remove all kdesu switches while( cmd.length() > 1 && cmd[ 0 ] == '-' ) { - int pos = cmd.tqfind( ' ' ); + int pos = cmd.find( ' ' ); cmd = TQString(cmd.remove( 0, pos )).stripWhiteSpace(); } } @@ -316,7 +316,7 @@ bool ConfigModuleList::readDesktopEntriesRecursive(const TQString &path) TQPtrList ConfigModuleList::modules(const TQString &path) { - Menu *menu = subMenus.tqfind(path); + Menu *menu = subMenus.find(path); if (menu) return menu->modules; @@ -325,7 +325,7 @@ TQPtrList ConfigModuleList::modules(const TQString &path) TQStringList ConfigModuleList::submenus(const TQString &path) { - Menu *menu = subMenus.tqfind(path); + Menu *menu = subMenus.find(path); if (menu) return menu->submenus; @@ -338,7 +338,7 @@ TQString ConfigModuleList::findModule(ConfigModule *module) Menu *menu; for(;(menu = it.current());++it) { - if (menu->modules.tqcontainsRef(module)) + if (menu->modules.containsRef(module)) return it.currentKey(); } return TQString::null; diff --git a/kcontrol/kcontrol/moduletreeview.cpp b/kcontrol/kcontrol/moduletreeview.cpp index d685f7fe8..fda83854f 100644 --- a/kcontrol/kcontrol/moduletreeview.cpp +++ b/kcontrol/kcontrol/moduletreeview.cpp @@ -166,7 +166,7 @@ void ModuleTreeView::expandItem(TQListViewItem *item, TQPtrList { while (item) { - setOpen(item, parentList-.tqcontains(item)); + setOpen(item, parentList-.contains(item)); if (item->childCount() != 0) expandItem(item->firstChild(), parentList); @@ -356,7 +356,7 @@ void ModuleTreeItem::setGroup(const TQString &path) { KServiceGroup::Ptr group = KServiceGroup::group(path); TQString defName = path.left(path.length()-1); - int pos = defName.tqfindRev('/'); + int pos = defName.findRev('/'); if (pos >= 0) defName = defName.mid(pos+1); if (group && group->isValid()) diff --git a/kcontrol/kcontrol/toplevel.cpp b/kcontrol/kcontrol/toplevel.cpp index a4023f88c..4389a10fe 100644 --- a/kcontrol/kcontrol/toplevel.cpp +++ b/kcontrol/kcontrol/toplevel.cpp @@ -514,7 +514,7 @@ void TopLevel::aboutModule() TQString TopLevel::handleAmpersand( TQString modulename ) const { - if( modulename.tqcontains( '&' )) // double it + if( modulename.contains( '&' )) // double it { for( int i = modulename.length(); i >= 0; diff --git a/kcontrol/kded/kcmkded.cpp b/kcontrol/kded/kcmkded.cpp index 2a7a7cbfb..a3896b71e 100644 --- a/kcontrol/kded/kcmkded.cpp +++ b/kcontrol/kded/kcmkded.cpp @@ -113,10 +113,10 @@ KDEDConfig::KDEDConfig(TQWidget* parent, const char* name, const TQStringList &) void setModuleGroup(KConfig *config, const TQString &filename) { TQString module = filename; - int i = module.tqfindRev('/'); + int i = module.findRev('/'); if (i != -1) module = module.mid(i+1); - i = module.tqfindRev('.'); + i = module.findRev('.'); if (i != -1) module = module.left(i); @@ -201,7 +201,7 @@ void KDEDConfig::save() { if (file.readBoolEntry("X-KDE-Kded-autoload")){ - item = static_cast(_lvStartup->tqfindItem(file.readEntry("X-KDE-Library"),4)); + item = static_cast(_lvStartup->findItem(file.readEntry("X-KDE-Library"),4)); if (item) { // we found a match, now compare and see what changed setAutoloadEnabled(&kdedrc, *it, item->isOn()); @@ -251,13 +251,13 @@ void KDEDConfig::getServiceStatus() it.current()->setText(3, NOT_RUNNING); for ( QCStringList::Iterator it = modules.begin(); it != modules.end(); ++it ) { - TQListViewItem *item = _lvLoD->tqfindItem(*it, 4); + TQListViewItem *item = _lvLoD->findItem(*it, 4); if ( item ) { item->setText(2, RUNNING); } - item = _lvStartup->tqfindItem(*it, 4); + item = _lvStartup->findItem(*it, 4); if ( item ) { item->setText(3, RUNNING); @@ -269,7 +269,7 @@ void KDEDConfig::slotReload() { TQString current = _lvStartup->currentItem()->text(4); load(); - TQListViewItem *item = _lvStartup->tqfindItem(current, 4); + TQListViewItem *item = _lvStartup->findItem(current, 4); if (item) _lvStartup->setCurrentItem(item); } diff --git a/kcontrol/kdm/kbackedcombobox.cpp b/kcontrol/kdm/kbackedcombobox.cpp index 9f651b433..1ba598e49 100644 --- a/kcontrol/kdm/kbackedcombobox.cpp +++ b/kcontrol/kdm/kbackedcombobox.cpp @@ -28,7 +28,7 @@ void KBackedComboBox::insertItem( const TQString &id, const TQString &name ) void KBackedComboBox::setCurrentId( const TQString &id ) { - if (id2name.tqcontains( id )) + if (id2name.contains( id )) setCurrentItem( id2name[id] ); else setCurrentItem( 0 ); diff --git a/kcontrol/kdm/kdm-appear.cpp b/kcontrol/kdm/kdm-appear.cpp index 5f8b116dc..08c412c26 100644 --- a/kcontrol/kdm/kdm-appear.cpp +++ b/kcontrol/kdm/kdm-appear.cpp @@ -256,7 +256,7 @@ void KDMAppearanceWidget::loadLanguageList(KLanguageButton *combo) it != langlist.end(); ++it ) { TQString fpath = (*it).left((*it).length() - 14); - int index = fpath.tqfindRev('/'); + int index = fpath.findRev('/'); TQString nid = fpath.mid(index + 1); KSimpleConfig entry(*it); @@ -280,7 +280,7 @@ void KDMAppearanceWidget::loadColorSchemes(KBackedComboBox *combo) if (!(str = config.readEntry("Name")).isEmpty() || !(str = config.readEntry("name")).isEmpty()) { - TQString str2 = (*it).mid( (*it).tqfindRev( '/' ) + 1 ); // strip off path + TQString str2 = (*it).mid( (*it).findRev( '/' ) + 1 ); // strip off path str2.setLength( str2.length() - 6 ); // strip off ".kcsrc combo->insertItem( str2, str ); } diff --git a/kcontrol/kdm/kdm-conv.cpp b/kcontrol/kdm/kdm-conv.cpp index 94e64debb..e7f267ce3 100644 --- a/kcontrol/kdm/kdm-conv.cpp +++ b/kcontrol/kdm/kdm-conv.cpp @@ -295,7 +295,7 @@ void KDMConvenienceWidget::slotUpdateNoPassUser( TQListViewItem *item ) if ( !item ) return; TQCheckListItem *itm = (TQCheckListItem *)item; - TQStringList::iterator it = noPassUsers.tqfind( itm->text() ); + TQStringList::iterator it = noPassUsers.find( itm->text() ); if (itm->isOn()) { if (it == noPassUsers.end()) noPassUsers.append( itm->text() ); @@ -328,7 +328,7 @@ void KDMConvenienceWidget::slotAddUsers(const TQMap &users) } if (it.data() != 0) (new TQCheckListItem(npuserlv, it.key(), TQCheckListItem::CheckBox))-> - setOn(noPassUsers.tqfind(it.key()) != noPassUsers.end()); + setOn(noPassUsers.find(it.key()) != noPassUsers.end()); } if (userlb->listBox()) @@ -349,13 +349,13 @@ void KDMConvenienceWidget::slotDelUsers(const TQMap &users) if (it.data() > 0) { if (it.key() != autoUser && userlb->listBox()) delete userlb->listBox()-> - tqfindItem( it.key(), ExactMatch | CaseSensitive ); + findItem( it.key(), ExactMatch | CaseSensitive ); if (it.key() != preselUser && puserlb->listBox()) delete puserlb->listBox()-> - tqfindItem( it.key(), ExactMatch | CaseSensitive ); + findItem( it.key(), ExactMatch | CaseSensitive ); } if (it.data() != 0) - delete npuserlv->tqfindItem( it.key(), 0 ); + delete npuserlv->findItem( it.key(), 0 ); } } diff --git a/kcontrol/kdm/kdm-users.cpp b/kcontrol/kdm/kdm-users.cpp index da6025026..d349b7da7 100644 --- a/kcontrol/kdm/kdm-users.cpp +++ b/kcontrol/kdm/kdm-users.cpp @@ -381,7 +381,7 @@ void KDMUsersWidget::updateOptList( TQListViewItem *item, TQStringList &list ) if ( !item ) return; TQCheckListItem *itm = (TQCheckListItem *)item; - TQStringList::iterator it = list.tqfind( itm->text() ); + TQStringList::iterator it = list.find( itm->text() ); if (itm->isOn()) { if (it == list.end()) list.append( itm->text() ); @@ -415,9 +415,9 @@ void KDMUsersWidget::slotAddUsers(const TQMap &users) for (it = users.begin(); it != users.end(); ++it) { const TQString *name = &it.key(); (new TQCheckListItem(optinlv, *name, TQCheckListItem::CheckBox))-> - setOn(selectedUsers.tqfind(*name) != selectedUsers.end()); + setOn(selectedUsers.find(*name) != selectedUsers.end()); (new TQCheckListItem(optoutlv, *name, TQCheckListItem::CheckBox))-> - setOn(hiddenUsers.tqfind(*name) != hiddenUsers.end()); + setOn(hiddenUsers.find(*name) != hiddenUsers.end()); if ((*name)[0] != '@') usercombo->insertItem(*name); } @@ -433,9 +433,9 @@ void KDMUsersWidget::slotDelUsers(const TQMap &users) for (it = users.begin(); it != users.end(); ++it) { const TQString *name = &it.key(); if (usercombo->listBox()) - delete usercombo->listBox()->tqfindItem( *name, ExactMatch | CaseSensitive ); - delete optinlv->tqfindItem( *name, 0 ); - delete optoutlv->tqfindItem( *name, 0 ); + delete usercombo->listBox()->findItem( *name, ExactMatch | CaseSensitive ); + delete optinlv->findItem( *name, 0 ); + delete optoutlv->findItem( *name, 0 ); } } diff --git a/kcontrol/kdm/main.cpp b/kcontrol/kdm/main.cpp index 103e60428..00239636c 100644 --- a/kcontrol/kdm/main.cpp +++ b/kcontrol/kdm/main.cpp @@ -132,9 +132,9 @@ KDModule::KDModule(TQWidget *parent, const char *name, const TQStringList &) struct passwd *ps; for (setpwent(); (ps = getpwent()); ) { TQString un( TQFile::decodeName( ps->pw_name ) ); - if (usermap.tqfind( un ) == usermap.end()) { + if (usermap.find( un ) == usermap.end()) { usermap.insert( un, QPair( ps->pw_uid, sl ) ); - if ((tgmapi = tgmap.tqfind( ps->pw_gid )) != tgmap.end()) + if ((tgmapi = tgmap.find( ps->pw_gid )) != tgmap.end()) (*tgmapi).append( un ); else tgmap[ps->pw_gid] = un; @@ -146,7 +146,7 @@ KDModule::KDModule(TQWidget *parent, const char *name, const TQStringList &) for (setgrent(); (grp = getgrent()); ) { TQString gn( TQFile::decodeName( grp->gr_name ) ); bool delme = false; - if ((tgmapi = tgmap.tqfind( grp->gr_gid )) != tgmap.end()) { + if ((tgmapi = tgmap.find( grp->gr_gid )) != tgmap.end()) { if ((*tgmapi).count() == 1 && (*tgmapi).first() == gn) delme = true; else @@ -160,8 +160,8 @@ KDModule::KDModule(TQWidget *parent, const char *name, const TQStringList &) continue; do { TQString un( TQFile::decodeName( *grp->gr_mem ) ); - if ((umapi = usermap.tqfind( un )) != usermap.end()) { - if ((*umapi).second.tqfind( gn ) == (*umapi).second.end()) + if ((umapi = usermap.find( un )) != usermap.end()) { + if ((*umapi).second.find( gn ) == (*umapi).second.end()) (*umapi).second.append( gn ); } else kdWarning() << "group '" << gn << "' contains unknown user '" << un << "'" << endl; @@ -281,7 +281,7 @@ void KDModule::propagateUsers() if (!uid || (uid >= minshowuid && uid <= maxshowuid)) { lusers[it.key()] = uid; for (jt = it.data().second.begin(); jt != it.data().second.end(); ++jt) - if ((gmapi = groupmap.tqfind( *jt )) == groupmap.end()) { + if ((gmapi = groupmap.find( *jt )) == groupmap.end()) { groupmap[*jt] = 1; lusers['@' + *jt] = -uid; } else @@ -307,7 +307,7 @@ void KDModule::slotMinMaxUID(int min, int max) dlusers[it.key()] = uid; for (jt = it.data().second.begin(); jt != it.data().second.end(); ++jt) { - gmapi = groupmap.tqfind( *jt ); + gmapi = groupmap.find( *jt ); if (!--(*gmapi)) { groupmap.remove( gmapi ); dlusers['@' + *jt] = -uid; @@ -319,7 +319,7 @@ void KDModule::slotMinMaxUID(int min, int max) alusers[it.key()] = uid; for (jt = it.data().second.begin(); jt != it.data().second.end(); ++jt) - if ((gmapi = groupmap.tqfind( *jt )) == groupmap.end()) { + if ((gmapi = groupmap.find( *jt )) == groupmap.end()) { groupmap[*jt] = 1; alusers['@' + *jt] = -uid; } else diff --git a/kcontrol/keys/commandShortcuts.cpp b/kcontrol/keys/commandShortcuts.cpp index fb0f06681..cf564e89f 100644 --- a/kcontrol/keys/commandShortcuts.cpp +++ b/kcontrol/keys/commandShortcuts.cpp @@ -158,7 +158,7 @@ void CommandShortcutsModule::shortcutRadioToggled(bool remove) { m_shortcutButton->setShortcut(TQString(), false); item->setAccel(TQString()); - if (m_changedItems.tqfindRef(item) == -1) + if (m_changedItems.findRef(item) == -1) { m_changedItems.append(item); } @@ -186,7 +186,7 @@ void CommandShortcutsModule::shortcutChanged(const KShortcut& shortcut) m_shortcutButton->setShortcut(accel, false); item->setAccel(accel); m_noneRadio->blockSignals(false); - if (m_changedItems.tqfindRef(item) == -1) + if (m_changedItems.findRef(item) == -1) { m_changedItems.append(item); } diff --git a/kcontrol/keys/kaccelaction.h b/kcontrol/keys/kaccelaction.h index e28846a3a..144427d9c 100644 --- a/kcontrol/keys/kaccelaction.h +++ b/kcontrol/keys/kaccelaction.h @@ -111,7 +111,7 @@ class KAccelAction bool setKeySequence( uint i, const KKeySequence& ); void clearShortcut(); - bool tqcontains( const KKeySequence& ); + bool contains( const KKeySequence& ); TQString toString() const; TQString toStringInternal() const; diff --git a/kcontrol/keys/keyconfig.cpp b/kcontrol/keys/keyconfig.cpp index 239873a24..5af8c74f0 100644 --- a/kcontrol/keys/keyconfig.cpp +++ b/kcontrol/keys/keyconfig.cpp @@ -75,7 +75,7 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone ) for( uint i = 0; i < actions.size(); i++ ) { TQString sConfigKey = actions[i].m_sName; //kdDebug(125) << "sConfigKey: " << sConfigKey << endl; - int iLastSpace = sConfigKey.tqfindRev( ' ' ); + int iLastSpace = sConfigKey.findRev( ' ' ); bool bIsNum = false; if( iLastSpace >= 0 ) sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum ); @@ -83,7 +83,7 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone ) kdDebug(125) << "sConfigKey: " << sConfigKey << " bIsNum: " << bIsNum << " bSeriesOnly: " << bSeriesOnly << endl; - if( ((bSeriesOnly && !bIsNum) || (bSeriesNone && bIsNum)) && !sConfigKey.tqcontains( ':' ) ) { + if( ((bSeriesOnly && !bIsNum) || (bSeriesNone && bIsNum)) && !sConfigKey.contains( ':' ) ) { actions.removeAction( sConfigKey ); i--; } @@ -318,7 +318,7 @@ void KKeyModule::readScheme( int index ) // parse the string for first white space - ind = sFile.tqfind(" "); + ind = sFile.find(" "); if (ind == -1) { ind = sFile.length(); break; @@ -332,7 +332,7 @@ void KKeyModule::readScheme( int index ) TQString s = sFile.mid( ind, 1 ); s = s.upper(); - sFile.tqreplace( ind, 1, s ); + sFile.replace( ind, 1, s ); } @@ -416,8 +416,8 @@ void KKeyModule::readScheme( int index ) // Set various appropriate for the scheme if ( indx < nSysSchemes || - (*sFileList->tqat(indx)).tqcontains( "/global-" ) || - (*sFileList->tqat(indx)).tqcontains( "/app-" ) ) { + (*sFileList->tqat(indx)).contains( "/global-" ) || + (*sFileList->tqat(indx)).contains( "/app-" ) ) { removeBt->setEnabled( FALSE ); } else { removeBt->setEnabled( TRUE ); diff --git a/kcontrol/keys/shortcuts.cpp b/kcontrol/keys/shortcuts.cpp index acd55e47f..931d2267d 100644 --- a/kcontrol/keys/shortcuts.cpp +++ b/kcontrol/keys/shortcuts.cpp @@ -227,14 +227,14 @@ void ShortcutsModule::createActionsGeneral() for( uint i = 0; i < actions.count(); i++ ) { TQString sConfigKey = actions[i].name(); //kdDebug(125) << "sConfigKey: " << sConfigKey << endl; - int iLastSpace = sConfigKey.tqfindRev( ' ' ); + int iLastSpace = sConfigKey.findRev( ' ' ); bool bIsNum = false; if( iLastSpace >= 0 ) sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum ); //kdDebug(125) << "sConfigKey: " << sConfigKey // << " bIsNum: " << bIsNum << endl; - if( bIsNum && !sConfigKey.tqcontains( ':' ) ) { + if( bIsNum && !sConfigKey.contains( ':' ) ) { actions[i].setConfigurable( false ); actions[i].setName( TQString::null ); } @@ -248,14 +248,14 @@ void ShortcutsModule::createActionsSequence() for( uint i = 0; i < actions.count(); i++ ) { TQString sConfigKey = actions[i].name(); //kdDebug(125) << "sConfigKey: " << sConfigKey << endl; - int iLastSpace = sConfigKey.tqfindRev( ' ' ); + int iLastSpace = sConfigKey.findRev( ' ' ); bool bIsNum = false; if( iLastSpace >= 0 ) sConfigKey.mid( iLastSpace+1 ).toInt( &bIsNum ); //kdDebug(125) << "sConfigKey: " << sConfigKey // << " bIsNum: " << bIsNum << endl; - if( !bIsNum && !sConfigKey.tqcontains( ':' ) ) { + if( !bIsNum && !sConfigKey.contains( ':' ) ) { actions[i].setConfigurable( false ); actions[i].setName( TQString::null ); } @@ -372,7 +372,7 @@ void ShortcutsModule::slotSaveSchemeAs() int ind = 0; while( ind < (int) sFile.length() ) { // parse the string for first white space - ind = sFile.tqfind(" "); + ind = sFile.find(" "); if( ind == -1 ) { ind = sFile.length(); break; @@ -384,7 +384,7 @@ void ShortcutsModule::slotSaveSchemeAs() // Make the next letter upper case TQString s = sFile.mid( ind, 1 ); s = s.upper(); - sFile.tqreplace( ind, 1, s ); + sFile.replace( ind, 1, s ); } iScheme = -1; diff --git a/kcontrol/keys/treeview.cpp b/kcontrol/keys/treeview.cpp index 4d41b91c2..58de8a1f5 100644 --- a/kcontrol/keys/treeview.cpp +++ b/kcontrol/keys/treeview.cpp @@ -55,7 +55,7 @@ void AppTreeItem::setName(const TQString &name) void AppTreeItem::setAccel(const TQString &accel) { m_accel = accel; - int temp = accel.tqfind(';'); + int temp = accel.find(';'); if (temp != -1) { setText(1, accel.left(temp)); @@ -157,7 +157,7 @@ void AppTreeView::fillBranch(const TQString& rPath, AppTreeItem *parent) // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - groupCaption.tqreplace("&", "&&"); + groupCaption.replace("&", "&&"); AppTreeItem *item; if (parent == 0) @@ -178,7 +178,7 @@ void AppTreeView::fillBranch(const TQString& rPath, AppTreeItem *parent) // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - serviceCaption.tqreplace("&", "&&"); + serviceCaption.replace("&", "&&"); AppTreeItem* item; if (parent == 0) @@ -209,7 +209,7 @@ TQStringList AppTreeView::fileList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList filelist; @@ -228,7 +228,7 @@ TQStringList AppTreeView::fileList(const TQString& rPath) TQStringList files = dir.entryList(); for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { // does not work?! - //if (filelist.tqcontains(*it)) continue; + //if (filelist.contains(*it)) continue; if (relativePath.isEmpty()) { filelist.remove(*it); // hack @@ -248,7 +248,7 @@ TQStringList AppTreeView::dirList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList dirlist; @@ -266,7 +266,7 @@ TQStringList AppTreeView::dirList(const TQString& rPath) for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) { if ((*it) == "." || (*it) == "..") continue; // does not work?! - // if (dirlist.tqcontains(*it)) continue; + // if (dirlist.contains(*it)) continue; if (relativePath.isEmpty()) { dirlist.remove(*it); //hack diff --git a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp index bf5017d5b..53295963e 100644 --- a/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp +++ b/kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp @@ -391,7 +391,7 @@ void CKCmFontInst::fileHighlighted(const KFileItem *item) ? list->getFirst() : NULL; - if(previewItem && list && list->tqcontains(previewItem)) // OK, check its been selected - not deselected!!! + if(previewItem && list && list->contains(previewItem)) // OK, check its been selected - not deselected!!! itsPreview->openURL(previewItem->url()); } #endif @@ -551,7 +551,7 @@ void CKCmFontInst::infoMessage(const TQString &msg) static TQString family(const TQString &name) { - int commaPos=name.tqfind(','); + int commaPos=name.find(','); return -1==commaPos ? name : name.left(commaPos); } @@ -571,7 +571,7 @@ void CKCmFontInst::updateInformation(int, int fonts) TQString fam(family(item->text())); size+=item->size(); - if(-1==families.tqfindIndex(fam)) + if(-1==families.findIndex(fam)) families+=fam; } } diff --git a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp index 430e9c8b8..112e3562b 100644 --- a/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp +++ b/kcontrol/kfontinst/kfile-plugin/KFileFont.cpp @@ -44,35 +44,35 @@ static int strToWeight(const TQString &str) { if(NULL==str) return FC_WEIGHT_MEDIUM; - else if(str.tqcontains("Bold", false)) + else if(str.contains("Bold", false)) return FC_WEIGHT_BOLD; - else if(str.tqcontains("Heavy", false)) + else if(str.contains("Heavy", false)) return FC_WEIGHT_HEAVY; - else if(str.tqcontains("Black", false)) + else if(str.contains("Black", false)) return FC_WEIGHT_BLACK; - else if(str.tqcontains("ExtraBold", false)) + else if(str.contains("ExtraBold", false)) return FC_WEIGHT_EXTRABOLD; - else if(str.tqcontains("UltraBold", false)) + else if(str.contains("UltraBold", false)) return FC_WEIGHT_ULTRABOLD; - else if(str.tqcontains("ExtraLight", false)) + else if(str.contains("ExtraLight", false)) return FC_WEIGHT_EXTRALIGHT; - else if(str.tqcontains("UltraLight", false)) + else if(str.contains("UltraLight", false)) return FC_WEIGHT_ULTRALIGHT; - else if(str.tqcontains("Light", false)) + else if(str.contains("Light", false)) return FC_WEIGHT_LIGHT; - else if(str.tqcontains("Medium", false) || str.tqcontains("Normal", false) || str.tqcontains("Roman", false)) + else if(str.contains("Medium", false) || str.contains("Normal", false) || str.contains("Roman", false)) return FC_WEIGHT_MEDIUM; - else if(str.tqcontains("Regular", false)) + else if(str.contains("Regular", false)) return FC_WEIGHT_REGULAR; - else if(str.tqcontains("SemiBold", false)) + else if(str.contains("SemiBold", false)) return FC_WEIGHT_SEMIBOLD; - else if(str.tqcontains("DemiBold", false)) + else if(str.contains("DemiBold", false)) return FC_WEIGHT_DEMIBOLD; - else if(str.tqcontains("Thin", false)) + else if(str.contains("Thin", false)) return FC_WEIGHT_THIN; - else if(str.tqcontains("Book", false)) + else if(str.contains("Book", false)) return FC_WEIGHT_NORMAL; - else if(str.tqcontains("Demi", false)) + else if(str.contains("Demi", false)) return FC_WEIGHT_NORMAL; else return FC_WEIGHT_MEDIUM; @@ -83,21 +83,21 @@ static int strToWidth(const TQString &str) { if(str.isEmpty()) return FC_WIDTH_NORMAL; - else if(str.tqcontains("UltraCondensed", false)) + else if(str.contains("UltraCondensed", false)) return FC_WIDTH_ULTRACONDENSED; - else if(str.tqcontains("ExtraCondensed", false)) + else if(str.contains("ExtraCondensed", false)) return FC_WIDTH_EXTRACONDENSED; - else if(str.tqcontains("SemiCondensed", false)) + else if(str.contains("SemiCondensed", false)) return FC_WIDTH_SEMICONDENSED; - else if(str.tqcontains("Condensed", false)) + else if(str.contains("Condensed", false)) return FC_WIDTH_CONDENSED; - else if(str.tqcontains("SemiExpanded", false)) + else if(str.contains("SemiExpanded", false)) return FC_WIDTH_SEMIEXPANDED; - else if(str.tqcontains("UltraExpanded", false)) + else if(str.contains("UltraExpanded", false)) return FC_WIDTH_ULTRAEXPANDED; - else if(str.tqcontains("ExtraExpanded", false)) + else if(str.contains("ExtraExpanded", false)) return FC_WIDTH_EXTRAEXPANDED; - else if(str.tqcontains("Expanded", false)) + else if(str.contains("Expanded", false)) return FC_WIDTH_EXPANDED; else return FC_WIDTH_NORMAL; @@ -201,7 +201,7 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt if(inMetrics) { - if(0==line.tqfind("FullName ")) + if(0==line.find("FullName ")) { full=line.mid(9); #ifndef KFI_FC_NO_WIDTHS @@ -209,24 +209,24 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt #endif foundName=true; } - else if(0==line.tqfind("FamilyName ")) + else if(0==line.find("FamilyName ")) { family=line.mid(11); foundFamily=true; } - else if(0==line.tqfind("Weight ")) + else if(0==line.find("Weight ")) intWeight=strToWeight(line.mid(7)); - else if(0==line.tqfind("ItalicAngle ")) + else if(0==line.find("ItalicAngle ")) intSlant=0.0f==line.mid(12).toFloat() ? FC_SLANT_ROMAN : FC_SLANT_ITALIC; - else if(0==line.tqfind("IsFixedPitch ")) - intSpacing=0==line.mid(13).tqfind("false", 0, false) ? FC_PROPORTIONAL : FC_MONO; - else if(0==line.tqfind("Notice ")) + else if(0==line.find("IsFixedPitch ")) + intSpacing=0==line.mid(13).find("false", 0, false) ? FC_PROPORTIONAL : FC_MONO; + else if(0==line.find("Notice ")) foundry=getFoundry(line.mid(7).latin1()); - else if(0==line.tqfind("StartCharMetrics")) + else if(0==line.find("StartCharMetrics")) break; } else - if(0==line.tqfind("StartFontMetrics")) + if(0==line.find("StartFontMetrics")) inMetrics=true; }; f.close(); @@ -237,7 +237,7 @@ static bool readAfm(const TQString &file, TQString &full, TQString &family, TQSt foundFamily=true; } - if(foundName && FC_SLANT_ITALIC==intItalic && (-1!=full.tqfind("Oblique") || -1!=full.tqfind("Slanted"))) + if(foundName && FC_SLANT_ITALIC==intItalic && (-1!=full.find("Oblique") || -1!=full.find("Slanted"))) intItalic=FC_SLANT_OBLIQUE; } @@ -372,7 +372,7 @@ bool KFileFontPlugin::readInfo(KFileMetaInfo& info, uint what) const FoundryMap *entry; for(entry=map; NULL!=entry->foundry; entry++) - if(foundryAll.length()==entry->len && foundryAll.tqcontains(entry->foundry, false)) + if(foundryAll.length()==entry->len && foundryAll.contains(entry->foundry, false)) { foundryAll=entry->foundry; break; diff --git a/kcontrol/kfontinst/kfontinst/FontEngine.cpp b/kcontrol/kfontinst/kfontinst/FontEngine.cpp index 7f14d556f..dffa60f2d 100644 --- a/kcontrol/kfontinst/kfontinst/FontEngine.cpp +++ b/kcontrol/kfontinst/kfontinst/FontEngine.cpp @@ -157,7 +157,7 @@ CFontEngine::EWeight CFontEngine::strToWeight(const char *str) static void removeSymbols(TQString &str) { - str.tqreplace(TQRegExp("[\\-\\[\\]()]"), " "); + str.replace(TQRegExp("[\\-\\[\\]()]"), " "); int len=str.length(); TQChar space(' '); diff --git a/kcontrol/kfontinst/kfontinst/Fontmap.cpp b/kcontrol/kfontinst/kfontinst/Fontmap.cpp index c8e63c403..8b04ef7bd 100644 --- a/kcontrol/kfontinst/kfontinst/Fontmap.cpp +++ b/kcontrol/kfontinst/kfontinst/Fontmap.cpp @@ -113,7 +113,7 @@ static TQString createX11PsName(const TQString &font) unsigned int ch; bool newWord=true; - newName.tqreplace(TQRegExp("\\-"), "_"); + newName.replace(TQRegExp("\\-"), "_"); for(ch=0; chfonts[i], FC_FILE))); FcBool scalable=FcFalse; - if(!fName.isEmpty() && (root || dir.isEmpty() || 0==fName.tqfind(dir)) && + if(!fName.isEmpty() && (root || dir.isEmpty() || 0==fName.find(dir)) && FcResultMatch==FcPatternGetBool(fs->fonts[i], FC_SCALABLE, 0, &scalable) && scalable) { const TQStringList *existing=old.getEntries(fName); @@ -552,7 +552,7 @@ CFile::CFile(const TQString &dir) const TQStringList * CFile::getEntries(const TQString &fname) { - TEntry *entry=findEntry(0==fname.tqfind(itsDir) ? fname.mid(itsDir.length()) : fname, false); + TEntry *entry=findEntry(0==fname.find(itsDir) ? fname.mid(itsDir.length()) : fname, false); return entry ? &entry->entries : NULL; } diff --git a/kcontrol/kfontinst/kfontinst/Main.cpp b/kcontrol/kfontinst/kfontinst/Main.cpp index f0e6d3152..6db9b83c8 100644 --- a/kcontrol/kfontinst/kfontinst/Main.cpp +++ b/kcontrol/kfontinst/kfontinst/Main.cpp @@ -285,7 +285,7 @@ int main(int argc, char *argv[]) bool found=false; while((dir=FcStrListNext(list))) - if(0==KFI::Misc::dirSyntax((const char *)dir).tqfind(folder)) + if(0==KFI::Misc::dirSyntax((const char *)dir).find(folder)) found=true; if(!found) diff --git a/kcontrol/kfontinst/kfontinst/XConfig.cpp b/kcontrol/kfontinst/kfontinst/XConfig.cpp index 36bd153df..112ab3d3c 100644 --- a/kcontrol/kfontinst/kfontinst/XConfig.cpp +++ b/kcontrol/kfontinst/kfontinst/XConfig.cpp @@ -748,9 +748,9 @@ CXConfig::TPath::EType CXConfig::TPath::getType(const TQString &d) { TQString str(d); - str.tqreplace(TQRegExp("\\s*"), ""); + str.replace(TQRegExp("\\s*"), ""); - return 0==str.tqfind("unix/:") + return 0==str.find("unix/:") ? FONT_SERVER : "fontconfig"==str ? FONT_CONFIG diff --git a/kcontrol/kfontinst/kio/KioFonts.cpp b/kcontrol/kfontinst/kio/KioFonts.cpp index cefa5188d..cef1fd9dd 100644 --- a/kcontrol/kfontinst/kio/KioFonts.cpp +++ b/kcontrol/kfontinst/kio/KioFonts.cpp @@ -136,7 +136,7 @@ static TQString removeMultipleExtension(const KURL &url) TQString fname(url.fileName()); int pos; - if(-1!=(pos=fname.tqfindRev(TQString::tqfromLatin1(constMultipleExtension)))) + if(-1!=(pos=fname.findRev(TQString::tqfromLatin1(constMultipleExtension)))) fname=fname.left(pos); return fname; @@ -147,7 +147,7 @@ static TQString modifyName(const TQString &fname) static const char constSymbols[]={ '-', ' ', ':', 0 }; TQString rv(fname); - int dotPos=rv.tqfindRev('.'); + int dotPos=rv.findRev('.'); if(-1!=dotPos) { @@ -158,7 +158,7 @@ static TQString modifyName(const TQString &fname) } for(int s=0; constSymbols[s]; ++s) - rv=rv.tqreplace(constSymbols[s], '_'); + rv=rv.replace(constSymbols[s], '_'); return rv; } @@ -427,7 +427,7 @@ static KURL getRedirect(const KURL &u) sect(CKioFonts::getSect(path)); path.remove(sect); - path.tqreplace("//", "/"); + path.replace("//", "/"); redirect.setPath(path); KFI_DBUG << "Redirect from " << u.path() << " to " << redirect.path() << endl; @@ -441,7 +441,7 @@ static bool nonRootSys(const KURL &u) static TQString getFontFolder(const TQString &defaultDir, const TQString &root, TQStringList &dirs) { - if(dirs.tqcontains(defaultDir)) + if(dirs.contains(defaultDir)) return defaultDir; else { @@ -450,7 +450,7 @@ static TQString getFontFolder(const TQString &defaultDir, const TQString &root, bool found=false; for(it=dirs.begin(); it!=end && !found; ++it) - if(0==(*it).tqfind(root)) + if(0==(*it).find(root)) return *it; } @@ -494,7 +494,7 @@ static bool isAAfm(const TQString &fname) { line=stream.readLine(); - if(line.tqcontains("StartFontMetrics")) + if(line.contains("StartFontMetrics")) { file.close(); return true; @@ -646,11 +646,11 @@ static bool getFontList(const TQStringList &files, TQMap &ma { TQString name(Misc::getFile(*it)), path(Misc::getDir(*it)); - TQValueList::Iterator entry=list.tqfind(FontList(name)); + TQValueList::Iterator entry=list.find(FontList(name)); if(entry!=list.end()) { - if(!(*entry).paths.tqcontains(path)) + if(!(*entry).paths.contains(path)) (*entry).paths.append(path); } else @@ -688,11 +688,11 @@ static bool getFontList(const TQStringList &files, TQMap &ma if((*pIt).orig[i]!=(*pBegin).orig[i]) { (*pIt).modified=(*pIt).orig.mid(i); - (*pIt).modified=(*pIt).modified.tqreplace('/', '_'); + (*pIt).modified=(*pIt).modified.replace('/', '_'); if((*pBegin).modified.isEmpty()) { (*pBegin).modified=(*pBegin).orig.mid(i); - (*pBegin).modified=(*pBegin).modified.tqreplace('/', '_'); + (*pBegin).modified=(*pBegin).modified.replace('/', '_'); } break; } @@ -806,9 +806,9 @@ CKioFonts::CKioFonts(const TQCString &pool, const TQCString &app) { TQString str(paths[path]); - str.tqreplace(TQRegExp("\\s*"), ""); + str.replace(TQRegExp("\\s*"), ""); - if(0==str.tqfind("unix/:")) + if(0==str.find("unix/:")) itsUsingXfsFpe=true; else if("fontconfig"==str) itsUsingFcFpe=true; @@ -1751,9 +1751,9 @@ void CKioFonts::special(const TQByteArray &a) finished(); break; case SPECIAL_RECONFIG: // Only itended to be called from kcmfontinst - when a user has re-enabled doX or doGs - if(itsRoot && !itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location)) + if(itsRoot && !itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location)) itsFolders[FOLDER_SYS].modified.add(itsFolders[FOLDER_SYS].location); - else if(!itsRoot && !itsFolders[FOLDER_USER].modified.tqcontains(itsFolders[FOLDER_USER].location)) + else if(!itsRoot && !itsFolders[FOLDER_USER].modified.contains(itsFolders[FOLDER_USER].location)) itsFolders[FOLDER_USER].modified.add(itsFolders[FOLDER_USER].location); doModified(); @@ -1831,7 +1831,7 @@ void CKioFonts::doModified() // // If a non-default folder has been modified, always configure X if(NULL==strchr(itsKfiParams, 'x') && - (itsFolders[FOLDER_SYS].modified.count()>1 || !itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location))) + (itsFolders[FOLDER_SYS].modified.count()>1 || !itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location))) { if(0==itsKfiParams[0]) strcpy(itsKfiParams, "-x"); @@ -1850,7 +1850,7 @@ void CKioFonts::doModified() KFI_DBUG << "RUN(root): kfontinst " << itsKfiParams << ' ' << *it << endl; } - if(itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location)) + if(itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location)) { itsHasSys=true; itsAddToSysFc=false; @@ -1862,7 +1862,7 @@ void CKioFonts::doModified() TQCString cmd; createRootRefreshCmd(cmd, itsFolders[FOLDER_SYS].modified, false); - if(doRootCmd(cmd, false) && itsFolders[FOLDER_SYS].modified.tqcontains(itsFolders[FOLDER_SYS].location)) + if(doRootCmd(cmd, false) && itsFolders[FOLDER_SYS].modified.contains(itsFolders[FOLDER_SYS].location)) { itsHasSys=true; itsAddToSysFc=false; @@ -2039,7 +2039,7 @@ bool CKioFonts::updateFontList() if(!file.isEmpty()) { - if(!itsRoot && 0==file.tqfind(home)) + if(!itsRoot && 0==file.find(home)) folder=FOLDER_USER; TQValueList &patterns= @@ -2079,14 +2079,14 @@ CKioFonts::EFolder CKioFonts::getFolder(const KURL &url) TQMap >::Iterator CKioFonts::getMap(const KURL &url) { EFolder folder(getFolder(url)); - TQMap >::Iterator it=itsFolders[folder].fontMap.tqfind(removeMultipleExtension(url)); + TQMap >::Iterator it=itsFolders[folder].fontMap.find(removeMultipleExtension(url)); if(it==itsFolders[folder].fontMap.end()) // Perhaps it was fonts:/System/times.ttf ??? { FcPattern *pat=getEntry(folder, url.fileName(), false); if(pat) - it=itsFolders[folder].fontMap.tqfind(CFcEngine::createName(pat)); + it=itsFolders[folder].fontMap.find(CFcEngine::createName(pat)); } return it; @@ -2180,7 +2180,7 @@ bool CKioFonts::getSourceFiles(const KURL &src, TQStringList &files) uEnd=urls.end(); for(uIt=urls.begin(); uIt!=uEnd; ++uIt) - if(-1==files.tqfindIndex((*uIt).path())) + if(-1==files.findIndex((*uIt).path())) files.append((*uIt).path()); } } @@ -2290,7 +2290,7 @@ bool CKioFonts::confirmMultiple(const KURL &url, const TQStringList &files, EFol { TQString name(CFcEngine::createName(pat)); - if(-1==fonts.tqfindIndex(name)) + if(-1==fonts.findIndex(name)) fonts.append(name); } } @@ -2356,7 +2356,7 @@ bool CKioFonts::checkUrl(const KURL &u, bool rootOk) if(itsRoot) { if((isSysFolder(sect) || isUserFolder(sect)) && - (itsFolders[FOLDER_SYS].fontMap.end()==itsFolders[FOLDER_SYS].fontMap.tqfind(sect))) + (itsFolders[FOLDER_SYS].fontMap.end()==itsFolders[FOLDER_SYS].fontMap.find(sect))) //CPD: TODO: || it has a font specified! e.g. fonts:/System/Times -> even in have a fonts:/System font, redirect //should still happen { diff --git a/kcontrol/kfontinst/kio/KioFonts.h b/kcontrol/kfontinst/kio/KioFonts.h index 32d5a384e..66a2b01b9 100644 --- a/kcontrol/kfontinst/kio/KioFonts.h +++ b/kcontrol/kfontinst/kio/KioFonts.h @@ -82,7 +82,7 @@ class CKioFonts : public KIO::SlaveBase CDirList() { } CDirList(const TQString &str) : TQStringList(str) { } - void add(const TQString &d) { if ( tqcontains(d)) append(d); } + void add(const TQString &d) { if ( contains(d)) append(d); } }; struct TFolder diff --git a/kcontrol/kfontinst/lib/FcEngine.cpp b/kcontrol/kfontinst/lib/FcEngine.cpp index ec4f833a3..2b3d40737 100644 --- a/kcontrol/kfontinst/lib/FcEngine.cpp +++ b/kcontrol/kfontinst/lib/FcEngine.cpp @@ -185,72 +185,72 @@ static int fcSpacing(int spacing) static int strToWeight(const TQString &str, TQString &newStr) { - if(0==str.tqfind(i18n(KFI_WEIGHT_THIN), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_THIN), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_THIN).length()); return FC_WEIGHT_THIN; } - if(0==str.tqfind(i18n(KFI_WEIGHT_EXTRALIGHT), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_EXTRALIGHT), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_EXTRALIGHT).length()); return FC_WEIGHT_EXTRALIGHT; } - if(0==str.tqfind(i18n(KFI_WEIGHT_ULTRALIGHT), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_ULTRALIGHT), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_ULTRALIGHT).length()); return FC_WEIGHT_ULTRALIGHT; } - if(0==str.tqfind(i18n(KFI_WEIGHT_LIGHT), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_LIGHT), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_LIGHT).length()); return FC_WEIGHT_LIGHT; } - if(0==str.tqfind(i18n(KFI_WEIGHT_REGULAR), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_REGULAR), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_REGULAR).length()); return FC_WEIGHT_REGULAR; } - if(0==str.tqfind(i18n(KFI_WEIGHT_NORMAL), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_NORMAL), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_NORMAL).length()); return FC_WEIGHT_NORMAL; } - if(0==str.tqfind(i18n(KFI_WEIGHT_MEDIUM), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_MEDIUM), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_MEDIUM).length()); return FC_WEIGHT_MEDIUM; } - if(0==str.tqfind(i18n(KFI_WEIGHT_DEMIBOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_DEMIBOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_DEMIBOLD).length()); return FC_WEIGHT_SEMIBOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_SEMIBOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_SEMIBOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_SEMIBOLD).length()); return FC_WEIGHT_SEMIBOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_BOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_BOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_BOLD).length()); return FC_WEIGHT_BOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_EXTRABOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_EXTRABOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_EXTRABOLD).length()); return FC_WEIGHT_EXTRABOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_ULTRABOLD), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_ULTRABOLD), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_ULTRABOLD).length()); return FC_WEIGHT_ULTRABOLD; } - if(0==str.tqfind(i18n(KFI_WEIGHT_BLACK), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_BLACK), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_BLACK).length()); return FC_WEIGHT_BLACK; } - if(0==str.tqfind(i18n(KFI_WEIGHT_HEAVY), 0, false)) + if(0==str.find(i18n(KFI_WEIGHT_HEAVY), 0, false)) { newStr=str.mid(i18n(KFI_WEIGHT_HEAVY).length()); return FC_WEIGHT_HEAVY; @@ -263,47 +263,47 @@ static int strToWeight(const TQString &str, TQString &newStr) #ifndef KFI_FC_NO_WIDTHS static int strToWidth(const TQString &str, TQString &newStr) { - if(0==str.tqfind(i18n(KFI_WIDTH_ULTRACONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_ULTRACONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_ULTRACONDENSED).length()); return FC_WIDTH_ULTRACONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_EXTRACONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_EXTRACONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_EXTRACONDENSED).length()); return FC_WIDTH_EXTRACONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_CONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_CONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_CONDENSED).length()); return FC_WIDTH_CONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_SEMICONDENSED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_SEMICONDENSED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_SEMICONDENSED).length()); return FC_WIDTH_SEMICONDENSED; } - if(0==str.tqfind(i18n(KFI_WIDTH_NORMAL), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_NORMAL), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_NORMAL).length()); return FC_WIDTH_NORMAL; } - if(0==str.tqfind(i18n(KFI_WIDTH_SEMIEXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_SEMIEXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_SEMIEXPANDED).length()); return FC_WIDTH_SEMIEXPANDED; } - if(0==str.tqfind(i18n(KFI_WIDTH_EXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_EXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_EXPANDED).length()); return FC_WIDTH_EXPANDED; } - if(0==str.tqfind(i18n(KFI_WIDTH_EXTRAEXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_EXTRAEXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_EXTRAEXPANDED).length()); return FC_WIDTH_EXTRAEXPANDED; } - if(0==str.tqfind(i18n(KFI_WIDTH_ULTRAEXPANDED), 0, false)) + if(0==str.find(i18n(KFI_WIDTH_ULTRAEXPANDED), 0, false)) { newStr=str.mid(i18n(KFI_WIDTH_ULTRAEXPANDED).length()); return FC_WIDTH_ULTRAEXPANDED; @@ -316,9 +316,9 @@ static int strToWidth(const TQString &str, TQString &newStr) static int strToSlant(const TQString &str) { - if(-1!=str.tqfind(i18n(KFI_SLANT_ITALIC))) + if(-1!=str.find(i18n(KFI_SLANT_ITALIC))) return FC_SLANT_ITALIC; - if(-1!=str.tqfind(i18n(KFI_SLANT_OBLIQUE))) + if(-1!=str.find(i18n(KFI_SLANT_OBLIQUE))) return FC_SLANT_OBLIQUE; return FC_SLANT_ROMAN; } @@ -867,7 +867,7 @@ bool CFcEngine::getInfo(const KURL &url, int faceNo, TQString &full, TQString &f { int pos; - if(-1==(pos=itsDescriptiveName.tqfind(", "))) // No style information... + if(-1==(pos=itsDescriptiveName.find(", "))) // No style information... family=itsDescriptiveName; else family=itsDescriptiveName.left(pos); @@ -948,7 +948,7 @@ bool CFcEngine::parseUrl(const KURL &url, int faceNo, bool all) TQTextStream stream(&file); thumbUrl=stream.readLine(); - isThumbnailUrl=0==thumbUrl.tqfind(KFI_KIO_FONTS_PROTOCOL) && parseUrl(KURL(thumbUrl), faceNo, all); + isThumbnailUrl=0==thumbUrl.find(KFI_KIO_FONTS_PROTOCOL) && parseUrl(KURL(thumbUrl), faceNo, all); file.close(); } @@ -1003,7 +1003,7 @@ void CFcEngine::parseName(const TQString &name, int faceNo, bool all) itsDescriptiveName=name; itsSpacing=FC_PROPORTIONAL; - if(-1==(pos=name.tqfind(", "))) // No style information... + if(-1==(pos=name.find(", "))) // No style information... { itsWeight=FC_WEIGHT_NORMAL; #ifndef KFI_FC_NO_WIDTHS diff --git a/kcontrol/kfontinst/lib/Misc.cpp b/kcontrol/kfontinst/lib/Misc.cpp index 6e87c9b02..1e779b514 100644 --- a/kcontrol/kfontinst/lib/Misc.cpp +++ b/kcontrol/kfontinst/lib/Misc.cpp @@ -65,9 +65,9 @@ TQString dirSyntax(const TQString &d) { TQString ds(d); - ds.tqreplace("//", "/"); + ds.replace("//", "/"); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos!=(((int)ds.length())-1)) ds.append('/'); @@ -84,9 +84,9 @@ TQString xDirSyntax(const TQString &d) { TQString ds(d); - ds.tqreplace("//", "/"); + ds.replace("//", "/"); - int slashPos=ds.tqfindRev('/'); + int slashPos=ds.findRev('/'); if(slashPos==(((int)ds.length())-1)) ds.remove(slashPos, 1); @@ -100,7 +100,7 @@ TQString getDir(const TQString &f) { TQString d(f); - int slashPos=d.tqfindRev('/'); + int slashPos=d.findRev('/'); if(slashPos!=-1) d.remove(slashPos+1, d.length()); @@ -112,7 +112,7 @@ TQString getFile(const TQString &f) { TQString d(f); - int slashPos=d.tqfindRev('/'); + int slashPos=d.findRev('/'); if(slashPos!=-1) d.remove(0, slashPos+1); @@ -152,7 +152,7 @@ bool doCmd(const TQString &cmd, const TQString &p1, const TQString &p2, const TQ TQString changeExt(const TQString &f, const TQString &newExt) { TQString newStr(f); - int dotPos=newStr.tqfindRev('.'); + int dotPos=newStr.findRev('.'); if(-1==dotPos) newStr+=TQChar('.')+newExt; diff --git a/kcontrol/kicker/advancedDialog.cpp b/kcontrol/kicker/advancedDialog.cpp index a6790d9c9..29de71df7 100644 --- a/kcontrol/kicker/advancedDialog.cpp +++ b/kcontrol/kicker/advancedDialog.cpp @@ -136,7 +136,7 @@ void advancedDialog::save() // is there a config group for this extension? if(!c.hasGroup(group) || - group.tqcontains("Extension") < 1) + group.contains("Extension") < 1) { continue; } diff --git a/kcontrol/kicker/applettab_impl.cpp b/kcontrol/kicker/applettab_impl.cpp index 534f2cbdb..a8b7cdb20 100644 --- a/kcontrol/kicker/applettab_impl.cpp +++ b/kcontrol/kicker/applettab_impl.cpp @@ -132,7 +132,7 @@ void AppletTab::load( bool useDefaults ) TQStringList list = c.readListEntry("TrustedApplets"); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if(available.tqcontains(*it)) + if(available.contains(*it)) l_trusted << (*it); } } @@ -142,7 +142,7 @@ void AppletTab::load( bool useDefaults ) for ( TQStringList::Iterator it = available.begin(); it != available.end(); ++it ) { - if(!l_trusted.tqcontains(*it)) + if(!l_trusted.contains(*it)) l_available << (*it); } diff --git a/kcontrol/kicker/lookandfeeltab_impl.cpp b/kcontrol/kicker/lookandfeeltab_impl.cpp index 984666d36..24c640a1d 100644 --- a/kcontrol/kicker/lookandfeeltab_impl.cpp +++ b/kcontrol/kicker/lookandfeeltab_impl.cpp @@ -190,35 +190,35 @@ void LookAndFeelTab::load(bool useDefaults) if (config.readBoolEntry("EnableKMenuTiles", false)) { tile = config.readEntry("KMenuTile", "solid_blue"); - m_kmenuTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_kmenuTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_KMenuTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableDesktopButtonTiles", false)) { tile = config.readEntry("DesktopButtonTile", "solid_orange"); - m_desktopTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_desktopTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_DesktopButtonTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableURLTiles", false)) { tile = config.readEntry("URLTile", "solid_gray"); - m_urlTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_urlTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_URLTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableBrowserTiles", false)) { tile = config.readEntry("BrowserTile", "solid_green"); - m_browserTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_browserTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_BrowserTileColor->setEnabled(tile == "Colorize"); } if (config.readBoolEntry("EnableWindowListTiles", false)) { tile = config.readEntry("WindowListTile", "solid_green"); - m_windowListTile->setCurrentItem(m_tilename.tqfindIndex(tile)); + m_windowListTile->setCurrentItem(m_tilename.findIndex(tile)); kcfg_WindowListTileColor->setEnabled(tile == "Colorize"); } } @@ -328,7 +328,7 @@ void LookAndFeelTab::fillTileCombos() TQPixmap pix(tile); TQFileInfo fi(tile); tile = fi.fileName(); - tile.truncate(tile.tqfind("_tiny_up.png")); + tile.truncate(tile.find("_tiny_up.png")); m_tilename << tile; // Transform tile to words with title case diff --git a/kcontrol/kicker/main.cpp b/kcontrol/kicker/main.cpp index 31cd34c11..95d80cc31 100644 --- a/kcontrol/kicker/main.cpp +++ b/kcontrol/kicker/main.cpp @@ -187,7 +187,7 @@ void KickerConfig::setupExtensionInfo(KConfig& config, bool checkExists, bool re TQString group(*it); // is there a config group for this extension? - if (!config.hasGroup(group) || group.tqcontains("Extension") < 1) + if (!config.hasGroup(group) || group.contains("Extension") < 1) { continue; } diff --git a/kcontrol/kicker/positiontab_impl.cpp b/kcontrol/kicker/positiontab_impl.cpp index 5f89cd5a6..3a72e6417 100644 --- a/kcontrol/kicker/positiontab_impl.cpp +++ b/kcontrol/kicker/positiontab_impl.cpp @@ -220,7 +220,7 @@ void PositionTab::sizeChanged(int which) void PositionTab::movePanel(int whichButton) { - TQPushButton* pushed = reinterpret_cast(m_locationGroup->tqfind(whichButton)); + TQPushButton* pushed = reinterpret_cast(m_locationGroup->find(whichButton)); if (pushed == locationTopLeft) { diff --git a/kcontrol/kio/fakeuaprovider.cpp b/kcontrol/kio/fakeuaprovider.cpp index 2fe6d27f1..e48d15432 100644 --- a/kcontrol/kio/fakeuaprovider.cpp +++ b/kcontrol/kio/fakeuaprovider.cpp @@ -37,11 +37,11 @@ FakeUASProvider::FakeUASProvider() FakeUASProvider::StatusCode FakeUASProvider::createNewUAProvider( const TQString& uaStr ) { TQStringList split; - int pos = (uaStr).tqfind("::"); + int pos = (uaStr).find("::"); if ( pos == -1 ) { - pos = (uaStr).tqfind(':'); + pos = (uaStr).find(':'); if ( pos != -1 ) { split.append(uaStr.left(pos)); @@ -53,7 +53,7 @@ FakeUASProvider::StatusCode FakeUASProvider::createNewUAProvider( const TQString split = TQStringList::split("::", uaStr); } - if ( m_lstIdentity.tqcontains(split[1]) ) + if ( m_lstIdentity.contains(split[1]) ) return DUPLICATE_ENTRY; else { @@ -90,29 +90,29 @@ void FakeUASProvider::parseDescription() struct utsname utsn; uname( &utsn ); - tmp.tqreplace( QFL("appSysName"), TQString(utsn.sysname) ); - tmp.tqreplace( QFL("appSysRelease"), TQString(utsn.release) ); - tmp.tqreplace( QFL("appMachineType"), TQString(utsn.machine) ); + tmp.replace( QFL("appSysName"), TQString(utsn.sysname) ); + tmp.replace( QFL("appSysRelease"), TQString(utsn.release) ); + tmp.replace( QFL("appMachineType"), TQString(utsn.machine) ); TQStringList languageList = KGlobal::locale()->languageList(); if ( languageList.count() ) { - TQStringList::Iterator it = languageList.tqfind( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); if( it != languageList.end() ) { - if( languageList.tqcontains( TQString::tqfromLatin1("en") ) > 0 ) + if( languageList.contains( TQString::tqfromLatin1("en") ) > 0 ) languageList.remove( it ); else (*it) = TQString::tqfromLatin1("en"); } } - tmp.tqreplace( QFL("appLanguage"), TQString("%1").arg(languageList.join(", ")) ); - tmp.tqreplace( QFL("appPlatform"), QFL("X11") ); + tmp.replace( QFL("appLanguage"), TQString("%1").arg(languageList.join(", ")) ); + tmp.replace( QFL("appPlatform"), QFL("X11") ); } // Ignore dups... - if ( m_lstIdentity.tqcontains(tmp) ) + if ( m_lstIdentity.contains(tmp) ) continue; m_lstIdentity << tmp; @@ -133,7 +133,7 @@ void FakeUASProvider::parseDescription() TQString FakeUASProvider::aliasStr( const TQString& name ) { - int id = userAgentStringList().tqfindIndex(name); + int id = userAgentStringList().findIndex(name); if ( id == -1 ) return TQString::null; else @@ -142,7 +142,7 @@ TQString FakeUASProvider::aliasStr( const TQString& name ) TQString FakeUASProvider::agentStr( const TQString& name ) { - int id = userAgentAliasList().tqfindIndex(name); + int id = userAgentAliasList().findIndex(name); if ( id == -1 ) return TQString::null; else diff --git a/kcontrol/kio/kcookiesmanagement.cpp b/kcontrol/kio/kcookiesmanagement.cpp index da899be1f..fa9bb097c 100644 --- a/kcontrol/kio/kcookiesmanagement.cpp +++ b/kcontrol/kio/kcookiesmanagement.cpp @@ -408,7 +408,7 @@ void KCookiesManagement::deleteCookie(TQListViewItem* deleteItem) if( item->cookie() ) { CookieListViewItem *parent = static_cast(item->tqparent()); - CookiePropList *list = deletedCookies.tqfind(parent->domain()); + CookiePropList *list = deletedCookies.find(parent->domain()); if(!list) { list = new CookiePropList; diff --git a/kcontrol/kio/kcookiespolicies.cpp b/kcontrol/kio/kcookiespolicies.cpp index 163b9b14a..ac0b2572f 100644 --- a/kcontrol/kio/kcookiespolicies.cpp +++ b/kcontrol/kio/kcookiespolicies.cpp @@ -434,7 +434,7 @@ void KCookiesPolicies::defaults() void KCookiesPolicies::splitDomainAdvice (const TQString& cfg, TQString &domain, KCookieAdvice::Value &advice) { - int sepPos = cfg.tqfindRev(':'); + int sepPos = cfg.findRev(':'); // Ignore any policy that does not contain a domain... if ( sepPos <= 0 ) diff --git a/kcontrol/kio/kmanualproxydlg.cpp b/kcontrol/kio/kmanualproxydlg.cpp index a9c8e6eca..b5961db7c 100644 --- a/kcontrol/kio/kmanualproxydlg.cpp +++ b/kcontrol/kio/kmanualproxydlg.cpp @@ -337,7 +337,7 @@ bool KManualProxyDlg::handleDuplicate( const TQString& site ) TQListBoxItem* item = mDlg->lbExceptions->firstItem(); while ( item != 0 ) { - if ( item->text().tqfindRev( site ) != -1 && + if ( item->text().findRev( site ) != -1 && item != mDlg->lbExceptions->selectedItem() ) { TQString msg = i18n("You entered a duplicate address. " diff --git a/kcontrol/kio/policydlg.h b/kcontrol/kio/policydlg.h index 17616860f..a67bfccaa 100644 --- a/kcontrol/kio/policydlg.h +++ b/kcontrol/kio/policydlg.h @@ -52,11 +52,11 @@ public: if (advice.isEmpty()) return KCookieAdvice::Dunno; - if (advice.tqfind (TQString::tqfromLatin1("accept"), 0, false) == 0) + if (advice.find (TQString::tqfromLatin1("accept"), 0, false) == 0) return KCookieAdvice::Accept; - else if (advice.tqfind (TQString::tqfromLatin1("reject"), 0, false) == 0) + else if (advice.find (TQString::tqfromLatin1("reject"), 0, false) == 0) return KCookieAdvice::Reject; - else if (advice.tqfind (TQString::tqfromLatin1("ask"), 0, false) == 0) + else if (advice.find (TQString::tqfromLatin1("ask"), 0, false) == 0) return KCookieAdvice::Ask; return KCookieAdvice::Dunno; diff --git a/kcontrol/kio/smbrodlg.cpp b/kcontrol/kio/smbrodlg.cpp index e5337cbf2..148af43d1 100644 --- a/kcontrol/kio/smbrodlg.cpp +++ b/kcontrol/kio/smbrodlg.cpp @@ -101,7 +101,7 @@ void SMBRoOptions::load() // TQStringList _strList = KGlobal::charsets()->availableEncodingNames(); // TQString m_encoding = TQTextCodec::codecForLocale()->name(); -// m_encodingList->setCurrentItem( _strList.tqfindIndex( cfg->readEntry( "Encoding", m_encoding.lower() ) ) ); +// m_encodingList->setCurrentItem( _strList.findIndex( cfg->readEntry( "Encoding", m_encoding.lower() ) ) ); // unscramble TQString scrambled = cfg->readEntry( "Password" ); diff --git a/kcontrol/kio/uagentproviderdlg.cpp b/kcontrol/kio/uagentproviderdlg.cpp index adab4b611..5bf92cdb7 100644 --- a/kcontrol/kio/uagentproviderdlg.cpp +++ b/kcontrol/kio/uagentproviderdlg.cpp @@ -121,7 +121,7 @@ void UAProviderDlg::setSiteName( const TQString& text ) void UAProviderDlg::setIdentity( const TQString& text ) { - int id = dlg->cbAlias->listBox()->index( dlg->cbAlias->listBox()->tqfindItem(text) ); + int id = dlg->cbAlias->listBox()->index( dlg->cbAlias->listBox()->findItem(text) ); dlg->cbAlias->setCurrentItem( id ); slotActivated( dlg->cbAlias->currentText() ); if ( !dlg->leSite->isEnabled() ) diff --git a/kcontrol/kio/useragentdlg.cpp b/kcontrol/kio/useragentdlg.cpp index 26476d9a8..c34d5cadc 100644 --- a/kcontrol/kio/useragentdlg.cpp +++ b/kcontrol/kio/useragentdlg.cpp @@ -111,12 +111,12 @@ void UserAgentDlg::load() dlg->cbSendUAString->setChecked( b ); m_ua_keys = m_config->readEntry("UserAgentKeys", DEFAULT_USER_AGENT_KEYS).lower(); dlg->leDefaultId->setSqueezedText( KProtocolManager::defaultUserAgent( m_ua_keys ) ); - dlg->cbOS->setChecked( m_ua_keys.tqcontains('o') ); - dlg->cbOSVersion->setChecked( m_ua_keys.tqcontains('v') ); - dlg->cbOSVersion->setEnabled( m_ua_keys.tqcontains('o') ); - dlg->cbPlatform->setChecked( m_ua_keys.tqcontains('p') ); - dlg->cbProcessorType->setChecked( m_ua_keys.tqcontains('m') ); - dlg->cbLanguage->setChecked( m_ua_keys.tqcontains('l') ); + dlg->cbOS->setChecked( m_ua_keys.contains('o') ); + dlg->cbOSVersion->setChecked( m_ua_keys.contains('v') ); + dlg->cbOSVersion->setEnabled( m_ua_keys.contains('o') ); + dlg->cbPlatform->setChecked( m_ua_keys.contains('p') ); + dlg->cbProcessorType->setChecked( m_ua_keys.contains('m') ); + dlg->cbLanguage->setChecked( m_ua_keys.contains('l') ); updateButtons(); emit changed( false ); } @@ -135,12 +135,12 @@ void UserAgentDlg::defaults() dlg->lvDomainPolicyList->clear(); m_ua_keys = DEFAULT_USER_AGENT_KEYS; dlg->leDefaultId->setSqueezedText( KProtocolManager::defaultUserAgent(m_ua_keys) ); - dlg->cbOS->setChecked( m_ua_keys.tqcontains('o') ); - dlg->cbOSVersion->setChecked( m_ua_keys.tqcontains('v') ); - dlg->cbOSVersion->setEnabled( m_ua_keys.tqcontains('o') ); - dlg->cbPlatform->setChecked( m_ua_keys.tqcontains('p') ); - dlg->cbProcessorType->setChecked( m_ua_keys.tqcontains('m') ); - dlg->cbLanguage->setChecked( m_ua_keys.tqcontains('l') ); + dlg->cbOS->setChecked( m_ua_keys.contains('o') ); + dlg->cbOSVersion->setChecked( m_ua_keys.contains('v') ); + dlg->cbOSVersion->setEnabled( m_ua_keys.contains('o') ); + dlg->cbPlatform->setChecked( m_ua_keys.contains('p') ); + dlg->cbProcessorType->setChecked( m_ua_keys.contains('m') ); + dlg->cbLanguage->setChecked( m_ua_keys.contains('l') ); dlg->cbSendUAString->setChecked( true ); updateButtons(); configChanged(); @@ -351,7 +351,7 @@ void UserAgentDlg::changeDefaultUAModifiers( int ) if ( dlg->cbLanguage->isChecked() ) m_ua_keys += 'l'; - dlg->cbOSVersion->setEnabled(m_ua_keys.tqcontains('o')); + dlg->cbOSVersion->setEnabled(m_ua_keys.contains('o')); TQString modVal = KProtocolManager::defaultUserAgent( m_ua_keys ); if ( dlg->leDefaultId->text() != modVal ) diff --git a/kcontrol/konq/desktopbehavior_impl.cpp b/kcontrol/konq/desktopbehavior_impl.cpp index 3a03c4d69..49725a3af 100644 --- a/kcontrol/konq/desktopbehavior_impl.cpp +++ b/kcontrol/konq/desktopbehavior_impl.cpp @@ -259,7 +259,7 @@ void DesktopBehavior::fillMediaListView() for (; it2 != mimetypes.end(); ++it2) { if ( ((*it2)->name().startsWith("media/")) ) { - bool ok=excludedMedia.tqcontains((*it2)->name())==0; + bool ok=excludedMedia.contains((*it2)->name())==0; new DesktopBehaviorMediaItem (this, mediaListView, (*it2)->comment(), (*it2)->name(),ok); } } @@ -309,8 +309,8 @@ void DesktopBehavior::load( bool useDefaults ) previewListView->clear(); TQStringList previews = g_pConfig->readListEntry("Preview"); for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - new DesktopBehaviorPreviewItem(this, previewListView, *it, previews.tqcontains((*it)->desktopEntryName())); - new DesktopBehaviorPreviewItem(this, previewListView, previews.tqcontains("audio/")); + new DesktopBehaviorPreviewItem(this, previewListView, *it, previews.contains((*it)->desktopEntryName())); + new DesktopBehaviorPreviewItem(this, previewListView, previews.contains("audio/")); // g_pConfig->setGroup( "FMSettings" ); toolTipBox->setChecked(g_pConfig->readBoolEntry( "ShowFileTips", true ) ); diff --git a/kcontrol/konqhtml/domainlistview.cpp b/kcontrol/konqhtml/domainlistview.cpp index 4927eda48..699940b66 100644 --- a/kcontrol/konqhtml/domainlistview.cpp +++ b/kcontrol/konqhtml/domainlistview.cpp @@ -163,7 +163,7 @@ void DomainListView::deletePressed() return; } - DomainPolicyMap::Iterator it = domainPolicies.tqfind(index); + DomainPolicyMap::Iterator it = domainPolicies.find(index); if (it != domainPolicies.end()) { delete it.data(); domainPolicies.remove(it); diff --git a/kcontrol/konqhtml/filteropts.cpp b/kcontrol/konqhtml/filteropts.cpp index c7bb2bdbd..731bae2ec 100644 --- a/kcontrol/konqhtml/filteropts.cpp +++ b/kcontrol/konqhtml/filteropts.cpp @@ -189,7 +189,7 @@ void KCMFilter::importFilters() } } - if (!line.isEmpty() && mListBox->tqfindItem(line, TQt::CaseSensitive|TQt::ExactMatch) == 0) + if (!line.isEmpty() && mListBox->findItem(line, TQt::CaseSensitive|TQt::ExactMatch) == 0) paths.append(line); } f.close(); @@ -267,7 +267,7 @@ void KCMFilter::load( bool useDefaults ) for (int i=0; i(js_popup->tqfind( + button = static_cast(js_popup->find( policies->window_open)); if (button != 0) button->setChecked(true); - button = static_cast(js_resize->tqfind( + button = static_cast(js_resize->find( policies->window_resize)); if (button != 0) button->setChecked(true); - button = static_cast(js_move->tqfind( + button = static_cast(js_move->find( policies->window_move)); if (button != 0) button->setChecked(true); - button = static_cast(js_focus->tqfind( + button = static_cast(js_focus->find( policies->window_focus)); if (button != 0) button->setChecked(true); - button = static_cast(js_statusbar->tqfind( + button = static_cast(js_statusbar->find( policies->window_status)); if (button != 0) button->setChecked(true); } diff --git a/kcontrol/konsole/schemaeditor.cpp b/kcontrol/konsole/schemaeditor.cpp index fc9ddee3d..80b8ef2fa 100644 --- a/kcontrol/konsole/schemaeditor.cpp +++ b/kcontrol/konsole/schemaeditor.cpp @@ -241,7 +241,7 @@ void SchemaEditor::loadAllSchema(TQString currentFile) TQString title = readSchemaTitle(name); // Only insert new items so that local items override global - if (schemaList->tqfindItem(title, ExactMatch) == 0) { + if (schemaList->findItem(title, ExactMatch) == 0) { if (title.isNull() || title.isEmpty()) title=i18n("untitled"); @@ -594,7 +594,7 @@ void SchemaEditor::readSchema(int num) continue; TQString qline(line); - backgndLine->setText(locate("wallpaper", qline.mid( qline.tqfind(" ",7)+1 ) )); + backgndLine->setText(locate("wallpaper", qline.mid( qline.find(" ",7)+1 ) )); modeCombo->setCurrentItem(attr - 2); } diff --git a/kcontrol/krdb/krdb.cpp b/kcontrol/krdb/krdb.cpp index 582937b8c..d2e4731bd 100644 --- a/kcontrol/krdb/krdb.cpp +++ b/kcontrol/krdb/krdb.cpp @@ -174,10 +174,10 @@ static void applyQtSettings( KConfig& kglobals, TQSettings& settings ) // end it with.. So keep a TQMap to bool, specifying whether the path is KDE-specified.. TQString qversion = qVersion(); - if ( qversion.tqcontains( '.' ) > 1 ) - qversion.truncate( qversion.tqfindRev( '.' ) ); - if ( qversion.tqcontains( '-' ) ) - qversion.truncate( qversion.tqfindRev( '-' ) ); + if ( qversion.contains( '.' ) > 1 ) + qversion.truncate( qversion.findRev( '.' ) ); + if ( qversion.contains( '-' ) ) + qversion.truncate( qversion.findRev( '-' ) ); TQStringList kdeAdded = settings.readListEntry("/qt/KDE/kdeAddedLibraryPaths"); @@ -220,8 +220,8 @@ static void applyQtSettings( KConfig& kglobals, TQSettings& settings ) pathDb[path]=true; - if(path.tqcontains("/lib64/")) - path.tqreplace("/lib64/","/lib/"); + if(path.contains("/lib64/")) + path.replace("/lib64/","/lib/"); pathDb[path]=true; } diff --git a/kcontrol/kthememanager/ktheme.cpp b/kcontrol/kthememanager/ktheme.cpp index 92859de6c..5396d9e2b 100644 --- a/kcontrol/kthememanager/ktheme.cpp +++ b/kcontrol/kthememanager/ktheme.cpp @@ -469,14 +469,14 @@ void KTheme::apply() iconConf->setGroup( "ToolbarIcons" ); TQString iconName = iconSubElem.tagName(); - if ( iconName.tqcontains( "Color" ) ) + if ( iconName.contains( "Color" ) ) { TQColor iconColor = TQColor( iconSubElem.attribute( "rgb" ) ); iconConf->writeEntry( iconName, iconColor, true, true ); } - else if ( iconName.tqcontains( "Value" ) || iconName == "Size" ) + else if ( iconName.contains( "Value" ) || iconName == "Size" ) iconConf->writeEntry( iconName, iconSubElem.attribute( "value" ).toUInt(), true, true ); - else if ( iconName.tqcontains( "Effect" ) ) + else if ( iconName.contains( "Effect" ) ) iconConf->writeEntry( iconName, iconSubElem.attribute( "name" ), true, true ); else iconConf->writeEntry( iconName, static_cast( iconSubElem.attribute( "value" ).toUInt() ), true, true ); @@ -738,18 +738,18 @@ void KTheme::createIconElems( const TQString & group, const TQString & object, << "DisabledColor" << "DisabledColor2" << "DisabledEffect" << "DisabledSemiTransparent" << "DisabledValue"; for ( TQStringList::ConstIterator it = elemNames.begin(); it != elemNames.end(); ++it ) { - if ( (*it).tqcontains( "Color" ) ) + if ( (*it).contains( "Color" ) ) createColorElem( *it, object, parent, cfg ); else { TQDomElement tmpCol = m_dom.createElement( *it ); tmpCol.setAttribute( "object", object ); - if ( (*it).tqcontains( "Value" ) || *it == "Size" ) + if ( (*it).contains( "Value" ) || *it == "Size" ) tmpCol.setAttribute( "value", cfg->readNumEntry( *it, 1 ) ); - else if ( (*it).tqcontains( "DisabledEffect" ) ) + else if ( (*it).contains( "DisabledEffect" ) ) tmpCol.setAttribute( "name", cfg->readEntry( *it, "togray" ) ); - else if ( (*it).tqcontains( "Effect" ) ) + else if ( (*it).contains( "Effect" ) ) tmpCol.setAttribute( "name", cfg->readEntry( *it, "none" ) ); else tmpCol.setAttribute( "value", cfg->readBoolEntry( *it, false ) ); @@ -832,7 +832,7 @@ TQString KTheme::processFilePath( const TQString & section, const TQString & pat TQString KTheme::unprocessFilePath( const TQString & section, TQString path ) { if ( path.startsWith( "theme:/" ) ) - return path.tqreplace( TQRegExp( "^theme:/" ), m_kgd->findResourceDir( "themes", m_name + "/" + m_name + ".xml") + m_name + "/" ); + return path.replace( TQRegExp( "^theme:/" ), m_kgd->findResourceDir( "themes", m_name + "/" + m_name + ".xml") + m_name + "/" ); if ( TQFile::exists( path ) ) return path; diff --git a/kcontrol/kthememanager/kthememanager.cpp b/kcontrol/kthememanager/kthememanager.cpp index 111384bd5..ed945067b 100644 --- a/kcontrol/kthememanager/kthememanager.cpp +++ b/kcontrol/kthememanager/kthememanager.cpp @@ -136,7 +136,7 @@ void kthememanager::load(bool useDefaults) conf.setGroup( "General" ); TQString themeName = conf.readEntry( "CurrentTheme" ); - TQListViewItem * cur = dlg->lvThemes->tqfindItem( themeName, 0 ); + TQListViewItem * cur = dlg->lvThemes->findItem( themeName, 0 ); if ( cur ) { dlg->lvThemes->setSelected( cur, true ); @@ -264,7 +264,7 @@ void kthememanager::slotRemoveTheme() bool kthememanager::themeExist(const TQString &_themeName) { - return ( dlg->lvThemes->tqfindItem( _themeName, 0 )!=0 ); + return ( dlg->lvThemes->findItem( _themeName, 0 )!=0 ); } void kthememanager::slotCreateTheme() @@ -298,7 +298,7 @@ void kthememanager::slotCreateTheme() m_theme->setAuthor( dlg.getAuthor() ); m_theme->setEmail( dlg.getEmail() ); m_theme->setHomepage( dlg.getHomepage() ); - m_theme->setComment( dlg.getComment().tqreplace( "\n", "" ) ); + m_theme->setComment( dlg.getComment().replace( "\n", "" ) ); m_theme->setVersion( dlg.getVersion() ); TQString result = m_theme->createYourself( true ); diff --git a/kcontrol/locale/kcmlocale.cpp b/kcontrol/locale/kcmlocale.cpp index 81b899caa..c2ca4c310 100644 --- a/kcontrol/locale/kcmlocale.cpp +++ b/kcontrol/locale/kcmlocale.cpp @@ -172,7 +172,7 @@ void KLocaleConfig::slotAddLanguage(const TQString & code) pos = 0; // If it's already in list, just move it (delete the old, then insert a new) - int oldPos = languageList.tqfindIndex( code ); + int oldPos = languageList.findIndex( code ); if ( oldPos != -1 ) languageList.remove( languageList.tqat(oldPos) ); @@ -305,9 +305,9 @@ void KLocaleConfig::loadLanguageList() m_locale->translate("without name")); TQString tag = *it; - int index = tag.tqfindRev('/'); + int index = tag.findRev('/'); tag = tag.left(index); - index = tag.tqfindRev('/'); + index = tag.findRev('/'); tag = tag.mid(index + 1); m_addLanguage->insertItem(name, tag, submenu, menu_index); } @@ -338,11 +338,11 @@ void KLocaleConfig::loadCountryList() TQString tag = *it; int index; - index = tag.tqfindRev('/'); + index = tag.findRev('/'); if (index != -1) tag = tag.mid(index + 1); - index = tag.tqfindRev('.'); + index = tag.findRev('.'); if (index != -1) tag.truncate(index); @@ -374,9 +374,9 @@ void KLocaleConfig::loadCountryList() TQString submenu = entry.readEntry("Region"); TQString tag = *it; - int index = tag.tqfindRev('/'); + int index = tag.findRev('/'); tag.truncate(index); - index = tag.tqfindRev('/'); + index = tag.findRev('/'); tag = tag.mid(index + 1); int menu_index = submenu.isEmpty() ? -1 : -2; diff --git a/kcontrol/locale/localemon.cpp b/kcontrol/locale/localemon.cpp index 2c2fa37c5..16987cc90 100644 --- a/kcontrol/locale/localemon.cpp +++ b/kcontrol/locale/localemon.cpp @@ -152,7 +152,7 @@ void KLocaleConfigMoney::save() m_locale->monetaryDecimalSymbol(), true, true); str = ent.readEntry("MonetaryThousandsSeparator", TQString::tqfromLatin1(",")); - str.tqreplace(TQString::tqfromLatin1("$0"), TQString()); + str.replace(TQString::tqfromLatin1("$0"), TQString()); config->deleteEntry("MonetaryThousandsSeparator", false, true); if (str != m_locale->monetaryThousandsSeparator()) config->writeEntry("MonetaryThousandsSeparator", diff --git a/kcontrol/locale/localenum.cpp b/kcontrol/locale/localenum.cpp index 2095e1e9a..31f06fd98 100644 --- a/kcontrol/locale/localenum.cpp +++ b/kcontrol/locale/localenum.cpp @@ -105,7 +105,7 @@ void KLocaleConfigNumber::save() str = ent.readEntry("ThousandsSeparator", TQString::tqfromLatin1(",")); config->deleteEntry("ThousandsSeparator", false, true); - str.tqreplace(TQString::tqfromLatin1("$0"), TQString()); + str.replace(TQString::tqfromLatin1("$0"), TQString()); if (str != m_locale->thousandsSeparator()) config->writeEntry("ThousandsSeparator", TQString::tqfromLatin1("$0%1$0") diff --git a/kcontrol/privacy/kprivacymanager.cpp b/kcontrol/privacy/kprivacymanager.cpp index 6df0d04f9..098c3e75f 100644 --- a/kcontrol/privacy/kprivacymanager.cpp +++ b/kcontrol/privacy/kprivacymanager.cpp @@ -161,7 +161,7 @@ bool KPrivacyManager::isApplicationRegistered(const TQString &appName) QCStringList regApps = kapp->dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = regApps.begin(); it != regApps.end(); ++it ) - if((*it).tqfind(appName.latin1()) != -1) return true; + if((*it).find(appName.latin1()) != -1) return true; return false; } diff --git a/kcontrol/randr/krandrmodule.cpp b/kcontrol/randr/krandrmodule.cpp index e87dbad5b..d5087cc35 100644 --- a/kcontrol/randr/krandrmodule.cpp +++ b/kcontrol/randr/krandrmodule.cpp @@ -181,7 +181,7 @@ void KRandRModule::slotScreenChanged(int screen) // Clear rotations for (int i = m_rotationGroup->count() - 1; i >= 0; i--) - m_rotationGroup->remove(m_rotationGroup->tqfind(i)); + m_rotationGroup->remove(m_rotationGroup->find(i)); // Create rotations for (int i = 0; i < RandRScreen::OrientationCount; i++) @@ -196,21 +196,21 @@ void KRandRModule::slotScreenChanged(int screen) void KRandRModule::slotRotationChanged() { - if (m_rotationGroup->tqfind(0)->isOn()) + if (m_rotationGroup->find(0)->isOn()) currentScreen()->proposeRotation(RandRScreen::Rotate0); - else if (m_rotationGroup->tqfind(1)->isOn()) + else if (m_rotationGroup->find(1)->isOn()) currentScreen()->proposeRotation(RandRScreen::Rotate90); - else if (m_rotationGroup->tqfind(2)->isOn()) + else if (m_rotationGroup->find(2)->isOn()) currentScreen()->proposeRotation(RandRScreen::Rotate180); else { - Q_ASSERT(m_rotationGroup->tqfind(3)->isOn()); + Q_ASSERT(m_rotationGroup->find(3)->isOn()); currentScreen()->proposeRotation(RandRScreen::Rotate270); } - if (m_rotationGroup->tqfind(4)->isOn()) + if (m_rotationGroup->find(4)->isOn()) currentScreen()->proposeRotation(currentScreen()->proposedRotation() ^ RandRScreen::ReflectX); - if (m_rotationGroup->tqfind(5)->isOn()) + if (m_rotationGroup->find(5)->isOn()) currentScreen()->proposeRotation(currentScreen()->proposedRotation() ^ RandRScreen::ReflectY); setChanged(); @@ -354,8 +354,8 @@ void KRandRModule::update() Q_ASSERT(currentScreen()->proposedRotation() & RandRScreen::RotateMask); break; } - m_rotationGroup->tqfind(4)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectX); - m_rotationGroup->tqfind(5)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectY); + m_rotationGroup->find(4)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectX); + m_rotationGroup->find(5)->setDown(currentScreen()->proposedRotation() & RandRScreen::ReflectY); m_rotationGroup->blockSignals(false); m_refreshRates->blockSignals(true); diff --git a/kcontrol/randr/krandrpassivepopup.cpp b/kcontrol/randr/krandrpassivepopup.cpp index 207dfac2e..8f340bdee 100644 --- a/kcontrol/randr/krandrpassivepopup.cpp +++ b/kcontrol/randr/krandrpassivepopup.cpp @@ -60,7 +60,7 @@ void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P ) break; win = parent; - TQWidget* widget = TQWidget::tqfind( win ); + TQWidget* widget = TQWidget::find( win ); if( widget != NULL ) { widget->installEventFilter( this ); @@ -94,14 +94,14 @@ void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P ) bool KRandrPassivePopup::eventFilter( TQObject* o, TQEvent* e ) { if( e->type() == TQEvent::Move && o->isWidgetType() - && watched_widgets.tqcontains( TQT_TQWIDGET( o ))) + && watched_widgets.contains( TQT_TQWIDGET( o ))) TQTimer::singleShot( 0, this, TQT_SLOT( slotPositionSelf())); return false; } bool KRandrPassivePopup::x11Event( XEvent* e ) { - if( e->type == ConfigureNotify && watched_windows.tqcontains( e->xconfigure.window )) + if( e->type == ConfigureNotify && watched_windows.contains( e->xconfigure.window )) { if( !update_timer.isActive()) update_timer.start( 10, true ); diff --git a/kcontrol/randr/krandrtray.cpp b/kcontrol/randr/krandrtray.cpp index 49e0c17af..ca2e6e95d 100644 --- a/kcontrol/randr/krandrtray.cpp +++ b/kcontrol/randr/krandrtray.cpp @@ -260,7 +260,7 @@ void KRandRSystemTray::contextMenuAboutToShow(KPopupMenu* menu) void KRandRSystemTray::slotScreenActivated() { - setCurrentScreen(m_screenPopups.tqfind(static_cast(sender()))); + setCurrentScreen(m_screenPopups.find(static_cast(sender()))); } void KRandRSystemTray::configChanged() diff --git a/kcontrol/samba/kcmsambaimports.cpp b/kcontrol/samba/kcmsambaimports.cpp index 0c9a5d3fd..fd31f7800 100644 --- a/kcontrol/samba/kcmsambaimports.cpp +++ b/kcontrol/samba/kcmsambaimports.cpp @@ -74,16 +74,16 @@ void ImportsView::updateList() if (e!=0) { s=buf; - if ((s.tqcontains(" nfs ")) || (s.tqcontains(" smbfs "))) + if ((s.contains(" nfs ")) || (s.contains(" smbfs "))) { - strSource=s.left(s.tqfind(" on /")); - strMount=s.mid(s.tqfind(" on /")+4,s.length()); - if ((s.tqcontains(" nfs ")) || (s.tqcontains("/remote on "))) + strSource=s.left(s.find(" on /")); + strMount=s.mid(s.find(" on /")+4,s.length()); + if ((s.contains(" nfs ")) || (s.contains("/remote on "))) strType="NFS"; - else if (s.tqcontains(" smbfs ")) + else if (s.contains(" smbfs ")) strType="SMB"; - int pos(strMount.tqfind(" type ")); - if (pos==-1) pos=strMount.tqfind(" read/"); + int pos(strMount.find(" type ")); + if (pos==-1) pos=strMount.find(" read/"); strMount=strMount.left(pos); new TQListViewItem(&list,strType,strSource,strMount); }; diff --git a/kcontrol/samba/kcmsambastatistics.cpp b/kcontrol/samba/kcmsambastatistics.cpp index 0070e4723..ee9a8ab20 100644 --- a/kcontrol/samba/kcmsambastatistics.cpp +++ b/kcontrol/samba/kcmsambastatistics.cpp @@ -150,8 +150,8 @@ void StatisticsView::calculate() { if (connCount) { - if ((TQString(item->text(1)).tqcontains(i18n("CONNECTION OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("CONNECTION OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) { if (expandedInfoCb->isChecked()) item2=item->text(2); else item2=serviceLe->text(); @@ -163,8 +163,8 @@ void StatisticsView::calculate() } else { - if ((TQString(item->text(1)).tqcontains(i18n("FILE OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("FILE OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) { if (expandedInfoCb->isChecked()) item2=item->text(2); else item2=serviceLe->text(); @@ -201,14 +201,14 @@ void StatisticsView::calculate() { if (connCount) { - if ((TQString(item->text(1)).tqcontains(i18n("CONNECTION OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("CONNECTION OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) count++; } else { - if ((TQString(item->text(1)).tqcontains(i18n("FILE OPENED"))) - && (TQString(item->text(2)).tqcontains(rService)) && (TQString(item->text(3)).tqcontains(rHost))) + if ((TQString(item->text(1)).contains(i18n("FILE OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) count++; }; item=item->nextSibling(); diff --git a/kcontrol/samba/ksmbstatus.cpp b/kcontrol/samba/ksmbstatus.cpp index b36d5325b..c94bc5129 100644 --- a/kcontrol/samba/ksmbstatus.cpp +++ b/kcontrol/samba/ksmbstatus.cpp @@ -31,8 +31,8 @@ #include "ksmbstatus.moc" -#define Before(ttf,in) in.left(in.tqfind(ttf)) -#define After(ttf,in) (in.tqcontains(ttf)?TQString(in.mid(in.tqfind(ttf)+TQString(ttf).length())):TQString("")) +#define Before(ttf,in) in.left(in.find(ttf)) +#define After(ttf,in) (in.contains(ttf)?TQString(in.mid(in.find(ttf)+TQString(ttf).length())):TQString("")) NetMon::NetMon( TQWidget * parent, KConfig *config, const char * name ) : TQWidget(parent, name) @@ -77,7 +77,7 @@ NetMon::NetMon( TQWidget * parent, KConfig *config, const char * name ) void NetMon::processNFSLine(char *bufline, int) { TQCString line(bufline); - if (line.tqcontains(":/")) + if (line.contains(":/")) new TQListViewItem(list,"NFS",After(":",line),Before(":/",line)); } @@ -87,14 +87,14 @@ void NetMon::processSambaLine(char *bufline, int) rownumber++; if (rownumber == 2) version->setText(bufline); // second line = samba version - if ((readingpart==header) && line.tqcontains("Service")) + if ((readingpart==header) && line.contains("Service")) { - iUser=line.tqfind("uid"); - iGroup=line.tqfind("gid"); - iPid=line.tqfind("pid"); - iMachine=line.tqfind("machine"); + iUser=line.find("uid"); + iGroup=line.find("gid"); + iPid=line.find("pid"); + iMachine=line.find("machine"); } - else if ((readingpart==header) && (line.tqcontains("---"))) + else if ((readingpart==header) && (line.contains("---"))) { readingpart=connexions; } @@ -111,7 +111,7 @@ void NetMon::processSambaLine(char *bufline, int) } else if (readingpart==connexions) readingpart=locked_files; - else if ((readingpart==locked_files) && (line.tqfind("No ")==0)) + else if ((readingpart==locked_files) && (line.find("No ")==0)) readingpart=finished; else if (readingpart==locked_files) { diff --git a/kcontrol/screensaver/saverconfig.cpp b/kcontrol/screensaver/saverconfig.cpp index a7185135e..bf8cdc54a 100644 --- a/kcontrol/screensaver/saverconfig.cpp +++ b/kcontrol/screensaver/saverconfig.cpp @@ -29,7 +29,7 @@ bool SaverConfig::read(const TQString &file) mSaver = config.readPathEntry("Exec"); } - int indx = file.tqfindRev('/'); + int indx = file.findRev('/'); if (indx >= 0) { mFile = file.mid(indx+1); } diff --git a/kcontrol/screensaver/scrnsave.cpp b/kcontrol/screensaver/scrnsave.cpp index d4470be06..87d4b3208 100644 --- a/kcontrol/screensaver/scrnsave.cpp +++ b/kcontrol/screensaver/scrnsave.cpp @@ -360,7 +360,7 @@ void KScreenSaver::load( bool useDefaults ) for (SaverConfig* saver = mSaverList.first(); saver != 0; saver = mSaverList.next()) { if (saver->file() == mSaver) { - selectedItem = mSaverListView->tqfindItem ( saver->name(), 0 ); + selectedItem = mSaverListView->findItem ( saver->name(), 0 ); if (selectedItem) { mSelected = i; break; @@ -503,7 +503,7 @@ void KScreenSaver::findSavers() item = new TQListViewItem ( mSaverListView, s->name(), "2" + s->name() ); else { - TQListViewItem *categoryItem = mSaverListView->tqfindItem( s->category(), 0 ); + TQListViewItem *categoryItem = mSaverListView->findItem( s->category(), 0 ); if ( !categoryItem ) { categoryItem = new TQListViewItem ( mSaverListView, s->category(), "1" + s->category() ); categoryItem->setPixmap ( 0, SmallIcon ( "kscreensaver" ) ); diff --git a/kcontrol/style/kcmstyle.cpp b/kcontrol/style/kcmstyle.cpp index 5caef15d3..ba6559c1b 100644 --- a/kcontrol/style/kcmstyle.cpp +++ b/kcontrol/style/kcmstyle.cpp @@ -666,7 +666,7 @@ void KCMStyle::save() bool KCMStyle::findStyle( const TQString& str, int& combobox_item ) { - StyleEntry* se = styleEntries.tqfind(str.lower()); + StyleEntry* se = styleEntries.find(str.lower()); TQString name = se ? se->name : str; @@ -761,7 +761,7 @@ void KCMStyle::loadStyle( KConfig& config ) { TQString id = (*it).lower(); // Find the entry. - if ( (entry = styleEntries.tqfind(id)) != 0 ) + if ( (entry = styleEntries.find(id)) != 0 ) { // Do not add hidden entries if (entry->hidden) @@ -802,9 +802,9 @@ void KCMStyle::loadStyle( KConfig& config ) item = i; if ( id == cfgStyle ) // ExactMatch break; - else if ( id.tqcontains( cfgStyle ) ) + else if ( id.contains( cfgStyle ) ) break; - else if ( id.tqcontains( TQApplication::tqstyle().className() ) ) + else if ( id.contains( TQApplication::tqstyle().className() ) ) break; item = 0; } @@ -850,7 +850,7 @@ void KCMStyle::switchStyle(const TQString& styleName, bool force) appliedStyle = style; // Set the correct style description - StyleEntry* entry = styleEntries.tqfind( styleName ); + StyleEntry* entry = styleEntries.find( styleName ); TQString desc; desc = i18n("Description: %1").arg( entry ? entry->desc : i18n("No description available.") ); lblStyleDesc->setText( desc ); diff --git a/kcontrol/usbview/kcmusb.cpp b/kcontrol/usbview/kcmusb.cpp index 8d85b2fb5..5939e5997 100644 --- a/kcontrol/usbview/kcmusb.cpp +++ b/kcontrol/usbview/kcmusb.cpp @@ -104,7 +104,7 @@ static void delete_recursive( TQListViewItem *item, const TQIntDicttext(1).toUInt())) { + if (!new_items.find(it.current()->text(1).toUInt())) { delete_recursive( it.current()->firstChild(), new_items); delete it.current(); } @@ -133,7 +133,7 @@ void USBViewer::refresh() TQ_UINT32 k = key(*it.current()); if (level == 0) { - TQListViewItem *item = _items.tqfind(k); + TQListViewItem *item = _items.find(k); if (!item) { item = new TQListViewItem(_devices, it.current()->product(), @@ -144,10 +144,10 @@ void USBViewer::refresh() } else { - TQListViewItem *parent = new_items.tqfind(key_parent(*it.current())); + TQListViewItem *parent = new_items.find(key_parent(*it.current())); if (parent) { - TQListViewItem *item = _items.tqfind(k); + TQListViewItem *item = _items.find(k); if (!item) { item = new TQListViewItem(parent, diff --git a/kcontrol/usbview/usbdevices.cpp b/kcontrol/usbview/usbdevices.cpp index 74fcf3609..440a87edc 100644 --- a/kcontrol/usbview/usbdevices.cpp +++ b/kcontrol/usbview/usbdevices.cpp @@ -103,7 +103,7 @@ void USBDevice::parseSysDir(int bus, int parent, int level, TQString dname) TQStringList list = dir.entryList(); for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) { - if ((*it).tqcontains(':')) + if ((*it).contains(':')) continue; USBDevice* dev = new USBDevice(); @@ -277,8 +277,8 @@ bool USBDevice::parse(TQString fname) // read in the device infos USBDevice *device = 0; int start=0, end; - result.tqreplace(TQRegExp("^\n"),""); - while ((end = result.tqfind('\n', start)) > 0) + result.replace(TQRegExp("^\n"),""); + while ((end = result.find('\n', start)) > 0) { TQString line = result.mid(start, end-start); diff --git a/kdcop/kdcoplistview.cpp b/kdcop/kdcoplistview.cpp index 7348fbc01..cc727072b 100644 --- a/kdcop/kdcoplistview.cpp +++ b/kdcop/kdcoplistview.cpp @@ -62,7 +62,7 @@ TQString KDCOPListView::encode(TQListViewItem *theCode) TQString unNormalisedSignature(function); - int s = unNormalisedSignature.tqfind(' '); + int s = unNormalisedSignature.find(' '); if ( s < 0 ) s = 0; @@ -71,8 +71,8 @@ TQString KDCOPListView::encode(TQListViewItem *theCode) unNormalisedSignature = unNormalisedSignature.mid(s); - int left = unNormalisedSignature.tqfind('('); - int right = unNormalisedSignature.tqfindRev(')'); + int left = unNormalisedSignature.find('('); + int right = unNormalisedSignature.findRev(')'); if (-1 == left) { @@ -86,7 +86,7 @@ TQString KDCOPListView::encode(TQListViewItem *theCode) for (TQStringList::Iterator it = types.begin(); it != types.end(); ++it) { (*it) = (*it).stripWhiteSpace(); - int s = (*it).tqfind(' '); + int s = (*it).find(' '); if (-1 != s) { names.append((*it).mid(s + 1)); diff --git a/kdcop/kdcopwindow.cpp b/kdcop/kdcopwindow.cpp index d8f6b4b3d..212376a0a 100644 --- a/kdcop/kdcopwindow.cpp +++ b/kdcop/kdcopwindow.cpp @@ -1158,7 +1158,7 @@ KDCOPWindow::getParameters { TQString unNormalisedSignature(_unNormalisedSignature); - int s = unNormalisedSignature.tqfind(' '); + int s = unNormalisedSignature.find(' '); if ( s < 0 ) s = 0; @@ -1167,8 +1167,8 @@ KDCOPWindow::getParameters unNormalisedSignature = unNormalisedSignature.mid(s); - int left = unNormalisedSignature.tqfind('('); - int right = unNormalisedSignature.tqfindRev(')'); + int left = unNormalisedSignature.find('('); + int right = unNormalisedSignature.findRev(')'); if (-1 == left) { @@ -1189,9 +1189,9 @@ KDCOPWindow::getParameters { (*it) = (*it).simplifyWhiteSpace(); - int s = (*it).tqfindRev(' '); + int s = (*it).findRev(' '); - if (-1 != s && !intTypes.tqcontains((*it).mid(s + 1))) + if (-1 != s && !intTypes.contains((*it).mid(s + 1))) { names.append((*it).mid(s + 1)); diff --git a/kdebugdialog/kdebugdialog.cpp b/kdebugdialog/kdebugdialog.cpp index 32ac341ac..e626fcb12 100644 --- a/kdebugdialog/kdebugdialog.cpp +++ b/kdebugdialog/kdebugdialog.cpp @@ -200,7 +200,7 @@ void KDebugDialog::slotDebugAreaChanged( const TQString & text ) save(); TQString data = text.simplifyWhiteSpace(); - int space = data.tqfind(" "); + int space = data.find(" "); if (space == -1) kdError() << "No space:" << data << endl; diff --git a/kdebugdialog/klistdebugdialog.cpp b/kdebugdialog/klistdebugdialog.cpp index 1f358e35a..a1b75ee83 100644 --- a/kdebugdialog/klistdebugdialog.cpp +++ b/kdebugdialog/klistdebugdialog.cpp @@ -83,9 +83,9 @@ void KListDebugDialog::generateCheckBoxes( const TQString& filter ) for ( ; it != m_areaList.end() ; ++it ) { TQString data = (*it).simplifyWhiteSpace(); - if ( filter.isEmpty() || data.lower().tqcontains( filter.lower() ) ) + if ( filter.isEmpty() || data.lower().contains( filter.lower() ) ) { - int space = data.tqfind(" "); + int space = data.find(" "); if (space == -1) kdError() << "No space:" << data << endl; @@ -129,7 +129,7 @@ void KListDebugDialog::load() int setting = pConfig->readNumEntry( "InfoOutput", 2 ); // override setting if in m_changes - if( m_changes.tqfind( (*it)->name() ) != m_changes.end() ) { + if( m_changes.find( (*it)->name() ) != m_changes.end() ) { setting = m_changes[ (*it)->name() ]; } @@ -182,7 +182,7 @@ void KListDebugDialog::activateArea( TQCString area, bool activate ) for ( ; it.current() ; ++it ) { if ( area == (*it)->name() // debug area code = cb's name - || (*it)->text().tqfind( TQString::tqfromLatin1(area) ) != -1 ) // area name included in cb text + || (*it)->text().find( TQString::tqfromLatin1(area) ) != -1 ) // area name included in cb text { (*it)->setChecked( activate ); return; diff --git a/kdebugdialog/main.cpp b/kdebugdialog/main.cpp index 4434d8e4f..61d977ee8 100644 --- a/kdebugdialog/main.cpp +++ b/kdebugdialog/main.cpp @@ -50,7 +50,7 @@ TQStringList readAreaList() while (!ts->eof()) { data = ts->readLine().simplifyWhiteSpace(); - int pos = data.tqfind("#"); + int pos = data.find("#"); if ( pos != -1 ) data.truncate( pos ); diff --git a/kdepasswd/kcm/chfnprocess.cpp b/kdepasswd/kcm/chfnprocess.cpp index 76d5209ea..4f6af0add 100644 --- a/kdepasswd/kcm/chfnprocess.cpp +++ b/kdepasswd/kcm/chfnprocess.cpp @@ -60,7 +60,7 @@ int ChfnProcess::ConverseChfn(const char *pass) if ( line.isEmpty() ) continue;// discard line - if ( line.tqcontains( "Password: " )/*isPrompt( line, "password" )*/ ) + if ( line.contains( "Password: " )/*isPrompt( line, "password" )*/ ) { WaitSlave(); write(m_Fd, pass, strlen(pass)); @@ -69,11 +69,11 @@ int ChfnProcess::ConverseChfn(const char *pass) line = readLine(); // Let's see what the outcome was - if ( line.tqcontains( "Changing finger info" ) ) + if ( line.contains( "Changing finger info" ) ) { // do nothing } - else if ( line.tqcontains( "information changed" ) ) + else if ( line.contains( "information changed" ) ) { status=0; break; @@ -83,7 +83,7 @@ int ChfnProcess::ConverseChfn(const char *pass) status=0; break; } - else if ( line.tqcontains( "Password error" ) || line.tqcontains("Incorrect password") ) + else if ( line.contains( "Password error" ) || line.contains("Incorrect password") ) { status=PasswordError; break; diff --git a/kdepasswd/passwd.cpp b/kdepasswd/passwd.cpp index 6e3bb223f..89bbbdf82 100644 --- a/kdepasswd/passwd.cpp +++ b/kdepasswd/passwd.cpp @@ -158,7 +158,7 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass, case 2: m_Error = ""; - if( line.tqcontains("again")) + if( line.contains("again")) { m_Error = line; kill(m_Pid, SIGKILL); @@ -278,7 +278,7 @@ bool PasswdProcess::isPrompt(TQCString line, const char *word) return false; if (word == 0L) return true; - return line.tqcontains(word, false); + return line.contains(word, false); } diff --git a/kdeprint/descriptions/sortthem.cpp b/kdeprint/descriptions/sortthem.cpp index 1e1a37d93..9adc284b1 100644 --- a/kdeprint/descriptions/sortthem.cpp +++ b/kdeprint/descriptions/sortthem.cpp @@ -15,7 +15,7 @@ char buf[1024]; while (!feof(stdin)) { char *cline = fgets(buf, 1000, stdin); if (!cline) break; - if (!have.tqcontains(cline)) { + if (!have.contains(cline)) { have << cline; fprintf(stdout, "%s", cline); } diff --git a/kdeprint/kdeprintfax/conffilters.cpp b/kdeprint/kdeprintfax/conffilters.cpp index 388cd1ab2..7f33136d9 100644 --- a/kdeprint/kdeprintfax/conffilters.cpp +++ b/kdeprint/kdeprintfax/conffilters.cpp @@ -95,7 +95,7 @@ void ConfFilters::load() while (!t.eof()) { line = t.readLine().stripWhiteSpace(); - if ((p=line.tqfind(TQRegExp("\\s"))) != -1) + if ((p=line.find(TQRegExp("\\s"))) != -1) { TQString mime(line.left(p)), cmd(line.right(line.length()-p-1).stripWhiteSpace()); if (!mime.isEmpty() && !cmd.isEmpty()) diff --git a/kdeprint/kdeprintfax/defcmds.cpp b/kdeprint/kdeprintfax/defcmds.cpp index 7dacc787a..123956377 100644 --- a/kdeprint/kdeprintfax/defcmds.cpp +++ b/kdeprint/kdeprintfax/defcmds.cpp @@ -32,7 +32,7 @@ TQString defaultCommand(const TQString& cmd) TQString exe = KStandardDirs::findExe(r.cap(1)); if (exe.isEmpty()) exe = "/usr/bin/"+r.cap(1); - str.tqreplace(p, r.matchedLength(), exe); + str.replace(p, r.matchedLength(), exe); } return str; } diff --git a/kdeprint/kdeprintfax/faxab.cpp b/kdeprint/kdeprintfax/faxab.cpp index 403caee04..a54375867 100644 --- a/kdeprint/kdeprintfax/faxab.cpp +++ b/kdeprint/kdeprintfax/faxab.cpp @@ -163,7 +163,7 @@ bool FaxAB::getEntry(TQStringList& number, TQStringList& name, TQStringList& ent /* number = kab.m_fax->currentText(); name = kab.m_name->currentText(); - if (kab.m_entries.tqcontains(name)) + if (kab.m_entries.contains(name)) { enterprise = kab.m_entries[name][0]; } diff --git a/kdeprint/kdeprintfax/faxctrl.cpp b/kdeprint/kdeprintfax/faxctrl.cpp index 51db82870..eed9d5816 100644 --- a/kdeprint/kdeprintfax/faxctrl.cpp +++ b/kdeprint/kdeprintfax/faxctrl.cpp @@ -87,9 +87,9 @@ static TQString stripNumber( const TQString& s ) // removes any non-numeric character, except ('+','*','#') (hope it's supported by faxing tools) TQString strip_s = s; - strip_s.tqreplace( TQRegExp( "[^\\d+*#]" ), "" ); - if ( strip_s.tqfind( '+' ) != -1 && conf->readBoolEntry( "ReplaceIntChar", false ) ) - strip_s.tqreplace( "+", conf->readEntry( "ReplaceIntCharVal" ) ); + strip_s.replace( TQRegExp( "[^\\d+*#]" ), "" ); + if ( strip_s.find( '+' ) != -1 && conf->readBoolEntry( "ReplaceIntChar", false ) ) + strip_s.replace( "+", conf->readEntry( "ReplaceIntCharVal" ) ); return strip_s; } @@ -133,11 +133,11 @@ static TQString tagList( int n, ... ) static TQString processTag( const TQString& match, bool value) { TQString v; - int p = match.tqfind( '_' ); + int p = match.find( '_' ); if ( p != -1 && match[ p+1 ] == '{' ) { // Find the ?? that separates the iftrue from the iffalse parts. - int q = match.tqfind( "?\?", p+2 ); + int q = match.find( "?\?", p+2 ); if ( q == -1 ) { // No iffalse part @@ -162,7 +162,7 @@ static TQString processTag( const TQString& match, bool value) static TQString processTag( const TQString& match, const TQString& value ) { TQString v; - int p = match.tqfind( '_' ); + int p = match.find( '_' ); if ( p != -1 ) { if ( value.isEmpty() ) @@ -172,7 +172,7 @@ static TQString processTag( const TQString& match, const TQString& value ) if ( match[ p+1 ] == '{' ) { v = match.mid( p+2, match.length()-p-3 ); - v.tqreplace( "@@", quote( value ) ); + v.replace( "@@", quote( value ) ); } else v = ( "-" + match.mid( p+1 ) + " " + quote( value ) ); @@ -445,13 +445,13 @@ TQString FaxCtrl::faxCommand() void FaxCtrl::sendFax() { - if ( m_command.tqfind( "%files" ) != -1 ) + if ( m_command.find( "%files" ) != -1 ) { // replace %files tag TQString filestr; for (TQStringList::ConstIterator it=m_filteredfiles.begin(); it!=m_filteredfiles.end(); ++it) filestr += (quote(*it)+" "); - m_command.tqreplace("%files", filestr); + m_command.replace("%files", filestr); } if ( !m_faxlist.isEmpty() ) @@ -625,7 +625,7 @@ void FaxCtrl::slotPrintLog() //TQString txt = m_logview->text(); TQString txt = m_log; - txt.tqreplace( '\n', "
" ); + txt.replace( '\n', "
" ); txt.prepend( "

" + i18n( "KDEPrint Fax Tool Log" ) + "

" ); kdDebug() << "Log: " << txt << endl; diff --git a/kdeprint/kdeprintfax/kdeprintfax.cpp b/kdeprint/kdeprintfax/kdeprintfax.cpp index e8daf8c89..0b0e59b6b 100644 --- a/kdeprint/kdeprintfax/kdeprintfax.cpp +++ b/kdeprint/kdeprintfax/kdeprintfax.cpp @@ -425,10 +425,10 @@ void KdeprintFax::slotConfigure() void KdeprintFax::updateState() { TQString cmd = m_faxctrl->faxCommand(); - m_cover->setEnabled(cmd.tqfind("%cover") != -1); + m_cover->setEnabled(cmd.find("%cover") != -1); if ( !m_cover->isEnabled() ) m_cover->setChecked(false); - m_comment->setEnabled(cmd.tqfind("%comment") != -1 && m_cover->isChecked()); + m_comment->setEnabled(cmd.find("%comment") != -1 && m_cover->isChecked()); //m_comment->setPaper(m_comment->isEnabled() ? tqcolorGroup().brush(TQColorGroup::Base) : tqcolorGroup().brush(TQColorGroup::Background)); if (!m_comment->isEnabled()) { @@ -438,11 +438,11 @@ void KdeprintFax::updateState() else m_comment->setPaper( tqcolorGroup().base() ); /* - m_enterprise->setEnabled(cmd.tqfind("%enterprise") != -1); + m_enterprise->setEnabled(cmd.find("%enterprise") != -1); if (!m_enterprise->isEnabled()) m_enterprise->setText(""); */ - if (cmd.tqfind("%time") == -1) + if (cmd.find("%time") == -1) { m_timecombo->setCurrentItem(0); m_timecombo->setEnabled(false); @@ -450,8 +450,8 @@ void KdeprintFax::updateState() } else m_timecombo->setEnabled( true ); - /*m_name->setEnabled( cmd.tqfind( "%name" ) != -1 );*/ - m_subject->setEnabled( cmd.tqfind( "%subject" ) != -1 && m_cover->isChecked() ); + /*m_name->setEnabled( cmd.find( "%name" ) != -1 );*/ + m_subject->setEnabled( cmd.find( "%subject" ) != -1 && m_cover->isChecked() ); statusBar()->changeItem(m_faxctrl->faxSystem(), 2); } diff --git a/kdeprint/kjobviewer/kjobviewer.cpp b/kdeprint/kjobviewer/kjobviewer.cpp index a11592c33..fc251d664 100644 --- a/kdeprint/kjobviewer/kjobviewer.cpp +++ b/kdeprint/kjobviewer/kjobviewer.cpp @@ -141,7 +141,7 @@ void KJobViewerApp::initialize() } - view = m_views.tqfind(prname); + view = m_views.find(prname); if (!view) { kdDebug() << "creating new view: " << TQString(prname) << endl; @@ -200,7 +200,7 @@ void KJobViewerApp::slotTimer() void KJobViewerApp::slotPrinterChanged(KMJobViewer *view, const TQString& prname) { - KMJobViewer *other = m_views.tqfind(prname); + KMJobViewer *other = m_views.find(prname); if (other) { if (other->isVisible()) diff --git a/kdeprint/slave/kio_print.cpp b/kdeprint/slave/kio_print.cpp index 920c12073..ebb6b859f 100644 --- a/kdeprint/slave/kio_print.cpp +++ b/kdeprint/slave/kio_print.cpp @@ -563,7 +563,7 @@ void KIO_Print::get(const KURL& url) if (group.startsWith("jobs")) { - int p = group.tqfind('?'); + int p = group.find('?'); if (p != -1) query = group.mid(p+1); if (!query.isEmpty() && query != "jobs" && query != "completed_jobs") @@ -576,7 +576,7 @@ void KIO_Print::get(const KURL& url) return; } - int p = printer.tqfind('?'); + int p = printer.find('?'); if (p != -1) { query = printer.mid(p+1); diff --git a/kdesktop/desktop.cc b/kdesktop/desktop.cc index 5696d2e4a..2f6e3831f 100644 --- a/kdesktop/desktop.cc +++ b/kdesktop/desktop.cc @@ -1160,7 +1160,7 @@ void KDesktop::addIcon(const TQString & _url, int x, int y) void KDesktop::addIcon(const TQString & _url, const TQString & _dest, int x, int y) { - TQString filename = _url.mid(_url.tqfindRev('/') + 1); + TQString filename = _url.mid(_url.findRev('/') + 1); TQValueList files; KIO::CopyInfo i; @@ -1168,7 +1168,7 @@ void KDesktop::addIcon(const TQString & _url, const TQString & _dest, int x, int i.uDest = KURL::fromPathOrURL( _dest ); i.uDest.addPath( filename ); files.append(i); - if (!TQFile::exists(i.uDest.prettyURL().tqreplace("file://",TQString()))) { m_pIconView->slotAboutToCreate( TQPoint( x, y ), files ); + if (!TQFile::exists(i.uDest.prettyURL().replace("file://",TQString()))) { m_pIconView->slotAboutToCreate( TQPoint( x, y ), files ); KIO::copy( i.uSource, i.uDest, false ); } // m_pIconView->addFuturePosition(filename, x, y); @@ -1184,7 +1184,7 @@ void KDesktop::removeIcon(const TQString &_url) return; } unlink(KURL(_url).path().latin1()); - TQString dest = _url.left(_url.tqfindRev('/') + 1); + TQString dest = _url.left(_url.findRev('/') + 1); m_pIconView->update( dest ); } diff --git a/kdesktop/init.cc b/kdesktop/init.cc index 1d4411ce6..27441b170 100644 --- a/kdesktop/init.cc +++ b/kdesktop/init.cc @@ -123,7 +123,7 @@ static TQString realDesktopPath() if (kdesktop_screen_number != 0) { TQString dn = "Desktop"; dn += TQString::number(kdesktop_screen_number); - desktopPath.tqreplace("Desktop", dn); + desktopPath.replace("Desktop", dn); } return desktopPath; } diff --git a/kdesktop/kcustommenu.cc b/kdesktop/kcustommenu.cc index 00e3ce24c..1d39a093d 100644 --- a/kdesktop/kcustommenu.cc +++ b/kdesktop/kcustommenu.cc @@ -82,7 +82,7 @@ KCustomMenu::insertMenuItem(KService::Ptr & s, int nId, int nIndex/*= -1*/) // item names may contain ampersands. To avoid them being converted // to accelators, replace them with two ampersands. - serviceName.tqreplace("&", "&&"); + serviceName.replace("&", "&&"); TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, 0, KIcon::DefaultState, 0L, true); diff --git a/kdesktop/kdiconview.cc b/kdesktop/kdiconview.cc index 23c89f8ce..7bfe4844f 100644 --- a/kdesktop/kdiconview.cc +++ b/kdesktop/kdiconview.cc @@ -321,7 +321,7 @@ void KDIconView::initConfig( bool init ) if ( previewSettings().count() ) { for ( TQStringList::ConstIterator it = oldPreview.begin(); it != oldPreview.end(); ++it) - if ( !previewSettings().tqcontains( *it ) ){ + if ( !previewSettings().contains( *it ) ){ kdDebug(1204) << "Disabling preview for " << *it << endl; if ( *it == "audio/" ) disableSoundPreviews(); @@ -581,7 +581,7 @@ KURL KDIconView::desktopURL() if (kdesktop_screen_number != 0) { TQString dn = "Desktop"; dn += TQString::number(kdesktop_screen_number); - desktopPath.tqreplace("Desktop", dn); + desktopPath.replace("Desktop", dn); } KURL desktopURL; @@ -607,7 +607,7 @@ void KDIconView::contentsMousePressEvent( TQMouseEvent *e ) // TQIconView, as of Qt 2.2, doesn't emit mouseButtonPressed for LMB on background if ( e->button() == Qt::LeftButton && KRootWm::self()->hasLeftButtonMenu() ) { - TQIconViewItem *item = tqfindItem( e->pos() ); + TQIconViewItem *item = findItem( e->pos() ); if ( !item ) { // Left click menu @@ -628,7 +628,7 @@ void KDIconView::wheelEvent( TQWheelEvent* e ) if (!m_dirLister) return; //kdDebug(1204) << "KDIconView::wheelEvent" << endl; - TQIconViewItem *item = tqfindItem( e->pos() ); + TQIconViewItem *item = findItem( e->pos() ); if ( !item ) { emit wheelRolled( e->delta() ); @@ -748,7 +748,7 @@ void KDIconView::fillMediaListView() for (; it2 != mimetypes.end(); ++it2) { if ( ((*it2)->name().startsWith("media/")) ) { - bool ok=excludedMedia.tqcontains((*it2)->name())==0; + bool ok=excludedMedia.contains((*it2)->name())==0; new DesktopBehaviorMediaItem (mMediaListView, (*it2)->comment(), (*it2)->name(),ok); } } @@ -784,7 +784,7 @@ void KDIconView::removeBuiltinIcon(TQString iconName) { DesktopBehaviorMediaItem *changeItem; fillMediaListView(); - changeItem = static_cast(mMediaListView->tqfindItem(iconName, 0)); + changeItem = static_cast(mMediaListView->findItem(iconName, 0)); if (changeItem != 0) { changeItem->setOn(false); } @@ -1009,12 +1009,12 @@ bool KDIconView::makeFriendlyText( KFileIVI *fileIVI ) TQStringList tmpList; if (cfg.hasKey("OnlyShowIn")) { - if (!cfg.readListEntry("OnlyShowIn", ';').tqcontains("KDE")) + if (!cfg.readListEntry("OnlyShowIn", ';').contains("KDE")) return false; } if (cfg.hasKey("NotShowIn")) { - if (cfg.readListEntry("NotShowIn", ';').tqcontains("KDE")) + if (cfg.readListEntry("NotShowIn", ';').contains("KDE")) return false; } if (cfg.hasKey("TryExec")) @@ -1499,7 +1499,7 @@ void KDIconView::contentsDropEvent( TQDropEvent * e ) bool adjustedAnyItems = false; for( TQIconViewItem *item = firstItem(); item; item = item->nextItem() ) { - if( !desk.tqcontains( item->rect(), true )) + if( !desk.contains( item->rect(), true )) { TQRect r = item->rect(); @@ -1615,7 +1615,7 @@ void KDIconView::setupSortKeys() if (!m_itemsAlwaysFirst.isEmpty()) { TQString strFileName = static_cast( it )->item()->url().fileName(); - int nFind = m_itemsAlwaysFirst.tqfindIndex(strFileName); + int nFind = m_itemsAlwaysFirst.findIndex(strFileName); if (nFind >= 0) strKey = "0" + TQString::number(nFind); } diff --git a/kdesktop/kxdglauncher.cpp b/kdesktop/kxdglauncher.cpp index 97dd253a7..d4e4f63ea 100644 --- a/kdesktop/kxdglauncher.cpp +++ b/kdesktop/kxdglauncher.cpp @@ -52,9 +52,9 @@ void readXdgUserDirs(TQString *desktop, TQString *documents) while (!line.isNull()) { if (line.startsWith("XDG_DESKTOP_DIR=")) - *desktop = TQString(line.remove("XDG_DESKTOP_DIR=").remove("\"")).tqreplace("$HOME", TQDir::homeDirPath()); + *desktop = TQString(line.remove("XDG_DESKTOP_DIR=").remove("\"")).replace("$HOME", TQDir::homeDirPath()); else if (line.startsWith("XDG_DOCUMENTS_DIR=")) - *documents = TQString(line.remove("XDG_DOCUMENTS_DIR=").remove("\"")).tqreplace("$HOME", TQDir::homeDirPath()); + *documents = TQString(line.remove("XDG_DOCUMENTS_DIR=").remove("\"")).replace("$HOME", TQDir::homeDirPath()); line = s.readLine(); } @@ -132,7 +132,7 @@ int main( int argc, char **argv) } if (directoryOk == true) { TQString xdgModifiedDirectory = newDirectory; - xdgModifiedDirectory = xdgModifiedDirectory.tqreplace(TQDir::homeDirPath(), "$HOME"); + xdgModifiedDirectory = xdgModifiedDirectory.replace(TQDir::homeDirPath(), "$HOME"); while (xdgModifiedDirectory.endsWith("/")) { xdgModifiedDirectory.truncate(xdgModifiedDirectory.length()-1); } diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc index 60c382511..ef07679b3 100644 --- a/kdesktop/lock/lockdlg.cc +++ b/kdesktop/lock/lockdlg.cc @@ -144,7 +144,7 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin) layoutsList = kxkb.call("getLayoutsList"); TQString currentLayout = kxkb.call("getCurrentLayout"); if( !currentLayout.isEmpty() && layoutsList.count() > 1 ) { - currLayout = layoutsList.tqfind(currentLayout); + currLayout = layoutsList.find(currentLayout); if (currLayout == layoutsList.end()) setLayoutText("err"); else diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 69c121002..c11314bb8 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -1576,7 +1576,7 @@ bool LockProcess::forwardVkbdEvent( XEvent* event ) for( TQValueList< VkbdWindow >::ConstIterator it = mVkbdWindows.begin(); it != mVkbdWindows.end(); ++it ) { - if( TQT_TQRECT_OBJECT((*it).rect).tqcontains( pos )) { + if( TQT_TQRECT_OBJECT((*it).rect).contains( pos )) { // Find the subwindow where the event should actually go. // Not exactly cheap in the number of X roundtrips but oh well. Window window = (*it).id; diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc index 3f6bdb330..6e032bebb 100644 --- a/kdesktop/lock/main.cc +++ b/kdesktop/lock/main.cc @@ -96,7 +96,7 @@ int main( int argc, char **argv ) kdDebug() << "screen " << number_of_screens << " " << kdesktop_screen_number << " " << display_name << " " << starting_screen << endl; dpy = 0; - if ((pos = display_name.tqfindRev('.')) != -1) + if ((pos = display_name.findRev('.')) != -1) display_name.remove(pos, 10); TQCString env; diff --git a/kdesktop/main.cc b/kdesktop/main.cc index d9eaa5f91..695392165 100644 --- a/kdesktop/main.cc +++ b/kdesktop/main.cc @@ -129,7 +129,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) XCloseDisplay(dpy); dpy = 0; - if ((pos = display_name.tqfindRev('.')) != -1) + if ((pos = display_name.findRev('.')) != -1) display_name.remove(pos, 10); TQCString env; diff --git a/kdesktop/minicli.cpp b/kdesktop/minicli.cpp index 306a4d736..69fef8e8f 100644 --- a/kdesktop/minicli.cpp +++ b/kdesktop/minicli.cpp @@ -173,7 +173,7 @@ void Minicli::setCommand(const TQString& command) { m_dlg->cbCommand->lineEdit()->setText(command); m_dlg->cbCommand->lineEdit()->deselect(); - int firstSpace = command.tqfind(' '); + int firstSpace = command.find(' '); if (firstSpace > 0) { m_dlg->cbCommand->lineEdit()->setSelection(firstSpace+1, command.length()); } @@ -389,7 +389,7 @@ TQString Minicli::terminalCommand (const TQString& cmd, const TQString& args) else terminal += TQString(" -e /bin/sh -c \"%1 %2\"").arg(cmd).arg(args); - if (!m_terminalAppList.tqcontains(cmd)) + if (!m_terminalAppList.contains(cmd)) m_terminalAppList << cmd; return terminal; @@ -674,7 +674,7 @@ void Minicli::slotCmdChanged(const TQString& text) // Also use autocompletion if it appears that I am using some kind of ioslave, except the http:// ioslave m_urlCompletionStarted = true; // flag for slotMatch() - if ((text.startsWith( "/" ) || text.startsWith( "~" ) || (text.tqcontains("://", false) != 0)) && (text.tqcontains("http://", false) == 0)) { + if ((text.startsWith( "/" ) || text.startsWith( "~" ) || (text.contains("://", false) != 0)) && (text.contains("http://", false) == 0)) { TQString completion = m_pURLCompletion->makeCompletion( text ); } } @@ -763,7 +763,7 @@ void Minicli::parseLine( bool final ) KURIFilter::self()->filterURI( *(m_filterData), m_middleFilters ); bool isTerminalApp = ((m_filterData->uriType() == KURIFilterData::EXECUTABLE) && - m_terminalAppList.tqcontains(m_filterData->uri().url())); + m_terminalAppList.contains(m_filterData->uri().url())); if( !isTerminalApp ) { diff --git a/kdesktop/pixmapserver.cc b/kdesktop/pixmapserver.cc index 17c1ee04e..bc869d341 100644 --- a/kdesktop/pixmapserver.cc +++ b/kdesktop/pixmapserver.cc @@ -58,7 +58,7 @@ KPixmapServer::~KPixmapServer() void KPixmapServer::add(TQString name, TQPixmap *pm, bool overwrite) { - if (m_Names.tqcontains(name)) + if (m_Names.contains(name)) { if (overwrite) remove(name); @@ -77,7 +77,7 @@ void KPixmapServer::add(TQString name, TQPixmap *pm, bool overwrite) si.handle = pm->handle(); m_Selections[sel] = si; - DataIterator it = m_Data.tqfind(pm->handle()); + DataIterator it = m_Data.find(pm->handle()); if (it == m_Data.end()) { KPixmapData data; @@ -95,20 +95,20 @@ void KPixmapServer::add(TQString name, TQPixmap *pm, bool overwrite) void KPixmapServer::remove(TQString name) { // Remove the name - NameIterator it = m_Names.tqfind(name); + NameIterator it = m_Names.find(name); if (it == m_Names.end()) return; KPixmapInode pi = it.data(); m_Names.remove(it); // Remove and disown the selection - SelectionIterator it2 = m_Selections.tqfind(pi.selection); + SelectionIterator it2 = m_Selections.find(pi.selection); assert(it2 != m_Selections.end()); m_Selections.remove(it2); XSetSelectionOwner(qt_xdisplay(), pi.selection, None, CurrentTime); // Decrease refcount on data - DataIterator it3 = m_Data.tqfind(pi.handle); + DataIterator it3 = m_Data.find(pi.handle); assert(it3 != m_Data.end()); it3.data().refcount--; if (!it3.data().refcount && !it3.data().usecount) @@ -131,7 +131,7 @@ TQStringList KPixmapServer::list() void KPixmapServer::setOwner(TQString name) { - NameIterator it = m_Names.tqfind(name); + NameIterator it = m_Names.find(name); if (it == m_Names.end()) return; @@ -160,7 +160,7 @@ bool KPixmapServer::x11Event(XEvent *event) // Check if we know about this selection Atom sel = ev->selection; - SelectionIterator it = m_Selections.tqfind(sel); + SelectionIterator it = m_Selections.find(sel); if (it == m_Selections.end()) return false; KSelectionInode si = it.data(); @@ -174,7 +174,7 @@ bool KPixmapServer::x11Event(XEvent *event) } // Check if there is no transaction in progress to the same property - if (m_Active.tqcontains(ev->property)) + if (m_Active.contains(ev->property)) { kdDebug(1204) << ID << "selection is busy.\n"; XSendEvent(qt_xdisplay(), ev->requestor, false, 0, &reply); @@ -182,7 +182,7 @@ bool KPixmapServer::x11Event(XEvent *event) } // Check if the selection was not deleted - DataIterator it2 = m_Data.tqfind(si.handle); + DataIterator it2 = m_Data.find(si.handle); if (it2 == m_Data.end()) { kdDebug(1204) << ID << "selection has been deleted.\n"; @@ -216,13 +216,13 @@ bool KPixmapServer::x11Event(XEvent *event) { XPropertyEvent *ev = &event->xproperty; - AtomIterator it = m_Active.tqfind(ev->atom); + AtomIterator it = m_Active.find(ev->atom); if (it == m_Active.end()) return false; HANDLE handle = it.data(); m_Active.remove(it); - DataIterator it2 = m_Data.tqfind(handle); + DataIterator it2 = m_Data.find(handle); assert(it2 != m_Data.end()); it2.data().usecount--; if (!it2.data().usecount && !it2.data().refcount) @@ -239,7 +239,7 @@ bool KPixmapServer::x11Event(XEvent *event) { XSelectionClearEvent *ev = &event->xselectionclear; - SelectionIterator it = m_Selections.tqfind(ev->selection); + SelectionIterator it = m_Selections.find(ev->selection); if (it == m_Selections.end()) return false; diff --git a/kdesu/kdesud/handler.cpp b/kdesu/kdesud/handler.cpp index 45cce362b..1d52a58ac 100644 --- a/kdesu/kdesud/handler.cpp +++ b/kdesu/kdesud/handler.cpp @@ -87,7 +87,7 @@ int ConnectionHandler::handle() // Do we have a complete command yet? int n; TQCString newbuf; - while ((n = m_Buf.tqfind('\n')) != -1) + while ((n = m_Buf.find('\n')) != -1) { newbuf = m_Buf.left(n+1); m_Buf.fill('x', n+1); @@ -304,9 +304,9 @@ int ConnectionHandler::doCommand(TQCString buf) SuProcess proc; proc.setCommand(command); proc.setUser(user); - if (options.tqcontains('x')) + if (options.contains('x')) proc.setXOnly(true); - if (options.tqcontains('f')) + if (options.contains('f')) proc.setDCOPForwarding(true); proc.setPriority(m_Priority); proc.setScheduler(m_Scheduler); diff --git a/kdesu/kdesud/kdesud.cpp b/kdesu/kdesud/kdesud.cpp index e8227269c..f4b4081e9 100644 --- a/kdesu/kdesud/kdesud.cpp +++ b/kdesu/kdesud/kdesud.cpp @@ -166,7 +166,7 @@ int create_socket() } // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); sock = TQFile::encodeName(locateLocal("socket", TQString("kdesud_%1").arg(static_cast(display)))); int stat_err=lstat(sock, &s); diff --git a/kdesu/kdesud/repo.cpp b/kdesu/kdesud/repo.cpp index fb1d7eadb..cc0f79ae5 100644 --- a/kdesu/kdesud/repo.cpp +++ b/kdesu/kdesud/repo.cpp @@ -27,7 +27,7 @@ Repository::~Repository() void Repository::add(const TQCString &key, Data_entry &data) { - RepoIterator it = repo.tqfind(key); + RepoIterator it = repo.find(key); if (it != repo.end()) remove(key); if (data.timeout == 0) @@ -43,7 +43,7 @@ int Repository::remove(const TQCString &key) if( key.isEmpty() ) return -1; - RepoIterator it = repo.tqfind(key); + RepoIterator it = repo.find(key); if (it == repo.end()) return -1; it.data().value.fill('x'); @@ -60,8 +60,8 @@ int Repository::removeSpecialKey(const TQCString &key) TQValueStack rm_keys; for (RepoCIterator it=repo.begin(); it!=repo.end(); ++it) { - if ( key.tqfind( static_cast(it.data().group) ) == 0 && - it.key().tqfind( static_cast(key) ) >= 0 ) + if ( key.find( static_cast(it.data().group) ) == 0 && + it.key().find( static_cast(key) ) >= 0 ) { rm_keys.push(it.key()); found = 0; @@ -128,13 +128,13 @@ TQCString Repository::findKeys(const TQCString &group, const char *sep ) const { key = it.key().copy(); kdDebug(1205) << "Matching key found: " << key << endl; - pos = key.tqfindRev(sep); + pos = key.findRev(sep); key.truncate( pos ); key.remove(0, 2); if (!list.isEmpty()) { // Add the same keys only once please :) - if( !list.tqcontains(static_cast(key)) ) + if( !list.contains(static_cast(key)) ) { kdDebug(1205) << "Key added to list: " << key << endl; list += '\007'; // I do not know @@ -154,7 +154,7 @@ TQCString Repository::find(const TQCString &key) const if( key.isEmpty() ) return 0; - RepoCIterator it = repo.tqfind(key); + RepoCIterator it = repo.find(key); if (it == repo.end()) return 0; return it.data().value; diff --git a/kdialog/kdialog.cpp b/kdialog/kdialog.cpp index 33bcac528..b37c768f7 100644 --- a/kdialog/kdialog.cpp +++ b/kdialog/kdialog.cpp @@ -241,9 +241,9 @@ static int directCommand(KCmdLineArgs *args) TQString text = TQString::fromLocal8Bit(args->getOption( option )); int pos; - while ((pos = text.tqfind( TQString::tqfromLatin1("\\n") )) >= 0) + while ((pos = text.find( TQString::tqfromLatin1("\\n") )) >= 0) { - text.tqreplace(pos, 2, TQString::tqfromLatin1("\n")); + text.replace(pos, 2, TQString::tqfromLatin1("\n")); } if ( type == KMessageBox::WarningContinueCancel ) { diff --git a/kdm/kfrontend/kconsole.cpp b/kdm/kfrontend/kconsole.cpp index 5bc159244..6c2ab09ab 100644 --- a/kdm/kfrontend/kconsole.cpp +++ b/kdm/kfrontend/kconsole.cpp @@ -163,7 +163,7 @@ KConsole::slotData() verticalScrollBar()->maxValue()); TQString str( TQString::fromLocal8Bit( buffer, n ).remove( '\r' ) ); int pos, opos; - for (opos = 0; (pos = str.tqfind( '\n', opos )) >= 0; opos = pos + 1) { + for (opos = 0; (pos = str.find( '\n', opos )) >= 0; opos = pos + 1) { if (paragraphs() == 100) removeParagraph( 0 ); if (!leftover.isEmpty()) { diff --git a/kdm/kfrontend/kdmshutdown.cpp b/kdm/kfrontend/kdmshutdown.cpp index 9bcb589ca..9222f69ee 100644 --- a/kdm/kfrontend/kdmshutdown.cpp +++ b/kdm/kfrontend/kdmshutdown.cpp @@ -493,7 +493,7 @@ KDMSlimShutdown::KDMSlimShutdown( TQWidget *_parent ) FlatButton* btnReboot = new FlatButton( lfrm ); btnReboot->setTextLabel( i18n("&Restart"), false ); btnReboot->setPixmap( DesktopIcon( "reload") ); - int i = btnReboot->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 + int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnReboot); connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot())); @@ -524,7 +524,7 @@ KDMSlimShutdown::KDMSlimShutdown( TQWidget *_parent ) FlatButton* btnHalt = new FlatButton( lfrm ); btnHalt->setTextLabel( i18n("&Turn Off"), false ); btnHalt->setPixmap( DesktopIcon( "exit") ); - i = btnHalt->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 + i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnHalt ); connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); diff --git a/kdm/kfrontend/kgdialog.cpp b/kdm/kfrontend/kgdialog.cpp index e3d060643..9300b9220 100644 --- a/kdm/kfrontend/kgdialog.cpp +++ b/kdm/kfrontend/kgdialog.cpp @@ -133,7 +133,7 @@ KGDialog::inserten( const TQString& txt, int accel, TQPopupMenu *cmnu ) void KGDialog::slotActivateMenu( int id ) { - TQPopupMenu *cmnu = optMenu->tqfindItem( id )->popup(); + TQPopupMenu *cmnu = optMenu->findItem( id )->popup(); TQSize sh( cmnu->tqsizeHint() / 2 ); cmnu->exec( geometry().center() - TQPoint( sh.width(), sh.height() ) ); } diff --git a/kdm/kfrontend/kgreeter.cpp b/kdm/kfrontend/kgreeter.cpp index 2e5da21a2..fd4f07d96 100644 --- a/kdm/kfrontend/kgreeter.cpp +++ b/kdm/kfrontend/kgreeter.cpp @@ -207,7 +207,7 @@ void KGreeter::readFacesList() if ( line.isEmpty() ) continue; TQString icon; - int index = line.tqfind( ' ' ); + int index = line.find( ' ' ); if ( index > 0 ) { icon = line.left( index ); line = line.mid( index ); @@ -329,7 +329,7 @@ KGreeter::insertUser( const TQImage &default_pix, p = default_pix; TQString realname = KStringHandler::from8Bit( ps->pw_gecos ); - realname.truncate( realname.tqfind( ',' ) ); + realname.truncate( realname.find( ',' ) ); if (realname.isEmpty() || realname == username) new UserListViewItem( userView, username, TQPixmap( p ), username ); else { @@ -343,7 +343,7 @@ KGreeter::insertUser( const TQImage &default_pix, class KCStringList : public TQValueList { public: - bool tqcontains( const char *str ) const + bool contains( const char *str ) const { for (ConstIterator it = begin(); it != end(); ++it) if (*it == str) @@ -355,9 +355,9 @@ class KCStringList : public TQValueList { class UserList { public: UserList( char **in ); - bool hasUser( const char *str ) const { return users.tqcontains( str ); } + bool hasUser( const char *str ) const { return users.contains( str ); } bool hasGroup( gid_t gid ) const - { return groups.tqfind( gid ) != groups.end(); } + { return groups.find( gid ) != groups.end(); } bool hasGroups() const { return !groups.isEmpty(); } KCStringList users; @@ -412,7 +412,7 @@ KGreeter::insertUsers(int limit_users) !noUsers.hasGroup( ps->pw_gid )) { TQString username( TQFile::decodeName( ps->pw_name ) ); - if (!dupes.tqfind( username )) { + if (!dupes.find( username )) { dupes.insert( username, (int *)-1 ); toinsert.append( username ); @@ -443,7 +443,7 @@ KGreeter::insertUsers(int limit_users) // !noUsers.hasGroup( ps->pw_gid )) // { // TQString username( TQFile::decodeName( ent->ut_user ) ); -// if (!dupes.tqfind( username )) { +// if (!dupes.find( username )) { // dupes.insert( username, (int *)-1 ); // toinsert.append( username ); // count++; @@ -477,7 +477,7 @@ KGreeter::insertUsers(int limit_users) users.hasGroup( ps->pw_gid ))) { TQString username( TQFile::decodeName( ps->pw_name ) ); - if (!dupes.tqfind( username )) { + if (!dupes.find( username )) { dupes.insert( username, (int *)-1 ); insertUser( default_pix, username, ps ); } diff --git a/kdm/kfrontend/kgverify.cpp b/kdm/kfrontend/kgverify.cpp index 4748b3f62..337b45644 100644 --- a/kdm/kfrontend/kgverify.cpp +++ b/kdm/kfrontend/kgverify.cpp @@ -148,8 +148,8 @@ TQString // public KGVerify::pluginName() const { TQString name( greetPlugins[pluginList[curPlugin]].library->fileName() ); - uint st = name.tqfindRev( '/' ) + 1; - uint en = name.tqfind( '.', st ); + uint st = name.findRev( '/' ) + 1; + uint en = name.find( '.', st ); if (en - st > 7 && TQConstString( name.tqunicode() + st, 7 ).string() == "kgreet_") st += 7; return name.mid( st, en - st ); diff --git a/kdm/kfrontend/themer/kdmitem.cpp b/kdm/kfrontend/themer/kdmitem.cpp index 95768833e..67778711d 100644 --- a/kdm/kfrontend/themer/kdmitem.cpp +++ b/kdm/kfrontend/themer/kdmitem.cpp @@ -368,7 +368,7 @@ KdmItem::mouseEvent( int x, int y, bool pressed, bool released ) } ItemState oldState = state; - if (area.tqcontains( x, y )) { + if (area.contains( x, y )) { if (released && oldState == Sactive) { if (buttonParent) emit activated( id ); @@ -504,13 +504,13 @@ KdmItem::placementHint( const TQRect &parentRect ) // anchor the rect to an edge / corner if (pos.anchor.length() > 0 && pos.anchor.length() < 3) { - if (pos.anchor.tqfind( 'n' ) >= 0) + if (pos.anchor.find( 'n' ) >= 0) dy = 0; - if (pos.anchor.tqfind( 's' ) >= 0) + if (pos.anchor.find( 's' ) >= 0) dy = -h; - if (pos.anchor.tqfind( 'w' ) >= 0) + if (pos.anchor.find( 'w' ) >= 0) dx = 0; - if (pos.anchor.tqfind( 'e' ) >= 0) + if (pos.anchor.find( 'e' ) >= 0) dx = -w; } // KdmItem *p = static_cast( parent() ); @@ -555,11 +555,11 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType ) if (s == "box") { // box value dType = DTbox; val = 0; - } else if ((p = s.tqfind( '%' )) >= 0) { // percent value + } else if ((p = s.find( '%' )) >= 0) { // percent value dType = DTpercent; TQString sCopy = s; sCopy.remove( p, 1 ); - sCopy.tqreplace( ',', '.' ); + sCopy.replace( ',', '.' ); val = (int)sCopy.toDouble(); } else { // int value dType = DTpixel; @@ -568,7 +568,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType ) sCopy.remove( 0, 1 ); dType = DTnpixel; } - sCopy.tqreplace( ',', '.' ); + sCopy.replace( ',', '.' ); val = (int)sCopy.toDouble(); } } @@ -576,7 +576,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType ) void KdmItem::parseFont( const TQString &s, TQFont &font ) { - int splitAt = s.tqfindRev( ' ' ); + int splitAt = s.findRev( ' ' ); if (splitAt < 1) return; font.setFamily( s.left( splitAt ) ); diff --git a/kdm/kfrontend/themer/kdmlabel.cpp b/kdm/kfrontend/themer/kdmlabel.cpp index 64c2c4a1c..c019851e1 100644 --- a/kdm/kfrontend/themer/kdmlabel.cpp +++ b/kdm/kfrontend/themer/kdmlabel.cpp @@ -96,7 +96,7 @@ KdmLabel::KdmLabel( KdmItem *parent, const TQDomNode &node, const char *name ) } // Check if this is a timer label) - label.isTimer = label.text.tqfind( "%c" ) >= 0; + label.isTimer = label.text.find( "%c" ) >= 0; if (label.isTimer) { timer = new TQTimer( this ); timer->start( 1000 ); @@ -110,7 +110,7 @@ KdmLabel::setTextInt( const TQString &txt) { // TODO: catch && cText = txt; - cAccel = txt.tqfind('&'); + cAccel = txt.find('&'); delete myAccel; myAccel = 0; if (cAccel != -1) { @@ -250,7 +250,7 @@ KdmLabel::lookupText( const TQString &t ) { TQString text = t; - text.tqreplace( '_', '&' ); + text.replace( '_', '&' ); TQMap m; struct utsname uts; diff --git a/kdm/kfrontend/themer/kdmpixmap.cpp b/kdm/kfrontend/themer/kdmpixmap.cpp index 9b90799d5..af64714b8 100644 --- a/kdm/kfrontend/themer/kdmpixmap.cpp +++ b/kdm/kfrontend/themer/kdmpixmap.cpp @@ -163,7 +163,7 @@ KdmPixmap::loadPixmap( PixmapStruct::PixmapClass *pClass ) TQString fullpath = pClass->fullpath; kdDebug() << timestamp() << " load " << fullpath << endl; - int index = fullpath.tqfindRev('.'); + int index = fullpath.findRev('.'); TQString ext = fullpath.right(fullpath.length() - index); fullpath = fullpath.left(index); kdDebug() << timestamp() << " ext " << ext << " " << fullpath << endl; diff --git a/kdm/kfrontend/themer/kdmthemer.cpp b/kdm/kfrontend/themer/kdmthemer.cpp index 5cab6a0cd..d6b2e6e0e 100644 --- a/kdm/kfrontend/themer/kdmthemer.cpp +++ b/kdm/kfrontend/themer/kdmthemer.cpp @@ -223,7 +223,7 @@ KdmThemer::generateItems( KdmItem *parent, const TQDomNode &node ) TQString id = el.attribute("id"); if (id.startsWith("plugin-specific-")) { id = id.mid(strlen("plugin-specific-")); - if (!_pluginsLogin.tqcontains(id)) + if (!_pluginsLogin.contains(id)) continue; } @@ -281,7 +281,7 @@ bool KdmThemer::willDisplay( const TQDomNode &node ) TQStringList modeList = TQStringList::split( ",", modes ); // If current mode isn't in this list, do not display item - if (modeList.tqfind( m_currentMode ) == modeList.end()) + if (modeList.find( m_currentMode ) == modeList.end()) return false; } diff --git a/kdmlib/dmctl.cpp b/kdmlib/dmctl.cpp index 63e323fdc..5f3bd26f0 100644 --- a/kdmlib/dmctl.cpp +++ b/kdmlib/dmctl.cpp @@ -91,7 +91,7 @@ DM::DM() : fd( -1 ) case OldKDM: { TQString tf( ctl ); - tf.truncate( tf.tqfind( ',' ) ); + tf.truncate( tf.find( ',' ) ); fd = ::open( tf.latin1(), O_WRONLY ); } break; @@ -178,9 +178,9 @@ DM::canShutdown() TQCString re; if (DMType == GDM) - return exec( "QUERY_LOGOUT_ACTION\n", re ) && re.tqfind("HALT") >= 0; + return exec( "QUERY_LOGOUT_ACTION\n", re ) && re.find("HALT") >= 0; - return exec( "caps\n", re ) && re.tqfind( "\tshutdown" ) >= 0; + return exec( "caps\n", re ) && re.find( "\tshutdown" ) >= 0; } void @@ -194,7 +194,7 @@ DM::shutdown( KApplication::ShutdownType shutdownType, bool cap_ask; if (DMType == NewKDM) { TQCString re; - cap_ask = exec( "caps\n", re ) && re.tqfind( "\tshutdown ask" ) >= 0; + cap_ask = exec( "caps\n", re ) && re.find( "\tshutdown ask" ) >= 0; } else { if (!bootOption.isEmpty()) return; @@ -249,7 +249,7 @@ DM::bootOptions( TQStringList &opts, int &defopt, int ¤t ) opts = TQStringList::split( ' ', opts[1] ); for (TQStringList::Iterator it = opts.begin(); it != opts.end(); ++it) - (*it).tqreplace( "\\s", " " ); + (*it).replace( "\\s", " " ); return true; } @@ -272,7 +272,7 @@ DM::isSwitchable() TQCString re; - return exec( "caps\n", re ) && re.tqfind( "\tlocal" ) >= 0; + return exec( "caps\n", re ) && re.find( "\tlocal" ) >= 0; } int @@ -287,7 +287,7 @@ DM::numReserve() TQCString re; int p; - if (!(exec( "caps\n", re ) && (p = re.tqfind( "\treserve " )) >= 0)) + if (!(exec( "caps\n", re ) && (p = re.find( "\treserve " )) >= 0)) return -1; return atoi( re.data() + p + 9 ); } @@ -338,8 +338,8 @@ DM::localSessions( SessList &list ) se.vt = ts[1].mid( 2 ).toInt(); se.user = ts[2]; se.session = ts[3]; - se.self = (ts[4].tqfind( '*' ) >= 0); - se.tty = (ts[4].tqfind( 't' ) >= 0); + se.self = (ts[4].find( '*' ) >= 0); + se.tty = (ts[4].find( 't' ) >= 0); list.append( se ); } } diff --git a/kdmlib/kgreet_classic.cpp b/kdmlib/kgreet_classic.cpp index def8882c1..50f959596 100644 --- a/kdmlib/kgreet_classic.cpp +++ b/kdmlib/kgreet_classic.cpp @@ -260,7 +260,7 @@ bool // virtual KClassicGreeter::textMessage( const char *text, bool err ) { if (!err && - TQString( text ).tqfind( TQRegExp( "^Changing password for [^ ]+$" ) ) >= 0) + TQString( text ).find( TQRegExp( "^Changing password for [^ ]+$" ) ) >= 0) return true; return false; } @@ -275,11 +275,11 @@ KClassicGreeter::textPrompt( const char *prompt, bool echo, bool nonBlocking ) exp = 1; else { TQString pr( prompt ); - if (pr.tqfind( TQRegExp( "\\bpassword\\b", false ) ) >= 0) { - if (pr.tqfind( TQRegExp( "\\b(re-?(enter|type)|again|confirm|repeat)\\b", + if (pr.find( TQRegExp( "\\bpassword\\b", false ) ) >= 0) { + if (pr.find( TQRegExp( "\\b(re-?(enter|type)|again|confirm|repeat)\\b", false ) ) >= 0) exp = 3; - else if (pr.tqfind( TQRegExp( "\\bnew\\b", false ) ) >= 0) + else if (pr.find( TQRegExp( "\\bnew\\b", false ) ) >= 0) exp = 2; else { // TQRegExp( "\\b(old|current)\\b", false ) is too strict handler->gplugReturnText( "", diff --git a/kdmlib/kgreet_winbind.cpp b/kdmlib/kgreet_winbind.cpp index edb38ad1d..ae55a4b0f 100644 --- a/kdmlib/kgreet_winbind.cpp +++ b/kdmlib/kgreet_winbind.cpp @@ -56,7 +56,7 @@ static TQString defaultDomain; static void splitEntity( const TQString &ent, TQString &dom, TQString &usr ) { - int pos = ent.tqfind( separator ); + int pos = ent.find( separator ); if (pos < 0) dom = "", usr = ent; else @@ -228,7 +228,7 @@ KWinbindGreeter::slotChangedDomain( const TQString &dom ) TQStringList users; if (dom == "") { for (TQStringList::ConstIterator it = allUsers.begin(); it != allUsers.end(); ++it) - if ((*it).tqfind( separator ) < 0) + if ((*it).find( separator ) < 0) users << *it; } else { TQString st( dom + separator ); @@ -341,7 +341,7 @@ bool // virtual KWinbindGreeter::textMessage( const char *text, bool err ) { if (!err && - TQString( text ).tqfind( TQRegExp( "^Changing password for [^ ]+$" ) ) >= 0) + TQString( text ).find( TQRegExp( "^Changing password for [^ ]+$" ) ) >= 0) return true; return false; } @@ -356,15 +356,15 @@ KWinbindGreeter::textPrompt( const char *prompt, bool echo, bool nonBlocking ) exp = 1; else { TQString pr( prompt ); - if (pr.tqfind( TQRegExp( "\\b(old|current)\\b", false ) ) >= 0) { + if (pr.find( TQRegExp( "\\b(old|current)\\b", false ) ) >= 0) { handler->gplugReturnText( "", KGreeterPluginHandler::IsOldPassword | KGreeterPluginHandler::IsSecret ); return; - } else if (pr.tqfind( TQRegExp( "\\b(re-?(enter|type)|again|confirm|repeat)\\b", + } else if (pr.find( TQRegExp( "\\b(re-?(enter|type)|again|confirm|repeat)\\b", false ) ) >= 0) exp = 3; - else if (pr.tqfind( TQRegExp( "\\bnew\\b", false ) ) >= 0) + else if (pr.find( TQRegExp( "\\bnew\\b", false ) ) >= 0) exp = 2; else { handler->gplugMsgBox( TQMessageBox::Critical, @@ -594,7 +594,7 @@ KWinbindGreeter::slotEndDomainList() for (TQStringList::const_iterator it = mDomainListing.begin(); it != mDomainListing.end(); ++it) { - if (!domainList.tqcontains(*it)) + if (!domainList.contains(*it)) domainList.append(*it); } @@ -626,7 +626,7 @@ static bool init( const TQString &, { echoMode = getConf( ctx, "EchoMode", TQVariant( -1 ) ).toInt(); staticDomains = TQStringList::split( ':', getConf( ctx, "winbind.Domains", TQVariant( "" ) ).toString() ); - if (!staticDomains.tqcontains("")) + if (!staticDomains.contains("")) staticDomains << ""; defaultDomain = getConf( ctx, "winbind.DefaultDomain", TQVariant( staticDomains.first() ) ).toString(); diff --git a/kfind/kdatecombo.cpp b/kfind/kdatecombo.cpp index b012cef6b..8f3758344 100644 --- a/kfind/kdatecombo.cpp +++ b/kfind/kdatecombo.cpp @@ -86,7 +86,7 @@ void KDateCombo::mousePressEvent (TQMouseEvent * e) { if (e->button() & Qt::LeftButton) { - if (TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos())) + if (TQT_TQRECT_OBJECT(rect()).contains( e->pos())) { TQDate tempDate; getDate(& tempDate); @@ -103,7 +103,7 @@ bool KDateCombo::eventFilter (TQObject*, TQEvent* e) { TQMouseEvent *me = (TQMouseEvent *)e; TQPoint p = mapFromGlobal( me->globalPos() ); - if (TQT_TQRECT_OBJECT(rect()).tqcontains( p ) ) + if (TQT_TQRECT_OBJECT(rect()).contains( p ) ) { TQTimer::singleShot(10, this, TQT_SLOT(dateEnteredEvent())); return true; diff --git a/kfind/kfinddlg.cpp b/kfind/kfinddlg.cpp index 557d4b04e..747f69811 100644 --- a/kfind/kfinddlg.cpp +++ b/kfind/kfinddlg.cpp @@ -260,7 +260,7 @@ void KfindDlg::slotNewItems( const TQString& file ) TQListViewItem *checkiter; TQString checkiterwithpath; - if(file.tqfind(query->url().path(+1))==0) + if(file.find(query->url().path(+1))==0) { kdDebug()<firstChild(); diff --git a/kfind/kftabdlg.cpp b/kfind/kftabdlg.cpp index 990cd9fec..1dbe6b58a 100644 --- a/kfind/kftabdlg.cpp +++ b/kfind/kftabdlg.cpp @@ -390,7 +390,7 @@ void KfindTabWidget::setURL( const KURL & url ) dirBox->insertStringList(sl); // If the _searchPath already exists in the list we do not // want to add it again - int indx = sl.tqfindIndex(m_url.prettyURL()); + int indx = sl.findIndex(m_url.prettyURL()); if(indx == -1) dirBox->insertItem(m_url.prettyURL(), 0); // make it the first one else @@ -472,7 +472,7 @@ void KfindTabWidget::loadHistory() dirBox->insertStringList(sl); // If the _searchPath already exists in the list we do not // want to add it again - int indx = sl.tqfindIndex(m_url.prettyURL()); + int indx = sl.findIndex(m_url.prettyURL()); if(indx == -1) dirBox->insertItem(m_url.prettyURL(), 0); // make it the first one else diff --git a/kfind/kfwin.cpp b/kfind/kfwin.cpp index 27fe22b87..c5c375c22 100644 --- a/kfind/kfwin.cpp +++ b/kfind/kfwin.cpp @@ -146,7 +146,7 @@ KfindWindow::KfindWindow( TQWidget *parent, const char *name ) TQString KfindWindow::reducedDir(const TQString& fullDir) { - if (fullDir.tqfind(m_baseDir)==0) + if (fullDir.find(m_baseDir)==0) { TQString tmp=fullDir.mid(m_baseDir.length()); return tmp; diff --git a/kfind/kquery.cpp b/kfind/kquery.cpp index 4fd874c96..4231f1aab 100644 --- a/kfind/kquery.cpp +++ b/kfind/kquery.cpp @@ -242,7 +242,7 @@ void KQuery::processQuery( KFileItem* file) return; break; default: - if (!m_mimetype.isEmpty() && !m_mimetype.tqcontains(file->mimetype())) + if (!m_mimetype.isEmpty() && !m_mimetype.contains(file->mimetype())) return; } @@ -270,7 +270,7 @@ void KQuery::processQuery( KFileItem* file) continue; metaitem=metadatas.item(*it); strmetakeycontent=metaitem.string(); - if(strmetakeycontent.tqfind(m_metainfo)!=-1) + if(strmetakeycontent.find(m_metainfo)!=-1) { foundmeta=true; break; @@ -285,7 +285,7 @@ void KQuery::processQuery( KFileItem* file) if (!m_context.isEmpty()) { - if( !m_search_binary && ignore_mimetypes.tqfindIndex(file->mimetype()) != -1 ) { + if( !m_search_binary && ignore_mimetypes.findIndex(file->mimetype()) != -1 ) { kdDebug() << "ignoring, mime type is in exclusion list: " << file->url() << endl; return; } @@ -303,8 +303,8 @@ void KQuery::processQuery( KFileItem* file) TQByteArray zippedXmlFileContent; // KWord's and OpenOffice.org's files are zipped... - if( ooo_mimetypes.tqfindIndex(file->mimetype()) != -1 || - koffice_mimetypes.tqfindIndex(file->mimetype()) != -1 ) + if( ooo_mimetypes.findIndex(file->mimetype()) != -1 || + koffice_mimetypes.findIndex(file->mimetype()) != -1 ) { KZip zipfile(file->url().path()); KZipFileEntry *zipfileEntry; @@ -313,7 +313,7 @@ void KQuery::processQuery( KFileItem* file) { const KArchiveDirectory *zipfileContent = zipfile.directory(); - if( koffice_mimetypes.tqfindIndex(file->mimetype()) != -1 ) + if( koffice_mimetypes.findIndex(file->mimetype()) != -1 ) zipfileEntry = (KZipFileEntry*)zipfileContent->entry("maindoc.xml"); else zipfileEntry = (KZipFileEntry*)zipfileContent->entry("content.xml"); //for OpenOffice.org @@ -359,7 +359,7 @@ void KQuery::processQuery( KFileItem* file) if (str.isNull()) break; if(isZippedOfficeDocument) - str.tqreplace(xmlTags, ""); + str.replace(xmlTags, ""); if (m_regexpForContent) { @@ -373,7 +373,7 @@ void KQuery::processQuery( KFileItem* file) else { if ((!str.isNull()) && (!m_context.isNull())) { - if (str.tqfind(m_context, 0, m_casesensitive) != -1) + if (str.find(m_context, 0, m_casesensitive) != -1) { matchingLine=TQString::number(matchingLineNumber)+": "+str; found = true; @@ -458,7 +458,7 @@ void KQuery::setRegExp(const TQString ®exp, bool caseSensitive) // m_regexpsContainsGlobs.clear(); for ( TQStringList::ConstIterator it = strList.begin(); it != strList.end(); ++it ) { regExp = new TQRegExp((*it),caseSensitive,true); -// m_regexpsContainsGlobs.append(regExp->pattern().tqcontains(globChars)); +// m_regexpsContainsGlobs.append(regExp->pattern().contains(globChars)); m_regexps.append(regExp); } } diff --git a/khelpcenter/docentry.cpp b/khelpcenter/docentry.cpp index 03f9a7721..5b741bdf5 100644 --- a/khelpcenter/docentry.cpp +++ b/khelpcenter/docentry.cpp @@ -219,7 +219,7 @@ bool DocEntry::readFromFile( const TQString &fileName ) mIdentifier = fi.baseName( true ); } mIndexer = file.readEntry( "X-DOC-Indexer" ); - mIndexer.tqreplace( "%f", fileName ); + mIndexer.replace( "%f", fileName ); mIndexTestFile = file.readEntry( "X-DOC-IndexTestFile" ); mSearchEnabledDefault = file.readBoolEntry( "X-DOC-SearchEnabledDefault", false ); diff --git a/khelpcenter/docmetainfo.cpp b/khelpcenter/docmetainfo.cpp index cfdfa9f7e..3880ce2bc 100644 --- a/khelpcenter/docmetainfo.cpp +++ b/khelpcenter/docmetainfo.cpp @@ -60,7 +60,7 @@ DocEntry *DocMetaInfo::addDocEntry( const TQString &fileName ) lang = extensions[ extensions.count() - 2 ]; } - if ( !lang.isEmpty() && mLanguages.tqfind( lang ) == mLanguages.end() ) { + if ( !lang.isEmpty() && mLanguages.find( lang ) == mLanguages.end() ) { return 0; } @@ -77,7 +77,7 @@ DocEntry *DocMetaInfo::addDocEntry( const TQString &fileName ) mHtmlSearch->setupDocEntry( entry ); } TQString indexer = entry->indexer(); - indexer.tqreplace( "%f", fileName ); + indexer.replace( "%f", fileName ); entry->setIndexer( indexer ); addDocEntry( entry ); return entry; diff --git a/khelpcenter/formatter.cpp b/khelpcenter/formatter.cpp index 859d003c3..b9f394289 100644 --- a/khelpcenter/formatter.cpp +++ b/khelpcenter/formatter.cpp @@ -73,7 +73,7 @@ bool Formatter::readTemplates() switch ( state ) { case IDLE: if ( !line.isEmpty() && !line.startsWith( "#" ) ) { - int pos = line.tqfind( "<<" ); + int pos = line.find( "<<" ); if ( pos >= 0 ) { state = MULTILINE; symbol = line.left( pos ).stripWhiteSpace(); @@ -120,7 +120,7 @@ bool Formatter::readTemplates() bool success = true; TQStringList::ConstIterator it2; for( it2 = requiredSymbols.begin(); it2 != requiredSymbols.end(); ++it2 ) { - if ( !mSymbols.tqcontains( *it2 ) ) { + if ( !mSymbols.contains( *it2 ) ) { success = false; kdError() << "Symbol '" << *it2 << "' is missing from main template file." << endl; @@ -137,7 +137,7 @@ TQString Formatter::header( const TQString &title ) TQString s; if ( mHasTemplate ) { s = mSymbols[ "HEADER" ]; - s.tqreplace( "--TITLE:--", title ); + s.replace( "--TITLE:--", title ); } else { s = "" + title + "\n\n"; } diff --git a/khelpcenter/glossary.cpp b/khelpcenter/glossary.cpp index 6538a77eb..148fe4dd9 100644 --- a/khelpcenter/glossary.cpp +++ b/khelpcenter/glossary.cpp @@ -303,7 +303,7 @@ TQString Glossary::entryToHtml( const GlossaryEntry &entry ) void Glossary::slotSelectGlossEntry( const TQString &id ) { - EntryItem *newItem = m_idDict.tqfind( id ); + EntryItem *newItem = m_idDict.find( id ); if ( newItem == 0 ) return; diff --git a/khelpcenter/history.cpp b/khelpcenter/history.cpp index 6f37884f4..62a434dd2 100644 --- a/khelpcenter/history.cpp +++ b/khelpcenter/history.cpp @@ -324,7 +324,7 @@ void History::fillHistoryPopup( TQPopupMenu *popup, bool onlyBack, bool onlyForw { TQString text = it.current()->title; text = KStringHandler::csqueeze(text, 50); //CT: squeeze - text.tqreplace( "&", "&&" ); + text.replace( "&", "&&" ); if ( checkCurrentItem && it.current() == current ) { int id = popup->insertItem( text ); // no pixmap if checked diff --git a/khelpcenter/htmlsearch/htmlsearch.cpp b/khelpcenter/htmlsearch/htmlsearch.cpp index 7a3483caf..5f93c39fd 100644 --- a/khelpcenter/htmlsearch/htmlsearch.cpp +++ b/khelpcenter/htmlsearch/htmlsearch.cpp @@ -43,7 +43,7 @@ void HTMLSearch::scanDir(const TQString& dir) for (it=list.begin(); it != list.end(); ++it) { file = adir + *it; - if ( !_files.tqcontains( file ) ) { + if ( !_files.contains( file ) ) { _files.append(file); progress->setFilesScanned(++_filesScanned); } @@ -375,13 +375,13 @@ void HTMLSearch::htdigStdout(KProcess *, char *buffer, int len) TQString line = TQString(buffer).left(len); int cnt=0, index=-1; - while ( (index = line.tqfind("file://", index+1)) > 0) + while ( (index = line.find("file://", index+1)) > 0) cnt++; _filesDigged += cnt; cnt=0; index=-1; - while ( (index = line.tqfind("not changed", index+1)) > 0) + while ( (index = line.find("not changed", index+1)) > 0) cnt++; _filesDigged -= cnt; @@ -467,8 +467,8 @@ TQString HTMLSearch::search(TQString _lang, TQString words, TQString method, int delete _proc; // modify the search result - _searchResult = _searchResult.tqreplace("http://localhost/", "file:/"); - _searchResult = _searchResult.tqreplace("Content-type: text/html", TQString::null); + _searchResult = _searchResult.replace("http://localhost/", "file:/"); + _searchResult = _searchResult.replace("Content-type: text/html", TQString::null); // dump the search result TQFile f(result); diff --git a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp index c2b1cd883..64a301be7 100644 --- a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp +++ b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp @@ -189,9 +189,9 @@ void KHTMLSearchConfig::loadLanguages() TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), KGlobal::locale()->translate("without name")); TQString path = *it; - int index = path.tqfindRev('/'); + int index = path.findRev('/'); path = path.left(index); - index = path.tqfindRev('/'); + index = path.findRev('/'); path = path.mid(index+1); language->insertLanguage(path, name); } diff --git a/khelpcenter/htmlsearch/ktagcombobox.cpp b/khelpcenter/htmlsearch/ktagcombobox.cpp index 9745d6066..cf259fa46 100644 --- a/khelpcenter/htmlsearch/ktagcombobox.cpp +++ b/khelpcenter/htmlsearch/ktagcombobox.cpp @@ -133,7 +133,7 @@ static inline void checkInsertPos(TQPopupMenu *popup, const TQString & str, int static inline TQPopupMenu *checkInsertIndex(TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu) { - int pos = tags->tqfindIndex(submenu); + int pos = tags->findIndex(submenu); TQPopupMenu *pi = 0; if (pos != -1) @@ -206,7 +206,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev) bool KTagComboBox::containsTag( const TQString &str ) const { - return tags-.tqcontains(str) > 0; + return tags-.contains(str) > 0; } TQString KTagComboBox::currentTag() const @@ -238,7 +238,7 @@ void KTagComboBox::setCurrentItem(int i) void KTagComboBox::setCurrentItem(const TQString &code) { - int i = tags->tqfindIndex(code); + int i = tags->findIndex(code); if (code.isNull()) i = 0; if (i != -1) diff --git a/khelpcenter/infotree.cpp b/khelpcenter/infotree.cpp index 6097a0b33..a23cce174 100644 --- a/khelpcenter/infotree.cpp +++ b/khelpcenter/infotree.cpp @@ -146,10 +146,10 @@ void InfoTree::parseInfoDirFile( const TQString &infoDirFileName ) while ( !stream.eof() && !s.stripWhiteSpace().isEmpty() ) { s = stream.readLine(); if ( s[ 0 ] == '*' ) { - const int colon = s.tqfind( ":" ); - const int openBrace = s.tqfind( "(", colon ); - const int closeBrace = s.tqfind( ")", openBrace ); - const int dot = s.tqfind( ".", closeBrace ); + const int colon = s.find( ":" ); + const int openBrace = s.find( "(", colon ); + const int closeBrace = s.find( ")", openBrace ); + const int dot = s.find( ".", closeBrace ); TQString appName = s.mid( 2, colon - 2 ); TQString url = "info:/" + s.mid( openBrace + 1, closeBrace - openBrace - 1 ); diff --git a/khelpcenter/kcmhelpcenter.cpp b/khelpcenter/kcmhelpcenter.cpp index c88e7218a..a08722393 100644 --- a/khelpcenter/kcmhelpcenter.cpp +++ b/khelpcenter/kcmhelpcenter.cpp @@ -417,9 +417,9 @@ bool KCMHelpCenter::buildIndex() .arg( entry->documentType() ) ); hasError = true; } else { - indexer.tqreplace( TQRegExp( "%i" ), entry->identifier() ); - indexer.tqreplace( TQRegExp( "%d" ), Prefs::indexDirectory() ); - indexer.tqreplace( TQRegExp( "%p" ), entry->url() ); + indexer.replace( TQRegExp( "%i" ), entry->identifier() ); + indexer.replace( TQRegExp( "%d" ), Prefs::indexDirectory() ); + indexer.replace( TQRegExp( "%p" ), entry->url() ); kdDebug() << "INDEXER: " << indexer << endl; *ts << indexer << endl; @@ -611,7 +611,7 @@ void KCMHelpCenter::advanceProgress() void KCMHelpCenter::slotReceivedStdout( KProcess *, char *buffer, int buflen ) { TQString text = TQString::fromLocal8Bit( buffer, buflen ); - int pos = text.tqfindRev( '\n' ); + int pos = text.findRev( '\n' ); if ( pos < 0 ) { mStdOut.append( text ); } else { @@ -625,7 +625,7 @@ void KCMHelpCenter::slotReceivedStdout( KProcess *, char *buffer, int buflen ) void KCMHelpCenter::slotReceivedStderr( KProcess *, char *buffer, int buflen ) { TQString text = TQString::fromLocal8Bit( buffer, buflen ); - int pos = text.tqfindRev( '\n' ); + int pos = text.findRev( '\n' ); if ( pos < 0 ) { mStdErr.append( text ); } else { diff --git a/khelpcenter/navigator.cpp b/khelpcenter/navigator.cpp index 35ebf0218..07def94b2 100644 --- a/khelpcenter/navigator.cpp +++ b/khelpcenter/navigator.cpp @@ -407,9 +407,9 @@ void Navigator::slotItemSelected( TQListViewItem *currentItem ) // Enforce the original .docbook version, in case langLookup returns a // cached version if ( !doc.isNull() ) { - int pos = doc.tqfind( ".html" ); + int pos = doc.find( ".html" ); if ( pos >= 0 ) { - doc.tqreplace( pos, 5, ".docbook" ); + doc.replace( pos, 5, ".docbook" ); } kdDebug( 1400 ) << "slotItemSelected(): doc = " << doc << endl; @@ -563,7 +563,7 @@ void Navigator::slotSearch() void Navigator::slotShowSearchResult( const TQString &url ) { TQString u = url; - u.tqreplace( "%k", mSearchEdit->text() ); + u.replace( "%k", mSearchEdit->text() ); emit itemSelected( u ); } diff --git a/khelpcenter/scrollkeepertreebuilder.cpp b/khelpcenter/scrollkeepertreebuilder.cpp index 4ee28d21d..20a4b0851 100644 --- a/khelpcenter/scrollkeepertreebuilder.cpp +++ b/khelpcenter/scrollkeepertreebuilder.cpp @@ -180,7 +180,7 @@ void ScrollKeeperTreeBuilder::insertDoc( NavigatorItem *parent, if ( url.left( 5 ) == "file:" ) url = url.mid( 5 ); url.prepend( "ghelp:" ); #if 0 - url.tqreplace( TQRegExp( ".xml$" ), ".html" ); + url.replace( TQRegExp( ".xml$" ), ".html" ); #endif } else if ( mimeType == "text/sgml" ) { // GNOME docs use this type. We don't have a real viewer for this. diff --git a/khelpcenter/searchengine.cpp b/khelpcenter/searchengine.cpp index 58217c031..b779afc8e 100644 --- a/khelpcenter/searchengine.cpp +++ b/khelpcenter/searchengine.cpp @@ -93,7 +93,7 @@ void SearchTraverser::startProcess( DocEntry *entry ) void SearchTraverser::connectHandler( SearchHandler *handler ) { TQMap::Iterator it; - it = mConnectCount.tqfind( handler ); + it = mConnectCount.find( handler ); int count = 0; if ( it != mConnectCount.end() ) count = *it; if ( count == 0 ) { @@ -108,7 +108,7 @@ void SearchTraverser::connectHandler( SearchHandler *handler ) void SearchTraverser::disconnectHandler( SearchHandler *handler ) { TQMap::Iterator it; - it = mConnectCount.tqfind( handler ); + it = mConnectCount.find( handler ); if ( it == mConnectCount.end() ) { kdError() << "SearchTraverser::disconnectHandler() handler not connected." << endl; @@ -326,15 +326,15 @@ bool SearchEngine::search( TQString words, TQString method, int matches, lang = "en"; // if the string contains '&' replace with a '+' and set search method to and - if (mWords.tqfind("&") != -1) { - mWords.tqreplace("&", " "); + if (mWords.find("&") != -1) { + mWords.replace("&", " "); method = "and"; } // replace whitespace with a '+' mWords = mWords.stripWhiteSpace(); mWords = mWords.simplifyWhiteSpace(); - mWords.tqreplace(TQRegExp("\\s"), "+"); + mWords.replace(TQRegExp("\\s"), "+"); commonSearchProgram = substituteSearchQuery( commonSearchProgram ); @@ -379,8 +379,8 @@ bool SearchEngine::search( TQString words, TQString method, int matches, delete mProc; // modify the search result - mSearchResult = mSearchResult.tqreplace("http://localhost/", "file:/"); - mSearchResult = mSearchResult.mid( mSearchResult.tqfind( '<' ) ); + mSearchResult = mSearchResult.replace("http://localhost/", "file:/"); + mSearchResult = mSearchResult.mid( mSearchResult.find( '<' ) ); mView->beginSearchResult(); mView->writeSearchResult( mSearchResult ); @@ -395,11 +395,11 @@ bool SearchEngine::search( TQString words, TQString method, int matches, TQString SearchEngine::substituteSearchQuery( const TQString &query ) { TQString result = query; - result.tqreplace( "%k", mWords ); - result.tqreplace( "%n", TQString::number( mMatches ) ); - result.tqreplace( "%m", mMethod ); - result.tqreplace( "%l", mLang ); - result.tqreplace( "%s", mScope ); + result.replace( "%k", mWords ); + result.replace( "%n", TQString::number( mMatches ) ); + result.replace( "%m", mMethod ); + result.replace( "%l", mLang ); + result.replace( "%s", mScope ); return result; } @@ -409,15 +409,15 @@ TQString SearchEngine::substituteSearchQuery( const TQString &query, Operation operation, const TQString &lang ) { TQString result = query; - result.tqreplace( "%i", identifier ); - result.tqreplace( "%w", words.join( "+" ) ); - result.tqreplace( "%m", TQString::number( maxResults ) ); + result.replace( "%i", identifier ); + result.replace( "%w", words.join( "+" ) ); + result.replace( "%m", TQString::number( maxResults ) ); TQString o; if ( operation == Or ) o = "or"; else o = "and"; - result.tqreplace( "%o", o ); - result.tqreplace( "%d", Prefs::indexDirectory() ); - result.tqreplace( "%l", lang ); + result.replace( "%o", o ); + result.replace( "%d", Prefs::indexDirectory() ); + result.replace( "%l", lang ); return result; } @@ -458,7 +458,7 @@ bool SearchEngine::isRunning() const SearchHandler *SearchEngine::handler( const TQString &documentType ) const { TQMap::ConstIterator it; - it = mHandlers.tqfind( documentType ); + it = mHandlers.find( documentType ); if ( it == mHandlers.end() ) return 0; else return *it; diff --git a/khelpcenter/searchhandler.cpp b/khelpcenter/searchhandler.cpp index 48f61e9e2..9c34d7399 100644 --- a/khelpcenter/searchhandler.cpp +++ b/khelpcenter/searchhandler.cpp @@ -62,9 +62,9 @@ TQStringList SearchHandler::documentTypes() const TQString SearchHandler::indexCommand( const TQString &identifier ) { TQString cmd = mIndexCommand; - cmd.tqreplace( "%i", identifier ); - cmd.tqreplace( "%d", Prefs::indexDirectory() ); - cmd.tqreplace( "%l", mLang ); + cmd.replace( "%i", identifier ); + cmd.replace( "%d", Prefs::indexDirectory() ); + cmd.replace( "%l", mLang ); return cmd; } @@ -83,7 +83,7 @@ bool SearchHandler::checkBinary( const TQString &cmd ) const { TQString binary; - int pos = cmd.tqfind( ' ' ); + int pos = cmd.find( ' ' ); if ( pos < 0 ) binary = cmd; else binary = cmd.left( pos ); @@ -166,7 +166,7 @@ void SearchHandler::searchStdout( KProcess *proc, char *buffer, int len ) p = strncpy( p, buffer, len ); p[len] = '\0'; - TQMap::ConstIterator it = mProcessJobs.tqfind( proc ); + TQMap::ConstIterator it = mProcessJobs.find( proc ); if ( it != mProcessJobs.end() ) { (*it)->mResult += bufferStr.fromUtf8( p ); } @@ -179,7 +179,7 @@ void SearchHandler::searchStderr( KProcess *proc, char *buffer, int len ) if ( !buffer || len == 0 ) return; - TQMap::ConstIterator it = mProcessJobs.tqfind( proc ); + TQMap::ConstIterator it = mProcessJobs.find( proc ); if ( it != mProcessJobs.end() ) { (*it)->mError += TQString::fromUtf8( buffer, len ); } @@ -193,7 +193,7 @@ void SearchHandler::searchExited( KProcess *proc ) TQString error; DocEntry *entry = 0; - TQMap::ConstIterator it = mProcessJobs.tqfind( proc ); + TQMap::ConstIterator it = mProcessJobs.find( proc ); if ( it != mProcessJobs.end() ) { SearchJob *j = *it; entry = j->mEntry; @@ -218,7 +218,7 @@ void SearchHandler::slotJobResult( KIO::Job *job ) TQString result; DocEntry *entry = 0; - TQMap::ConstIterator it = mKioJobs.tqfind( job ); + TQMap::ConstIterator it = mKioJobs.find( job ); if ( it != mKioJobs.end() ) { SearchJob *j = *it; @@ -240,7 +240,7 @@ void SearchHandler::slotJobData( KIO::Job *job, const TQByteArray &data ) { // kdDebug() << "SearchHandler::slotJobData()" << endl; - TQMap::ConstIterator it = mKioJobs.tqfind( job ); + TQMap::ConstIterator it = mKioJobs.find( job ); if ( it != mKioJobs.end() ) { (*it)->mResult += data.data(); } diff --git a/khelpcenter/toc.cpp b/khelpcenter/toc.cpp index c4eb13f3a..0f0e8af07 100644 --- a/khelpcenter/toc.cpp +++ b/khelpcenter/toc.cpp @@ -88,7 +88,7 @@ void TOC::build( const TQString &file ) } } - TQString cacheFile = fileName.tqreplace( TQDir::separator(), "__" ); + TQString cacheFile = fileName.replace( TQDir::separator(), "__" ); m_cacheFile = locateLocal( "cache", "help/" + cacheFile ); m_sourceFile = file; diff --git a/khelpcenter/view.cpp b/khelpcenter/view.cpp index 68470964d..68e7b3310 100644 --- a/khelpcenter/view.cpp +++ b/khelpcenter/view.cpp @@ -174,7 +174,7 @@ TQString View::langLookup( const TQString &fname ) // css etc) then look in other languages first. if ( ( *it ).endsWith( "docbook" ) ) { - TQString file = (*it).left((*it).tqfindRev('/')) + "/index.docbook"; + TQString file = (*it).left((*it).findRev('/')) + "/index.docbook"; info.setFile(file); if (info.exists() && info.isFile() && info.isReadable()) { @@ -361,7 +361,7 @@ KURL View::urlFromLinkNode( const DOM::Node &n ) const return href; TQString path = baseURL().path(); - path.truncate( path.tqfindRev( '/' ) + 1 ); + path.truncate( path.findRev( '/' ) + 1 ); path += href.url(); KURL url = baseURL(); diff --git a/khotkeys/app/app.cpp b/khotkeys/app/app.cpp index d56ff1eb2..3391ca1aa 100644 --- a/khotkeys/app/app.cpp +++ b/khotkeys/app/app.cpp @@ -112,7 +112,7 @@ int KDE_EXPORT kdemain( int argc, char** argv ) XCloseDisplay(dpy); dpy = 0; - if ((pos = displayname.tqfindRev('.')) != -1) + if ((pos = displayname.findRev('.')) != -1) displayname.remove(pos, 10); TQCString env; diff --git a/khotkeys/kcontrol/condition_list_widget.cpp b/khotkeys/kcontrol/condition_list_widget.cpp index d172f5277..b526d34ef 100644 --- a/khotkeys/kcontrol/condition_list_widget.cpp +++ b/khotkeys/kcontrol/condition_list_widget.cpp @@ -321,7 +321,7 @@ void Condition_list_widget::edit_listview_item( Condition_list_item* item_P ) { Condition* old_cond = item_P->condition(); item_P->set_condition( new_condition ); - int pos = conditions.tqfind( old_cond ); + int pos = conditions.find( old_cond ); if( pos >= 0 ) { conditions.remove( pos ); // we own it diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp index a58b85c8c..e37ef395f 100644 --- a/khotkeys/shared/actions.cpp +++ b/khotkeys/shared/actions.cpp @@ -124,7 +124,7 @@ void Command_url_action::execute() kapp->propagateSessionManager(); sm_ready = true; } -// int space_pos = command_url().tqfind( ' ' ); +// int space_pos = command_url().find( ' ' ); // if( command_url()[ 0 ] != '\'' && command_url()[ 0 ] != '"' && space_pos > -1 // && command_url()[ space_pos - 1 ] != '\\' ) // cmd = command_url().left( space_pos ); // get first 'word' @@ -286,7 +286,7 @@ void Dcop_action::execute() // one word if( pos != 0 ) args_str = args_str.mid( pos ); - int nxt_pos = args_str.tqfind( ' ' ); + int nxt_pos = args_str.find( ' ' ); args_list.append( args_str.left( nxt_pos )); // should be ok if nxt_pos is -1 args_str = nxt_pos >= 0 ? args_str.mid( nxt_pos ) : ""; } @@ -372,7 +372,7 @@ void Keyboard_input_action::execute() w = InputFocus; } int last_index = -1, start = 0; - while(( last_index = input().tqfind( ':', last_index + 1 )) != -1 ) // find next ';' + while(( last_index = input().find( ':', last_index + 1 )) != -1 ) // find next ';' { TQString key = input().mid( start, last_index - start ).stripWhiteSpace(); if( key == "Enter" && KKey( key ).keyCodeQt() == 0 ) @@ -391,7 +391,7 @@ void Keyboard_input_action::execute() TQString Keyboard_input_action::description() const { TQString tmp = input(); - tmp.tqreplace( '\n', ' ' ); + tmp.replace( '\n', ' ' ); tmp.truncate( 30 ); return i18n( "Keyboard input : " ) + tmp; } diff --git a/khotkeys/shared/gestures.cpp b/khotkeys/shared/gestures.cpp index 620d8d2ed..60b1d93b4 100644 --- a/khotkeys/shared/gestures.cpp +++ b/khotkeys/shared/gestures.cpp @@ -105,7 +105,7 @@ void Gesture::active_window_changed( WId ) void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) { - if( handlers.tqcontains( receiver_P )) + if( handlers.contains( receiver_P )) return; handlers[ receiver_P ] = true; connect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), @@ -116,7 +116,7 @@ void Gesture::register_handler( TQObject* receiver_P, const char* slot_P ) void Gesture::unregister_handler( TQObject* receiver_P, const char* slot_P ) { - if( !handlers.tqcontains( receiver_P )) + if( !handlers.contains( receiver_P )) return; handlers.remove( receiver_P ); disconnect( this, TQT_SIGNAL( handle_gesture( const TQString&, WId )), diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp index 90e789282..190b5dd04 100644 --- a/khotkeys/shared/input.cpp +++ b/khotkeys/shared/input.cpp @@ -97,7 +97,7 @@ void Kbd::deactivate_receiver( Kbd_receiver* receiver_P ) void Kbd::grab_shortcut( const KShortcut& shortcut_P ) { - if( grabs.tqcontains( shortcut_P )) + if( grabs.contains( shortcut_P )) ++grabs[ shortcut_P ]; else { @@ -117,7 +117,7 @@ void Kbd::grab_shortcut( const KShortcut& shortcut_P ) void Kbd::ungrab_shortcut( const KShortcut& shortcut_P ) { - if( !grabs.tqcontains( shortcut_P )) + if( !grabs.contains( shortcut_P )) return; if( --grabs[ shortcut_P ] == 0 ) { @@ -142,12 +142,12 @@ void Kbd::key_slot( TQString key_P ) { kdDebug( 1217 ) << "Key pressed:" << key_P << endl; KShortcut shortcut( key_P ); - if( !grabs.tqcontains( shortcut )) + if( !grabs.contains( shortcut )) return; for( TQMap< Kbd_receiver*, Receiver_data >::ConstIterator it = tqreceivers.begin(); it != tqreceivers.end(); ++it ) - if( ( *it ).shortcuts.tqcontains( shortcut ) && ( *it ).active + if( ( *it ).shortcuts.contains( shortcut ) && ( *it ).active && it.key()->handle_key( shortcut )) return; } diff --git a/khotkeys/shared/khotkeysglobal.cpp b/khotkeys/shared/khotkeysglobal.cpp index 8eb159d3c..4c6b8360c 100644 --- a/khotkeys/shared/khotkeysglobal.cpp +++ b/khotkeys/shared/khotkeysglobal.cpp @@ -65,7 +65,7 @@ TQString get_menu_entry_from_path( const TQString& path_P ) for( TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it ) - if( path_P.tqfind( *it ) == 0 ) + if( path_P.find( *it ) == 0 ) { TQString ret = path_P; ret.remove( 0, (*it).length()); diff --git a/khotkeys/shared/settings.cpp b/khotkeys/shared/settings.cpp index a6434be06..fdab2be56 100644 --- a/khotkeys/shared/settings.cpp +++ b/khotkeys/shared/settings.cpp @@ -63,7 +63,7 @@ bool Settings::read_settings( KConfig& cfg_P, bool include_disabled_P, ImportTyp TQString import_id = cfg_P.readEntry( "ImportId" ); if( !import_id.isEmpty()) { - if( already_imported.tqcontains( import_id )) + if( already_imported.contains( import_id )) { if( import_P == ImportSilent || KMessageBox::warningContinueCancel( NULL, diff --git a/khotkeys/shared/triggers.cpp b/khotkeys/shared/triggers.cpp index b3042f00f..7cac2b98c 100644 --- a/khotkeys/shared/triggers.cpp +++ b/khotkeys/shared/triggers.cpp @@ -225,7 +225,7 @@ void Window_trigger::window_added( WId window_P ) void Window_trigger::window_removed( WId window_P ) { - if( existing_windows.tqcontains( window_P )) + if( existing_windows.contains( window_P )) { bool matches = existing_windows[ window_P ]; kdDebug( 1217 ) << "Window_trigger::w_removed() : " << matches << endl; @@ -244,7 +244,7 @@ void Window_trigger::window_removed( WId window_P ) void Window_trigger::active_window_changed( WId window_P ) { bool was_match = false; - if( existing_windows.tqcontains( last_active_window )) + if( existing_windows.contains( last_active_window )) was_match = existing_windows[ last_active_window ]; if( active && was_match && ( window_actions & WINDOW_DEACTIVATES )) { @@ -253,7 +253,7 @@ void Window_trigger::active_window_changed( WId window_P ) } /* bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches;*/ - bool matches = existing_windows.tqcontains( window_P ) + bool matches = existing_windows.contains( window_P ) ? existing_windows[ window_P ] : false; if( active && matches && ( window_actions & WINDOW_ACTIVATES )) { @@ -272,7 +272,7 @@ void Window_trigger::window_changed( WId window_P, unsigned int dirty_P ) return; kdDebug( 1217 ) << "Window_trigger::w_changed()" << endl; bool was_match = false; - if( existing_windows.tqcontains( window_P )) + if( existing_windows.contains( window_P )) was_match = existing_windows[ window_P ]; bool matches = windows()->match( Window_data( window_P )); existing_windows[ window_P ] = matches; diff --git a/khotkeys/shared/voices.cpp b/khotkeys/shared/voices.cpp index e19f66eec..a6515fecf 100644 --- a/khotkeys/shared/voices.cpp +++ b/khotkeys/shared/voices.cpp @@ -79,7 +79,7 @@ void Voice::enable( bool enabled_P ) void Voice::register_handler( Voice_trigger *trigger_P ) { - if( !_references.tqcontains( trigger_P )) + if( !_references.contains( trigger_P )) _references.append(trigger_P); } @@ -179,7 +179,7 @@ void Voice::slot_sound_recorded(const Sound &sound_P) //kdDebug(1217) << k_funcinfo << keyNative.key().toString() << endl; - if(_shortcut.tqcontains(keyNative)) + if(_shortcut.contains(keyNative)) { if(pEvent->type == XKeyPress && !_recording ) { diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp index a1394b731..b8e86f694 100644 --- a/khotkeys/shared/windows.cpp +++ b/khotkeys/shared/windows.cpp @@ -339,7 +339,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& case NOT_IMPORTANT : return true; case CONTAINS : - return str1_P.tqcontains( str2_P ) > 0; + return str1_P.contains( str2_P ) > 0; case IS : return str1_P == str2_P; case REGEXP : @@ -348,7 +348,7 @@ bool Windowdef_simple::is_substr_match( const TQString& str1_P, const TQString& return rg.search( str1_P ) >= 0; } case CONTAINS_NOT : - return str1_P.tqcontains( str2_P ) == 0; + return str1_P.contains( str2_P ) == 0; case IS_NOT : return str1_P != str2_P; case REGEXP_NOT : diff --git a/kicker/applets/clock/clock.cpp b/kicker/applets/clock/clock.cpp index 2265f801b..6eb40993d 100644 --- a/kicker/applets/clock/clock.cpp +++ b/kicker/applets/clock/clock.cpp @@ -806,9 +806,9 @@ void FuzzyClock::drawContents(TQPainter *p) } newTimeStr = normalFuzzy[sector]; - int phStart = newTimeStr.tqfind("%"); + int phStart = newTimeStr.find("%"); if (phStart >= 0) { // protect yourself from translations - int phLength = newTimeStr.tqfind(" ", phStart) - phStart; + int phLength = newTimeStr.find(" ", phStart) - phStart; // larrosa: we want the exact length, in case the translation needs it, // in other case, we would cut off the end of the translation. @@ -821,13 +821,13 @@ void FuzzyClock::drawContents(TQPainter *p) realHour = 12 - ((_time.hour() + deltaHour) % 12 + 1); if (realHour==0) { newTimeStr = normalFuzzyOne[sector]; - phStart = newTimeStr.tqfind("%"); + phStart = newTimeStr.find("%"); // larrosa: Note that length is the same, // so we only have to update phStart } if (phStart >= 0) - newTimeStr.tqreplace(phStart, phLength, hourNames[realHour]); - newTimeStr.tqreplace(0, 1, TQString(newTimeStr.tqat(0).upper())); + newTimeStr.replace(phStart, phLength, hourNames[realHour]); + newTimeStr.replace(0, 1, TQString(newTimeStr.tqat(0).upper())); } } else if (_prefs->fuzzyness() == 3) { newTimeStr = dayTime[_time.hour() / 3]; @@ -1120,7 +1120,7 @@ int ClockApplet::heightForWidth(int w) const { TQString dateStr = _date->text(); // if we're too wide to fit, replace the first non-digit from the end with a space - int p = dateStr.tqfindRev(TQRegExp("[^0-9]")); + int p = dateStr.findRev(TQRegExp("[^0-9]")); if (p > 0) { _date->setText(dateStr.insert(p, '\n')); @@ -1568,7 +1568,7 @@ void ClockApplet::aboutToShowContextMenu() } else { - zoneMenu->insertItem(i18n(zone->zone(i).utf8()).tqreplace("_", " "), 500 + i); + zoneMenu->insertItem(i18n(zone->zone(i).utf8()).replace("_", " "), 500 + i); } } zoneMenu->setItemChecked(500 + zone->zoneIndex(),true); @@ -1699,7 +1699,7 @@ void ClockApplet::updateDateLabel(bool reLayout) if (zone->zoneIndex() != 0) { TQString zone_s = i18n(zone->zone().utf8()); - _date->setText(zone_s.mid(zone_s.tqfind('/') + 1).tqreplace("_", " ")); + _date->setText(zone_s.mid(zone_s.find('/') + 1).replace("_", " ")); _date->setShown(true); } else @@ -1737,7 +1737,7 @@ void ClockApplet::updateKickerTip(KickerTip::Data& data) if (!activeZone.isEmpty()) { activeZone = i18n(activeZone.utf8()); - data.subtext.append("
").append(activeZone.mid(activeZone.tqfind('/') + 1).tqreplace("_", " ")); + data.subtext.append("
").append(activeZone.mid(activeZone.find('/') + 1).replace("_", " ")); } } else @@ -1760,7 +1760,7 @@ void ClockApplet::updateKickerTip(KickerTip::Data& data) if (activeIndex == i) { - data.message = m_zone.mid(m_zone.tqfind('/') + 1).tqreplace("_", " "); + data.message = m_zone.mid(m_zone.find('/') + 1).replace("_", " "); data.message += " " + _time + "
" + _date; } else @@ -1771,7 +1771,7 @@ void ClockApplet::updateKickerTip(KickerTip::Data& data) } else { - data.subtext += "" + m_zone.mid(m_zone.tqfind('/') + 1).tqreplace("_", " ") + ""; + data.subtext += "" + m_zone.mid(m_zone.find('/') + 1).replace("_", " ") + ""; } data.subtext += " " + _time + ", " + _date + "
"; } diff --git a/kicker/applets/clock/zone.cpp b/kicker/applets/clock/zone.cpp index 48cce1ccb..c81faacc4 100644 --- a/kicker/applets/clock/zone.cpp +++ b/kicker/applets/clock/zone.cpp @@ -105,7 +105,7 @@ void Zone::readZoneList(KListView *listView ) if (!comment.isEmpty()) comment = i18n(comment.utf8()); - const TQStringList KontCity = TQStringList::split("/", i18n(tzName.utf8()).tqreplace("_", " ")); + const TQStringList KontCity = TQStringList::split("/", i18n(tzName.utf8()).replace("_", " ")); TQListViewItem* Kontinent = KontinentMap[KontCity[0]]; if (!Kontinent) { KontinentMap[KontCity[0]] = new TQListViewItem(listView, KontCity[0]); @@ -117,7 +117,7 @@ void Zone::readZoneList(KListView *listView ) li->setText(1, comment); li->setText(2, tzName); /* store complete path in ListView */ - if (_remotezonelist.tqfindIndex(tzName) != -1) + if (_remotezonelist.findIndex(tzName) != -1) li->setOn(true); // locate the flag from /l10n/%1/flag.png diff --git a/kicker/applets/launcher/quickaddappsmenu.cpp b/kicker/applets/launcher/quickaddappsmenu.cpp index 7dcb16098..0eebec315 100644 --- a/kicker/applets/launcher/quickaddappsmenu.cpp +++ b/kicker/applets/launcher/quickaddappsmenu.cpp @@ -53,7 +53,7 @@ QuickAddAppsMenu::QuickAddAppsMenu(TQWidget *target, TQWidget *parent, const TQS void QuickAddAppsMenu::slotExec(int id) { - if (!entryMap_.tqcontains(id)) return; + if (!entryMap_.contains(id)) return; KSycocaEntry * e = entryMap_[id]; KService::Ptr service = static_cast(e); emit addAppBefore(locate("apps", service->desktopEntryPath()),_sender); diff --git a/kicker/applets/launcher/quickbutton.cpp b/kicker/applets/launcher/quickbutton.cpp index 58f60715d..996d8abe3 100644 --- a/kicker/applets/launcher/quickbutton.cpp +++ b/kicker/applets/launcher/quickbutton.cpp @@ -76,7 +76,7 @@ QuickURL::QuickURL(const TQString &u) if (_menuId.endsWith(".desktop")) { // Strip path TQString s = _menuId; - s = s.mid(s.tqfindRev('/')+1); + s = s.mid(s.findRev('/')+1); s = s.left(s.length()-8); _service = KService::serviceByStorageId(s); if (!_service) { diff --git a/kicker/applets/launcher/quicklauncher.cpp b/kicker/applets/launcher/quicklauncher.cpp index b5b512d20..7ead9eced 100644 --- a/kicker/applets/launcher/quicklauncher.cpp +++ b/kicker/applets/launcher/quicklauncher.cpp @@ -865,7 +865,7 @@ void QuickLauncher::loadConfig() for (n=0; nsize()); ++n) { QuickButton* button = (*m_buttons)[n]; - if (volatileButtons.tqcontains(button->menuId()) == false) + if (volatileButtons.contains(button->menuId()) == false) { button->setSticky(true); } diff --git a/kicker/applets/media/mediaapplet.cpp b/kicker/applets/media/mediaapplet.cpp index d07bfdd2b..8f2d69ab7 100644 --- a/kicker/applets/media/mediaapplet.cpp +++ b/kicker/applets/media/mediaapplet.cpp @@ -285,7 +285,7 @@ void MediaApplet::slotNewItems(const KFileItemList &entries) } } - if(!found && !mExcludedList.tqcontains(it.current()->url().url()) ) + if(!found && !mExcludedList.contains(it.current()->url().url()) ) { MediumButton *button = new MediumButton(this, *it.current()); button->show(); @@ -336,7 +336,7 @@ void MediaApplet::slotRefreshItems(const KFileItemList &entries) if(button->fileItem().url()==(*it.current()).url()) { - if(mExcludedTypesList.tqcontains(mimetype)) + if(mExcludedTypesList.contains(mimetype)) { mButtonList.remove(button); delete button; @@ -350,7 +350,7 @@ void MediaApplet::slotRefreshItems(const KFileItemList &entries) } } - if(!found && !mExcludedTypesList.tqcontains(mimetype) && !mExcludedList.tqcontains(it.current()->url().url()) ) + if(!found && !mExcludedTypesList.contains(mimetype) && !mExcludedList.contains(it.current()->url().url()) ) { MediumButton *button = new MediumButton(this, *it.current()); button->show(); diff --git a/kicker/applets/media/preferencesdialog.cpp b/kicker/applets/media/preferencesdialog.cpp index 3833f5062..bf8234fe5 100644 --- a/kicker/applets/media/preferencesdialog.cpp +++ b/kicker/applets/media/preferencesdialog.cpp @@ -125,7 +125,7 @@ void PreferencesDialog::setExcludedMediumTypes(TQStringList excludedTypesList) { if ((*it)->name().startsWith("media/")) { - bool ok=excludedTypesList.tqcontains((*it)->name())==0; + bool ok=excludedTypesList.contains((*it)->name())==0; MediumTypeItem *item = new MediumTypeItem(mpMediumTypesListView, (*it)->comment(), (*it)->name()); item->setOn(ok); } @@ -156,7 +156,7 @@ void PreferencesDialog::setExcludedMedia(TQStringList excludedList) { ++it; - bool ok = excludedList.tqcontains(file->url().url())==0; + bool ok = excludedList.contains(file->url().url())==0; MediumItem *item = new MediumItem(mpMediaListView, file->text(), *file); item->setOn(ok); diff --git a/kicker/applets/minipager/pagerbutton.cpp b/kicker/applets/minipager/pagerbutton.cpp index 7120fb1f1..d6047d407 100644 --- a/kicker/applets/minipager/pagerbutton.cpp +++ b/kicker/applets/minipager/pagerbutton.cpp @@ -157,8 +157,8 @@ bool KMiniPagerButton::shouldPaintWindow( KWin::WindowInfo *info ) const TQRect r = mapGeometryToViewport(*info); if (!info->hasState(NET::Sticky) && - !TQApplication::desktop()->tqgeometry().tqcontains(r.topLeft()) && - !TQApplication::desktop()->tqgeometry().tqcontains(r.topRight())) + !TQApplication::desktop()->tqgeometry().contains(r.topLeft()) && + !TQApplication::desktop()->tqgeometry().contains(r.topRight())) return false; } diff --git a/kicker/applets/naughty/NaughtyApplet.cpp b/kicker/applets/naughty/NaughtyApplet.cpp index 05a64b94b..953bcacbd 100644 --- a/kicker/applets/naughty/NaughtyApplet.cpp +++ b/kicker/applets/naughty/NaughtyApplet.cpp @@ -105,7 +105,7 @@ NaughtyApplet::~NaughtyApplet() void NaughtyApplet::slotWarn(ulong pid, const TQString & name) { - if (ignoreList_.tqcontains(name)) + if (ignoreList_.contains(name)) return; TQString s = i18n("A program called '%1' is slowing down the others " diff --git a/kicker/applets/naughty/NaughtyProcessMonitor.cpp b/kicker/applets/naughty/NaughtyProcessMonitor.cpp index e8cdaf60f..0a9d5c676 100644 --- a/kicker/applets/naughty/NaughtyProcessMonitor.cpp +++ b/kicker/applets/naughty/NaughtyProcessMonitor.cpp @@ -164,7 +164,7 @@ NaughtyProcessMonitor::slotTimeout() void NaughtyProcessMonitor::_process(ulong pid, uint load) { - if (!d->loadMap_.tqcontains(pid)) + if (!d->loadMap_.contains(pid)) { d->loadMap_.insert(pid, load); return; @@ -172,12 +172,12 @@ NaughtyProcessMonitor::_process(ulong pid, uint load) uint oldLoad = d->loadMap_[pid]; bool misbehaving = (load - oldLoad) > 40 * (d->interval_ / 1000); - bool wasMisbehaving = d->scoreMap_.tqcontains(pid); + bool wasMisbehaving = d->scoreMap_.contains(pid); if (misbehaving) if (wasMisbehaving) { - d->scoreMap_.tqreplace(pid, d->scoreMap_[pid] + 1); + d->scoreMap_.replace(pid, d->scoreMap_[pid] + 1); if (canKill(pid)) emit(runawayProcess(pid, processName(pid))); } @@ -187,7 +187,7 @@ NaughtyProcessMonitor::_process(ulong pid, uint load) if (wasMisbehaving) d->scoreMap_.remove(pid); - d->loadMap_.tqreplace(pid, load); + d->loadMap_.replace(pid, load); } // Here begins the set of system-specific methods. @@ -221,7 +221,7 @@ NaughtyProcessMonitor::canKill(ulong pid) const return geteuid() == a; #elif defined(__OpenBSD__) // simply check if entry exists in the uid map and use it - if (!d->uidMap_.tqcontains(pid)) + if (!d->uidMap_.contains(pid)) return false ; return geteuid () == d->uidMap_[pid] ; @@ -289,7 +289,7 @@ NaughtyProcessMonitor::processName(ulong pid) const TQString processName = parts[0] == "kdeinit:" ? parts[1] : parts[0]; - int lastSlash = processName.tqfindRev('/'); + int lastSlash = processName.findRev('/'); // Get basename, if there's a path. if (-1 != lastSlash) @@ -449,7 +449,7 @@ NaughtyProcessMonitor::getLoad(ulong pid, uint & load) const return true; #elif defined(__OpenBSD__) // use cache - if (!d->cacheLoadMap_.tqcontains(pid)) + if (!d->cacheLoadMap_.contains(pid)) return false ; load = d->cacheLoadMap_[pid] ; diff --git a/kicker/applets/swallow/swallow.cpp b/kicker/applets/swallow/swallow.cpp index d5a231363..7112c706a 100644 --- a/kicker/applets/swallow/swallow.cpp +++ b/kicker/applets/swallow/swallow.cpp @@ -261,7 +261,7 @@ static void parseCommand(KProcess *proc, TQString cmd) cmd += " "; - pos = cmd.tqfind(' '); + pos = cmd.find(' '); *proc << cmd.left(pos); cmd.remove(0,pos); cmd = cmd.stripWhiteSpace(); diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp index 6a693fbe8..99aa2d020 100644 --- a/kicker/applets/systemtray/systemtrayapplet.cpp +++ b/kicker/applets/systemtray/systemtrayapplet.cpp @@ -260,7 +260,7 @@ void SystemTrayApplet::preferences() for (; it != itEnd; ++it) { TQString name = KWin::windowInfo((*it)->embeddedWinId()).name(); - if(!shownListBox->tqfindItem(name, TQt::ExactMatch | TQt::CaseSensitive)) + if(!shownListBox->findItem(name, TQt::ExactMatch | TQt::CaseSensitive)) { shownListBox->insertItem(KWin::icon((*it)->embeddedWinId(), 22, 22, true), name); } @@ -271,7 +271,7 @@ void SystemTrayApplet::preferences() for (; it != itEnd; ++it) { TQString name = KWin::windowInfo((*it)->embeddedWinId()).name(); - if(!hiddenListBox->tqfindItem(name, TQt::ExactMatch | TQt::CaseSensitive)) + if(!hiddenListBox->findItem(name, TQt::ExactMatch | TQt::CaseSensitive)) { hiddenListBox->insertItem(KWin::icon((*it)->embeddedWinId(), 22, 22, true), name); } @@ -322,7 +322,7 @@ void SystemTrayApplet::applySettings() item; item = item->next()) { - if( windowNameToClass.tqcontains(item->text())) + if( windowNameToClass.contains(item->text())) m_sortOrderIconList.append(windowNameToClass[item->text()]); else m_sortOrderIconList.append(item->text()); @@ -335,7 +335,7 @@ void SystemTrayApplet::applySettings() item; item = item->next()) { - if( windowNameToClass.tqcontains(item->text())) + if( windowNameToClass.contains(item->text())) m_hiddenIconList.append(windowNameToClass[item->text()]); else m_hiddenIconList.append(item->text()); @@ -388,7 +388,7 @@ void SystemTrayApplet::checkAutoRetract() return; } - if (!tqgeometry().tqcontains(mapFromGlobal(TQCursor::pos()))) + if (!tqgeometry().contains(mapFromGlobal(TQCursor::pos()))) { m_autoRetractTimer->stop(); if (m_autoRetract) @@ -590,8 +590,8 @@ bool SystemTrayApplet::isWinManaged(WId w) bool SystemTrayApplet::shouldHide(WId w) { - return m_hiddenIconList.tqfind(KWin::windowInfo(w).name()) != m_hiddenIconList.end() - || m_hiddenIconList.tqfind('!'+KWin::windowInfo(w,0,NET::WM2WindowClass).windowClassClass()) + return m_hiddenIconList.find(KWin::windowInfo(w).name()) != m_hiddenIconList.end() + || m_hiddenIconList.find('!'+KWin::windowInfo(w,0,NET::WM2WindowClass).windowClassClass()) != m_hiddenIconList.end(); } @@ -711,7 +711,7 @@ void SystemTrayApplet::updateTrayWindows() WId wid = (*emb)->embeddedWinId(); if ((wid == 0) || ((*emb)->kdeTray() && - !kwin_module->systemTrayWindows().tqcontains(wid))) + !kwin_module->systemTrayWindows().contains(wid))) { (*emb)->deleteLater(); emb = m_shownWins.erase(emb); @@ -728,7 +728,7 @@ void SystemTrayApplet::updateTrayWindows() WId wid = (*emb)->embeddedWinId(); if ((wid == 0) || ((*emb)->kdeTray() && - !kwin_module->systemTrayWindows().tqcontains(wid))) + !kwin_module->systemTrayWindows().contains(wid))) { (*emb)->deleteLater(); emb = m_hiddenWins.erase(emb); diff --git a/kicker/extensions/dockbar/dockbarextension.cpp b/kicker/extensions/dockbar/dockbarextension.cpp index c39ac5d4b..aee6a728c 100644 --- a/kicker/extensions/dockbar/dockbarextension.cpp +++ b/kicker/extensions/dockbar/dockbarextension.cpp @@ -335,7 +335,7 @@ int DockBarExtension::findContainerAtPoint(const TQPoint& p) it != containers.constEnd(); ++it, ++i) { - if ((*it)->tqgeometry().tqcontains(p)) + if ((*it)->tqgeometry().contains(p)) { return i; } diff --git a/kicker/extensions/kasbar/kasbar.cpp b/kicker/extensions/kasbar/kasbar.cpp index 482a14db1..3d63c8c4e 100644 --- a/kicker/extensions/kasbar/kasbar.cpp +++ b/kicker/extensions/kasbar/kasbar.cpp @@ -670,7 +670,7 @@ KasItem* KasBar::itemAt(const TQPoint &p) cr.setTopLeft( i->pos() ); cr.setSize( TQSize( itemExtent(), itemExtent() ) ); - if(cr.tqcontains(p)) + if(cr.contains(p)) return i; } diff --git a/kicker/extensions/kasbar/kasbar.h b/kicker/extensions/kasbar/kasbar.h index 507712cce..201fcc882 100644 --- a/kicker/extensions/kasbar/kasbar.h +++ b/kicker/extensions/kasbar/kasbar.h @@ -121,7 +121,7 @@ public: void clear(); KasItem *take( KasItem *i ) { return items.take( indexOf(i) ); } KasItem *itemAt( uint i ) { return items.tqat( i ); } - int indexOf( KasItem *i ) { return items.tqfind( i ); } + int indexOf( KasItem *i ) { return items.find( i ); } KasItemList *itemList() { return &items; } diff --git a/kicker/extensions/kasbar/kastaskitem.cpp b/kicker/extensions/kasbar/kastaskitem.cpp index bbc4f6654..cc10b6410 100644 --- a/kicker/extensions/kasbar/kastaskitem.cpp +++ b/kicker/extensions/kasbar/kastaskitem.cpp @@ -445,7 +445,7 @@ TQString KasTaskItem::expandMacros( const TQString &format, TQObject *data ) if ( pos >= 0 ) { TQVariant val = data->property( TQString(re.cap(1)).latin1() ); TQString v = val.asString(); - s.tqreplace( pos, re.matchedLength(), v ); + s.replace( pos, re.matchedLength(), v ); pos = pos + v.length(); } } diff --git a/kicker/kicker/buttons/knewbutton.cpp b/kicker/kicker/buttons/knewbutton.cpp index b8144d735..2b5153545 100644 --- a/kicker/kicker/buttons/knewbutton.cpp +++ b/kicker/kicker/buttons/knewbutton.cpp @@ -215,7 +215,7 @@ bool KNewButton::eventFilter(TQObject *o, TQEvent *e) e->type() == TQEvent::MouseButtonDblClick ) { TQMouseEvent *me = TQT_TQMOUSEEVENT(e); - if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos()))) + if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos()))) { if (m_pressedDuringPopup && m_popup && m_openTimer != -1 && (me->button() & Qt::LeftButton) ) @@ -355,9 +355,9 @@ void KNewButton::mouseMoveEvent(TQMouseEvent* e) { KButton::mouseMoveEvent(e); - m_mouseInside = m_sloppyRegion.tqcontains(e->pos()); + m_mouseInside = m_sloppyRegion.contains(e->pos()); - if ( m_sloppyRegion.tqcontains(e->pos())) + if ( m_sloppyRegion.contains(e->pos())) { if (m_hoverTimer == -1 && KickerSettings::openOnHover()) m_hoverTimer = startTimer(kMax(200,TQApplication::doubleClickInterval()/2)); diff --git a/kicker/kicker/core/applethandle.cpp b/kicker/kicker/core/applethandle.cpp index 621038002..382779648 100644 --- a/kicker/kicker/core/applethandle.cpp +++ b/kicker/kicker/core/applethandle.cpp @@ -200,7 +200,7 @@ bool AppletHandle::eventFilter(TQObject *o, TQEvent *e) // a hack for applets that have out-of-process // elements (e.g the systray) so that the handle // doesn't flicker when moving over those elements - if (TQT_TQRECT_OBJECT(w->rect()).tqcontains(w->mapFromGlobal(TQCursor::pos()))) + if (TQT_TQRECT_OBJECT(w->rect()).contains(w->mapFromGlobal(TQCursor::pos()))) { nowDrawIt = true; } @@ -269,7 +269,7 @@ void AppletHandle::checkHandleHover() { if (!m_handleHoverTimer || (m_menuButton && m_menuButton->isOn()) || - m_applet->tqgeometry().tqcontains(m_applet->mapToParent( + m_applet->tqgeometry().contains(m_applet->mapToParent( m_applet->mapFromGlobal(TQCursor::pos())))) { return; diff --git a/kicker/kicker/core/container_extension.cpp b/kicker/kicker/core/container_extension.cpp index a4e9f0634..c2023b7df 100644 --- a/kicker/kicker/core/container_extension.cpp +++ b/kicker/kicker/core/container_extension.cpp @@ -680,7 +680,7 @@ void ExtensionContainer::unhideTriggered(UnhideTrigger::Trigger tr, int Xinerama // Otherwise hide mode is automatic. The code below is slightly // complex so as to keep the same behavior as it has always had: // only unhide when the cursor position is within the widget geometry. - // We can't just do geometry().tqcontains(TQCursor::pos()) because + // We can't just do geometry().contains(TQCursor::pos()) because // now we hide the panel completely off screen. int x = TQCursor::pos().x(); @@ -754,7 +754,7 @@ void ExtensionContainer::autoHideTimeout() TQRect r = geometry(); TQPoint p = TQCursor::pos(); - if (!r.tqcontains(p) && + if (!r.contains(p) && (m_settings.unhideLocation() == UnhideTrigger::None || !shouldUnhideForTrigger(m_unhideTriggeredAt))) { diff --git a/kicker/kicker/core/containerarea.cpp b/kicker/kicker/core/containerarea.cpp index 412eeec1e..e4e78fd3d 100644 --- a/kicker/kicker/core/containerarea.cpp +++ b/kicker/kicker/core/containerarea.cpp @@ -314,7 +314,7 @@ void ContainerArea::loadContainers(const TQStringList& containers) BaseContainer* a = 0; - int sep = appletId.tqfindRev('_'); + int sep = appletId.findRev('_'); Q_ASSERT(sep != -1); TQString appletType = appletId.left(sep); @@ -962,7 +962,7 @@ void ContainerArea::mouseMoveEvent(TQMouseEvent *ev) return; } - if (ev->state() == Qt::LeftButton && !TQT_TQRECT_OBJECT(rect()).tqcontains(ev->pos())) + if (ev->state() == Qt::LeftButton && !TQT_TQRECT_OBJECT(rect()).contains(ev->pos())) { // leaveEvent() doesn't work, while grabbing the mouse _autoScrollTimer.stop(); @@ -1542,7 +1542,7 @@ TQRect ContainerArea::availableSpaceFollowing(BaseContainer* a) if (a) { - BaseContainer::Iterator it = m_containers.tqfind(a); + BaseContainer::Iterator it = m_containers.find(a); if (it != m_containers.end() && ++it != m_containers.end()) { @@ -1784,7 +1784,7 @@ void ContainerArea::updateContainersBackground() // properly, so just cache the geometry and update background only when // the geometry changes or when the background really changes (in which // case the cached is cleared). - if( !m_cachedGeometry.tqcontains( *it )) + if( !m_cachedGeometry.contains( *it )) { m_cachedGeometry[ *it ] = TQRect(); connect( *it, TQT_SIGNAL( destroyed()), TQT_SLOT( destroyCachedGeometry())); diff --git a/kicker/kicker/core/containerarealayout.cpp b/kicker/kicker/core/containerarealayout.cpp index 4853b8d88..ae4cca873 100644 --- a/kicker/kicker/core/containerarealayout.cpp +++ b/kicker/kicker/core/containerarealayout.cpp @@ -350,7 +350,7 @@ void ContainerAreaLayout::insertIntoFreeSpace(TQWidget* widget, TQPoint insertio if (current) { m_items.erase(m_items.fromLast()); - ItemList::iterator insertIt = m_items.tqfind(current); + ItemList::iterator insertIt = m_items.find(current); if (insertIt == m_items.begin()) { @@ -625,7 +625,7 @@ void ContainerAreaLayout::moveContainerSwitch(TQWidget* container, int distance) : kMin(newPos, last->leftR() - moving->widthR()); // Move 'moving' to its new position in the container list. - ItemList::iterator itMoving = m_items.tqfind(moving); + ItemList::iterator itMoving = m_items.find(moving); if (itMoving != m_items.end()) { diff --git a/kicker/kicker/core/extensionmanager.cpp b/kicker/kicker/core/extensionmanager.cpp index 7921c636d..03e039ee0 100644 --- a/kicker/kicker/core/extensionmanager.cpp +++ b/kicker/kicker/core/extensionmanager.cpp @@ -140,7 +140,7 @@ void ExtensionManager::initialize() TQString extensionId(*it); // create a matching applet container - if (extensionId.tqfind("Extension") == -1) + if (extensionId.find("Extension") == -1) { continue; } @@ -259,7 +259,7 @@ void ExtensionManager::migrateMenubar() { TQString extensionId(*it); - if (extensionId.tqfind("Extension") == -1) + if (extensionId.find("Extension") == -1) { continue; } @@ -291,12 +291,12 @@ void ExtensionManager::migrateMenubar() } KConfigGroup group(&extensionConfig, appletId.latin1()); - TQString appletType = appletId.left(appletId.tqfindRev('_')); + TQString appletType = appletId.left(appletId.findRev('_')); if (appletType == "Applet") { TQString appletFile = group.readPathEntry("DesktopFile"); - if (appletFile.tqfind("menuapplet.desktop") != -1) + if (appletFile.find("menuapplet.desktop") != -1) { TQString menubarConfig = locate("config", extension); KIO::NetAccess::copy(menubarConfig, diff --git a/kicker/kicker/core/main.cpp b/kicker/kicker/core/main.cpp index 44d891f1e..76e94a0e3 100644 --- a/kicker/kicker/core/main.cpp +++ b/kicker/kicker/core/main.cpp @@ -73,7 +73,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) XCloseDisplay(dpy); dpy = 0; - if ((pos = display_name.tqfindRev('.')) != -1) + if ((pos = display_name.findRev('.')) != -1) display_name.remove(pos, 10); TQCString env; diff --git a/kicker/kicker/core/pluginmanager.cpp b/kicker/kicker/core/pluginmanager.cpp index 86270db62..d1706ada9 100644 --- a/kicker/kicker/core/pluginmanager.cpp +++ b/kicker/kicker/core/pluginmanager.cpp @@ -272,7 +272,7 @@ AppletContainer* PluginManager::createAppletContainer( return 0; } - bool untrusted = m_untrustedApplets.tqfind(desktopFile) != m_untrustedApplets.end(); + bool untrusted = m_untrustedApplets.find(desktopFile) != m_untrustedApplets.end(); if (isStartup && untrusted) { // don't load extensions that bombed on us previously! @@ -325,7 +325,7 @@ ExtensionContainer* PluginManager::createExtensionContainer(const TQString& desk if (!internal) { - bool untrusted = m_untrustedExtensions.tqfind(desktopFile) != m_untrustedExtensions.end(); + bool untrusted = m_untrustedExtensions.find(desktopFile) != m_untrustedExtensions.end(); if (isStartup && untrusted) { // don't load extensions that bombed on us previously! diff --git a/kicker/kicker/kicker-3.4-reverseLayout.cpp b/kicker/kicker/kicker-3.4-reverseLayout.cpp index bc3baa9e1..97a35aff6 100644 --- a/kicker/kicker/kicker-3.4-reverseLayout.cpp +++ b/kicker/kicker/kicker-3.4-reverseLayout.cpp @@ -88,7 +88,7 @@ int main(int argc, char** argv) applets[*it].freeSpace = 1 - applets[*it].freeSpace; // Take care of stretchable applets. - if (stretchableApplets.tqcontains(applets[*it].desktopFile)) + if (stretchableApplets.contains(applets[*it].desktopFile)) { if (it != appletIds.begin()) { diff --git a/kicker/kicker/plugins/kickoff-beagle-plugin.cpp b/kicker/kicker/plugins/kickoff-beagle-plugin.cpp index a506bcd5d..3cad77ca4 100644 --- a/kicker/kicker/plugins/kickoff-beagle-plugin.cpp +++ b/kicker/kicker/plugins/kickoff-beagle-plugin.cpp @@ -315,7 +315,7 @@ HitMenuItem *KickoffBeaglePlugin::hitToHitMenuItem (int category, Hit *hit) case WEBHIST: uri = hit->getUri (); title = (*hit) [dc_title]; - title = title.tqreplace(TQRegExp("\n")," "); + title = title.replace(TQRegExp("\n")," "); mimetype = "text/html"; if (title.isEmpty () || title.stripWhiteSpace ().isEmpty ()) { title = uri.prettyURL (); @@ -375,15 +375,15 @@ HitMenuItem *KickoffBeaglePlugin::hitToHitMenuItem (int category, Hit *hit) TQString command = desktopfile.readEntry("Exec"); if (command==input) score = 100; - else if (command.tqfind(input)==0) + else if (command.find(input)==0) score = 50; - else if (command.tqfind(input)!=-1) + else if (command.find(input)!=-1) score = 10; else if (title==input) score = 100; - else if (title.tqfind(input)==0) + else if (title.find(input)==0) score = 50; - else if (title.tqfind(input)!=-1) + else if (title.find(input)!=-1) score = 10; break; } diff --git a/kicker/kicker/ui/addapplet.cpp b/kicker/kicker/ui/addapplet.cpp index 47a2c5835..163a4ae9d 100644 --- a/kicker/kicker/ui/addapplet.cpp +++ b/kicker/kicker/ui/addapplet.cpp @@ -435,7 +435,7 @@ void AddAppletDialog::addApplet(AppletWidget* applet) // reset the odd/even colouring from this item on down in the list bool odd = applet->odd(); - AppletWidget::List::const_iterator it = m_appletWidgetList.tqfind(applet); + AppletWidget::List::const_iterator it = m_appletWidgetList.find(applet); for (; it != m_appletWidgetList.constEnd(); ++it) { if ((*it)->isHidden()) @@ -484,8 +484,8 @@ bool AddAppletDialog::appletMatchesSearch(const AppletWidget* w, return (m_selectedType == AppletInfo::Undefined || w->info().type() & m_selectedType) && - (w->info().name().tqcontains(s, false) || - w->info().comment().tqcontains(s, false)); + (w->info().name().contains(s, false) || + w->info().comment().contains(s, false)); } void AddAppletDialog::delayedSearch() diff --git a/kicker/kicker/ui/addapplet_mnu.cpp b/kicker/kicker/ui/addapplet_mnu.cpp index 19bbf0f11..6d5c4482f 100644 --- a/kicker/kicker/ui/addapplet_mnu.cpp +++ b/kicker/kicker/ui/addapplet_mnu.cpp @@ -54,11 +54,11 @@ void PanelAddAppletMenu::slotAboutToShow() if (ai.icon().isEmpty() || ai.icon() == "unknown") { - insertItem(ai.name().tqreplace( "&", "&&" ), i); + insertItem(ai.name().replace( "&", "&&" ), i); } else { - insertItem(SmallIconSet(ai.icon()), ai.name().tqreplace( "&", "&&" ), i); + insertItem(SmallIconSet(ai.icon()), ai.name().replace( "&", "&&" ), i); } if (ai.isUniqueApplet() && PluginManager::the()->hasInstance(ai)) diff --git a/kicker/kicker/ui/addbutton_mnu.cpp b/kicker/kicker/ui/addbutton_mnu.cpp index c04a832e6..02c4718d4 100644 --- a/kicker/kicker/ui/addbutton_mnu.cpp +++ b/kicker/kicker/ui/addbutton_mnu.cpp @@ -46,7 +46,7 @@ PanelAddButtonMenu::PanelAddButtonMenu(ContainerArea* cArea, TQWidget * parent, void PanelAddButtonMenu::slotExec(int id) { - if (!entryMap_.tqcontains(id)) + if (!entryMap_.contains(id)) return; KSycocaEntry * e = entryMap_[id]; diff --git a/kicker/kicker/ui/addextension_mnu.cpp b/kicker/kicker/ui/addextension_mnu.cpp index 325897a8c..b22187443 100644 --- a/kicker/kicker/ui/addextension_mnu.cpp +++ b/kicker/kicker/ui/addextension_mnu.cpp @@ -44,7 +44,7 @@ void PanelAddExtensionMenu::slotAboutToShow() AppletInfo::List::const_iterator it = extensions.constBegin(); for( int i = 0; it != extensions.constEnd(); ++it, ++i ) { const AppletInfo& ai = (*it); - insertItem( ai.name().tqreplace( "&", "&&" ), i ); + insertItem( ai.name().replace( "&", "&&" ), i ); if ( ai.isUniqueApplet() && PluginManager::the()->hasInstance(ai) ) { setItemEnabled( i, false ); setItemChecked( i, true ); diff --git a/kicker/kicker/ui/appletop_mnu.cpp b/kicker/kicker/ui/appletop_mnu.cpp index 2bd8f7bd0..fb4f97ea8 100644 --- a/kicker/kicker/ui/appletop_mnu.cpp +++ b/kicker/kicker/ui/appletop_mnu.cpp @@ -41,7 +41,7 @@ PanelAppletOpMenu::PanelAppletOpMenu(int actions, TQPopupMenu *opMenu, const TQP bool isButton = (parent && parent->inherits("ButtonContainer")); bool isMenu = false; TQString titleText = title; - titleText = titleText.tqreplace('&', "&&"); + titleText = titleText.replace('&', "&&"); if (isButton) { isMenu = static_cast(parent)->isAMenu(); diff --git a/kicker/kicker/ui/browser_mnu.cpp b/kicker/kicker/ui/browser_mnu.cpp index 46f79db2b..ee62791e9 100644 --- a/kicker/kicker/ui/browser_mnu.cpp +++ b/kicker/kicker/ui/browser_mnu.cpp @@ -244,7 +244,7 @@ void PanelBrowserMenu::initialize() title = c.readEntry("Name", title); TQString s = c.readEntry("Icon"); - if(!_icons->tqcontains(s)) { + if(!_icons->contains(s)) { icon = KGlobal::iconLoader()->loadIcon(s, KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, 0, true); @@ -344,7 +344,7 @@ void PanelBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, con // avoid &'s being converted to accelerators TQString newTitle = title; newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); - newTitle.tqreplace("&", "&&"); + newTitle.replace("&", "&&"); // insert menu item int id = insertItem(pixmap, newTitle); @@ -362,7 +362,7 @@ void PanelBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, Pan // avoid &'s being converted to accelerators TQString newTitle = title; newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); - newTitle.tqreplace("&", "&&"); + newTitle.replace("&", "&&"); // insert submenu insertItem(pixmap, newTitle, subMenu); @@ -388,7 +388,7 @@ void PanelBrowserMenu::mouseMoveEvent(TQMouseEvent *e) // get id int id = idAt(_lastpress); - if(!_filemap.tqcontains(id)) return; + if(!_filemap.contains(id)) return; // reset _lastpress _lastpress = TQPoint(-1, -1); @@ -439,7 +439,7 @@ void PanelBrowserMenu::slotExec(int id) { kapp->propagateSessionManager(); - if(!_filemap.tqcontains(id)) return; + if(!_filemap.contains(id)) return; KURL url; url.setPath(path() + "/" + _filemap[id]); @@ -494,9 +494,9 @@ void PanelBrowserMenu::slotMimeCheck() // kdDebug() << url.url() << ": " << icon << endl; file = KStringHandler::cEmSqueeze( file, fontMetrics(), 20 ); - file.tqreplace("&", "&&"); + file.replace("&", "&&"); - if(!_icons->tqcontains(icon)) { + if(!_icons->contains(icon)) { TQPixmap pm = SmallIcon(icon); if( pm.height() > 16 ) { diff --git a/kicker/kicker/ui/exe_dlg.cpp b/kicker/kicker/ui/exe_dlg.cpp index 0829f6ccb..d39fb5942 100644 --- a/kicker/kicker/ui/exe_dlg.cpp +++ b/kicker/kicker/ui/exe_dlg.cpp @@ -164,7 +164,7 @@ void PanelExeDialog::slotTextChanged(const TQString &str) } TQString exeLocation = str; - TQMap::iterator it = m_partialPath2full.tqfind(str); + TQMap::iterator it = m_partialPath2full.find(str); if (it != m_partialPath2full.end()) exeLocation = it.data(); @@ -174,7 +174,7 @@ void PanelExeDialog::slotTextChanged(const TQString &str) void PanelExeDialog::slotReturnPressed() { - if (m_partialPath2full.tqcontains(ui->m_exec->url())) + if (m_partialPath2full.contains(ui->m_exec->url())) ui->m_exec->setURL(m_partialPath2full[ui->m_exec->url()]); } diff --git a/kicker/kicker/ui/itemview.cpp b/kicker/kicker/ui/itemview.cpp index f86ae537a..3a2978261 100644 --- a/kicker/kicker/ui/itemview.cpp +++ b/kicker/kicker/ui/itemview.cpp @@ -385,7 +385,7 @@ void KMenuItemSeparator::setLink( const TQString &text, const TQString &url ) bool KMenuItemSeparator::hitsLink( const TQPoint &pos ) { - return m_link_rect.tqcontains( pos ); + return m_link_rect.contains( pos ); } void KMenuItemSeparator::preparePixmap( int width ) @@ -1162,7 +1162,7 @@ bool KMenuItemDrag::decode(const TQMimeSource* e, KMenuItemInfo& item) item.m_title = item.m_path; item.m_icon = KMimeType::iconForURL( url ); item.m_title = item.m_path.section( '/', -1, -1 ); - int last_slash = url.tqfindRev ('/', -1); + int last_slash = url.findRev ('/', -1); if (last_slash == 0) item.m_description = i18n("Directory: /)"); else @@ -1205,7 +1205,7 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const TQStringList favs = KickerSettings::favorites(); if (item.m_s) - return favs.tqfind(item.m_s->storageId())==favs.end(); + return favs.find(item.m_s->storageId())==favs.end(); else { TQStringList::Iterator it; @@ -1219,7 +1219,7 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==uri) + if (df.readURL().replace("file://",TQString())==uri) break; } } @@ -1233,15 +1233,15 @@ bool FavoritesItemView::acceptDrag (TQDropEvent* event) const TQStringList favs = KickerSettings::favorites(); if (text.endsWith(".desktop")) { - KService::Ptr p = KService::serviceByDesktopPath(text.tqreplace("file://",TQString())); - return (p && favs.tqfind(p->storageId())==favs.end()); + KService::Ptr p = KService::serviceByDesktopPath(text.replace("file://",TQString())); + return (p && favs.find(p->storageId())==favs.end()); } else { TQStringList::Iterator it; for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==text) + if (df.readURL().replace("file://",TQString())==text) break; } } diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp index 110cd15f0..65011890e 100644 --- a/kicker/kicker/ui/k_mnu.cpp +++ b/kicker/kicker/ui/k_mnu.cpp @@ -652,7 +652,7 @@ TQMouseEvent PanelKMenu::translateMouseEvent( TQMouseEvent* e ) { TQRect side = sideImageRect(); - if ( !side.tqcontains( e->pos() ) ) + if ( !side.contains( e->pos() ) ) return *e; TQPoint newpos( e->pos() ); diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp index 542e08be9..1a87b163d 100644 --- a/kicker/kicker/ui/k_new_mnu.cpp +++ b/kicker/kicker/ui/k_new_mnu.cpp @@ -141,12 +141,12 @@ static TQString workaroundStringFreeze(const TQString& str) { TQString s = str; - s.tqreplace("","&"); + s.replace("","&"); TQRegExp re("<[^>]+>"); re.setMinimal(true); re.setCaseSensitive(false); - s.tqreplace(re, ""); + s.replace(re, ""); s = s.simplifyWhiteSpace(); return s; @@ -517,7 +517,7 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) return false; } - if (m_sloppyRegion.tqcontains(p)) { + if (m_sloppyRegion.contains(p)) { if (e->type() == TQEvent::MouseButtonPress /*&& m_sloppyTimer.isActive()*/) m_sloppySourceClicked = true; @@ -682,9 +682,9 @@ bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e) void KMenu::slotSloppyTimeout() { - if (m_sloppyRegion.tqcontains(TQCursor::pos()) && !m_sloppySource.isNull()) + if (m_sloppyRegion.contains(TQCursor::pos()) && !m_sloppySource.isNull()) { - if ( m_sloppySource.tqcontains(TQCursor::pos())) + if ( m_sloppySource.contains(TQCursor::pos())) { m_stacker->raiseWidget(m_sloppyWidget); @@ -882,7 +882,7 @@ void KMenu::slotGoExitSubMenu(const TQString& url) m_exitView->rightView()->insertItem( "switchuser", i18n( "Start New Session" ), i18n( "Start a parallel session" ), "kicker:/switchuser", nId++, index++ ); - m_exitView->rightView()->insertItem( "lock", i18n( "Lock Current && Start New Session").tqreplace("&&","&"), + m_exitView->rightView()->insertItem( "lock", i18n( "Lock Current && Start New Session").replace("&&","&"), i18n( "Lock screen and start a parallel session" ), "kicker:/switchuserafterlock", nId++, index++ ); SessList sess; @@ -918,7 +918,7 @@ void KMenu::goSubMenu(const TQString& relPath, bool keyboard) int index = rel.length() - 1; if ( rel.endsWith( "/" ) ) index--; - index = rel.tqfindRev( '/', index ); + index = rel.findRev( '/', index ); kdDebug() << "goup, rel '" << rel << "' " << index << endl; TQString currel = rel; rel = rel.left( index + 1 ); @@ -1165,7 +1165,7 @@ void KMenu::fillMenu(KServiceGroup::Ptr& KService::Ptr s(static_cast(e)); if (_relPath.isEmpty()) { TQStringList favs = KickerSettings::favorites(); - if (favs.tqfind(s->storageId())!=favs.end()) + if (favs.find(s->storageId())!=favs.end()) continue; } #ifdef KDELIBS_SUSE @@ -1259,7 +1259,7 @@ void KMenu::initialize() if ((*it)[0]=='/') { KDesktopFile df((*it),true); TQString url = df.readURL(); - if (!KURL(url).isLocalFile() || TQFile::exists(url.tqreplace("file://",TQString()))) + if (!KURL(url).isLocalFile() || TQFile::exists(url.replace("file://",TQString()))) m_favoriteView->insertItem(df.readIcon(),df.readName(),df.readGenericName(), url, nId++, index++); } else { @@ -1314,7 +1314,7 @@ void KMenu::insertStaticExitItems() m_exitView->leftView()->insertItem( "exit", i18n( "Shutdown Computer" ), i18n( "Turn off computer" ), "kicker:/shutdown", nId++, index++ ); - m_exitView->leftView()->insertItem( "reload", i18n( "&Restart Computer" ).tqreplace("&",""), + m_exitView->leftView()->insertItem( "reload", i18n( "&Restart Computer" ).replace("&",""), i18n( "Restart and boot the default system" ), "kicker:/restart", nId++, index++ ); @@ -1906,7 +1906,7 @@ bool KMenu::dontQueryNow (const TQString& str) if (str == current_query.get()) return true; int length = str.length (); - int last_whitespace = str.tqfindRev (' ', -1); + int last_whitespace = str.findRev (' ', -1); if (last_whitespace == length-1) return false; // if the user typed a space, search if (last_whitespace >= length-2) @@ -1964,7 +1964,7 @@ void KMenu::createNewProgramList(TQString relPath) } else if(e->isType(KST_KService)) { KService::Ptr s(static_cast(e)); if(s->type() == "Application" && !s->noDisplay() ) { - TQString shortStorageId = s->storageId().tqreplace(".desktop",TQString()); + TQString shortStorageId = s->storageId().replace(".desktop",TQString()); TQStringList::Iterator it_find = m_seenPrograms.begin(); TQStringList::Iterator it_end = m_seenPrograms.end(); bool found = false; @@ -1979,7 +1979,7 @@ void KMenu::createNewProgramList(TQString relPath) m_seenProgramsChanged=true; m_seenPrograms+=shortStorageId; m_seenPrograms+=m_tqcurrentDate; - if (m_newInstalledPrograms.tqfind(s->storageId())==m_newInstalledPrograms.end()) + if (m_newInstalledPrograms.find(s->storageId())==m_newInstalledPrograms.end()) m_newInstalledPrograms+=s->storageId(); } else { @@ -1987,7 +1987,7 @@ void KMenu::createNewProgramList(TQString relPath) if (*(it_find)!="-") { TQDate date = TQDate::fromString(*(it_find),Qt::ISODate); if (date.daysTo(TQDate::currentDate())<3) { - if (m_newInstalledPrograms.tqfind(s->storageId())==m_newInstalledPrograms.end()) + if (m_newInstalledPrograms.find(s->storageId())==m_newInstalledPrograms.end()) m_newInstalledPrograms+=s->storageId(); } else { @@ -2033,24 +2033,24 @@ void KMenu::searchProgramList(TQString relPath) int score = 0; if (s->exec()==input) score = 100; - else if (s->exec().tqfind(input)==0) + else if (s->exec().find(input)==0) score = 50; - else if (s->exec().tqfind(input)!=-1) + else if (s->exec().find(input)!=-1) score = 10; else if (s->name().lower()==input) score = 100; else if (s->genericName().lower()==input) score = 100; - else if (s->name().lower().tqfind(input)==0) + else if (s->name().lower().find(input)==0) score = 50; - else if (s->genericName().lower().tqfind(input)==0) + else if (s->genericName().lower().find(input)==0) score = 50; - else if (s->name().lower().tqfind(input)!=-1) + else if (s->name().lower().find(input)!=-1) score = 10; - else if (s->genericName().lower().tqfind(input)!=-1) + else if (s->genericName().lower().find(input)!=-1) score = 10; - if (s->exec().tqfind(' ')==-1) + if (s->exec().find(' ')==-1) score+=1; if (s->substituteUid()) @@ -2082,7 +2082,7 @@ void KMenu::searchProgramList(TQString relPath) insertSearchResult(hit_item); TQString exe = s->exec(); - int pos = exe.tqfind(' '); + int pos = exe.find(' '); if (pos>0) exe=exe.left(pos); m_programsInMenu+=KGlobal::dirs()->findExe(exe); @@ -2329,13 +2329,13 @@ void KMenu::doQuery (bool return_pressed) if (exe.endsWith("/bin/gimp")) { TQStringList::ConstIterator it = m_programsInMenu.begin(); for (; it != m_programsInMenu.end(); ++it) - if ((*it).tqfind("bin/gimp-remote-")!=-1) { + if ((*it).find("bin/gimp-remote-")!=-1) { gimp_hack = true; break; } } #endif - if (m_programsInMenu.tqfind(exe)!=m_programsInMenu.end() + if (m_programsInMenu.find(exe)!=m_programsInMenu.end() #ifdef KDELIBS_SUSE || gimp_hack #endif @@ -2540,7 +2540,7 @@ TQString KMenu::iconForHitMenuItem(HitMenuItem *hit_item) return favicon; } - if (mimetype_iconstore.tqcontains (hit_item->mimetype)) + if (mimetype_iconstore.contains (hit_item->mimetype)) return (mimetype_iconstore [hit_item->mimetype]); else { KMimeType::Ptr mimetype_ptr = KMimeType::mimeType (hit_item->mimetype); @@ -2770,7 +2770,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos i18n("Add to Favorites"), AddToFavorites); TQStringList favs = KickerSettings::favorites(); - if (m_popupService && favs.tqfind(m_popupService->storageId())!=favs.end()) + if (m_popupService && favs.find(m_popupService->storageId())!=favs.end()) m_popupMenu->setItemEnabled(num, false); else { TQStringList::Iterator it; @@ -2779,7 +2779,7 @@ void KMenu::slotContextMenuRequested( TQListViewItem * item, const TQPoint & pos if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) + if (df.readURL().replace("file://",TQString())==m_popupPath.path) break; } } @@ -2971,7 +2971,7 @@ void KMenu::slotContextMenu(int selected) case AddToFavorites: if (m_popupService) { - if (favs.tqfind(m_popupService->storageId())==favs.end()) { + if (favs.find(m_popupService->storageId())==favs.end()) { KService::Ptr p = KService::serviceByStorageId(m_popupService->storageId()); m_favoriteView->insertMenuItem(p, serviceMenuEndId()+favs.count()+1); favs+=m_popupService->storageId(); @@ -2982,7 +2982,7 @@ void KMenu::slotContextMenu(int selected) for (it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) + if (df.readURL().replace("file://",TQString())==m_popupPath.path) break; } } @@ -3010,7 +3010,7 @@ void KMenu::slotContextMenu(int selected) case RemoveFromFavorites: if (m_popupService) { - favs.erase(favs.tqfind(m_popupService->storageId())); + favs.erase(favs.find(m_popupService->storageId())); for (TQListViewItemIterator it(m_favoriteView); it.current(); ++it) { KMenuItem* kitem = static_cast(it.current()); @@ -3024,7 +3024,7 @@ void KMenu::slotContextMenu(int selected) for (TQStringList::Iterator it = favs.begin(); it != favs.end(); ++it) { if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==m_popupPath.path) { + if (df.readURL().replace("file://",TQString())==m_popupPath.path) { TQFile::remove((*it)); favs.erase(it); break; @@ -3277,7 +3277,7 @@ void KMenu::searchActionClicked(TQListViewItem* item) if( !KURIFilter::self()->filterURI(data, list) ) { KDesktopFile file("searchproviders/google.desktop", true, "services"); - data.setData(file.readEntry("Query").tqreplace("\\{@}", m_kcommand->currentText())); + data.setData(file.readEntry("Query").replace("\\{@}", m_kcommand->currentText())); } (void) new KRun( data.uri(), parentWidget()); @@ -3320,7 +3320,7 @@ void KMenu::updateRecentlyUsedApps(KService::Ptr &service) TQString strItem(service->desktopEntryPath()); // don't add an item from root kmenu level - if (!strItem.tqcontains('/')) + if (!strItem.contains('/')) { return; } @@ -3377,7 +3377,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir // remove at old position if (kitem->service()) { - favs.erase(favs.tqfind(kitem->service()->storageId())); + favs.erase(favs.find(kitem->service()->storageId())); addFav = kitem->service()->storageId(); } else @@ -3387,7 +3387,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==kitem->path()) + if (df.readURL().replace("file://",TQString())==kitem->path()) { addFav = *it; favs.erase(it); @@ -3412,7 +3412,7 @@ void KMenu::slotFavoritesMoved( TQListViewItem* item, TQListViewItem* /*afterFir if ((*it)[0]=='/' && !kafterNow->service()) { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==kafterNow->path()) + if (df.readURL().replace("file://",TQString())==kafterNow->path()) { kdDebug() << "insert after " << kafterNow->path() << endl; favs.insert(++it,addFav); @@ -3549,7 +3549,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if (item.m_s) { - if (favs.tqfind(item.m_s->storageId())==favs.end()) + if (favs.find(item.m_s->storageId())==favs.end()) { newItem = m_favoriteView->insertMenuItem(item.m_s, serviceMenuEndId()+favs.count()+1); favs += item.m_s->storageId(); @@ -3569,7 +3569,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==uri) + if (df.readURL().replace("file://",TQString())==uri) break; } } @@ -3597,8 +3597,8 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if (text.endsWith(".desktop")) { - KService::Ptr p = KService::serviceByDesktopPath(text.tqreplace("file://",TQString())); - if (p && favs.tqfind(p->storageId())==favs.end()) { + KService::Ptr p = KService::serviceByDesktopPath(text.replace("file://",TQString())); + if (p && favs.find(p->storageId())==favs.end()) { newItem = m_favoriteView->insertMenuItem(p, serviceMenuEndId()+favs.count()+1); favs+=p->storageId(); } @@ -3611,7 +3611,7 @@ void KMenu::slotFavDropped(TQDropEvent * ev, TQListViewItem *after ) if ((*it)[0]=='/') { KDesktopFile df((*it),true); - if (df.readURL().tqreplace("file://",TQString())==text) + if (df.readURL().replace("file://",TQString())==text) break; } } diff --git a/kicker/kicker/ui/kickoff_bar.cpp b/kicker/kicker/ui/kickoff_bar.cpp index 6be19459c..6a41a719b 100644 --- a/kicker/kicker/ui/kickoff_bar.cpp +++ b/kicker/kicker/ui/kickoff_bar.cpp @@ -56,7 +56,7 @@ void KickoffTabBar::paint(TQPainter* p, TQTab* t, bool selected) const // else if(t == d->pressed) // flags |= TQStyle::Style_Sunken; //selection flags - if(t->rect().tqcontains(mapFromGlobal(TQCursor::pos()))) + if(t->rect().contains(mapFromGlobal(TQCursor::pos()))) flags |= TQStyle::Style_MouseOver; tqstyle().tqdrawControl( TQStyle::CE_TabBarTab, p, this, t->rect(), tqcolorGroup(), flags, TQStyleOption(t) ); @@ -114,7 +114,7 @@ void KickoffTabBar::paintLabel(TQPainter* p, const TQRect& br, TQTab* t, bool ha flags |= TQStyle::Style_Selected; // else if(t == d->pressed) // flags |= TQStyle::Style_Sunken; - if(t->rect().tqcontains(mapFromGlobal(TQCursor::pos()))) + if(t->rect().contains(mapFromGlobal(TQCursor::pos()))) flags |= TQStyle::Style_MouseOver; tqstyle().tqdrawControl( TQStyle::CE_TabBarLabel, p, this, rt, t->isEnabled() ? tqcolorGroup(): tqpalette().disabled(), diff --git a/kicker/kicker/ui/query.cpp b/kicker/kicker/ui/query.cpp index 0bcff59c1..12b9b6910 100644 --- a/kicker/kicker/ui/query.cpp +++ b/kicker/kicker/ui/query.cpp @@ -111,7 +111,7 @@ bool Query::matches(const TQString &term) bool next_alternative = false; for ( TQStringList::ConstIterator it = alt->excludes.begin(); it != alt->excludes.end(); ++it ) { - if ( lower_term.tqfind(*it)!=-1 ) { + if ( lower_term.find(*it)!=-1 ) { next_alternative = true; continue; } @@ -120,7 +120,7 @@ bool Query::matches(const TQString &term) continue; for ( TQStringList::ConstIterator it = alt->includes.begin(); it != alt->includes.end(); ++it ) { - if ( lower_term.tqfind(*it)==-1 ) { + if ( lower_term.find(*it)==-1 ) { next_alternative = true; continue; } diff --git a/kicker/kicker/ui/removeapplet_mnu.cpp b/kicker/kicker/ui/removeapplet_mnu.cpp index 295651523..8dfaa00d2 100644 --- a/kicker/kicker/ui/removeapplet_mnu.cpp +++ b/kicker/kicker/ui/removeapplet_mnu.cpp @@ -63,7 +63,7 @@ void PanelRemoveAppletMenu::slotAboutToShow() } items.append(PanelMenuItemInfo(container->icon(), - container->visibleName().tqreplace("&", "&&"), + container->visibleName().replace("&", "&&"), id)); ++id; ++it; diff --git a/kicker/kicker/ui/removeextension_mnu.cpp b/kicker/kicker/ui/removeextension_mnu.cpp index c28ae1162..9a1655bae 100644 --- a/kicker/kicker/ui/removeextension_mnu.cpp +++ b/kicker/kicker/ui/removeextension_mnu.cpp @@ -57,7 +57,7 @@ void PanelRemoveExtensionMenu::slotAboutToShow() for (ExtensionList::iterator it = m_containers.begin(); it != itEnd; ++it) { const AppletInfo info = (*it)->info(); - TQString name = info.name().tqreplace("&", "&&"); + TQString name = info.name().replace("&", "&&"); switch ((*it)->position()) { case KPanelExtension::Top: diff --git a/kicker/kicker/ui/service_mnu.cpp b/kicker/kicker/ui/service_mnu.cpp index 9c4d09929..ee0414644 100644 --- a/kicker/kicker/ui/service_mnu.cpp +++ b/kicker/kicker/ui/service_mnu.cpp @@ -231,7 +231,7 @@ void PanelServiceMenu::fillMenu(KServiceGroup::Ptr& _root, TQString inlineHeaderName = g->showInlineHeader() ? groupCaption : ""; // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - groupCaption.tqreplace("&", "&&"); + groupCaption.replace("&", "&&"); if ( nbChildCount == 1 && g->allowInline() && g->inlineAlias()) { @@ -411,10 +411,10 @@ void PanelServiceMenu::insertMenuItem(KService::Ptr & s, int nId, if (KickerSettings::menuEntryFormat() == KickerSettings::NameAndDescription) { if ((!suppressGenericNames || - !suppressGenericNames->tqcontains(s->untranslatedGenericName())) && - serviceName.tqfind(comment, 0, true) == -1) + !suppressGenericNames->contains(s->untranslatedGenericName())) && + serviceName.find(comment, 0, true) == -1) { - if (comment.tqfind(serviceName, 0, true) == -1) + if (comment.find(serviceName, 0, true) == -1) { serviceName = i18n("Entries in K-menu: %1 app name, %2 description", "%1 - %2").arg(serviceName, comment); } @@ -450,7 +450,7 @@ void PanelServiceMenu::insertMenuItem(KService::Ptr & s, int nId, // item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - serviceName.tqreplace("&", "&&"); + serviceName.replace("&", "&&"); TQString icon = s->icon(); if (icon=="unknown") @@ -544,7 +544,7 @@ bool PanelServiceMenu::highlightMenuItem( const TQString &menuItemId ) void PanelServiceMenu::slotExec(int id) { - if (!entryMap_.tqcontains(id)) + if (!entryMap_.contains(id)) { return; } @@ -578,7 +578,7 @@ void PanelServiceMenu::mouseReleaseEvent(TQMouseEvent * ev) return; } - if (!entryMap_.tqcontains(id)) + if (!entryMap_.contains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; @@ -769,7 +769,7 @@ void PanelServiceMenu::mouseMoveEvent(TQMouseEvent * ev) if (id < serviceMenuStartId()) return; - if (!entryMap_.tqcontains(id)) { + if (!entryMap_.contains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; } @@ -838,7 +838,7 @@ void PanelServiceMenu::dragEnterEvent(TQDragEnterEvent *event) void PanelServiceMenu::dragLeaveEvent(TQDragLeaveEvent *) { // see PanelServiceMenu::dragEnterEvent why this is nescessary - if (!TQT_TQRECT_OBJECT(frameGeometry()).tqcontains(TQCursor::pos())) + if (!TQT_TQRECT_OBJECT(frameGeometry()).contains(TQCursor::pos())) { KURLDrag::setTarget(0); } @@ -932,12 +932,12 @@ void PanelServiceMenu::setSearchString(const TQString &searchString) int id = *menuItemIt; KService* s = dynamic_cast< KService* >( static_cast< KSycocaEntry* >( entryMap_[ id ])); TQString menuText = text(id); - if (menuText.tqcontains(searchString, false) > 0 - || ( s != NULL && ( s->name().tqcontains(searchString, false) > 0 - || s->exec().tqcontains(searchString, false) > 0 - || s->comment().tqcontains(searchString, false) > 0 - || s->genericName().tqcontains(searchString, false) > 0 - || s->exec().tqcontains(searchString, false) > 0 ) + if (menuText.contains(searchString, false) > 0 + || ( s != NULL && ( s->name().contains(searchString, false) > 0 + || s->exec().contains(searchString, false) > 0 + || s->comment().contains(searchString, false) > 0 + || s->genericName().contains(searchString, false) > 0 + || s->exec().contains(searchString, false) > 0 ) )) { setItemEnabled(id, true); foundSomething = true; @@ -951,7 +951,7 @@ void PanelServiceMenu::setSearchString(const TQString &searchString) /*for (int i=count()-1; i>=0; --i) { int id = idAt(i); TQString menuText = text(id); - if (menuText.tqcontains(searchString, false) > 0) { + if (menuText.contains(searchString, false) > 0) { setItemEnabled(id, true); foundSomething = true; nonemptyMenus.insert(id); @@ -995,7 +995,7 @@ void PanelServiceMenu::updateRecentlyUsedApps(KService::Ptr &service) TQString strItem(service->desktopEntryPath()); // don't add an item from root kmenu level - if (!strItem.tqcontains('/')) + if (!strItem.contains('/')) { return; } diff --git a/kicker/libkicker/global.cpp b/kicker/libkicker/global.cpp index 67f280106..3265c428c 100644 --- a/kicker/libkicker/global.cpp +++ b/kicker/libkicker/global.cpp @@ -207,7 +207,7 @@ TQPopupMenu* reduceMenu(TQPopupMenu *menu) return menu; } - TQMenuItem *item = menu->tqfindItem(menu->idAt(0)); + TQMenuItem *item = menu->findItem(menu->idAt(0)); if (item->popup()) { diff --git a/kicker/libkicker/panelbutton.cpp b/kicker/libkicker/panelbutton.cpp index f5e35a2ad..4d60068a8 100644 --- a/kicker/libkicker/panelbutton.cpp +++ b/kicker/libkicker/panelbutton.cpp @@ -978,7 +978,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e) if (e->type() == TQEvent::MouseMove) { TQMouseEvent *me = TQT_TQMOUSEEVENT(e); - if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos())) && + if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos())) && ((me->state() & ControlButton) != 0 || (me->state() & ShiftButton) != 0)) { @@ -990,7 +990,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e) e->type() == TQEvent::MouseButtonDblClick) { TQMouseEvent *me = TQT_TQMOUSEEVENT(e); - if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos()))) + if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos()))) { m_pressedDuringPopup = true; return true; @@ -999,7 +999,7 @@ bool PanelPopupButton::eventFilter(TQObject *, TQEvent *e) else if (e->type() == TQEvent::MouseButtonRelease) { TQMouseEvent *me = TQT_TQMOUSEEVENT(e); - if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(me->globalPos()))) + if (TQT_TQRECT_OBJECT(rect()).contains(mapFromGlobal(me->globalPos()))) { if (m_pressedDuringPopup && m_popup) { diff --git a/kicker/menuext/kate/katesessionmenu.cpp b/kicker/menuext/kate/katesessionmenu.cpp index 860f6d04a..7326d8fb0 100644 --- a/kicker/menuext/kate/katesessionmenu.cpp +++ b/kicker/menuext/kate/katesessionmenu.cpp @@ -124,7 +124,7 @@ void KateSessionMenu::slotExec( int id ) "kate_session_button_create_anonymous" ) == KMessageBox::No ) return; - if ( m_sessions.tqcontains( name ) && + if ( m_sessions.contains( name ) && KMessageBox::warningYesNo( 0, i18n("You allready have a session named %1. Do you want to open that session?").arg( name ), i18n("Session exists") ) == KMessageBox::No ) diff --git a/kicker/menuext/konsole/konsolebookmarkmenu.cpp b/kicker/menuext/konsole/konsolebookmarkmenu.cpp index b53899a89..1643195e8 100644 --- a/kicker/menuext/konsole/konsolebookmarkmenu.cpp +++ b/kicker/menuext/konsole/konsolebookmarkmenu.cpp @@ -112,7 +112,7 @@ void KonsoleBookmarkMenu::fillBookmarkMenu() bm = parentBookmark.next(bm) ) { TQString text = bm.text(); - text.tqreplace( '&', "&&" ); + text.replace( '&', "&&" ); if ( !separatorInserted && m_bIsRoot) { // inserted before the first konq bookmark, to avoid the separator if no konq bookmark m_parentMenu->insertSeparator(); separatorInserted = true; diff --git a/kicker/menuext/prefmenu/prefmenu.cpp b/kicker/menuext/prefmenu/prefmenu.cpp index 3b68c0529..3f50e5275 100644 --- a/kicker/menuext/prefmenu/prefmenu.cpp +++ b/kicker/menuext/prefmenu/prefmenu.cpp @@ -84,7 +84,7 @@ void PrefMenu::insertMenuItem(KService::Ptr& s, if (KickerSettings::menuEntryFormat() == KickerSettings::NameAndDescription) { if (!suppressGenericNames || - !suppressGenericNames->tqcontains(s->untranslatedGenericName())) + !suppressGenericNames->contains(s->untranslatedGenericName())) { serviceName = TQString("%1 (%2)").arg(serviceName).arg(comment); } @@ -120,7 +120,7 @@ void PrefMenu::insertMenuItem(KService::Ptr& s, // item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. - serviceName.tqreplace("&", "&&"); + serviceName.replace("&", "&&"); int newId = insertItem(KickerLib::menuIconSet(s->icon()), serviceName, nId, nIndex); m_entryMap.insert(newId, static_cast(s)); @@ -155,7 +155,7 @@ void PrefMenu::mouseMoveEvent(TQMouseEvent * ev) return; } - if (!m_entryMap.tqcontains(id)) + if (!m_entryMap.contains(id)) { kdDebug(1210) << "Cannot find service with menu id " << id << endl; return; @@ -224,7 +224,7 @@ void PrefMenu::dragEnterEvent(TQDragEnterEvent *event) void PrefMenu::dragLeaveEvent(TQDragLeaveEvent */*event*/) { // see PrefMenu::dragEnterEvent why this is nescessary - if (!TQT_TQRECT_OBJECT(frameGeometry()).tqcontains(TQCursor::pos())) + if (!TQT_TQRECT_OBJECT(frameGeometry()).contains(TQCursor::pos())) { KURLDrag::setTarget(0); } @@ -297,7 +297,7 @@ void PrefMenu::initialize() // Item names may contain ampersands. To avoid them being converted // to accelerators, replace each ampersand with two ampersands. - groupCaption.tqreplace("&", "&&"); + groupCaption.replace("&", "&&"); PrefMenu* m = new PrefMenu(g->name(), g->relPath(), this); m->setCaption(groupCaption); @@ -323,7 +323,7 @@ void PrefMenu::initialize() void PrefMenu::slotExec(int id) { - if (!m_entryMap.tqcontains(id)) + if (!m_entryMap.contains(id)) { return; } diff --git a/kicker/menuext/recentdocs/recentdocsmenu.cpp b/kicker/menuext/recentdocs/recentdocsmenu.cpp index 381ce3fa9..cb26e4cae 100644 --- a/kicker/menuext/recentdocs/recentdocsmenu.cpp +++ b/kicker/menuext/recentdocs/recentdocsmenu.cpp @@ -72,17 +72,17 @@ void RecentDocsMenu::initialize() { // Make sure this entry is not already present in the menu alreadyPresentInMenu = 0; for ( TQStringList::Iterator previt = previousEntries.begin(); previt != previousEntries.end(); ++previt ) { - if (TQString::localeAwareCompare(*previt, f.readName().tqreplace('&', TQString::fromAscii("&&") )) == 0) { + if (TQString::localeAwareCompare(*previt, f.readName().replace('&', TQString::fromAscii("&&") )) == 0) { alreadyPresentInMenu = 1; } } if (alreadyPresentInMenu == 0) { // Add item to menu - insertItem(SmallIconSet(f.readIcon()), f.readName().tqreplace('&', TQString::fromAscii("&&") ), id++); + insertItem(SmallIconSet(f.readIcon()), f.readName().replace('&', TQString::fromAscii("&&") ), id++); // Append to duplicate checking list - previousEntries.append(f.readName().tqreplace('&', TQString::fromAscii("&&") )); + previousEntries.append(f.readName().replace('&', TQString::fromAscii("&&") )); } } @@ -114,7 +114,7 @@ void RecentDocsMenu::mouseMoveEvent(TQMouseEvent* e) { if (!(e->state() & Qt::LeftButton)) return; - if (!TQT_TQRECT_OBJECT(rect()).tqcontains(_mouseDown)) + if (!TQT_TQRECT_OBJECT(rect()).contains(_mouseDown)) return; int dragLength = (e->pos() - _mouseDown).manhattanLength(); diff --git a/kicker/menuext/remote/remotemenu.cpp b/kicker/menuext/remote/remotemenu.cpp index 3547e3f9b..c09f9a825 100644 --- a/kicker/menuext/remote/remotemenu.cpp +++ b/kicker/menuext/remote/remotemenu.cpp @@ -93,7 +93,7 @@ void RemoteMenu::initialize() for(; name!=endf; ++name) { - if (!names_found.tqcontains(*name)) + if (!names_found.contains(*name)) { names_found.append(*name); TQString filename = *dirpath+*name; @@ -124,7 +124,7 @@ void RemoteMenu::openRemoteDir() void RemoteMenu::slotExec(int id) { - if (m_desktopMap.tqcontains(id)) + if (m_desktopMap.contains(id)) { new KRun(m_desktopMap[id]); } diff --git a/kicker/menuext/system/systemmenu.cpp b/kicker/menuext/system/systemmenu.cpp index 33eba2558..12ec087d8 100644 --- a/kicker/menuext/system/systemmenu.cpp +++ b/kicker/menuext/system/systemmenu.cpp @@ -77,7 +77,7 @@ void SystemMenu::initialize() void SystemMenu::slotExec(int id) { - if(!m_urlMap.tqcontains(id)) return; + if(!m_urlMap.contains(id)) return; new KRun(m_urlMap[id]); // will delete itself } diff --git a/kicker/menuext/tom/tom.cc b/kicker/menuext/tom/tom.cc index 24ab027a8..f2689bc1f 100644 --- a/kicker/menuext/tom/tom.cc +++ b/kicker/menuext/tom/tom.cc @@ -239,7 +239,7 @@ void TOM::initializeRecentDocs() KDesktopFile f(*it, true /* read only */); m_recentDocsMenu->insertItem(DesktopIcon(f.readIcon(), KIcon::SizeMedium), - f.readName().tqreplace('&', "&&"), id); + f.readName().replace('&', "&&"), id); ++id; } } @@ -302,7 +302,7 @@ int TOM::appendTaskGroup(KConfig& config, bool inSubMenu) TQString name = config.readEntry("Name"); // in case the name contains an ampersand, double 'em up - name.tqreplace("&", "&&"); + name.replace("&", "&&"); TQString desktopfile = config.readPathEntry("DesktopFile"); KService::Ptr pService = KService::serviceByDesktopPath(desktopfile); @@ -551,10 +551,10 @@ void TOM::initialize() if (userInfo) { username = TQString::fromLocal8Bit(userInfo->pw_gecos); - if (username.tqfind(',') != -1) + if (username.find(',') != -1) { // Remove everything from and including first comma - username.truncate(username.tqfind(',')); + username.truncate(username.find(',')); } if (username.isEmpty()) @@ -583,7 +583,7 @@ void TOM::contextualizeRMBmenu(KPopupMenu* menu, int menuItem, TQPopupMenu* ctxM ctxMenu->removeItem(contextMenuTitleID); TQString text = menu->text(menuItem); - int parens = text.tqfind('(') - 1; + int parens = text.find('(') - 1; if (parens > 0) { text = text.left(parens); @@ -775,7 +775,7 @@ TQMouseEvent TOM::translateMouseEvent( TQMouseEvent* e ) { TQRect side = sideImageRect(); - if ( !side.tqcontains( e->pos() ) ) + if ( !side.contains( e->pos() ) ) return *e; TQPoint newpos( e->pos() ); @@ -824,7 +824,7 @@ void TOM::runCommand() void TOM::runTask(int id) { - if (!m_tasks.tqcontains(id)) return; + if (!m_tasks.contains(id)) return; kapp->propagateSessionManager(); KApplication::startServiceByDesktopPath(m_tasks[id]->desktopEntryPath(), diff --git a/kicker/taskbar/taskbar.cpp b/kicker/taskbar/taskbar.cpp index 33109c576..4da304daf 100644 --- a/kicker/taskbar/taskbar.cpp +++ b/kicker/taskbar/taskbar.cpp @@ -358,7 +358,7 @@ void TaskBar::add(Startup::Ptr startup) it != containers.end(); ++it) { - if ((*it)->tqcontains(startup)) + if ((*it)->contains(startup)) { return; } @@ -372,7 +372,7 @@ void TaskBar::add(Startup::Ptr startup) void TaskBar::showTaskContainer(TaskContainer* container) { - TaskContainer::List::iterator it = m_hiddenContainers.tqfind(container); + TaskContainer::List::iterator it = m_hiddenContainers.find(container); if (it != m_hiddenContainers.end()) { m_hiddenContainers.erase(it); @@ -432,7 +432,7 @@ void TaskBar::remove(Task::Ptr task, TaskContainer* container) it != m_hiddenContainers.end(); ++it) { - if ((*it)->tqcontains(task)) + if ((*it)->contains(task)) { (*it)->finish(); m_deletableContainers.append(*it); @@ -447,7 +447,7 @@ void TaskBar::remove(Task::Ptr task, TaskContainer* container) it != containers.end(); ++it) { - if ((*it)->tqcontains(task)) + if ((*it)->contains(task)) { container = *it; break; @@ -464,7 +464,7 @@ void TaskBar::remove(Task::Ptr task, TaskContainer* container) if (container->isEmpty()) { - TaskContainer::List::iterator it = containers.tqfind(container); + TaskContainer::List::iterator it = containers.find(container); if (it != containers.end()) { containers.erase(it); @@ -490,7 +490,7 @@ void TaskBar::remove(Startup::Ptr startup, TaskContainer* container) it != m_hiddenContainers.end(); ++it) { - if ((*it)->tqcontains(startup)) + if ((*it)->contains(startup)) { (*it)->remove(startup); @@ -511,7 +511,7 @@ void TaskBar::remove(Startup::Ptr startup, TaskContainer* container) it != containers.end(); ++it) { - if ((*it)->tqcontains(startup)) + if ((*it)->contains(startup)) { container = *it; break; @@ -530,7 +530,7 @@ void TaskBar::remove(Startup::Ptr startup, TaskContainer* container) return; } - TaskContainer::List::iterator it = containers.tqfind(container); + TaskContainer::List::iterator it = containers.find(container); if (it != containers.end()) { containers.erase(it); @@ -580,7 +580,7 @@ void TaskBar::windowChanged(Task::Ptr task) { TaskContainer* c = *it; - if (c->tqcontains(task)) + if (c->contains(task)) { container = c; break; @@ -620,7 +620,7 @@ void TaskBar::windowChangedGeometry(Task::Ptr task) ++it) { TaskContainer* c = *it; - if (c->tqcontains(task)) + if (c->contains(task)) { container = c; break; diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp index 7da0cd50e..5b084a962 100644 --- a/kicker/taskbar/taskcontainer.cpp +++ b/kicker/taskbar/taskcontainer.cpp @@ -390,7 +390,7 @@ void TaskContainer::remove(Startup::Ptr startup) } } -bool TaskContainer::tqcontains(Task::Ptr task) +bool TaskContainer::contains(Task::Ptr task) { if (!task) { @@ -408,12 +408,12 @@ bool TaskContainer::tqcontains(Task::Ptr task) return false; } -bool TaskContainer::tqcontains(Startup::Ptr startup) +bool TaskContainer::contains(Startup::Ptr startup) { return startup && (m_startup == startup); } -bool TaskContainer::tqcontains(WId win) +bool TaskContainer::contains(WId win) { Task::List::iterator itEnd = tasks.end(); for (Task::List::iterator it = tasks.begin(); it != itEnd; ++it) @@ -638,7 +638,7 @@ void TaskContainer::drawButton(TQPainter *p) // modified overlay static TQString modStr = "[" + i18n( "modified" ) + "]"; - int modStrPos = text.tqfind( modStr ); + int modStrPos = text.find( modStr ); int textPos = ( taskBar->showIcon() && (!pixmap.isNull() || m_startup)) ? 2 + 16 + 2 : 0; if (modStrPos >= 0) @@ -944,7 +944,7 @@ void TaskContainer::mouseReleaseEvent(TQMouseEvent *e) // This is to avoid the flicker caused by redrawing the // button as unpressed just before it's activated. - if (!TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos())) + if (!TQT_TQRECT_OBJECT(rect()).contains(e->pos())) { TQToolButton::mouseReleaseEvent(e); return; @@ -1623,7 +1623,7 @@ void TaskContainer::updateKickerTip(KickerTip::Data& data) details.append(i18n("Has unsaved changes")); static TQString modStr = "[" + i18n( "modified" ) + "]"; - int modStrPos = name.tqfind(modStr); + int modStrPos = name.find(modStr); if (modStrPos >= 0) { diff --git a/kicker/taskbar/taskcontainer.h b/kicker/taskbar/taskcontainer.h index 4d2e0de9b..8dfdf6d2d 100644 --- a/kicker/taskbar/taskcontainer.h +++ b/kicker/taskbar/taskcontainer.h @@ -57,9 +57,9 @@ public: void remove(Task::Ptr); void remove(Startup::Ptr); - bool tqcontains(Task::Ptr); - bool tqcontains(Startup::Ptr); - bool tqcontains(WId); + bool contains(Task::Ptr); + bool contains(Startup::Ptr); + bool contains(WId); bool isEmpty(); bool onCurrentDesktop(); diff --git a/kicker/taskmanager/tasklmbmenu.cpp b/kicker/taskmanager/tasklmbmenu.cpp index fd344f0d2..af7f6e854 100644 --- a/kicker/taskmanager/tasklmbmenu.cpp +++ b/kicker/taskmanager/tasklmbmenu.cpp @@ -111,7 +111,7 @@ void TaskLMBMenu::fillMenu() { Task::Ptr t = (*it); - TQString text = t->visibleName().tqreplace("&", "&&"); + TQString text = t->visibleName().replace("&", "&&"); TaskMenuItem *menuItem = new TaskMenuItem(text, t->isActive(), diff --git a/kicker/taskmanager/taskmanager.cpp b/kicker/taskmanager/taskmanager.cpp index 103205042..3b2316e4d 100644 --- a/kicker/taskmanager/taskmanager.cpp +++ b/kicker/taskmanager/taskmanager.cpp @@ -247,9 +247,9 @@ Task::Ptr TaskManager::findTask(int desktop, const TQPoint& p) continue; } - if (t->geometry().tqcontains(p)) + if (t->geometry().contains(p)) { - int index = list.tqfindIndex(t->window()); + int index = list.findIndex(t->window()); if (index > currentIndex) { currentIndex = index; @@ -295,7 +295,7 @@ void TaskManager::windowAdded(WId w ) WId transient_for = (WId) transient_for_tmp; // check if it's transient for a skiptaskbar window - if( _skiptaskbar_windows.tqcontains( transient_for )) + if( _skiptaskbar_windows.contains( transient_for )) return; // lets see if this is a transient for an existing task @@ -807,7 +807,7 @@ bool Task::isModified() const static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]"); - int modStrPos = _info.visibleName().tqfind(modStr); + int modStrPos = _info.visibleName().find(modStr); return ( modStrPos != -1 ); } @@ -831,7 +831,7 @@ void Task::updateDemandsAttentionState( WId w ) NETWinInfo i( qt_xdisplay(), w, qt_xrootwin(), NET::WMState ); if(i.state() & NET::DemandsAttention) { - if (!_transients_demanding_attention.tqcontains(w)) + if (!_transients_demanding_attention.contains(w)) { _transients_demanding_attention.append(w); } @@ -984,10 +984,10 @@ bool Task::idMatch( const TQString& id1, const TQString& id2 ) if ( id1.isEmpty() || id2.isEmpty() ) return false; - if ( id1.tqcontains( id2 ) > 0 ) + if ( id1.contains( id2 ) > 0 ) return true; - if ( id2.tqcontains( id1 ) > 0 ) + if ( id2.contains( id1 ) > 0 ) return true; return false; diff --git a/kicker/taskmanager/taskmanager.h b/kicker/taskmanager/taskmanager.h index a12a062d1..ddd5327d2 100644 --- a/kicker/taskmanager/taskmanager.h +++ b/kicker/taskmanager/taskmanager.h @@ -282,7 +282,7 @@ public: //* @internal void removeTransient( WId w ); //* @internal - bool hasTransient(WId w) const { return _transients.tqfind(w) != _transients.end(); } + bool hasTransient(WId w) const { return _transients.find(w) != _transients.end(); } //* @internal void updateDemandsAttentionState( WId w ); //* @internal diff --git a/kicker/taskmanager/taskrmbmenu.cpp b/kicker/taskmanager/taskrmbmenu.cpp index bb5ee6035..fb4c9ae87 100644 --- a/kicker/taskmanager/taskrmbmenu.cpp +++ b/kicker/taskmanager/taskrmbmenu.cpp @@ -236,7 +236,7 @@ TQPopupMenu* TaskRMBMenu::makeDesktopsMenu(Task::Ptr t) m->insertSeparator(); for (int i = 1; i <= TaskManager::the()->numberOfDesktops(); i++) { - TQString name = TQString("&%1 %2").arg(i).arg(TaskManager::the()->desktopName(i).tqreplace('&', "&&")); + TQString name = TQString("&%1 %2").arg(i).arg(TaskManager::the()->desktopName(i).replace('&', "&&")); id = m->insertItem( name, t, TQT_SLOT( toDesktop(int) ) ); m->setItemParameter( id, i ); m->setItemChecked( id, !t->isOnAllDesktops() && t->desktop() == i ); @@ -256,7 +256,7 @@ TQPopupMenu* TaskRMBMenu::makeDesktopsMenu() m->insertSeparator(); for (int i = 1; i <= TaskManager::the()->numberOfDesktops(); i++) { - TQString name = TQString("&%1 %2").arg(i).arg(TaskManager::the()->desktopName(i).tqreplace('&', "&&")); + TQString name = TQString("&%1 %2").arg(i).arg(TaskManager::the()->desktopName(i).replace('&', "&&")); id = m->insertItem( name, this, TQT_SLOT( slotAllToDesktop(int) ) ); m->setItemParameter( id, i ); } diff --git a/kioslave/cgi/cgi.cpp b/kioslave/cgi/cgi.cpp index 7af02aa58..7c92a1a76 100644 --- a/kioslave/cgi/cgi.cpp +++ b/kioslave/cgi/cgi.cpp @@ -117,7 +117,7 @@ void CgiProtocol::get( const KURL& url ) TQString file; - int pos = path.tqfindRev('/'); + int pos = path.findRev('/'); if ( pos >= 0 ) file = path.mid( pos + 1 ); else file = path; @@ -190,8 +190,8 @@ void CgiProtocol::get( const KURL& url ) // Access the buffer in-place by using setRawData() output.setRawData( buffer, n ); - int colon = output.tqfind( ':' ); - int newline = output.tqfind( '\n' ); + int colon = output.find( ':' ); + int newline = output.find( '\n' ); int semicolon = qByteArrayFindRev( output, ';', newline ); int end; if ( semicolon < 0 ) end = newline; diff --git a/kioslave/finger/kio_finger.cpp b/kioslave/finger/kio_finger.cpp index a8ea0b844..4e62b6bb5 100644 --- a/kioslave/finger/kio_finger.cpp +++ b/kioslave/finger/kio_finger.cpp @@ -112,7 +112,7 @@ void FingerProtocol::get(const KURL& url ) // Check the validity of the query TQRegExp regExp("?refreshRate=[0-9][0-9]*", true, true); - if (query.tqcontains(regExp)) { + if (query.contains(regExp)) { //kdDebug() << "looks like a valid query" << endl; TQRegExp regExp( "([0-9]+)" ); regExp.search(query); diff --git a/kioslave/fish/fish.cpp b/kioslave/fish/fish.cpp index 7290d13c6..2f0210dbd 100644 --- a/kioslave/fish/fish.cpp +++ b/kioslave/fish/fish.cpp @@ -558,7 +558,7 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { buf.truncate(buf.length()-1); myDebug( << "establishing: got " << buf << endl); - while (childPid && ((pos = buf.tqfind('\n')) >= 0 || + while (childPid && ((pos = buf.find('\n')) >= 0 || buf.endsWith(":") || buf.endsWith("?"))) { pos++; TQString str = buf.left(pos); @@ -738,11 +738,11 @@ bool fishProtocol::sendCommand(fish_command_type cmd, ...) { TQString arg(va_arg(list, const char *)); int pos = -2; while ((pos = rx.search(arg,pos+2)) >= 0) { - arg.tqreplace(pos,0,TQString("\\")); + arg.replace(pos,0,TQString("\\")); } //myDebug( << "arg " << i << ": " << arg << endl); realCmd.append(" ").append(arg); - realAlt.tqreplace(TQRegExp("%"+TQString::number(i+1)),arg); + realAlt.replace(TQRegExp("%"+TQString::number(i+1)),arg); } TQString s("#"); s.append(realCmd).append("\n ").append(realAlt).append(" 2>&1;echo '### 000'\n"); @@ -790,7 +790,7 @@ int fishProtocol::makeTimeFromLs(const TQString &monthStr, const TQString &daySt break; } - int pos = timeyearStr.tqfind(':'); + int pos = timeyearStr.find(':'); if (timeyearStr.length() == 4 && pos == -1) { year = timeyearStr.toInt(); } else if (pos == -1) { @@ -820,7 +820,7 @@ void fishProtocol::manageConnection(const TQString &l) { case FISH_VER: if (line.startsWith("VER 0.0.3")) { line.append(" "); - hasAppend = line.tqcontains(" append "); + hasAppend = line.contains(" append "); } else { error(ERR_UNSUPPORTED_PROTOCOL,line); shutdownConnection(); @@ -897,7 +897,7 @@ void fishProtocol::manageConnection(const TQString &l) { atom.m_uds = UDS_USER; atom.m_long = 0; - pos = line.tqfind('.',12); + pos = line.find('.',12); if (pos < 0) { errorCount++; break; @@ -913,8 +913,8 @@ void fishProtocol::manageConnection(const TQString &l) { case 'd': atom.m_uds = UDS_MODIFICATION_TIME; - pos = line.tqfind(' '); - pos2 = line.tqfind(' ',pos+1); + pos = line.find(' '); + pos2 = line.find(' ',pos+1); if (pos < 0 || pos2 < 0) break; errorCount--; atom.m_long = makeTimeFromLs(line.mid(1,pos-1), line.mid(pos+1,pos2-pos), line.mid(pos2+1)); @@ -923,14 +923,14 @@ void fishProtocol::manageConnection(const TQString &l) { case 'D': atom.m_uds = UDS_MODIFICATION_TIME; - pos = line.tqfind(' '); - pos2 = line.tqfind(' ',pos+1); - pos3 = line.tqfind(' ',pos2+1); + pos = line.find(' '); + pos2 = line.find(' ',pos+1); + pos3 = line.find(' ',pos2+1); if (pos < 0 || pos2 < 0 || pos3 < 0) break; dt.setDate(TQDate(line.mid(1,pos-1).toInt(),line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt())); pos = pos3; - pos2 = line.tqfind(' ',pos+1); - pos3 = line.tqfind(' ',pos2+1); + pos2 = line.find(' ',pos+1); + pos3 = line.find(' ',pos2+1); if (pos < 0 || pos2 < 0 || pos3 < 0) break; dt.setTime(TQTime(line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt(),line.mid(pos3+1).toInt())); errorCount--; @@ -953,7 +953,7 @@ void fishProtocol::manageConnection(const TQString &l) { case ':': atom.m_uds = UDS_NAME; atom.m_long = 0; - pos = line.tqfindRev('/'); + pos = line.findRev('/'); atom.m_str = thisFn = line.mid(pos < 0?1:pos+1); if (fishCommand == FISH_LIST) udsEntry.append(atom); @@ -981,7 +981,7 @@ void fishProtocol::manageConnection(const TQString &l) { // This is getting ugly. file(1) makes some uneducated // guesses, so we must try to ignore them (#51274) else if (mimeAtom.m_str.isEmpty() && line.right(8) != "/unknown" && - (thisFn.tqfind('.') < 0 || (line.left(8) != "Mtext/x-" + (thisFn.find('.') < 0 || (line.left(8) != "Mtext/x-" && line != "Mtext/plain"))) { mimeAtom.m_str = type; } @@ -1186,7 +1186,7 @@ void fishProtocol::writeStdin(const TQString &line) if (writeReady) { writeReady = false; - //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().tqfind('\n')) << endl); + //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().find('\n')) << endl); myDebug( << "Writing: " << qlist.first() << endl); myDebug( << "---------" << endl); writeChild((const char *)qlist.first().latin1(), qlist.first().length()); @@ -1218,7 +1218,7 @@ void fishProtocol::sent() if (qlist.count() == 0) { writeReady = true; } else { - //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().tqfind('\n')) << endl); + //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().find('\n')) << endl); myDebug( << "Writing: " << qlist.first() << endl); myDebug( << "---------" << endl); writeChild((const char *)qlist.first().latin1(),qlist.first().length()); @@ -1364,7 +1364,7 @@ void fishProtocol::finished() { udsEntry.clear(); udsStatEntry.clear(); writeStdin(commandList.first()); - //if (fishCommand != FISH_APPEND && fishCommand != FISH_WRITE) infoMessage("Sending "+(commandList.first().mid(1,commandList.first().tqfind("\n")-1))+"..."); + //if (fishCommand != FISH_APPEND && fishCommand != FISH_WRITE) infoMessage("Sending "+(commandList.first().mid(1,commandList.first().find("\n")-1))+"..."); commandList.remove(commandList.begin()); commandCodes.remove(commandCodes.begin()); } else { diff --git a/kioslave/floppy/kio_floppy.cpp b/kioslave/floppy/kio_floppy.cpp index bd24aca0c..a0c68a9d2 100644 --- a/kioslave/floppy/kio_floppy.cpp +++ b/kioslave/floppy/kio_floppy.cpp @@ -195,51 +195,51 @@ bool FloppyProtocol::stopAfterError(const KURL& url, const TQString& drive) TQTextIStream output(&outputString); TQString line=output.readLine(); kdDebug(7101)<<"line: -"< -1) + if (line.find("resource busy") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access drive %1.\nThe drive is still busy.\nWait until it is inactive and then try again.").arg(drive)); } - else if ((line.tqfind("Disk full") > -1) || (line.tqfind("No free cluster") > -1)) + else if ((line.find("Disk full") > -1) || (line.find("No free cluster") > -1)) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not write to file %1.\nThe disk in drive %2 is probably full.").arg(url.prettyURL(),drive)); } //file not found - else if (line.tqfind("not found") > -1) + else if (line.find("not found") > -1) { error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL()); } //no disk - else if (line.tqfind("not configured") > -1) + else if (line.find("not configured") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2").arg(url.prettyURL(),drive)); } - else if (line.tqfind("No such device") > -1) + else if (line.find("No such device") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2 or you do not have enough permissions to access the drive.").arg(url.prettyURL(),drive)); } - else if (line.tqfind("not supported") > -1) + else if (line.find("not supported") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe drive %2 is not supported.").arg(url.prettyURL(),drive)); } //not supported or no such drive - else if (line.tqfind("Permission denied") > -1) + else if (line.find("Permission denied") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nMake sure the floppy in drive %2 is a DOS-formatted floppy disk \nand that the permissions of the device file (e.g. /dev/fd0) are set correctly (e.g. rwxrwxrwx).").arg(url.prettyURL(),drive)); } - else if (line.tqfind("non DOS media") > -1) + else if (line.find("non DOS media") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe disk in drive %2 is probably not a DOS-formatted floppy disk.").arg(url.prettyURL(),drive)); } - else if (line.tqfind("Read-only") > -1) + else if (line.find("Read-only") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Access denied.\nCould not write to %1.\nThe disk in drive %2 is probably write-protected.").arg(url.prettyURL(),drive)); } - else if ((outputString.tqfind("already exists") > -1) || (outputString.tqfind("Skipping ") > -1)) + else if ((outputString.find("already exists") > -1) || (outputString.find("Skipping ") > -1)) { error( KIO::ERR_FILE_ALREADY_EXIST,url.prettyURL()); //return false; } - else if (outputString.tqfind("could not read boot sector") > -1) + else if (outputString.find("could not read boot sector") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not read boot sector for %1.\nThere is probably not any disk in drive %2.").arg(url.prettyURL(),drive)); //return false; @@ -404,7 +404,7 @@ StatInfo FloppyProtocol::createStatInfo(const TQString line, bool makeStat, cons if (line.length()==41) { - int nameLength=line.tqfind(' '); + int nameLength=line.find(' '); kdDebug(7101)<<"Floppy::createStatInfo: line find: "<0) { @@ -669,7 +669,7 @@ int FloppyProtocol::freeSpace(const KURL& url) while (!output.atEnd()) { line=output.readLine(); - if (line.tqfind("bytes free")==36) + if (line.find("bytes free")==36) { TQString tmp=line.mid(24,3); tmp=tmp.stripWhiteSpace(); diff --git a/kioslave/home/homeimpl.cpp b/kioslave/home/homeimpl.cpp index 6f4f86759..9d6d0d5bd 100644 --- a/kioslave/home/homeimpl.cpp +++ b/kioslave/home/homeimpl.cpp @@ -37,7 +37,7 @@ bool HomeImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { TQString url_path = url.path(); - int i = url_path.tqfind('/', 1); + int i = url_path.find('/', 1); if (i > 0) { name = url_path.mid(1, i-1); @@ -90,7 +90,7 @@ bool HomeImpl::listHomes(TQValueList &list) for(; it!=users_end; ++it) { if ((*it).uid()>=MINIMUM_UID - && !uid_list.tqcontains( (*it).uid() ) ) + && !uid_list.contains( (*it).uid() ) ) { uid_list.append( (*it).uid() ); KIO::UDSEntry entry; diff --git a/kioslave/home/kdedmodule/homedirnotify.cpp b/kioslave/home/kdedmodule/homedirnotify.cpp index f2da9fcf7..823027fe2 100644 --- a/kioslave/home/kdedmodule/homedirnotify.cpp +++ b/kioslave/home/kdedmodule/homedirnotify.cpp @@ -53,7 +53,7 @@ void HomeDirNotify::init() for(; it!=users_end; ++it) { if ((*it).uid()>=MINIMUM_UID - && !uid_list.tqcontains( (*it).uid() ) ) + && !uid_list.contains( (*it).uid() ) ) { uid_list.append( (*it).uid() ); @@ -147,7 +147,7 @@ inline void evil_hack(const KURL::List &list) { KURL url = (*it).upURL(); - if (!notified.tqcontains(url)) + if (!notified.contains(url)) { notifier.FilesAdded(url); notified.append(url); diff --git a/kioslave/info/info.cc b/kioslave/info/info.cc index 418600ffa..ab35f282b 100644 --- a/kioslave/info/info.cc +++ b/kioslave/info/info.cc @@ -93,7 +93,7 @@ void InfoProtocol::get( const KURL& url ) decodeURL( url ); TQString path = KGlobal::iconLoader()->iconPath("up", KIcon::Toolbar, true); - int revindex = path.tqfindRev('/'); + int revindex = path.findRev('/'); path = path.left(revindex); TQString cmd = KProcess::quote(m_perl); @@ -205,7 +205,7 @@ void InfoProtocol::decodePath( TQString path ) } //kdDebug( 7108 ) << "Path: " << path << endl; - int slashPos = path.tqfind( "/" ); + int slashPos = path.find( "/" ); if( slashPos < 0 ) { diff --git a/kioslave/ldap/kio_ldap.cpp b/kioslave/ldap/kio_ldap.cpp index 92299b7a6..742d788bf 100644 --- a/kioslave/ldap/kio_ldap.cpp +++ b/kioslave/ldap/kio_ldap.cpp @@ -390,11 +390,11 @@ void LDAPProtocol::LDAPEntry2UDSEntry( const TQString &dn, UDSEntry &entry, atom.m_uds = UDS_NAME; atom.m_long = 0; TQString name = dn; - if ( (pos = name.tqfind(",")) > 0 ) + if ( (pos = name.find(",")) > 0 ) name = name.left( pos ); - if ( (pos = name.tqfind("=")) > 0 ) + if ( (pos = name.find("=")) > 0 ) name.remove( 0, pos+1 ); - name.tqreplace(' ', "_"); + name.replace(' ', "_"); if ( !dir ) name += ".ldif"; atom.m_str = name; entry.append( atom ); diff --git a/kioslave/mac/kio_mac.cpp b/kioslave/mac/kio_mac.cpp index 21b998ad1..245af6fcf 100644 --- a/kioslave/mac/kio_mac.cpp +++ b/kioslave/mac/kio_mac.cpp @@ -86,8 +86,8 @@ void MacProtocol::get(const KURL& url) { //find out if a mode has been specified in the query e.g. ?mode=t //or if it's a text file then set the mode to text - int modepos = query.tqfind("mode="); - int textpos = mime.tqfind("text"); + int modepos = query.find("mode="); + int textpos = mime.find("text"); if (modepos != -1) { mode += query.mid(modepos + 5, 1); if (mode != "-r" && mode != "-b" && mode != "-m" && mode != "-t" && mode != "-a") { @@ -157,7 +157,7 @@ void MacProtocol::listDir(const KURL& url) { while (line != NULL) { //1.0.4 puts this funny line in sometimes, we don't want it - if (line.tqcontains("Thread ") == 0) { + if (line.contains("Thread ") == 0) { entry = makeUDS(line); listEntry(entry, false); } @@ -207,11 +207,11 @@ TQValueList MacProtocol::doStat(const KURL& url) { this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); if (standardOutputStream.isEmpty()) { - filename.tqreplace("\\ ", " "); //get rid of escapes - filename.tqreplace("\\&", "&"); //mm, slashes... - filename.tqreplace("\\!", "!"); - filename.tqreplace("\\(", "("); - filename.tqreplace("\\)", ")"); + filename.replace("\\ ", " "); //get rid of escapes + filename.replace("\\&", "&"); //mm, slashes... + filename.replace("\\!", "!"); + filename.replace("\\(", "("); + filename.replace("\\)", ")"); error(ERR_DOES_NOT_EXIST, filename); } else { //remove trailing \n @@ -242,7 +242,7 @@ TQString MacProtocol::prepareHP(const KURL& url) { KConfig* config = new KConfig("macrc"); TQString query = url.query(); - int modepos = query.tqfind("dev="); + int modepos = query.find("dev="); if (modepos == -1) { //no device specified, read from config or go with #define PARTITION device = config->readEntry("device",PARTITION); @@ -264,7 +264,7 @@ TQString MacProtocol::prepareHP(const KURL& url) { bool version102 = true; - if (standardOutputStream.tqcontains("options") != 0) { + if (standardOutputStream.contains("options") != 0) { version102 = false; } @@ -297,15 +297,15 @@ TQString MacProtocol::prepareHP(const KURL& url) { //escape any funny characters //TODO are there any more characters to escape? - path.tqreplace(" ", "\\ "); - path.tqreplace("&", "\\&"); - path.tqreplace("!", "\\!"); - path.tqreplace("(", "\\("); - path.tqreplace(")", "\\)"); + path.replace(" ", "\\ "); + path.replace("&", "\\&"); + path.replace("!", "\\!"); + path.replace("(", "\\("); + path.replace(")", "\\)"); //then change to the right directory int s; TQString dir; - s = path.tqfind('/'); + s = path.find('/'); while (s != -1) { dir = path.left(s); path = path.mid(s+1); @@ -324,7 +324,7 @@ TQString MacProtocol::prepareHP(const KURL& url) { //clean up delete myKProcess; myKProcess = 0; - s = path.tqfind('/'); + s = path.find('/'); } return path; diff --git a/kioslave/man/kio_man.cpp b/kioslave/man/kio_man.cpp index 20c0d45b8..7cec22c27 100644 --- a/kioslave/man/kio_man.cpp +++ b/kioslave/man/kio_man.cpp @@ -60,17 +60,17 @@ void stripExtension( TQString *name ) { int pos = name->length(); - if ( name->tqfind(".gz", -3) != -1 ) + if ( name->find(".gz", -3) != -1 ) pos -= 3; - else if ( name->tqfind(".z", -2, false) != -1 ) + else if ( name->find(".z", -2, false) != -1 ) pos -= 2; - else if ( name->tqfind(".bz2", -4) != -1 ) + else if ( name->find(".bz2", -4) != -1 ) pos -= 4; - else if ( name->tqfind(".bz", -3) != -1 ) + else if ( name->find(".bz", -3) != -1 ) pos -= 3; if ( pos > 0 ) - pos = name->tqfindRev('.', pos-1); + pos = name->findRev('.', pos-1); if ( pos > 0 ) name->truncate( pos ); @@ -98,7 +98,7 @@ bool parseUrl(const TQString& _url, TQString &title, TQString §ion) title = url; - int pos = url.tqfind('('); + int pos = url.find('('); if (pos < 0) return true; @@ -144,7 +144,7 @@ void MANProtocol::parseWhatIs( TQMap &i, TQTextStream &t, co { TQString names = l.left(pos); TQString descr = l.mid(pos + re.matchedLength()); - while ((pos = names.tqfind(",")) != -1) + while ((pos = names.find(",")) != -1) { i[names.left(pos++)] = descr; while (names[pos] == ' ') @@ -172,9 +172,9 @@ TQMap MANProtocol::buildIndexMap(const TQString §ion) TQStringList man_dirs = manDirectories(); // Supplementary places for whatis databases man_dirs += m_mandbpath; - if (man_dirs.tqfind("/var/cache/man")==man_dirs.end()) + if (man_dirs.find("/var/cache/man")==man_dirs.end()) man_dirs << "/var/cache/man"; - if (man_dirs.tqfind("/var/catman")==man_dirs.end()) + if (man_dirs.find("/var/catman")==man_dirs.end()) man_dirs << "/var/catman"; TQStringList names; @@ -238,14 +238,14 @@ TQStringList MANProtocol::manDirectories() && S_ISDIR( sbuf.st_mode ) ) { const TQString p = TQDir(dir).canonicalPath(); - if (!man_dirs.tqcontains(p)) man_dirs += p; + if (!man_dirs.contains(p)) man_dirs += p; } } } // Untranslated pages in "" const TQString p = TQDir(*it_dir).canonicalPath(); - if (!man_dirs.tqcontains(p)) man_dirs += p; + if (!man_dirs.contains(p)) man_dirs += p; } return man_dirs; } @@ -331,7 +331,7 @@ TQStringList MANProtocol::findPages(const TQString &_section, if (sect.lower()==it_real) it_real = sect; // Only add sect if not already contained, avoid duplicates - if (!sect_list.tqcontains(sect) && _section.isEmpty()) { + if (!sect_list.contains(sect) && _section.isEmpty()) { kdDebug() << "another section " << sect << endl; sect_list += sect; } @@ -425,11 +425,11 @@ static TQString text2html(const TQString& txt) { TQString reply = txt; - reply = reply.tqreplace('&', "&"); - reply = reply.tqreplace('<', "<"); - reply = reply.tqreplace('>', ">"); - reply = reply.tqreplace('"', "&dquot;"); - reply = reply.tqreplace('\'', """); + reply = reply.replace('&', "&"); + reply = reply.replace('<', "<"); + reply = reply.replace('>', ">"); + reply = reply.replace('"', "&dquot;"); + reply = reply.replace('\'', """); return reply; } @@ -534,7 +534,7 @@ char *MANProtocol::readManPage(const char *_filename) * If the path name constains the string sman, assume that it's SGML and * convert it to roff format (used on Solaris). */ //TQString file_mimetype = KMimeType::findByPath(TQString(filename), 0, false)->name(); - if (filename.tqcontains("sman", false)) //file_mimetype == "text/html" || ) + if (filename.contains("sman", false)) //file_mimetype == "text/html" || ) { myStdStream =TQString::null; KProcess proc; @@ -560,14 +560,14 @@ char *MANProtocol::readManPage(const char *_filename) kdDebug(7107) << "relative " << filename << endl; filename = TQDir::cleanDirPath(lastdir + "/" + filename).utf8(); if (!KStandardDirs::exists(filename)) { // exists perhaps with suffix - lastdir = filename.left(filename.tqfindRev('/')); + lastdir = filename.left(filename.findRev('/')); TQDir mandir(lastdir); - mandir.setNameFilter(filename.mid(filename.tqfindRev('/') + 1) + ".*"); + mandir.setNameFilter(filename.mid(filename.findRev('/') + 1) + ".*"); filename = lastdir + "/" + TQFile::encodeName(mandir.entryList().first()); } kdDebug(7107) << "resolved to " << filename << endl; } - lastdir = filename.left(filename.tqfindRev('/')); + lastdir = filename.left(filename.findRev('/')); myStdStream = TQString::null; KProcess proc; @@ -883,7 +883,7 @@ void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_c } } /* sections are not used - else if ( section_regex.tqfind(line, 0) == 0 ) + else if ( section_regex.find(line, 0) == 0 ) { if ( !conf_section.isEmpty() ) conf_section += ':'; @@ -920,7 +920,7 @@ void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_c int i = 0; while (manpaths[i]) { - if ( constr_path.tqfindIndex( TQString( manpaths[i] ) ) == -1 ) + if ( constr_path.findIndex( TQString( manpaths[i] ) ) == -1 ) constr_path += TQString( manpaths[i] ); i++; } @@ -944,35 +944,35 @@ void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_c if ( !mandir.isEmpty() ) { // a path mapping exists - if ( constr_path.tqfindIndex( mandir ) == -1 ) + if ( constr_path.findIndex( mandir ) == -1 ) constr_path += mandir; } else { // no manpath mapping, use "/man" and "/../man" mandir = dir + TQString( "/man" ); - if ( constr_path.tqfindIndex( mandir ) == -1 ) + if ( constr_path.findIndex( mandir ) == -1 ) constr_path += mandir; - int pos = dir.tqfindRev( '/' ); + int pos = dir.findRev( '/' ); if ( pos > 0 ) { mandir = dir.left( pos ) + TQString("/man"); - if ( constr_path.tqfindIndex( mandir ) == -1 ) + if ( constr_path.findIndex( mandir ) == -1 ) constr_path += mandir; } } TQString catmandir = mandb_map[ mandir ]; if ( !mandir.isEmpty() ) { - if ( constr_catmanpath.tqfindIndex( catmandir ) == -1 ) + if ( constr_catmanpath.findIndex( catmandir ) == -1 ) constr_catmanpath += catmandir; } else { // What is the default mapping? catmandir = mandir; - catmandir.tqreplace("/usr/share/","/var/cache/"); - if ( constr_catmanpath.tqfindIndex( catmandir ) == -1 ) + catmandir.replace("/usr/share/","/var/cache/"); + if ( constr_catmanpath.findIndex( catmandir ) == -1 ) constr_catmanpath += catmandir; } } @@ -1001,7 +1001,7 @@ void MANProtocol::checkManPaths() if ( manpath_env.isEmpty() || manpath_env[0] == ':' || manpath_env[manpath_env.length()-1] == ':' - || manpath_env.tqcontains( "::" ) ) + || manpath_env.contains( "::" ) ) { construct_path = true; // need to read config file } @@ -1041,7 +1041,7 @@ void MANProtocol::checkManPaths() if ( !dir.isEmpty() ) { // Add dir to the man path if it exists - if ( m_manpath.tqfindIndex( dir ) == -1 ) { + if ( m_manpath.findIndex( dir ) == -1 ) { if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0 && S_ISDIR( sbuf.st_mode ) ) { @@ -1060,7 +1060,7 @@ void MANProtocol::checkManPaths() dir = (*it2); if ( !dir.isEmpty() ) { - if ( m_manpath.tqfindIndex( dir ) == -1 ) { + if ( m_manpath.findIndex( dir ) == -1 ) { if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0 && S_ISDIR( sbuf.st_mode ) ) { @@ -1080,7 +1080,7 @@ void MANProtocol::checkManPaths() { "1", "2", "3", "4", "5", "6", "7", "8", "9", "n", 0L }; for ( int i = 0; default_sect[i] != 0L; i++ ) - if ( m_mansect.tqfindIndex( TQString( default_sect[i] ) ) == -1 ) + if ( m_mansect.findIndex( TQString( default_sect[i] ) ) == -1 ) m_mansect += TQString( default_sect[i] ); */ @@ -1239,7 +1239,7 @@ void MANProtocol::showIndex(const TQString& section) stripExtension( &fileName ); - pos = fileName.tqfindRev('/'); + pos = fileName.findRev('/'); if (pos > 0) fileName = fileName.mid(pos+1); @@ -1253,7 +1253,7 @@ void MANProtocol::showIndex(const TQString& section) { os << "
" << endl; } @@ -1415,7 +1415,7 @@ void MANProtocol::showIndex(const TQString& section) ((char *)manindex->manpage_begin)[manindex->manpage_len] = '\0'; os << manindex->manpage_begin << "" << endl; last_index = manindex; } @@ -1457,7 +1457,7 @@ void MANProtocol::showIndex(const TQString& section) manindex->manpage_begin[manindex->manpage_len] = '\0'; os << manindex->manpage_begin << "" << endl; last_index = manindex; } diff --git a/kioslave/man/man2html.cpp b/kioslave/man/man2html.cpp index b83fba0a0..c08a51443 100644 --- a/kioslave/man/man2html.cpp +++ b/kioslave/man/man2html.cpp @@ -822,7 +822,7 @@ static void add_links(char *c) e=h+1; sec=f[1]; subsec=f[2]; - int index = fstr.tqfind(')', 2); + int index = fstr.find(')', 2); if (index != -1) subsec = fstr.mid(2, index - 2); else // No closing ')' found, take first character as subsection. @@ -1166,7 +1166,7 @@ static TQCString scan_named_character( char*& c ) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind(']'); + const int result = cstr.find(']'); if ( result == -1 ) name += cstr; else @@ -1198,7 +1198,7 @@ static TQCString scan_named_character( char*& c ) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind('\''); + const int result = cstr.find('\''); if ( result == -1 ) name += cstr; else @@ -1223,7 +1223,7 @@ static TQCString scan_named_character( char*& c ) // Note: characters with a one character length name doe not exist, as they would collide with other escapes // Now we have the name, let us find it between the string names - TQMap::iterator it=s_characterDefinitionMap.tqfind(name); + TQMap::iterator it=s_characterDefinitionMap.find(name); if (it==s_characterDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find character with name: " << name << endl; @@ -1270,7 +1270,7 @@ static TQCString scan_named_string(char*& c) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind(']'); + const int result = cstr.find(']'); if ( result == -1 ) name += cstr; else @@ -1299,7 +1299,7 @@ static TQCString scan_named_string(char*& c) c++; } // Now we have the name, let us find it between the string names - TQMap::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string with name: " << name << endl; @@ -1514,7 +1514,7 @@ static int scan_number_register( char*& c) } else { - TQMap< TQCString, NumberDefinition >::iterator it = s_numberDefinitionMap.tqfind( name ); + TQMap< TQCString, NumberDefinition >::iterator it = s_numberDefinitionMap.find( name ); if ( it == s_numberDefinitionMap.end() ) { return 0; // Undefined variable @@ -1560,7 +1560,7 @@ static TQCString scan_named_font( char*& c ) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind(']'); + const int result = cstr.find(']'); if ( result == -1 ) name += cstr; else @@ -3149,7 +3149,7 @@ static char *scan_request(char *c) int j = nlen; while (c[j] && c[j]==' ' || c[j]=='\t') j++; /* search macro database of self-defined macros */ - TQMap::iterator it=s_stringDefinitionMap.tqfind(macroName); + TQMap::iterator it=s_stringDefinitionMap.find(macroName); if (it!=s_stringDefinitionMap.end()) { kdDebug(7107) << "CALLING MACRO: " << macroName << endl; @@ -3241,7 +3241,7 @@ static char *scan_request(char *c) *c='\0'; char* result=0; scan_troff(h,0,&result); - TQMap::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -3276,7 +3276,7 @@ static char *scan_request(char *c) curpos=0; char* result=0; c=scan_troff(c,1,&result); - TQMap::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -4181,7 +4181,7 @@ static char *scan_request(char *c) } } c=skip_till_newline(c); - TQMap::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to rename or remove: " << name << endl; @@ -4240,7 +4240,7 @@ static char *scan_request(char *c) c=scan_expression( c, &increment ); } c = skip_till_newline( c ); - TQMap ::iterator it = s_numberDefinitionMap.tqfind( name ); + TQMap ::iterator it = s_numberDefinitionMap.find( name ); if ( it == s_numberDefinitionMap.end() ) { if ( sign < 1 ) @@ -4310,7 +4310,7 @@ static char *scan_request(char *c) sl++; } - TQMap::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -5091,7 +5091,7 @@ static char *scan_request(char *c) break; } // Second parametr is origin (unlike in .rn) - TQMap::iterator it=s_stringDefinitionMap.tqfind(name2); + TQMap::iterator it=s_stringDefinitionMap.find(name2); if (it==s_stringDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl; @@ -5115,7 +5115,7 @@ static char *scan_request(char *c) break; } c = skip_till_newline( c ); - TQMap ::iterator it = s_numberDefinitionMap.tqfind( name ); + TQMap ::iterator it = s_numberDefinitionMap.find( name ); if ( it == s_numberDefinitionMap.end() ) { kdDebug(7107) << "EXCEPTION: trying to remove inexistant number register: " << endl; @@ -5145,7 +5145,7 @@ static char *scan_request(char *c) break; } c = skip_till_newline( c ); - TQMap::iterator it=s_numberDefinitionMap.tqfind(name); + TQMap::iterator it=s_numberDefinitionMap.find(name); if (it==s_numberDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find number register to rename: " << name << endl; @@ -5189,7 +5189,7 @@ static char *scan_request(char *c) break; } // Second parametr is origin (unlike in .rnn) - TQMap::iterator it=s_numberDefinitionMap.tqfind(name2); + TQMap::iterator it=s_numberDefinitionMap.find(name2); if (it==s_numberDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl; diff --git a/kioslave/media/kcmodule/notifiermodule.cpp b/kioslave/media/kcmodule/notifiermodule.cpp index 5c4e4c357..d5e36cc50 100644 --- a/kioslave/media/kcmodule/notifiermodule.cpp +++ b/kioslave/media/kcmodule/notifiermodule.cpp @@ -212,7 +212,7 @@ void NotifierModule::slotToggleAuto() int index = m_view->actionsList->index( action_item ); - if ( action->autoMimetypes().tqcontains( m_mimetype ) ) + if ( action->autoMimetypes().contains( m_mimetype ) ) { m_settings.resetAutoAction( m_mimetype ); } diff --git a/kioslave/media/kcmodule/serviceconfigdialog.cpp b/kioslave/media/kcmodule/serviceconfigdialog.cpp index 76b342f92..61dd060f2 100644 --- a/kioslave/media/kcmodule/serviceconfigdialog.cpp +++ b/kioslave/media/kcmodule/serviceconfigdialog.cpp @@ -63,7 +63,7 @@ ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action, { TQListBox *list; - if ( action_mimetypes.tqcontains( *it ) ) + if ( action_mimetypes.contains( *it ) ) { list = m_view->mimetypesSelector->selectedListBox(); } diff --git a/kioslave/media/libmediacommon/actionlistboxitem.cpp b/kioslave/media/libmediacommon/actionlistboxitem.cpp index 42a724c75..271d2e487 100644 --- a/kioslave/media/libmediacommon/actionlistboxitem.cpp +++ b/kioslave/media/libmediacommon/actionlistboxitem.cpp @@ -29,7 +29,7 @@ ActionListBoxItem::ActionListBoxItem(NotifierAction *action, TQString mimetype, { TQString text = m_action->label(); - if ( m_action->autoMimetypes().tqcontains( mimetype ) ) + if ( m_action->autoMimetypes().contains( mimetype ) ) { text += " (" + i18n( "Auto Action" ) + ")"; } diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp index 703cb4a40..9fa7ab253 100644 --- a/kioslave/media/libmediacommon/medium.cpp +++ b/kioslave/media/libmediacommon/medium.cpp @@ -109,7 +109,7 @@ Medium::MList Medium::createList(const TQStringList &properties) l.append(m); TQStringList::iterator first = props.begin(); - TQStringList::iterator last = props.tqfind(SEPARATOR); + TQStringList::iterator last = props.find(SEPARATOR); ++last; props.erase(first, last); } diff --git a/kioslave/media/libmediacommon/medium.h b/kioslave/media/libmediacommon/medium.h index 152d13f8d..b0eb86c33 100644 --- a/kioslave/media/libmediacommon/medium.h +++ b/kioslave/media/libmediacommon/medium.h @@ -111,8 +111,8 @@ namespace MediaManagerUtils { for (TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it) { - TQString key = (*it).left((*it).tqfind('=')); - TQString value = (*it).mid((*it).tqfind('=') + 1); + TQString key = (*it).left((*it).find('=')); + TQString value = (*it).mid((*it).find('=') + 1); valids[key] = value; } return valids; diff --git a/kioslave/media/libmediacommon/notifieraction.cpp b/kioslave/media/libmediacommon/notifieraction.cpp index 9a6572150..d10314701 100644 --- a/kioslave/media/libmediacommon/notifieraction.cpp +++ b/kioslave/media/libmediacommon/notifieraction.cpp @@ -69,7 +69,7 @@ TQString NotifierAction::label() const void NotifierAction::addAutoMimetype( const TQString &mimetype ) { - if ( !m_autoMimetypes.tqcontains( mimetype ) ) + if ( !m_autoMimetypes.contains( mimetype ) ) { m_autoMimetypes.append( mimetype ); } diff --git a/kioslave/media/libmediacommon/notifieropenaction.cpp b/kioslave/media/libmediacommon/notifieropenaction.cpp index 01c8b010f..4d6d8025c 100644 --- a/kioslave/media/libmediacommon/notifieropenaction.cpp +++ b/kioslave/media/libmediacommon/notifieropenaction.cpp @@ -40,6 +40,6 @@ void NotifierOpenAction::execute(KFileItem &medium) bool NotifierOpenAction::supportsMimetype( const TQString &mimetype ) const { - return !mimetype.tqcontains( "blank" ) && !mimetype.tqcontains( "encrypted" ); + return !mimetype.contains( "blank" ) && !mimetype.contains( "encrypted" ); } diff --git a/kioslave/media/libmediacommon/notifierserviceaction.cpp b/kioslave/media/libmediacommon/notifierserviceaction.cpp index 8cf916848..c7bece4f8 100644 --- a/kioslave/media/libmediacommon/notifierserviceaction.cpp +++ b/kioslave/media/libmediacommon/notifierserviceaction.cpp @@ -99,7 +99,7 @@ void NotifierServiceAction::updateFilePath() if ( !m_filePath.isEmpty() ) return; TQString action_name = m_service.m_strName; - action_name.tqreplace( " ", "_" ); + action_name.replace( " ", "_" ); TQDir actions_dir( locateLocal( "data", "konqueror/servicemenus/", true ) ); @@ -144,7 +144,7 @@ bool NotifierServiceAction::isWritable() const bool NotifierServiceAction::supportsMimetype(const TQString &mimetype) const { - return m_mimetypes.tqcontains(mimetype); + return m_mimetypes.contains(mimetype); } void NotifierServiceAction::save() const diff --git a/kioslave/media/libmediacommon/notifiersettings.cpp b/kioslave/media/libmediacommon/notifiersettings.cpp index fd0aefc67..cc8261b8b 100644 --- a/kioslave/media/libmediacommon/notifiersettings.cpp +++ b/kioslave/media/libmediacommon/notifiersettings.cpp @@ -111,7 +111,7 @@ TQValueList NotifierSettings::actionsForMimetype( const TQStrin bool NotifierSettings::tqaddAction( NotifierServiceAction *action ) { - if ( !m_idMap.tqcontains( action->id() ) ) + if ( !m_idMap.contains( action->id() ) ) { m_actions.insert( --m_actions.end(), action ); m_idMap[ action->id() ] = action; @@ -153,7 +153,7 @@ void NotifierSettings::setAutoAction( const TQString &mimetype, NotifierAction * void NotifierSettings::resetAutoAction( const TQString &mimetype ) { - if ( m_autoMimetypesMap.tqcontains( mimetype ) ) + if ( m_autoMimetypesMap.contains( mimetype ) ) { NotifierAction *action = m_autoMimetypesMap[mimetype]; action->removeAutoMimetype( mimetype ); @@ -179,7 +179,7 @@ void NotifierSettings::clearAutoActions() NotifierAction *NotifierSettings::autoActionForMimetype( const TQString &mimetype ) { - if ( m_autoMimetypesMap.tqcontains( mimetype ) ) + if ( m_autoMimetypesMap.contains( mimetype ) ) { return m_autoMimetypesMap[mimetype]; } @@ -238,7 +238,7 @@ void NotifierSettings::reload() TQString mime = auto_it.key(); TQString action_id = auto_it.data(); - if ( m_idMap.tqcontains( action_id ) ) + if ( m_idMap.contains( action_id ) ) { setAutoAction( mime, m_idMap[action_id] ); } @@ -349,7 +349,7 @@ bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const TQString } } } - else if ( types.tqcontains(mimetype) ) + else if ( types.contains(mimetype) ) { return true; } diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp index 1448a756c..f8d298e27 100644 --- a/kioslave/media/mediaimpl.cpp +++ b/kioslave/media/mediaimpl.cpp @@ -43,7 +43,7 @@ bool MediaImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { TQString url_path = url.path(); - int i = url_path.tqfind('/', 1); + int i = url_path.find('/', 1); if (i > 0) { name = url_path.mid(1, i-1); diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp index 71dbdb1f0..189f52aee 100644 --- a/kioslave/media/mediamanager/fstabbackend.cpp +++ b/kioslave/media/mediamanager/fstabbackend.cpp @@ -137,24 +137,24 @@ bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly) || mount->mountType() == "fdescfs" || mount->mountType() == "kernfs" || mount->mountType() == "usbfs" - || mount->mountType().tqcontains( "proc" ) + || mount->mountType().contains( "proc" ) || mount->mountType() == "unknown" || mount->mountType() == "none" || mount->mountType() == "sunrpc" || mount->mountedFrom() == "none" || mount->mountedFrom() == "tmpfs" - || mount->mountedFrom().tqfind("shm") != -1 + || mount->mountedFrom().find("shm") != -1 || mount->mountPoint() == "/dev/swap" || mount->mountPoint() == "/dev/pts" - || mount->mountPoint().tqfind("/proc") == 0 - || mount->mountPoint().tqfind("/sys") == 0 + || mount->mountPoint().find("/proc") == 0 + || mount->mountPoint().find("/sys") == 0 // We might want to display only network shares // since HAL doesn't handle them || ( networkSharesOnly - && mount->mountType().tqfind( "smb" ) == -1 - && mount->mountType().tqfind( "cifs" ) == -1 - && mount->mountType().tqfind( "nfs" ) == -1 + && mount->mountType().find( "smb" ) == -1 + && mount->mountType().find( "cifs" ) == -1 + && mount->mountType().find( "nfs" ) == -1 ) ) { @@ -187,7 +187,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) nothing has changed, do not stat the mount point. Avoids hang if network shares are stalling */ TQString mtabEntry = dev + "*" + mp + "*" + fs; - if(m_mtabEntries.tqcontains(mtabEntry)) { + if(m_mtabEntries.contains(mtabEntry)) { new_mtabIds += m_mtabEntries[mtabEntry]; continue; } @@ -196,7 +196,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) new_mtabIds+=id; m_mtabEntries[mtabEntry] = id; - if ( !m_mtabIds.tqcontains(id) && m_fstabIds.tqcontains(id) ) + if ( !m_mtabIds.contains(id) && m_fstabIds.contains(id) ) { TQString mime, icon, label; guess(dev, mp, fs, true, mime, icon, label); @@ -204,7 +204,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) mime, icon, label); } #if 0 - else if ( !m_mtabIds.tqcontains(id) ) + else if ( !m_mtabIds.contains(id) ) { TQString name = generateName(dev, fs); @@ -229,7 +229,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) for (; it2!=end2; ++it2) { - if ( !new_mtabIds.tqcontains(*it2) && m_fstabIds.tqcontains(*it2) ) + if ( !new_mtabIds.contains(*it2) && m_fstabIds.contains(*it2) ) { const Medium *medium = m_mediaList.findById(*it2); @@ -248,7 +248,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) mime, icon, label); } #if 0 - else if ( !new_mtabIds.tqcontains(*it2) ) + else if ( !new_mtabIds.contains(*it2) ) { m_mediaList.removeMedium(*it2, allowNotification); } @@ -277,7 +277,7 @@ void FstabBackend::handleFstabChange(bool allowNotification) TQString id = generateId(dev, mp); new_fstabIds+=id; - if ( !m_fstabIds.tqcontains(id) ) + if ( !m_fstabIds.contains(id) ) { TQString name = generateName(dev, fs); @@ -301,7 +301,7 @@ void FstabBackend::handleFstabChange(bool allowNotification) for (; it2!=end2; ++it2) { - if ( !new_fstabIds.tqcontains(*it2) ) + if ( !new_fstabIds.contains(*it2) ) { m_mediaList.removeMedium(*it2, allowNotification); } @@ -317,8 +317,8 @@ TQString FstabBackend::generateId(const TQString &devNode, TQString m = KStandardDirs::realPath(mountPoint); return "/org/kde/mediamanager/fstab/" - +d.tqreplace("/", "") - +m.tqreplace("/", ""); + +d.replace("/", "") + +m.replace("/", ""); } TQString FstabBackend::generateName(const TQString &devNode, const TQString &fsType) @@ -363,7 +363,7 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, { TQString buf; m.readLine(buf, 1024); - if(buf.tqcontains("cdrom")) + if(buf.contains("cdrom")) isCd=true; m.close(); } @@ -387,37 +387,37 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, } #endif if ( devType == CDWRITER - || devNode.tqfind("cdwriter")!=-1 || mountPoint.tqfind("cdwriter")!=-1 - || devNode.tqfind("cdrecorder")!=-1 || mountPoint.tqfind("cdrecorder")!=-1 - || devNode.tqfind("cdburner")!=-1 || mountPoint.tqfind("cdburner")!=-1 - || devNode.tqfind("cdrw")!=-1 || mountPoint.tqfind("cdrw")!=-1 - || devNode.tqfind("graveur")!=-1 + || devNode.find("cdwriter")!=-1 || mountPoint.find("cdwriter")!=-1 + || devNode.find("cdrecorder")!=-1 || mountPoint.find("cdrecorder")!=-1 + || devNode.find("cdburner")!=-1 || mountPoint.find("cdburner")!=-1 + || devNode.find("cdrw")!=-1 || mountPoint.find("cdrw")!=-1 + || devNode.find("graveur")!=-1 ) { mimeType = "media/cdwriter"; label = i18n("CD Recorder"); } else if ( devType == DVD || devType == DVDWRITER - || devNode.tqfind("dvd")!=-1 || mountPoint.tqfind("dvd")!=-1 ) + || devNode.find("dvd")!=-1 || mountPoint.find("dvd")!=-1 ) { mimeType = "media/dvd"; label = i18n("DVD"); } else if ( devType == CD - || devNode.tqfind("cdrom")!=-1 || mountPoint.tqfind("cdrom")!=-1 + || devNode.find("cdrom")!=-1 || mountPoint.find("cdrom")!=-1 // LINUX SPECIFIC - || devNode.tqfind("/dev/scd")!=-1 || devNode.tqfind("/dev/sr")!=-1 + || devNode.find("/dev/scd")!=-1 || devNode.find("/dev/sr")!=-1 // FREEBSD SPECIFIC - || devNode.tqfind("/acd")!=-1 || devNode.tqfind("/scd")!=-1 + || devNode.find("/acd")!=-1 || devNode.find("/scd")!=-1 ) { mimeType = "media/cdrom"; label = i18n("CD-ROM"); } - else if ( devNode.tqfind("fd")!=-1 || mountPoint.tqfind("fd")!=-1 - || devNode.tqfind("floppy")!=-1 || mountPoint.tqfind("floppy")!=-1 ) + else if ( devNode.find("fd")!=-1 || mountPoint.find("fd")!=-1 + || devNode.find("floppy")!=-1 || mountPoint.find("floppy")!=-1 ) { - if ( devNode.tqfind("360")!=-1 || devNode.tqfind("1200")!=-1 ) + if ( devNode.find("360")!=-1 || devNode.find("1200")!=-1 ) { mimeType = "media/floppy5"; } @@ -427,32 +427,32 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, } label = i18n("Floppy"); } - else if ( mountPoint.tqfind("zip")!=-1 + else if ( mountPoint.find("zip")!=-1 // FREEBSD SPECIFIC - || devNode.tqfind("/afd")!=-1 + || devNode.find("/afd")!=-1 ) { mimeType = "media/zip"; label = i18n("Zip Disk"); } - else if ( mountPoint.tqfind("removable")!=-1 - || mountPoint.tqfind("hotplug")!=-1 - || mountPoint.tqfind("usb")!=-1 - || mountPoint.tqfind("firewire")!=-1 - || mountPoint.tqfind("ieee1394")!=-1 - || devNode.tqfind("/usb/")!= -1 + else if ( mountPoint.find("removable")!=-1 + || mountPoint.find("hotplug")!=-1 + || mountPoint.find("usb")!=-1 + || mountPoint.find("firewire")!=-1 + || mountPoint.find("ieee1394")!=-1 + || devNode.find("/usb/")!= -1 ) { mimeType = "media/removable"; label = i18n("Removable Device"); } - else if ( fsType.tqfind("nfs")!=-1 ) + else if ( fsType.find("nfs")!=-1 ) { mimeType = "media/nfs"; label = i18n("Remote Share"); } - else if ( fsType.tqfind("smb")!=-1 || fsType.tqfind("cifs")!=-1 - || devNode.tqfind("//")!=-1 ) + else if ( fsType.find("smb")!=-1 || fsType.find("cifs")!=-1 + || devNode.find("//")!=-1 ) { mimeType = "media/smb"; label = i18n("Remote Share"); diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp index d44826590..74f123c93 100644 --- a/kioslave/media/mediamanager/halbackend.cpp +++ b/kioslave/media/mediamanager/halbackend.cpp @@ -942,7 +942,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << TQString("automount=%1").arg(value ? "true" : "false"); - if (valids.tqcontains("ro")) + if (valids.contains("ro")) { value = config.readBoolEntry("ro", false); tmp = TQString("ro=%1").arg(value ? "true" : "false"); @@ -950,7 +950,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << tmp; } - if (valids.tqcontains("quiet")) + if (valids.contains("quiet")) { value = config.readBoolEntry("quiet", false); tmp = TQString("quiet=%1").arg(value ? "true" : "false"); @@ -958,28 +958,28 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << tmp; } - if (valids.tqcontains("flush")) + if (valids.contains("flush")) { value = config.readBoolEntry("flush", fstype.endsWith("fat")); tmp = TQString("flush=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.tqcontains("uid")) + if (valids.contains("uid")) { value = config.readBoolEntry("uid", true); tmp = TQString("uid=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.tqcontains("utf8")) + if (valids.contains("utf8")) { value = config.readBoolEntry("utf8", true); tmp = TQString("utf8=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.tqcontains("shortname")) + if (valids.contains("shortname")) { TQString svalue = config.readEntry("shortname", "lower").lower(); if (svalue == "winnt") @@ -993,7 +993,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) } // pass our locale to the ntfs-3g driver so it can translate local characters - if (valids.tqcontains("locale") && fstype == "ntfs-3g") + if (valids.contains("locale") && fstype == "ntfs-3g") { // have to obtain LC_CTYPE as returned by the `locale` command // check in the same order as `locale` does @@ -1003,15 +1003,15 @@ TQStringList HALBackend::mountoptions(const TQString &name) } } - if (valids.tqcontains("sync")) + if (valids.contains("sync")) { - value = config.readBoolEntry("sync", ( valids.tqcontains("flush") && !fstype.endsWith("fat") ) && removable); + value = config.readBoolEntry("sync", ( valids.contains("flush") && !fstype.endsWith("fat") ) && removable); tmp = TQString("sync=%1").arg(value ? "true" : "false"); if (fstype != "iso9660") // makes no sense result << tmp; } - if (valids.tqcontains("noatime")) + if (valids.contains("noatime")) { value = config.readBoolEntry("atime", !fstype.endsWith("fat")); tmp = TQString("atime=%1").arg(value ? "true" : "false"); @@ -1031,7 +1031,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << TQString("mountpoint=%1").arg(mount_point); result << TQString("filesystem=%1").arg(fstype); - if (valids.tqcontains("data")) + if (valids.contains("data")) { TQString svalue = config.readEntry("journaling").lower(); if (svalue == "ordered") @@ -1058,19 +1058,19 @@ bool HALBackend::setMountoptions(const TQString &name, const TQStringList &optio const char *names[] = { "ro", "quiet", "atime", "uid", "utf8", "flush", "sync", 0 }; for (int index = 0; names[index]; ++index) - if (valids.tqcontains(names[index])) + if (valids.contains(names[index])) config.writeEntry(names[index], valids[names[index]] == "true"); - if (valids.tqcontains("shortname")) + if (valids.contains("shortname")) config.writeEntry("shortname", valids["shortname"]); - if (valids.tqcontains("journaling")) + if (valids.contains("journaling")) config.writeEntry("journaling", valids["journaling"]); - if (!mountoptions(name).tqcontains(TQString("mountpoint=%1").arg(valids["mountpoint"]))) + if (!mountoptions(name).contains(TQString("mountpoint=%1").arg(valids["mountpoint"]))) config.writeEntry("mountpoint", valids["mountpoint"]); - if (valids.tqcontains("automount")) { + if (valids.contains("automount")) { TQString drive_udi = libhal_device_get_property_QString(m_halContext, name.latin1(), "block.storage_device"); config.setGroup(drive_udi); config.writeEntry("automount", valids["automount"]); @@ -1376,7 +1376,7 @@ TQString HALBackend::isInFstab(const Medium *medium) if ((*it)->mountedFrom() == medium->deviceNode() || ( !medium->deviceNode().isEmpty() && reald == medium->deviceNode() ) ) { TQStringList opts = (*it)->mountOptions(); - if (opts.tqcontains("user") || opts.tqcontains("users")) + if (opts.contains("user") || opts.contains("users")) return (*it)->mountPoint(); } } @@ -1451,17 +1451,17 @@ TQString HALBackend::mount(const Medium *medium) if (mount_point.startsWith("/media/")) mount_point = mount_point.mid(7); - if (valids.tqcontains("shortname")) + if (valids.contains("shortname")) { soptions << TQString("shortname=%1").arg(valids["shortname"]); } - if (valids.tqcontains("locale")) + if (valids.contains("locale")) { soptions << TQString("locale=%1").arg(valids["locale"]); } - if (valids.tqcontains("journaling")) + if (valids.contains("journaling")) { TQString option = valids["journaling"]; if (option == "data") diff --git a/kioslave/media/mediamanager/linuxcdpolling.cpp b/kioslave/media/mediamanager/linuxcdpolling.cpp index 5a1359b6d..0fcda8d0f 100644 --- a/kioslave/media/mediamanager/linuxcdpolling.cpp +++ b/kioslave/media/mediamanager/linuxcdpolling.cpp @@ -209,14 +209,14 @@ void LinuxCDPolling::slotMediumAdded(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumAdded(" << id << ")" << endl; - if (m_threads.tqcontains(id)) return; + if (m_threads.contains(id)) return; const Medium *medium = m_mediaList.findById(id); TQString mime = medium->mimeType(); kdDebug(1219) << "mime == " << mime << endl; - if (mime.tqfind("dvd")==-1 && mime.tqfind("cd")==-1) return; + if (mime.find("dvd")==-1 && mime.find("cd")==-1) return; if (!medium->isMounted()) { @@ -234,7 +234,7 @@ void LinuxCDPolling::slotMediumRemoved(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumRemoved(" << id << ")" << endl; - if (!m_threads.tqcontains(id)) return; + if (!m_threads.contains(id)) return; PollingThread *thread = m_threads[id]; m_threads.remove(id); @@ -255,9 +255,9 @@ void LinuxCDPolling::slotMediumStateChanged(const TQString &id) TQString mime = medium->mimeType(); kdDebug(1219) << "mime == " << mime << endl; - if (mime.tqfind("dvd")==-1 && mime.tqfind("cd")==-1) return; + if (mime.find("dvd")==-1 && mime.find("cd")==-1) return; - if (!m_threads.tqcontains(id) && !medium->isMounted()) + if (!m_threads.contains(id) && !medium->isMounted()) { // It is just a mount state change, no need to notify m_excludeNotification.append( id ); @@ -268,7 +268,7 @@ void LinuxCDPolling::slotMediumStateChanged(const TQString &id) thread->start(); m_timer.start(500); } - else if (m_threads.tqcontains(id) && medium->isMounted()) + else if (m_threads.contains(id) && medium->isMounted()) { PollingThread *thread = m_threads[id]; m_threads.remove(id); @@ -319,7 +319,7 @@ static TQString baseType(const Medium *medium) FstabBackend::guess(devNode, mountPoint, fsType, mounted, mimeType, iconName, label); - if (devNode.tqfind("dvd")!=-1) + if (devNode.find("dvd")!=-1) { kdDebug(1219) << "=> dvd" << endl; return "dvd"; @@ -360,7 +360,7 @@ void LinuxCDPolling::applyType(DiscType type, const Medium *medium) TQString id = medium->id(); TQString dev = medium->deviceNode(); - bool notify = !m_excludeNotification.tqcontains(id); + bool notify = !m_excludeNotification.contains(id); m_excludeNotification.remove(id); switch (type) diff --git a/kioslave/media/mediamanager/medialist.cpp b/kioslave/media/mediamanager/medialist.cpp index 2e766bb07..bb0de6248 100644 --- a/kioslave/media/mediamanager/medialist.cpp +++ b/kioslave/media/mediamanager/medialist.cpp @@ -38,7 +38,7 @@ const Medium *MediaList::findById(const TQString &id) const { kdDebug(1219) << "MediaList::findById(" << id << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return 0L; + if ( !m_idMap.contains(id) ) return 0L; return m_idMap[id]; } @@ -47,7 +47,7 @@ const Medium *MediaList::findByName(const TQString &name) const { kdDebug(1219) << "MediaList::findByName(" << name << ")" << endl; - if ( !m_nameMap.tqcontains(name) ) return 0L; + if ( !m_nameMap.contains(name) ) return 0L; return m_nameMap[name]; } @@ -70,13 +70,13 @@ TQString MediaList::addMedium(Medium *medium, bool allowNotification) kdDebug(1219) << "MediaList::addMedium(@" << medium->id() << ")" << endl; TQString id = medium->id(); - if ( m_idMap.tqcontains(id) ) return TQString::null; + if ( m_idMap.contains(id) ) return TQString::null; m_media.append( medium ); m_idMap[id] = medium; TQString name = medium->name(); - if ( !m_nameMap.tqcontains(name) ) + if ( !m_nameMap.contains(name) ) { m_nameMap[name] = medium; @@ -90,7 +90,7 @@ TQString MediaList::addMedium(Medium *medium, bool allowNotification) TQString base_name = name+"_"; int i = 1; - while ( m_nameMap.tqcontains(base_name+TQString::number(i)) ) + while ( m_nameMap.contains(base_name+TQString::number(i)) ) { i++; } @@ -109,7 +109,7 @@ bool MediaList::removeMedium(const TQString &id, bool allowNotification) { kdDebug(1219) << "MediaList::removeMedium(" << id << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; TQString name = medium->name(); @@ -126,7 +126,7 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification) { kdDebug(1219) << "MediaList::changeMediumState(const Medium &)" << endl; - if ( !m_idMap.tqcontains(medium.id()) ) return false; + if ( !m_idMap.contains(medium.id()) ) return false; Medium *m = m_idMap[medium.id()]; @@ -177,7 +177,7 @@ bool MediaList::changeMediumState(const TQString &id, << baseURL << ", " << mimeType << ", " << iconName << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; @@ -218,7 +218,7 @@ bool MediaList::changeMediumState(const TQString &id, << mounted << ", " << mimeType << ", " << iconName << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; @@ -255,7 +255,7 @@ bool MediaList::changeMediumState(const TQString &id, bool mounted, << mounted << ", " << mimeType << ", " << iconName << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; @@ -287,7 +287,7 @@ bool MediaList::setUserLabel(const TQString &name, const TQString &label) kdDebug(1219) << "MediaList::setUserLabel(" << name << ", " << label << ")" << endl; - if ( !m_nameMap.tqcontains(name) ) return false; + if ( !m_nameMap.contains(name) ) return false; Medium *medium = m_nameMap[name]; medium->setUserLabel(label); diff --git a/kioslave/media/mediamanager/removablebackend.cpp b/kioslave/media/mediamanager/removablebackend.cpp index 7db497c38..f307ee2f8 100644 --- a/kioslave/media/mediamanager/removablebackend.cpp +++ b/kioslave/media/mediamanager/removablebackend.cpp @@ -60,7 +60,7 @@ bool RemovableBackend::plug(const TQString &devNode, const TQString &label) TQString name = generateName(devNode); TQString id = generateId(devNode); - if (!m_removableIds.tqcontains(id)) + if (!m_removableIds.contains(id)) { Medium *medium = new Medium(id, name); medium->mountableState(devNode, TQString::null, @@ -95,7 +95,7 @@ bool RemovableBackend::plug(const TQString &devNode, const TQString &label) bool RemovableBackend::unplug(const TQString &devNode) { TQString id = generateId(devNode); - if (m_removableIds.tqcontains(id)) + if (m_removableIds.contains(id)) { m_removableIds.remove(id); return m_mediaList.removeMedium(id); @@ -106,7 +106,7 @@ bool RemovableBackend::unplug(const TQString &devNode) bool RemovableBackend::camera(const TQString &devNode) { TQString id = generateId(devNode); - if (m_removableIds.tqcontains(id)) + if (m_removableIds.contains(id)) { return m_mediaList.changeMediumState(id, TQString("camera:/"), false, "media/gphoto2camera"); @@ -140,8 +140,8 @@ void RemovableBackend::handleMtabChange() TQString id = generateId(dev); new_mtabIds+=id; - if ( !m_mtabIds.tqcontains(id) - && m_removableIds.tqcontains(id) ) + if ( !m_mtabIds.contains(id) + && m_removableIds.contains(id) ) { m_mediaList.changeMediumState(id, dev, mp, fs, true, false, "media/removable_mounted"); @@ -153,8 +153,8 @@ void RemovableBackend::handleMtabChange() for (; it2!=end2; ++it2) { - if ( !new_mtabIds.tqcontains(*it2) - && m_removableIds.tqcontains(*it2) ) + if ( !new_mtabIds.contains(*it2) + && m_removableIds.contains(*it2) ) { m_mediaList.changeMediumState(*it2, false, false, "media/removable_unmounted"); @@ -169,7 +169,7 @@ TQString RemovableBackend::generateId(const TQString &devNode) TQString dev = KStandardDirs::realFilePath(devNode); return "/org/kde/mediamanager/removable/" - +dev.tqreplace("/", ""); + +dev.replace("/", ""); } TQString RemovableBackend::generateName(const TQString &devNode) diff --git a/kioslave/media/medianotifier/medianotifier.cpp b/kioslave/media/medianotifier/medianotifier.cpp index f28c9ab95..d02f1c4b5 100644 --- a/kioslave/media/medianotifier/medianotifier.cpp +++ b/kioslave/media/medianotifier/medianotifier.cpp @@ -113,7 +113,7 @@ bool MediaNotifier::autostart( const KFileItem &medium ) TQString mimetype = medium.mimetype(); bool is_cdrom = mimetype.startsWith( "media/cd" ) || mimetype.startsWith( "media/dvd" ); - bool is_mounted = mimetype.tqcontains( "_mounted" ); + bool is_mounted = mimetype.contains( "_mounted" ); // We autorun only on CD/DVD or removable disks (USB, Firewire) if ( !( is_cdrom || is_mounted ) @@ -222,7 +222,7 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const TQString &path, // The relative path MUST NOT contain path components that // refer to a parent directory ( ../ ) - if ( relative_path.startsWith( "/" ) || relative_path.tqcontains( "../" ) ) + if ( relative_path.startsWith( "/" ) || relative_path.contains( "../" ) ) { return false; } diff --git a/kioslave/media/mounthelper/kio_media_mounthelper.cpp b/kioslave/media/mounthelper/kio_media_mounthelper.cpp index 83d57df85..07588e867 100644 --- a/kioslave/media/mounthelper/kio_media_mounthelper.cpp +++ b/kioslave/media/mounthelper/kio_media_mounthelper.cpp @@ -88,8 +88,8 @@ MountHelper::MountHelper() : KApplication() TQString device = medium.deviceNode(); TQString mount_point = medium.mountPoint(); - m_isCdrom = medium.mimeType().tqfind("dvd")!=-1 - || medium.mimeType().tqfind("cd")!=-1; + m_isCdrom = medium.mimeType().find("dvd")!=-1 + || medium.mimeType().find("cd")!=-1; if (args->isSet("d")) { diff --git a/kioslave/media/propsdlgplugin/propertiespage.cpp b/kioslave/media/propsdlgplugin/propertiespage.cpp index 209f350a8..14ac2b33f 100644 --- a/kioslave/media/propsdlgplugin/propertiespage.cpp +++ b/kioslave/media/propsdlgplugin/propertiespage.cpp @@ -54,55 +54,55 @@ PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id) for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - TQString key = (*it).left((*it).tqfind('=')); - TQString value = (*it).mid((*it).tqfind('=') + 1); + TQString key = (*it).left((*it).find('=')); + TQString value = (*it).mid((*it).find('=') + 1); kdDebug() << "key '" << key << "' value '" << value << "'\n"; options[key] = value; } - if (!options.tqcontains("ro")) + if (!options.contains("ro")) option_ro->hide(); else option_ro->setChecked(options["ro"] == "true"); connect( option_ro, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("quiet")) + if (!options.contains("quiet")) option_quiet->hide(); else option_quiet->setChecked(options["quiet"] == "true"); connect( option_quiet, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("sync")) + if (!options.contains("sync")) option_sync->hide(); else option_sync->setChecked(options["sync"] == "true"); connect( option_sync, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("atime")) + if (!options.contains("atime")) option_atime->hide(); else option_atime->setChecked(options["atime"] == "true"); connect( option_atime, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("flush")) + if (!options.contains("flush")) option_flush->hide(); else option_flush->setChecked(options["flush"] == "true"); connect( option_flush, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("utf8")) + if (!options.contains("utf8")) option_utf8->hide(); else option_utf8->setChecked(options["utf8"] == "true"); connect( option_utf8, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("uid")) + if (!options.contains("uid")) option_uid->hide(); else option_uid->setChecked(options["uid"] == "true"); connect( option_uid, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("shortname")) + if (!options.contains("shortname")) { option_shortname->hide(); text_shortname->hide(); @@ -118,7 +118,7 @@ PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id) connect( option_shortname, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) ); } - if (!options.tqcontains("journaling")) + if (!options.contains("journaling")) { text_journaling->hide(); option_journaling->hide(); @@ -140,11 +140,11 @@ PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id) option_automount->setChecked(options["automount"] == "true"); connect( option_automount, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("journaling") && - !options.tqcontains("shortname") && - !options.tqcontains("uid") && - !options.tqcontains("utf8") && - !options.tqcontains("flush")) + if (!options.contains("journaling") && + !options.contains("shortname") && + !options.contains("uid") && + !options.contains("utf8") && + !options.contains("flush")) groupbox_specific->hide(); } else { @@ -163,31 +163,31 @@ bool PropertiesPage::save() { TQStringList result; - if (options.tqcontains("ro")) + if (options.contains("ro")) result << TQString("ro=%1").arg(option_ro->isChecked() ? "true" : "false"); - if (options.tqcontains("quiet")) + if (options.contains("quiet")) result << TQString("quiet=%1").arg(option_quiet->isChecked() ? "true" : "false"); - if (options.tqcontains("sync")) + if (options.contains("sync")) result << TQString("sync=%1").arg(option_sync->isChecked() ? "true" : "false"); - if (options.tqcontains("atime")) + if (options.contains("atime")) result << TQString("atime=%1").arg(option_atime->isChecked() ? "true" : "false"); - if (options.tqcontains("flush")) + if (options.contains("flush")) result << TQString("flush=%1").arg(option_flush->isChecked() ? "true" : "false"); - if (options.tqcontains("utf8")) + if (options.contains("utf8")) result << TQString("utf8=%1").arg(option_utf8->isChecked() ? "true" : "false"); - if (options.tqcontains("uid")) + if (options.contains("uid")) result << TQString("uid=%1").arg(option_uid->isChecked() ? "true" : "false"); - if (options.tqcontains("shortname")) + if (options.contains("shortname")) result << TQString("shortname=%1").arg(short_names[option_shortname->currentItem()]); - if (options.tqcontains("journaling")) + if (options.contains("journaling")) result << TQString("journaling=%1").arg(journales[option_journaling->currentItem()]); TQString mp = option_mountpoint->text(); diff --git a/kioslave/nfs/kio_nfs.cpp b/kioslave/nfs/kio_nfs.cpp index 1869b4243..ad19f70a7 100644 --- a/kioslave/nfs/kio_nfs.cpp +++ b/kioslave/nfs/kio_nfs.cpp @@ -175,7 +175,7 @@ static void stripTrailingSlash(TQString& path) static void getLastPart(const TQString& path, TQString& lastPart, TQString& rest) { - int slashPos=path.tqfindRev("/"); + int slashPos=path.findRev("/"); lastPart=path.mid(slashPos+1); rest=path.left(slashPos+1); } @@ -185,7 +185,7 @@ static TQString removeFirstPart(const TQString& path) TQString result(""); if (path.isEmpty()) return result; result=path.mid(1); - int slashPos=result.tqfind("/"); + int slashPos=result.find("/"); return result.mid(slashPos+1); } @@ -293,7 +293,7 @@ void NFSProtocol::closeConnection() bool NFSProtocol::isExportedDir(const TQString& path) { - return (m_exportedDirs.tqfind(path.mid(1))!=m_exportedDirs.end()); + return (m_exportedDirs.find(path.mid(1))!=m_exportedDirs.end()); } /* This one works recursive. @@ -321,7 +321,7 @@ NFSFileHandle NFSProtocol::getFileHandle(TQString path) } //check wether we have this filehandle cached //the filehandles of the exported root dirs are always in the cache - if (m_handleCache.tqfind(path)!=m_handleCache.end()) + if (m_handleCache.find(path)!=m_handleCache.end()) { kdDebug(7121)<<"path is in the cache, returning the FH -"< 0) group = group.left(pos); + if ((pos = group.find('/')) > 0) group = group.left(pos); DBG << "get group: " << group << " msg: " << msg_id << endl; if ( !nntp_open() ) @@ -228,7 +228,7 @@ bool NNTPProtocol::post_article() { pos += 2; } last_chunk_had_line_ending = (data.right(2) == "\r\n"); - while ((pos = data.tqfind("\r\n.",pos)) > 0) { + while ((pos = data.find("\r\n.",pos)) > 0) { data.insert(pos+2,'.'); pos += 4; } @@ -280,7 +280,7 @@ void NNTPProtocol::stat( const KURL& url ) { // /group = message list } else if (regGroup.search(path) == 0) { if (path.left(1) == "/") path.remove(0,1); - if ((pos = path.tqfind('/')) > 0) group = path.left(pos); + if ((pos = path.find('/')) > 0) group = path.left(pos); else group = path; DBG << "stat group: " << group << endl; // postingAllowed should be ored here with "group not moderated" flag @@ -289,11 +289,11 @@ void NNTPProtocol::stat( const KURL& url ) { // /group/ = message } else if (regMsgId.search(path) == 0) { - pos = path.tqfind('<'); + pos = path.find('<'); group = path.left(pos); msg_id = KURL::decode_string( path.right(path.length()-pos) ); if (group.left(1) == "/") group.remove(0,1); - if ((pos = group.tqfind('/')) > 0) group = group.left(pos); + if ((pos = group.find('/')) > 0) group = group.left(pos); DBG << "stat group: " << group << " msg: " << msg_id << endl; fillUDSEntry(entry, msg_id, 0, false, true); @@ -332,7 +332,7 @@ void NNTPProtocol::listDir( const KURL& url ) { TQString group; if (path.left(1) == "/") path.remove(0,1); - if ((pos = path.tqfind('/')) > 0) + if ((pos = path.find('/')) > 0) group = path.left(pos); else group = path; @@ -383,15 +383,15 @@ void NNTPProtocol::fetchGroups( const TQString &since ) DBG << " fetchGroups -- data: " << line.stripWhiteSpace() << endl; // group name - if ((pos = line.tqfind(' ')) > 0) { + if ((pos = line.find(' ')) > 0) { group = line.left(pos); // number of messages line.remove(0,pos+1); long last = 0; - if (((pos = line.tqfind(' ')) > 0 || (pos = line.tqfind('\t')) > 0) && - ((pos2 = line.tqfind(' ',pos+1)) > 0 || (pos2 = line.tqfind('\t',pos+1)) > 0)) { + if (((pos = line.find(' ')) > 0 || (pos = line.find('\t')) > 0) && + ((pos2 = line.find(' ',pos+1)) > 0 || (pos2 = line.find('\t',pos+1)) > 0)) { last = line.left(pos).toLong(); long first = line.mid(pos+1,pos2-pos-1).toLong(); msg_cnt = abs(last-first+1); @@ -441,8 +441,8 @@ bool NNTPProtocol::fetchGroup( TQString &group, unsigned long first ) { int pos, pos2; unsigned long firstSerNum; resp_line = readBuffer; - if (((pos = resp_line.tqfind(' ',4)) > 0 || (pos = resp_line.tqfind('\t',4)) > 0) && - ((pos2 = resp_line.tqfind(' ',pos+1)) > 0 || (pos = resp_line.tqfind('\t',pos+1)) > 0)) + if (((pos = resp_line.find(' ',4)) > 0 || (pos = resp_line.find('\t',4)) > 0) && + ((pos2 = resp_line.find(' ',pos+1)) > 0 || (pos = resp_line.find('\t',pos+1)) > 0)) { firstSerNum = resp_line.mid(pos+1,pos2-pos-1).toLong(); } else { @@ -481,7 +481,7 @@ bool NNTPProtocol::fetchGroupRFC977( unsigned long first ) //STAT res_line: 223 nnn ... TQString msg_id; int pos, pos2; - if ((pos = resp_line.tqfind('<')) > 0 && (pos2 = resp_line.tqfind('>',pos+1))) { + if ((pos = resp_line.find('<')) > 0 && (pos2 = resp_line.find('>',pos+1))) { msg_id = resp_line.mid(pos,pos2-pos+1); fillUDSEntry(entry, msg_id, 0, false, true); entryList.append(entry); @@ -506,7 +506,7 @@ bool NNTPProtocol::fetchGroupRFC977( unsigned long first ) //res_line: 223 nnn ... resp_line = readBuffer; - if ((pos = resp_line.tqfind('<')) > 0 && (pos2 = resp_line.tqfind('>',pos+1))) { + if ((pos = resp_line.find('<')) > 0 && (pos2 = resp_line.find('>',pos+1))) { msg_id = resp_line.mid(pos,pos2-pos+1); fillUDSEntry(entry, msg_id, 0, false, true); entryList.append(entry); @@ -589,7 +589,7 @@ bool NNTPProtocol::fetchGroupXOVER( unsigned long first, bool ¬Supported ) TQStringList::ConstIterator it2 = fields.constBegin(); ++it2; // first entry is the serial number for ( ; it != headers.constEnd() && it2 != fields.constEnd(); ++it, ++it2 ) { - if ( (*it).tqcontains( "Message-ID:", false ) ) { + if ( (*it).contains( "Message-ID:", false ) ) { msgId = (*it2); continue; } diff --git a/kioslave/pop3/pop3.cc b/kioslave/pop3/pop3.cc index 84744eb33..8782fb80b 100644 --- a/kioslave/pop3/pop3.cc +++ b/kioslave/pop3/pop3.cc @@ -537,7 +537,7 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai ) challenge.resize( 2049 ); resp = command( firstCommand.latin1(), challenge.data(), 2049 ); while( resp == Cont ) { - challenge.resize(challenge.tqfind(0)); + challenge.resize(challenge.find(0)); // POP3_DEBUG << "S: " << TQCString(challenge.data(),challenge.size()+1) << endl; KCodecs::base64Decode( challenge, tmp ); do { @@ -704,7 +704,7 @@ bool POP3Protocol::pop3_open() TQRegExp re("<[A-Za-z0-9\\.\\-_]+@[A-Za-z0-9\\.\\-_]+>$", false); POP3_DEBUG << "greeting: " << greeting << endl; - int apop_pos = greeting.tqfind(re); + int apop_pos = greeting.find(re); supports_apop = (bool) (apop_pos != -1); if (metaData("nologin") == "on") @@ -794,7 +794,7 @@ size_t POP3Protocol::realGetSize(unsigned int msg_num) return 0; } else { cmd = buf; - cmd.remove(0, cmd.tqfind(" ")); + cmd.remove(0, cmd.find(" ")); ret = cmd.toLong(); } delete[]buf; @@ -821,7 +821,7 @@ void POP3Protocol::special(const TQByteArray & aData) if (qstrcmp(buf, ".\r\n") == 0) break; result += " " + TQString(buf).left(strlen(buf) - 2) - .tqreplace(" ", "-"); + .replace(" ", "-"); } } if (supports_apop) @@ -866,15 +866,15 @@ void POP3Protocol::get(const KURL & url) return; } - if (((path.tqfind('/') == -1) && (path != "index") && (path != "uidl") + if (((path.find('/') == -1) && (path != "index") && (path != "uidl") && (path != "commit"))) { error(ERR_MALFORMED_URL, url.url()); m_cmd = CMD_NONE; return; } - cmd = path.left(path.tqfind('/')); - path.remove(0, path.tqfind('/') + 1); + cmd = path.left(path.find('/')); + path.remove(0, path.find('/') + 1); if (!pop3_open()) { POP3_DEBUG << "pop3_open failed" << endl; @@ -949,13 +949,13 @@ void POP3Protocol::get(const KURL & url) if ( command(list_cmd.ascii(), buf, sizeof(buf) - 1) == Ok ) { list_cmd = buf; // We need a space, otherwise we got an invalid reply - if (!list_cmd.tqfind(" ")) { + if (!list_cmd.find(" ")) { POP3_DEBUG << "List command needs a space? " << list_cmd << endl; closeConnection(); error(ERR_INTERNAL, i18n("Unexpected response from POP3 server.")); return; } - list_cmd.remove(0, list_cmd.tqfind(" ") + 1); + list_cmd.remove(0, list_cmd.find(" ") + 1); msg_len = list_cmd.toUInt(&ok); if (!ok) { POP3_DEBUG << "LIST command needs to return a number? :" << @@ -1134,13 +1134,13 @@ void POP3Protocol::listDir(const KURL &) } POP3_DEBUG << "The stat buf is :" << buf << ":" << endl; q_buf = buf; - if (q_buf.tqfind(" ") == -1) { + if (q_buf.find(" ") == -1) { error(ERR_INTERNAL, "Invalid POP3 response, we should have at least one space!"); closeConnection(); return; } - q_buf.remove(q_buf.tqfind(" "), q_buf.length()); + q_buf.remove(q_buf.find(" "), q_buf.length()); num_messages = q_buf.toUInt(&isINT); if (!isINT) { diff --git a/kioslave/remote/kdedmodule/remotedirnotify.cpp b/kioslave/remote/kdedmodule/remotedirnotify.cpp index f87c6bb96..e6e2359a6 100644 --- a/kioslave/remote/kdedmodule/remotedirnotify.cpp +++ b/kioslave/remote/kdedmodule/remotedirnotify.cpp @@ -105,7 +105,7 @@ inline void evil_hack(const KURL::List &list) { KURL url = (*it).upURL(); - if (!notified.tqcontains(url)) + if (!notified.contains(url)) { notifier.FilesAdded(url); notified.append(url); diff --git a/kioslave/remote/kio_remote.cpp b/kioslave/remote/kio_remote.cpp index 68325fbb7..646a99d30 100644 --- a/kioslave/remote/kio_remote.cpp +++ b/kioslave/remote/kio_remote.cpp @@ -76,7 +76,7 @@ void RemoteProtocol::listDir(const KURL &url) return; } - int second_slash_idx = url.path().tqfind( '/', 1 ); + int second_slash_idx = url.path().find( '/', 1 ); TQString root_dirname = url.path().mid( 1, second_slash_idx-1 ); KURL target = m_impl.findBaseURL( root_dirname ); @@ -151,7 +151,7 @@ void RemoteProtocol::stat(const KURL &url) return; } - int second_slash_idx = url.path().tqfind( '/', 1 ); + int second_slash_idx = url.path().find( '/', 1 ); TQString root_dirname = url.path().mid( 1, second_slash_idx-1 ); if ( second_slash_idx==-1 || ( (int)url.path().length() )==second_slash_idx+1 ) diff --git a/kioslave/remote/remoteimpl.cpp b/kioslave/remote/remoteimpl.cpp index ed117d03f..47e41b821 100644 --- a/kioslave/remote/remoteimpl.cpp +++ b/kioslave/remote/remoteimpl.cpp @@ -74,7 +74,7 @@ void RemoteImpl::listRoot(TQValueList &list) const for(; name!=endf; ++name) { - if (!names_found.tqcontains(*name)) + if (!names_found.contains(*name)) { entry.clear(); createEntry(entry, *dirpath, *name); diff --git a/kioslave/sftp/ksshprocess.cpp b/kioslave/sftp/ksshprocess.cpp index 6dfdb2419..ac425212d 100644 --- a/kioslave/sftp/ksshprocess.cpp +++ b/kioslave/sftp/ksshprocess.cpp @@ -266,7 +266,7 @@ KSshProcess::SshVersion KSshProcess::version() { mVersion = UNKNOWN_VER; for(int i = 0; i < SSH_VER_MAX; i++) { - if( ver.tqfind(versionStrs[i]) != -1 ) { + if( ver.find(versionStrs[i]) != -1 ) { mVersion = (SshVersion)i; break; } @@ -380,8 +380,8 @@ bool KSshProcess::setOptions(const SshOptList& opts) { // since KSshProcess depends on specific setting of these for // preforming authentication correctly. tmp = (*it).str.latin1(); - if( tmp.tqcontains("NumberOfPasswordPrompts") || - tmp.tqcontains("StrictHostKeyChecking") ) { + if( tmp.contains("NumberOfPasswordPrompts") || + tmp.contains("StrictHostKeyChecking") ) { mError = ERR_INVALID_OPT; return false; } @@ -776,26 +776,26 @@ bool KSshProcess::connect() { i18n("Error encountered while talking to ssh."); mConnectState = STATE_FATAL; } - else if( line.tqfind(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { + else if( line.find(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { mConnectState = STATE_TRY_PASSWD; } - else if( line.tqfind(passphrasePrompt[mVersion]) != -1 ) { + else if( line.find(passphrasePrompt[mVersion]) != -1 ) { mConnectState = STATE_TRY_PASSPHRASE; } - else if( line.tqfind(authSuccessMsg[mVersion]) != -1 ) { + else if( line.find(authSuccessMsg[mVersion]) != -1 ) { return true; } - else if( line.tqfind(authFailedMsg[mVersion]) != -1 - && line.tqfind(tryAgainMsg[mVersion]) == -1 ) { + else if( line.find(authFailedMsg[mVersion]) != -1 + && line.find(tryAgainMsg[mVersion]) == -1 ) { mConnectState = STATE_AUTH_FAILED; } - else if( line.tqfind(hostKeyMissingMsg[mVersion]) != -1 ) { + else if( line.find(hostKeyMissingMsg[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_WAIT_CONTINUE; } - else if( line.tqfind(hostKeyChangedMsg[mVersion]) != -1 ) { + else if( line.find(hostKeyChangedMsg[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { + else if( line.find(continuePrompt[mVersion]) != -1 ) { //mConnectState = STATE_SEND_CONTINUE; kdDebug(KSSHPROC) << "KSshProcess:connect(): " "Got continue prompt where we shouldn't (STATE_WAIT_PROMPT)" @@ -804,12 +804,12 @@ bool KSshProcess::connect() { mErrorMsg = i18n("Error encountered while talking to ssh."); } - else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.find(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.tqfind(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) { + else if( line.find(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) { // always say yes to this. It always comes after commerical ssh // prints a "continue to connect prompt". We assume that if the // user choose to continue, then they also want to save the @@ -924,9 +924,9 @@ bool KSshProcess::connect() { i18n("Error encountered while talking to ssh."); mConnectState = STATE_FATAL; } - else if( (line.tqfind(authFailedMsg[mVersion]) != -1 - && line.tqfind(tryAgainMsg[mVersion]) == -1) - || line.tqfind(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.find(authFailedMsg[mVersion]) != -1 + && line.find(tryAgainMsg[mVersion]) == -1) + || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { mError = ERR_AUTH_FAILED_NEW_KEY; mErrorMsg = i18n( "The identity of the remote host '%1' could not be verified " @@ -948,15 +948,15 @@ bool KSshProcess::connect() { mConnectState = STATE_FATAL; } - else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { + else if( line.find(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_CONTINUE; } - else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.find(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { mKeyFingerprint = keyFingerprintMsg[mVersion].cap(); kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl; mConnectState = STATE_NEW_KEY_WAIT_CONTINUE; @@ -996,9 +996,9 @@ bool KSshProcess::connect() { i18n("Error encountered while talking to ssh."); mConnectState = STATE_FATAL; } - else if( (line.tqfind(authFailedMsg[mVersion]) != -1 - && line.tqfind(tryAgainMsg[mVersion]) == -1) - || line.tqfind(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.find(authFailedMsg[mVersion]) != -1 + && line.find(tryAgainMsg[mVersion]) == -1) + || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { mError = ERR_AUTH_FAILED_DIFF_KEY; mErrorMsg = i18n( "WARNING: The identity of the remote host '%1' has changed!\n\n" @@ -1011,15 +1011,15 @@ bool KSshProcess::connect() { ).arg(mHost).arg(mKeyFingerprint).arg(mKnownHostsFile); mConnectState = STATE_FATAL; } - else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { + else if( line.find(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_CONTINUE; } - else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { mKeyFingerprint = keyFingerprintMsg[mVersion].cap(); kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl; mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.tqfind(knownHostsFileMsg[mVersion]) != -1 ) { + else if( line.find(knownHostsFileMsg[mVersion]) != -1 ) { mKnownHostsFile = (knownHostsFileMsg[mVersion]).cap(1); kdDebug(KSSHPROC) << "Found known hosts file name: " << mKnownHostsFile << endl; mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; diff --git a/kioslave/sftp/process.cpp b/kioslave/sftp/process.cpp index b97d5860b..ca99b36bb 100644 --- a/kioslave/sftp/process.cpp +++ b/kioslave/sftp/process.cpp @@ -107,7 +107,7 @@ TQCString MyPtyProcess::readLineFrom(int fd, TQCString& inbuf, bool block) if (!inbuf.isEmpty()) { - pos = inbuf.tqfind('\n'); + pos = inbuf.find('\n'); if (pos == -1) { @@ -155,7 +155,7 @@ TQCString MyPtyProcess::readLineFrom(int fd, TQCString& inbuf, bool block) buf[nbytes] = '\000'; inbuf += buf; - pos = inbuf.tqfind('\n'); + pos = inbuf.find('\n'); if (pos == -1) { ret = inbuf; @@ -260,7 +260,7 @@ int MyPtyProcess::exec(TQCString command, QCStringList args) // From now on, terminal output goes through the tty. TQCString path; - if (command.tqcontains('/')) + if (command.contains('/')) path = command; else { diff --git a/kioslave/smb/kio_smb_auth.cpp b/kioslave/smb/kio_smb_auth.cpp index 12b8a1366..1d2ff05e4 100644 --- a/kioslave/smb/kio_smb_auth.cpp +++ b/kioslave/smb/kio_smb_auth.cpp @@ -118,7 +118,7 @@ bool SMBSlave::checkPassword(SMBUrl &url) info.url.setHost(url.host()); TQString share = url.path(); - int index = share.tqfind('/', 1); + int index = share.find('/', 1); if (index > 1) share = share.left(index); if (share.tqat(0) == '/') diff --git a/kioslave/smb/kio_smb_browse.cpp b/kioslave/smb/kio_smb_browse.cpp index 81f08a94a..d8ac6d60d 100644 --- a/kioslave/smb/kio_smb_browse.cpp +++ b/kioslave/smb/kio_smb_browse.cpp @@ -208,13 +208,13 @@ KURL SMBSlave::checkURL(const KURL& kurl) const // smb:/ normaly have no userinfo // we must redirect ourself to remove the username and password - if (surl.tqcontains('@') && !surl.tqcontains("smb://")) { + if (surl.contains('@') && !surl.contains("smb://")) { KURL url(kurl); - url.setPath("/"+kurl.url().right( kurl.url().length()-kurl.url().tqfind('@') -1)); - TQString userinfo = kurl.url().mid(5, kurl.url().tqfind('@')-5); - if(userinfo.tqcontains(':')) { - url.setUser(userinfo.left(userinfo.tqfind(':'))); - url.setPass(userinfo.right(userinfo.length()-userinfo.tqfind(':')-1)); + url.setPath("/"+kurl.url().right( kurl.url().length()-kurl.url().find('@') -1)); + TQString userinfo = kurl.url().mid(5, kurl.url().find('@')-5); + if(userinfo.contains(':')) { + url.setUser(userinfo.left(userinfo.find(':'))); + url.setPass(userinfo.right(userinfo.length()-userinfo.find(':')-1)); } else { url.setUser(userinfo); } diff --git a/kioslave/smb/kio_smb_mount.cpp b/kioslave/smb/kio_smb_mount.cpp index 97fcd3d0d..a3177b5c6 100644 --- a/kioslave/smb/kio_smb_mount.cpp +++ b/kioslave/smb/kio_smb_mount.cpp @@ -59,7 +59,7 @@ void SMBSlave::special( const TQByteArray & data) kdDebug(KIO_SMB)<<"special() host -"<< host <<"- share -" << share <<"-"<', ">" ) - .tqreplace( '<', "<" ) - .tqreplace( '"', """ ) + .replace( '&', "&" ) + .replace( '>', ">" ) + .replace( '<', "<" ) + .replace( '"', """ ) ; } diff --git a/kioslave/smtp/request.cc b/kioslave/smtp/request.cc index 22042769b..05f8bdc99 100644 --- a/kioslave/smtp/request.cc +++ b/kioslave/smtp/request.cc @@ -50,7 +50,7 @@ namespace KioSMTP { kdDebug(7112) << "Parsing request from query:\n" + query.join("\n" ) << endl; #endif for ( TQStringList::const_iterator it = query.begin() ; it != query.end() ; ++it ) { - int equalsPos = (*it).tqfind( '=' ); + int equalsPos = (*it).find( '=' ); if ( equalsPos <= 0 ) continue; @@ -101,7 +101,7 @@ namespace KioSMTP { static inline bool isSpecial( char ch ) { static const TQCString specials = "()<>[]:;@\\,.\""; - return specials.tqfind( ch ) >= 0; + return specials.find( ch ) >= 0; } diff --git a/kioslave/smtp/smtp.cc b/kioslave/smtp/smtp.cc index 883ee3ebb..e493f5132 100644 --- a/kioslave/smtp/smtp.cc +++ b/kioslave/smtp/smtp.cc @@ -200,7 +200,7 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ , KURL open_url = url; if ( !request.hasProfile() ) { //kdDebug(7112) << "kio_smtp: Profile is null" << endl; - bool hasProfile = mset.profiles().tqcontains( open_url.host() ); + bool hasProfile = mset.profiles().contains( open_url.host() ); if ( hasProfile ) { mset.setProfile(open_url.host()); open_url.setHost(mset.getSetting(KEMailSettings::OutServer)); diff --git a/kioslave/smtp/test_commands.cc b/kioslave/smtp/test_commands.cc index fd3adb949..23d7723ee 100644 --- a/kioslave/smtp/test_commands.cc +++ b/kioslave/smtp/test_commands.cc @@ -55,7 +55,7 @@ public: } bool usingSSL() const { return usesSSL; } bool usingTLS() const { return usesTLS; } - bool haveCapability( const char * cap ) const { return caps.tqcontains( cap ); } + bool haveCapability( const char * cap ) const { return caps.contains( cap ); } void error( int id, const TQString & msg ) { lastErrorCode = id; lastErrorMessage = msg; diff --git a/kioslave/system/kdedmodule/systemdirnotify.cpp b/kioslave/system/kdedmodule/systemdirnotify.cpp index 70d9057a6..162d96621 100644 --- a/kioslave/system/kdedmodule/systemdirnotify.cpp +++ b/kioslave/system/kdedmodule/systemdirnotify.cpp @@ -59,7 +59,7 @@ void SystemDirNotify::init() for(; name!=endf; ++name) { - if (!names_found.tqcontains(*name)) + if (!names_found.contains(*name)) { KDesktopFile desktop(*dirpath+*name, true); diff --git a/kioslave/system/systemimpl.cpp b/kioslave/system/systemimpl.cpp index 4dc5e3008..43792f8de 100644 --- a/kioslave/system/systemimpl.cpp +++ b/kioslave/system/systemimpl.cpp @@ -62,7 +62,7 @@ bool SystemImpl::listRoot(TQValueList &list) for(; filename!=endf; ++filename) { - if (!names_found.tqcontains(*filename)) + if (!names_found.contains(*filename)) { entry.clear(); createEntry(entry, *dirpath, *filename); @@ -82,7 +82,7 @@ bool SystemImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { TQString url_path = url.path(); - int i = url_path.tqfind('/', 1); + int i = url_path.find('/', 1); if (i > 0) { name = url_path.mid(1, i-1); diff --git a/kioslave/tar/tar.cc b/kioslave/tar/tar.cc index b55fd317e..2079666a0 100644 --- a/kioslave/tar/tar.cc +++ b/kioslave/tar/tar.cc @@ -103,7 +103,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Erro kdDebug(7109) << "the full path is " << fullPath << endl; KDE_struct_stat statbuf; statbuf.st_mode = 0; // be sure to clear the directory bit - while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 ) + while ( (pos=fullPath.find( '/', pos+1 )) != -1 ) { TQString tryPath = fullPath.left( pos ); kdDebug(7109) << fullPath << " trying " << tryPath << endl; diff --git a/kioslave/thumbnail/textcreator.cpp b/kioslave/thumbnail/textcreator.cpp index d2960fa7e..749dd4816 100644 --- a/kioslave/thumbnail/textcreator.cpp +++ b/kioslave/thumbnail/textcreator.cpp @@ -148,7 +148,7 @@ bool TextCreator::create(const TQString &path, int width, int height, TQImage &i // physical newline in the file if we don't come from one if ( !newLine ) { - int pos = text.tqfind( '\n', i ); + int pos = text.find( '\n', i ); if ( pos == -1 ) break; i = pos + 1; diff --git a/kioslave/thumbnail/thumbnail.cpp b/kioslave/thumbnail/thumbnail.cpp index 55ac3c80b..1560a1431 100644 --- a/kioslave/thumbnail/thumbnail.cpp +++ b/kioslave/thumbnail/thumbnail.cpp @@ -417,7 +417,7 @@ void ThumbnailProtocol::get(const KURL &url) const TQImage& ThumbnailProtocol::getIcon() { - TQImage* icon = m_iconDict.tqfind(m_mimeType); + TQImage* icon = m_iconDict.find(m_mimeType); if ( !icon ) // generate it! { icon = new TQImage( KMimeType::mimeType(m_mimeType)->pixmap( KIcon::Desktop, m_iconSize ).convertToImage() ); diff --git a/kioslave/trash/ktrash.cpp b/kioslave/trash/ktrash.cpp index 4f85ba50c..0c9710367 100644 --- a/kioslave/trash/ktrash.cpp +++ b/kioslave/trash/ktrash.cpp @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) TQCString restoreArg = args->getOption( "restore" ); if ( !restoreArg.isEmpty() ) { - if (restoreArg.tqfind("system:/trash")==0) { + if (restoreArg.find("system:/trash")==0) { restoreArg.remove(0, 13); restoreArg.prepend("trash:"); } diff --git a/kioslave/trash/testtrash.cpp b/kioslave/trash/testtrash.cpp index c847d9302..fb6927d3e 100644 --- a/kioslave/trash/testtrash.cpp +++ b/kioslave/trash/testtrash.cpp @@ -152,10 +152,10 @@ void TestTrash::setup() for ( TrashImpl::TrashDirMap::ConstIterator it = trashDirs.begin(); it != trashDirs.end() ; ++it ) { if ( it.key() == 0 ) { assert( it.data() == m_trashDir ); - assert( topDirs.tqfind( 0 ) == topDirs.end() ); + assert( topDirs.find( 0 ) == topDirs.end() ); foundTrashDir = true; } else { - assert( topDirs.tqfind( it.key() ) != topDirs.end() ); + assert( topDirs.find( it.key() ) != topDirs.end() ); const TQString topdir = topDirs[it.key()]; if ( TQFileInfo( topdir ).isWritable() ) { writableTopDirs.append( it.key() ); @@ -383,7 +383,7 @@ static void checkInfoFile( const TQString& infoPath, const TQString& origFilePat assert( origPath == KURL::encode_string( origFilePath, KGlobal::locale()->fileEncodingMib() ) ); const TQString date = infoFile.readEntry( "DeletionDate" ); assert( !date.isEmpty() ); - assert( date.tqcontains( "T" ) ); + assert( date.contains( "T" ) ); } static void createTestFile( const TQString& path ) @@ -1104,7 +1104,7 @@ void TestTrash::listRootDir() assert( m_entryCount > 1 ); kdDebug() << k_funcinfo << m_listResult << endl; - assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 1 ); // found it, and only once } void TestTrash::listRecursiveRootDir() @@ -1121,7 +1121,7 @@ void TestTrash::listRecursiveRootDir() assert( m_entryCount > 1 ); kdDebug() << k_funcinfo << m_listResult << endl; - assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 1 ); // found it, and only once } void TestTrash::listSubDir() @@ -1138,8 +1138,8 @@ void TestTrash::listSubDir() assert( m_entryCount == 2 ); kdDebug() << k_funcinfo << m_listResult << endl; - assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once - assert( m_listResult.tqcontains( "testfile" ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "testfile" ) == 1 ); // found it, and only once } void TestTrash::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) diff --git a/kioslave/trash/trashimpl.cpp b/kioslave/trash/trashimpl.cpp index 80343c98a..8718dfe5f 100644 --- a/kioslave/trash/trashimpl.cpp +++ b/kioslave/trash/trashimpl.cpp @@ -898,7 +898,7 @@ TQString TrashImpl::trashDirectoryPath( int trashId ) const // and reusing a directory listing from the earlier instance.) if ( !m_trashDirectoriesScanned ) scanTrashDirectories(); - Q_ASSERT( m_trashDirectories.tqcontains( trashId ) ); + Q_ASSERT( m_trashDirectories.contains( trashId ) ); return m_trashDirectories[trashId]; } @@ -907,7 +907,7 @@ TQString TrashImpl::topDirectoryPath( int trashId ) const if ( !m_trashDirectoriesScanned ) scanTrashDirectories(); assert( trashId != 0 ); - Q_ASSERT( m_topDirectories.tqcontains( trashId ) ); + Q_ASSERT( m_topDirectories.contains( trashId ) ); return m_topDirectories[trashId]; } @@ -939,7 +939,7 @@ bool TrashImpl::parseURL( const KURL& url, int& trashId, TQString& fileId, TQStr int start = 0; if ( path[0] == '/' ) // always true I hope start = 1; - int slashPos = path.tqfind( '-', 0 ); // don't match leading slash + int slashPos = path.find( '-', 0 ); // don't match leading slash if ( slashPos <= 0 ) return false; bool ok = false; @@ -948,7 +948,7 @@ bool TrashImpl::parseURL( const KURL& url, int& trashId, TQString& fileId, TQStr if ( !ok ) return false; start = slashPos + 1; - slashPos = path.tqfind( '/', start ); + slashPos = path.find( '/', start ); if ( slashPos <= 0 ) { fileId = path.mid( start ); relativePath = TQString::null; diff --git a/klipper/popupproxy.cpp b/klipper/popupproxy.cpp index 38e6a1e16..cff763ff6 100644 --- a/klipper/popupproxy.cpp +++ b/klipper/popupproxy.cpp @@ -94,7 +94,7 @@ void PopupProxy::tryInsertItem( HistoryItem const * const item, // Squeeze text strings so that do not take up the entire screen (or more) TQString text( KStringHandler::cPixelSqueeze(item->text().simplifyWhiteSpace(), proxy_for_menu->fontMetrics(), - m_menu_width).tqreplace( "&", "&&" ) ); + m_menu_width).replace( "&", "&&" ) ); id = proxy_for_menu->insertItem( text, -1, index ); } else { const TQSize max_size( m_menu_width,m_menu_height/4 ); @@ -107,7 +107,7 @@ void PopupProxy::tryInsertItem( HistoryItem const * const item, // Determine height of a menu item. Q_ASSERT( id != -1 ); // Be sure that the item was inserted. - TQMenuItem* mi = proxy_for_menu->tqfindItem( id ); + TQMenuItem* mi = proxy_for_menu->findItem( id ); int fontheight = TQFontMetrics( proxy_for_menu->fontMetrics() ).height(); int itemheight = proxy_for_menu->tqstyle().tqsizeFromContents(TQStyle::CT_PopupMenuItem, proxy_for_menu, diff --git a/klipper/urlgrabber.cpp b/klipper/urlgrabber.cpp index 43640d691..de6561fe3 100644 --- a/klipper/urlgrabber.cpp +++ b/klipper/urlgrabber.cpp @@ -224,8 +224,8 @@ void URLGrabber::slotItemSelected( int id ) emit sigDisablePopup(); break; default: - ClipCommand *command = myCommandMapper.tqfind( id ); - TQStringList *backrefs = myGroupingMapper.tqfind( id ); + ClipCommand *command = myCommandMapper.find( id ); + TQStringList *backrefs = myGroupingMapper.find( id ); if ( !command || !backrefs ) qWarning("Klipper: can't find associated action"); else @@ -365,7 +365,7 @@ bool URLGrabber::isAvoidedWindow() const &unused, &data_ret ) == Success) { if ( type_ret == XA_STRING && format_ret == 8 && nitems_ret > 0 ) { wmClass = TQString::fromUtf8( (const char *) data_ret ); - ret = (myAvoidWindows.tqfind( wmClass ) != myAvoidWindows.end()); + ret = (myAvoidWindows.find( wmClass ) != myAvoidWindows.end()); } XFree( data_ret ); @@ -379,7 +379,7 @@ void URLGrabber::slotKillPopupMenu() { if ( myMenu && myMenu->isVisible() ) { - if ( myMenu->tqgeometry().tqcontains( TQCursor::pos() ) && + if ( myMenu->tqgeometry().contains( TQCursor::pos() ) && myPopupKillTimeout > 0 ) { myPopupKillTimer->start( 1000 * myPopupKillTimeout, true ); @@ -400,7 +400,7 @@ ClipCommand::ClipCommand(const TQString &_command, const TQString &_description, description(_description), isEnabled(_isEnabled) { - int len = command.tqfind(" "); + int len = command.find(" "); if (len == -1) len = command.length(); diff --git a/kmenuedit/menufile.cpp b/kmenuedit/menufile.cpp index db4c64cdf..d1582c23b 100644 --- a/kmenuedit/menufile.cpp +++ b/kmenuedit/menufile.cpp @@ -123,7 +123,7 @@ TQDomElement MenuFile::findMenu(TQDomElement elem, const TQString &menuName, boo { TQString menuNodeName; TQString subMenuName; - int i = menuName.tqfind('/'); + int i = menuName.find('/'); if (i >= 0) { menuNodeName = menuName.left(i); @@ -200,7 +200,7 @@ static TQString entryToDirId(const TQString &path) if (local.isEmpty() || local.startsWith("/")) { // What now? Use filename only and hope for the best. - local = path.mid(path.tqfindRev('/')+1); + local = path.mid(path.findRev('/')+1); } return local; } @@ -468,7 +468,7 @@ TQString MenuFile::uniqueMenuName(const TQString &menuName, const TQString &newM for(int n = 1; ++n; ) { - if (findMenu(elem, result, false).isNull() && !excludeList.tqcontains(result)) + if (findMenu(elem, result, false).isNull() && !excludeList.contains(result)) return result; result.truncate(trunc); diff --git a/kmenuedit/menuinfo.cpp b/kmenuedit/menuinfo.cpp index db5df8281..68aae34ba 100644 --- a/kmenuedit/menuinfo.cpp +++ b/kmenuedit/menuinfo.cpp @@ -53,13 +53,13 @@ void MenuFolderInfo::add(MenuFolderInfo *info, bool initial) // Remove sub menu (without deleting it) void MenuFolderInfo::take(MenuFolderInfo *info) { - subFolders.take(subFolders.tqfindRef(info)); + subFolders.take(subFolders.findRef(info)); } // Remove sub menu (without deleting it) bool MenuFolderInfo::takeRecursive(MenuFolderInfo *info) { - int i = subFolders.tqfindRef(info); + int i = subFolders.findRef(info); if (i >= 0) { subFolders.take(i); @@ -489,14 +489,14 @@ bool MenuEntryInfo::isShortcutAvailable(const KShortcut &_shortcut) { s_allShortcuts = new TQStringList(KHotKeys::allShortCuts()); } - available = !s_allShortcuts->tqcontains(shortcutKey); + available = !s_allShortcuts->contains(shortcutKey); if (available && s_newShortcuts) { - available = !s_newShortcuts->tqcontains(shortcutKey); + available = !s_newShortcuts->contains(shortcutKey); } if (!available && s_freeShortcuts) { - available = s_freeShortcuts->tqcontains(shortcutKey); + available = s_freeShortcuts->contains(shortcutKey); } return available; } diff --git a/kmenuedit/treeview.cpp b/kmenuedit/treeview.cpp index ef2e0508a..c657120ef 100644 --- a/kmenuedit/treeview.cpp +++ b/kmenuedit/treeview.cpp @@ -278,7 +278,7 @@ void TreeView::readMenuFolderInfo(MenuFolderInfo *folderInfo, KServiceGroup::Ptr folderInfo->directoryFile = folder->directoryEntryPath(); folderInfo->icon = folder->icon(); TQString id = folder->relPath(); - int i = id.tqfindRev('/', -2); + int i = id.findRev('/', -2); id = id.mid(i+1); folderInfo->id = id; folderInfo->fullId = prefix + id; @@ -472,7 +472,7 @@ void TreeView::selectMenu(const TQString &menu) TreeItem *item = 0; do { - int i = restMenu.tqfind("/"); + int i = restMenu.find("/"); TQString subMenu = restMenu.left(i+1); restMenu = restMenu.mid(i+1); @@ -592,7 +592,7 @@ TQStringList TreeView::fileList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList filelist; @@ -611,7 +611,7 @@ TQStringList TreeView::fileList(const TQString& rPath) TQStringList files = dir.entryList(); for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { // does not work?! - //if (filelist.tqcontains(*it)) continue; + //if (filelist.contains(*it)) continue; if (relativePath.isEmpty()) { filelist.remove(*it); // hack @@ -631,7 +631,7 @@ TQStringList TreeView::dirList(const TQString& rPath) TQString relativePath = rPath; // truncate "/.directory" - int pos = relativePath.tqfindRev("/.directory"); + int pos = relativePath.findRev("/.directory"); if (pos > 0) relativePath.truncate(pos); TQStringList dirlist; @@ -649,7 +649,7 @@ TQStringList TreeView::dirList(const TQString& rPath) for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) { if ((*it) == "." || (*it) == "..") continue; // does not work?! - // if (dirlist.tqcontains(*it)) continue; + // if (dirlist.contains(*it)) continue; if (relativePath.isEmpty()) { dirlist.remove(*it); //hack @@ -679,8 +679,8 @@ bool TreeView::acceptDrag(TQDropEvent* e) const static TQString createDesktopFile(const TQString &file, TQString *menuId, TQStringList *excludeList) { - TQString base = file.mid(file.tqfindRev('/')+1); - base = base.left(base.tqfindRev('.')); + TQString base = file.mid(file.findRev('/')+1); + base = base.left(base.findRev('.')); TQRegExp r("(.*)(?=-\\d+)"); base = (r.search(base) > -1) ? r.cap(1) : base; @@ -703,8 +703,8 @@ static KDesktopFile *copyDesktopFile(MenuEntryInfo *entryInfo, TQString *menuId, static TQString createDirectoryFile(const TQString &file, TQStringList *excludeList) { - TQString base = file.mid(file.tqfindRev('/')+1); - base = base.left(base.tqfindRev('.')); + TQString base = file.mid(file.findRev('/')+1); + base = base.left(base.findRev('.')); TQString result; int i = 1; @@ -715,7 +715,7 @@ static TQString createDirectoryFile(const TQString &file, TQStringList *excludeL else result = base + TQString("-%1.directory").arg(i); - if (!excludeList->tqcontains(result)) + if (!excludeList->contains(result)) { if (locate("xdgdata-dirs", result).isEmpty()) break; @@ -997,7 +997,7 @@ void TreeView::newsubmenu() if (!ok) return; TQString file = caption; - file.tqreplace('/', '-'); + file.replace('/', '-'); file = createDirectoryFile(file, &m_newDirectoryList); // Create @@ -1069,7 +1069,7 @@ void TreeView::newitem() TQString menuId; TQString file = caption; - file.tqreplace('/', '-'); + file.replace('/', '-'); file = createDesktopFile(file, &menuId, &m_newMenuIds); // Create diff --git a/knetattach/knetattach.ui.h b/knetattach/knetattach.ui.h index 5d3ad0b3f..f60dab03e 100644 --- a/knetattach/knetattach.ui.h +++ b/knetattach/knetattach.ui.h @@ -190,7 +190,7 @@ void KNetAttach::finished() recent.setGroup("General"); TQStringList idx = recent.readListEntry("Index"); recent.deleteGroup(name); // erase anything stale - if (idx.tqcontains(name)) { + if (idx.contains(name)) { idx.remove(name); idx.prepend(name); recent.writeEntry("Index", idx); diff --git a/konqueror/KonquerorIface.cc b/konqueror/KonquerorIface.cc index a512f5686..2f87bae8e 100644 --- a/konqueror/KonquerorIface.cc +++ b/konqueror/KonquerorIface.cc @@ -280,7 +280,7 @@ bool KonquerorIface::processCanBeReused( int screen ) ++it2 ) { kdDebug(1202) << "processCanBeReused: part=" << (*it2)->service()->desktopEntryPath() << ", URL=" << (*it2)->url().prettyURL() << endl; - if( !allowed_parts.tqcontains( (*it2)->service()->desktopEntryPath())) + if( !allowed_parts.contains( (*it2)->service()->desktopEntryPath())) return false; } } diff --git a/konqueror/about/konq_aboutpage.cc b/konqueror/about/konq_aboutpage.cc index 78722b1a4..188971bd9 100644 --- a/konqueror/about/konq_aboutpage.cc +++ b/konqueror/about/konq_aboutpage.cc @@ -78,11 +78,11 @@ TQString KonqAboutPageFactory::loadFile( const TQString& file ) // otherwise all embedded objects are referenced as about:/... TQString basehref = TQString::tqfromLatin1("\n"); TQRegExp reg(""); reg.setCaseSensitive(FALSE); - res.tqreplace(reg, "\n\t" + basehref); + res.replace(reg, "\n\t" + basehref); return res; } diff --git a/konqueror/client/kfmclient.cc b/konqueror/client/kfmclient.cc index b318a205b..1569b0dbc 100644 --- a/konqueror/client/kfmclient.cc +++ b/konqueror/client/kfmclient.cc @@ -227,7 +227,7 @@ static bool startNewKonqueror( TQString url, TQString mimetype, const TQString& KService::Ptr serv; if( offers.count() > 0 ) serv = offers.first(); - return serv == NULL || !allowed_parts.tqcontains( serv->desktopEntryName() + TQString::tqfromLatin1(".desktop") ); + return serv == NULL || !allowed_parts.contains( serv->desktopEntryName() + TQString::tqfromLatin1(".desktop") ); } static int currentScreen() diff --git a/konqueror/iconview/konq_iconview.cc b/konqueror/iconview/konq_iconview.cc index c6761ddcc..975376cb6 100644 --- a/konqueror/iconview/konq_iconview.cc +++ b/konqueror/iconview/konq_iconview.cc @@ -962,7 +962,7 @@ void KonqKfmIconView::slotNewItems( const KFileItemList& entries ) KFileItem* fileItem = item->item(); if ( !m_itemsToSelect.isEmpty() ) { - TQStringList::Iterator tsit = m_itemsToSelect.tqfind( fileItem->name() ); + TQStringList::Iterator tsit = m_itemsToSelect.find( fileItem->name() ); if ( tsit != m_itemsToSelect.end() ) { m_itemsToSelect.remove( tsit ); m_pIconView->setSelected( item, true, true ); diff --git a/konqueror/keditbookmarks/kbookmarkmerger.cpp b/konqueror/keditbookmarks/kbookmarkmerger.cpp index 222b0c89b..d34794fdc 100644 --- a/konqueror/keditbookmarks/kbookmarkmerger.cpp +++ b/konqueror/keditbookmarks/kbookmarkmerger.cpp @@ -108,7 +108,7 @@ int main( int argc, char**argv ) for ( unsigned int i = 0; i < extraBookmarksDir.count(); ++i ) { const TQString fileName = extraBookmarksDir[ i ]; - if ( mergedFiles.tqfind( fileName ) != mergedFiles.end() ) { + if ( mergedFiles.find( fileName ) != mergedFiles.end() ) { continue; } diff --git a/konqueror/keditbookmarks/listview.cpp b/konqueror/keditbookmarks/listview.cpp index 3f2be1e36..7f2d785ae 100644 --- a/konqueror/keditbookmarks/listview.cpp +++ b/konqueror/keditbookmarks/listview.cpp @@ -118,8 +118,8 @@ bool lessAddress(TQString a, TQString b) if(bLast +1 == bEnd) return false; - uint aNext = a.tqfind("/", aLast + 1); - uint bNext = b.tqfind("/", bLast + 1); + uint aNext = a.find("/", aLast + 1); + uint bNext = b.find("/", bLast + 1); bool okay; uint aNum = a.mid(aLast + 1, aNext - aLast - 1).toUInt(&okay); @@ -218,7 +218,7 @@ void ListView::selected(KEBListViewItem * item, bool s) if(s) mSelectedItems[item] = item; else - if((it = mSelectedItems.tqfind(item)) != mSelectedItems.end()) + if((it = mSelectedItems.find(item)) != mSelectedItems.end()) mSelectedItems.remove(it); KEBApp::self()->updateActions(); @@ -483,7 +483,7 @@ void ListView::fillWithGroup(KEBListView *lv, KBookmarkGroup group, KEBListViewI KEBListViewItem *tree = new KEBListViewItem(lv, group); fillWithGroup(lv, group, tree); tree->TQListViewItem::setOpen(true); - if (s_selected_addresses.tqcontains(tree->bookmark().address())) + if (s_selected_addresses.contains(tree->bookmark().address())) lv->setSelected(tree, true); if(!s_current_address.isNull() && s_current_address == tree->bookmark().address()) lv->setCurrentItem(tree); @@ -515,7 +515,7 @@ void ListView::fillWithGroup(KEBListView *lv, KBookmarkGroup group, KEBListViewI : new KEBListViewItem(lv, bk)); lastItem = item; } - if (s_selected_addresses.tqcontains(bk.address())) + if (s_selected_addresses.contains(bk.address())) lv->setSelected(item, true); if(!s_current_address.isNull() && s_current_address == bk.address()) lv->setCurrentItem(item); diff --git a/konqueror/keditbookmarks/testlink.cpp b/konqueror/keditbookmarks/testlink.cpp index dd2429ab1..0d7d0ddf8 100644 --- a/konqueror/keditbookmarks/testlink.cpp +++ b/konqueror/keditbookmarks/testlink.cpp @@ -107,10 +107,10 @@ void TestLinkItr::slotJobData(KIO::Job *job, const TQByteArray &data) { if (transfer->isErrorPage()) { TQStringList lines = TQStringList::split('\n', data); for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) { - int open_pos = (*it).tqfind("", 0, false); + int open_pos = (*it).find("<title>", 0, false); if (open_pos >= 0) { TQString leftover = (*it).mid(open_pos + 7); - int close_pos = leftover.tqfindRev("", -1, false); + int close_pos = leftover.findRev("", -1, false); if (close_pos >= 0) { // if no end tag found then just // print the first line of the @@ -144,7 +144,7 @@ void TestLinkItr::slotJobResult(KIO::Job *job) { // can we assume that errorString will contain no entities? TQString jerr = job->errorString(); if (!jerr.isEmpty()) { - jerr.tqreplace("\n", " "); + jerr.replace("\n", " "); curItem()->nsPut(jerr); chkErr = false; } @@ -166,13 +166,13 @@ void TestLinkItr::slotJobResult(KIO::Job *job) { /* -------------------------- */ const TQString TestLinkItrHolder::getMod(const TQString &url) const { - return m_modify.tqcontains(url) + return m_modify.contains(url) ? m_modify[url] : TQString::null; } const TQString TestLinkItrHolder::getOldVisit(const TQString &url) const { - return self()->m_oldModify.tqcontains(url) + return self()->m_oldModify.contains(url) ? self()->m_oldModify[url] : TQString::null; } diff --git a/konqueror/konq_actions.cc b/konqueror/konq_actions.cc index c67d27c8f..e60761b9c 100644 --- a/konqueror/konq_actions.cc +++ b/konqueror/konq_actions.cc @@ -63,7 +63,7 @@ void KonqBidiHistoryAction::fillHistoryPopup( const TQPtrList<HistoryEntry> &his { TQString text = it.current()->title; text = KStringHandler::cEmSqueeze(text, popup->fontMetrics(), 30); //CT: squeeze - text.tqreplace( "&", "&&" ); + text.replace( "&", "&&" ); if ( checkCurrentItem && it.current() == current ) { int id = popup->insertItem( text ); // no pixmap if checked diff --git a/konqueror/konq_combo.cc b/konqueror/konq_combo.cc index 0f13236e5..8febd505b 100644 --- a/konqueror/konq_combo.cc +++ b/konqueror/konq_combo.cc @@ -459,7 +459,7 @@ void KonqCombo::selectWord(TQKeyEvent *e) count++; if( allow_space_break && text[pos].isSpace() && count > 1 ) break; - } while( pos >= 0 && (chars.tqfindIndex(text[pos]) == -1 || count <= 1) ); + } while( pos >= 0 && (chars.findIndex(text[pos]) == -1 || count <= 1) ); if( e->state() & ShiftButton ) { edit->cursorForward(true, 1-count); @@ -482,7 +482,7 @@ void KonqCombo::selectWord(TQKeyEvent *e) count++; if( allow_space_break && text[pos].isSpace() ) break; - } while( pos < (int) text.length() && chars.tqfindIndex(text[pos]) == -1 ); + } while( pos < (int) text.length() && chars.findIndex(text[pos]) == -1 ); if( e->state() & ShiftButton ) { edit->cursorForward(true, count+1); @@ -701,7 +701,7 @@ void KonqComboListBoxPixmap::paint( TQPainter *painter ) title = titleOfURL( text() ); if ( !title.isEmpty() ) pm = KonqPixmapProvider::self()->pixmapFor( text(), KIcon::SizeSmall ); - else if ( text().tqfind( "://" ) == -1 ) { + else if ( text().find( "://" ) == -1 ) { title = titleOfURL( "http://"+text() ); if ( !title.isEmpty() ) pm = KonqPixmapProvider::self()->pixmapFor( "http://"+text(), KIcon::SizeSmall ); @@ -803,7 +803,7 @@ void KonqComboLineEdit::setCompletedItems( const TQStringList& items ) bool wasSelected = completionbox->isSelected( completionbox->currentItem() ); const TQString currentSelection = completionbox->currentText(); completionbox->setItems( items ); - TQListBoxItem* item = completionbox->tqfindItem( currentSelection, TQt::ExactMatch ); + TQListBoxItem* item = completionbox->findItem( currentSelection, TQt::ExactMatch ); if( !item || !wasSelected ) { wasSelected = false; @@ -824,7 +824,7 @@ void KonqComboLineEdit::setCompletedItems( const TQStringList& items ) } if ( autoSuggest() ) { - int index = items.first().tqfind( txt ); + int index = items.first().find( txt ); TQString newText = items.first().mid( index ); setUserSelection( false ); setCompletedText( newText, true ); diff --git a/konqueror/konq_factory.cc b/konqueror/konq_factory.cc index b7a3868af..e918f1ac3 100644 --- a/konqueror/konq_factory.cc +++ b/konqueror/konq_factory.cc @@ -189,7 +189,7 @@ KonqViewFactory KonqFactory::createView( const TQString &serviceType, args = TQStringList::split( " ", argStr ); } - return KonqViewFactory( factory, args, service->serviceTypes().tqcontains( "Browser/View" ) ); + return KonqViewFactory( factory, args, service->serviceTypes().contains( "Browser/View" ) ); } void KonqFactory::getOffers( const TQString & serviceType, diff --git a/konqueror/konq_guiclients.cc b/konqueror/konq_guiclients.cc index d3d3e1bcc..c9556f824 100644 --- a/konqueror/konq_guiclients.cc +++ b/konqueror/konq_guiclients.cc @@ -305,7 +305,7 @@ void ToggleViewGUIClient::saveConfig( bool add, const TQString &serviceName ) TQStringList toggableViewsShown = KonqSettings::toggableViewsShown(); if (add) { - if ( !toggableViewsShown.tqcontains( serviceName ) ) + if ( !toggableViewsShown.contains( serviceName ) ) toggableViewsShown.append(serviceName); } else diff --git a/konqueror/konq_main.cc b/konqueror/konq_main.cc index 67e815522..17888e8c8 100644 --- a/konqueror/konq_main.cc +++ b/konqueror/konq_main.cc @@ -93,7 +93,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) it != profiles.end(); ++it) { TQString file = *it; - file = file.mid(file.tqfindRev('/')+1); + file = file.mid(file.findRev('/')+1); printf("%s\n", TQFile::encodeName(file).data()); } diff --git a/konqueror/konq_mainwindow.cc b/konqueror/konq_mainwindow.cc index aa237261f..26422cf1b 100644 --- a/konqueror/konq_mainwindow.cc +++ b/konqueror/konq_mainwindow.cc @@ -418,7 +418,7 @@ static TQString detectNameFilter( KURL & url ) // Look for wildcard selection TQString nameFilter; TQString path = url.path(); - int lastSlash = path.tqfindRev( '/' ); + int lastSlash = path.findRev( '/' ); if ( lastSlash > -1 ) { if ( !url.query().isEmpty() && lastSlash == (int)path.length()-1 ) { // In /tmp/?foo, foo isn't a query @@ -426,7 +426,7 @@ static TQString detectNameFilter( KURL & url ) url.setQuery( TQString::null ); } const TQString fileName = path.mid( lastSlash + 1 ); - if ( fileName.tqfind( '*' ) != -1 || fileName.tqfind( '[' ) != -1 || fileName.tqfind( '?' ) != -1 ) + if ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 ) { // Check that a file or dir with all the special chars in the filename doesn't exist if ( url.isLocalFile() ? !TQFile::exists( path ) : !KIO::NetAccess::exists( url, false, 0 ) ) @@ -489,7 +489,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url, if (url.url().startsWith("$(")) { // check for environment variables and make necessary translations TQString aValue = url.url(); - int nDollarPos = aValue.tqfind( '$' ); + int nDollarPos = aValue.find( '$' ); while( nDollarPos != -1 && nDollarPos+1 < static_cast<int>(aValue.length())) { // there is at least one $ @@ -511,7 +511,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url, } pclose(fs); } - aValue.tqreplace( nDollarPos, nEndPos-nDollarPos, result ); + aValue.replace( nDollarPos, nEndPos-nDollarPos, result ); } else if( (aValue)[nDollarPos+1] != '$' ) { uint nEndPos = nDollarPos+1; // the next character is no $ @@ -537,7 +537,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url, // !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!! // A environment variables may contain values in 8bit // locale cpecified encoding or in UTF8 encoding. - aValue.tqreplace( nDollarPos, nEndPos-nDollarPos, KStringHandler::from8Bit( pEnv ) ); + aValue.replace( nDollarPos, nEndPos-nDollarPos, KStringHandler::from8Bit( pEnv ) ); } else aValue.remove( nDollarPos, nEndPos-nDollarPos ); } else { @@ -545,7 +545,7 @@ void KonqMainWindow::openURL( KonqView *_view, const KURL &_url, aValue.remove( nDollarPos, 1 ); nDollarPos++; } - nDollarPos = aValue.tqfind( '$', nDollarPos ); + nDollarPos = aValue.find( '$', nDollarPos ); } url = KURL(aValue); } @@ -1548,7 +1548,7 @@ void KonqMainWindow::slotFindOpen( KonqDirPart * dirPart ) void KonqMainWindow::slotFindClosed( KonqDirPart * dirPart ) { kdDebug(1202) << "KonqMainWindow::slotFindClosed " << dirPart << endl; - KonqView * dirView = m_mapViews.tqfind( dirPart ).data(); + KonqView * dirView = m_mapViews.find( dirPart ).data(); Q_ASSERT(dirView); kdDebug(1202) << "dirView=" << dirView << endl; if ( dirView && dirView == m_currentView ) @@ -1815,7 +1815,7 @@ void KonqMainWindow::slotReload( KonqView* reloadView ) if ( !reloadView || reloadView->url().isEmpty() ) return; - if ( reloadView->part() && (reloadView->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + if ( reloadView->part() && (reloadView->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = reloadView->part()->property("modified"); if (prop.isValid() && prop.toBool()) if ( KMessageBox::warningContinueCancel( this, @@ -2048,7 +2048,7 @@ void KonqMainWindow::slotUndoAvailable( bool avail ) if ( avail && m_currentView && m_currentView->part() ) { // Avoid qWarning from TQObject::property if it doesn't exist - if ( m_currentView->part()->tqmetaObject()->tqfindProperty( "supportsUndo" ) != -1 ) + if ( m_currentView->part()->tqmetaObject()->findProperty( "supportsUndo" ) != -1 ) { TQVariant prop = m_currentView->part()->property( "supportsUndo" ); if ( prop.isValid() && prop.toBool() ) @@ -2183,7 +2183,7 @@ void KonqMainWindow::slotPartActivated( KParts::Part *part ) if ( part ) { - newView = m_mapViews.tqfind( static_cast<KParts::ReadOnlyPart *>( part ) ).data(); + newView = m_mapViews.find( static_cast<KParts::ReadOnlyPart *>( part ) ).data(); if ( newView->isPassiveMode() ) { @@ -2414,7 +2414,7 @@ void KonqMainWindow::viewsChanged() KonqView * KonqMainWindow::childView( KParts::ReadOnlyPart *view ) { - MapViews::ConstIterator it = m_mapViews.tqfind( view ); + MapViews::ConstIterator it = m_mapViews.find( view ); if ( it != m_mapViews.end() ) return it.data(); else @@ -2665,7 +2665,7 @@ void KonqMainWindow::slotDuplicateTabPopup() void KonqMainWindow::slotBreakOffTab() { if (m_currentView && m_currentView->part() && - (m_currentView->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + (m_currentView->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = m_currentView->part()->property("modified"); if (prop.isValid() && prop.toBool()) if ( KMessageBox::warningContinueCancel( this, @@ -2682,7 +2682,7 @@ void KonqMainWindow::slotBreakOffTabPopup() { KonqView* originalView = m_currentView; KonqView *view = m_pWorkingTab->activeChildView(); - if (view && view->part() && (view->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + if (view && view->part() && (view->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = view->part()->property("modified"); if (prop.isValid() && prop.toBool()) { m_pViewManager->showTab( view ); @@ -2787,7 +2787,7 @@ void KonqMainWindow::openMultiURL( KURL::List url ) void KonqMainWindow::slotRemoveView() { if (m_currentView && m_currentView->part() && - (m_currentView->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + (m_currentView->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = m_currentView->part()->property("modified"); if (prop.isValid() && prop.toBool()) if ( KMessageBox::warningContinueCancel( this, @@ -2803,7 +2803,7 @@ void KonqMainWindow::slotRemoveView() void KonqMainWindow::slotRemoveTab() { if (m_currentView && m_currentView->part() && - (m_currentView->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + (m_currentView->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = m_currentView->part()->property("modified"); if (prop.isValid() && prop.toBool()) if ( KMessageBox::warningContinueCancel( this, @@ -2819,7 +2819,7 @@ void KonqMainWindow::slotRemoveTabPopup() { KonqView *originalView = m_currentView; KonqView *view = m_pWorkingTab->activeChildView(); - if (view && view->part() && (view->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + if (view && view->part() && (view->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = view->part()->property("modified"); if (prop.isValid() && prop.toBool()) { m_pViewManager->showTab( view ); @@ -2856,7 +2856,7 @@ void KonqMainWindow::slotRemoveOtherTabsPopup() MapViews::ConstIterator end = m_mapViews.end(); for (; it != end; ++it ) { KonqView *view = it.data(); - if ( view != originalView && view && view->part() && (view->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + if ( view != originalView && view && view->part() && (view->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = view->part()->property("modified"); if (prop.isValid() && prop.toBool()) { m_pViewManager->showTab( view ); @@ -2889,7 +2889,7 @@ void KonqMainWindow::slotReloadAllTabs() MapViews::ConstIterator end = m_mapViews.end(); for (; it != end; ++it ) { KonqView *view = it.data(); - if (view && view->part() && (view->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + if (view && view->part() && (view->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = view->part()->property("modified"); if (prop.isValid() && prop.toBool()) { m_pViewManager->showTab( view ); @@ -3480,13 +3480,13 @@ bool KonqMainWindow::eventFilter(TQObject*obj,TQEvent *ev) if ( duplicate->shortcut() == TQKeySequence(CTRL+Key_D) ) duplicate->setEnabled( false ); - if (slotNames.tqcontains("cut()")) + if (slotNames.contains("cut()")) disconnect( m_paCut, TQT_SIGNAL( activated() ), ext, TQT_SLOT( cut() ) ); - if (slotNames.tqcontains("copy()")) + if (slotNames.contains("copy()")) disconnect( m_paCopy, TQT_SIGNAL( activated() ), ext, TQT_SLOT( copy() ) ); - if (slotNames.tqcontains("paste()")) + if (slotNames.contains("paste()")) disconnect( m_paPaste, TQT_SIGNAL( activated() ), ext, TQT_SLOT( paste() ) ); - if (slotNames.tqcontains("del()")) + if (slotNames.contains("del()")) disconnect( m_paDelete, TQT_SIGNAL( activated() ), ext, TQT_SLOT( del() ) ); disconnect( m_paTrash, TQT_SIGNAL( activated( KAction::ActivationReason, TQt::ButtonState ) ), this, TQT_SLOT( slotTrashActivated( KAction::ActivationReason, TQt::ButtonState ) ) ); @@ -3521,13 +3521,13 @@ bool KonqMainWindow::eventFilter(TQObject*obj,TQEvent *ev) if ( duplicate->shortcut() == TQKeySequence(CTRL+Key_D) ) duplicate->setEnabled( actionCollection()->action("new_window")->isEnabled() ); - if (slotNames.tqcontains("cut()")) + if (slotNames.contains("cut()")) connect( m_paCut, TQT_SIGNAL( activated() ), ext, TQT_SLOT( cut() ) ); - if (slotNames.tqcontains("copy()")) + if (slotNames.contains("copy()")) connect( m_paCopy, TQT_SIGNAL( activated() ), ext, TQT_SLOT( copy() ) ); - if (slotNames.tqcontains("paste()")) + if (slotNames.contains("paste()")) connect( m_paPaste, TQT_SIGNAL( activated() ), ext, TQT_SLOT( paste() ) ); - if (slotNames.tqcontains("del()")) + if (slotNames.contains("del()")) connect( m_paDelete, TQT_SIGNAL( activated() ), ext, TQT_SLOT( del() ) ); connect( m_paTrash, TQT_SIGNAL( activated( KAction::ActivationReason, TQt::ButtonState ) ), this, TQT_SLOT( slotTrashActivated( KAction::ActivationReason, TQt::ButtonState ) ) ); @@ -4167,9 +4167,9 @@ void KonqMainWindow::updateToolBarActions( bool pendingAction /*=false*/) if ( m_currentView && m_currentView->url().isLocalFile() && !m_currentView->isLockedViewMode() ) { - if ( m_currentView->serviceTypes().tqcontains( "inode/directory" ) ) + if ( m_currentView->serviceTypes().contains( "inode/directory" ) ) m_ptaUseHTML->setEnabled( true ); - else if ( m_currentView->serviceTypes().tqcontains( "text/html" ) ) { + else if ( m_currentView->serviceTypes().contains( "text/html" ) ) { // Currently viewing an index.html file via this feature (i.e. url points to a dir) TQString locPath = KURL( m_currentView->locationBarURL() ).path(); m_ptaUseHTML->setEnabled( TQFileInfo( locPath ).isDir() ); @@ -4336,7 +4336,7 @@ void KonqMainWindow::connectExtension( KParts::BrowserExtension *ext ) if ( act ) { // Does the extension have a slot with the name of this action ? - if ( slotNames.tqcontains( it.key()+"()" ) ) + if ( slotNames.contains( it.key()+"()" ) ) { if ( it.key() != "trash" ) connect( act, TQT_SIGNAL( activated() ), ext, it.data() /* TQT_SLOT(slot name) */ ); @@ -4367,7 +4367,7 @@ void KonqMainWindow::disconnectExtension( KParts::BrowserExtension *ext ) { KAction * act = actionCollection()->action( static_cast<const char *>(it.key()) ); //kdDebug(1202) << it.key() << endl; - if ( act && slotNames.tqcontains( it.key()+"()" ) ) + if ( act && slotNames.contains( it.key()+"()" ) ) { //kdDebug(1202) << "disconnectExtension: " << act << " " << act->name() << endl; act->disconnect( ext ); @@ -4443,7 +4443,7 @@ void KonqMainWindow::enableAllActions( bool enable ) { KAction *act = *it; if ( !TQString(act->name()).startsWith("options_configure") /* do not touch the configureblah actions */ - && ( !enable || !actionSlotMap->tqcontains( act->name() ) ) ) /* don't enable BE actions */ + && ( !enable || !actionSlotMap->contains( act->name() ) ) ) /* don't enable BE actions */ act->setEnabled( enable ); } // This method is called with enable=false on startup, and @@ -4748,7 +4748,7 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const TQPoint &_globa //firstURL.cleanPath(); openedForViewURL = firstURL.equals( viewURL, true ); } - devicesFile = firstURL.protocol().tqfind("device", 0, false) == 0; + devicesFile = firstURL.protocol().find("device", 0, false) == 0; //dirsSelected = S_ISDIR( _items.getFirst()->mode() ); } //check if current url is trash @@ -4900,7 +4900,7 @@ void KonqMainWindow::slotItemsRemoved( const KFileItemList &items ) TQPtrListIterator<KFileItem> it( items ); for ( ; it.current(); ++it ) { - if ( popupItems.tqcontains( it.current() ) ) + if ( popupItems.contains( it.current() ) ) { emit popupItemsDisturbed(); return; @@ -5067,7 +5067,7 @@ void KonqMainWindow::updateViewModeActions() // make sure to also clear our [libiconview,liblistview]->service-for-viewmode // map if ( m_viewModeToolBarServices.count() > 0 && - !m_viewModeToolBarServices.begin().data()->serviceTypes().tqcontains( m_currentView->serviceType() ) ) + !m_viewModeToolBarServices.begin().data()->serviceTypes().contains( m_currentView->serviceType() ) ) { // Save the current map to the config file, for later reuse saveToolBarServicesMap(); @@ -5129,7 +5129,7 @@ void KonqMainWindow::updateViewModeActions() // look if we already have a KonqViewModeAction (in the toolbar) // for this component - TQMap<TQString,KonqViewModeAction*>::Iterator mapIt = groupedServiceMap.tqfind( library ); + TQMap<TQString,KonqViewModeAction*>::Iterator mapIt = groupedServiceMap.find( library ); // if we don't have -> create one if ( mapIt == groupedServiceMap.end() ) @@ -5143,7 +5143,7 @@ void KonqMainWindow::updateViewModeActions() // if we previously changed the viewmode (see slotViewModeToggle!) // then we will want to use the previously used settings (previous as // in before the actions got deleted) - TQMap<TQString,KService::Ptr>::ConstIterator serviceIt = m_viewModeToolBarServices.tqfind( library ); + TQMap<TQString,KService::Ptr>::ConstIterator serviceIt = m_viewModeToolBarServices.find( library ); if ( serviceIt != m_viewModeToolBarServices.end() ) { kdDebug(1202) << " Setting action for " << library << " to " << (*serviceIt)->name() << endl; @@ -5192,7 +5192,7 @@ void KonqMainWindow::updateViewModeActions() // Set the contents of the button from the current service, either if it's the current view // or if it's our preferred service for this button (library) if ( bIsCurrentView - || ( preferredServiceMap.tqcontains( library ) && (*it)->desktopEntryName() == preferredServiceMap[ library ] ) ) + || ( preferredServiceMap.contains( library ) && (*it)->desktopEntryName() == preferredServiceMap[ library ] ) ) { //kdDebug(1202) << " Changing action for " << library << " into service " << (*it)->name() << endl; @@ -5320,7 +5320,7 @@ void KonqMainWindow::closeEvent( TQCloseEvent *e ) MapViews::ConstIterator end = m_mapViews.end(); for (; it != end; ++it ) { KonqView *view = it.data(); - if (view && view->part() && (view->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) { + if (view && view->part() && (view->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = view->part()->property("modified"); if (prop.isValid() && prop.toBool()) { m_pViewManager->showTab( view ); @@ -5338,7 +5338,7 @@ void KonqMainWindow::closeEvent( TQCloseEvent *e ) // m_pViewManager->showTab( originalView ); } else if ( m_currentView && m_currentView->part() && - (m_currentView->part()->tqmetaObject()->tqfindProperty("modified") != -1) ) + (m_currentView->part()->tqmetaObject()->findProperty("modified") != -1) ) { TQVariant prop = m_currentView->part()->property("modified"); if (prop.isValid() && prop.toBool()) @@ -5570,7 +5570,7 @@ static void hp_removeDuplicates( KCompletionMatches& l ) ++it ) { TQString str = (*it).value(); if( str.startsWith( http )) { - if( str.tqfind( '/', 7 ) < 0 ) { // http://something<noslash> + if( str.find( '/', 7 ) < 0 ) { // http://something<noslash> hp_removeDupe( l, str + '/', it ); hp_removeDupe( l, str.mid( 7 ) + '/', it ); } else if( str[ str.length() - 1 ] == '/' ) { @@ -5683,7 +5683,7 @@ TQStringList KonqMainWindow::historyPopupCompletionItems( const TQString& s) hp_removeDuplicates( matches ); TQStringList items = matches.list(); if( items.count() == 0 - && !s.tqcontains( ':' ) && s[ 0 ] != '/' ) + && !s.contains( ':' ) && s[ 0 ] != '/' ) { TQString pre = hp_tryPrepend( s ); if( !pre.isNull()) diff --git a/konqueror/konq_profiledlg.cc b/konqueror/konq_profiledlg.cc index 33f36945f..eca415ba5 100644 --- a/konqueror/konq_profiledlg.cc +++ b/konqueror/konq_profiledlg.cc @@ -141,7 +141,7 @@ void KonqProfileDlg::loadAllProfiles(const TQString & preselectProfile) for (; eIt != eEnd; ++eIt ) { TQListViewItem *item = new KonqProfileItem( m_pListView, eIt.key() ); - TQString filename = eIt.data().mid( eIt.data().tqfindRev( '/' ) + 1 ); + TQString filename = eIt.data().mid( eIt.data().findRev( '/' ) + 1 ); kdDebug(1202) << filename << endl; if ( filename == preselectProfile ) { @@ -161,7 +161,7 @@ void KonqProfileDlg::slotUser3() // Save button // Reuse filename of existing item, if any if ( m_pListView->selectedItem() ) { - KonqProfileMap::Iterator it = m_mapEntries.tqfind( m_pListView->selectedItem()->text(0) ); + KonqProfileMap::Iterator it = m_mapEntries.find( m_pListView->selectedItem()->text(0) ); if ( it != m_mapEntries.end() ) { TQFileInfo info( it.data() ); @@ -180,7 +180,7 @@ void KonqProfileDlg::slotUser2() // Delete button { if(!m_pListView->selectedItem()) return; - KonqProfileMap::Iterator it = m_mapEntries.tqfind( m_pListView->selectedItem()->text(0) ); + KonqProfileMap::Iterator it = m_mapEntries.find( m_pListView->selectedItem()->text(0) ); if ( it != m_mapEntries.end() && TQFile::remove( it.data() ) ) loadAllProfiles(); @@ -206,7 +206,7 @@ void KonqProfileDlg::slotItemRenamed( TQListViewItem * item ) if (!newName.isEmpty()) { - KonqProfileMap::ConstIterator it = m_mapEntries.tqfind( oldName ); + KonqProfileMap::ConstIterator it = m_mapEntries.find( oldName ); if ( it != m_mapEntries.end() ) { diff --git a/konqueror/konq_view.cc b/konqueror/konq_view.cc index a064e3116..4f02022d4 100644 --- a/konqueror/konq_view.cc +++ b/konqueror/konq_view.cc @@ -1056,7 +1056,7 @@ KParts::BrowserHostExtension* KonqView::hostExtension( KParts::ReadOnlyPart *par if ( !ext ) return 0; - if ( ext->frameNames().tqcontains( name ) ) + if ( ext->frameNames().contains( name ) ) return ext; const TQPtrList<KParts::ReadOnlyPart> children = ext->frames(); @@ -1077,7 +1077,7 @@ bool KonqView::callExtensionMethod( const char *methodName ) if ( !obj ) // not all views have a browser extension ! return false; - int id = obj->tqmetaObject()->tqfindSlot( methodName ); + int id = obj->tqmetaObject()->findSlot( methodName ); if ( id == -1 ) return false; TQUObject o[ 1 ]; @@ -1092,7 +1092,7 @@ bool KonqView::callExtensionBoolMethod( const char *methodName, bool value ) if ( !obj ) // not all views have a browser extension ! return false; - int id = obj->tqmetaObject()->tqfindSlot( methodName ); + int id = obj->tqmetaObject()->findSlot( methodName ); if ( id == -1 ) return false; TQUObject o[ 2 ]; @@ -1109,7 +1109,7 @@ bool KonqView::callExtensionStringMethod( const char *methodName, TQString value if ( !obj ) // not all views have a browser extension ! return false; - int id = obj->tqmetaObject()->tqfindSlot( methodName ); + int id = obj->tqmetaObject()->findSlot( methodName ); if ( id == -1 ) return false; TQUObject o[ 2 ]; @@ -1126,7 +1126,7 @@ bool KonqView::callExtensionURLMethod( const char *methodName, const KURL& value if ( !obj ) // not all views have a browser extension ! return false; - int id = obj->tqmetaObject()->tqfindSlot( methodName ); + int id = obj->tqmetaObject()->findSlot( methodName ); if ( id == -1 ) return false; TQUObject o[ 2 ]; @@ -1268,10 +1268,10 @@ bool KonqView::eventFilter( TQObject *obj, TQEvent *e ) TQObjectList *children = m_pPart->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( ok && - !lstDragURLs.first().url().tqcontains( "javascript:", false ) && // ### this looks like a hack to me + !lstDragURLs.first().url().contains( "javascript:", false ) && // ### this looks like a hack to me ev->source() != m_pPart->widget() && children && - children->tqfindRef( TQT_TQOBJECT(ev->source()) ) == -1 ) + children->findRef( TQT_TQOBJECT(ev->source()) ) == -1 ) ev->acceptAction(); delete children; diff --git a/konqueror/konq_viewmgr.cc b/konqueror/konq_viewmgr.cc index d2600adf1..423929f39 100644 --- a/konqueror/konq_viewmgr.cc +++ b/konqueror/konq_viewmgr.cc @@ -1156,7 +1156,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const TQString & filename, for ( it.toFirst(); it != 0L; ++it ) { KonqView *view = it.current()->activeChildView(); - if (view && view->part() && (view->part()->tqmetaObject()->tqfindProperty("modified") != -1)) { + if (view && view->part() && (view->part()->tqmetaObject()->findProperty("modified") != -1)) { TQVariant prop = view->part()->property("modified"); if (prop.isValid() && prop.toBool()) { showTab( view ); @@ -1175,7 +1175,7 @@ void KonqViewManager::loadViewProfile( KConfig &cfg, const TQString & filename, else { KonqView *view = m_pMainWindow->currentView(); - if (view && view->part() && (view->part()->tqmetaObject()->tqfindProperty("modified") != -1)) { + if (view && view->part() && (view->part()->tqmetaObject()->findProperty("modified") != -1)) { TQVariant prop = view->part()->property("modified"); if (prop.isValid() && prop.toBool()) if ( KMessageBox::warningContinueCancel( 0, @@ -1413,7 +1413,7 @@ TQSize KonqViewManager::readConfigSize( KConfig &cfg, TQWidget *widget ) TQRect geom = KGlobalSettings::desktopGeometry(widget); - if ( widthStr.tqcontains( '%' ) == 1 ) + if ( widthStr.contains( '%' ) == 1 ) { widthStr.truncate( widthStr.length() - 1 ); int relativeWidth = widthStr.toInt( &ok ); @@ -1428,7 +1428,7 @@ TQSize KonqViewManager::readConfigSize( KConfig &cfg, TQWidget *widget ) width = -1; } - if ( heightStr.tqcontains( '%' ) == 1 ) + if ( heightStr.contains( '%' ) == 1 ) { heightStr.truncate( heightStr.length() - 1 ); int relativeHeight = heightStr.toInt( &ok ); diff --git a/konqueror/listview/konq_infolistviewwidget.cc b/konqueror/listview/konq_infolistviewwidget.cc index 30aa69f8d..6adf36feb 100644 --- a/konqueror/listview/konq_infolistviewwidget.cc +++ b/konqueror/listview/konq_infolistviewwidget.cc @@ -201,7 +201,7 @@ void KonqInfoListViewWidget::slotNewItems( const KFileItemList& list) } if ( !m_itemsToSelect.isEmpty() ) { - TQStringList::Iterator tsit = m_itemsToSelect.tqfind( (*kit)->name() ); + TQStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() ); if ( tsit != m_itemsToSelect.end() ) { m_itemsToSelect.remove( tsit ); setSelected( tmp, true ); @@ -375,7 +375,7 @@ void KonqInfoListViewWidget::determineCounts(const KFileItemList& list) if (m_favorite.mimetype) { - m_mtSelector->setCurrentItem(mtlist.tqfindIndex(m_favorite.mimetype->comment())); + m_mtSelector->setCurrentItem(mtlist.findIndex(m_favorite.mimetype->comment())); kdDebug(1203) << "favorite mimetype is " << m_favorite.mimetype->name() << endl; } createFavoriteColumns(); diff --git a/konqueror/listview/konq_listview.cc b/konqueror/listview/konq_listview.cc index 3cbbae992..61e30d269 100644 --- a/konqueror/listview/konq_listview.cc +++ b/konqueror/listview/konq_listview.cc @@ -169,11 +169,11 @@ void ListViewBrowserExtension::rename() const TQString txt = le->text(); TQString pattern; KMimeType::diagnoseFileName( txt, pattern ); - if (!pattern.isEmpty() && pattern.tqat(0)=='*' && pattern.tqfind('*',1)==-1) + if (!pattern.isEmpty() && pattern.tqat(0)=='*' && pattern.find('*',1)==-1) le->setSelection(0, txt.length()-pattern.stripWhiteSpace().length()+1); else { - int lastDot = txt.tqfindRev('.'); + int lastDot = txt.findRev('.'); if (lastDot > 0) le->setSelection(0, lastDot); } diff --git a/konqueror/listview/konq_listviewwidget.cc b/konqueror/listview/konq_listviewwidget.cc index 290557945..e0e1d778d 100644 --- a/konqueror/listview/konq_listviewwidget.cc +++ b/konqueror/listview/konq_listviewwidget.cc @@ -228,7 +228,7 @@ void KonqBaseListViewWidget::readProtocolConfig( const KURL & url ) for ( int num = 1; extraFieldsIt != extraFields.end(); ++extraFieldsIt, ++num ) { const TQString column = (*extraFieldsIt).name; - if ( lstColumns.tqfind(column) == lstColumns.end() ) + if ( lstColumns.find(column) == lstColumns.end() ) lstColumns << column; const TQString type = (*extraFieldsIt).type; // ## TODO use when sorting TQVariant::Type t = TQVariant::Invalid; @@ -325,7 +325,7 @@ void KonqBaseListViewWidget::readProtocolConfig( const KURL & url ) continue; } - TQStringList::Iterator listIt = listingList.tqfind( confColumns[i].desktopFileName ); + TQStringList::Iterator listIt = listingList.find( confColumns[i].desktopFileName ); if ( listIt == listingList.end() ) // not found -> hide { //move all columns behind one to the front @@ -634,7 +634,7 @@ void KonqBaseListViewWidget::slotAutoScroll() rr = rr.unite( tqitemRect( cur ) ); } - if ( !m_selected || !m_selected->tqcontains( (KonqBaseListViewItem*)cur ) ) + if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) ) { setSelected( cur, false ); } @@ -670,7 +670,7 @@ void KonqBaseListViewWidget::slotAutoScroll() rr = rr.unite( tqitemRect( cur ) ); } - if ( !m_selected || !m_selected->tqcontains( (KonqBaseListViewItem*)cur ) ) + if ( !m_selected || !m_selected->contains( (KonqBaseListViewItem*)cur ) ) { setSelected( cur, false ); } @@ -718,7 +718,7 @@ void KonqBaseListViewWidget::slotAutoScroll() if ( !TQRect( scroll_margin, scroll_margin, viewport()->width() - 2*scroll_margin, - viewport()->height() - 2*scroll_margin ).tqcontains( pos ) ) + viewport()->height() - 2*scroll_margin ).contains( pos ) ) { if ( !m_scrollTimer ) { @@ -762,7 +762,7 @@ void KonqBaseListViewWidget::viewportDragMoveEvent( TQDragMoveEvent *_ev ) // Unselect previous drag-over-item if ( m_dragOverItem && m_dragOverItem != item ) - if ( !m_selected || !m_selected->tqcontains( m_dragOverItem ) ) + if ( !m_selected || !m_selected->contains( m_dragOverItem ) ) setSelected( m_dragOverItem, false ); if ( !item ) @@ -1255,7 +1255,7 @@ void KonqBaseListViewWidget::slotNewItems( const KFileItemList & entries ) m_itemFound = true; } if ( !m_itemsToSelect.isEmpty() ) { - TQStringList::Iterator tsit = m_itemsToSelect.tqfind( (*kit)->name() ); + TQStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() ); if ( tsit != m_itemsToSelect.end() ) { m_itemsToSelect.remove( tsit ); setSelected( tmp, true ); diff --git a/konqueror/listview/konq_textviewwidget.cc b/konqueror/listview/konq_textviewwidget.cc index 744e06d85..3076aa7ac 100644 --- a/konqueror/listview/konq_textviewwidget.cc +++ b/konqueror/listview/konq_textviewwidget.cc @@ -88,7 +88,7 @@ void KonqTextViewWidget::slotNewItems( const KFileItemList & entries ) m_itemFound = true; } if ( !m_itemsToSelect.isEmpty() ) { - TQStringList::Iterator tsit = m_itemsToSelect.tqfind( (*kit)->name() ); + TQStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() ); if ( tsit != m_itemsToSelect.end() ) { m_itemsToSelect.remove( tsit ); setSelected( tmp, true ); diff --git a/konqueror/listview/konq_treeviewwidget.cc b/konqueror/listview/konq_treeviewwidget.cc index 592ba9e09..624e74eaf 100644 --- a/konqueror/listview/konq_treeviewwidget.cc +++ b/konqueror/listview/konq_treeviewwidget.cc @@ -246,7 +246,7 @@ void KonqTreeViewWidget::slotNewItems( const KFileItemList &entries ) } if ( !m_itemsToSelect.isEmpty() ) { - TQStringList::Iterator tsit = m_itemsToSelect.tqfind( (*kit)->name() ); + TQStringList::Iterator tsit = m_itemsToSelect.find( (*kit)->name() ); if ( tsit != m_itemsToSelect.end() ) { m_itemsToSelect.remove( tsit ); setSelected( fileItem ? fileItem : dirItem, true ); diff --git a/konqueror/remoteencodingplugin/kremoteencodingplugin.cpp b/konqueror/remoteencodingplugin/kremoteencodingplugin.cpp index 596408d88..45287eb67 100644 --- a/konqueror/remoteencodingplugin/kremoteencodingplugin.cpp +++ b/konqueror/remoteencodingplugin/kremoteencodingplugin.cpp @@ -142,7 +142,7 @@ KRemoteEncodingPlugin::updateMenu() int id = 1; TQStringList::Iterator it; for (it = m_encodingDescriptions.begin(); it != m_encodingDescriptions.end(); ++it, ++id) - if ((*it).tqfind(charset) != -1) + if ((*it).find(charset) != -1) break; kdDebug() << k_funcinfo << "URL=" << m_currentURL << " charset=" << charset << endl; diff --git a/konqueror/sidebar/konqsidebar.cpp b/konqueror/sidebar/konqsidebar.cpp index c3e381cd9..271150338 100644 --- a/konqueror/sidebar/konqsidebar.cpp +++ b/konqueror/sidebar/konqsidebar.cpp @@ -102,7 +102,7 @@ KParts::Part* KonqSidebarFactory::createPartObject( TQWidget *parentWidget, cons const char * /*classname*/, const TQStringList &args ) { // Create an instance of our Part - KonqSidebar* obj = new KonqSidebar( parentWidget, widgetName, parent, name, args.tqcontains("universal") ); + KonqSidebar* obj = new KonqSidebar( parentWidget, widgetName, parent, name, args.contains("universal") ); // See if we are to be read-write or not // if (TQCString(classname) == "KParts::ReadOnlyPart") diff --git a/konqueror/sidebar/sidebar_widget.cpp b/konqueror/sidebar/sidebar_widget.cpp index d9fa0986a..04358ddc4 100644 --- a/konqueror/sidebar/sidebar_widget.cpp +++ b/konqueror/sidebar/sidebar_widget.cpp @@ -463,8 +463,8 @@ void Sidebar_Widget::initialCopy() { //kdDebug(1201) << "KonqSidebarTree::scanDir dirtree_dir contains " << *eIt << endl; if ( *eIt != "." && *eIt != ".." && - !entries.tqcontains( *eIt ) && - !dirEntries.tqcontains( *eIt ) ) + !entries.contains( *eIt ) && + !dirEntries.contains( *eIt ) ) { // we don't have that one yet -> copy it. TQString cp("cp -R -- "); cp += KProcess::quote(dirtree_dir + *eIt); @@ -675,7 +675,7 @@ void Sidebar_Widget::stdAction(const char *handlestd) kdDebug() << "Try calling >active< module's (" << mod->module->className() << ") slot " << handlestd << endl; - int id = mod->module->tqmetaObject()->tqfindSlot( handlestd ); + int id = mod->module->tqmetaObject()->findSlot( handlestd ); if ( id == -1 ) return; kdDebug() << "Action slot was found, it will be called now" << endl; @@ -743,7 +743,7 @@ void Sidebar_Widget::createButtons() for (uint i = 0; i < m_buttons.count(); i++) { ButtonInfo *button = m_buttons.tqat(i); - if (m_openViews.tqcontains(button->file)) + if (m_openViews.contains(button->file)) { m_buttonBar->setTab(i,true); m_noUpdate = true; @@ -1195,50 +1195,50 @@ void Sidebar_Widget::popupMenu( KXMLGUIClient *client, void Sidebar_Widget::connectModule(TQObject *mod) { - if (mod->tqmetaObject()->tqfindSignal("started(KIO::Job*)") != -1) { + if (mod->tqmetaObject()->findSignal("started(KIO::Job*)") != -1) { connect(mod,TQT_SIGNAL(started(KIO::Job *)),this, TQT_SIGNAL(started(KIO::Job*))); } - if (mod->tqmetaObject()->tqfindSignal("completed()") != -1) { + if (mod->tqmetaObject()->findSignal("completed()") != -1) { connect(mod,TQT_SIGNAL(completed()),this,TQT_SIGNAL(completed())); } - if (mod->tqmetaObject()->tqfindSignal("popupMenu(const " TQPOINT_OBJECT_NAME_STRING "&,const KURL&,const " TQSTRING_OBJECT_NAME_STRING "&,mode_t)") != -1) { + if (mod->tqmetaObject()->findSignal("popupMenu(const " TQPOINT_OBJECT_NAME_STRING "&,const KURL&,const " TQSTRING_OBJECT_NAME_STRING "&,mode_t)") != -1) { connect(mod,TQT_SIGNAL(popupMenu( const TQPoint &, const KURL &, const TQString &, mode_t)),this,TQT_SLOT(popupMenu( const TQPoint &, const KURL&, const TQString &, mode_t))); } - if (mod->tqmetaObject()->tqfindSignal("popupMenu(KXMLGUIClient*,const " TQPOINT_OBJECT_NAME_STRING " &,const KURL&,const " TQSTRING_OBJECT_NAME_STRING "&,mode_t)") != -1) { + if (mod->tqmetaObject()->findSignal("popupMenu(KXMLGUIClient*,const " TQPOINT_OBJECT_NAME_STRING " &,const KURL&,const " TQSTRING_OBJECT_NAME_STRING "&,mode_t)") != -1) { connect(mod,TQT_SIGNAL(popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &,const TQString &, mode_t)),this, TQT_SLOT(popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &,const TQString &, mode_t))); } - if (mod->tqmetaObject()->tqfindSignal("popupMenu(const " TQPOINT_OBJECT_NAME_STRING "&,const KFileItemList&)") != -1) { + if (mod->tqmetaObject()->findSignal("popupMenu(const " TQPOINT_OBJECT_NAME_STRING "&,const KFileItemList&)") != -1) { connect(mod,TQT_SIGNAL(popupMenu( const TQPoint &, const KFileItemList & )), this,TQT_SLOT(popupMenu( const TQPoint &, const KFileItemList & ))); } - if (mod->tqmetaObject()->tqfindSignal("openURLRequest(const KURL&,const KParts::URLArgs&)") != -1) { + if (mod->tqmetaObject()->findSignal("openURLRequest(const KURL&,const KParts::URLArgs&)") != -1) { connect(mod,TQT_SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs &)), this,TQT_SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); } - if (mod->tqmetaObject()->tqfindSignal("submitFormRequest(const char*,const " TQSTRING_OBJECT_NAME_STRING "&,const " TQBYTEARRAY_OBJECT_NAME_STRING "&,const " TQSTRING_OBJECT_NAME_STRING "&,const " TQSTRING_OBJECT_NAME_STRING "&,const " TQSTRING_OBJECT_NAME_STRING "&)") != -1) { + if (mod->tqmetaObject()->findSignal("submitFormRequest(const char*,const " TQSTRING_OBJECT_NAME_STRING "&,const " TQBYTEARRAY_OBJECT_NAME_STRING "&,const " TQSTRING_OBJECT_NAME_STRING "&,const " TQSTRING_OBJECT_NAME_STRING "&,const " TQSTRING_OBJECT_NAME_STRING "&)") != -1) { connect(mod, TQT_SIGNAL(submitFormRequest(const char*,const TQString&,const TQByteArray&,const TQString&,const TQString&,const TQString&)), this, TQT_SLOT(submitFormRequest(const char*,const TQString&,const TQByteArray&,const TQString&,const TQString&,const TQString&))); } - if (mod->tqmetaObject()->tqfindSignal("enableAction(const char*,bool)") != -1) { + if (mod->tqmetaObject()->findSignal("enableAction(const char*,bool)") != -1) { connect(mod,TQT_SIGNAL(enableAction( const char *, bool)), this,TQT_SLOT(enableAction(const char *, bool))); } - if (mod->tqmetaObject()->tqfindSignal("createNewWindow(const KURL&,const KParts::URLArgs&)") != -1) { + if (mod->tqmetaObject()->findSignal("createNewWindow(const KURL&,const KParts::URLArgs&)") != -1) { connect(mod,TQT_SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), this,TQT_SLOT(createNewWindow( const KURL &, const KParts::URLArgs &))); } diff --git a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp index b0d818c62..1437d7f83 100644 --- a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp +++ b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp @@ -484,7 +484,7 @@ void KonqSidebarBookmarkModule::fillGroup( KonqSidebarTreeItem * parentItem, KBo fillGroup( item, grp ); TQString address(grp.address()); - if (m_folderOpenState.tqcontains(address)) + if (m_folderOpenState.contains(address)) item->setOpen(m_folderOpenState[address]); else item->setOpen(false); diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp index 16c1bfb78..989ef2a70 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp @@ -134,7 +134,7 @@ TQString KonqSidebarDirTreeItem::externalMimeType() const bool KonqSidebarDirTreeItem::acceptsDrops( const TQStrList & formats ) { - if ( formats.tqcontains("text/uri-list") ) + if ( formats.contains("text/uri-list") ) return m_fileItem->acceptsDrops(); return false; } diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp index 401c4985a..b83926e21 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp @@ -549,7 +549,7 @@ void KonqSidebarDirTreeModule::slotRedirection( const KURL & oldUrl, const KURL do { - if (item->alias.tqcontains(newUrlStr)) continue; + if (item->alias.contains(newUrlStr)) continue; kdDebug()<<"Redirectiong element"<<endl; // We need to update the URL in m_dictSubDirs m_dictSubDirs.insert( newUrlStr, item ); diff --git a/konqueror/sidebar/trees/history_module/history_module.cpp b/konqueror/sidebar/trees/history_module/history_module.cpp index 2c8cd5728..a29a2fe0c 100644 --- a/konqueror/sidebar/trees/history_module/history_module.cpp +++ b/konqueror/sidebar/trees/history_module/history_module.cpp @@ -149,7 +149,7 @@ void KonqSidebarHistoryModule::slotCreateItems() TQStringList::Iterator it2 = openGroups.begin(); KonqSidebarHistoryGroupItem *group; while ( it2 != openGroups.end() ) { - group = m_dict.tqfind( *it2 ); + group = m_dict.find( *it2 ); if ( group ) group->setOpen( true ); @@ -195,7 +195,7 @@ void KonqSidebarHistoryModule::slotEntryRemoved( const KonqHistoryEntry *entry ) return; TQString groupKey = groupForURL( entry->url ); - KonqSidebarHistoryGroupItem *group = m_dict.tqfind( groupKey ); + KonqSidebarHistoryGroupItem *group = m_dict.find( groupKey ); if ( !group ) return; @@ -324,7 +324,7 @@ void KonqSidebarHistoryModule::groupOpened( KonqSidebarHistoryGroupItem *item, b KonqSidebarHistoryGroupItem * KonqSidebarHistoryModule::getGroupItem( const KURL& url ) { const TQString& groupKey = groupForURL( url ); - KonqSidebarHistoryGroupItem *group = m_dict.tqfind( groupKey ); + KonqSidebarHistoryGroupItem *group = m_dict.find( groupKey ); if ( !group ) { group = new KonqSidebarHistoryGroupItem( url, m_topLevelItem ); diff --git a/konqueror/sidebar/trees/konq_sidebartree.cpp b/konqueror/sidebar/trees/konq_sidebartree.cpp index c17907e7d..99c22e148 100644 --- a/konqueror/sidebar/trees/konq_sidebartree.cpp +++ b/konqueror/sidebar/trees/konq_sidebartree.cpp @@ -55,7 +55,7 @@ static const int autoOpenTimeout = 750; getModule KonqSidebarTree::getPluginFactory(TQString name) { - if (!pluginFactories.tqcontains(name)) + if (!pluginFactories.contains(name)) { KLibLoader *loader = KLibLoader::self(); TQString libName = pluginInfo[name]; @@ -272,7 +272,7 @@ void KonqSidebarTree::contentsDragMoveEvent( TQDragMoveEvent *e ) TQListViewItem *item = itemAt( contentsToViewport( e->pos() ) ); // Accept drops on the background, if URLs - if ( !item && m_lstDropFormats.tqcontains("text/uri-list") ) + if ( !item && m_lstDropFormats.contains("text/uri-list") ) { m_dropItem = 0; e->acceptAction(); @@ -417,7 +417,7 @@ bool KonqSidebarTree::acceptDrag(TQDropEvent* e) const { // for KListViewMode... for( int i = 0; e->format( i ); i++ ) - if ( d->m_dropFormats.tqcontains(e->format( i ) ) ) + if ( d->m_dropFormats.contains(e->format( i ) ) ) return true; return false; } @@ -652,7 +652,7 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const TQString &path { //kdDebug(1201) << "KonqSidebarTree::scanDir dirtree_dir contains " << *eIt << endl; if ( *eIt != "." && *eIt != ".." - && !entries.tqcontains( *eIt ) && !dirEntries.tqcontains( *eIt ) ) + && !entries.contains( *eIt ) && !dirEntries.contains( *eIt ) ) { // we don't have that one yet -> copy it. TQString cp("cp -R -- "); cp += KProcess::quote(dirtree_dir + *eIt); @@ -836,7 +836,7 @@ void KonqSidebarTree::startAnimation( KonqSidebarTreeItem * item, const char * i void KonqSidebarTree::stopAnimation( KonqSidebarTreeItem * item ) { - MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.tqfind(item); + MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.find(item); if ( it != m_mapCurrentOpeningFolders.end() ) { item->setPixmap( 0, it.data().originalPixmap ); diff --git a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp index 91d4d1eb5..70e3d0df0 100644 --- a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp +++ b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp @@ -57,7 +57,7 @@ void KonqSidebarTreeTopLevelItem::itemSelected() bool KonqSidebarTreeTopLevelItem::acceptsDrops( const TQStrList & formats ) { - return formats.tqcontains("text/uri-list") && + return formats.contains("text/uri-list") && ( m_bTopLevelGroup || !externalURL().isEmpty() ); } diff --git a/konqueror/sidebar/trees/konqsidebar_tree.cpp b/konqueror/sidebar/trees/konqsidebar_tree.cpp index fc53039b6..3e18366ab 100644 --- a/konqueror/sidebar/trees/konqsidebar_tree.cpp +++ b/konqueror/sidebar/trees/konqsidebar_tree.cpp @@ -148,7 +148,7 @@ extern "C" i18n( "Select type:" ), names ); if (!item.isEmpty()) { - int id=names.tqfindIndex( item ); + int id=names.findIndex( item ); if (id==-1) return false; KSimpleConfig ksc2(*list.tqat(id)); ksc2.setGroup("Desktop Entry"); diff --git a/konsole/konsole/TEHistory.cpp b/konsole/konsole/TEHistory.cpp index 917fb739e..cbe8b199d 100644 --- a/konsole/konsole/TEHistory.cpp +++ b/konsole/konsole/TEHistory.cpp @@ -457,7 +457,7 @@ void HistoryScrollBlockArray::addCells(ca a[], int count) size_t *pLen = new size_t; *pLen = count; - m_lineLengths.tqreplace(m_blockArray.getCurrent(), pLen); + m_lineLengths.replace(m_blockArray.getCurrent(), pLen); } void HistoryScrollBlockArray::addLine(bool) diff --git a/konsole/konsole/TEWidget.cpp b/konsole/konsole/TEWidget.cpp index 3f47f962b..622bf373a 100644 --- a/konsole/konsole/TEWidget.cpp +++ b/konsole/konsole/TEWidget.cpp @@ -1293,7 +1293,7 @@ void TEWidget::mousePressEvent(TQMouseEvent* ev) return; } - if ( !contentsRect().tqcontains(ev->pos()) ) return; + if ( !contentsRect().contains(ev->pos()) ) return; TQPoint tL = contentsRect().topLeft(); int tLx = tL.x(); int tLy = tL.y(); @@ -1395,7 +1395,7 @@ void TEWidget::setSelectionEnd() void TEWidget::extendSelection( TQPoint pos ) { - //if ( !contentsRect().tqcontains(ev->pos()) ) return; + //if ( !contentsRect().contains(ev->pos()) ) return; TQPoint tL = contentsRect().topLeft(); int tLx = tL.x(); int tLy = tL.y(); @@ -1764,7 +1764,7 @@ int TEWidget::charClass(UINT16 ch) const TQChar qch=TQChar(ch); if ( qch.isSpace() ) return ' '; - if ( qch.isLetterOrNumber() || word_characters.tqcontains(qch, false) ) + if ( qch.isLetterOrNumber() || word_characters.contains(qch, false) ) return 'a'; // Everything else is weird @@ -1807,7 +1807,7 @@ void TEWidget::emitSelection(bool useXselection,bool appendReturn) text.append("\r"); if ( ! text.isEmpty() ) { - text.tqreplace("\n", "\r"); + text.replace("\n", "\r"); TQKeyEvent e(TQEvent::KeyPress, 0,-1,0, text); emit keyPressedSignal(&e); // expose as a big fat keypress event emit clearSelectionSignal(); diff --git a/konsole/konsole/TEmulation.cpp b/konsole/konsole/TEmulation.cpp index af779e0b8..7b7e1c5f4 100644 --- a/konsole/konsole/TEmulation.cpp +++ b/konsole/konsole/TEmulation.cpp @@ -418,9 +418,9 @@ bool TEmulation::findTextNext( const TQString &str, bool forward, bool caseSensi for (int i = (m_findPos==-1?0:m_findPos+1); i<(scr->getHistLines()+scr->getLines()); i++) { string = scr->getHistoryLine(i); if (regExp) - pos = string.tqfind( TQRegExp(str,caseSensitive) ); + pos = string.find( TQRegExp(str,caseSensitive) ); else - pos = string.tqfind(str, 0, caseSensitive); + pos = string.find(str, 0, caseSensitive); if(pos!=-1) { m_findPos=i; if(i>scr->getHistLines()) @@ -436,9 +436,9 @@ bool TEmulation::findTextNext( const TQString &str, bool forward, bool caseSensi for(int i = (m_findPos==-1?(scr->getHistLines()+scr->getLines()):m_findPos-1); i>=0; i--) { string = scr->getHistoryLine(i); if (regExp) - pos = string.tqfind( TQRegExp(str,caseSensitive) ); + pos = string.find( TQRegExp(str,caseSensitive) ); else - pos = string.tqfind(str, 0, caseSensitive); + pos = string.find(str, 0, caseSensitive); if(pos!=-1) { m_findPos=i; if(i>scr->getHistLines()) diff --git a/konsole/konsole/keytrans.cpp b/konsole/konsole/keytrans.cpp index bcf5228c7..da197a695 100644 --- a/konsole/konsole/keytrans.cpp +++ b/konsole/konsole/keytrans.cpp @@ -90,10 +90,10 @@ KeyTrans::KeyTrans(const TQString& path) else { m_id = m_path; - int i = m_id.tqfindRev('/'); + int i = m_id.findRev('/'); if (i > -1) m_id = m_id.mid(i+1); - i = m_id.tqfindRev('.'); + i = m_id.findRev('.'); if (i > -1) m_id = m_id.left(i); } @@ -673,8 +673,8 @@ static TQIntDict<KeyTrans> * numb2keymap = 0L; KeyTrans* KeyTrans::find(int numb) { - KeyTrans* res = numb2keymap->tqfind(numb); - return res ? res : numb2keymap->tqfind(0); + KeyTrans* res = numb2keymap->find(numb); + return res ? res : numb2keymap->find(0); } KeyTrans* KeyTrans::find(const TQString &id) @@ -686,7 +686,7 @@ KeyTrans* KeyTrans::find(const TQString &id) return it.current(); ++it; } - return numb2keymap->tqfind(0); + return numb2keymap->find(0); } int KeyTrans::count() diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp index c071fb2e9..e47236e63 100644 --- a/konsole/konsole/konsole.cpp +++ b/konsole/konsole/konsole.cpp @@ -548,7 +548,7 @@ void Konsole::makeGUI() m_moveSessionRight->plug(m_view); m_view->insertSeparator(); - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); if (ra!=0) ra->plug(m_view); //bookmarks menu @@ -790,7 +790,7 @@ void Konsole::makeGUI() KeyTrans* ktr = kt_map[*it]; assert( ktr ); TQString title=ktr->hdr(); - m_keytab->insertItem(title.tqreplace('&',"&&"),ktr->numb()); + m_keytab->insertItem(title.replace('&',"&&"),ktr->numb()); } applySettingsToGUI(); @@ -1317,7 +1317,7 @@ void Konsole::slotTabContextMenu(TQWidget* _te, const TQPoint & pos) int counter=0; for (TESession *ses = sessions.first(); ses; ses = sessions.next()) { TQString title=ses->Title(); - m_tabPopupTabsMenu->insertItem(SmallIcon(ses->IconName()),title.tqreplace('&',"&&"),counter++); + m_tabPopupTabsMenu->insertItem(SmallIcon(ses->IconName()),title.replace('&',"&&"),counter++); } m_tabPopupMenu->popup( pos ); @@ -1383,7 +1383,7 @@ void Konsole::slotTabSetViewOptions(int mode) else title = sessions.tqat(i)->Title(); - title=title.tqreplace('&',"&&"); + title=title.replace('&',"&&"); switch(mode) { case ShowIconAndText: tabwidget->changeTab(page, icon, title); @@ -1875,7 +1875,7 @@ void Konsole::updateSchemaMenu() ColorSchema* s = (ColorSchema*)colors->tqat(i); assert( s ); TQString title=s->title(); - m_schema->insertItem(title.tqreplace('&',"&&"),s->numb(),0); + m_schema->insertItem(title.replace('&',"&&"),s->numb(),0); } if (te && se) @@ -2219,13 +2219,13 @@ void Konsole::updateTitle(TESession* _se) } tabwidget->setTabIconSet(_se->widget(), iconSetForSession(_se)); TQString icon = _se->IconName(); - KRadioAction *ra = session2action.tqfind(_se); + KRadioAction *ra = session2action.find(_se); if (ra && (ra->icon() != icon)) ra->setIcon(icon); if (m_tabViewMode == ShowIconOnly) tabwidget->changeTab( _se->widget(), TQString::null ); else if (b_matchTabWinTitle) - tabwidget->setTabLabel( _se->widget(), _se->fullTitle().tqreplace('&',"&&")); + tabwidget->setTabLabel( _se->widget(), _se->fullTitle().replace('&',"&&")); } void Konsole::initSessionFont(TQFont font) { @@ -2363,7 +2363,7 @@ void Konsole::enterURL(const TQString& URL, const TQString&) KRun::shellQuote(newtext); te->emitText("cd "+newtext+"\r"); } - else if (URL.tqcontains("://", true)) { + else if (URL.contains("://", true)) { KURL u(URL); newtext = u.protocol(); bool isSSH = (newtext == "ssh"); @@ -2410,7 +2410,7 @@ void Konsole::sendSignal(int sn) void Konsole::runSession(TESession* s) { - KRadioAction *ra = session2action.tqfind(s); + KRadioAction *ra = session2action.find(s); ra->setChecked(true); activateSession(s); @@ -2446,7 +2446,7 @@ void Konsole::addSession(TESession* s) s->setTitle(newTitle); // create an action for the session - KRadioAction *ra = new KRadioAction(newTitle.tqreplace('&',"&&"), + KRadioAction *ra = new KRadioAction(newTitle.replace('&',"&&"), s->IconName(), 0, TQT_TQOBJECT(this), @@ -2497,7 +2497,7 @@ void Konsole::listSessions() m_sessionList->setKeyboardShortcutsEnabled(true); for (TESession *ses = sessions.first(); ses; ses = sessions.next()) { TQString title=ses->Title(); - m_sessionList->insertItem(SmallIcon(ses->IconName()),title.tqreplace('&',"&&"),counter++); + m_sessionList->insertItem(SmallIcon(ses->IconName()),title.replace('&',"&&"),counter++); } m_sessionList->adjustSize(); m_sessionList->popup(mapToGlobal(TQPoint((width()/2)-(m_sessionList->width()/2),(height()/2)-(m_sessionList->height()/2)))); @@ -2562,7 +2562,7 @@ void Konsole::activateSession(TESession *s) se->setListenToKeyPress(true); notifySessionState(se,NOTIFYNORMAL); // Delete the session if isn't in the session list any longer. - if (sessions.tqfind(se) == -1) + if (sessions.find(se) == -1) delete se; } if (se != s) @@ -2582,10 +2582,10 @@ void Konsole::activateSession(TESession *s) // only 2 sessions opened, 2nd session viewable, right-click on 1st tab and // select 'Detach', close original Konsole window... crash // s is not set properly on original Konsole window - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); if (!ra) { se=sessions.first(); // Get new/correct TESession - ra = session2action.tqfind(se); + ra = session2action.find(se); } ra->setChecked(true); @@ -2617,7 +2617,7 @@ void Konsole::activateSession(TESession *s) if (monitorActivity) monitorActivity->setChecked( se->isMonitorActivity() ); if (monitorSilence) monitorSilence->setChecked( se->isMonitorSilence() ); masterMode->setChecked( se->isMasterMode() ); - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); if (m_moveSessionLeft) m_moveSessionLeft->setEnabled(position>0); if (m_moveSessionRight) m_moveSessionRight->setEnabled(position<sessions.count()-1); @@ -2758,7 +2758,7 @@ void Konsole::newSession(int i) return; } - KSimpleConfig* co = no2command.tqfind(i); + KSimpleConfig* co = no2command.find(i); if (co) { newSession(co); resetScreenSessions(); @@ -2781,7 +2781,7 @@ void Konsole::newSessionTabbar(int i) return; } - KSimpleConfig* co = no2command.tqfind(i); + KSimpleConfig* co = no2command.find(i); if (co) { newSession(co); resetScreenSessions(); @@ -3022,7 +3022,7 @@ void Konsole::doneSession(TESession* s) if (se_previous) activateSession(se_previous); - KRadioAction *ra = session2action.tqfind(s); + KRadioAction *ra = session2action.find(s); ra->unplug(m_view); tabwidget->removePage( s->widget() ); if (rootxpms[s->widget()]) { @@ -3034,7 +3034,7 @@ void Konsole::doneSession(TESession* s) m_removeSessionButton->setEnabled(tabwidget->count()>1); session2action.remove(s); action2session.remove(ra); - int sessionIndex = sessions.tqfindRef(s); + int sessionIndex = sessions.findRef(s); sessions.remove(s); delete ra; // will the toolbar die? @@ -3051,7 +3051,7 @@ void Konsole::doneSession(TESession* s) { se = sessions.tqat(sessionIndex ? sessionIndex - 1 : 0); - session2action.tqfind(se)->setChecked(true); + session2action.find(se)->setChecked(true); //FIXME: this Timer stupidity originated from the connected // design of Emulations. By this the newly activated // session might get a Ctrl(D) if the session has be @@ -3066,7 +3066,7 @@ void Konsole::doneSession(TESession* s) close(); } else { - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); m_moveSessionLeft->setEnabled(position>0); m_moveSessionRight->setEnabled(position<sessions.count()-1); @@ -3082,7 +3082,7 @@ void Konsole::doneSession(TESession* s) void Konsole::prevSession() { - sessions.tqfind(se); sessions.prev(); + sessions.find(se); sessions.prev(); if (!sessions.current()) sessions.last(); if (sessions.current() && sessions.count() > 1) activateSession(sessions.current()); @@ -3092,7 +3092,7 @@ void Konsole::prevSession() void Konsole::nextSession() { - sessions.tqfind(se); sessions.next(); + sessions.find(se); sessions.next(); if (!sessions.current()) sessions.first(); if (sessions.current() && sessions.count() > 1) activateSession(sessions.current()); @@ -3105,7 +3105,7 @@ void Konsole::slotMovedTab(int from, int to) sessions.remove(_se); sessions.insert(to,_se); - KRadioAction *ra = session2action.tqfind(_se); + KRadioAction *ra = session2action.find(_se); ra->unplug(m_view); ra->plug(m_view,(m_view->count()-sessions.count()+1)+to); @@ -3120,7 +3120,7 @@ void Konsole::slotMovedTab(int from, int to) /* Move session forward in session list if possible */ void Konsole::moveSessionLeft() { - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); if (position==0) return; @@ -3128,7 +3128,7 @@ void Konsole::moveSessionLeft() sessions.remove(position); sessions.insert(position-1,se); - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); ra->unplug(m_view); ra->plug(m_view,(m_view->count()-sessions.count()+1)+position-1); @@ -3139,7 +3139,7 @@ void Konsole::moveSessionLeft() tabwidget->blockSignals(false); TQString title = se->Title(); createSessionTab(se->widget(), iconSetForSession(se), - title.tqreplace('&', "&&"), position-1); + title.replace('&', "&&"), position-1); tabwidget->showPage(se->widget()); tabwidget->setTabColor(se->widget(),oldcolor); @@ -3152,7 +3152,7 @@ void Konsole::moveSessionLeft() /* Move session back in session list if possible */ void Konsole::moveSessionRight() { - sessions.tqfind(se); + sessions.find(se); uint position=sessions.tqat(); if (position==sessions.count()-1) @@ -3161,7 +3161,7 @@ void Konsole::moveSessionRight() sessions.remove(position); sessions.insert(position+1,se); - KRadioAction *ra = session2action.tqfind(se); + KRadioAction *ra = session2action.find(se); ra->unplug(m_view); ra->plug(m_view,(m_view->count()-sessions.count()+1)+position+1); @@ -3172,7 +3172,7 @@ void Konsole::moveSessionRight() tabwidget->blockSignals(false); TQString title = se->Title(); createSessionTab(se->widget(), iconSetForSession(se), - title.tqreplace('&', "&&"), position+1); + title.replace('&', "&&"), position+1); tabwidget->showPage(se->widget()); tabwidget->setTabColor(se->widget(),oldcolor); @@ -3384,7 +3384,7 @@ void Konsole::addSessionCommand(const TQString &path) TQString name = comment; name.prepend("SSC_"); // Allows easy searching for Session ShortCuts - name.tqreplace(" ", "_"); + name.replace(" ", "_"); sl_sessionShortCuts << name; // Is there already this shortcut? @@ -3434,13 +3434,13 @@ void Konsole::createSessionMenus() TQString txt = cfg->readEntry("Name"); TQString icon = cfg->readEntry("Icon", "konsole"); insertItemSorted(m_tabbarSessionsCommands, SmallIconSet(icon), - txt.tqreplace('&',"&&"), SESSION_NEW_SHELL_ID ); + txt.replace('&',"&&"), SESSION_NEW_SHELL_ID ); TQString comment = cfg->readEntry("Comment"); if (comment.isEmpty()) comment=txt.prepend(i18n("New ")); insertItemSorted(m_session, SmallIconSet(icon), - comment.tqreplace('&',"&&"), SESSION_NEW_SHELL_ID); + comment.replace('&',"&&"), SESSION_NEW_SHELL_ID); m_session->insertItem(SmallIconSet("window_new"), i18n("New &Window"), SESSION_NEW_WINDOW_ID); m_tabbarSessionsCommands->insertItem(SmallIconSet("window_new"), @@ -3456,12 +3456,12 @@ void Konsole::createSessionMenus() TQString txt = (*it).readEntry("Name"); TQString icon = (*it).readEntry("Icon", "konsole"); insertItemSorted(m_tabbarSessionsCommands, SmallIconSet(icon), - txt.tqreplace('&',"&&"), it.currentKey() ); + txt.replace('&',"&&"), it.currentKey() ); TQString comment = (*it).readEntry("Comment"); if (comment.isEmpty()) comment=txt.prepend(i18n("New ")); insertItemSorted(m_session, SmallIconSet(icon), - comment.tqreplace('&',"&&"), it.currentKey()); + comment.replace('&',"&&"), it.currentKey()); } if (m_bookmarksSession) @@ -3646,12 +3646,12 @@ void Konsole::slotDetachSession() void Konsole::detachSession(TESession* _se) { if (!_se) _se=se; - KRadioAction *ra = session2action.tqfind(_se); + KRadioAction *ra = session2action.find(_se); ra->unplug(m_view); TEWidget* se_widget = _se->widget(); session2action.remove(_se); action2session.remove(ra); - int sessionIndex = sessions.tqfindRef(_se); + int sessionIndex = sessions.findRef(_se); sessions.remove(_se); delete ra; @@ -3705,7 +3705,7 @@ void Konsole::detachSession(TESession* _se) { se = se_previous; else se = sessions.tqat(sessionIndex ? sessionIndex - 1 : 0); - session2action.tqfind(se)->setChecked(true); + session2action.find(se)->setChecked(true); TQTimer::singleShot(1,this,TQT_SLOT(activateSession())); } @@ -3750,7 +3750,7 @@ void Konsole::attachSession(TESession* session) } TQString title=session->Title(); - KRadioAction *ra = new KRadioAction(title.tqreplace('&',"&&"), session->IconName(), + KRadioAction *ra = new KRadioAction(title.replace('&',"&&"), session->IconName(), 0, TQT_TQOBJECT(this), TQT_SLOT(activateSession()), m_shortcuts); ra->setExclusiveGroup("sessions"); @@ -3810,9 +3810,9 @@ void Konsole::slotRenameSession() { void Konsole::slotRenameSession(TESession* ses, const TQString &name) { - KRadioAction *ra = session2action.tqfind(ses); + KRadioAction *ra = session2action.find(ses); TQString title=name; - title=title.tqreplace('&',"&&"); + title=title.replace('&',"&&"); ra->setText(title); ra->setIcon( ses->IconName() ); // I don't know why it is needed here if (m_tabViewMode!=ShowIconOnly) diff --git a/konsole/konsole/konsole_part.cpp b/konsole/konsole/konsole_part.cpp index 3bf2daaee..1887d7373 100644 --- a/konsole/konsole/konsole_part.cpp +++ b/konsole/konsole/konsole_part.cpp @@ -197,7 +197,7 @@ konsolePart::konsolePart(TQWidget *_parentWidget, const char *widgetName, TQObje KeyTrans* ktr = kt_map[*it]; assert( ktr ); TQString title=ktr->hdr(); - m_keytab->insertItem(title.tqreplace('&',"&&"),ktr->numb()); + m_keytab->insertItem(title.replace('&',"&&"),ktr->numb()); } } @@ -733,7 +733,7 @@ void konsolePart::updateSchemaMenu() for (int i = 0; i < (int) colors->count(); i++) { ColorSchema* s = (ColorSchema*)colors->tqat(i); TQString title=s->title(); - m_schema->insertItem(title.tqreplace('&',"&&"),s->numb(),0); + m_schema->insertItem(title.replace('&',"&&"),s->numb(),0); } if (te && se) { diff --git a/konsole/konsole/konsolebookmarkmenu.cpp b/konsole/konsole/konsolebookmarkmenu.cpp index d9cea8293..fd2cc9f1b 100644 --- a/konsole/konsole/konsolebookmarkmenu.cpp +++ b/konsole/konsole/konsolebookmarkmenu.cpp @@ -97,7 +97,7 @@ void KonsoleBookmarkMenu::fillBookmarkMenu() bm = parentBookmark.next(bm) ) { TQString text = bm.text(); - text.tqreplace( '&', "&&" ); + text.replace( '&', "&&" ); if ( !separatorInserted && m_bIsRoot) { // inserted before the first konq bookmark, to avoid the separator if no konq bookmark m_parentMenu->insertSeparator(); separatorInserted = true; diff --git a/konsole/konsole/main.cpp b/konsole/konsole/main.cpp index b5048f90a..5b391a5e5 100644 --- a/konsole/konsole/main.cpp +++ b/konsole/konsole/main.cpp @@ -375,7 +375,7 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[]) it != types.end(); ++it) { TQString file = *it; - file = file.mid(file.tqfindRev('/')+1); + file = file.mid(file.findRev('/')+1); if (file.endsWith(".desktop")) file = file.left(file.length()-8); printf("%s\n", TQFile::encodeName(file).data()); @@ -437,7 +437,7 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[]) it != profiles.end(); ++it) { TQString file = *it; - file = file.mid(file.tqfindRev('/')+1); + file = file.mid(file.findRev('/')+1); printf("%s\n", TQFile::encodeName(file).data()); } return 0; diff --git a/konsole/konsole/schema.cpp b/konsole/konsole/schema.cpp index 211f99b77..b3bae8eff 100644 --- a/konsole/konsole/schema.cpp +++ b/konsole/konsole/schema.cpp @@ -333,7 +333,7 @@ bool ColorSchema::rereadSchemaFile() continue; TQString qline(line); - m_imagePath = locate("wallpaper", qline.mid( qline.tqfind(" ",7)+1 ) ); + m_imagePath = locate("wallpaper", qline.mid( qline.find(" ",7)+1 ) ); m_tqalignment = attr; } if (!strncmp(line,"transparency",12)) @@ -537,7 +537,7 @@ bool ColorSchemaList::updateAllSchemaTimes(const TQDateTime& now) for (it=list.begin(); it!=list.end(); ++it) { TQString filename=*it; - int j=filename.tqfindRev('/'); + int j=filename.findRev('/'); if (j>-1) filename = filename.mid(8); diff --git a/konsole/konsole/session.cpp b/konsole/konsole/session.cpp index 3534b88c8..cc4293326 100644 --- a/konsole/konsole/session.cpp +++ b/konsole/konsole/session.cpp @@ -232,7 +232,7 @@ void TESession::setUserTitle( int what, const TQString &caption ) renameSession(caption); if (what == 31) { cwd=caption; - cwd=cwd.tqreplace( TQRegExp("^~"), TQDir::homeDirPath() ); + cwd=cwd.replace( TQRegExp("^~"), TQDir::homeDirPath() ); emit openURLRequest(cwd); } if (what == 32) { // change icon via \033]32;Icon\007 @@ -676,8 +676,8 @@ void TESession::zmodemStatus(KProcess *, char *data, int len) TQCString msg(data, len+1); while(!msg.isEmpty()) { - int i = msg.tqfind('\015'); - int j = msg.tqfind('\012'); + int i = msg.find('\015'); + int j = msg.find('\012'); TQCString txt; if ((i != -1) && ((j == -1) || (i < j))) { diff --git a/kpager/desktop.cpp b/kpager/desktop.cpp index 8f4fc19ba..bec8271de 100644 --- a/kpager/desktop.cpp +++ b/kpager/desktop.cpp @@ -120,7 +120,7 @@ void Desktop::mouseReleaseEvent( TQMouseEvent *ev ) KWin::forceActiveWindow(info->win()); // if ( static_cast<WindowDrawMode>( KPagerConfigDialog::m_windowDrawMode ) == Pixmap ) - // m_windowPixmapsDirty.tqreplace(info->win,true); + // m_windowPixmapsDirty.replace(info->win,true); } } } @@ -140,7 +140,7 @@ KWin::WindowInfo *Desktop::windowAtPosition(const TQPoint &p, TQPoint *internalp { r=info->geometry(); convertRectS2P(r); - if (r.tqcontains(p)) + if (r.contains(p)) { if (internalpos) { @@ -602,8 +602,8 @@ void Desktop::paintWindowPixmap(TQPainter &p, const KWin::WindowInfo *info, nHg = rSmall.height(); } pixmap=new TQPixmap(fastScalePixmap(tmp, nWd, nHg)); - m_windowPixmaps.tqreplace(info->win(),pixmap); - m_windowPixmapsDirty.tqreplace(info->win(),false); + m_windowPixmaps.replace(info->win(),pixmap); + m_windowPixmapsDirty.replace(info->win(),false); } } diff --git a/kpersonalizer/kcountrypage.cpp b/kpersonalizer/kcountrypage.cpp index d7e286c15..bce43a152 100644 --- a/kpersonalizer/kcountrypage.cpp +++ b/kpersonalizer/kcountrypage.cpp @@ -92,11 +92,11 @@ void KCountryPage::loadCountryList(KLanguageButton *combo) { TQString tag = *it; int index; - index = tag.tqfindRev('/'); + index = tag.findRev('/'); if (index != -1) tag = tag.mid(index + 1); - index = tag.tqfindRev('.'); + index = tag.findRev('.'); if (index != -1) tag.truncate(index); @@ -118,9 +118,9 @@ void KCountryPage::loadCountryList(KLanguageButton *combo) { TQString submenu = '-' + entry.readEntry("Region"); TQString tag = *it; - int index = tag.tqfindRev('/'); + int index = tag.findRev('/'); tag.truncate(index); - index = tag.tqfindRev('/'); + index = tag.findRev('/'); tag = tag.mid(index+1); TQPixmap flag( locate( "locale", TQString::tqfromLatin1("l10n/%1/flag.png").arg(tag) ) ); diff --git a/kpersonalizer/kfindlanguage.cpp b/kpersonalizer/kfindlanguage.cpp index 61e2b1935..4e3537206 100644 --- a/kpersonalizer/kfindlanguage.cpp +++ b/kpersonalizer/kfindlanguage.cpp @@ -34,19 +34,19 @@ KFindLanguage::KFindLanguage() { m_oldlang = config->readEntry("Language"); m_oldlang = m_oldlang.lower(); - m_oldlang = m_oldlang.left(m_oldlang.tqfind(':')); // only use the first lang + m_oldlang = m_oldlang.left(m_oldlang.find(':')); // only use the first lang m_country = config->readEntry("Country", "C"); if (m_country == "C") { m_country = TQString::tqfromLatin1(getenv("LANG")); if(m_country.left(5) == "nn_NO") // glibc's nn_NO is KDE's no_NY m_country = "no"; - if(m_country.tqcontains("_")) - m_country = m_country.mid(m_country.tqfind("_")+1); - if(m_country.tqcontains(".")) - m_country = m_country.left(m_country.tqfind(".")); - if(m_country.tqcontains("@")) - m_country = m_country.left(m_country.tqfind("@")); + if(m_country.contains("_")) + m_country = m_country.mid(m_country.find("_")+1); + if(m_country.contains(".")) + m_country = m_country.left(m_country.find(".")); + if(m_country.contains("@")) + m_country = m_country.left(m_country.find("@")); if(m_country != "C") m_country = m_country.lower(); if(m_country == "en") // special-case "en" - should be "en_GB" or "en_US", but plain "en" is in use quite often @@ -82,9 +82,9 @@ KFindLanguage::KFindLanguage() { TQString name = entry.readEntry("Name", i18n("without name")); TQString tag = *it; - int index = tag.tqfindRev('/'); + int index = tag.findRev('/'); tag = tag.left(index); - index = tag.tqfindRev('/'); + index = tag.findRev('/'); tag = tag.mid(index+1); m_langlist << tag; @@ -109,10 +109,10 @@ KFindLanguage::KFindLanguage() { TQStringList::ConstIterator it; for( it = m_langlist.begin(); it != m_langlist.end(); ++it) { int match=0; - TQString l = (*it).left((*it).tqfind(";")); + TQString l = (*it).left((*it).find(";")); if (l == "C") match++; - if(l.tqcontains(compare)) + if(l.contains(compare)) match+=2; if(l.left(compare.length()) == compare) match+=10; diff --git a/kpersonalizer/ksysinfo.cpp b/kpersonalizer/ksysinfo.cpp index 15b30fbf9..e5f143229 100644 --- a/kpersonalizer/ksysinfo.cpp +++ b/kpersonalizer/ksysinfo.cpp @@ -57,9 +57,9 @@ void KSysInfo::initXInfo() { // vendor m_xvendor = !dpy ? TQString::null : (TQString)ServerVendor(dpy); // XFree-Inc? - m_xfree_inc = m_xvendor.tqcontains("XFree86"); + m_xfree_inc = m_xvendor.contains("XFree86"); // X.org ? - m_xorg = m_xvendor.tqcontains("X.Org"); + m_xorg = m_xvendor.contains("X.Org"); // release-number m_xrelease = !dpy ? 0 : VendorRelease(dpy); // RENDER-support @@ -106,22 +106,22 @@ void KSysInfo::initFontFamilies() { for (uint i=0; i < families.count(); i++) { TQString font = *families.tqat(i); //add further NORMAL fonts here - if ( (font.tqcontains("Arial [") || font=="Arial") && normal_priority < 15 ) { + if ( (font.contains("Arial [") || font=="Arial") && normal_priority < 15 ) { m_normal_font = font; normal_priority = 15; - } else if ( font.tqcontains("Vera Sans") && normal_priority < 12 ) { + } else if ( font.contains("Vera Sans") && normal_priority < 12 ) { m_normal_font = font; normal_priority = 12; - } else if ( (font.tqcontains("Luxi Sans") || font.tqcontains("Lucidux Sans")) && normal_priority < 10 ) { + } else if ( (font.contains("Luxi Sans") || font.contains("Lucidux Sans")) && normal_priority < 10 ) { m_normal_font = font; normal_priority = 10; - } else if ( font.tqcontains("Helmet") && normal_priority < 7 ) { + } else if ( font.contains("Helmet") && normal_priority < 7 ) { m_normal_font = font; normal_priority = 7; - } else if ( font.tqcontains("Nimbus Sans") && normal_priority < 5 ) { + } else if ( font.contains("Nimbus Sans") && normal_priority < 5 ) { m_normal_font = font; normal_priority = 5; - } else if ( font.tqcontains("Sans") & m_fdb->isSmoothlyScalable(font) && normal_priority < 3 ) { + } else if ( font.contains("Sans") & m_fdb->isSmoothlyScalable(font) && normal_priority < 3 ) { m_normal_font = font; normal_priority = 3; } else if ( m_fdb->isSmoothlyScalable(font) && !(m_fdb->isFixedPitch(font,"Normal") && m_fdb->isFixedPitch(font,"Bold")) && normal_priority < 2) { @@ -132,16 +132,16 @@ void KSysInfo::initFontFamilies() { normal_priority = 1; } //add further FIXED fonts here - if (font.tqcontains("Courier New") && fixed_priority < 15){ + if (font.contains("Courier New") && fixed_priority < 15){ m_fixed_font = font; fixed_priority = 15; - } else if ( (font.tqcontains("Luxi Mono") || font.tqcontains("Lucidux Mono")) && fixed_priority < 10 ) { + } else if ( (font.contains("Luxi Mono") || font.contains("Lucidux Mono")) && fixed_priority < 10 ) { m_fixed_font = font; fixed_priority = 10; - } else if (font.tqcontains("Andale Mono") && fixed_priority < 5) { + } else if (font.contains("Andale Mono") && fixed_priority < 5) { m_fixed_font = font; fixed_priority = 5; - } else if ( font.tqcontains("Mono") && m_fdb->isSmoothlyScalable(font) && fixed_priority < 3 ) { + } else if ( font.contains("Mono") && m_fdb->isSmoothlyScalable(font) && fixed_priority < 3 ) { m_fixed_font = font; fixed_priority = 3; } else if ( m_fdb->isSmoothlyScalable(font) && m_fdb->isFixedPitch(font,"Normal") && fixed_priority < 2 ) { @@ -201,11 +201,11 @@ TQFont KSysInfo::getFixedWidthFont(){ // File Parser while (file->readLine(buf, sizeof(buf) - 1) > 0) { TQString s1 = TQString::fromLocal8Bit(buf); - TQString s2 = s1.mid(s1.tqfind(":") + 1); - s1.truncate(s1.tqfind(":")); + TQString s2 = s1.mid(s1.find(":") + 1); + s1.truncate(s1.find(":")); s1=s1.stripWhiteSpace(); s2=s2.stripWhiteSpace(); - if(s1.tqcontains("MHz")){ + if(s1.contains("MHz")){ float fspeed = s2.toFloat(0); fspeed = floor(fspeed); m_cpu_speed = (int)fspeed; diff --git a/kscreensaver/random.cpp b/kscreensaver/random.cpp index 322890590..42b92f936 100644 --- a/kscreensaver/random.cpp +++ b/kscreensaver/random.cpp @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) TQStringList defaults = type.readListEntry( "Defaults" ); TQMap<TQString, int> def_numbers; for ( TQStringList::ConstIterator it = defaults.begin(); it != defaults.end(); ++it ) { - int index = ( *it ).tqfind( ':' ); + int index = ( *it ).find( ':' ); if ( index == -1 ) def_numbers[*it] = 1; else @@ -160,7 +160,7 @@ int main(int argc, char *argv[]) int howoften = 1; if ( defaults.count() != 0 ) { TQFileInfo fi( tempSaverFileList[i] ); - if ( def_numbers.tqcontains( fi.fileName() ) ) + if ( def_numbers.contains( fi.fileName() ) ) howoften = def_numbers[fi.fileName()]; else howoften = 0; diff --git a/ksmserver/legacy.cpp b/ksmserver/legacy.cpp index f754d4126..1a1cea765 100644 --- a/ksmserver/legacy.cpp +++ b/ksmserver/legacy.cpp @@ -71,7 +71,7 @@ static Atom wm_client_leader = None; static int winsErrorHandler(Display *, XErrorEvent *ev) { if (windowMapPtr) { - WindowMap::Iterator it = windowMapPtr->tqfind(ev->resourceid); + WindowMap::Iterator it = windowMapPtr->find(ev->resourceid); if (it != windowMapPtr->end()) (*it).type = SM_ERROR; } @@ -101,7 +101,7 @@ void KSMServer::performLegacySessionSave() for ( TQValueList<WId>::ConstIterator it = module.windows().begin(); it != module.windows().end(); ++it) { WId leader = windowWmClientLeader( *it ); - if (!legacyWindows.tqcontains(leader) && windowSessionId( *it, leader ).isEmpty()) { + if (!legacyWindows.contains(leader) && windowSessionId( *it, leader ).isEmpty()) { SMType wtype = SM_WMCOMMAND; int nprotocols = 0; Atom *protocols = 0; @@ -165,7 +165,7 @@ void KSMServer::performLegacySessionSave() XNextEvent(newdisplay, &ev); if ( ( ev.xany.type == UnmapNotify ) || ( ev.xany.type == PropertyNotify && ev.xproperty.atom == XA_WM_COMMAND ) ) { - WindowMap::Iterator it = legacyWindows.tqfind( ev.xany.window ); + WindowMap::Iterator it = legacyWindows.find( ev.xany.window ); if ( it != legacyWindows.end() && (*it).type != SM_WMCOMMAND ) { awaiting_replies -= 1; if ( (*it).type != SM_ERROR ) @@ -217,8 +217,8 @@ void KSMServer::storeLegacySession( KConfig* config ) int count = 0; for (WindowMap::ConstIterator it = legacyWindows.begin(); it != legacyWindows.end(); ++it) { if ( (*it).type != SM_ERROR) { - if( excludeApps.tqcontains( (*it).wmclass1.lower()) - || excludeApps.tqcontains( (*it).wmclass2.lower()) || (*it).wmCommand[0] == "compiz" || (*it).wmCommand[0] == "beryl" || (*it).wmCommand[0] == "aquamarine" || (*it).wmCommand[0] == "beryl-manager" || (*it).wmCommand[0] == "beryl-settings" || (*it).wmCommand[0] == "kde-window-decorator" || (*it).wmCommand[0] == "emerald") + if( excludeApps.contains( (*it).wmclass1.lower()) + || excludeApps.contains( (*it).wmclass2.lower()) || (*it).wmCommand[0] == "compiz" || (*it).wmCommand[0] == "beryl" || (*it).wmCommand[0] == "aquamarine" || (*it).wmCommand[0] == "beryl-manager" || (*it).wmCommand[0] == "beryl-settings" || (*it).wmCommand[0] == "kde-window-decorator" || (*it).wmCommand[0] == "emerald") continue; if ( !(*it).wmCommand.isEmpty() && !(*it).wmClientMachine.isEmpty() ) { count++; diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index fc3afb288..ecb3cdcde 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -632,9 +632,9 @@ KSMServer::KSMServer( const TQString& windowManager, bool _only_local ) TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver")); TQCString display = ::getenv("DISPLAY"); // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); int i; - while( (i = display.tqfind(':')) >= 0) + while( (i = display.find(':')) >= 0) display[i] = '_'; fName += "_"+display; @@ -697,9 +697,9 @@ void KSMServer::cleanUp() TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver")); TQCString display = ::getenv("DISPLAY"); // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); int i; - while( (i = display.tqfind(':')) >= 0) + while( (i = display.find(':')) >= 0) display[i] = '_'; fName += "_"+display; @@ -761,7 +761,7 @@ KSMClient* KSMServer::newClient( SmsConn conn ) void KSMServer::deleteClient( KSMClient* client ) { - if ( clients.tqfindRef( client ) == -1 ) // paranoia + if ( clients.findRef( client ) == -1 ) // paranoia return; clients.removeRef( client ); if ( client == clientInteracting ) { @@ -868,7 +868,7 @@ void KSMServer::storeSession() TQStringList restartCommand = c->restartCommand(); if (program.isEmpty() && restartCommand.isEmpty()) continue; - if (excludeApps.tqcontains( program.lower())) + if (excludeApps.contains( program.lower())) continue; count++; diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp index 3a415d193..261793dcf 100644 --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -320,7 +320,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, FlatButton* btnLogout = new FlatButton( frame ); btnLogout->setTextLabel( TQString("&") + i18n("Log out"), false ); btnLogout->setPixmap( DesktopIcon( "back") ); - int i = btnLogout->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 + int i = btnLogout->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnLogout->setAccel( "ALT+" + btnLogout->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnLogout ); connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout())); @@ -431,7 +431,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, FlatButton* btnSuspend = new FlatButton( frame ); btnSuspend->setTextLabel( i18n("&Suspend"), false ); btnSuspend->setPixmap( DesktopIcon( "suspend") ); - int i = btnSuspend->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 + int i = btnSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnSuspend->setAccel( "ALT+" + btnSuspend->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnSuspend); connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend())); @@ -443,7 +443,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, FlatButton* btnHibernate = new FlatButton( frame ); btnHibernate->setTextLabel( i18n("&Hibernate"), false ); btnHibernate->setPixmap( DesktopIcon( "hibernate") ); - int i = btnHibernate->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 + int i = btnHibernate->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHibernate->setAccel( "ALT+" + btnHibernate->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnHibernate); connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate())); @@ -460,7 +460,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, FlatButton* btnReboot = new FlatButton( frame ); btnReboot->setTextLabel( i18n("&Restart"), false ); btnReboot->setPixmap( DesktopIcon( "reload") ); - int i = btnReboot->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 + int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ; hbuttonbox2->addWidget ( btnReboot); connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot())); @@ -479,7 +479,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, for (TQStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index) { TQString label = (*it); - label=label.tqreplace('&',"&&"); + label=label.replace('&',"&&"); if (index == cur) targets->insertItem( label + i18n("current option in boot loader", " (current)"), index); else @@ -495,7 +495,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, FlatButton* btnHalt = new FlatButton( frame ); btnHalt->setTextLabel( i18n("&Turn Off"), false ); btnHalt->setPixmap( DesktopIcon( "exit") ); - i = btnHalt->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 + i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ; hbuttonbox2->addWidget ( btnHalt ); connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); @@ -544,7 +544,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, for (TQStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index) { TQString label = (*it); - label=label.tqreplace('&',"&&"); + label=label.replace('&',"&&"); if (index == cur) targets->insertItem( label + i18n("current option in boot loader", " (current)"), index); else diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp index e74083de6..2778b9dd9 100644 --- a/ksmserver/startup.cpp +++ b/ksmserver/startup.cpp @@ -363,14 +363,14 @@ bool KSMServer::checkStartupSuspend() void KSMServer::suspendStartup( TQCString app ) { - if( !startupSuspendCount.tqcontains( app )) + if( !startupSuspendCount.contains( app )) startupSuspendCount[ app ] = 0; ++startupSuspendCount[ app ]; } void KSMServer::resumeStartup( TQCString app ) { - if( !startupSuspendCount.tqcontains( app )) + if( !startupSuspendCount.contains( app )) return; if( --startupSuspendCount[ app ] == 0 ) { startupSuspendCount.remove( app ); diff --git a/ksplashml/kcmksplash/installer.cpp b/ksplashml/kcmksplash/installer.cpp index 7cffb906c..1b7a3afba 100644 --- a/ksplashml/kcmksplash/installer.cpp +++ b/ksplashml/kcmksplash/installer.cpp @@ -164,7 +164,7 @@ void SplashInstaller::addNewTheme(const KURL &srcURL) TQString dir = KGlobal::dirs()->saveLocation("ksplashthemes"); KURL url; TQString filename = srcURL.fileName(); - int i = filename.tqfindRev('.'); + int i = filename.findRev('.'); // Convert extension to lower case. if (i >= 0) filename = filename.left(i)+filename.mid(i).lower(); @@ -275,9 +275,9 @@ void SplashInstaller::save() if (cur < 0) return; TQString path = mThemesList->text(cur); - if ( mThemesList->text2path.tqcontains( path ) ) + if ( mThemesList->text2path.contains( path ) ) path = mThemesList->text2path[path]; - cur = path.tqfindRev('/'); + cur = path.findRev('/'); cnf.writeEntry("Theme", path.mid(cur+1) ); cnf.sync(); emit changed( false ); @@ -331,7 +331,7 @@ void SplashInstaller::slotSetTheme(int id) { TQString error = i18n("(Could not load theme)"); path = mThemesList->text(id); - if ( mThemesList->text2path.tqcontains( path ) ) + if ( mThemesList->text2path.contains( path ) ) path = mThemesList->text2path[path]; enabled = false; KURL url; @@ -339,7 +339,7 @@ void SplashInstaller::slotSetTheme(int id) if (!path.isEmpty()) { // Make sure the correct plugin is installed. - int i = path.tqfindRev('/'); + int i = path.findRev('/'); if (i >= 0) themeName = path.mid(i+1); url.setPath( path + "/Theme.rc" ); @@ -459,7 +459,7 @@ void SplashInstaller::slotTest() if (i < 0) return; TQString themeName = mThemesList->text2path[mThemesList->text(i)]; - int r = themeName.tqfindRev('/'); + int r = themeName.findRev('/'); if (r >= 0) themeName = themeName.mid(r+1); diff --git a/ksplashml/themeengine/objkstheme.cpp b/ksplashml/themeengine/objkstheme.cpp index dfcec5c4d..9aa6d2b26 100644 --- a/ksplashml/themeengine/objkstheme.cpp +++ b/ksplashml/themeengine/objkstheme.cpp @@ -41,7 +41,7 @@ ObjKsTheme::ObjKsTheme( const TQString& theme ) if (desktop->isVirtualDesktop() && mXineramaScreen != -2) { TQRect rect = desktop->screenGeometry( mXineramaScreen ); - if (!rect.tqcontains(TQCursor::pos())) + if (!rect.contains(TQCursor::pos())) TQCursor::setPos(rect.center()); } diff --git a/ksplashml/themeengine/themeengine.cpp b/ksplashml/themeengine/themeengine.cpp index bf1fd4a8a..f88bee8d9 100644 --- a/ksplashml/themeengine/themeengine.cpp +++ b/ksplashml/themeengine/themeengine.cpp @@ -87,7 +87,7 @@ void ThemeEngine::addSplashWindow( TQWidget* w ) { if( !w->isTopLevel()) return; - if( d->mSplashWindows.tqcontains( w->winId())) + if( d->mSplashWindows.contains( w->winId())) return; if( !w->testWFlags( WX11BypassWM )) { // All toplevel widgets should be probably required to be WX11BypassWM diff --git a/kstart/kstart.cpp b/kstart/kstart.cpp index d9b8b5e0b..410a1acb8 100644 --- a/kstart/kstart.cpp +++ b/kstart/kstart.cpp @@ -70,7 +70,7 @@ KStart::KStart() data.addPid( proc.pid() ); TQCString bin = proc.args().first(); data.setName( bin ); - data.setBin( bin.mid( bin.tqfindRev( '/' ) + 1 )); + data.setBin( bin.mid( bin.findRev( '/' ) + 1 )); KStartupInfo::sendChange( id, data ); } else @@ -88,7 +88,7 @@ void KStart::sendRule() { message += "wmclass=" + windowclass + "\nwmclassmatch=1\n" // 1 = exact match + "wmclasscomplete=" // if windowclass contains a space (i.e. 2 words, use whole WM_CLASS) - + ( windowclass.tqcontains( ' ' ) ? "true" : "false" ) + "\n"; + + ( windowclass.contains( ' ' ) ? "true" : "false" ) + "\n"; if( (windowtitle != 0) || (windowclass != 0) ) { // always ignore these window types message += "types=" + TQCString().setNum( -1U & @@ -153,7 +153,7 @@ void KStart::windowAdded(WId w){ XClassHint hint; if( !XGetClassHint( qt_xdisplay(), w, &hint )) return; - TQCString cls = windowclass.tqcontains( ' ' ) + TQCString cls = windowclass.contains( ' ' ) ? TQCString( hint.res_name ) + ' ' + hint.res_class : TQCString( hint.res_class ); cls = cls.lower(); XFree( hint.res_name ); diff --git a/ksysguard/gui/SensorDisplayLib/LogFile.cc b/ksysguard/gui/SensorDisplayLib/LogFile.cc index bd74ff2c0..314690513 100644 --- a/ksysguard/gui/SensorDisplayLib/LogFile.cc +++ b/ksysguard/gui/SensorDisplayLib/LogFile.cc @@ -62,7 +62,7 @@ LogFile::addSensor(const TQString& hostName, const TQString& sensorName, const T registerSensor(new KSGRD::SensorProperties(hostName, sensorName, sensorType, title)); - TQString sensorID = sensorName.right(sensorName.length() - (sensorName.tqfindRev("/") + 1)); + TQString sensorID = sensorName.right(sensorName.length() - (sensorName.findRev("/") + 1)); sendRequest(sensors().tqat(0)->hostName(), TQString("logfile_register %1" ).arg(sensorID), 42); diff --git a/ksysguard/gui/SensorDisplayLib/ProcessList.cc b/ksysguard/gui/SensorDisplayLib/ProcessList.cc index 342a6e5e5..0dc2faf53 100644 --- a/ksysguard/gui/SensorDisplayLib/ProcessList.cc +++ b/ksysguard/gui/SensorDisplayLib/ProcessList.cc @@ -486,7 +486,7 @@ ProcessList::buildList() addProcess(p, pli); - if (selectedPIds.tqfindIndex(p->pid()) != -1) + if (selectedPIds.findIndex(p->pid()) != -1) pli->setSelected(true); } pl.removeFirst(); @@ -513,7 +513,7 @@ ProcessList::buildTree() int pid = ps->pid(); pl.remove(); - if (selectedPIds.tqfindIndex(pid) != -1) + if (selectedPIds.findIndex(pid) != -1) pli->setSelected(true); // insert all child processes of current process @@ -569,10 +569,10 @@ ProcessList::extendTree(TQPtrList<KSGRD::SensorPSLine>* pl, ProcessLVI* parent, addProcess(ps, pli); - if (selectedPIds.tqfindIndex(ps->pid()) != -1) + if (selectedPIds.findIndex(ps->pid()) != -1) pli->setSelected(true); - if (ps->ppid() != INIT_PID && closedSubTrees.tqfindIndex(ps->ppid()) != -1) + if (ps->ppid() != INIT_PID && closedSubTrees.findIndex(ps->ppid()) != -1) parent->setOpen(false); else parent->setOpen(true); diff --git a/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc b/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc index 4d8c6eb37..34c448918 100644 --- a/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc +++ b/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc @@ -247,7 +247,7 @@ void SensorDisplay::updateWhatsThis() void SensorDisplay::hosts( TQStringList& list ) { for ( SensorProperties *s = mSensors.first(); s; s = mSensors.next() ) - if ( !list.tqcontains( s->hostName() ) ) + if ( !list.contains( s->hostName() ) ) list.append( s->hostName() ); } diff --git a/ksysguard/gui/WorkSheet.cc b/ksysguard/gui/WorkSheet.cc index 53737fdaa..ac0793a9a 100644 --- a/ksysguard/gui/WorkSheet.cc +++ b/ksysguard/gui/WorkSheet.cc @@ -450,7 +450,7 @@ void WorkSheet::dropEvent( TQDropEvent *e ) * event and replace or add sensor. */ for ( uint r = 0; r < mRows; ++r ) for ( uint c = 0; c < mColumns; ++c ) - if ( mDisplayList[ r ][ c ]->tqgeometry().tqcontains( e->pos() ) ) { + if ( mDisplayList[ r ][ c ]->tqgeometry().contains( e->pos() ) ) { addDisplay( hostName, sensorName, sensorType, sensorDescr, r, c ); return; } diff --git a/ksysguard/gui/Workspace.cc b/ksysguard/gui/Workspace.cc index c39425919..3c1a92a56 100644 --- a/ksysguard/gui/Workspace.cc +++ b/ksysguard/gui/Workspace.cc @@ -196,7 +196,7 @@ void Workspace::loadWorkSheet( const KURL &url ) * code. */ TQString tmpFile; KIO::NetAccess::download( url, tmpFile, this ); - mWorkDir = tmpFile.left( tmpFile.tqfindRev( '/' ) ); + mWorkDir = tmpFile.left( tmpFile.findRev( '/' ) ); // Load sheet from file. if ( !restoreWorkSheet( tmpFile ) ) @@ -240,13 +240,13 @@ void Workspace::saveWorkSheet( WorkSheet *sheet ) if ( fileName.isEmpty() ) return; - mWorkDir = fileName.left( fileName.tqfindRev( '/' ) ); + mWorkDir = fileName.left( fileName.findRev( '/' ) ); // extract filename without path - TQString baseName = fileName.right( fileName.length() - fileName.tqfindRev( '/' ) - 1 ); + TQString baseName = fileName.right( fileName.length() - fileName.findRev( '/' ) - 1 ); // chop off extension (usually '.sgrd') - baseName = baseName.left( baseName.tqfindRev( '.' ) ); + baseName = baseName.left( baseName.findRev( '.' ) ); changeTab( sheet, baseName ); } @@ -278,13 +278,13 @@ void Workspace::saveWorkSheetAs( WorkSheet *sheet ) if ( fileName.isEmpty() ) return; - mWorkDir = fileName.left( fileName.tqfindRev( '/' ) ); + mWorkDir = fileName.left( fileName.findRev( '/' ) ); // extract filename without path - TQString baseName = fileName.right( fileName.length() - fileName.tqfindRev( '/' ) - 1 ); + TQString baseName = fileName.right( fileName.length() - fileName.findRev( '/' ) - 1 ); // chop off extension (usually '.sgrd') - baseName = baseName.left( baseName.tqfindRev( '.' ) ); + baseName = baseName.left( baseName.findRev( '.' ) ); changeTab( sheet, baseName ); } while ( !sheet->save( fileName ) ); @@ -354,10 +354,10 @@ WorkSheet *Workspace::restoreWorkSheet( const TQString &fileName, const TQString tmpStr = newName; // extract filename without path - TQString baseName = tmpStr.right( tmpStr.length() - tmpStr.tqfindRev( '/' ) - 1 ); + TQString baseName = tmpStr.right( tmpStr.length() - tmpStr.findRev( '/' ) - 1 ); // chop off extension (usually '.sgrd') - baseName = baseName.left( baseName.tqfindRev( '.' ) ); + baseName = baseName.left( baseName.findRev( '.' ) ); WorkSheet *sheet = new WorkSheet( this ); sheet->setTitle( baseName ); diff --git a/ksysguard/gui/ksgrd/SensorAgent.cc b/ksysguard/gui/ksgrd/SensorAgent.cc index 363d66494..5fcb14a9c 100644 --- a/ksysguard/gui/ksgrd/SensorAgent.cc +++ b/ksysguard/gui/ksgrd/SensorAgent.cc @@ -99,7 +99,7 @@ void SensorAgent::processAnswer( const TQString &buffer ) int end; // And now the real information - while ( ( end = mAnswerBuffer.tqfind( "\nksysguardd> " ) ) >= 0 ) { + while ( ( end = mAnswerBuffer.find( "\nksysguardd> " ) ) >= 0 ) { #if SA_TRACE kdDebug(1215) << "<= " << mAnswerBuffer.left( end ) << "(" << mInputFIFO.count() << "/" diff --git a/ksysguard/gui/ksgrd/SensorManager.cc b/ksysguard/gui/ksgrd/SensorManager.cc index 30bf53c43..43f878cda 100644 --- a/ksysguard/gui/ksgrd/SensorManager.cc +++ b/ksysguard/gui/ksgrd/SensorManager.cc @@ -162,7 +162,7 @@ bool SensorManager::engageHost( const TQString &hostName ) { bool retVal = true; - if ( hostName.isEmpty() || mAgents.tqfind( hostName ) == 0 ) { + if ( hostName.isEmpty() || mAgents.find( hostName ) == 0 ) { if(hostName == "localhost") { //There was a bug where the xml file would end up not specifying to connect to localhost. //This work around makes sure we always connect to localhost @@ -202,7 +202,7 @@ bool SensorManager::engage( const TQString &hostName, const TQString &shell, { SensorAgent *agent; - if ( ( agent = mAgents.tqfind( hostName ) ) == 0 ) { + if ( ( agent = mAgents.find( hostName ) ) == 0 ) { if ( port == -1 ) agent = new SensorShellAgent( this ); else @@ -253,7 +253,7 @@ bool SensorManager::disengage( const SensorAgent *agent ) bool SensorManager::disengage( const TQString &hostName ) { SensorAgent *agent; - if ( ( agent = mAgents.tqfind( hostName ) ) != 0 ) { + if ( ( agent = mAgents.find( hostName ) ) != 0 ) { mAgents.remove( hostName ); emit update(); return true; @@ -266,7 +266,7 @@ bool SensorManager::resynchronize( const TQString &hostName ) { SensorAgent *agent; - if ( ( agent = mAgents.tqfind( hostName ) ) == 0 ) + if ( ( agent = mAgents.find( hostName ) ) == 0 ) return false; TQString shell, command; @@ -327,11 +327,11 @@ bool SensorManager::event( TQEvent *event ) bool SensorManager::sendRequest( const TQString &hostName, const TQString &req, SensorClient *client, int id ) { - SensorAgent *agent = mAgents.tqfind( hostName ); + SensorAgent *agent = mAgents.find( hostName ); if( !agent && hostName == "localhost") { //we should always be able to reconnect to localhost engage("localhost", "", "ksysguardd", -1); - agent = mAgents.tqfind( hostName ); + agent = mAgents.find( hostName ); } if ( agent ) { agent->sendRequest( req, client, id ); @@ -358,7 +358,7 @@ bool SensorManager::hostInfo( const TQString &hostName, TQString &shell, TQString &command, int &port ) { SensorAgent *agent; - if ( ( agent = mAgents.tqfind( hostName ) ) != 0 ) { + if ( ( agent = mAgents.find( hostName ) ) != 0 ) { agent->hostInfo( shell, command, port ); return true; } @@ -395,7 +395,7 @@ TQString SensorManager::translateSensor( const TQString &sensor ) const TQString token, out; int start = 0, end = 0; for ( ; ; ) { - end = sensor.tqfind( '/', start ); + end = sensor.find( '/', start ); if ( end > 0 ) out += translateSensorPath( sensor.mid( start, end - start ) ) + "/"; else { diff --git a/ksysguard/gui/ksysguard.cc b/ksysguard/gui/ksysguard.cc index 570f32e90..6bc3d8398 100644 --- a/ksysguard/gui/ksysguard.cc +++ b/ksysguard/gui/ksysguard.cc @@ -212,9 +212,9 @@ TQStringList TopLevel::listHosts() TQString TopLevel::readIntegerSensor( const TQString &sensorLocator ) { - TQString host = sensorLocator.left( sensorLocator.tqfind( ':' ) ); + TQString host = sensorLocator.left( sensorLocator.find( ':' ) ); TQString sensor = sensorLocator.right( sensorLocator.length() - - sensorLocator.tqfind( ':' ) - 1 ); + sensorLocator.find( ':' ) - 1 ); DCOPClientTransaction *dcopTransaction = kapp->dcopClient()->beginTransaction(); mDCopFIFO.prepend( dcopTransaction ); @@ -229,9 +229,9 @@ TQStringList TopLevel::readListSensor( const TQString& sensorLocator ) { TQStringList retval; - TQString host = sensorLocator.left( sensorLocator.tqfind( ':' ) ); + TQString host = sensorLocator.left( sensorLocator.find( ':' ) ); TQString sensor = sensorLocator.right( sensorLocator.length() - - sensorLocator.tqfind( ':' ) - 1 ); + sensorLocator.find( ':' ) - 1 ); DCOPClientTransaction *dcopTransaction = kapp->dcopClient()->beginTransaction(); mDCopFIFO.prepend( dcopTransaction ); diff --git a/kwin/activation.cpp b/kwin/activation.cpp index ad9dc8eba..544569a2d 100644 --- a/kwin/activation.cpp +++ b/kwin/activation.cpp @@ -431,7 +431,7 @@ bool Workspace::activateNextClient( Client* c ) if( c == NULL && !(*it)->isOnScreen( activeScreen())) continue; } - if( mainwindows.tqcontains( *it )) + if( mainwindows.contains( *it )) { get_focus = *it; break; @@ -484,7 +484,7 @@ void Workspace::setCurrentScreen( int new_screen ) void Workspace::gotFocusIn( const Client* c ) { - if( should_get_focus.tqcontains( const_cast< Client* >( c ))) + if( should_get_focus.contains( const_cast< Client* >( c ))) { // remove also all sooner elements that should have got FocusIn, // but didn't for some reason (and also won't anymore, because they were sooner) while( should_get_focus.first() != c ) @@ -521,7 +521,7 @@ bool Workspace::allowClientActivation( const Client* c, Time time, bool focus_in Client* ac = mostRecentlyActivatedClient(); if( focus_in ) { - if( should_get_focus.tqcontains( const_cast< Client* >( c ))) + if( should_get_focus.contains( const_cast< Client* >( c ))) return true; // FocusIn was result of KWin's action // Before getting FocusIn, the active Client already // got FocusOut, and therefore got deactivated. diff --git a/kwin/bridge.cpp b/kwin/bridge.cpp index 17b801475..49840e248 100644 --- a/kwin/bridge.cpp +++ b/kwin/bridge.cpp @@ -160,7 +160,7 @@ TQRegion Bridge::unobscuredRegion( const TQRegion& r ) const { TQRegion reg( r ); const ClientList stacking_order = c->workspace()->stackingOrder(); - ClientList::ConstIterator it = stacking_order.tqfind( c ); + ClientList::ConstIterator it = stacking_order.find( c ); ++it; for(; it != stacking_order.end(); diff --git a/kwin/client.cpp b/kwin/client.cpp index dfb352408..3205b9ec7 100644 --- a/kwin/client.cpp +++ b/kwin/client.cpp @@ -1514,7 +1514,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, // irTop is not necessarily larger than irBottom and // yIncrement isn't necessarily positive for (i = irLeft; i <= irRight; i++) { - if (occluded.tqcontains(TQPoint(i, j))) + if (occluded.contains(TQPoint(i, j))) intersectCount++; } } @@ -1524,7 +1524,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, intersectCount = 0; for (i = irLeft; i <= irRight; i++) { - if (occluded.tqcontains(TQPoint(i, irBottom))) + if (occluded.contains(TQPoint(i, irBottom))) intersectCount++; } } @@ -1543,7 +1543,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, (int)(pixelBlue + (blue - pixelBlue) * opacity))); for (i = irLeft; i <= irRight; i++) { - if (occluded.tqcontains(TQPoint(i, irTop))) + if (occluded.contains(TQPoint(i, irTop))) intersectCount--; } @@ -1553,12 +1553,12 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, irTop += yIncrement; for (j = irTop; j != irBottom; j += yIncrement) { - if (occluded.tqcontains(TQPoint(irLeft, j))) + if (occluded.contains(TQPoint(irLeft, j))) intersectCount--; } irRight++; for (j = irTop; j != irBottom; j += yIncrement) { - if (occluded.tqcontains(TQPoint(irRight, j))) + if (occluded.contains(TQPoint(irRight, j))) intersectCount++; } diff --git a/kwin/clients/b2/b2client.cpp b/kwin/clients/b2/b2client.cpp index ae010e830..adb594282 100644 --- a/kwin/clients/b2/b2client.cpp +++ b/kwin/clients/b2/b2client.cpp @@ -1391,7 +1391,7 @@ void B2Titlebar::mouseDoubleClickEvent(TQMouseEvent *e) void B2Titlebar::wheelEvent(TQWheelEvent *e) { - if (client->isSetShade() || TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos())) + if (client->isSetShade() || TQT_TQRECT_OBJECT(rect()).contains(e->pos())) client->titlebarMouseWheelOperation( e->delta()); } diff --git a/kwin/clients/keramik/embedtool.cpp b/kwin/clients/keramik/embedtool.cpp index 415862842..d1cbd78fd 100644 --- a/kwin/clients/keramik/embedtool.cpp +++ b/kwin/clients/keramik/embedtool.cpp @@ -100,7 +100,7 @@ void KeramikEmbedder::embed( const char *name ) TQString codename( basename ); TQImage image( name ); - codename = codename.tqreplace( TQRegExp("[^a-zA-Z0-9]"), "_" ); + codename = codename.replace( TQRegExp("[^a-zA-Z0-9]"), "_" ); stream << "\tstatic const QRgb " << codename << "_data[] = {" << endl << "\t\t"; stream.setf( TQTextStream::hex | TQTextStream::right ); @@ -200,7 +200,7 @@ void KeramikEmbedder::writeIndex() stream << "\t\t\tm_inst = NULL;\n"; stream << "\t\t}\n\n"; stream << "\t\tTQImage *image( const TQString &name ) const {\n"; - stream << "\t\t\treturn db->tqfind( name );\n"; + stream << "\t\t\treturn db->find( name );\n"; stream << "\t\t}\n\n"; stream << "\t}; // class KeramikImageDb\n\n"; stream << "\tKeramikImageDb *KeramikImageDb::m_inst = NULL;\n\n"; diff --git a/kwin/clients/keramik/keramik.cpp b/kwin/clients/keramik/keramik.cpp index 2d5f111c8..089c7ed69 100644 --- a/kwin/clients/keramik/keramik.cpp +++ b/kwin/clients/keramik/keramik.cpp @@ -1657,14 +1657,14 @@ void KeramikClient::resizeEvent( TQResizeEvent *e ) void KeramikClient::mouseDoubleClickEvent( TQMouseEvent *e ) { if ( e->button() == Qt::LeftButton - && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).tqcontains( e->pos() ) ) + && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) ) titlebarDblClickOperation(); } void KeramikClient::wheelEvent( TQWheelEvent *e ) { if (isSetShade() - || TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).tqcontains( e->pos() ) ) + || TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) ) titlebarMouseWheelOperation( e->delta()); } diff --git a/kwin/clients/kwmtheme/kwmthemeclient.cpp b/kwin/clients/kwmtheme/kwmthemeclient.cpp index 0293d47c4..9f51c0edf 100644 --- a/kwin/clients/kwmtheme/kwmthemeclient.cpp +++ b/kwin/clients/kwmtheme/kwmthemeclient.cpp @@ -752,7 +752,7 @@ void KWMThemeClient::showEvent(TQShowEvent *) void KWMThemeClient::mouseDoubleClickEvent( TQMouseEvent * e ) { - if (e->button() == LeftButton && titlebar->geometry().tqcontains( e->pos() ) ) + if (e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) ) titlebarDblClickOperation(); } diff --git a/kwin/clients/plastik/plastikclient.cpp b/kwin/clients/plastik/plastikclient.cpp index 61dfdaba7..0e72ff59c 100644 --- a/kwin/clients/plastik/plastikclient.cpp +++ b/kwin/clients/plastik/plastikclient.cpp @@ -280,7 +280,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(titleEdgeTop > 0) { tempRect.setRect(r_x+2, r_y, r_w-2*2, titleEdgeTop ); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTileTop, active, toolWindow) ); } } @@ -291,7 +291,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(titleEdgeLeft > 0) { tempRect.setRect(r_x, r_y, borderLeft, titleEdgeTop+titleHeight+titleEdgeBottom); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarLeft, active, toolWindow) ); titleMarginLeft = borderLeft; } @@ -301,7 +301,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(titleEdgeRight > 0) { tempRect.setRect(borderRightLeft, r_y, borderRight, titleEdgeTop+titleHeight+titleEdgeBottom); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarRight, active, toolWindow) ); titleMarginRight = borderRight; } @@ -312,7 +312,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(Rtitle.width() > 0) { m_captionRect = captionRect(); // also update m_captionRect! - if (m_captionRect.isValid() && region.tqcontains(m_captionRect) ) + if (m_captionRect.isValid() && region.contains(m_captionRect) ) { painter.drawTiledPixmap(m_captionRect, caption); } @@ -320,14 +320,14 @@ void PlastikClient::paintEvent(TQPaintEvent *e) // left to the title tempRect.setRect(r_x+titleMarginLeft, m_captionRect.top(), m_captionRect.left() - (r_x+titleMarginLeft), m_captionRect.height() ); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTile, active, toolWindow) ); } // right to the title tempRect.setRect(m_captionRect.right()+1, m_captionRect.top(), (r_x2-titleMarginRight) - m_captionRect.right(), m_captionRect.height() ); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTile, active, toolWindow) ); } @@ -337,7 +337,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(borderLeft > 0 && sideHeight > 0) { tempRect.setCoords(r_x, titleEdgeBottomBottom+1, borderLeftRight, borderBottomTop-1); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderLeftTile, active, toolWindow) ); } } @@ -346,7 +346,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(borderRight > 0 && sideHeight > 0) { tempRect.setCoords(borderRightLeft, titleEdgeBottomBottom+1, r_x2, borderBottomTop-1); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderRightTile, active, toolWindow) ); } } @@ -358,19 +358,19 @@ void PlastikClient::paintEvent(TQPaintEvent *e) int r = r_x2; tempRect.setRect(r_x, borderBottomTop, borderLeft, borderBottom); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomLeft, active, toolWindow) ); l = tempRect.right()+1; } tempRect.setRect(borderRightLeft, borderBottomTop, borderLeft, borderBottom); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomRight, active, toolWindow) ); r = tempRect.left()-1; } tempRect.setCoords(l, borderBottomTop, r, r_y2); - if (tempRect.isValid() && region.tqcontains(tempRect) ) { + if (tempRect.isValid() && region.contains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomTile, active, toolWindow) ); } } diff --git a/kwin/clients/quartz/quartz.cpp b/kwin/clients/quartz/quartz.cpp index 4c4a883b6..2bb0205ae 100644 --- a/kwin/clients/quartz/quartz.cpp +++ b/kwin/clients/quartz/quartz.cpp @@ -207,7 +207,7 @@ void QuartzHandler::readConfig() extraSlim = conf.readBoolEntry( "UseQuartzExtraSlim", false ); // A small hack to make the on all desktops button look nicer - onAllDesktopsButtonOnLeft = KDecoration::options()->titleButtonsLeft().tqcontains( 'S' ); + onAllDesktopsButtonOnLeft = KDecoration::options()->titleButtonsLeft().contains( 'S' ); if ( TQApplication::reverseLayout() ) onAllDesktopsButtonOnLeft = !onAllDesktopsButtonOnLeft; switch(options()->preferredBorderSize(this)) { diff --git a/kwin/events.cpp b/kwin/events.cpp index 70a4c3233..28489cc0e 100644 --- a/kwin/events.cpp +++ b/kwin/events.cpp @@ -385,7 +385,7 @@ bool Workspace::workspaceEvent( XEvent * e ) { if ( TQWhatsThis::inWhatsThisMode() ) { - TQWidget* w = TQWidget::tqfind( e->xcrossing.window ); + TQWidget* w = TQWidget::find( e->xcrossing.window ); if ( w ) TQWhatsThis::leaveWhatsThisMode(); } @@ -926,7 +926,7 @@ void Client::leaveNotifyEvent( XCrossingEvent* e ) mode = PositionCenter; setCursor( tqarrowCursor ); } - bool lostMouse = !rect().tqcontains( TQPoint( e->x, e->y ) ); + bool lostMouse = !rect().contains( TQPoint( e->x, e->y ) ); // 'lostMouse' wouldn't work with e.g. B2 or Keramik, which have non-rectangular decorations // (i.e. the LeaveNotify event comes before leaving the rect and no LeaveNotify event // comes after leaving the rect) - so lets check if the pointer is really outside the window diff --git a/kwin/geometry.cpp b/kwin/geometry.cpp index 3116f16bf..3751348db 100644 --- a/kwin/geometry.cpp +++ b/kwin/geometry.cpp @@ -726,7 +726,7 @@ void Client::keepInArea( TQRect area, bool partial ) move( area.right() - width(), y() ); if ( geometry().bottom() > area.bottom() && height() < area.height() ) move( x(), area.bottom() - height() ); - if( !area.tqcontains( geometry().topLeft() )) + if( !area.contains( geometry().topLeft() )) { int tx = x(); int ty = y(); @@ -1346,10 +1346,10 @@ void Client::getWmNormalHints() // try to keep the window in its xinerama screen if possible, // if that fails at least keep it visible somewhere TQRect area = workspace()->clientArea( MovementArea, this ); - if( area.tqcontains( orig_geometry )) + if( area.contains( orig_geometry )) keepInArea( area ); area = workspace()->clientArea( WorkArea, this ); - if( area.tqcontains( orig_geometry )) + if( area.contains( orig_geometry )) keepInArea( area ); } } @@ -1500,7 +1500,7 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i updateFullScreenHack( TQRect( new_pos, TQSize( nw, nh ))); TQRect area = workspace()->clientArea( WorkArea, this ); if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isFullScreen() - && area.tqcontains( orig_geometry )) + && area.contains( orig_geometry )) keepInArea( area ); // this is part of the kicker-xinerama-hack... it should be @@ -1537,10 +1537,10 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i // try to keep the window in its xinerama screen if possible, // if that fails at least keep it visible somewhere TQRect area = workspace()->clientArea( MovementArea, this ); - if( area.tqcontains( orig_geometry )) + if( area.contains( orig_geometry )) keepInArea( area ); area = workspace()->clientArea( WorkArea, this ); - if( area.tqcontains( orig_geometry )) + if( area.contains( orig_geometry )) keepInArea( area ); } } diff --git a/kwin/group.cpp b/kwin/group.cpp index e4fd46e2a..8df006def 100644 --- a/kwin/group.cpp +++ b/kwin/group.cpp @@ -64,7 +64,7 @@ bool performTransiencyCheck() kdDebug() << "TC: " << *it1 << " in not in a group" << endl; ret = false; } - else if( !(*it1)->in_group->members().tqcontains( *it1 )) + else if( !(*it1)->in_group->members().contains( *it1 )) { kdDebug() << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl; ret = false; @@ -85,15 +85,15 @@ bool performTransiencyCheck() ++it2 ) { if( transiencyCheckNonExistent - && !Workspace::self()->clients.tqcontains( *it2 ) - && !Workspace::self()->desktops.tqcontains( *it2 )) + && !Workspace::self()->clients.contains( *it2 ) + && !Workspace::self()->desktops.contains( *it2 )) { kdDebug() << "TC:" << *it1 << " has non-existent main client " << endl; kdDebug() << "TC2:" << *it2 << endl; // this may crash ret = false; continue; } - if( !(*it2)->transients_list.tqcontains( *it1 )) + if( !(*it2)->transients_list.contains( *it1 )) { kdDebug() << "TC:" << *it1 << " has main client " << *it2 << " but main client does not have it as a transient" << endl; ret = false; @@ -106,15 +106,15 @@ bool performTransiencyCheck() ++it2 ) { if( transiencyCheckNonExistent - && !Workspace::self()->clients.tqcontains( *it2 ) - && !Workspace::self()->desktops.tqcontains( *it2 )) + && !Workspace::self()->clients.contains( *it2 ) + && !Workspace::self()->desktops.contains( *it2 )) { kdDebug() << "TC:" << *it1 << " has non-existent transient " << endl; kdDebug() << "TC2:" << *it2 << endl; // this may crash ret = false; continue; } - if( !(*it2)->mainClients().tqcontains( *it1 )) + if( !(*it2)->mainClients().contains( *it1 )) { kdDebug() << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client" << endl; ret = false; @@ -259,7 +259,7 @@ void Group::removeMember( Client* member_P ) TRANSIENCY_CHECK( member_P ); // kdDebug() << "GROUPREMOVE:" << this << ":" << member_P << endl; // kdDebug() << kdBacktrace() << endl; - Q_ASSERT( _members.tqcontains( member_P )); + Q_ASSERT( _members.contains( member_P )); _members.remove( member_P ); // there are cases when automatic deleting of groups must be delayed, // e.g. when removing a member and doing some operation on the possibly @@ -294,7 +294,7 @@ void Group::gotLeader( Client* leader_P ) void Group::lostLeader() { - assert( !_members.tqcontains( leader_client )); + assert( !_members.contains( leader_client )); leader_client = NULL; if( _members.isEmpty()) { @@ -512,8 +512,8 @@ bool Client::sameAppWindowRoleMatch( const Client* c1, const Client* c2, bool ac || c1->group()->leaderClient() == c1 || c2->group()->leaderClient() == c2; #endif } - int pos1 = c1->windowRole().tqfind( '#' ); - int pos2 = c2->windowRole().tqfind( '#' ); + int pos1 = c1->windowRole().find( '#' ); + int pos2 = c2->windowRole().find( '#' ); if(( pos1 >= 0 && pos2 >= 0 ) || // hacks here @@ -835,7 +835,7 @@ Window Client::verifyTransientFor( Window new_transient_for, bool defined ) void Client::addTransient( Client* cl ) { TRANSIENCY_CHECK( this ); - assert( !transients_list.tqcontains( cl )); + assert( !transients_list.contains( cl )); // assert( !cl->hasTransient( this, true )); will be fixed in checkGroupTransients() assert( cl != this ); transients_list.append( cl ); @@ -893,7 +893,7 @@ bool Client::hasTransientInternal( const Client* cl, bool indirect, ConstClientL return true; if( !indirect ) return false; - if( set.tqcontains( cl )) + if( set.contains( cl )) return false; set.append( cl ); return hasTransientInternal( cl->transientFor(), indirect, set ); @@ -903,11 +903,11 @@ bool Client::hasTransientInternal( const Client* cl, bool indirect, ConstClientL if( group() != cl->group()) return false; // cl is group transient, search from top - if( transients().tqcontains( const_cast< Client* >( cl ))) + if( transients().contains( const_cast< Client* >( cl ))) return true; if( !indirect ) return false; - if( set.tqcontains( this )) + if( set.contains( this )) return false; set.append( this ); for( ClientList::ConstIterator it = transients().begin(); diff --git a/kwin/kcmkwin/kwindecoration/buttons.cpp b/kwin/kcmkwin/kwindecoration/buttons.cpp index b5736fcce..7ddcb2af2 100644 --- a/kwin/kcmkwin/kwindecoration/buttons.cpp +++ b/kwin/kcmkwin/kwindecoration/buttons.cpp @@ -306,15 +306,15 @@ void ButtonDropSite::clearRight() void ButtonDropSite::dragMoveEvent( TQDragMoveEvent* e ) { TQPoint p = e->pos(); - if (leftDropArea().tqcontains(p) || rightDropArea().tqcontains(p) || buttonAt(p) ) { + if (leftDropArea().contains(p) || rightDropArea().contains(p) || buttonAt(p) ) { e->accept(); // 2 pixel wide drop visualizer... TQRect r = contentsRect(); int x = -1; - if (leftDropArea().tqcontains(p) ) { + if (leftDropArea().contains(p) ) { x = leftDropArea().left(); - } else if (rightDropArea().tqcontains(p) ) { + } else if (rightDropArea().contains(p) ) { x = rightDropArea().right()+1; } else { ButtonDropSiteItem *item = buttonAt(p); @@ -373,10 +373,10 @@ void ButtonDropSite::dropEvent( TQDropEvent* e ) ButtonList *buttonList = 0; ButtonList::iterator buttonPosition; - if (leftDropArea().tqcontains(p) ) { + if (leftDropArea().contains(p) ) { buttonList = &buttonsLeft; buttonPosition = buttonsLeft.end(); - } else if (rightDropArea().tqcontains(p) ) { + } else if (rightDropArea().contains(p) ) { buttonList = &buttonsRight; buttonPosition = buttonsRight.begin(); } else { @@ -446,9 +446,9 @@ bool ButtonDropSite::getItemIterator(ButtonDropSiteItem *item, ButtonList* &list if (!item) return false; - ButtonList::iterator it = buttonsLeft.tqfind(item); // try the left list first... + ButtonList::iterator it = buttonsLeft.find(item); // try the left list first... if (it == buttonsLeft.end() ) { - it = buttonsRight.tqfind(item); // try the right list... + it = buttonsRight.find(item); // try the right list... if (it == buttonsRight.end() ) { return false; // item hasn't been found in one of the list, return... } else { @@ -521,14 +521,14 @@ void ButtonDropSite::recalcItemGeometry() ButtonDropSiteItem *ButtonDropSite::buttonAt(TQPoint p) { // try to find the item in the left button list for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) { - if ( (*it)->rect.tqcontains(p) ) { + if ( (*it)->rect.contains(p) ) { return *it; } } // try to find the item in the right button list for (ButtonList::const_iterator it = buttonsRight.begin(); it != buttonsRight.end(); ++it) { - if ( (*it)->rect.tqcontains(p) ) { + if ( (*it)->rect.contains(p) ) { return *it; } } @@ -761,7 +761,7 @@ void ButtonPositionWidget::setDecorationFactory(KDecorationFactory *factory) ButtonSourceItem *i = dynamic_cast<ButtonSourceItem*>(it.current() ); if (i) { Button b = i->button(); - b.supported = m_supportedButtons.tqcontains(b.type); + b.supported = m_supportedButtons.contains(b.type); i->setButton(b); } ++it; @@ -777,47 +777,47 @@ Button ButtonPositionWidget::getButton(TQChar type, bool& success) { if (type == 'R') { TQBitmap bmp(resize_width, resize_height, resize_bits, true); bmp.setMask(bmp); - return Button(i18n("Resize"), bmp, 'R', false, m_supportedButtons.tqcontains('R') ); + return Button(i18n("Resize"), bmp, 'R', false, m_supportedButtons.contains('R') ); } else if (type == 'L') { TQBitmap bmp(shade_width, shade_height, shade_bits, true); bmp.setMask(bmp); - return Button(i18n("Shade"), bmp, 'L', false, m_supportedButtons.tqcontains('L') ); + return Button(i18n("Shade"), bmp, 'L', false, m_supportedButtons.contains('L') ); } else if (type == 'B') { TQBitmap bmp(keepbelowothers_width, keepbelowothers_height, keepbelowothers_bits, true); bmp.setMask(bmp); - return Button(i18n("Keep Below Others"), bmp, 'B', false, m_supportedButtons.tqcontains('B') ); + return Button(i18n("Keep Below Others"), bmp, 'B', false, m_supportedButtons.contains('B') ); } else if (type == 'F') { TQBitmap bmp(keepaboveothers_width, keepaboveothers_height, keepaboveothers_bits, true); bmp.setMask(bmp); - return Button(i18n("Keep Above Others"), bmp, 'F', false, m_supportedButtons.tqcontains('F') ); + return Button(i18n("Keep Above Others"), bmp, 'F', false, m_supportedButtons.contains('F') ); } else if (type == 'X') { TQBitmap bmp(close_width, close_height, close_bits, true); bmp.setMask(bmp); - return Button(i18n("Close"), bmp, 'X', false, m_supportedButtons.tqcontains('X') ); + return Button(i18n("Close"), bmp, 'X', false, m_supportedButtons.contains('X') ); } else if (type == 'A') { TQBitmap bmp(maximize_width, maximize_height, maximize_bits, true); bmp.setMask(bmp); - return Button(i18n("Maximize"), bmp, 'A', false, m_supportedButtons.tqcontains('A') ); + return Button(i18n("Maximize"), bmp, 'A', false, m_supportedButtons.contains('A') ); } else if (type == 'I') { TQBitmap bmp(minimize_width, minimize_height, minimize_bits, true); bmp.setMask(bmp); - return Button(i18n("Minimize"), bmp, 'I', false, m_supportedButtons.tqcontains('I') ); + return Button(i18n("Minimize"), bmp, 'I', false, m_supportedButtons.contains('I') ); } else if (type == 'H') { TQBitmap bmp(help_width, help_height, help_bits, true); bmp.setMask(bmp); - return Button(i18n("Help"), bmp, 'H', false, m_supportedButtons.tqcontains('H') ); + return Button(i18n("Help"), bmp, 'H', false, m_supportedButtons.contains('H') ); } else if (type == 'S') { TQBitmap bmp(onalldesktops_width, onalldesktops_height, onalldesktops_bits, true); bmp.setMask(bmp); - return Button(i18n("On All Desktops"), bmp, 'S', false, m_supportedButtons.tqcontains('S') ); + return Button(i18n("On All Desktops"), bmp, 'S', false, m_supportedButtons.contains('S') ); } else if (type == 'M') { TQBitmap bmp(menu_width, menu_height, menu_bits, true); bmp.setMask(bmp); - return Button(i18n("Menu"), bmp, 'M', false, m_supportedButtons.tqcontains('M') ); + return Button(i18n("Menu"), bmp, 'M', false, m_supportedButtons.contains('M') ); } else if (type == '_') { TQBitmap bmp(spacer_width, spacer_height, spacer_bits, true); bmp.setMask(bmp); - return Button(i18n("--- spacer ---"), bmp, '_', true, m_supportedButtons.tqcontains('_') ); + return Button(i18n("--- spacer ---"), bmp, '_', true, m_supportedButtons.contains('_') ); } else { success = false; return Button(); diff --git a/kwin/kcmkwin/kwinoptions/windows.cpp b/kwin/kcmkwin/kwinoptions/windows.cpp index f438cd5ef..69041c702 100644 --- a/kwin/kcmkwin/kwinoptions/windows.cpp +++ b/kwin/kcmkwin/kwinoptions/windows.cpp @@ -1114,7 +1114,7 @@ void KMovingConfig::load( void ) //CT 13mar98 interactive placement // if( key.left(11) == "interactive") { // setPlacement(INTERACTIVE_PLACEMENT); -// int comma_pos = key.tqfind(','); +// int comma_pos = key.find(','); // if (comma_pos < 0) // interactiveTrigger->setValue(0); // else diff --git a/kwin/kcmkwin/kwinrules/main.cpp b/kwin/kcmkwin/kwinrules/main.cpp index 1663d88af..4ed26a9e6 100644 --- a/kwin/kcmkwin/kwinrules/main.cpp +++ b/kwin/kcmkwin/kwinrules/main.cpp @@ -248,7 +248,7 @@ static int edit( Window wid, bool whole_app ) } else if( edited_rule != orig_rule ) { - TQValueList< Rules* >::Iterator pos = rules.tqfind( orig_rule ); + TQValueList< Rules* >::Iterator pos = rules.find( orig_rule ); if( pos != rules.end()) *pos = edited_rule; else diff --git a/kwin/layers.cpp b/kwin/layers.cpp index 8bb3f8c99..7f6c90378 100644 --- a/kwin/layers.cpp +++ b/kwin/layers.cpp @@ -304,7 +304,7 @@ void Workspace::raiseOrLowerClient( Client *c) if (!c) return; Client* topmost = NULL; // TODO Q_ASSERT( block_stacking_updates == 0 ); - if ( most_recently_raised && stacking_order.tqcontains( most_recently_raised ) && + if ( most_recently_raised && stacking_order.contains( most_recently_raised ) && most_recently_raised->isShown( true ) && c->isOnCurrentDesktop()) topmost = most_recently_raised; else @@ -469,11 +469,11 @@ void Workspace::restackClientUnderActive( Client* c ) return; } - assert( unconstrained_stacking_order.tqcontains( active_client )); + assert( unconstrained_stacking_order.contains( active_client )); if( Client::belongToSameApplication( active_client, c )) { // put it below the active window if it's the same app unconstrained_stacking_order.remove( c ); - unconstrained_stacking_order.insert( unconstrained_stacking_order.tqfind( active_client ), c ); + unconstrained_stacking_order.insert( unconstrained_stacking_order.find( active_client ), c ); } else { // put in the stacking order below _all_ windows belonging to the active application @@ -492,17 +492,17 @@ void Workspace::restackClientUnderActive( Client* c ) } } } - assert( unconstrained_stacking_order.tqcontains( c )); + assert( unconstrained_stacking_order.contains( c )); for( int desktop = 1; desktop <= numberOfDesktops(); ++desktop ) { // do for every virtual desktop to handle the case of onalldesktop windows - if( c->wantsTabFocus() && c->isOnDesktop( desktop ) && focus_chain[ desktop ].tqcontains( active_client )) + if( c->wantsTabFocus() && c->isOnDesktop( desktop ) && focus_chain[ desktop ].contains( active_client )) { if( Client::belongToSameApplication( active_client, c )) { // put it after the active window if it's the same app focus_chain[ desktop ].remove( c ); - focus_chain[ desktop ].insert( focus_chain[ desktop ].tqfind( active_client ), c ); + focus_chain[ desktop ].insert( focus_chain[ desktop ].find( active_client ), c ); } else { // put it in focus_chain[currentDesktop()] after all windows belonging to the active applicationa @@ -521,12 +521,12 @@ void Workspace::restackClientUnderActive( Client* c ) } } // the same for global_focus_chain - if( c->wantsTabFocus() && global_focus_chain.tqcontains( active_client )) + if( c->wantsTabFocus() && global_focus_chain.contains( active_client )) { if( Client::belongToSameApplication( active_client, c )) { global_focus_chain.remove( c ); - global_focus_chain.insert( global_focus_chain.tqfind( active_client ), c ); + global_focus_chain.insert( global_focus_chain.find( active_client ), c ); } else { @@ -581,7 +581,7 @@ ClientList Workspace::constrainedStackingOrder() // If a window is raised above some other window in the same window group // which is in the ActiveLayer (i.e. it's fulscreened), make sure it stays // above that window (see #95731). - if( minimum_layer.tqcontains( (*it)->group()) + if( minimum_layer.contains( (*it)->group()) && minimum_layer[ (*it)->group() ] == ActiveLayer && ( l == NormalLayer || l == AboveLayer )) { diff --git a/kwin/lib/kdecoration_plugins_p.cpp b/kwin/lib/kdecoration_plugins_p.cpp index 2e870eaf4..0490e4755 100644 --- a/kwin/lib/kdecoration_plugins_p.cpp +++ b/kwin/lib/kdecoration_plugins_p.cpp @@ -167,7 +167,7 @@ bool KDecorationPlugins::loadPlugin( TQString nameStr ) // For clients in kdeartwork TQString catalogue = nameStr; - catalogue.tqreplace( "kwin3_", "kwin_" ); + catalogue.replace( "kwin3_", "kwin_" ); KGlobal::locale()->insertCatalogue( catalogue ); // For KCommonDecoration based clients KGlobal::locale()->insertCatalogue( "kwin_lib" ); diff --git a/kwin/lib/kdecorationfactory.cpp b/kwin/lib/kdecorationfactory.cpp index 65fde37bc..7ad1aefbe 100644 --- a/kwin/lib/kdecorationfactory.cpp +++ b/kwin/lib/kdecorationfactory.cpp @@ -58,7 +58,7 @@ TQValueList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes() bool KDecorationFactory::exists( const KDecoration* deco ) const { - return _decorations.tqcontains( const_cast< KDecoration* >( deco )); + return _decorations.contains( const_cast< KDecoration* >( deco )); } void KDecorationFactory::addDecoration( KDecoration* deco ) diff --git a/kwin/main.cpp b/kwin/main.cpp index a65a32431..8a15c219c 100644 --- a/kwin/main.cpp +++ b/kwin/main.cpp @@ -227,7 +227,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] ) XCloseDisplay( dpy ); dpy = 0; - if ((pos = display_name.tqfindRev('.')) != -1 ) + if ((pos = display_name.findRev('.')) != -1 ) display_name.remove(pos,10); // 10 is enough to be sure we removed ".s" TQCString envir; diff --git a/kwin/manage.cpp b/kwin/manage.cpp index 3df18027e..85ba9adc9 100644 --- a/kwin/manage.cpp +++ b/kwin/manage.cpp @@ -264,7 +264,7 @@ bool Client::manage( Window w, bool isMapped ) usePosition = true; if( !rules()->checkIgnoreGeometry( !usePosition )) { - bool ignorePPosition = ( options->ignorePositionClasses.tqcontains(TQString::tqfromLatin1(resourceClass()))); + bool ignorePPosition = ( options->ignorePositionClasses.contains(TQString::tqfromLatin1(resourceClass()))); if ( ( (xSizeHint.flags & PPosition) && !ignorePPosition ) || (xSizeHint.flags & USPosition) ) diff --git a/kwin/options.cpp b/kwin/options.cpp index e6afd4a1d..dc0ca2e8a 100644 --- a/kwin/options.cpp +++ b/kwin/options.cpp @@ -379,7 +379,7 @@ int Options::electricBorderDelay() bool Options::checkIgnoreFocusStealing( const Client* c ) { - return ignoreFocusStealingClasses.tqcontains(TQString::tqfromLatin1(c->resourceClass())); + return ignoreFocusStealingClasses.contains(TQString::tqfromLatin1(c->resourceClass())); } Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int delta ) diff --git a/kwin/rules.cpp b/kwin/rules.cpp index ed4a9a8b5..2d6ddded7 100644 --- a/kwin/rules.cpp +++ b/kwin/rules.cpp @@ -1038,7 +1038,7 @@ void Workspace::discardUsedWindowRules( Client* c, bool withdrawn ) it != rules.end(); ) { - if( c->rules()->tqcontains( *it )) + if( c->rules()->contains( *it )) { updated = true; (*it)->discardUsed( withdrawn ); diff --git a/kwin/rules.h b/kwin/rules.h index bf1943de7..992487e73 100644 --- a/kwin/rules.h +++ b/kwin/rules.h @@ -40,7 +40,7 @@ class WindowRules WindowRules(); void update( Client* ); void discardTemporary(); - bool tqcontains( const Rules* rule ) const; + bool contains( const Rules* rule ) const; void remove( Rules* rule ); Placement::Policy checkPlacement( Placement::Policy placement ) const; TQRect checkGeometry( TQRect rect, bool init = false ) const; @@ -284,7 +284,7 @@ WindowRules::WindowRules() } inline -bool WindowRules::tqcontains( const Rules* rule ) const +bool WindowRules::contains( const Rules* rule ) const { return tqFind( rules.begin(), rules.end(), rule ) != rules.end(); } diff --git a/kwin/sm.cpp b/kwin/sm.cpp index 045d4f924..3a6aa3ebe 100644 --- a/kwin/sm.cpp +++ b/kwin/sm.cpp @@ -259,8 +259,8 @@ bool Workspace::windowRoleMatch( const TQCString& role1, const TQCString& role2 { if( role1.isEmpty() && role2.isEmpty()) return true; - int pos1 = role1.tqfind( '#' ); - int pos2 = role2.tqfind( '#' ); + int pos1 = role1.find( '#' ); + int pos2 = role2.find( '#' ); bool ret; if( pos1 < 0 || pos2 < 0 || pos1 != pos2 ) ret = role1 == role2; diff --git a/kwin/tabbox.cpp b/kwin/tabbox.cpp index 0f229637a..19f6560a1 100644 --- a/kwin/tabbox.cpp +++ b/kwin/tabbox.cpp @@ -114,7 +114,7 @@ void TabBox::createClientList(ClientList &list, int desktop /*-1 = all*/, Client Client* modal = c->findModal(); if( modal == NULL || modal == c ) add = c; - else if( !list.tqcontains( modal )) + else if( !list.contains( modal )) add = modal; else { @@ -271,7 +271,7 @@ void TabBox::nextPrev( bool next) client = 0; break; } - } while ( client && !clients.tqcontains( client )); + } while ( client && !clients.contains( client )); setCurrentClient( client ); } else if( mode() == DesktopMode ) @@ -696,7 +696,7 @@ void TabBox::handleMouseEvent( XEvent* e ) if( e->type != ButtonPress ) return; TQPoint pos( e->xbutton.x_root, e->xbutton.y_root ); - if( !tqgeometry().tqcontains( pos )) + if( !tqgeometry().contains( pos )) { workspace()->closeTabBox(); // click outside closes tab return; @@ -1227,7 +1227,7 @@ void Workspace::tabBoxKeyRelease( const XKeyEvent& ev ) int Workspace::nextDesktopFocusChain( int iDesktop ) const { - int i = desktop_focus_chain.tqfind( iDesktop ); + int i = desktop_focus_chain.find( iDesktop ); if( i >= 0 && i+1 < (int)desktop_focus_chain.size() ) return desktop_focus_chain[i+1]; else if( desktop_focus_chain.size() > 0 ) @@ -1238,7 +1238,7 @@ int Workspace::nextDesktopFocusChain( int iDesktop ) const int Workspace::previousDesktopFocusChain( int iDesktop ) const { - int i = desktop_focus_chain.tqfind( iDesktop ); + int i = desktop_focus_chain.find( iDesktop ); if( i-1 >= 0 ) return desktop_focus_chain[i-1]; else if( desktop_focus_chain.size() > 0 ) @@ -1255,7 +1255,7 @@ Client* Workspace::nextFocusChainClient( Client* c ) const { if ( global_focus_chain.isEmpty() ) return 0; - ClientList::ConstIterator it = global_focus_chain.tqfind( c ); + ClientList::ConstIterator it = global_focus_chain.find( c ); if ( it == global_focus_chain.end() ) return global_focus_chain.last(); if ( it == global_focus_chain.begin() ) @@ -1272,7 +1272,7 @@ Client* Workspace::previousFocusChainClient( Client* c ) const { if ( global_focus_chain.isEmpty() ) return 0; - ClientList::ConstIterator it = global_focus_chain.tqfind( c ); + ClientList::ConstIterator it = global_focus_chain.find( c ); if ( it == global_focus_chain.end() ) return global_focus_chain.first(); ++it; @@ -1289,7 +1289,7 @@ Client* Workspace::nextStaticClient( Client* c ) const { if ( !c || clients.isEmpty() ) return 0; - ClientList::ConstIterator it = clients.tqfind( c ); + ClientList::ConstIterator it = clients.find( c ); if ( it == clients.end() ) return clients.first(); ++it; @@ -1305,7 +1305,7 @@ Client* Workspace::previousStaticClient( Client* c ) const { if ( !c || clients.isEmpty() ) return 0; - ClientList::ConstIterator it = clients.tqfind( c ); + ClientList::ConstIterator it = clients.find( c ); if ( it == clients.end() ) return clients.last(); if ( it == clients.begin() ) diff --git a/kwin/useractions.cpp b/kwin/useractions.cpp index 50e495496..9e8b5d5a7 100644 --- a/kwin/useractions.cpp +++ b/kwin/useractions.cpp @@ -229,7 +229,7 @@ void Workspace::desktopPopupAboutToShow() id = desk_popup->insertItem( basic_name .arg(i) - .arg( desktopName(i).tqreplace( '&', "&&" )), + .arg( desktopName(i).replace( '&', "&&" )), i ); if ( active_popup_client && !active_popup_client->isOnAllDesktops() && active_popup_client->desktop() == i ) @@ -1093,7 +1093,7 @@ void Client::setShortcut( const TQString& _cut ) // Format: // base+(abcdef)<space>base+(abcdef) // E.g. Alt+Ctrl+(ABCDEF) Win+X,Win+(ABCDEF) - if( !cut.tqcontains( '(' ) && !cut.tqcontains( ')' ) && !cut.tqcontains( ' ' )) + if( !cut.contains( '(' ) && !cut.contains( ')' ) && !cut.contains( ' ' )) { if( workspace()->shortcutAvailable( KShortcut( cut ), this )) setShortcutInternal( KShortcut( cut )); diff --git a/kwin/workspace.cpp b/kwin/workspace.cpp index 6cf48258c..16efb606d 100644 --- a/kwin/workspace.cpp +++ b/kwin/workspace.cpp @@ -537,9 +537,9 @@ void Workspace::addClient( Client* c, allowed_t ) updateFocusChains( c, FocusChainUpdate ); // add to focus chain if not already there clients.append( c ); } - if( !unconstrained_stacking_order.tqcontains( c )) + if( !unconstrained_stacking_order.contains( c )) unconstrained_stacking_order.append( c ); - if( !stacking_order.tqcontains( c )) // it'll be updated later, and updateToolWindows() requires + if( !stacking_order.contains( c )) // it'll be updated later, and updateToolWindows() requires stacking_order.append( c ); // c to be in stacking_order if( c->isTopMenu()) addTopMenu( c ); @@ -578,7 +578,7 @@ void Workspace::removeClient( Client* c, allowed_t ) if( c->isNormalWindow()) Notify::raise( Notify::Delete ); - Q_ASSERT( clients.tqcontains( c ) || desktops.tqcontains( c )); + Q_ASSERT( clients.contains( c ) || desktops.contains( c )); clients.remove( c ); desktops.remove( c ); unconstrained_stacking_order.remove( c ); @@ -639,7 +639,7 @@ void Workspace::updateFocusChains( Client* c, FocusChainChange change ) else focus_chain[ i ].prepend( c ); } - else if( !focus_chain[ i ].tqcontains( c )) + else if( !focus_chain[ i ].contains( c )) { // add it after the active one if( active_client != NULL && active_client != c && !focus_chain[ i ].isEmpty() && focus_chain[ i ].last() == active_client ) @@ -665,7 +665,7 @@ void Workspace::updateFocusChains( Client* c, FocusChainChange change ) focus_chain[ i ].remove( c ); focus_chain[ i ].prepend( c ); } - else if( !focus_chain[ i ].tqcontains( c )) + else if( !focus_chain[ i ].contains( c )) { if( active_client != NULL && active_client != c && !focus_chain[ i ].isEmpty() && focus_chain[ i ].last() == active_client ) @@ -688,7 +688,7 @@ void Workspace::updateFocusChains( Client* c, FocusChainChange change ) global_focus_chain.remove( c ); global_focus_chain.prepend( c ); } - else if( !global_focus_chain.tqcontains( c )) + else if( !global_focus_chain.contains( c )) { if( active_client != NULL && active_client != c && !global_focus_chain.isEmpty() && global_focus_chain.last() == active_client ) @@ -1269,7 +1269,7 @@ bool Workspace::setCurrentDesktop( int new_desktop ) { // Search in focus chain if ( movingClient != NULL && active_client == movingClient - && focus_chain[currentDesktop()].tqcontains( active_client ) + && focus_chain[currentDesktop()].contains( active_client ) && active_client->isShown( true ) && active_client->isOnCurrentDesktop()) { c = active_client; // the requestFocus below will fail, as the client is already active @@ -1312,8 +1312,8 @@ bool Workspace::setCurrentDesktop( int new_desktop ) // If input: chain = { 1, 2, 3, 4 } and current_desktop = 3, // Output: chain = { 3, 1, 2, 4 }. // kdDebug(1212) << TQString("Switching to desktop #%1, at focus_chain[currentDesktop()] index %2\n") -// .arg(currentDesktop()).arg(desktop_focus_chain.tqfind( currentDesktop() )); - for( int i = desktop_focus_chain.tqfind( currentDesktop() ); i > 0; i-- ) +// .arg(currentDesktop()).arg(desktop_focus_chain.find( currentDesktop() )); + for( int i = desktop_focus_chain.find( currentDesktop() ); i > 0; i-- ) desktop_focus_chain[i] = desktop_focus_chain[i-1]; desktop_focus_chain[0] = currentDesktop(); @@ -1667,7 +1667,7 @@ void Workspace::calcDesktopLayout(int &x, int &y) const */ bool Workspace::addSystemTrayWin( WId w ) { - if ( systemTrayWins.tqcontains( w ) ) + if ( systemTrayWins.contains( w ) ) return TRUE; NETWinInfo ni( qt_xdisplay(), w, root, NET::WMKDESystemTrayWinFor ); @@ -1689,7 +1689,7 @@ bool Workspace::addSystemTrayWin( WId w ) */ bool Workspace::removeSystemTrayWin( WId w, bool check ) { - if ( !systemTrayWins.tqcontains( w ) ) + if ( !systemTrayWins.contains( w ) ) return FALSE; if( check ) { @@ -1904,7 +1904,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation { if ( !w ) return state; - TQWidget* widget = TQWidget::tqfind( w ); + TQWidget* widget = TQWidget::find( w ); if ( (!widget || widget->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) ) && !findClient( WindowMatchPredicate( w )) ) { int x, y; @@ -2379,7 +2379,7 @@ void Workspace::raiseElectricBorders() void Workspace::addTopMenu( Client* c ) { assert( c->isTopMenu()); - assert( !topmenus.tqcontains( c )); + assert( !topmenus.contains( c )); topmenus.append( c ); if( managingTopMenus()) { @@ -2400,7 +2400,7 @@ void Workspace::removeTopMenu( Client* c ) // if( c->isTopMenu()) // kdDebug() << "REMOVE TOPMENU:" << c << endl; assert( c->isTopMenu()); - assert( topmenus.tqcontains( c )); + assert( topmenus.contains( c )); topmenus.remove( c ); updateCurrentTopMenu(); // TODO reduce topMenuHeight() if possible? @@ -2650,20 +2650,20 @@ void Workspace::handleKompmgrOutput( KProcess* , char *buffer, int buflen) { TQString message; TQString output = TQString::fromLocal8Bit( buffer, buflen ); - if (output.tqcontains("Started",false)) + if (output.contains("Started",false)) ; // don't do anything, just pass to the connection release - else if (output.tqcontains("Can't open display",false)) + else if (output.contains("Can't open display",false)) message = i18n("<qt><b>kompmgr failed to open the display</b><br>There is probably an invalid display entry in your ~/.xcompmgrrc.</qt>"); - else if (output.tqcontains("No render extension",false)) + else if (output.contains("No render extension",false)) message = i18n("<qt><b>kompmgr cannot find the Xrender extension</b><br>You are using either an outdated or a crippled version of XOrg.<br>Get XOrg ≥ 6.8 from www.freedesktop.org.<br></qt>"); - else if (output.tqcontains("No composite extension",false)) + else if (output.contains("No composite extension",false)) message = i18n("<qt><b>Composite extension not found</b><br>You <i>must</i> use XOrg ≥ 6.8 for translucency and shadows to work.<br>Additionally, you need to add a new section to your X config file:<br>" "<i>Section \"Extensions\"<br>" "Option \"Composite\" \"Enable\"<br>" "EndSection</i></qt>"); - else if (output.tqcontains("No damage extension",false)) + else if (output.contains("No damage extension",false)) message = i18n("<qt><b>Damage extension not found</b><br>You <i>must</i> use XOrg ≥ 6.8 for translucency and shadows to work.</qt>"); - else if (output.tqcontains("No XFixes extension",false)) + else if (output.contains("No XFixes extension",false)) message = i18n("<qt><b>XFixes extension not found</b><br>You <i>must</i> use XOrg ≥ 6.8 for translucency and shadows to work.</qt>"); else return; //skip others // kompmgr startup failed or succeeded, release connection diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp index 09ab7abc0..3817a8c4c 100644 --- a/kxkb/extension.cpp +++ b/kxkb/extension.cpp @@ -125,7 +125,7 @@ bool XKBExtension::setLayout(const TQString& model, const TQString layoutKey = getLayoutKey(layout, variant); bool res; - if( fileCache.tqcontains(layoutKey) ) { + if( fileCache.contains(layoutKey) ) { res = setCompiledLayout( layoutKey ); kdDebug() << "setCompiledLayout " << layoutKey << ": " << res << endl; @@ -224,7 +224,7 @@ bool XKBExtension::compileCurrentLayout(const TQString &layoutKey) const TQString fileName = getPrecompiledLayoutFilename(layoutKey); kdDebug() << "compiling layout " << this << " cache size: " << fileCache.count() << endl; - if( fileCache.tqcontains(layoutKey) ) { + if( fileCache.contains(layoutKey) ) { kdDebug() << "trashing old compiled layout for " << fileName << endl; if( fileCache[ layoutKey ] != NULL ) fclose( fileCache[ layoutKey ] ); // recompiling - trash the old file @@ -263,7 +263,7 @@ bool XKBExtension::setCompiledLayout(const TQString &layoutKey) { FILE *input = NULL; - if( fileCache.tqcontains(layoutKey) ) { + if( fileCache.contains(layoutKey) ) { input = fileCache[ layoutKey ]; } diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp index e4a86243d..0874986c3 100644 --- a/kxkb/kcmlayout.cpp +++ b/kxkb/kcmlayout.cpp @@ -245,7 +245,7 @@ void LayoutConfig::initUI() { for (TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it) { TQString option = *it; - TQString optionKey = option.mid(0, option.tqfind(':')); + TQString optionKey = option.mid(0, option.find(':')); TQString optionName = m_rules->options()[option]; OptionListItem *item = m_optionGroups[i18n(optionKey.latin1())]; @@ -444,7 +444,7 @@ void LayoutConfig::displayNameChanged(const TQString& newDisplayName) return; const LayoutUnit layoutUnitKey = getLayoutUnitKey( selLayout ); - LayoutUnit& layoutUnit = *m_kxkbConfig.m_layouts.tqfind(layoutUnitKey); + LayoutUnit& layoutUnit = *m_kxkbConfig.m_layouts.find(layoutUnitKey); TQString oldName = selLayout->text(LAYOUT_COLUMN_DISPLAY_NAME); @@ -557,7 +557,7 @@ TQWidget* LayoutConfig::makeOptionsTab() OptionListItem *parent; for (; it.current(); ++it) { - if (!it.currentKey().tqcontains(':')) + if (!it.currentKey().contains(':')) { if( it.currentKey() == "ctrl" || it.currentKey() == "caps" || it.currentKey() == "altwin" ) { @@ -580,7 +580,7 @@ TQWidget* LayoutConfig::makeOptionsTab() for( ; it.current(); ++it) { TQString key = it.currentKey(); - int pos = key.tqfind(':'); + int pos = key.find(':'); if (pos >= 0) { OptionListItem *parent = m_optionGroups[key.left(pos)]; @@ -589,7 +589,7 @@ TQWidget* LayoutConfig::makeOptionsTab() if (parent != NULL) { // workaroung for mistake in rules file for xkb options in XFree 4.2.0 TQString text(it.current()); - text = text.tqreplace( "Cap$", "Caps." ); + text = text.replace( "Cap$", "Caps." ); if( parent->type() == TQCheckListItem::RadioButtonController ) new OptionListItem(parent, i18n(text.utf8()), TQCheckListItem::RadioButton, key); @@ -639,7 +639,7 @@ void LayoutConfig::updateLayoutCommand() setxkbmap += ",us"; /* LayoutUnit layoutUnitKey = getLayoutUnitKey(sel); - layoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_layouts.tqfind(layoutUnitKey) );*/ + layoutDisplayName = m_kxkbConfig.getLayoutDisplayName( *m_kxkbConfig.m_layouts.find(layoutUnitKey) );*/ layoutDisplayName = sel->text(LAYOUT_COLUMN_DISPLAY_NAME); if( layoutDisplayName.isEmpty() ) { int count = 0; @@ -724,9 +724,9 @@ TQString LayoutConfig::createOptionString() { TQString option(it.currentKey()); - if (option.tqcontains(':')) { + if (option.contains(':')) { - TQString optionKey = option.mid(0, option.tqfind(':')); + TQString optionKey = option.mid(0, option.find(':')); OptionListItem *item = m_optionGroups[optionKey]; if( !item ) { diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp index 06b64e59a..e10aa08a2 100644 --- a/kxkb/kxkb.cpp +++ b/kxkb/kxkb.cpp @@ -217,8 +217,8 @@ void KXKBApp::layoutApply() bool KXKBApp::setLayout(const TQString& layoutPair) { const LayoutUnit layoutUnitKey(layoutPair); - if( kxkbConfig.m_layouts.tqcontains(layoutUnitKey) ) { - return setLayout( *kxkbConfig.m_layouts.tqfind(layoutUnitKey) ); + if( kxkbConfig.m_layouts.contains(layoutUnitKey) ) { + return setLayout( *kxkbConfig.m_layouts.find(layoutUnitKey) ); } return false; } diff --git a/kxkb/kxkbconfig.cpp b/kxkb/kxkbconfig.cpp index e357abcb7..0e62fbc21 100644 --- a/kxkb/kxkbconfig.cpp +++ b/kxkb/kxkbconfig.cpp @@ -78,7 +78,7 @@ bool KxkbConfig::load(int loadMode) m_layouts.clear(); for(TQStringList::ConstIterator it = layoutList.begin(); it != layoutList.end() ; ++it) { m_layouts.append( LayoutUnit(*it) ); - kdDebug() << " layout " << LayoutUnit(*it).toPair() << " in list: " << m_layouts.tqcontains( LayoutUnit(*it) ) << endl; + kdDebug() << " layout " << LayoutUnit(*it).toPair() << " in list: " << m_layouts.contains( LayoutUnit(*it) ) << endl; } kdDebug() << "Found " << m_layouts.count() << " layouts, default is " << getDefaultLayout().toPair() << endl; @@ -88,8 +88,8 @@ bool KxkbConfig::load(int loadMode) TQStringList displayNamePair = TQStringList::split(':', *it ); if( displayNamePair.count() == 2 ) { LayoutUnit layoutUnit( displayNamePair[0] ); - if( m_layouts.tqcontains( layoutUnit ) ) { - m_layouts[m_layouts.tqfindIndex(layoutUnit)].displayName = displayNamePair[1].left(3); + if( m_layouts.contains( layoutUnit ) ) { + m_layouts[m_layouts.findIndex(layoutUnit)].displayName = displayNamePair[1].left(3); } } } @@ -102,8 +102,8 @@ bool KxkbConfig::load(int loadMode) TQStringList includePair = TQStringList::split(':', *it ); if( includePair.count() == 2 ) { LayoutUnit layoutUnit( includePair[0] ); - if( m_layouts.tqcontains( layoutUnit ) ) { - m_layouts[m_layouts.tqfindIndex(layoutUnit)].includeGroup = includePair[1]; + if( m_layouts.contains( layoutUnit ) ) { + m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = includePair[1]; kdDebug() << "Got inc group: " << includePair[0] << ": " << includePair[1] << endl; } } @@ -115,10 +115,10 @@ bool KxkbConfig::load(int loadMode) for(TQStringList::ConstIterator it = includeList.begin(); it != includeList.end() ; ++it) { TQString layoutName = LayoutUnit::parseLayout( *it ); LayoutUnit layoutUnit( layoutName, "" ); - kdDebug() << "old layout for inc: " << layoutUnit.toPair() << " included " << m_layouts.tqcontains( layoutUnit ) << endl; - if( m_layouts.tqcontains( layoutUnit ) ) { + kdDebug() << "old layout for inc: " << layoutUnit.toPair() << " included " << m_layouts.contains( layoutUnit ) << endl; + if( m_layouts.contains( layoutUnit ) ) { TQString variantName = LayoutUnit::parseVariant(*it); - m_layouts[m_layouts.tqfindIndex(layoutUnit)].includeGroup = variantName; + m_layouts[m_layouts.findIndex(layoutUnit)].includeGroup = variantName; kdDebug() << "Got inc group: " << layoutUnit.toPair() << ": " << variantName << endl; } } @@ -276,7 +276,7 @@ TQString KxkbConfig::getDefaultDisplayName(const TQString& code_) displayName = code_; } else { - int sepPos = code_.tqfind(TQRegExp("[-_]")); + int sepPos = code_.find(TQRegExp("[-_]")); TQString leftCode = code_.mid(0, sepPos); TQString rightCode; if( sepPos != -1 ) diff --git a/kxkb/pixmap.cpp b/kxkb/pixmap.cpp index ea685715b..25c9f6d7d 100644 --- a/kxkb/pixmap.cpp +++ b/kxkb/pixmap.cpp @@ -183,7 +183,7 @@ TQString LayoutIcon::getCountryFromLayoutName(const TQString& layoutName) || layoutName == "tel" || layoutName == "tml" || layoutName == "ben" ) // some Indian languages flag = "in"; else { - int sepPos = layoutName.tqfind(TQRegExp("[-_]")); + int sepPos = layoutName.find(TQRegExp("[-_]")); TQString leftCode = layoutName.mid(0, sepPos); TQString rightCode; if( sepPos != -1 ) diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp index 2abe3f154..685c701fd 100644 --- a/kxkb/rules.cpp +++ b/kxkb/rules.cpp @@ -74,7 +74,7 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly) // }; // // for(int i=0; fixedLayouts[i].layout != 0; i++ ) { -// if( m_layouts.tqfind(fixedLayouts[i].locale) == 0 ) +// if( m_layouts.find(fixedLayouts[i].locale) == 0 ) // m_layouts.insert(fixedLayouts[i].locale, fixedLayouts[i].layout); // } // } @@ -82,8 +82,8 @@ void XkbRules::loadRules(TQString file, bool layoutsOnly) bool XkbRules::isSingleGroup(const TQString& layout) { return X11Helper::areSingleGroupsSupported() - && !m_oldLayouts.tqcontains(layout) - && !m_nonLatinLayouts.tqcontains(layout); + && !m_oldLayouts.contains(layout) + && !m_nonLatinLayouts.contains(layout); } @@ -131,7 +131,7 @@ XkbRules::getDefaultGroup(const TQString& layout, const TQString& includeGroup) return 0; } - TQMap<TQString, unsigned int>::iterator it = m_initialGroups.tqfind(layout); + TQMap<TQString, unsigned int>::iterator it = m_initialGroups.find(layout); return it == m_initialGroups.end() ? 0 : it.data(); } @@ -139,14 +139,14 @@ XkbRules::getDefaultGroup(const TQString& layout, const TQString& includeGroup) TQStringList XkbRules::getAvailableVariants(const TQString& layout) { - if( layout.isEmpty() || !layouts().tqfind(layout) ) + if( layout.isEmpty() || !layouts().find(layout) ) return TQStringList(); TQStringList* result1 = m_varLists[layout]; if( result1 ) return *result1; - bool oldLayouts = m_oldLayouts.tqcontains(layout); + bool oldLayouts = m_oldLayouts.contains(layout); TQStringList* result = X11Helper::getVariants(layout, X11_DIR, oldLayouts); m_varLists.insert(layout, result); diff --git a/kxkb/x11helper.cpp b/kxkb/x11helper.cpp index cae856720..fae42829f 100644 --- a/kxkb/x11helper.cpp +++ b/kxkb/x11helper.cpp @@ -120,10 +120,10 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly) for (int i = 0; i < xkbRules->layouts.num_desc; ++i) { TQString layoutName(xkbRules->layouts.desc[i].name); - rulesInfo->layouts.tqreplace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) ); + rulesInfo->layouts.replace( layoutName, qstrdup( xkbRules->layouts.desc[i].desc ) ); if( m_layoutsClean == true - && layoutName.tqfind( NON_CLEAN_LAYOUT_REGEXP ) != -1 + && layoutName.find( NON_CLEAN_LAYOUT_REGEXP ) != -1 && layoutName.endsWith("/jp") == false ) { kdDebug() << "Layouts are not clean (Xorg < 6.9.0 or XFree86)" << endl; m_layoutsClean = false; @@ -136,33 +136,33 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly) } for (int i = 0; i < xkbRules->models.num_desc; ++i) - rulesInfo->models.tqreplace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) ); + rulesInfo->models.replace(xkbRules->models.desc[i].name, qstrdup( xkbRules->models.desc[i].desc ) ); for (int i = 0; i < xkbRules->options.num_desc; ++i) - rulesInfo->options.tqreplace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) ); + rulesInfo->options.replace(xkbRules->options.desc[i].name, qstrdup( xkbRules->options.desc[i].desc ) ); XkbRF_Free(xkbRules, true); // workaround for empty 'compose' options group description - if( rulesInfo->options.tqfind("compose:menu") && !rulesInfo->options.tqfind("compose") ) { - rulesInfo->options.tqreplace("compose", "Compose Key Position"); + if( rulesInfo->options.find("compose:menu") && !rulesInfo->options.find("compose") ) { + rulesInfo->options.replace("compose", "Compose Key Position"); } for(TQDictIterator<char> it(rulesInfo->options) ; it.current() != NULL; ++it ) { TQString option(it.currentKey()); - int columnPos = option.tqfind(":"); + int columnPos = option.find(":"); if( columnPos != -1 ) { TQString group = option.mid(0, columnPos); - if( rulesInfo->options.tqfind(group) == NULL ) { - rulesInfo->options.tqreplace(group, group.latin1()); + if( rulesInfo->options.find(group) == NULL ) { + rulesInfo->options.replace(group, group.latin1()); kdDebug() << "Added missing option group: " << group << endl; } } } // // workaround for empty misc options group description in XFree86 4.4.0 -// if( rulesInfo->options.tqfind("numpad:microsoft") && !rulesInfo->options.tqfind("misc") ) { -// rulesInfo->options.tqreplace("misc", "Miscellaneous compatibility options" ); +// if( rulesInfo->options.find("numpad:microsoft") && !rulesInfo->options.find("misc") ) { +// rulesInfo->options.replace("misc", "Miscellaneous compatibility options" ); // } return rulesInfo; @@ -187,10 +187,10 @@ X11Helper::loadOldLayouts(const TQString& rulesFile) while (!ts.eof()) { line = ts.readLine().simplifyWhiteSpace(); - if( line.tqfind(oldLayoutsTag) == 0 ) { + if( line.find(oldLayoutsTag) == 0 ) { line = line.mid(strlen(oldLayoutsTag)); - line = line.mid(line.tqfind('=')+1).simplifyWhiteSpace(); + line = line.mid(line.find('=')+1).simplifyWhiteSpace(); while( !ts.eof() && line.endsWith("\\") ) line = line.left(line.length()-1) + ts.readLine(); line = line.simplifyWhiteSpace(); @@ -202,10 +202,10 @@ X11Helper::loadOldLayouts(const TQString& rulesFile) } else - if( line.tqfind(nonLatinLayoutsTag) == 0 ) { + if( line.find(nonLatinLayoutsTag) == 0 ) { line = line.mid(strlen(nonLatinLayoutsTag)+1).simplifyWhiteSpace(); - line = line.mid(line.tqfind('=')+1).simplifyWhiteSpace(); + line = line.mid(line.find('=')+1).simplifyWhiteSpace(); while( !ts.eof() && line.endsWith("\\") ) line = line.left(line.length()-1) + ts.readLine(); line = line.simplifyWhiteSpace(); @@ -262,15 +262,15 @@ X11Helper::getVariants(const TQString& layout, const TQString& x11Dir, bool oldL if (line[0] == '#' || line.left(2) == "//" || line.isEmpty()) continue; - int pos = line.tqfind("xkb_symbols"); + int pos = line.find("xkb_symbols"); if (pos < 0) continue; - if( prev_line.tqfind("hidden") >=0 ) + if( prev_line.find("hidden") >=0 ) continue; - pos = line.tqfind('"', pos) + 1; - int pos2 = line.tqfind('"', pos); + pos = line.find('"', pos) + 1; + int pos2 = line.find('"', pos); if( pos < 0 || pos2 < 0 ) continue; diff --git a/libkonq/favicons/favicons.cpp b/libkonq/favicons/favicons.cpp index 7e34eeb12..d0b761ae3 100644 --- a/libkonq/favicons/favicons.cpp +++ b/libkonq/favicons/favicons.cpp @@ -97,7 +97,7 @@ TQString FaviconsModule::iconForURL(const KURL &url) TQString icon; TQString simplifiedURL = simplifyURL(url); - TQString *iconURL = d->faviconsCache.tqfind( removeSlash(simplifiedURL) ); + TQString *iconURL = d->faviconsCache.find( removeSlash(simplifiedURL) ); if (iconURL) icon = *iconURL; else @@ -181,7 +181,7 @@ void FaviconsModule::downloadHostIcon(const KURL &url) void FaviconsModule::startDownload(const TQString &hostOrURL, bool isHost, const KURL &iconURL) { - if (d->failedDownloads.tqcontains(iconURL.url())) + if (d->failedDownloads.contains(iconURL.url())) return; KIO::Job *job = KIO::get(iconURL, false, false); diff --git a/libkonq/kivdirectoryoverlay.cc b/libkonq/kivdirectoryoverlay.cc index a139141ac..2b32129c2 100644 --- a/libkonq/kivdirectoryoverlay.cc +++ b/libkonq/kivdirectoryoverlay.cc @@ -123,7 +123,7 @@ void KIVDirectoryOverlay::slotNewItems( const KFileItemList& items ) TQString iconName = file -> iconName(); if (!iconName) continue; - int* iconCount = m_popularIcons -> tqfind( file -> iconName() ); + int* iconCount = m_popularIcons -> find( file -> iconName() ); if (!iconCount) { iconCount = new int(0); Q_ASSERT(file); diff --git a/libkonq/knewmenu.cc b/libkonq/knewmenu.cc index e307b0ddf..6b318c988 100644 --- a/libkonq/knewmenu.cc +++ b/libkonq/knewmenu.cc @@ -162,7 +162,7 @@ void KNewMenu::parseFiles() else { // A relative path, then (that's the default in the files we ship) - TQString linkDir = filePath.left( filePath.tqfindRev( '/' ) + 1 /*keep / */ ); + TQString linkDir = filePath.left( filePath.findRev( '/' ) + 1 /*keep / */ ); //kdDebug(1203) << "linkDir=" << linkDir << endl; templatePath = linkDir + templatePath; } @@ -419,7 +419,7 @@ void KNewMenu::slotNewFile() //kdDebug(1203) << "second arg=" << (*it).url() << endl; //kdDebug(1203) << "third arg=" << entry.text << endl; TQString text = entry.text; - text.tqreplace( "...", TQString() ); // the ... is fine for the menu item but not for the default filename + text.replace( "...", TQString() ); // the ... is fine for the menu item but not for the default filename KURL defaultFile( *it ); defaultFile.addPath( KIO::encodeFileName( text ) ); @@ -439,7 +439,7 @@ void KNewMenu::slotNewFile() // Show the small dialog for getting the destination filename bool ok; TQString text = entry.text; - text.tqreplace( "...", TQString() ); // the ... is fine for the menu item but not for the default filename + text.replace( "...", TQString() ); // the ... is fine for the menu item but not for the default filename KURL defaultFile( *(popupFiles.begin()) ); defaultFile.addPath( KIO::encodeFileName( text ) ); diff --git a/libkonq/konq_historymgr.cc b/libkonq/konq_historymgr.cc index bff8d7328..9ac069cc5 100644 --- a/libkonq/konq_historymgr.cc +++ b/libkonq/konq_historymgr.cc @@ -300,7 +300,7 @@ void KonqHistoryManager::addToHistory( bool pending, const KURL& _url, // always remove from pending if available, otherwise the else branch leaks // if the map already contains an entry for this key. - TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.tqfind( u ); + TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.find( u ); if ( it != m_pending.end() ) { delete it.data(); m_pending.remove( it ); @@ -368,7 +368,7 @@ void KonqHistoryManager::removePending( const KURL& url ) if ( url.isLocalFile() ) return; - TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.tqfind( url.prettyURL() ); + TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.find( url.prettyURL() ); if ( it != m_pending.end() ) { KonqHistoryEntry *oldEntry = it.data(); // the old entry, may be 0L emitRemoveFromHistory( url ); // remove the current pending entry @@ -627,7 +627,7 @@ KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const TQString& item) uint weight = 1; // find out the weighting of this item (appended to the string as ":num") - int index = item.tqfindRev(':'); + int index = item.findRev(':'); if ( index > 0 ) { bool ok; weight = item.mid( index + 1 ).toUInt( &ok ); diff --git a/libkonq/konq_iconviewwidget.cc b/libkonq/konq_iconviewwidget.cc index 07cf1cfb7..a75a9ccb7 100644 --- a/libkonq/konq_iconviewwidget.cc +++ b/libkonq/konq_iconviewwidget.cc @@ -346,7 +346,7 @@ void KonqIconViewWidget::slotOnItem( TQIconViewItem *_item ) // ## shouldn't this be disabled during rectangular selection too ? if (d->bSoundPreviews && d->pSoundPlayer && - d->pSoundPlayer->mimeTypes().tqcontains( + d->pSoundPlayer->mimeTypes().contains( item->item()->mimetype()) && KGlobalSettings::showFilePreview(item->item()->url()) && tqtopLevelWidget() == kapp->activeWindow()) @@ -692,7 +692,7 @@ bool KonqIconViewWidget::mimeTypeMatch( const TQString& mimeType, const TQString return true; // Support for *mt == "image/*" TQString tmp( mimeType ); - if ( (*mt).endsWith("*") && tmp.tqreplace(TQRegExp("/.*"), "/*") == (*mt) ) + if ( (*mt).endsWith("*") && tmp.replace(TQRegExp("/.*"), "/*") == (*mt) ) return true; if ( (*mt) == "text/plain" ) { @@ -830,7 +830,7 @@ void KonqIconViewWidget::startImagePreview( const TQStringList &, bool force ) return; } - if ((d->bSoundPreviews = d->previewSettings.tqcontains( "audio/" )) && + if ((d->bSoundPreviews = d->previewSettings.contains( "audio/" )) && !d->pSoundPlayer) { KLibFactory *factory = KLibLoader::self()->factory("konq_sound"); @@ -1030,7 +1030,7 @@ void KonqIconViewWidget::contentsDragMoveEvent( TQDragMoveEvent *e ) return; } - TQIconViewItem *item = tqfindItem( e->pos() ); + TQIconViewItem *item = findItem( e->pos() ); if ( e->source() != viewport() && !item && m_rootItem && !m_rootItem->isWritable() ) { emit dragMove( false ); @@ -1236,7 +1236,7 @@ void KonqIconViewWidget::contentsMouseMoveEvent( TQMouseEvent *e ) void KonqIconViewWidget::contentsDropEvent( TQDropEvent * ev ) { - TQIconViewItem *i = tqfindItem( ev->pos() ); + TQIconViewItem *i = findItem( ev->pos() ); if ( ev->source() != viewport() && !i && m_rootItem && !m_rootItem->isWritable() ) { @@ -1281,7 +1281,7 @@ void KonqIconViewWidget::doubleClickTimeout() if ( d->releaseMouseEvent ) { TQMouseEvent e( TQEvent::MouseButtonPress,d->mousePos , 1, d->mouseState); - TQIconViewItem* item = tqfindItem( e.pos() ); + TQIconViewItem* item = findItem( e.pos() ); KURL url; if ( item ) { @@ -1290,7 +1290,7 @@ void KonqIconViewWidget::doubleClickTimeout() if ( url.isLocalFile() && (url.directory(false) == KGlobalSettings::trashPath() || url.path(1).startsWith(KGlobalSettings::trashPath()))) brenameTrash = true; - if ( url.isLocalFile() && !brenameTrash && d->renameItem && m_pSettings->renameIconDirectly() && e.button() == Qt::LeftButton && item->textRect( false ).tqcontains(e.pos())) + if ( url.isLocalFile() && !brenameTrash && d->renameItem && m_pSettings->renameIconDirectly() && e.button() == Qt::LeftButton && item->textRect( false ).contains(e.pos())) { if( d->pActivateDoubleClick->isActive () ) d->pActivateDoubleClick->stop(); @@ -1359,7 +1359,7 @@ void KonqIconViewWidget::contentsMousePressEvent( TQMouseEvent *e ) { if(d->pActivateDoubleClick && d->pActivateDoubleClick->isActive ()) d->pActivateDoubleClick->stop(); - TQIconViewItem* item = tqfindItem( e->pos() ); + TQIconViewItem* item = findItem( e->pos() ); m_mousePos = e->pos(); KURL url; if ( item ) @@ -1368,7 +1368,7 @@ void KonqIconViewWidget::contentsMousePressEvent( TQMouseEvent *e ) bool brenameTrash =false; if ( url.isLocalFile() && (url.directory(false) == KGlobalSettings::trashPath() || url.path(1).startsWith(KGlobalSettings::trashPath()))) brenameTrash = true; - if ( !brenameTrash && !KGlobalSettings::singleClick() && m_pSettings->renameIconDirectly() && e->button() == Qt::LeftButton && item->textRect( false ).tqcontains(e->pos())&& !d->firstClick && url.isLocalFile() && (!url.protocol().tqfind("device", 0, false)==0)) + if ( !brenameTrash && !KGlobalSettings::singleClick() && m_pSettings->renameIconDirectly() && e->button() == Qt::LeftButton && item->textRect( false ).contains(e->pos())&& !d->firstClick && url.isLocalFile() && (!url.protocol().find("device", 0, false)==0)) { d->firstClick = true; d->mousePos = e->pos(); @@ -1916,7 +1916,7 @@ void KonqIconViewWidget::updatePreviewMimeTypes() KTrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { - if ( d->previewSettings.tqcontains((*it)->desktopEntryName()) ) { + if ( d->previewSettings.contains((*it)->desktopEntryName()) ) { TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList(); for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt) d->pPreviewMimeTypes->append(*mt); diff --git a/libkonq/konq_pixmapprovider.cc b/libkonq/konq_pixmapprovider.cc index cb42ae481..11d0e7af4 100644 --- a/libkonq/konq_pixmapprovider.cc +++ b/libkonq/konq_pixmapprovider.cc @@ -54,7 +54,7 @@ KonqPixmapProvider::~KonqPixmapProvider() // finally, inserts the url/icon pair into the cache TQString KonqPixmapProvider::iconNameFor( const TQString& url ) { - TQMapIterator<TQString,TQString> it = iconMap.tqfind( url ); + TQMapIterator<TQString,TQString> it = iconMap.find( url ); TQString icon; if ( it != iconMap.end() ) { icon = it.data(); @@ -120,7 +120,7 @@ void KonqPixmapProvider::save( KConfig *kc, const TQString& key, TQStringList::ConstIterator it = items.begin(); TQMapConstIterator<TQString,TQString> mit; while ( it != items.end() ) { - mit = iconMap.tqfind( *it ); + mit = iconMap.find( *it ); if ( mit != iconMap.end() ) { list.append( mit.key() ); list.append( mit.data() ); diff --git a/libkonq/konq_popupmenu.cc b/libkonq/konq_popupmenu.cc index c828c4aa8..8d14132ef 100644 --- a/libkonq/konq_popupmenu.cc +++ b/libkonq/konq_popupmenu.cc @@ -281,7 +281,7 @@ int KonqPopupMenu::insertServices(const ServiceList& list, TQCString name; name.setNum( id ); name.prepend( isBuiltin ? "builtinservice_" : "userservice_" ); - KAction * act = new KAction( TQString((*it).m_strName).tqreplace('&',"&&"), 0, + KAction * act = new KAction( TQString((*it).m_strName).replace('&',"&&"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), &m_ownActions, name ); @@ -339,7 +339,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) bool sMoving = sDeleting; bool sWriting = sDeleting && m_lstItems.first()->isWritable(); m_sMimeType = m_lstItems.first()->mimetype(); - TQString mimeGroup = m_sMimeType.left(m_sMimeType.tqfind('/')); + TQString mimeGroup = m_sMimeType.left(m_sMimeType.find('/')); mode_t mode = m_lstItems.first()->mode(); bool isDirectory = S_ISDIR(mode); bool bTrashIncluded = false; @@ -381,11 +381,11 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) { m_sMimeType = TQString::null; // mimetypes are different => null - if ( mimeGroup != (*it)->mimetype().left((*it)->mimetype().tqfind('/'))) + if ( mimeGroup != (*it)->mimetype().left((*it)->mimetype().find('/'))) mimeGroup = TQString::null; // mimetype groups are different as well! } - if ( mimeTypeList.tqfindIndex( (*it)->mimetype() ) == -1 ) + if ( mimeTypeList.findIndex( (*it)->mimetype() ) == -1 ) mimeTypeList << (*it)->mimetype(); if ( isReallyLocal && !url.isLocalFile() ) @@ -603,7 +603,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) TQString caption; if (currentDir) { - bool httpPage = (m_sViewURL.protocol().tqfind("http", 0, false) == 0); + bool httpPage = (m_sViewURL.protocol().find("http", 0, false) == 0); if (httpPage) caption = i18n("&Bookmark This Page"); else @@ -742,7 +742,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) else if ( cfg.hasKey( "X-KDE-Protocols" ) ) { TQStringList protocols = TQStringList::split( "," , cfg.readEntry( "X-KDE-Protocols" ) ); - if ( !protocols.tqcontains( urlForServiceMenu.protocol() ) ) + if ( !protocols.contains( urlForServiceMenu.protocol() ) ) continue; } else if ( urlForServiceMenu.protocol() == "trash" || urlForServiceMenu.url().startsWith( "system:/trash" ) ) @@ -756,7 +756,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) if ( cfg.hasKey( "X-KDE-Require" ) ) { const TQStringList capabilities = cfg.readListEntry( "X-KDE-Require" ); - if ( capabilities.tqcontains( "Write" ) && !sWriting ) + if ( capabilities.contains( "Write" ) && !sWriting ) continue; } if ( (cfg.hasKey( "Actions" ) || cfg.hasKey( "X-KDE-GetActionMenu") ) && cfg.hasKey( "ServiceTypes" ) ) @@ -792,7 +792,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) *it == m_sMimeType) || (!mimeGroup.isEmpty() && ((*it).right(1) == "*" && - (*it).left((*it).tqfind('/')) == mimeGroup))) + (*it).left((*it).find('/')) == mimeGroup))) { checkTheMimetypes = true; } @@ -802,7 +802,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) ok = true; for (TQStringList::ConstIterator itex = excludeTypes.begin(); itex != excludeTypes.end(); ++itex) { - if( ((*itex).right(1) == "*" && (*itex).left((*itex).tqfind('/')) == mimeGroup) || + if( ((*itex).right(1) == "*" && (*itex).left((*itex).find('/')) == mimeGroup) || ((*itex) == m_sMimeType) ) { ok = false; @@ -883,20 +883,20 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) const TQString onlyShowIn = service->property("OnlyShowIn", TQVariant::String).toString(); if ( !onlyShowIn.isEmpty() ) { const TQStringList aList = TQStringList::split(';', onlyShowIn); - if (!aList.tqcontains("KDE")) + if (!aList.contains("KDE")) continue; } const TQString notShowIn = service->property("NotShowIn", TQVariant::String).toString(); if ( !notShowIn.isEmpty() ) { const TQStringList aList = TQStringList::split(';', notShowIn); - if (aList.tqcontains("KDE")) + if (aList.contains("KDE")) continue; } TQCString nam; nam.setNum( id ); - TQString actionName( (*it)->name().tqreplace("&", "&&") ); + TQString actionName( (*it)->name().replace("&", "&&") ); if ( menu == m_menuElement ) // no submenu -> prefix single offer actionName = i18n( "Open with %1" ).arg( actionName ); @@ -1074,10 +1074,10 @@ void KonqPopupMenu::slotPopupAddToBookmark() void KonqPopupMenu::slotRunService() { TQCString senderName = TQT_TQOBJECT_CONST(sender())->name(); - int id = senderName.mid( senderName.tqfind( '_' ) + 1 ).toInt(); + int id = senderName.mid( senderName.find( '_' ) + 1 ).toInt(); // Is it a usual service (application) - TQMap<int,KService::Ptr>::Iterator it = m_mapPopup.tqfind( id ); + TQMap<int,KService::Ptr>::Iterator it = m_mapPopup.find( id ); if ( it != m_mapPopup.end() ) { KRun::run( **it, m_lstPopupURLs ); @@ -1085,7 +1085,7 @@ void KonqPopupMenu::slotRunService() } // Is it a service specific to desktop entry files ? - TQMap<int,KDEDesktopMimeType::Service>::Iterator it2 = m_mapPopupServices.tqfind( id ); + TQMap<int,KDEDesktopMimeType::Service>::Iterator it2 = m_mapPopupServices.find( id ); if ( it2 != m_mapPopupServices.end() ) { KDEDesktopMimeType::executeService( m_lstPopupURLs, it2.data() ); diff --git a/libkonq/konq_propsview.cc b/libkonq/konq_propsview.cc index eb9c68bbc..b860183c6 100644 --- a/libkonq/konq_propsview.cc +++ b/libkonq/konq_propsview.cc @@ -40,7 +40,7 @@ static TQPixmap wallpaperPixmap( const TQString & _wallpaper ) key += _wallpaper; KPixmap pix; - if ( TQPixmapCache::tqfind( key, pix ) ) + if ( TQPixmapCache::find( key, pix ) ) return pix; TQString path = locate("tiles", _wallpaper); @@ -103,7 +103,7 @@ KonqPropsView::KonqPropsView( KInstance * instance, KonqPropsView * defaultProps //the default-to-off bias to propagate up. if (!config->readBoolEntry("EnableSoundPreviews", false)) { - if (!m_dontPreview.tqcontains("audio/")) + if (!m_dontPreview.contains("audio/")) m_dontPreview.append("audio/"); } @@ -234,13 +234,13 @@ bool KonqPropsView::enterDir( const KURL & dir ) { if (!config->readBoolEntry("EnableSoundPreviews", false)) - if (!m_dontPreview.tqcontains("audio/")) + if (!m_dontPreview.contains("audio/")) m_dontPreview.append("audio/"); } else { - if (m_defaultProps->m_dontPreview.tqcontains("audio/")) - if (!m_dontPreview.tqcontains("audio/")) + if (m_defaultProps->m_dontPreview.contains("audio/")) + if (!m_dontPreview.contains("audio/")) m_dontPreview.append("audio/"); } } @@ -395,7 +395,7 @@ void KonqPropsView::setShowingDirectoryOverlays( bool show ) void KonqPropsView::setShowingPreview( const TQString &preview, bool show ) { - if ( m_dontPreview.tqcontains( preview ) != show ) + if ( m_dontPreview.contains( preview ) != show ) return; else if ( show ) m_dontPreview.remove( preview ); @@ -409,7 +409,7 @@ void KonqPropsView::setShowingPreview( const TQString &preview, bool show ) //Audio is special-cased, as we use a binary setting //for it to get it to follow the defaults right. - bool audioEnabled = !m_dontPreview.tqcontains("audio/"); + bool audioEnabled = !m_dontPreview.contains("audio/"); //Don't write it out into the DontPreview line if (!audioEnabled) @@ -567,10 +567,10 @@ const TQStringList& KonqPropsView::previewSettings() for ( KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it ) { TQString name = (*it)->desktopEntryName(); - if ( ! m_dontPreview.tqcontains(name) ) + if ( ! m_dontPreview.contains(name) ) d->previewsToShow->append( name ); } - if ( ! m_dontPreview.tqcontains( "audio/" ) ) + if ( ! m_dontPreview.contains( "audio/" ) ) d->previewsToShow->append( "audio/" ); } } diff --git a/libkonq/konq_propsview.h b/libkonq/konq_propsview.h index a1d397d18..c17f58a68 100644 --- a/libkonq/konq_propsview.h +++ b/libkonq/konq_propsview.h @@ -107,7 +107,7 @@ public: void setShowingPreview( const TQString &preview, bool show ); void setShowingPreview( bool show ); - bool isShowingPreview( const TQString &preview ) const { return ! m_dontPreview.tqcontains(preview); } + bool isShowingPreview( const TQString &preview ) const { return ! m_dontPreview.contains(preview); } bool isShowingPreview(); const TQStringList &previewSettings(); diff --git a/libkonq/konq_settings.cc b/libkonq/konq_settings.cc index 51eb595a5..b9cf41503 100644 --- a/libkonq/konq_settings.cc +++ b/libkonq/konq_settings.cc @@ -142,11 +142,11 @@ bool KonqFMSettings::shouldEmbed( const TQString & serviceType ) const kdDebug(1203) << "No X-KDE-AutoEmbed, looking for group" << endl; } // 2 - in the configuration for the group if nothing was found in the mimetype - TQString serviceTypeGroup = serviceType.left(serviceType.tqfind("/")); + TQString serviceTypeGroup = serviceType.left(serviceType.find("/")); kdDebug(1203) << "KonqFMSettings::shouldEmbed : serviceTypeGroup=" << serviceTypeGroup << endl; if ( serviceTypeGroup == "inode" || serviceTypeGroup == "Browser" || serviceTypeGroup == "Konqueror" ) return true; //always embed mimetype inode/*, Browser/* and Konqueror/* - TQMap<TQString, TQString>::ConstIterator it = m_embedMap.tqfind( TQString::tqfromLatin1("embed-")+serviceTypeGroup ); + TQMap<TQString, TQString>::ConstIterator it = m_embedMap.find( TQString::tqfromLatin1("embed-")+serviceTypeGroup ); if ( it != m_embedMap.end() ) { kdDebug(1203) << "KonqFMSettings::shouldEmbed: " << it.data() << endl; return it.data() == TQString::tqfromLatin1("true"); diff --git a/libkonq/konq_sound.cc b/libkonq/konq_sound.cc index 1a31daed8..9e1ca66fb 100644 --- a/libkonq/konq_sound.cc +++ b/libkonq/konq_sound.cc @@ -71,7 +71,7 @@ const TQStringList &KonqSoundPlayerImpl::mimeTypes() vector<string> *prop = (*it).getProperty("MimeType"); for (vector<string>::iterator mt = prop->begin(); mt != prop->end(); ++mt) - if ((*mt).length()) // && (*mt).tqfind("video/") == string::npos) + if ((*mt).length()) // && (*mt).find("video/") == string::npos) m_mimeTypes << (*mt).c_str(); delete prop; } diff --git a/libkonq/konq_undo.cc b/libkonq/konq_undo.cc index 962c26741..6c170050a 100644 --- a/libkonq/konq_undo.cc +++ b/libkonq/konq_undo.cc @@ -135,7 +135,7 @@ void KonqCommandRecorder::slotCopyingDone( KIO::Job *job, const KURL &from, cons Q_ASSERT( from.isLocalFile() ); Q_ASSERT( to.protocol() == "trash" ); TQMap<TQString, TQString> metaData = job->metaData(); - TQMap<TQString, TQString>::ConstIterator it = metaData.tqfind( "trashURL-" + from.path() ); + TQMap<TQString, TQString>::ConstIterator it = metaData.find( "trashURL-" + from.path() ); if ( it != metaData.end() ) { // Update URL op.m_dst = it.data(); @@ -317,7 +317,7 @@ void KonqUndoManager::undo() } else if ( (*it).m_link ) { - if ( !d->m_fileCleanupStack.tqcontains( (*it).m_dst ) ) + if ( !d->m_fileCleanupStack.contains( (*it).m_dst ) ) d->m_fileCleanupStack.prepend( (*it).m_dst ); if ( d->m_current.m_type != KonqCommand::MOVE ) @@ -339,7 +339,7 @@ void KonqUndoManager::undo() KURL::List::ConstIterator it = d->m_current.m_src.begin(); KURL::List::ConstIterator end = d->m_current.m_src.end(); for (; it != end; ++it ) - if ( !d->m_dirStack.tqcontains( *it) ) + if ( !d->m_dirStack.contains( *it) ) d->m_dirStack.push( *it ); } */ @@ -390,7 +390,7 @@ void KonqUndoManager::slotResult( KIO::Job *job ) void KonqUndoManager::addDirToUpdate( const KURL& url ) { - if ( d->m_dirsToUpdate.tqfind( url ) == d->m_dirsToUpdate.end() ) + if ( d->m_dirsToUpdate.find( url ) == d->m_dirsToUpdate.end() ) d->m_dirsToUpdate.prepend( url ); } diff --git a/nsplugins/nspluginloader.cpp b/nsplugins/nspluginloader.cpp index 9cd60d77c..db7e214ec 100644 --- a/nsplugins/nspluginloader.cpp +++ b/nsplugins/nspluginloader.cpp @@ -292,7 +292,7 @@ void NSPluginLoader::scanPlugins() stripped = stripped.right( stripped.length()-p ); // add filetype to list - if ( !stripped.isEmpty() && !_filetype.tqfind(stripped) ) + if ( !stripped.isEmpty() && !_filetype.find(stripped) ) _filetype.insert( stripped, new TQString(mime)); } } diff --git a/nsplugins/plugin_part.cpp b/nsplugins/plugin_part.cpp index 4eaabd612..354cb1cf5 100644 --- a/nsplugins/plugin_part.cpp +++ b/nsplugins/plugin_part.cpp @@ -90,7 +90,7 @@ TQString PluginLiveConnectExtension::evalJavaScript( const TQString & script ) kdDebug(1432) << "PLUGIN:LiveConnect::evalJavaScript " << script << endl; ArgList args; TQString jscode; - jscode.sprintf("this.__nsplugin=eval(\"%s\")", TQString(script).tqreplace('\\', "\\\\").tqreplace('"', "\\\"").latin1()); + jscode.sprintf("this.__nsplugin=eval(\"%s\")", TQString(script).replace('\\', "\\\\").replace('"', "\\\"").latin1()); //kdDebug(1432) << "String is [" << jscode << "]" << endl; args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, jscode)); TQString nsplugin("Undefined"); @@ -266,7 +266,7 @@ bool PluginPart::openURL(const KURL &url) TQStringList::Iterator it = _args.begin(); for ( ; it != _args.end(); ) { - int equalPos = (*it).tqfind("="); + int equalPos = (*it).find("="); if (equalPos>0) { TQString name = (*it).left(equalPos).upper(); diff --git a/nsplugins/pluginscan.cpp b/nsplugins/pluginscan.cpp index 91da2dd52..ce2e238bc 100644 --- a/nsplugins/pluginscan.cpp +++ b/nsplugins/pluginscan.cpp @@ -130,7 +130,7 @@ void deletePluginMimeTypes() } for ( unsigned int i=0; i<dirs.count(); i++ ) { - if ( !dirs[i].tqcontains(".") ) { + if ( !dirs[i].contains(".") ) { // check all mime types for X-KDE-nsplugin flag kdDebug(1433) << " - Looking in " << dirs[i] << endl; @@ -162,7 +162,7 @@ void generateMimeType( TQString mime, TQString extensions, TQString pluginName, // get directory from mime string TQString dir; TQString name; - int pos = mime.tqfindRev('/'); + int pos = mime.findRev('/'); if ( pos<0 ) { kdDebug(1433) << "Invalid MIME type " << mime << endl; kdDebug(1433) << "<- generateMimeType" << endl; @@ -283,7 +283,7 @@ int tryCheck(int write_fd, const TQString &absFile) // remove version info, as it is not used at the moment TQRegExp versionRegExp(";version=[^:]*:"); - mimeInfo.tqreplace( versionRegExp, ":"); + mimeInfo.replace( versionRegExp, ":"); // unload plugin lib kdDebug(1433) << " - unloading plugin" << endl; @@ -318,7 +318,7 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, for (unsigned int i=0; i<files.count(); i++) { TQString extension; - int j = files[i].tqfindRev('.'); + int j = files[i].findRev('.'); if (j > 0) extension = files[i].mid(j+1); @@ -404,10 +404,10 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, for ( type=types.begin(); type!=types.end(); ++type ) { kdDebug(1433) << " - type=" << *type << endl; - name = name.tqreplace( ':', "%3A" ); + name = name.replace( ':', "%3A" ); TQString entry = name + ":" + *type; - if ( !mimeInfoList.tqcontains( entry ) ) { + if ( !mimeInfoList.contains( entry ) ) { if (!actuallyUsing) { // note the plugin name cache << "[" << absFile << "]" << endl; @@ -444,7 +444,7 @@ void scanDirectory( TQString dir, TQStringList &mimeInfoList, static int depth = 0; // avoid recursion because of symlink circles depth++; for ( unsigned int i=0; i<dirs.count(); i++ ) { - if ( depth<8 && !dirs[i].tqcontains(".") ) + if ( depth<8 && !dirs[i].contains(".") ) scanDirectory( dirs.absFilePath(dirs[i]), mimeInfoList, cache ); } depth--; @@ -620,7 +620,7 @@ int main( int argc, char **argv ) TQString desc = info[3]; // append to global mime type list - if ( !mimeTypes.tqcontains(type) ) { + if ( !mimeTypes.contains(type) ) { kdDebug(1433) << " - mimeType=" << type << endl; mimeTypes.append( type ); diff --git a/nsplugins/viewer/nsplugin.cpp b/nsplugins/viewer/nsplugin.cpp index ee3ca2d88..fe2dabfbf 100644 --- a/nsplugins/viewer/nsplugin.cpp +++ b/nsplugins/viewer/nsplugin.cpp @@ -1022,7 +1022,7 @@ void NSPluginInstance::resizePlugin(TQ_INT32 w, TQ_INT32 h) void NSPluginInstance::javascriptResult(TQ_INT32 id, TQString result) { - TQMap<int, Request*>::iterator i = _jsrequests.tqfind( id ); + TQMap<int, Request*>::iterator i = _jsrequests.find( id ); if (i != _jsrequests.end()) { Request *req = i.data(); _jsrequests.remove( i ); diff --git a/nsplugins/viewer/qxteventloop.cpp b/nsplugins/viewer/qxteventloop.cpp index ee115d9f0..4e1d13a21 100644 --- a/nsplugins/viewer/qxteventloop.cpp +++ b/nsplugins/viewer/qxteventloop.cpp @@ -154,12 +154,12 @@ Boolean qmotif_event_dispatcher( XEvent *event ) TQApplication::sendPostedEvents(); TQWidgetIntDict *mapper = &static_d->mapper; - TQWidget* qMotif = mapper->tqfind( event->xany.window ); + TQWidget* qMotif = mapper->find( event->xany.window ); if ( !qMotif && TQWidget::find( event->xany.window) == 0 ) { // event is not for Qt, try Xt Display* dpy = TQPaintDevice::x11AppDisplay(); Widget w = XtWindowToWidget( dpy, event->xany.window ); - while ( w && ! ( qMotif = mapper->tqfind( XtWindow( w ) ) ) ) { + while ( w && ! ( qMotif = mapper->find( XtWindow( w ) ) ) ) { if ( XtIsShell( w ) ) { break; } @@ -352,7 +352,7 @@ void QXtEventLoop::unregisterWidget( TQWidget* w ) void qmotif_socknot_handler( XtPointer pointer, int *, XtInputId *id ) { QXtEventLoop *eventloop = (QXtEventLoop *) pointer; - TQSocketNotifier *socknot = static_d->socknotDict.tqfind( *id ); + TQSocketNotifier *socknot = static_d->socknotDict.find( *id ); if ( ! socknot ) // this shouldn't happen return; eventloop->setSocketNotifierPending( socknot );
\n" << it.key() << "  " - << (indexmap.tqcontains(it.key()) ? indexmap[it.key()] : "" ) + << (indexmap.contains(it.key()) ? indexmap[it.key()] : "" ) << "
  " - << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) + << (indexmap.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) << "
  " - << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) + << (indexmap.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) << "