From da4be7880ff1de6415ab6256afd2514e64f5fa2e Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kamera/kcontrol/kamera.cpp | 18 +-- kamera/kcontrol/kameradevice.cpp | 4 +- kamera/kioslave/kamera.cpp | 4 +- kcoloredit/editablestreamhistory.h | 4 +- kcoloredit/kcoloreditdoc.cpp | 4 +- kcoloredit/kcoloreditdoc.h | 2 +- kcoloredit/kcoloreditview.cpp | 4 +- kcoloredit/loadpalettedlg.cpp | 2 +- kcoloredit/palette.cpp | 8 +- kdvi/dviFile.cpp | 2 +- kdvi/dviRenderer.cpp | 28 ++-- kdvi/dviRenderer_draw.cpp | 6 +- kdvi/dviRenderer_export.cpp | 4 +- kdvi/dviRenderer_prescan.cpp | 28 ++-- kdvi/dviWidget.cpp | 4 +- kdvi/examples/dvistd0.dvi | Bin 141242 -> 141240 bytes kdvi/fontEncoding.h | 2 +- kdvi/fontEncodingPool.cpp | 2 +- kdvi/fontMap.cpp | 10 +- kdvi/fontMap.h | 2 +- kdvi/fontpool.cpp | 14 +- kdvi/infodialog.cpp | 10 +- kdvi/kdvi_multipage.cpp | 4 +- kdvi/main.cpp | 2 +- kdvi/psgs.cpp | 26 ++-- kdvi/special.cpp | 20 +-- kfax/kfax.cpp | 2 +- kfaxview/main.cpp | 2 +- kfile-plugins/ps/gscreator.cpp | 2 +- kfile-plugins/rgb/kfile_rgb.cpp | 4 +- kfile-plugins/tiff/kfile_tiff.cpp | 2 +- kghostview/kgv_view.cpp | 12 +- kiconedit/kcolorgrid.cpp | 8 +- kiconedit/kcolorgrid.h | 2 +- kiconedit/kiconcolors.cpp | 2 +- kiconedit/kicongrid.cpp | 6 +- kiconedit/palettetoolbar.cpp | 2 +- kmrml/kmrml.spec | 6 +- kmrml/kmrml/kcontrol/indexcleaner.cpp | 4 +- kmrml/kmrml/kcontrol/indexer.cpp | 10 +- kmrml/kmrml/kcontrol/mainpage.cpp | 2 +- kmrml/kmrml/lib/kmrml_config.cpp | 26 ++-- kmrml/kmrml/loader.cpp | 4 +- kmrml/kmrml/mrml_elements.cpp | 2 +- kmrml/kmrml/mrml_part.cpp | 2 +- kmrml/kmrml/mrml_view.cpp | 4 +- kmrml/kmrml/server/watcher.cpp | 8 +- kolourpaint/kpdocumentsaveoptions.cpp | 2 +- kolourpaint/kpmainwindow.cpp | 8 +- kolourpaint/kpmainwindow_file.cpp | 10 +- kolourpaint/kpmainwindow_help.cpp | 2 +- kolourpaint/kpmainwindow_view.cpp | 2 +- kolourpaint/kpselection.cpp | 18 +-- kolourpaint/kpselection.h | 4 +- kolourpaint/kpview.cpp | 8 +- kolourpaint/kpviewmanager.cpp | 4 +- kolourpaint/kpviewscrollablecontainer.cpp | 10 +- kolourpaint/pixmapfx/kpfloodfill.cpp | 2 +- kolourpaint/tools/kptoolautocrop.cpp | 2 +- kolourpaint/tools/kptoolpen.cpp | 4 +- kolourpaint/tools/kptoolselection.cpp | 6 +- kolourpaint/widgets/kpcolortoolbar.cpp | 16 +-- kolourpaint/widgets/kptoolwidgetbase.cpp | 2 +- kooka/img_saver.cpp | 4 +- kooka/imgnamecombo.cpp | 4 +- kooka/kocrkadmos.cpp | 6 +- kooka/kookapref.cpp | 4 +- kooka/ksaneocr.cpp | 4 +- kooka/ocrresedit.cpp | 8 +- kooka/ocrword.cpp | 6 +- kooka/scanpackager.cpp | 4 +- kpdf/core/document.cpp | 20 +-- kpdf/core/generator_pdf/generator_pdf.cpp | 4 +- kpdf/core/page.cpp | 12 +- kpdf/core/page.h | 2 +- kpdf/part.cpp | 10 +- kpdf/part.h | 2 +- kpdf/ui/pagepainter.cpp | 2 +- kpdf/ui/pageview.cpp | 10 +- kpdf/ui/presentationwidget.cpp | 8 +- kpdf/ui/searchwidget.h | 2 +- kpdf/xpdf/xpdf/GlobalParams.cc | 2 +- kpovmodeler/baseinsertrules.xml | 142 ++++++++++----------- kpovmodeler/pm2dcontrolpoint.cpp | 2 +- kpovmodeler/pmaddcommand.cpp | 2 +- kpovmodeler/pmdeclareedit.cpp | 6 +- kpovmodeler/pmdeletecommand.cpp | 6 +- kpovmodeler/pmdialogeditbase.cpp | 8 +- kpovmodeler/pmdockwidget.cpp | 18 +-- kpovmodeler/pmdocumentationmap.cpp | 2 +- kpovmodeler/pmenumproperty.cpp | 4 +- kpovmodeler/pmerrordialog.cpp | 2 +- kpovmodeler/pmglview.cpp | 2 +- kpovmodeler/pmimagemapedit.cpp | 8 +- kpovmodeler/pminsertrules.dtd | 16 +-- kpovmodeler/pminsertrulesystem.cpp | 48 +++---- kpovmodeler/pminsertrulesystem.h | 12 +- kpovmodeler/pmiomanager.cpp | 6 +- kpovmodeler/pmlayoutsettings.cpp | 4 +- kpovmodeler/pmlibraryhandle.cpp | 6 +- kpovmodeler/pmmetaobject.h | 2 +- kpovmodeler/pmmovecommand.cpp | 12 +- kpovmodeler/pmobjectselect.cpp | 4 +- kpovmodeler/pmparser.cpp | 16 +-- kpovmodeler/pmpart.cpp | 14 +- kpovmodeler/pmpluginmanager.cpp | 2 +- kpovmodeler/pmpovrayformat.cpp | 4 +- kpovmodeler/pmpovrayparser.cpp | 6 +- kpovmodeler/pmpovraysettings.cpp | 4 +- kpovmodeler/pmpovraywidget.cpp | 2 +- kpovmodeler/pmprismedit.cpp | 10 +- kpovmodeler/pmprototypemanager.cpp | 10 +- kpovmodeler/pmrendermanager.cpp | 14 +- kpovmodeler/pmresourcelocator.cpp | 2 +- kpovmodeler/pmscanner.h | 6 +- kpovmodeler/pmshell.cpp | 6 +- kpovmodeler/pmsymboltable.cpp | 4 +- kpovmodeler/pmtruetypecache.cpp | 4 +- kpovmodeler/pmvector.cpp | 2 +- kpovmodeler/pmviewfactory.cpp | 6 +- kruler/klineal.cpp | 2 +- ksnapshot/ksnapshot.cpp | 4 +- ksnapshot/regiongrabber.cpp | 2 +- ksnapshot/windowgrabber.cpp | 6 +- ksvg/core/KSVGCanvas.cpp | 24 ++-- ksvg/core/KSVGLoader.cpp | 4 +- ksvg/data/SVGEcma.lut.h | 2 +- ksvg/dom/SVGPolygonElement.h | 2 +- ksvg/dom/SVGPolylineElement.h | 2 +- ksvg/dom/SVGSVGElement.h | 2 +- ksvg/ecma/ksvg_ecma.cpp | 2 +- ksvg/ecma/ksvg_window.cpp | 4 +- ksvg/impl/LRUCache.h | 12 +- ksvg/impl/SVGAnimateElementImpl.cc | 2 +- ksvg/impl/SVGAnimateTransformElementImpl.cc | 4 +- ksvg/impl/SVGAnimatedPointsImpl.cc | 8 +- ksvg/impl/SVGAnimationElementImpl.cc | 36 +++--- ksvg/impl/SVGColorImpl.cc | 2 +- ksvg/impl/SVGDocumentImpl.cc | 4 +- ksvg/impl/SVGEcma.cc | 10 +- ksvg/impl/SVGElementImpl.cc | 4 +- ksvg/impl/SVGFitToViewBoxImpl.cc | 2 +- ksvg/impl/SVGImageElementImpl.cc | 2 +- ksvg/impl/SVGLangSpaceImpl.cc | 12 +- ksvg/impl/SVGMaskElementImpl.cc | 2 +- ksvg/impl/SVGPatternElementImpl.cc | 2 +- ksvg/impl/SVGSVGElementImpl.cc | 4 +- ksvg/impl/SVGStylableImpl.cc | 24 ++-- ksvg/impl/SVGTextElementImpl.cc | 2 +- ksvg/impl/SVGTimeScheduler.cc | 2 +- ksvg/impl/SVGURIReferenceImpl.cc | 10 +- ksvg/impl/SVGUnitConverter.h | 2 +- ksvg/impl/libs/libtext2path/libtext2path.spec | 4 +- ksvg/impl/libs/libtext2path/src/Cache.h | 2 +- ksvg/impl/libs/libtext2path/src/Converter.cpp | 4 +- ksvg/impl/svgpathparser.cc | 2 +- ksvg/plugin/backends/libart/LibartCanvasItems.cpp | 62 ++++----- ksvg/scripts/check_hashtablesize.pl | 12 +- ksvg/scripts/generate.pl | 2 +- kuickshow/kuickshow.spec | 6 +- kuickshow/src/aboutwidget.cpp | 2 +- kuickshow/src/filecache.cpp | 2 +- kuickshow/src/filewidget.cpp | 6 +- kuickshow/src/imlibwidget.cpp | 2 +- kuickshow/src/kuickfile.cpp | 2 +- kuickshow/src/kuickshow.cpp | 2 +- kuickshow/src/printing.cpp | 2 +- kview/kview.cpp | 4 +- kview/kviewcanvas/kimageholder.cpp | 2 +- kview/kviewviewer/kviewviewer.cpp | 12 +- kview/modules/browser/kviewbrowser.cpp | 2 +- kview/modules/presenter/imagelistitem.cpp | 2 +- kview/modules/presenter/kviewpresenter.cpp | 8 +- kviewshell/anchor.h | 2 +- kviewshell/documentPageCache.cpp | 4 +- kviewshell/documentRenderer.cpp | 2 +- kviewshell/documentRenderer.h | 4 +- kviewshell/documentWidget.cpp | 4 +- kviewshell/kmultipage.cpp | 10 +- kviewshell/kmultipage.h | 2 +- kviewshell/kviewpart.cpp | 10 +- kviewshell/main.cpp | 2 +- kviewshell/pageSize.cpp | 8 +- kviewshell/pageSize.h | 2 +- kviewshell/plugins/djvu/djvumultipage.cpp | 4 +- kviewshell/plugins/djvu/djvurenderer.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/Arrays.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/Arrays.h | 2 +- kviewshell/plugins/djvu/libdjvu/DataPool.cpp | 14 +- kviewshell/plugins/djvu/libdjvu/DataPool.h | 2 +- kviewshell/plugins/djvu/libdjvu/DjVmDir.cpp | 28 ++-- kviewshell/plugins/djvu/libdjvu/DjVmDir0.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/DjVmDoc.cpp | 24 ++-- kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.cpp | 40 +++--- kviewshell/plugins/djvu/libdjvu/DjVuDocument.cpp | 6 +- kviewshell/plugins/djvu/libdjvu/DjVuDumpHelper.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/DjVuFile.cpp | 20 +-- kviewshell/plugins/djvu/libdjvu/DjVuFile.h | 2 +- kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp | 6 +- kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp | 8 +- kviewshell/plugins/djvu/libdjvu/DjVuMessage.cpp | 12 +- .../plugins/djvu/libdjvu/DjVuMessageLite.cpp | 10 +- kviewshell/plugins/djvu/libdjvu/DjVuNavDir.cpp | 6 +- kviewshell/plugins/djvu/libdjvu/DjVuPalette.h | 4 +- kviewshell/plugins/djvu/libdjvu/DjVuPort.cpp | 34 ++--- kviewshell/plugins/djvu/libdjvu/DjVuText.cpp | 8 +- kviewshell/plugins/djvu/libdjvu/DjVuToPS.h | 2 +- kviewshell/plugins/djvu/libdjvu/GBitmap.cpp | 4 +- kviewshell/plugins/djvu/libdjvu/GBitmap.h | 2 +- kviewshell/plugins/djvu/libdjvu/GContainer.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/GContainer.h | 16 +-- kviewshell/plugins/djvu/libdjvu/GIFFManager.cpp | 8 +- kviewshell/plugins/djvu/libdjvu/GOS.cpp | 4 +- kviewshell/plugins/djvu/libdjvu/GRect.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/GRect.h | 6 +- kviewshell/plugins/djvu/libdjvu/GSmartPointer.cpp | 2 +- kviewshell/plugins/djvu/libdjvu/GSmartPointer.h | 2 +- kviewshell/plugins/djvu/libdjvu/GString.cpp | 10 +- kviewshell/plugins/djvu/libdjvu/GString.h | 16 +-- kviewshell/plugins/djvu/libdjvu/GURL.h | 2 +- kviewshell/plugins/djvu/libdjvu/XMLParser.cpp | 66 +++++----- kviewshell/plugins/djvu/libdjvu/XMLTags.cpp | 6 +- kviewshell/plugins/djvu/libdjvu/XMLTags.h | 6 +- kviewshell/plugins/djvu/libdjvu/ZPCodec.h | 2 +- kviewshell/renderedDocumentPage.cpp | 10 +- kviewshell/renderedDocumentPage.h | 4 +- kviewshell/units.cpp | 2 +- libkscan/COPYING.LIB | 2 +- libkscan/devselector.cpp | 4 +- libkscan/img_canvas.cpp | 8 +- libkscan/kscandevice.cpp | 6 +- libkscan/kscanoption.cpp | 2 +- libkscan/kscanoptset.cpp | 2 +- libkscan/kscanslider.cpp | 2 +- libkscan/scanparams.cpp | 2 +- 235 files changed, 899 insertions(+), 899 deletions(-) diff --git a/kamera/kcontrol/kamera.cpp b/kamera/kcontrol/kamera.cpp index 50d7fc12..5ca35e81 100644 --- a/kamera/kcontrol/kamera.cpp +++ b/kamera/kcontrol/kamera.cpp @@ -184,7 +184,7 @@ void KKameraConfig::load(bool useDefaults ) for (it = groupList.begin(); it != groupList.end(); it++) { if (*it != "") { m_config->setGroup(*it); - if (m_config->readEntry("Path").tqcontains("usb:")) + if (m_config->readEntry("Path").contains("usb:")) continue; kcamera = new KCamera(*it,m_config->readEntry("Path")); @@ -218,7 +218,7 @@ void KKameraConfig::load(bool useDefaults ) if (!strcmp(value,"usb:")) names[model] = value; } - if (ports.tqcontains("usb:") && names[ports["usb:"]]!="usb:") + if (ports.contains("usb:") && names[ports["usb:"]]!="usb:") ports.remove("usb:"); TQMap::iterator portit; @@ -268,15 +268,15 @@ void KKameraConfig::afterCameraOperation(void) TQString KKameraConfig::suggestName(const TQString &name) { TQString new_name = name; - new_name.tqreplace("/", ""); // we cannot have a slash in a URI's host + new_name.replace("/", ""); // we cannot have a slash in a URI's host - if (!m_devices.tqcontains(new_name)) return new_name; + if (!m_devices.contains(new_name)) return new_name; // try new names with a number appended until we find a free one int i = 1; while (i++ < 0xffff) { new_name = name + " (" + TQString::number(i) + ")"; - if (!m_devices.tqcontains(new_name)) return new_name; + if (!m_devices.contains(new_name)) return new_name; } return TQString(); @@ -302,7 +302,7 @@ void KKameraConfig::slot_addCamera() void KKameraConfig::slot_removeCamera() { TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.tqcontains(name)) { + if (m_devices.contains(name)) { KCamera *m_device = m_devices[name]; m_devices.remove(name); delete m_device; @@ -317,7 +317,7 @@ void KKameraConfig::slot_testCamera() beforeCameraOperation(); TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.tqcontains(name)) { + if (m_devices.contains(name)) { KCamera *m_device = m_devices[name]; if (m_device->test()) KMessageBox::information(this, i18n("Camera test was successful.")); @@ -329,7 +329,7 @@ void KKameraConfig::slot_testCamera() void KKameraConfig::slot_configureCamera() { TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.tqcontains(name)) { + if (m_devices.contains(name)) { KCamera *m_device = m_devices[name]; m_device->configure(); } @@ -339,7 +339,7 @@ void KKameraConfig::slot_cameraSummary() { TQString summary; TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.tqcontains(name)) { + if (m_devices.contains(name)) { KCamera *m_device = m_devices[name]; summary = m_device->summary(); if (!summary.isNull()) { diff --git a/kamera/kcontrol/kameradevice.cpp b/kamera/kcontrol/kameradevice.cpp index f786203a..a38ed0b7 100644 --- a/kamera/kcontrol/kameradevice.cpp +++ b/kamera/kcontrol/kameradevice.cpp @@ -209,7 +209,7 @@ void KCamera::save(KConfig *config) TQString KCamera::portName() { - TQString port = m_path.left(m_path.tqfind(":")).lower(); + TQString port = m_path.left(m_path.find(":")).lower(); if (port == "serial") return i18n("Serial"); if (port == "usb") return i18n("USB"); return i18n("Unknown port"); @@ -403,7 +403,7 @@ void KameraDeviceSelectDialog::save() void KameraDeviceSelectDialog::load() { TQString path = m_device->path(); - TQString port = path.left(path.tqfind(":")).lower(); + TQString port = path.left(path.find(":")).lower(); if (port == "serial") setPortType(INDEX_SERIAL); if (port == "usb") setPortType(INDEX_USB); diff --git a/kamera/kioslave/kamera.cpp b/kamera/kioslave/kamera.cpp index 05917e3c..4ef47238 100644 --- a/kamera/kioslave/kamera.cpp +++ b/kamera/kioslave/kamera.cpp @@ -574,7 +574,7 @@ void KameraProtocol::listDir(const KURL &url) gp_list_free (list); /* Avoid duplicated entry for usb: and usb:001,042 entries. */ - if (ports.tqcontains("usb:") && names[ports["usb:"]]!="usb:") + if (ports.contains("usb:") && names[ports["usb:"]]!="usb:") ports.remove("usb:"); for (it = groupList.begin(); it != groupList.end(); it++) { @@ -606,7 +606,7 @@ void KameraProtocol::listDir(const KURL &url) xurl.setProtocol("camera"); xurl.setUser(*it); /* Avoid setting usb:xxx,yyy. */ - if (m_cfgPath.tqcontains("usb:")>0) { + if (m_cfgPath.contains("usb:")>0) { names[*it] = "usb:"; xurl.setHost("usb:"); } else { diff --git a/kcoloredit/editablestreamhistory.h b/kcoloredit/editablestreamhistory.h index 20233e33..9fe59d99 100644 --- a/kcoloredit/editablestreamhistory.h +++ b/kcoloredit/editablestreamhistory.h @@ -37,7 +37,7 @@ public: /** Pastes a stream at index. Uses undo/redo history */ void paste(const int index, EDITABLE_STREAM& pasteStream); /** Replaces a stream at index. Uses undo/redo history */ - void tqreplace(const int index, EDITABLE_STREAM& replaceStream); + void replace(const int index, EDITABLE_STREAM& replaceStream); /** @return Whether undo possible */ bool undoPossible(); /** @return Whether redo possible */ @@ -76,7 +76,7 @@ template void } template void - EditableStreamHistory::tqreplace(const int index, EDITABLE_STREAM& replaceStream) { + EditableStreamHistory::replace(const int index, EDITABLE_STREAM& replaceStream) { m_editableStream->cut(index, replaceStream.length()); m_editableStream->paste(index, replaceStream); } diff --git a/kcoloredit/kcoloreditdoc.cpp b/kcoloredit/kcoloreditdoc.cpp index ed9094e5..449c78f3 100644 --- a/kcoloredit/kcoloreditdoc.cpp +++ b/kcoloredit/kcoloreditdoc.cpp @@ -281,11 +281,11 @@ void KColorEditDoc::insert(int index, const Color& color) { slotRedrawAllViews(0); } -void KColorEditDoc::tqreplace(int index, const Color& color) { +void KColorEditDoc::replace(int index, const Color& color) { Palette paletteReplace; Color* replaceColor = new Color(color); paletteReplace.append(replaceColor); - m_paletteHistory.tqreplace(index, paletteReplace); + m_paletteHistory.replace(index, paletteReplace); setPaletteSelection(0, 0); setModified(true); slotRedrawAllViews(0); diff --git a/kcoloredit/kcoloreditdoc.h b/kcoloredit/kcoloreditdoc.h index 108e05fe..9f65c25e 100644 --- a/kcoloredit/kcoloreditdoc.h +++ b/kcoloredit/kcoloreditdoc.h @@ -112,7 +112,7 @@ class KColorEditDoc : public TQObject /** Inserts a color at index */ void insert(int index, const Color& color); /** Replaces a color at index */ - void tqreplace(int index, const Color& color); + void replace(int index, const Color& color); protected: /** Sets an error string if an IO operation was unsuccesfull */ diff --git a/kcoloredit/kcoloreditview.cpp b/kcoloredit/kcoloreditview.cpp index b82a92ca..e7251ec7 100644 --- a/kcoloredit/kcoloreditview.cpp +++ b/kcoloredit/kcoloreditview.cpp @@ -234,7 +234,7 @@ void KColorEditView::slotAddColor() { case REPLACE_COLOR: if(index < palette->length()) - document()->tqreplace(index, color); + document()->replace(index, color); else document()->insert(index, color); break; @@ -274,7 +274,7 @@ void KColorEditView::slotSetColorName(const TQString& name) { palette->color(cursorPos)->component(Color::BLUE_INDEX), name); doNotUpdateColorLabels = true; - document()->tqreplace(cursorPos, newColor); + document()->replace(cursorPos, newColor); doNotUpdateColorLabels = false; } } diff --git a/kcoloredit/loadpalettedlg.cpp b/kcoloredit/loadpalettedlg.cpp index a5e298ce..35fceb26 100644 --- a/kcoloredit/loadpalettedlg.cpp +++ b/kcoloredit/loadpalettedlg.cpp @@ -45,7 +45,7 @@ LoadPaletteDlg::LoadPaletteDlg(TQWidget *tqparent, const char *name) TQStringList palettesList = Palette::kdePalettes(); for(TQStringList::Iterator palette = palettesList.begin(); palette != palettesList.end(); ++palette) { - bool prepend = (*palette).tqcontains( "colors/Custom_Colors" ); + bool prepend = (*palette).contains( "colors/Custom_Colors" ); TQString fileName = locate("config", (*palette)); if(prepend) { palettesFileNames.prepend(fileName); diff --git a/kcoloredit/palette.cpp b/kcoloredit/palette.cpp index 6f830278..42758b41 100644 --- a/kcoloredit/palette.cpp +++ b/kcoloredit/palette.cpp @@ -108,14 +108,14 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { int lineNum = 0; while (!stream.atEnd()) { TQString string = stream.readLine().append(' '); - if(string.tqfind( TQRegExp("[^\\s]") ) == -1 || + if(string.find( TQRegExp("[^\\s]") ) == -1 || string.stripWhiteSpace().at( 0 ) == '#' || ( loadName && lineNum == 0 )) { if(loadName && lineNum == 0) setName(string.stripWhiteSpace()); } else { Color* newColor = new Color(); - int position = string.tqfind(TQRegExp( "[^\\s]" )); + int position = string.find(TQRegExp( "[^\\s]" )); for(int componentIndex = 0; componentIndex < Color::COMPONENTS_NUM; ++componentIndex) { if(position == -1) { @@ -123,7 +123,7 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { result = false; break; } - int endPosition = string.tqfind(TQRegExp( "\\s" ), position); + int endPosition = string.find(TQRegExp( "\\s" ), position); if(endPosition == -1) { m_errorString = i18n("Invalid format"); result = false; @@ -139,7 +139,7 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { break; } newColor->setComponent(componentIndex, componentValue); - position = string.tqfind(TQRegExp( "[^\\s]" ), endPosition); + position = string.find(TQRegExp( "[^\\s]" ), endPosition); } if(!result) { delete newColor; diff --git a/kdvi/dviFile.cpp b/kdvi/dviFile.cpp index db365482..33dc601d 100644 --- a/kdvi/dviFile.cpp +++ b/kdvi/dviFile.cpp @@ -362,7 +362,7 @@ void dvifile::renumber() TQString dvifile::convertPDFtoPS(const TQString &PDFFilename) { // Check if the PDFFile is known - TQMap::Iterator it = convertedFiles.tqfind(PDFFilename); + TQMap::Iterator it = convertedFiles.find(PDFFilename); if (it != convertedFiles.end()) { // PDF-File is known. Good. return it.data(); diff --git a/kdvi/dviRenderer.cpp b/kdvi/dviRenderer.cpp index 40463d36..7f21c65d 100644 --- a/kdvi/dviRenderer.cpp +++ b/kdvi/dviRenderer.cpp @@ -507,7 +507,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) TQString includePath; if (!baseURL.isLocalFile()) { includePath = filename; - includePath.truncate(includePath.tqfindRev('/')); + includePath.truncate(includePath.findRev('/')); } PS_interface->setIncludePath(includePath); @@ -629,7 +629,7 @@ Anchor dviRenderer::parseReference(const TQString &reference) // points to line number 1111 in the file "Filename". KDVI then // looks for source specials of the form "src:xxxxFilename", and // tries to find the special with the biggest xxxx - if (reference.tqfind("src:",0,false) == 0) { + if (reference.find("src:",0,false) == 0) { // Extract the file name and the numeral part from the reference string DVI_SourceFileSplitter splitter(reference, dviFile->filename); @@ -651,7 +651,7 @@ Anchor dviRenderer::parseReference(const TQString &reference) // whose line number is the biggest among those that are smaller // than the refLineNumber. That way, the position in the DVI file // which is highlighted is always a little further up than the - // position in the editor, e.g. if the DVI file tqcontains + // position in the editor, e.g. if the DVI file contains // positional information at the beginning of every paragraph, // KDVI jumps to the beginning of the paragraph that the cursor is // in, and never to the next paragraph. If source file anchors for @@ -756,7 +756,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum else return; } - command = command.tqreplace( "%l", TQString::number(splitter.line()) ).tqreplace( "%f", KShellProcess::quote(TeXfile) ); + command = command.replace( "%l", TQString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) ); #ifdef DEBUG_SPECIAL kdDebug(4300) << "Calling program: " << command << endl; @@ -810,27 +810,27 @@ TQString dviRenderer::PDFencodingToTQString(const TQString& _pdfstring) // replaces them by UTF8. See Section 3.2.3 of the PDF reference // guide for information. TQString pdfstring = _pdfstring; - pdfstring = pdfstring.tqreplace("\\n", "\n"); - pdfstring = pdfstring.tqreplace("\\r", "\n"); - pdfstring = pdfstring.tqreplace("\\t", "\t"); - pdfstring = pdfstring.tqreplace("\\f", "\f"); - pdfstring = pdfstring.tqreplace("\\(", "("); - pdfstring = pdfstring.tqreplace("\\)", ")"); - pdfstring = pdfstring.tqreplace("\\\\", "\\"); + pdfstring = pdfstring.replace("\\n", "\n"); + pdfstring = pdfstring.replace("\\r", "\n"); + pdfstring = pdfstring.replace("\\t", "\t"); + pdfstring = pdfstring.replace("\\f", "\f"); + pdfstring = pdfstring.replace("\\(", "("); + pdfstring = pdfstring.replace("\\)", ")"); + pdfstring = pdfstring.replace("\\\\", "\\"); // Now replace octal character codes with the characters they encode int pos; TQRegExp rx( "(\\\\)(\\d\\d\\d)" ); // matches "\xyz" where x,y,z are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d\\d)" ); // matches "\xy" where x,y are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.tqreplace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.replace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d)" ); // matches "\x" where x is a number while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } return pdfstring; } diff --git a/kdvi/dviRenderer_draw.cpp b/kdvi/dviRenderer_draw.cpp index af79b09a..2031fcd7 100644 --- a/kdvi/dviRenderer_draw.cpp +++ b/kdvi/dviRenderer_draw.cpp @@ -290,7 +290,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) (this->*currinf.set_char_p)(ch, ch); } else if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; @@ -511,7 +511,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case FNT1: case FNT2: case FNT3: - currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; @@ -520,7 +520,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) break; case FNT4: - currinf.fontp = currinf.fonttable->tqfind(readINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->find(readINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; diff --git a/kdvi/dviRenderer_export.cpp b/kdvi/dviRenderer_export.cpp index d23a15ce..110aaacb 100644 --- a/kdvi/dviRenderer_export.cpp +++ b/kdvi/dviRenderer_export.cpp @@ -94,7 +94,7 @@ void dviRenderer::exportPDF() // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".pdf"; + suggestedName = suggestedName.left(suggestedName.find(".")) + ".pdf"; TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), parentWidget, i18n("Export File As")); if (fileName.isEmpty()) @@ -193,7 +193,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin if (fname.isEmpty()) { // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".ps"; + suggestedName = suggestedName.left(suggestedName.find(".")) + ".ps"; fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), parentWidget, i18n("Export File As")); if (fileName.isEmpty()) diff --git a/kdvi/dviRenderer_prescan.cpp b/kdvi/dviRenderer_prescan.cpp index 5ed49ebc..7cfd2415 100644 --- a/kdvi/dviRenderer_prescan.cpp +++ b/kdvi/dviRenderer_prescan.cpp @@ -60,7 +60,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.tqfind(' ')); + EPSfilename.truncate(EPSfilename.find(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -118,7 +118,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.tqfind(' ')); + include_command = include_command.mid(include_command.find(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -128,7 +128,7 @@ void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise // Generate the PostScript commands to be included TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury); @@ -271,7 +271,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp) void dviRenderer::prescan_ParseHTMLAnchorSpecial(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.tqfind('"')); + cp.truncate(cp.find('"')); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[cp] = Anchor(current_page+1, l); @@ -355,14 +355,14 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) if (cp.startsWith("ps:SDict begin /product where{pop product(Distiller)")) return; // hyperref tries to work around Distiller bug if (cp.startsWith("ps:SDict begin [") && cp.endsWith(" pdfmark end")) { // hyperref definition of link/anchor/bookmark/etc - if (cp.tqcontains("/DEST")) { // The PostScript code defines an anchor + if (cp.contains("/DEST")) { // The PostScript code defines an anchor TQString anchorName = cp.section('(', 1, 1).section(')', 0, 0); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[anchorName] = Anchor(current_page+1, l); } // The PostScript code defines a bookmark - if (cp.tqcontains("/Dest") && cp.tqcontains("/Title")) + if (cp.contains("/Dest") && cp.contains("/Title")) prebookmarks.append(PreBookmark(PDFencodingToTQString(cp.section('(', 2, 2).section(')', 0, 0)), cp.section('(', 1, 1).section(')', 0, 0), cp.section('-', 1, 1).section(' ', 0, 0).toUInt() @@ -374,14 +374,14 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - if (cp.tqfind("ps::[begin]", 0, false) == 0) { + if (cp.find("ps::[begin]", 0, false) == 0) { PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(11)) ); } else { - if (cp.tqfind("ps::[end]", 0, false) == 0) { + if (cp.find("ps::[end]", 0, false) == 0) { PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(9)) ); } else { - if (cp.tqfind("ps::", 0, false) == 0) { + if (cp.find("ps::", 0, false) == 0) { PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(4)) ); } else { PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); @@ -406,7 +406,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.tqfind(' ')); + EPSfilename.truncate(EPSfilename.find(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -444,7 +444,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.tqfind(' ')); + include_command = include_command.mid(include_command.find(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -454,7 +454,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise if (TQFile::exists(EPSfilename)) { double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; @@ -631,7 +631,7 @@ void dviRenderer::prescan(parseSpecials specialParser) } if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; @@ -750,7 +750,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case FNT2: case FNT3: case FNT4: - currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) return; currinf.set_char_p = currinf.fontp->set_char_p; diff --git a/kdvi/dviWidget.cpp b/kdvi/dviWidget.cpp index 321f0f57..68f4b124 100644 --- a/kdvi/dviWidget.cpp +++ b/kdvi/dviWidget.cpp @@ -53,7 +53,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) for(unsigned int i=0; isourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) + if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) { emit(SRCLink(pageData->sourceHyperLinkList[i].linkText, e, this)); e->accept(); @@ -99,7 +99,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e) // Check if the cursor hovers over a sourceHyperlink. for(unsigned int i=0; isourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) { + if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) { clearStatusBarTimer.stop(); // The macro-package srcltx gives a special like "src:99 test.tex" diff --git a/kdvi/examples/dvistd0.dvi b/kdvi/examples/dvistd0.dvi index 654b617b..ef73e604 100644 Binary files a/kdvi/examples/dvistd0.dvi and b/kdvi/examples/dvistd0.dvi differ diff --git a/kdvi/fontEncoding.h b/kdvi/fontEncoding.h index b70cfdc5..95eb4dd0 100644 --- a/kdvi/fontEncoding.h +++ b/kdvi/fontEncoding.h @@ -48,7 +48,7 @@ * a different name and with a different encoding ---the map file * (fontMap.h) can probably see to that. * - * Summing up: this class tqcontains 256 glyph names read from an + * Summing up: this class contains 256 glyph names read from an * encoding file during the construction of this class. * * @author Stefan Kebekus diff --git a/kdvi/fontEncodingPool.cpp b/kdvi/fontEncodingPool.cpp index 4c00256f..59b38167 100644 --- a/kdvi/fontEncodingPool.cpp +++ b/kdvi/fontEncodingPool.cpp @@ -18,7 +18,7 @@ fontEncodingPool::fontEncodingPool() fontEncoding *fontEncodingPool::findByName(const TQString &name) { - fontEncoding *ptr = dictionary.tqfind( name ); + fontEncoding *ptr = dictionary.find( name ); if (ptr == 0) { ptr = new fontEncoding(name); diff --git a/kdvi/fontMap.cpp b/kdvi/fontMap.cpp index b285018b..7dec6f4f 100644 --- a/kdvi/fontMap.cpp +++ b/kdvi/fontMap.cpp @@ -78,7 +78,7 @@ fontMap::fontMap() encodingName = encodingName.mid(1); double slant = 0.0; - int i = line.tqfind("SlantFont"); + int i = line.find("SlantFont"); if (i >= 0) { bool ok; slant = line.left(i).section(' ', -1, -1 ,TQString::SectionSkipEmpty).toDouble(&ok); @@ -115,7 +115,7 @@ fontMap::fontMap() const TQString &fontMap::findFileName(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().fontFileName; @@ -126,7 +126,7 @@ const TQString &fontMap::findFileName(const TQString &TeXName) const TQString &fontMap::findFontName(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().fullFontName; @@ -137,7 +137,7 @@ const TQString &fontMap::findFontName(const TQString &TeXName) const TQString &fontMap::findEncoding(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().fontEncoding; @@ -148,7 +148,7 @@ const TQString &fontMap::findEncoding(const TQString &TeXName) double fontMap::findSlant(const TQString &TeXName) { - TQMap::Iterator it = fontMapEntries.tqfind(TeXName); + TQMap::Iterator it = fontMapEntries.find(TeXName); if (it != fontMapEntries.end()) return it.data().slant; diff --git a/kdvi/fontMap.h b/kdvi/fontMap.h index 6a719ea6..da80b72a 100644 --- a/kdvi/fontMap.h +++ b/kdvi/fontMap.h @@ -13,7 +13,7 @@ #include /** - * This class represents one line of a font map file, and tqcontains + * This class represents one line of a font map file, and contains * three pieces of information about a font: its file name, the full * name of the font, and the encoding. * diff --git a/kdvi/fontpool.cpp b/kdvi/fontpool.cpp index 17bc4a3d..8cd35df7 100644 --- a/kdvi/fontpool.cpp +++ b/kdvi/fontpool.cpp @@ -46,7 +46,7 @@ fontPool::fontPool() i18n( "KDVI is currently generating bitmap fonts..." ), i18n( "Aborts the font generation. Don't do this." ), i18n( "KDVI is currently generating bitmap fonts which are needed to display your document. " - "For this, KDVI uses a number of external programs, such as MetaFont. You can tqfind " + "For this, KDVI uses a number of external programs, such as MetaFont. You can find " "the output of these programs later in the document info dialog." ), i18n( "KDVI is generating fonts. Please wait." ), 0 ) @@ -558,32 +558,32 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen) // We'd like to print only full lines of text. int numleft; bool show_prog = false; - while( (numleft = MetafontOutput.tqfind('\n')) != -1) { + while( (numleft = MetafontOutput.find('\n')) != -1) { TQString line = MetafontOutput.left(numleft+1); #ifdef DEBUG_FONTPOOL kdDebug(4300) << "MF OUTPUT RECEIVED: " << line; #endif // Search for a line which marks the beginning of a MetaFont run // and show the progress dialog at the end of this method. - if (line.tqfind("kpathsea:") == 0) + if (line.find("kpathsea:") == 0) show_prog = true; // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and update the display // accordingly. - int startlineindex = line.tqfind("kpathsea:"); + int startlineindex = line.find("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.tqfind("\n",startlineindex); + int endstartline = line.find("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); // The last word in the startline is the name of the font which we // are generating. The second-to-last word is the resolution in // dots per inch. Display this info in the text label below the // progress bar. - int lastblank = startLine.tqfindRev(' '); + int lastblank = startLine.findRev(' '); TQString fontName = startLine.mid(lastblank+1); - int secondblank = startLine.tqfindRev(' ',lastblank-1); + int secondblank = startLine.findRev(' ',lastblank-1); TQString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1); progress.show(); diff --git a/kdvi/infodialog.cpp b/kdvi/infodialog.cpp index b287a390..3e2bbf16 100644 --- a/kdvi/infodialog.cpp +++ b/kdvi/infodialog.cpp @@ -89,7 +89,7 @@ void infoDialog::setFontInfo(fontPool *fp) void infoDialog::outputReceiver(const TQString& _op) { TQString op = _op; - op = op.tqreplace( TQRegExp("<"), "<" ); + op = op.replace( TQRegExp("<"), "<" ); if (MFOutputReceived == false) { TextLabel3->setText(""+headline+"
"); @@ -99,7 +99,7 @@ void infoDialog::outputReceiver(const TQString& _op) // It seems that the TQTextView wants that we append only full lines. // We see to that. pool = pool+op; - int idx = pool.tqfindRev("\n"); + int idx = pool.findRev("\n"); while(idx != -1) { TQString line = pool.left(idx); @@ -108,9 +108,9 @@ void infoDialog::outputReceiver(const TQString& _op) // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and print them in boldface. - int startlineindex = line.tqfind("kpathsea:"); + int startlineindex = line.find("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.tqfind("\n",startlineindex); + int endstartline = line.find("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); if (MFOutputReceived) TextLabel3->append("
\n"+startLine+""); @@ -119,7 +119,7 @@ void infoDialog::outputReceiver(const TQString& _op) TextLabel3->append(line.mid(endstartline)); } else TextLabel3->append(line); - idx = pool.tqfindRev("\n"); + idx = pool.findRev("\n"); } MFOutputReceived = true; diff --git a/kdvi/kdvi_multipage.cpp b/kdvi/kdvi_multipage.cpp index 9fc5703d..bceacddc 100644 --- a/kdvi/kdvi_multipage.cpp +++ b/kdvi/kdvi_multipage.cpp @@ -141,7 +141,7 @@ void KDVIMultiPage::slotSave() // Try to guess the proper ending... TQString formats; TQString ending; - int rindex = m_file.tqfindRev("."); + int rindex = m_file.findRev("."); if (rindex == -1) { ending = TQString(); formats = TQString(); @@ -157,7 +157,7 @@ void KDVIMultiPage::slotSave() // Add the ending to the filename. I hope the user likes it that // way. - if (!ending.isEmpty() && fileName.tqfind(ending) == -1) + if (!ending.isEmpty() && fileName.find(ending) == -1) fileName = fileName+ending; if (TQFile(fileName).exists()) { diff --git a/kdvi/main.cpp b/kdvi/main.cpp index 50221ebe..f10501bd 100644 --- a/kdvi/main.cpp +++ b/kdvi/main.cpp @@ -98,7 +98,7 @@ int main(int argc, char** argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).tqfind("kviewshell") == 0) + if ((*it).find("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kdvi/psgs.cpp b/kdvi/psgs.cpp index 31f9bfdc..9f1f925f 100644 --- a/kdvi/psgs.cpp +++ b/kdvi/psgs.cpp @@ -64,14 +64,14 @@ void ghostscript_interface::setPostScript(const PageNumber& page, const TQString kdDebug(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl; #endif - if (pageList.tqfind(page) == 0) { + if (pageList.find(page) == 0) { pageInfo *info = new pageInfo(PostScript); // Check if dict is big enough if (pageList.count() > pageList.size() -2) pageList.resize(pageList.size()*2); pageList.insert(page, info); } else - *(pageList.tqfind(page)->PostScriptString) = PostScript; + *(pageList.find(page)->PostScriptString) = PostScript; } @@ -88,7 +88,7 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC kdDebug(4300) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl; #endif - if (pageList.tqfind(page) == 0) { + if (pageList.find(page) == 0) { pageInfo *info = new pageInfo(TQString()); info->background = background_color; if (permanent) @@ -98,9 +98,9 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC pageList.resize(pageList.size()*2); pageList.insert(page, info); } else { - pageList.tqfind(page)->background = background_color; + pageList.find(page)->background = background_color; if (permanent) - pageList.tqfind(page)->permanentBackground = background_color; + pageList.find(page)->permanentBackground = background_color; } } @@ -109,10 +109,10 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page) #ifdef DEBUG_PSGS kdDebug(4300) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl; #endif - if (pageList.tqfind(page) == 0) + if (pageList.find(page) == 0) return; - pageInfo *info = pageList.tqfind(page); + pageInfo *info = pageList.find(page); info->background = info->permanentBackground; } @@ -124,10 +124,10 @@ TQColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const kdDebug(4300) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl; #endif - if (pageList.tqfind(page) == 0) + if (pageList.find(page) == 0) return TQt::white; else - return pageList.tqfind(page)->background; + return pageList.find(page)->background; } @@ -151,7 +151,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co emit(setStatusBarText(i18n("Generating PostScript graphics..."))); - pageInfo *info = pageList.tqfind(page); + pageInfo *info = pageList.find(page); // Generate a PNG-file // Step 1: Write the PostScriptString to a File @@ -239,7 +239,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co // ghostscript. If so, try again with another device. TQString GSoutput; while(proc.readln(GSoutput) != -1) { - if (GSoutput.tqcontains("Unknown device")) { + if (GSoutput.contains("Unknown device")) { kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support " "the '%1' ghostview device driver.").tqarg(*gsDevice) << endl; knownDevices.remove(gsDevice); @@ -293,7 +293,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma pixel_page_w = paint->viewport().width(); pixel_page_h = paint->viewport().height(); - pageInfo *info = pageList.tqfind(page); + pageInfo *info = pageList.find(page); // No PostScript? Then return immediately. if ((info == 0) || (info->PostScriptString->isEmpty())) { @@ -317,7 +317,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma TQString ghostscript_interface::locateEPSfile(const TQString &filename, const KURL &base) { - // If the base URL indicates that the DVI file is local, try to tqfind + // If the base URL indicates that the DVI file is local, try to find // the graphics file in the directory where the DVI file resides if (base.isLocalFile()) { TQString path = base.path(); // -> "/bar/foo.dvi" diff --git a/kdvi/special.cpp b/kdvi/special.cpp index 5bd082cb..918b7352 100644 --- a/kdvi/special.cpp +++ b/kdvi/special.cpp @@ -120,7 +120,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) TQString specType = colorSpec.section(' ', 0, 0); - if (specType.tqfind("rgb", false) == 0) { + if (specType.find("rgb", false) == 0) { bool ok; double r = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -138,7 +138,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.tqfind("hsb", false) == 0) { + if (specType.find("hsb", false) == 0) { bool ok; double h = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -156,7 +156,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5), TQColor::Hsv); } - if (specType.tqfind("cmyk", false) == 0) { + if (specType.find("cmyk", false) == 0) { bool ok; double c = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -189,7 +189,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.tqfind("gray", false) == 0) { + if (specType.find("gray", false) == 0) { bool ok; double g = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -200,7 +200,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) } // Check if the color is one of the known named colors. - TQMap::Iterator f = namedColors.tqfind(specType); + TQMap::Iterator f = namedColors.find(specType); if (f != namedColors.end()) return *f; @@ -254,7 +254,7 @@ void dviRenderer::color_special(const TQString& _cp) void dviRenderer::html_href_special(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.tqfind('"')); + cp.truncate(cp.find('"')); #ifdef DEBUG_SPECIAL kdDebug(4300) << "HTML-special, href " << cp.latin1() << endl; @@ -292,10 +292,10 @@ void dviRenderer::source_special(const TQString& cp) void parse_special_argument(const TQString& strg, const char* argument_name, int* variable) { - int index = strg.tqfind(argument_name); + int index = strg.find(argument_name); if (index >= 0) { TQString tmp = strg.mid(index + strlen(argument_name)); - index = tmp.tqfind(' '); + index = tmp.find(' '); if (index >= 0) tmp.truncate(index); @@ -327,7 +327,7 @@ void dviRenderer::epsf_special(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename_orig = include_command; - EPSfilename_orig.truncate(EPSfilename_orig.tqfind(' ')); + EPSfilename_orig.truncate(EPSfilename_orig.find(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -348,7 +348,7 @@ void dviRenderer::epsf_special(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.tqfind(' ')); + include_command = include_command.mid(include_command.find(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); diff --git a/kfax/kfax.cpp b/kfax/kfax.cpp index 3a3e0b9f..1a97400c 100644 --- a/kfax/kfax.cpp +++ b/kfax/kfax.cpp @@ -735,7 +735,7 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) ++currentpage; // should this page be printed ? - if (printer.pageList().tqfindIndex(currentpage) < 0) + if (printer.pageList().findIndex(currentpage) < 0) continue; XImage *Image = Pimage(pn); diff --git a/kfaxview/main.cpp b/kfaxview/main.cpp index cacb24a0..9227d0a0 100644 --- a/kfaxview/main.cpp +++ b/kfaxview/main.cpp @@ -118,7 +118,7 @@ int main(int argc, char** argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).tqfind("kviewshell") == 0) + if ((*it).find("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kfile-plugins/ps/gscreator.cpp b/kfile-plugins/ps/gscreator.cpp index e9fb558b..cc4edcfc 100644 --- a/kfile-plugins/ps/gscreator.cpp +++ b/kfile-plugins/ps/gscreator.cpp @@ -234,7 +234,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img } const bool is_encapsulated = no_dvi && - (path.tqfind(TQRegExp("\\.epsi?$", false, false)) > 0) && + (path.find(TQRegExp("\\.epsi?$", false, false)) > 0) && (dsc.bbox()->width() > 0) && (dsc.bbox()->height() > 0) && (dsc.page_count() <= 1); diff --git a/kfile-plugins/rgb/kfile_rgb.cpp b/kfile-plugins/rgb/kfile_rgb.cpp index 3c8b416e..ff6dadde 100644 --- a/kfile-plugins/rgb/kfile_rgb.cpp +++ b/kfile-plugins/rgb/kfile_rgb.cpp @@ -143,8 +143,8 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) TQMap::Iterator end = map.end(); for (k = 0; k < (ysize * zsize); k++) { dstream >> offs; - if ((it = map.tqfind(offs)) != end) - map.tqreplace(offs, it.data() + 1); + if ((it = map.find(offs)) != end) + map.replace(offs, it.data() + 1); else map[offs] = 0; } diff --git a/kfile-plugins/tiff/kfile_tiff.cpp b/kfile-plugins/tiff/kfile_tiff.cpp index 7e1e86be..1d8b08f1 100644 --- a/kfile-plugins/tiff/kfile_tiff.cpp +++ b/kfile-plugins/tiff/kfile_tiff.cpp @@ -248,7 +248,7 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint) int imageBpp = bitsPerSample*samplesPerPixel; if (imageAlpha && colorMode==PHOTOMETRIC_RGB) - m_colorMode.tqreplace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA"))); + m_colorMode.replace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA"))); KFileMetaInfoGroup group = appendGroup(info, "General"); if (description) diff --git a/kghostview/kgv_view.cpp b/kghostview/kgv_view.cpp index 9572b787..dc457516 100644 --- a/kghostview/kgv_view.cpp +++ b/kghostview/kgv_view.cpp @@ -85,13 +85,13 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _isGuiInitialized( false ), _isFileDirty( false ), _stickyOptions( false ), - _embeddedInKGhostView( !args.tqcontains( "KParts::ReadOnlyPart" ) ), + _embeddedInKGhostView( !args.contains( "KParts::ReadOnlyPart" ) ), _customZoomIndex( -1 ) { setInstance( KGVFactory::instance() ); // Don't show the progress info dialog if we're embedded in Konqueror. - setProgressInfoEnabled( !args.tqcontains( "Browser/View") ); + setProgressInfoEnabled( !args.contains( "Browser/View") ); _document = new KGVDocument( this ); connect( _document, TQT_SIGNAL( fileChangeFailed() ), @@ -582,7 +582,7 @@ void KGVPart::updateZoomActions() first != last; ++first ) { TQString cur = *first; - cur.remove( cur.tqfind( '%' ), 1 ); + cur.remove( cur.find( '%' ), 1 ); cur = cur.simplifyWhiteSpace(); bool ok = false; double z = cur.toDouble(&ok); @@ -682,7 +682,7 @@ void KGVPart::openURLContinue() // mimetype-determination (e.g. koffice) TQString extension; TQString fileName = m_url.fileName(); - int extensionPos = fileName.tqfindRev( '.' ); + int extensionPos = fileName.findRev( '.' ); if( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' KTempFile tempFile( TQString(), extension ); @@ -901,7 +901,7 @@ void KGVPart::slotZoom( const TQString& nz ) { TQString z = nz; double zoom; - z.remove( z.tqfind( '%' ), 1 ); + z.remove( z.find( '%' ), 1 ); zoom = KGlobal::locale()->readNumber( z ) / 100; kdDebug( 4500 ) << "ZOOM = " << nz << ", setting zoom = " << zoom << endl; @@ -968,7 +968,7 @@ void KGVPart::setDisplayOptions( const DisplayOptions& options ) _docManager->setDisplayOptions( options ); _selectOrientation->setCurrentItem( options.overrideOrientation() ); TQStringList medias = document()->mediaNames(); - TQStringList::Iterator now = medias.tqfind( options.overridePageMedia() ); + TQStringList::Iterator now = medias.find( options.overridePageMedia() ); if ( now != medias.end() ){ // The options are displayed in inverted order. // Therefore, size() - index gets you the display index diff --git a/kiconedit/kcolorgrid.cpp b/kiconedit/kcolorgrid.cpp index e08529e1..837958b8 100644 --- a/kiconedit/kcolorgrid.cpp +++ b/kiconedit/kcolorgrid.cpp @@ -269,7 +269,7 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) return; //kdDebug(4640) << "KColorGrid::setColor - before adding" << endl; - if(!numcolors.tqcontains(col)) + if(!numcolors.contains(col)) { //kdDebug(4640) << "KColorGrid::setColor() - adding " << // col << " - " << tqRed(col) << " " << tqGreen(col) << " " << tqBlue(col) << endl; numcolors.append(col); @@ -279,9 +279,9 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) } //kdDebug(4640) << "KColorGrid::setColor - before removing" << endl; - if(!gridcolors.tqcontains(oldcolor)) + if(!gridcolors.contains(oldcolor)) { - int idx = numcolors.tqfind(oldcolor); + int idx = numcolors.find(oldcolor); if(idx != -1) { //kdDebug(4640) << "KColorGrid::setColor() - removing " << // oldcolor << " - " << tqRed(oldcolor) << " " << tqGreen(oldcolor) << " " << tqBlue(oldcolor) << endl; @@ -317,7 +317,7 @@ void KColorGrid::updateColors() for(int i = 0; i < (int)gridcolors.size(); i++) { uint col = gridcolors.at(i); - if(!numcolors.tqcontains(col)) + if(!numcolors.contains(col)) numcolors.append(col); } emit colorschanged(numcolors.size(), numcolors.data()); diff --git a/kiconedit/kcolorgrid.h b/kiconedit/kcolorgrid.h index 00a3d478..2be09f28 100644 --- a/kiconedit/kcolorgrid.h +++ b/kiconedit/kcolorgrid.h @@ -56,7 +56,7 @@ public: bool hasGrid() { return hasgrid; } uint numColors() { return numcolors.size(); } uint colors( uint *c ) { c = numcolors.data(); return numcolors.size(); } - bool tqcontains(uint c) { return numcolors.tqcontains(c); } + bool contains(uint c) { return numcolors.contains(c); } uint colorAt(int idx) { return gridcolors.at(idx); } uint *data() {return numcolors.data(); } void fill(uint color); diff --git a/kiconedit/kiconcolors.cpp b/kiconedit/kiconcolors.cpp index c2042432..3bfc872d 100644 --- a/kiconedit/kiconcolors.cpp +++ b/kiconedit/kiconcolors.cpp @@ -119,7 +119,7 @@ void KCustomColors::mouseDoubleClickEvent(TQMouseEvent *e) void KCustomColors::addColor(uint c) { - if(!tqcontains(c)) + if(!contains(c)) { int f = getFreeCell(); if(f != -1) diff --git a/kiconedit/kicongrid.cpp b/kiconedit/kicongrid.cpp index d794cbe5..b8ed29ab 100644 --- a/kiconedit/kicongrid.cpp +++ b/kiconedit/kicongrid.cpp @@ -1179,7 +1179,7 @@ TQImage KIconEditGrid::getSelection(bool cut) { int x = pntarray[i].x(); int y = pntarray[i].y(); - if(img->valid(x, y) && rect.tqcontains(TQPoint(x, y))) + if(img->valid(x, y) && rect.contains(TQPoint(x, y))) { *((uint*)tmp.scanLine(y-ny) + (x-nx)) = *((uint*)img->scanLine(y) + x); if(cut) @@ -1909,7 +1909,7 @@ void KIconEditGrid::drawPointArray(TQPointArray a, DrawAction action) int x = a[i].x(); int y = a[i].y(); - if(img->valid(x, y) && TQT_TQRECT_OBJECT(a.boundingRect()).tqcontains(a[ i ])) + if(img->valid(x, y) && TQT_TQRECT_OBJECT(a.boundingRect()).contains(a[ i ])) { //kdDebug(4640) << "x: " << x << " - y: " << y << endl; switch( action ) @@ -2195,7 +2195,7 @@ void KIconEditGrid::mapToKDEPalette() { if(*l != TRANSPARENT) { - if(!iconcolors.tqcontains(*l)) + if(!iconcolors.contains(*l)) *l = iconcolors.closestMatch(*l); } } diff --git a/kiconedit/palettetoolbar.cpp b/kiconedit/palettetoolbar.cpp index bb9b1f1c..abd48737 100644 --- a/kiconedit/palettetoolbar.cpp +++ b/kiconedit/palettetoolbar.cpp @@ -112,7 +112,7 @@ void PaletteToolBar::addColors( uint n, uint *c ) void PaletteToolBar::addColor( uint color ) { - if( !m_sysColors->tqcontains( color ) ) + if( !m_sysColors->contains( color ) ) m_customColors->addColor( color ); } diff --git a/kmrml/kmrml.spec b/kmrml/kmrml.spec index d278a7d0..79dbab29 100644 --- a/kmrml/kmrml.spec +++ b/kmrml/kmrml.spec @@ -48,11 +48,11 @@ make install DESTDIR=$RPM_BUILD_ROOT cd $RPM_BUILD_ROOT -tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} +find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} -tqfind . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} -tqfind . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} %clean rm -rf $RPM_BUILD_ROOT diff --git a/kmrml/kmrml/kcontrol/indexcleaner.cpp b/kmrml/kmrml/kcontrol/indexcleaner.cpp index b02d6343..18d5205e 100644 --- a/kmrml/kmrml/kcontrol/indexcleaner.cpp +++ b/kmrml/kmrml/kcontrol/indexcleaner.cpp @@ -74,9 +74,9 @@ void IndexCleaner::startNext() TQString dir = m_dirs.first(); m_dirs.pop_front(); - int index = cmd.tqfind( "%d" ); + int index = cmd.find( "%d" ); if ( index != -1 ) - cmd.tqreplace( index, 2, TQUOTE( dir ) ); + cmd.replace( index, 2, TQUOTE( dir ) ); else // no %d? What else can we do? cmd.append( TQString::tqfromLatin1(" ") + TQUOTE( dir ) ); diff --git a/kmrml/kmrml/kcontrol/indexer.cpp b/kmrml/kmrml/kcontrol/indexer.cpp index 0308dd39..14c6a5c5 100644 --- a/kmrml/kmrml/kcontrol/indexer.cpp +++ b/kmrml/kmrml/kcontrol/indexer.cpp @@ -93,14 +93,14 @@ void Indexer::processNext() TQString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace(); - // in the commandline, tqreplace %d with the directory to process and + // in the commandline, replace %d with the directory to process and // %t with the thumbnail dir - int index = cmd.tqfind( "%d" ); // ### TQFile::encodeName()? + int index = cmd.find( "%d" ); // ### TQFile::encodeName()? if ( index != -1 ) - cmd.tqreplace( index, 2, TQUOTE( m_currentDir ) ); - index = cmd.tqfind( "%t" ); + cmd.replace( index, 2, TQUOTE( m_currentDir ) ); + index = cmd.find( "%t" ); if ( index != -1 ) - cmd.tqreplace( index, 2, TQUOTE(m_currentDir + "_thumbnails") ); + cmd.replace( index, 2, TQUOTE(m_currentDir + "_thumbnails") ); // qDebug("****** command: %s", cmd.latin1()); #if KDE_VERSION >= 306 diff --git a/kmrml/kmrml/kcontrol/mainpage.cpp b/kmrml/kmrml/kcontrol/mainpage.cpp index ab6fc84b..90756bfb 100644 --- a/kmrml/kmrml/kcontrol/mainpage.cpp +++ b/kmrml/kmrml/kcontrol/mainpage.cpp @@ -341,7 +341,7 @@ void MainPage::slotRemoveClicked() void MainPage::enableWidgetsFor( const KMrml::ServerSettings& settings ) { TQString host = settings.host; - bool enableWidgets = (m_config->hosts().tqfindIndex( host ) > -1); + bool enableWidgets = (m_config->hosts().findIndex( host ) > -1); m_serverWidget->m_addButton->setEnabled(!enableWidgets && !host.isEmpty()); m_serverWidget->m_removeButton->setEnabled( enableWidgets && !host.isEmpty() && diff --git a/kmrml/kmrml/lib/kmrml_config.cpp b/kmrml/kmrml/lib/kmrml_config.cpp index 6d779860..2167448b 100644 --- a/kmrml/kmrml/lib/kmrml_config.cpp +++ b/kmrml/kmrml/lib/kmrml_config.cpp @@ -137,7 +137,7 @@ ServerSettings Config::settingsForHost( const TQString& host ) const void Config::addSettings( const ServerSettings& settings ) { TQString host = settings.host; - if ( m_hostList.tqfind( host ) == m_hostList.end() ) + if ( m_hostList.find( host ) == m_hostList.end() ) m_hostList.append( host ); m_config->setGroup( CONFIG_GROUP ); @@ -181,13 +181,13 @@ TQString Config::addCollectionCommandLine() const m_config->setGroup( CONFIG_GROUP ); TQString cmd = m_config->readEntry( "AddCollection Commandline", DEFAULT_ADDCOLLECTION_CMD ); - int index = cmd.tqfind( "%h" ); + int index = cmd.find( "%h" ); if ( index != -1 ) - cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); + cmd.replace( index, 2, TQUOTE( mrmldDataDir() ) ); - index = cmd.tqfind( "%e" ); + index = cmd.find( "%e" ); if ( index != -1 ) - cmd.tqreplace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); + cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); return cmd; } @@ -203,13 +203,13 @@ TQString Config::removeCollectionCommandLine() const m_config->setGroup( CONFIG_GROUP ); TQString cmd = m_config->readEntry( "RemoveCollection Commandline", DEFAULT_REMOVECOLLECTION_CMD ); - int index = cmd.tqfind( "%h" ); + int index = cmd.find( "%h" ); if ( index != -1 ) - cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); + cmd.replace( index, 2, TQUOTE( mrmldDataDir() ) ); - index = cmd.tqfind( "%e" ); + index = cmd.find( "%e" ); if ( index != -1 ) - cmd.tqreplace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); + cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); return cmd; } @@ -231,17 +231,17 @@ TQString Config::mrmldCommandline() const DEFAULT_MRMLD_CMD ); // add data directory and port to the commandline - int index = cmd.tqfind( "%p" ); + int index = cmd.find( "%p" ); if ( index != -1 ) { TQString port = settings.autoPort ? TQString() : TQString::number( settings.configuredPort ); - cmd.tqreplace( index, 2, port ); + cmd.replace( index, 2, port ); } - index = cmd.tqfind( "%d" ); + index = cmd.find( "%d" ); if ( index != -1 ) { - cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); + cmd.replace( index, 2, TQUOTE( mrmldDataDir() ) ); } qDebug("***** commandline: %s", cmd.latin1()); diff --git a/kmrml/kmrml/loader.cpp b/kmrml/kmrml/loader.cpp index f8cbecb3..ea8803e2 100644 --- a/kmrml/kmrml/loader.cpp +++ b/kmrml/kmrml/loader.cpp @@ -72,7 +72,7 @@ void Loader::requestDownload( const KURL& url ) void Loader::slotData( KIO::Job *job, const TQByteArray& data ) { - DownloadIterator it = m_downloads.tqfind( static_cast(job) ); + DownloadIterator it = m_downloads.find( static_cast(job) ); if ( it != m_downloads.end() ) { TQBuffer& buffer = it.data()->m_buffer; if ( !buffer.isOpen() ) @@ -90,7 +90,7 @@ void Loader::slotResult( KIO::Job *job ) { KIO::TransferJob *tjob = static_cast( job ); - DownloadIterator it = m_downloads.tqfind( tjob ); + DownloadIterator it = m_downloads.find( tjob ); if ( it != m_downloads.end() ) { Download *d = it.data(); diff --git a/kmrml/kmrml/mrml_elements.cpp b/kmrml/kmrml/mrml_elements.cpp index a5a0ebb1..ae7ddeee 100644 --- a/kmrml/kmrml/mrml_elements.cpp +++ b/kmrml/kmrml/mrml_elements.cpp @@ -194,7 +194,7 @@ bool QueryParadigm::equalMaps( const TQMap m1, TQMapConstIterator it = m1.begin(); for ( ; it != m1.end(); ++it ) { - TQMapConstIterator it2 = m2.tqfind( it.key() ); + TQMapConstIterator it2 = m2.find( it.key() ); if ( it2 == m2.end() || it.data() != it2.data() ) return false; } diff --git a/kmrml/kmrml/mrml_part.cpp b/kmrml/kmrml/mrml_part.cpp index 305cc684..032eafe6 100644 --- a/kmrml/kmrml/mrml_part.cpp +++ b/kmrml/kmrml/mrml_part.cpp @@ -325,7 +325,7 @@ void MrmlPart::downloadReferenceFiles( const KURL::List& downloadList ) for ( ; it != downloadList.end(); it++ ) { TQString extension; - int index = (*it).fileName().tqfindRev( '.' ); + int index = (*it).fileName().findRev( '.' ); if ( index != -1 ) extension = (*it).fileName().mid( index ); diff --git a/kmrml/kmrml/mrml_view.cpp b/kmrml/kmrml/mrml_view.cpp index 254307e0..5874c996 100644 --- a/kmrml/kmrml/mrml_view.cpp +++ b/kmrml/kmrml/mrml_view.cpp @@ -120,7 +120,7 @@ void MrmlView::clear() TQPixmap * MrmlView::getPixmap( const KURL& url ) { TQString u = url.url(); - TQPixmap *pix = m_pixmapCache.tqfind( u ); + TQPixmap *pix = m_pixmapCache.find( u ); if ( pix ) return pix; @@ -130,7 +130,7 @@ TQPixmap * MrmlView::getPixmap( const KURL& url ) p = m_unavailablePixmap; m_pixmapCache.insert( u, p ); - return m_pixmapCache.tqfind( u ); + return m_pixmapCache.find( u ); } else { // remote url, download with KIO Loader::self()->requestDownload( url ); diff --git a/kmrml/kmrml/server/watcher.cpp b/kmrml/kmrml/server/watcher.cpp index 7281a4ae..60b37c48 100644 --- a/kmrml/kmrml/server/watcher.cpp +++ b/kmrml/kmrml/server/watcher.cpp @@ -56,11 +56,11 @@ bool Watcher::requireDaemon( const TQCString& clientAppId, << ": Client AppID is not registered with DCOP: " << clientAppId << endl; - DaemonData *daemon = m_daemons.tqfind( daemonKey ); + DaemonData *daemon = m_daemons.find( daemonKey ); if ( daemon ) { - if ( !daemon->apps.tqfind( clientAppId ) ) + if ( !daemon->apps.find( clientAppId ) ) daemon->apps.append( clientAppId ); // timeout, commandline and restart values are: first come, first serve @@ -93,7 +93,7 @@ bool Watcher::requireDaemon( const TQCString& clientAppId, void Watcher::unrequireDaemon( const TQCString& clientAppId, const TQString& daemonKey ) { - unrequireDaemon( m_daemons.tqfind( daemonKey ), clientAppId ); + unrequireDaemon( m_daemons.find( daemonKey ), clientAppId ); } void Watcher::unrequireDaemon( DaemonData *daemon, @@ -243,7 +243,7 @@ void Watcher::slotAppUnregistered( const TQCString& appId ) TQDictIterator it( m_daemons ); for ( ; (daemon = it.current()); ++it ) { - if ( daemon->apps.tqfind( appId ) != -1 ) + if ( daemon->apps.find( appId ) != -1 ) unrequireDaemon( daemon, appId ); } } diff --git a/kolourpaint/kpdocumentsaveoptions.cpp b/kolourpaint/kpdocumentsaveoptions.cpp index a5b2988c..89eaf2d8 100644 --- a/kolourpaint/kpdocumentsaveoptions.cpp +++ b/kolourpaint/kpdocumentsaveoptions.cpp @@ -396,7 +396,7 @@ static bool mimeTypeSupportsProperty (const TQString &mimeType, const TQStringList mimeTypeList = mimeTypesSupportingProperty ( property, defaultMimeTypesWithPropertyList); - return mimeTypeList.tqcontains (mimeType); + return mimeTypeList.contains (mimeType); } diff --git a/kolourpaint/kpmainwindow.cpp b/kolourpaint/kpmainwindow.cpp index c600d36b..34d9d998 100644 --- a/kolourpaint/kpmainwindow.cpp +++ b/kolourpaint/kpmainwindow.cpp @@ -939,7 +939,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e) #endif if (m_thumbnailView && kpWidgetMapper::toGlobal (m_thumbnailView, m_thumbnailView->rect ()) - .tqcontains (globalPos)) + .contains (globalPos)) { // TODO: Code will never get executed. // Thumbnail doesn't accept drops. @@ -947,13 +947,13 @@ void kpMainWindow::dropEvent (TQDropEvent *e) } else if (m_mainView && kpWidgetMapper::toGlobal (m_mainView, m_mainView->rect ()) - .tqcontains (globalPos) && + .contains (globalPos) && m_scrollView && kpWidgetMapper::toGlobal (m_scrollView, TQRect (0, 0, m_scrollView->visibleWidth (), m_scrollView->visibleHeight ())) - .tqcontains (globalPos)) + .contains (globalPos)) { view = m_mainView; } @@ -967,7 +967,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e) // viewUnderCursor() is hacky and can return a view when we aren't // over one thanks to drags. - if (m_document && m_document->rect ().tqcontains (docPoint)) + if (m_document && m_document->rect ().contains (docPoint)) { selTopLeft = docPoint; diff --git a/kolourpaint/kpmainwindow_file.cpp b/kolourpaint/kpmainwindow_file.cpp index caf7a75d..bcc1c1c4 100644 --- a/kolourpaint/kpmainwindow_file.cpp +++ b/kolourpaint/kpmainwindow_file.cpp @@ -548,7 +548,7 @@ bool kpMainWindow::save (bool localOnly) { if (m_document->url ().isEmpty () || KImageIO::mimeTypes (KImageIO::Writing) - .tqfindIndex (m_document->saveOptions ()->mimeType ()) < 0 || + .findIndex (m_document->saveOptions ()->mimeType ()) < 0 || // SYNC: kpDocument::getPixmapFromFile() can't determine quality // from file so it has been set initially to an invalid value. (m_document->saveOptions ()->mimeTypeHasConfigurableQuality () && @@ -639,7 +639,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, } #define MIME_TYPE_IS_VALID() (!fdSaveOptions.mimeTypeIsInvalid () && \ - mimeTypes.tqfindIndex (fdSaveOptions.mimeType ()) >= 0) + mimeTypes.findIndex (fdSaveOptions.mimeType ()) >= 0) if (!MIME_TYPE_IS_VALID ()) { #if DEBUG_KP_MAIN_WINDOW @@ -658,9 +658,9 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, kdDebug () << "\tmimeType=" << fdSaveOptions.mimeType () << " not valid, get hardcoded" << endl; #endif - if (mimeTypes.tqfindIndex ("image/png") > -1) + if (mimeTypes.findIndex ("image/png") > -1) fdSaveOptions.setMimeType ("image/png"); - else if (mimeTypes.tqfindIndex ("image/x-bmp") > -1) + else if (mimeTypes.findIndex ("image/x-bmp") > -1) fdSaveOptions.setMimeType ("image/x-bmp"); else fdSaveOptions.setMimeType (mimeTypes.first ()); @@ -964,7 +964,7 @@ void kpMainWindow::sendFilenameToPrinter (KPrinter *printer) int dot; TQString fileName = url.fileName (); - dot = fileName.tqfindRev ('.'); + dot = fileName.findRev ('.'); // file.ext but not .hidden-file? if (dot > 0) diff --git a/kolourpaint/kpmainwindow_help.cpp b/kolourpaint/kpmainwindow_help.cpp index 78ec0265..d7b529dd 100644 --- a/kolourpaint/kpmainwindow_help.cpp +++ b/kolourpaint/kpmainwindow_help.cpp @@ -114,7 +114,7 @@ void kpMainWindow::slotHelpTakingScreenshots () #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\tdcopApps=" << dcopApps << endl; #endif - bool isRunningKDE = (dcopApps.tqfindIndex ("kwin") >= 0); + bool isRunningKDE = (dcopApps.findIndex ("kwin") >= 0); #if 0 { diff --git a/kolourpaint/kpmainwindow_view.cpp b/kolourpaint/kpmainwindow_view.cpp index ee8a0aff..8be4beb8 100644 --- a/kolourpaint/kpmainwindow_view.cpp +++ b/kolourpaint/kpmainwindow_view.cpp @@ -404,7 +404,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) << endl; #endif - if (vuc->clipRegion ().tqcontains (viewPoint)) + if (vuc->clipRegion ().contains (viewPoint)) { const TQPoint globalPoint = kpWidgetMapper::toGlobal (vuc, viewPoint); diff --git a/kolourpaint/kpselection.cpp b/kolourpaint/kpselection.cpp index 97865852..65c2e0f3 100644 --- a/kolourpaint/kpselection.cpp +++ b/kolourpaint/kpselection.cpp @@ -490,18 +490,18 @@ int kpSelection::height () const } // public -bool kpSelection::tqcontains (const TQPoint &point) const +bool kpSelection::contains (const TQPoint &point) const { TQRect rect = boundingRect (); #if DEBUG_KP_SELECTION && 1 - kdDebug () << "kpSelection::tqcontains(" << point + kdDebug () << "kpSelection::contains(" << point << ") rect==" << rect << " #points=" << m_points.size () << endl; #endif - if (!rect.tqcontains (point)) + if (!rect.contains (point)) return false; // OPT: TQRegion is probably incredibly slow - cache @@ -514,20 +514,20 @@ bool kpSelection::tqcontains (const TQPoint &point) const case kpSelection::Text: return true; case kpSelection::Ellipse: - return TQRegion (m_rect, TQRegion::Ellipse).tqcontains (point); + return TQRegion (m_rect, TQRegion::Ellipse).contains (point); case kpSelection::Points: // TODO: make this always include the border // (draw up a rect sel in this mode to see what I mean) - return TQRegion (m_points, false/*even-odd algo*/).tqcontains (point); + return TQRegion (m_points, false/*even-odd algo*/).contains (point); default: return false; } } // public -bool kpSelection::tqcontains (int x, int y) +bool kpSelection::contains (int x, int y) { - return tqcontains (TQPoint (x, y)); + return contains (TQPoint (x, y)); } @@ -1000,7 +1000,7 @@ bool kpSelection::pointIsInTextBorderArea (const TQPoint &globalPoint) const return false; } - return (m_rect.tqcontains (globalPoint) && !pointIsInTextArea (globalPoint)); + return (m_rect.contains (globalPoint) && !pointIsInTextArea (globalPoint)); } // public @@ -1012,7 +1012,7 @@ bool kpSelection::pointIsInTextArea (const TQPoint &globalPoint) const return false; } - return textAreaRect ().tqcontains (globalPoint); + return textAreaRect ().contains (globalPoint); } diff --git a/kolourpaint/kpselection.h b/kolourpaint/kpselection.h index fc309771..24b1ba39 100644 --- a/kolourpaint/kpselection.h +++ b/kolourpaint/kpselection.h @@ -127,8 +127,8 @@ public: // (for non-rectangular selections, may return false even if // kpView::onSelectionResizeHandle()) - bool tqcontains (const TQPoint &point) const; - bool tqcontains (int x, int y); + bool contains (const TQPoint &point) const; + bool contains (int x, int y); // (Avoid using for text selections since text selection may diff --git a/kolourpaint/kpview.cpp b/kolourpaint/kpview.cpp index 341a6790..12a39fb0 100644 --- a/kolourpaint/kpview.cpp +++ b/kolourpaint/kpview.cpp @@ -668,7 +668,7 @@ bool kpView::mouseOnSelection (const TQPoint &viewPoint) const if (!selViewRect.isValid ()) return false; - return selViewRect.tqcontains (mouseViewPoint (viewPoint)); + return selViewRect.contains (mouseViewPoint (viewPoint)); } @@ -874,7 +874,7 @@ int kpView::mouseOnSelectionResizeHandle (const TQPoint &viewPoint) const #define LOCAL_POINT_IN_BOX_AT(x,y) \ - TQRect ((x), (y), atomicLength, atomicLength).tqcontains (viewPointRelSel) + TQRect ((x), (y), atomicLength, atomicLength).contains (viewPointRelSel) // Favour the bottom & right and the corners. if (LOCAL_POINT_IN_BOX_AT (selViewRect.width () - atomicLength, @@ -969,7 +969,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e) // TODO: This is wrong if you leaveEvent the mainView by mouseMoving on the // mainView, landing on top of the thumbnailView cleverly put on top // of the mainView. - setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())); + setHasMouse (TQT_TQRECT_OBJECT(rect ()).contains (e->pos ())); if (tool ()) tool ()->mouseMoveEvent (e); @@ -1003,7 +1003,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e) << endl; #endif - setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())); + setHasMouse (TQT_TQRECT_OBJECT(rect ()).contains (e->pos ())); if (tool ()) tool ()->mouseReleaseEvent (e); diff --git a/kolourpaint/kpviewmanager.cpp b/kolourpaint/kpviewmanager.cpp index 3a3bcdad..3586a173 100644 --- a/kolourpaint/kpviewmanager.cpp +++ b/kolourpaint/kpviewmanager.cpp @@ -78,7 +78,7 @@ void kpViewManager::registerView (kpView *view) #if DEBUG_KP_VIEW_MANAGER && 1 kdDebug () << "kpViewManager::registerView (" << view << ")" << endl; #endif - if (view && m_views.tqfindRef (view) < 0) + if (view && m_views.findRef (view) < 0) { #if DEBUG_KP_VIEW_MANAGER && 1 kdDebug () << "\tadded view" << endl; @@ -469,7 +469,7 @@ kpView *kpViewManager::viewUnderCursor (bool usingTQt) const { kpViewManager *nonConstThis = const_cast (this); - if (m_viewUnderCursor && nonConstThis->m_views.tqfindRef (m_viewUnderCursor) < 0) + if (m_viewUnderCursor && nonConstThis->m_views.findRef (m_viewUnderCursor) < 0) { kdError () << "kpViewManager::viewUnderCursor(): invalid view" << endl; nonConstThis->m_viewUnderCursor = 0; diff --git a/kolourpaint/kpviewscrollablecontainer.cpp b/kolourpaint/kpviewscrollablecontainer.cpp index 7ffecf92..7cfddb1a 100644 --- a/kolourpaint/kpviewscrollablecontainer.cpp +++ b/kolourpaint/kpviewscrollablecontainer.cpp @@ -898,23 +898,23 @@ void kpViewScrollableContainer::recalculateStatusMessage () // if (kpWidgetMapper::toGlobal (this, TQRect (0, 0, visibleWidth (), visibleHeight ())) - .tqcontains (TQCursor::pos ())) + .contains (TQCursor::pos ())) { if (m_bottomRightGrip->isShown () && m_bottomRightGrip->hotRect (true/*to global*/) - .tqcontains (TQCursor::pos ())) + .contains (TQCursor::pos ())) { m_bottomRightGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } else if (m_bottomGrip->isShown () && m_bottomGrip->hotRect (true/*to global*/) - .tqcontains (TQCursor::pos ())) + .contains (TQCursor::pos ())) { m_bottomGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } else if (m_rightGrip->isShown () && m_rightGrip->hotRect (true/*to global*/) - .tqcontains (TQCursor::pos ())) + .contains (TQCursor::pos ())) { m_rightGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } @@ -1119,7 +1119,7 @@ bool kpViewScrollableContainer::beginDragScroll (const TQPoint &/*docPoint*/, bool stopDragScroll = true; bool scrolled = false; - if (!noDragScrollRect ().tqcontains (p)) + if (!noDragScrollRect ().contains (p)) { if (m_dragScrollTimer->isActive ()) { diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp index eaf100ab..2b509cb1 100644 --- a/kolourpaint/pixmapfx/kpfloodfill.cpp +++ b/kolourpaint/pixmapfx/kpfloodfill.cpp @@ -196,7 +196,7 @@ bool kpFloodFill::prepare () kdDebug () << "\tperforming NOP check" << endl; #endif - // get the color we need to tqreplace + // get the color we need to replace if (m_processedColorSimilarity == 0 && m_color == m_colorToChange) { // need to do absolutely nothing (this is a significant optimisation diff --git a/kolourpaint/tools/kptoolautocrop.cpp b/kolourpaint/tools/kptoolautocrop.cpp index d8c8100f..1f3bab0c 100644 --- a/kolourpaint/tools/kptoolautocrop.cpp +++ b/kolourpaint/tools/kptoolautocrop.cpp @@ -34,7 +34,7 @@ // at the other extreme would not be deemed similar enough. The // key is to find the median color as the reference but how do // you do this if you don't know which pixels to sample in the first -// place (that's what you're trying to tqfind)? Chicken and egg situation. +// place (that's what you're trying to find)? Chicken and egg situation. // // The other heuristic that is in doubt is the use of the average // color in determining the similarity of sides (it is possible diff --git a/kolourpaint/tools/kptoolpen.cpp b/kolourpaint/tools/kptoolpen.cpp index 57e19527..d87e3e39 100644 --- a/kolourpaint/tools/kptoolpen.cpp +++ b/kolourpaint/tools/kptoolpen.cpp @@ -266,7 +266,7 @@ void kpToolPen::hover (const TQPoint &point) } #if DEBUG_KP_TOOL_PEN && 0 - if (document ()->rect ().tqcontains (point)) + if (document ()->rect ().contains (point)) { TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ()); @@ -538,7 +538,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const bool didSomething = wash (&painter, &maskPainter, image, - color (1 - m_mouseButton)/*color to tqreplace*/, + color (1 - m_mouseButton)/*color to replace*/, rect, rect); if (painter.isActive ()) diff --git a/kolourpaint/tools/kptoolselection.cpp b/kolourpaint/tools/kptoolselection.cpp index dc689c4b..2d796ff0 100644 --- a/kolourpaint/tools/kptoolselection.cpp +++ b/kolourpaint/tools/kptoolselection.cpp @@ -141,7 +141,7 @@ TQString kpToolSelection::haventBegunDrawUserMessage () const else return i18n ("Left drag to scale selection."); } - else if (sel && sel->tqcontains (m_currentPoint)) + else if (sel && sel->contains (m_currentPoint)) { if (m_mode == Text) { @@ -300,7 +300,7 @@ void kpToolSelection::beginDraw () } viewManager ()->restoreQueueUpdates (); } - else if (sel->tqcontains (m_currentPoint)) + else if (sel->contains (m_currentPoint)) { if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ()) { @@ -408,7 +408,7 @@ const TQCursor &kpToolSelection::cursor () const return TQt::arrowCursor; } - else if (sel && sel->tqcontains (m_currentPoint)) + else if (sel && sel->contains (m_currentPoint)) { #if DEBUG_KP_TOOL_SELECTION && 1 kdDebug () << "\tsel contains currentPoint; selecting text? " diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp index 89357d1c..7fd520f7 100644 --- a/kolourpaint/widgets/kpcolortoolbar.cpp +++ b/kolourpaint/widgets/kpcolortoolbar.cpp @@ -203,8 +203,8 @@ TQRect kpDualColorButton::backgroundRect () const // protected virtual [base TQWidget] void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e) { - e->accept ((foregroundRect ().tqcontains (e->pos ()) || - backgroundRect ().tqcontains (e->pos ())) && + e->accept ((foregroundRect ().contains (e->pos ()) || + backgroundRect ().contains (e->pos ())) && KColorDrag::canDecode (e)); } @@ -216,9 +216,9 @@ void kpDualColorButton::dropEvent (TQDropEvent *e) if (col.isValid ()) { - if (foregroundRect ().tqcontains (e->pos ())) + if (foregroundRect ().contains (e->pos ())) setForegroundColor (kpColor (col.rgb ())); - else if (backgroundRect ().tqcontains (e->pos ())) + else if (backgroundRect ().contains (e->pos ())) setBackgroundColor (kpColor (col.rgb ())); } } @@ -235,9 +235,9 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e) { int whichColor = -1; - if (foregroundRect ().tqcontains (e->pos ())) + if (foregroundRect ().contains (e->pos ())) whichColor = 0; - else if (backgroundRect ().tqcontains (e->pos ())) + else if (backgroundRect ().contains (e->pos ())) whichColor = 1; if (whichColor == 0 || whichColor == 1) @@ -266,7 +266,7 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e) // protected virtual [base TQWidget] void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e) { - if (swapPixmapRect ().tqcontains (e->pos ()) && + if (swapPixmapRect ().contains (e->pos ()) && m_color [0] != m_color [1]) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 @@ -783,7 +783,7 @@ void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/) // protected virtual [base TQWidget] void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e) { - if (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())) + if (TQT_TQRECT_OBJECT(rect ()).contains (e->pos ())) { if (e->button () == Qt::LeftButton) { diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp index a7532fc4..ef5f35c3 100644 --- a/kolourpaint/widgets/kptoolwidgetbase.cpp +++ b/kolourpaint/widgets/kptoolwidgetbase.cpp @@ -549,7 +549,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e) { for (int j = 0; j < (int) m_pixmapRects [i].count (); j++) { - if (m_pixmapRects [i][j].tqcontains (e->pos ())) + if (m_pixmapRects [i][j].contains (e->pos ())) { setSelected (i, j); e->accept (); diff --git a/kooka/img_saver.cpp b/kooka/img_saver.cpp index 01a19461..e0bf399d 100644 --- a/kooka/img_saver.cpp +++ b/kooka/img_saver.cpp @@ -176,7 +176,7 @@ void FormatDialog::check_subformat( const TQString & format ) void FormatDialog::setSelectedFormat( TQString fo ) { - TQListBoxItem *item = lb_format->tqfindItem( fo ); + TQListBoxItem *item = lb_format->findItem( fo ); if( item ) { @@ -728,7 +728,7 @@ TQString ImgSaver::extension( const KURL& url ) { TQString extension = url.fileName(); - int dotPos = extension.tqfindRev( '.' ); + int dotPos = extension.findRev( '.' ); if( dotPos > 0 ) { int len = extension.length(); diff --git a/kooka/imgnamecombo.cpp b/kooka/imgnamecombo.cpp index 94faa083..5205f1b1 100644 --- a/kooka/imgnamecombo.cpp +++ b/kooka/imgnamecombo.cpp @@ -56,7 +56,7 @@ void ImageNameCombo::slotPathRemove( KFileTreeBranch *branch, const TQString& re kdDebug(28000) << "ImageNameCombo: Removing " << path << endl; TQString select = currentText(); - if( items.tqcontains( path )) + if( items.contains( path )) { kdDebug(28000) << "ImageNameCombo: Item exists-> deleting" << endl; items.remove( path ); @@ -74,7 +74,7 @@ void ImageNameCombo::rewriteList( KFileTreeBranch *branch, const TQString& selTe insertItem( branch->pixmap(), *it ); } - int index = items.tqfindIndex( selText ); + int index = items.findIndex( selText ); setCurrentItem( index ); } diff --git a/kooka/kocrkadmos.cpp b/kooka/kocrkadmos.cpp index 97d8310f..99f86a4f 100644 --- a/kooka/kocrkadmos.cpp +++ b/kooka/kocrkadmos.cpp @@ -163,7 +163,7 @@ EngineError KadmosDialog::findClassifiers() if( name.startsWith( "ttf" ) ) { TQString lang = name.mid(3,2); - if( allCountries.tqcontains(lang) ) + if( allCountries.contains(lang) ) { TQString lngCountry = locale->twoAlphaToCountryName(lang); if( lngCountry.isEmpty() ) @@ -188,7 +188,7 @@ EngineError KadmosDialog::findClassifiers() else if( name.startsWith( "hand" ) ) { TQString lang = name.mid(4,2); - if( allCountries.tqcontains(lang) ) + if( allCountries.contains(lang) ) { TQString lngCountry = locale->twoAlphaToCountryName(lang); if( lngCountry.isEmpty() ) @@ -461,7 +461,7 @@ TQString KadmosDialog::getSelClassifierName() const /* Get the long text from the combo box */ TQString selLang = m_cbLang->currentText(); TQString trans; - if( fType != "norm" && m_longCountry2short.tqcontains( selLang )) + if( fType != "norm" && m_longCountry2short.contains( selLang )) { TQString langType = m_longCountry2short[selLang]; trans = fType+langType+".rec"; diff --git a/kooka/kookapref.cpp b/kooka/kookapref.cpp index b453045a..49271414 100644 --- a/kooka/kookapref.cpp +++ b/kooka/kookapref.cpp @@ -207,7 +207,7 @@ TQString KookaPreferences::tryFindBinary( const TQString& bin, const TQString& c if( res != "notFound" ) { TQFileInfo fi( res ); - if( fi.exists() && fi.isExecutable() && !fi.isDir() && res.tqcontains(bin) ) + if( fi.exists() && fi.isExecutable() && !fi.isDir() && res.contains(bin) ) { return res; } @@ -272,7 +272,7 @@ void KookaPreferences::checkOCRBinarySilent( const TQString& cmd ) #endif bool KookaPreferences::checkOCRBinIntern( const TQString& cmd, const TQString& tool, bool show_msg ) { - if( ! cmd.tqcontains( tool )) return false; + if( ! cmd.contains( tool )) return false; bool ret = true; TQFileInfo fi( cmd ); diff --git a/kooka/ksaneocr.cpp b/kooka/ksaneocr.cpp index 54d37244..83ef30da 100644 --- a/kooka/ksaneocr.cpp +++ b/kooka/ksaneocr.cpp @@ -890,7 +890,7 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) { /* Read one line per character */ TQString charLine = stream.readLine(); - int semiPos = charLine.tqfind(';'); + int semiPos = charLine.find(';'); if( semiPos == -1 ) { kdDebug(28000) << "invalid line: " << charLine << endl; @@ -906,7 +906,7 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) // find the amount of alternatives. int altCount = 0; - int h = results.tqfind(','); // search the first comma + int h = results.find(','); // search the first comma if( h > -1 ) { // kdDebug(28000) << "Results of count search: " << results.left(h) << endl; altCount = results.left(h).toInt(); diff --git a/kooka/ocrresedit.cpp b/kooka/ocrresedit.cpp index 8465d09c..26785b4c 100644 --- a/kooka/ocrresedit.cpp +++ b/kooka/ocrresedit.cpp @@ -75,11 +75,11 @@ void ocrResEdit::slSelectWord( int line, const ocrWord& word ) if( line < paragraphs() ) { TQString editLine = text(line); - int cnt = editLine.tqcontains( word); + int cnt = editLine.contains( word); if( cnt > 0 ) { - int pos = editLine.tqfind(word); + int pos = editLine.find(word); setCursorPosition( line, pos ); setSelection( line, pos, line, pos + word.length()); } @@ -96,11 +96,11 @@ void ocrResEdit::slReplaceWord( int line, const TQString& wordFrom, if( line < paragraphs() ) { TQString editLine = text(line); - int cnt = editLine.tqcontains( wordFrom ); + int cnt = editLine.contains( wordFrom ); if( cnt > 0 ) { - int pos = editLine.tqfind(wordFrom); + int pos = editLine.find(wordFrom); setSelection( line, pos, line, pos+wordFrom.length()); TQColor saveCol = this->color(); diff --git a/kooka/ocrword.cpp b/kooka/ocrword.cpp index 2260e770..92993bfd 100644 --- a/kooka/ocrword.cpp +++ b/kooka/ocrword.cpp @@ -76,7 +76,7 @@ TQStringList ocrWordList::stringList() * decided. Solution: KSpell should treat dash-linked words correctly. * We live with the problem here that dashes bring confusion ;-) */ - if( (*it).tqcontains( rx ) ) + if( (*it).contains( rx ) ) res += TQStringList::split( rx, (*it) ); else #endif @@ -95,9 +95,9 @@ bool ocrWordList::updateOCRWord( const TQString& from, const TQString& to ) { TQString word = (*it); kdDebug(28000) << "updateOCRWord in list: Comparing word " << word << endl; - if( word.tqcontains( from, true ) ) // case sensitive search + if( word.contains( from, true ) ) // case sensitive search { - word.tqreplace( from, to ); + word.replace( from, to ); *it = ocrWord( word ); res = true; break; diff --git a/kooka/scanpackager.cpp b/kooka/scanpackager.cpp index 230acae1..fbda481f 100644 --- a/kooka/scanpackager.cpp +++ b/kooka/scanpackager.cpp @@ -420,7 +420,7 @@ TQString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relati if( ! item->isDir() ) { // Cut off the filename in case it is not a dir - relativUrl.truncate( relativUrl.tqfindRev( '/' )+1); + relativUrl.truncate( relativUrl.findRev( '/' )+1); } else { @@ -464,7 +464,7 @@ void ScanPackager::slotSelectDirectory( const TQString & dirString ) kdDebug(28000) << "Trying to decode directory string " << dirString << endl; TQString searchFor = TQString::tqfromLatin1(" - "); - int pos = dirString.tqfind( searchFor ); + int pos = dirString.find( searchFor ); if( pos > -1 ) { diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp index 6c918a4d..9062f976 100644 --- a/kpdf/core/document.cpp +++ b/kpdf/core/document.cpp @@ -145,7 +145,7 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con // determine the related "xml document-info" filename d->url = url; d->docFileName = docFile; - TQString fn = docFile.tqcontains('/') ? docFile.section('/', -1, -1) : docFile; + TQString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile; fn = "kpdf/" + TQString::number(fileReadTest.size()) + "." + fn + ".xml"; fileReadTest.close(); d->xmlFileName = locateLocal( "data", fn ); @@ -298,7 +298,7 @@ void KPDFDocument::addObserver( DocumentObserver * pObserver ) void KPDFDocument::removeObserver( DocumentObserver * pObserver ) { // remove observer from the map. it won't receive notifications anymore - if ( d->observers.tqcontains( pObserver->observerId() ) ) + if ( d->observers.contains( pObserver->observerId() ) ) { // free observer's pixmap data int observerId = pObserver->observerId(); @@ -633,7 +633,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta return false; // if searchID search not recorded, create new descriptor and init params - if ( !d->searches.tqcontains( searchID ) ) + if ( !d->searches.contains( searchID ) ) { RunningSearch * search = new RunningSearch(); search->continueOnPage = -1; @@ -707,7 +707,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.tqcontains( pageNumber ) ) + if ( !pagesToNotify.contains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } @@ -779,7 +779,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta pages_vector[ currentPage ]->setHighlight( searchID, match, color ); // ..queue page for notifying changes.. - if ( !pagesToNotify.tqcontains( currentPage ) ) + if ( !pagesToNotify.contains( currentPage ) ) pagesToNotify.append( currentPage ); // ..move the viewport to show the searched word centered @@ -860,7 +860,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.tqcontains( pageNumber ) ) + if ( !pagesToNotify.contains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } @@ -884,7 +884,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta bool KPDFDocument::continueSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.tqcontains( searchID ) ) + if ( !d->searches.contains( searchID ) ) return false; // start search with cached parameters from last search by searchID @@ -897,7 +897,7 @@ bool KPDFDocument::continueSearch( int searchID ) void KPDFDocument::resetSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.tqcontains( searchID ) ) + if ( !d->searches.contains( searchID ) ) return; // get previous parameters for search @@ -1074,7 +1074,7 @@ void KPDFDocument::processLink( const KPDFLink * link ) TQString url = browse->url(); // fix for #100366, documents with relative links that are the form of http:foo.pdf - if (url.tqfind("http:") == 0 && url.tqfind("http://") == -1 && url.right(4) == ".pdf") + if (url.find("http:") == 0 && url.find("http://") == -1 && url.right(4) == ".pdf") { openRelativeFile(url.mid(5)); return; @@ -1117,7 +1117,7 @@ void KPDFDocument::requestDone( PixmapRequest * req ) break; } - if ( d->observers.tqcontains( req->id ) ) + if ( d->observers.contains( req->id ) ) { // [MEM] 1.2 append memory allocation descriptor to the FIFO int memoryBytes = 4 * req->width * req->height; diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp index 8ad34900..0a445a37 100644 --- a/kpdf/core/generator_pdf/generator_pdf.cpp +++ b/kpdf/core/generator_pdf/generator_pdf.cpp @@ -423,12 +423,12 @@ bool PDFGenerator::print( KPrinter& printer ) marginBottom = (int)printer.option("kde-margin-bottom").toDouble(); bool forceRasterize = printer.option("kde-kpdf-forceRaster").toInt(); - if (ps.tqfind(TQRegExp("w\\d+h\\d+")) == 0) + if (ps.find(TQRegExp("w\\d+h\\d+")) == 0) { // size not supported by TQt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester // remove the w ps = ps.mid(1); - int hPos = ps.tqfind("h"); + int hPos = ps.find("h"); paperWidth = ps.left(hPos).toInt(); paperHeight = ps.mid(hPos+1).toInt(); } diff --git a/kpdf/core/page.cpp b/kpdf/core/page.cpp index 630c9480..269cab2e 100644 --- a/kpdf/core/page.cpp +++ b/kpdf/core/page.cpp @@ -74,7 +74,7 @@ void KPDFPage::setRotation( int r ) bool KPDFPage::hasPixmap( int id, int width, int height ) const { - if ( !m_pixmaps.tqcontains( id ) ) + if ( !m_pixmaps.contains( id ) ) return false; if ( width == -1 || height == -1 ) return true; @@ -98,7 +98,7 @@ bool KPDFPage::hasObjectRect( double x, double y ) const return false; TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->tqcontains( x, y ) ) + if ( (*it)->contains( x, y ) ) return true; return false; } @@ -190,7 +190,7 @@ const ObjectRect * KPDFPage::hasObject( ObjectRect::ObjectType type, double x, d { TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->tqcontains( x, y ) ) + if ( (*it)->contains( x, y ) ) if ((*it)->objectType() == type) return *it; return 0; } @@ -203,7 +203,7 @@ const KPDFPageTransition * KPDFPage::getTransition() const void KPDFPage::setPixmap( int id, TQPixmap * pixmap ) { - if ( m_pixmaps.tqcontains( id ) ) + if ( m_pixmaps.contains( id ) ) delete m_pixmaps[id]; m_pixmaps[id] = pixmap; } @@ -252,7 +252,7 @@ void KPDFPage::setTransition( KPDFPageTransition * transition ) void KPDFPage::deletePixmap( int id ) { - if ( m_pixmaps.tqcontains( id ) ) + if ( m_pixmaps.contains( id ) ) { delete m_pixmaps[ id ]; m_pixmaps.remove( id ); @@ -304,7 +304,7 @@ NormalizedRect::NormalizedRect( const TQRect & r, double xScale, double yScale ) : left( (double)r.left() / xScale ), top( (double)r.top() / yScale ), right( (double)r.right() / xScale ), bottom( (double)r.bottom() / yScale ) {} -bool NormalizedRect::tqcontains( double x, double y ) const +bool NormalizedRect::contains( double x, double y ) const { return x >= left && x <= right && y >= top && y <= bottom; } diff --git a/kpdf/core/page.h b/kpdf/core/page.h index 51d7781c..1ec5add0 100644 --- a/kpdf/core/page.h +++ b/kpdf/core/page.h @@ -32,7 +32,7 @@ class NormalizedRect NormalizedRect( double l, double t, double r, double b ); NormalizedRect( const TQRect & r, double xScale, double yScale ); - bool tqcontains( double x, double y ) const; + bool contains( double x, double y ) const; bool intersects( const NormalizedRect & normRect ) const; bool intersects( double l, double t, double r, double b ) const; diff --git a/kpdf/part.cpp b/kpdf/part.cpp index 76b1aa82..81756ff5 100644 --- a/kpdf/part.cpp +++ b/kpdf/part.cpp @@ -151,7 +151,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, connect( m_document, TQT_SIGNAL( openURL(const KURL &) ), this, TQT_SLOT( openURLFromDocument(const KURL &) ) ); connect( m_document, TQT_SIGNAL( close() ), this, TQT_SLOT( close() ) ); - if (tqparent && tqparent->tqmetaObject()->slotNames(true).tqcontains("slotQuit()")) + if (tqparent && tqparent->tqmetaObject()->slotNames(true).contains("slotQuit()")) connect( m_document, TQT_SIGNAL( quit() ), tqparent, TQT_SLOT( slotQuit() ) ); else connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) ); @@ -278,8 +278,8 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_historyNext->setWhatsThis( i18n( "Go to the place you were after" ) ); // Find and other actions - m_tqfind = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "tqfind" ); - m_tqfind->setEnabled( false ); + m_find = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "find" ); + m_find->setEnabled( false ); m_findNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac, "find_next" ); m_findNext->setEnabled( false ); @@ -452,7 +452,7 @@ bool Part::openFile() bool ok = m_document->openDocument( m_file, url(), mime ); // update one-time actions - m_tqfind->setEnabled( ok && m_document-> supportsSearching()); + m_find->setEnabled( ok && m_document-> supportsSearching()); m_findNext->setEnabled( ok && m_document-> supportsSearching()); m_saveAs->setEnabled( ok ); m_printPreview->setEnabled( ok ); @@ -552,7 +552,7 @@ bool Part::closeURL() } slotHidePresentation(); - m_tqfind->setEnabled( false ); + m_find->setEnabled( false ); m_findNext->setEnabled( false ); m_saveAs->setEnabled( false ); m_printPreview->setEnabled( false ); diff --git a/kpdf/part.h b/kpdf/part.h index 791c3d2d..48e11bb8 100644 --- a/kpdf/part.h +++ b/kpdf/part.h @@ -179,7 +179,7 @@ private: KAction *m_lastPage; KAction *m_historyBack; KAction *m_historyNext; - KAction *m_tqfind; + KAction *m_find; KAction *m_findNext; KAction *m_saveAs; KAction *m_printPreview; diff --git a/kpdf/ui/pagepainter.cpp b/kpdf/ui/pagepainter.cpp index 96fb1edf..21e9c37f 100644 --- a/kpdf/ui/pagepainter.cpp +++ b/kpdf/ui/pagepainter.cpp @@ -26,7 +26,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, TQPixmap * pixmap = 0; // if a pixmap is present for given id, use it - if ( page->m_pixmaps.tqcontains( id ) ) + if ( page->m_pixmaps.contains( id ) ) pixmap = page->m_pixmaps[ id ]; // else find the closest match using pixmaps of other IDs (great optim!) diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp index 27fe3fcb..42024f55 100644 --- a/kpdf/ui/pageview.cpp +++ b/kpdf/ui/pageview.cpp @@ -80,7 +80,7 @@ public: TQRect mouseSelectionRect; TQColor selectionRectColor; - // type ahead tqfind + // type ahead find bool typeAheadActive; TQString typeAheadString; TQTimer * findTimeoutTimer; @@ -577,7 +577,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: pixmap manipulated areas // 3) Layer 2: paint (blend) transparent selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.tqcontains( contentsRect ) ) + !selectionRectInternal.contains( contentsRect ) ) { TQRect blendRect = selectionRectInternal.intersect( contentsRect ); // skip rectangles covered by the selection's border @@ -616,7 +616,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: opaque manipulated ares (filled / contours) // 3) Layer 2: paint opaque selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.tqcontains( contentsRect ) ) + !selectionRectInternal.contains( contentsRect ) ) { screenPainter.setPen( tqpalette().active().highlight().dark(110) ); screenPainter.drawRect( selectionRect ); @@ -1338,7 +1338,7 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect ) outlineGeometry.addCoords( -1, -1, 3, 3 ); // draw the page outline (little black border and 2px shadow) - if ( !pixmapGeometry.tqcontains( contentsRect ) ) + if ( !pixmapGeometry.contains( contentsRect ) ) { int pixmapWidth = pixmapGeometry.width(), pixmapHeight = pixmapGeometry.height(); @@ -1513,7 +1513,7 @@ void PageView::updateZoom( ZoomMode newZoomMode ) { case ZoomFixed:{ //ZoomFixed case TQString z = d->aZoom->currentText(); - newFactor = KGlobal::locale()->readNumber( z.remove( z.tqfind( '%' ), 1 ) ) / 100.0; + newFactor = KGlobal::locale()->readNumber( z.remove( z.find( '%' ), 1 ) ) / 100.0; }break; case ZoomIn: newFactor += (newFactor > 0.99) ? ( newFactor > 1.99 ? 0.5 : 0.2 ) : 0.1; diff --git a/kpdf/ui/presentationwidget.cpp b/kpdf/ui/presentationwidget.cpp index 6767db2c..cc882f7a 100644 --- a/kpdf/ui/presentationwidget.cpp +++ b/kpdf/ui/presentationwidget.cpp @@ -242,7 +242,7 @@ void PresentationWidget::mousePressEvent( TQMouseEvent * e ) return; // handle clicking on top-right overlay - if ( m_overlayGeometry.tqcontains( e->pos() ) ) + if ( m_overlayGeometry.contains( e->pos() ) ) { overlayClick( e->pos() ); return; @@ -290,7 +290,7 @@ void PresentationWidget::mouseMoveEvent( TQMouseEvent * e ) if ( e->y() <= (tqgeometry().top() + 1) ) m_topBar->show(); // handle "dragging the wheel" if clicking on its tqgeometry - else if ( e->state() == Qt::LeftButton && m_overlayGeometry.tqcontains( e->pos() ) ) + else if ( e->state() == Qt::LeftButton && m_overlayGeometry.contains( e->pos() ) ) overlayClick( e->pos() ); } } @@ -963,7 +963,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const /** ONLY the TRANSITIONS GENERATION function from here on **/ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) { - // if it's just a 'tqreplace' transition, tqrepaint the screen + // if it's just a 'replace' transition, tqrepaint the screen if ( transition->type() == KPDFPageTransition::Replace ) { update(); @@ -1175,7 +1175,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) m_transitionDelay = (int)( (totalTime * 1000) / steps ); } break; - // dissolve: tqreplace 'random' rects + // dissolve: replace 'random' rects case KPDFPageTransition::Dissolve: { const int gridXsteps = 50; diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h index 45ecae99..a39e01ad 100644 --- a/kpdf/ui/searchwidget.h +++ b/kpdf/ui/searchwidget.h @@ -20,7 +20,7 @@ class m_inputDelayTimer; #define SW_SEARCH_ID 3 /** - * @short A widget for tqfind-as-you-type search. Outputs to the Document. + * @short A widget for find-as-you-type search. Outputs to the Document. * * This widget accepts keyboard input and performs a call to findTextAll(..) * in the KPDFDocument class when there are 3 or more chars to search for. diff --git a/kpdf/xpdf/xpdf/GlobalParams.cc b/kpdf/xpdf/xpdf/GlobalParams.cc index 24552664..519e81a4 100644 --- a/kpdf/xpdf/xpdf/GlobalParams.cc +++ b/kpdf/xpdf/xpdf/GlobalParams.cc @@ -2057,7 +2057,7 @@ FILE *GlobalParams::findToUnicodeFile(GString *name) { void parseStyle(TQString& name, int& weight, int& slant, int& width) { - if (name.tqfind("MS-") == 0) name = "MS " + name.remove(0,3); + if (name.find("MS-") == 0) name = "MS " + name.remove(0,3); if (!name.contains('-') && !name.contains(',')) return; TQString type = name.section(TQRegExp("[-,]"),-1); diff --git a/kpovmodeler/baseinsertrules.xml b/kpovmodeler/baseinsertrules.xml index 1d6547ce..ad1917d9 100644 --- a/kpovmodeler/baseinsertrules.xml +++ b/kpovmodeler/baseinsertrules.xml @@ -182,11 +182,11 @@ - + - + @@ -211,16 +211,16 @@ - + - + - + @@ -236,11 +236,11 @@ - + - + @@ -297,15 +297,15 @@ - + - + - + @@ -420,9 +420,9 @@ - + - + @@ -435,9 +435,9 @@ - + - + @@ -450,9 +450,9 @@ - + - + @@ -485,7 +485,7 @@ - + @@ -493,31 +493,31 @@ - + - + - + - + - + @@ -534,11 +534,11 @@ - + - + @@ -549,11 +549,11 @@ - + - + @@ -563,14 +563,14 @@ - + - + - + @@ -613,17 +613,17 @@ - + - + - + @@ -639,11 +639,11 @@ - + - + @@ -652,10 +652,10 @@ - + - + @@ -695,18 +695,18 @@ - + - + - + @@ -734,56 +734,56 @@ - + - + - + - + - + - + - + - + - + - + @@ -795,12 +795,12 @@ - + - + @@ -809,12 +809,12 @@ - + - + @@ -829,10 +829,10 @@ - + - + @@ -860,56 +860,56 @@ - + - + - + - + - + - + - + - + - + - + @@ -921,12 +921,12 @@ - + - + @@ -935,12 +935,12 @@ - + - + @@ -955,10 +955,10 @@ - + - + diff --git a/kpovmodeler/pm2dcontrolpoint.cpp b/kpovmodeler/pm2dcontrolpoint.cpp index 244b106f..f8450715 100644 --- a/kpovmodeler/pm2dcontrolpoint.cpp +++ b/kpovmodeler/pm2dcontrolpoint.cpp @@ -197,7 +197,7 @@ PMVector PM2DControlPoint::to3D( const PMVector& v ) const void PM2DControlPoint::addLinkedPoint( PM2DControlPoint* p ) { - if( !m_linkedPoints.tqcontainsRef( p ) ) + if( !m_linkedPoints.containsRef( p ) ) m_linkedPoints.append( p ); } diff --git a/kpovmodeler/pmaddcommand.cpp b/kpovmodeler/pmaddcommand.cpp index 1f34e82c..5b258312 100644 --- a/kpovmodeler/pmaddcommand.cpp +++ b/kpovmodeler/pmaddcommand.cpp @@ -186,7 +186,7 @@ void PMAddCommand::undo( PMCommandManager* theManager ) if( decl ) { m_links.append( lit.current( ) ); - if( !m_linkedDeclares.tqcontainsRef( decl ) ) + if( !m_linkedDeclares.containsRef( decl ) ) m_linkedDeclares.append( decl ); } } diff --git a/kpovmodeler/pmdeclareedit.cpp b/kpovmodeler/pmdeclareedit.cpp index 49ee6366..3693bf6d 100644 --- a/kpovmodeler/pmdeclareedit.cpp +++ b/kpovmodeler/pmdeclareedit.cpp @@ -162,14 +162,14 @@ bool PMDeclareEdit::isDataValid( ) // valid identifer! PMReservedWordDict* dict = PMScanner::reservedWords( ); - if( dict->tqfind( text.latin1( ) ) != -1 ) + if( dict->find( text.latin1( ) ) != -1 ) { KMessageBox::error( this, i18n( "You can't use a povray reserved word" " as an identifier!" ), i18n( "Error" ) ); return false; } dict = PMScanner::directives( ); - if( dict->tqfind( text.latin1( ) ) != -1 ) + if( dict->find( text.latin1( ) ) != -1 ) { KMessageBox::error( this, i18n( "You can't use a povray directive" " as an identifier!" ), i18n( "Error" ) ); @@ -178,7 +178,7 @@ bool PMDeclareEdit::isDataValid( ) // no reserved word PMSymbolTable* st = part( )->symbolTable( ); - if( st->tqfind( text ) ) + if( st->find( text ) ) { KMessageBox::error( this, i18n( "Please enter a unique identifier!" ), i18n( "Error" ) ); diff --git a/kpovmodeler/pmdeletecommand.cpp b/kpovmodeler/pmdeletecommand.cpp index 663dae09..aa7497b2 100644 --- a/kpovmodeler/pmdeletecommand.cpp +++ b/kpovmodeler/pmdeletecommand.cpp @@ -105,7 +105,7 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) if( decl ) { m_links.append( oit.current( ) ); - if( !m_linkedDeclares.tqcontainsRef( decl ) ) + if( !m_linkedDeclares.containsRef( decl ) ) m_linkedDeclares.append( decl ); } } @@ -232,7 +232,7 @@ int PMDeleteCommand::errorFlags( PMPart* ) for( obj = links.current( ); obj && !insideSelection; obj = obj->tqparent( ) ) { - if( m_deletedObjects.tqfind( obj ) ) + if( m_deletedObjects.find( obj ) ) insideSelection = true; } @@ -241,7 +241,7 @@ int PMDeleteCommand::errorFlags( PMPart* ) bool stop = false; for( obj = links.current( ); obj && !stop; obj = obj->tqparent( ) ) { - if( m_deletedObjects.tqfind( obj ) ) + if( m_deletedObjects.find( obj ) ) stop = true; else m_deletedObjects.insert( obj, new bool( true ) ); diff --git a/kpovmodeler/pmdialogeditbase.cpp b/kpovmodeler/pmdialogeditbase.cpp index 21430704..542d3e20 100644 --- a/kpovmodeler/pmdialogeditbase.cpp +++ b/kpovmodeler/pmdialogeditbase.cpp @@ -408,8 +408,8 @@ void PMDialogEditBase::slotTexturePreview( ) { link = rit.current( )->linkedObject( ); if( link ) - if( !neededDeclares.tqcontainsRef( link ) ) - if( !objectsToSerialize.tqfind( link ) ) + if( !neededDeclares.containsRef( link ) ) + if( !objectsToSerialize.find( link ) ) neededDeclares.append( link ); } objectsToSerialize.insert( it.current( ), it.current( ) ); @@ -434,7 +434,7 @@ void PMDialogEditBase::slotTexturePreview( ) { if( otr->type( ) == "Declare" ) { - if( objectsToSerialize.tqfind( otr ) ) + if( objectsToSerialize.find( otr ) ) { dev->serialize( otr ); numDeclares--; @@ -542,7 +542,7 @@ void PMDialogEditBase::slotPreviewFinished( int exitStatus ) "See the povray output for details." ) .tqarg( exitStatus ) ); } - else if( m_pRenderWidget->povrayOutput( ).tqcontains( "ERROR" ) ) + else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) ) { KMessageBox::error( this, i18n( "There were errors while rendering.\n" "See the povray output for details." ) ); diff --git a/kpovmodeler/pmdockwidget.cpp b/kpovmodeler/pmdockwidget.cpp index a9e10a2d..b964f671 100644 --- a/kpovmodeler/pmdockwidget.cpp +++ b/kpovmodeler/pmdockwidget.cpp @@ -1464,10 +1464,10 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) } w = p; } - if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockSplitter", "_dock_split_" ) ) return 0L; - if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockTabGroup", "_dock_tab" ) ) return 0L; + if ( qt_find_obj_child( TQT_TQOBJECT(w), "PMDockSplitter", "_dock_split_" ) ) return 0L; + if ( qt_find_obj_child( TQT_TQOBJECT(w), "PMDockTabGroup", "_dock_tab" ) ) return 0L; if (!childDockWidgetList) return 0L; - if ( childDockWidgetList->tqfind(w) != -1 ) return 0L; + if ( childDockWidgetList->find(w) != -1 ) return 0L; if ( currentDragWidget->isGroup && ((PMDockWidget*)w)->parentDockTabGroup() ) return 0L; PMDockWidget* www = (PMDockWidget*)w; @@ -1511,7 +1511,7 @@ void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const while ( it.current() ) { if ( it.current()->isWidgetType() ) { w = (TQWidget*)it.current(); - if ( w->isVisible() && w->tqgeometry().tqcontains(pos) ) { + if ( w->isVisible() && w->tqgeometry().contains(pos) ) { if ( w->inherits("PMDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); return; @@ -1809,8 +1809,8 @@ void PMDockManager::writeConfig(TQDomElement &base) nList.first(); while ( nList.current() ) { PMDockWidget *obj = getDockWidgetFromName( nList.current() ); - if (obj->isGroup && (nameList.tqfind( obj->firstName.latin1() ) == -1 - || nameList.tqfind(obj->lastName.latin1()) == -1)) { + if (obj->isGroup && (nameList.find( obj->firstName.latin1() ) == -1 + || nameList.find(obj->lastName.latin1()) == -1)) { // Skip until tqchildren are saved (why?) nList.next(); if ( !nList.current() ) nList.first(); @@ -2034,7 +2034,7 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) } /*************************************************************************************************/ if ( obj->isGroup ){ - if ( findList.tqfind( obj->firstName.latin1() ) != -1 && findList.tqfind( obj->lastName.latin1() ) != -1 ){ + if ( findList.find( obj->firstName.latin1() ) != -1 && findList.find( obj->lastName.latin1() ) != -1 ){ c->writeEntry( cname+":type", "GROUP"); if ( !obj->tqparent() ){ @@ -2057,9 +2057,9 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) } else { /*************************************************************************************************/ //debug(" Skip %s", nList.current()); - //if ( findList.tqfind( obj->firstName ) == -1 ) + //if ( findList.find( obj->firstName ) == -1 ) // debug(" ? Not found %s", obj->firstName); - //if ( findList.tqfind( obj->lastName ) == -1 ) + //if ( findList.find( obj->lastName ) == -1 ) // debug(" ? Not found %s", obj->lastName); nList.next(); if ( !nList.current() ) nList.first(); diff --git a/kpovmodeler/pmdocumentationmap.cpp b/kpovmodeler/pmdocumentationmap.cpp index 8fe29ce6..df2bf620 100644 --- a/kpovmodeler/pmdocumentationmap.cpp +++ b/kpovmodeler/pmdocumentationmap.cpp @@ -30,7 +30,7 @@ KStaticDeleter PMDocumentationMap::s_staticDeleter; TQString PMDocumentationVersion::documentation( const TQString& className ) const { - if( m_map.tqcontains( className ) ) + if( m_map.contains( className ) ) return m_map[className]; return m_index; } diff --git a/kpovmodeler/pmenumproperty.cpp b/kpovmodeler/pmenumproperty.cpp index 73a3446f..b300fafc 100644 --- a/kpovmodeler/pmenumproperty.cpp +++ b/kpovmodeler/pmenumproperty.cpp @@ -40,7 +40,7 @@ TQStringList PMEnumProperty::enumValues( ) const bool PMEnumProperty::setProtected( PMObject* obj, const PMVariant& v ) { - PMEnumStringValueMap::iterator it = m_stringMap.tqfind( v.stringData( ) ); + PMEnumStringValueMap::iterator it = m_stringMap.find( v.stringData( ) ); if( it == m_stringMap.end( ) ) return false; setEnum( obj, it.data( ) ); @@ -50,7 +50,7 @@ bool PMEnumProperty::setProtected( PMObject* obj, const PMVariant& v ) PMVariant PMEnumProperty::getProtected( const PMObject* obj ) { int v = getEnum( obj ); - PMEnumValueStringMap::const_iterator it = m_valueMap.tqfind( v ); + PMEnumValueStringMap::const_iterator it = m_valueMap.find( v ); if( it == m_valueMap.end( ) ) return PMVariant( TQString() ); return it.data( ); diff --git a/kpovmodeler/pmerrordialog.cpp b/kpovmodeler/pmerrordialog.cpp index b8a11630..2ff5994f 100644 --- a/kpovmodeler/pmerrordialog.cpp +++ b/kpovmodeler/pmerrordialog.cpp @@ -53,7 +53,7 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, PMObject* obj = pit.current( )->linkedObject( ); for( ; obj; obj = obj->tqparent( ) ) { - TQPtrList* pList = m_messageDict.tqfind( obj ); + TQPtrList* pList = m_messageDict.find( obj ); if( !pList ) { pList = new TQPtrList; diff --git a/kpovmodeler/pmglview.cpp b/kpovmodeler/pmglview.cpp index 91e6d797..9b7779ae 100644 --- a/kpovmodeler/pmglview.cpp +++ b/kpovmodeler/pmglview.cpp @@ -1064,7 +1064,7 @@ PMVector PMGLView::mousePosition( PMControlPoint* cp, int x, int y ) result[1] = screenToInternalY( y ); if( cp ) { - index = m_controlPoints.tqfindRef( cp ); + index = m_controlPoints.findRef( cp ); if( index >= 0 ) { p = m_controlPointsPosition.at( ( uint ) index ); diff --git a/kpovmodeler/pmimagemapedit.cpp b/kpovmodeler/pmimagemapedit.cpp index 5e322d95..3804d89d 100644 --- a/kpovmodeler/pmimagemapedit.cpp +++ b/kpovmodeler/pmimagemapedit.cpp @@ -535,7 +535,7 @@ void PMImageMapEdit::slotAddFilterEntry( ) if( button ) { - int index = m_filterAddButtons.tqfindRef( button ); + int index = m_filterAddButtons.findRef( button ); if( index >= 0 ) { entriesFilters = filters( ); @@ -561,7 +561,7 @@ void PMImageMapEdit::slotRemoveFilterEntry( ) if( button ) { - int index = m_filterRemoveButtons.tqfindRef( button ); + int index = m_filterRemoveButtons.findRef( button ); if( index >= 0 ) { entriesFilters = filters( ); @@ -583,7 +583,7 @@ void PMImageMapEdit::slotAddTransmitEntry( ) if( button ) { - int index = m_transmitAddButtons.tqfindRef( button ); + int index = m_transmitAddButtons.findRef( button ); if( index >= 0 ) { entriesTransmits = transmits( ); @@ -609,7 +609,7 @@ void PMImageMapEdit::slotRemoveTransmitEntry( ) if( button ) { - int index = m_transmitRemoveButtons.tqfindRef( button ); + int index = m_transmitRemoveButtons.findRef( button ); if( index >= 0 ) { entriesTransmits = transmits( ); diff --git a/kpovmodeler/pminsertrules.dtd b/kpovmodeler/pminsertrules.dtd index 4b9a46d7..a3c2128c 100644 --- a/kpovmodeler/pminsertrules.dtd +++ b/kpovmodeler/pminsertrules.dtd @@ -39,23 +39,23 @@ Insert a list of groups and classes (the object classes that can be inserted) and one condition. If the condition is omitted, the classes can allways be inserted. --> - - + - + - + - - @@ -71,9 +71,9 @@ is less than the second. --> - - +