diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | da4be7880ff1de6415ab6256afd2514e64f5fa2e (patch) | |
tree | 0862c14883af0435b012f6f592221fc167ed7d91 /ksvg | |
parent | d0a269b9b0361bf71c5dd5787be0839f9dcace8c (diff) | |
download | tdegraphics-da4be7880ff1de6415ab6256afd2514e64f5fa2e.tar.gz tdegraphics-da4be7880ff1de6415ab6256afd2514e64f5fa2e.zip |
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
Diffstat (limited to 'ksvg')
35 files changed, 138 insertions, 138 deletions
diff --git a/ksvg/core/KSVGCanvas.cpp b/ksvg/core/KSVGCanvas.cpp index d20264bf..d16676ab 100644 --- a/ksvg/core/KSVGCanvas.cpp +++ b/ksvg/core/KSVGCanvas.cpp @@ -181,7 +181,7 @@ void KSVGCanvas::resize(unsigned int w, unsigned int h) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.tqcontains(*it)) + if(!drawables.contains(*it)) drawables.append(*it); } } @@ -203,7 +203,7 @@ void KSVGCanvas::resize(unsigned int w, unsigned int h) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.tqcontains(*it)) + if(!drawables.contains(*it)) drawables.append(*it); } } @@ -324,11 +324,11 @@ T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) cons EFontStyle fontStyle = style->getFontStyle(); TQString fontWeight = style->getFontWeight(); - if(fontWeight.tqcontains("bold")) + if(fontWeight.contains("bold")) weight |= FC_WEIGHT_DEMIBOLD; - if(fontWeight.tqcontains("bolder")) + if(fontWeight.contains("bolder")) weight |= FC_WEIGHT_BOLD; - if(fontWeight.tqcontains("lighter")) + if(fontWeight.contains("lighter")) weight |= FC_WEIGHT_LIGHT; bool ok = true; @@ -364,7 +364,7 @@ T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) cons void KSVGCanvas::tqinvalidate(CanvasItem *item, bool recalc) { - if(m_chunksByItem.tqfind(item) != m_chunksByItem.end()) + if(m_chunksByItem.find(item) != m_chunksByItem.end()) { if(recalc) { @@ -376,7 +376,7 @@ void KSVGCanvas::tqinvalidate(CanvasItem *item, bool recalc) for(it.toFirst(); it.current(); ++it) { (*it)->setDirty(); - if(!m_dirtyChunks.tqcontains(*it)) + if(!m_dirtyChunks.contains(*it)) m_dirtyChunks.append(*it); } } @@ -429,7 +429,7 @@ void KSVGCanvas::removeFromChunks(CanvasItem *item) for(it.toFirst(); it.current(); ++it) { (*it)->remove(item); - if(!m_dirtyChunks.tqcontains(*it)) + if(!m_dirtyChunks.contains(*it)) m_dirtyChunks.append(*it); } m_chunksByItem.remove(item); @@ -540,7 +540,7 @@ void KSVGCanvas::update(const TQPoint &panPoint, bool erase) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.tqcontains(*it)) + if(!drawables.contains(*it)) drawables.append(*it); } } @@ -607,7 +607,7 @@ void KSVGCanvas::update(float zoomFactor) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.tqcontains(*it)) + if(!drawables.contains(*it)) drawables.append(*it); } } @@ -666,7 +666,7 @@ void KSVGCanvas::update() for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { // kdDebug(26005) << k_funcinfo << " Checking: " << *it << endl; - if(!drawables.tqcontains(*it)) + if(!drawables.contains(*it)) { // kdDebug(26005) << k_funcinfo << " Yes, appending to update list!" << endl; drawables.append(*it); @@ -724,7 +724,7 @@ CanvasItemList KSVGCanvas::collisions(const TQPoint &p, bool exact) const { for(CanvasItemList::Iterator it = list.begin(); it != list.end(); ++it) { - if((*it)->fillContains(p) || (*it)->strokeContains(p) || (*it)->bbox().tqcontains(p)) + if((*it)->fillContains(p) || (*it)->strokeContains(p) || (*it)->bbox().contains(p)) result.append(*it); } diff --git a/ksvg/core/KSVGLoader.cpp b/ksvg/core/KSVGLoader.cpp index 9e8c5c54..54f569b1 100644 --- a/ksvg/core/KSVGLoader.cpp +++ b/ksvg/core/KSVGLoader.cpp @@ -125,7 +125,7 @@ void KSVGLoader::slotResult(KIO::Job *job) if(m_job->error() == 0) { TQString check = static_cast<KIO::TransferJob *>(job)->url().prettyURL(); - if(check.tqcontains(".svgz") || check.tqcontains(".svg.gz")) + if(check.contains(".svgz") || check.contains(".svg.gz")) { // decode the gzipped svg and emit it TQIODevice *dev = KFilterDev::device(TQT_TQIODEVICE(new TQBuffer(m_data)), "application/x-gzip"); @@ -348,7 +348,7 @@ public: // Convert the id to its mangled version. TQString id = "@fragment@" + m_url.prettyURL() + "@" + value; - if(m_idMap.tqcontains(id)) + if(m_idMap.contains(id)) { // This is a local reference to an element within the fragment. // Just convert the href. diff --git a/ksvg/data/SVGEcma.lut.h b/ksvg/data/SVGEcma.lut.h index b2a4d2e3..54909bab 100644 --- a/ksvg/data/SVGEcma.lut.h +++ b/ksvg/data/SVGEcma.lut.h @@ -84,7 +84,7 @@ static const char SVGDOMNodeBridgeProto__s_hashTableStrings[] = { "cloneNode\0" "getPrefix\0" "normalize\0" - "tqcontains\0" + "contains\0" }; diff --git a/ksvg/dom/SVGPolygonElement.h b/ksvg/dom/SVGPolygonElement.h index 4ad16863..7347c53f 100644 --- a/ksvg/dom/SVGPolygonElement.h +++ b/ksvg/dom/SVGPolygonElement.h @@ -81,7 +81,7 @@ public: /** * Provides access to the current animated contents of the points * attribute. - * If the given attribute or property is being animated, tqcontains + * If the given attribute or property is being animated, contains * the current animated value of the attribute or property. * If the given attribute or property is not currently being * animated, contains the same value as <code>points</code>'. diff --git a/ksvg/dom/SVGPolylineElement.h b/ksvg/dom/SVGPolylineElement.h index 2ab617fc..78afaf2f 100644 --- a/ksvg/dom/SVGPolylineElement.h +++ b/ksvg/dom/SVGPolylineElement.h @@ -81,7 +81,7 @@ public: /** * Provides access to the current animated contents of the points * attribute. - * If the given attribute or property is being animated, tqcontains + * If the given attribute or property is being animated, contains * the current animated value of the attribute or property. * If the given attribute or property is not currently being * animated, contains the same value as <code>points</code>'. diff --git a/ksvg/dom/SVGSVGElement.h b/ksvg/dom/SVGSVGElement.h index 9380f992..62196710 100644 --- a/ksvg/dom/SVGSVGElement.h +++ b/ksvg/dom/SVGSVGElement.h @@ -56,7 +56,7 @@ class SVGSVGElementImpl; /** * A key interface definition is the SVGSVGElement interface, which is the - * interface that corresponds to the 'svg' element. This interface tqcontains + * interface that corresponds to the 'svg' element. This interface contains * various miscellaneous commonly-used utility methods, such as matrix * operations and the ability to control the time of redraw on visual * rendering devices. SVGSVGElement extends ViewCSS and DocumentCSS to provide diff --git a/ksvg/ecma/ksvg_ecma.cpp b/ksvg/ecma/ksvg_ecma.cpp index 2cb17dcd..32bf2993 100644 --- a/ksvg/ecma/ksvg_ecma.cpp +++ b/ksvg/ecma/ksvg_ecma.cpp @@ -175,7 +175,7 @@ void KSVGEcma::addEventListener(KSVGEcmaEventListener *listener) void KSVGEcma::removeEventListener(KSVGEcmaEventListener *listener) { - m_ecmaEventListeners.take(m_ecmaEventListeners.tqfind(listener)); + m_ecmaEventListeners.take(m_ecmaEventListeners.find(listener)); if(m_ecmaEventListeners.count() == 0) m_hasListeners = false; diff --git a/ksvg/ecma/ksvg_window.cpp b/ksvg/ecma/ksvg_window.cpp index 85c05074..ae6024b3 100644 --- a/ksvg/ecma/ksvg_window.cpp +++ b/ksvg/ecma/ksvg_window.cpp @@ -535,7 +535,7 @@ void WindowQObject::clearTimeout(int timerId, bool delAction) if(delAction) { - TQMapIterator<int, ScheduledAction *> it = scheduledActions.tqfind(timerId); + TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId); if(it != scheduledActions.end()) { ScheduledAction *action = *it; @@ -547,7 +547,7 @@ void WindowQObject::clearTimeout(int timerId, bool delAction) void WindowQObject::timerEvent(TQTimerEvent *e) { - TQMapIterator<int, ScheduledAction *> it = scheduledActions.tqfind(e->timerId()); + TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId()); if(it != scheduledActions.end()) { ScheduledAction *action = *it; diff --git a/ksvg/impl/LRUCache.h b/ksvg/impl/LRUCache.h index ef51e1d8..f9045262 100644 --- a/ksvg/impl/LRUCache.h +++ b/ksvg/impl/LRUCache.h @@ -36,7 +36,7 @@ public: virtual ~MinOneLRUCache() {} void insert(const keyType& key, const valueType& value, int cost); - bool tqfind(const keyType& key, valueType& result); + bool find(const keyType& key, valueType& result); void setMaxTotalCost(int maxTotalCost); int maxTotalCost() const { return m_maxTotalCost; } @@ -63,7 +63,7 @@ protected: typedef TQValueList<CacheItem> CacheItemList; - typename CacheItemList::iterator tqfind(const keyType& key); + typename CacheItemList::iterator find(const keyType& key); void enforceCostConstraint(); CacheItemList m_items; @@ -74,7 +74,7 @@ protected: template<class keyType, class valueType> void MinOneLRUCache<keyType, valueType>::insert(const keyType& key, const valueType& value, int cost) { - typename CacheItemList::iterator it = tqfind(key); + typename CacheItemList::iterator it = find(key); if(it != m_items.end()) { @@ -91,10 +91,10 @@ void MinOneLRUCache<keyType, valueType>::insert(const keyType& key, const valueT } template<class keyType, class valueType> -bool MinOneLRUCache<keyType, valueType>::tqfind(const keyType& key, valueType& result) +bool MinOneLRUCache<keyType, valueType>::find(const keyType& key, valueType& result) { bool foundKey = false; - typename CacheItemList::iterator it = tqfind(key); + typename CacheItemList::iterator it = find(key); if(it != m_items.end()) { @@ -115,7 +115,7 @@ bool MinOneLRUCache<keyType, valueType>::tqfind(const keyType& key, valueType& r } template<class keyType, class valueType> -typename MinOneLRUCache<keyType, valueType>::CacheItemList::iterator MinOneLRUCache<keyType, valueType>::tqfind(const keyType& key) +typename MinOneLRUCache<keyType, valueType>::CacheItemList::iterator MinOneLRUCache<keyType, valueType>::find(const keyType& key) { typename CacheItemList::iterator it; diff --git a/ksvg/impl/SVGAnimateElementImpl.cc b/ksvg/impl/SVGAnimateElementImpl.cc index 471d27bb..ccf8565d 100644 --- a/ksvg/impl/SVGAnimateElementImpl.cc +++ b/ksvg/impl/SVGAnimateElementImpl.cc @@ -127,7 +127,7 @@ void SVGAnimateElementImpl::handleTimerEvent() { /* m_from += m_addStep; - if(m_additive == "tqreplace" && needCombine) + if(m_additive == "replace" && needCombine) needCombine = false; applyAttribute(m_attributeName, TQString::number(m_from), needCombine); diff --git a/ksvg/impl/SVGAnimateTransformElementImpl.cc b/ksvg/impl/SVGAnimateTransformElementImpl.cc index a3384c9d..cf3922f8 100644 --- a/ksvg/impl/SVGAnimateTransformElementImpl.cc +++ b/ksvg/impl/SVGAnimateTransformElementImpl.cc @@ -129,7 +129,7 @@ void SVGAnimateTransformElementImpl::setAttributes() { TQString test = _values.string(); - if(test.tqcontains(";")) + if(test.contains(";")) { SVGLengthImpl *temp = SVGSVGElementImpl::createSVGLength(); @@ -201,7 +201,7 @@ void SVGAnimateTransformElementImpl::handleTimerEvent(bool) if(!m_lastTransform.isEmpty()) { - int pos = trans.tqfind(m_lastTransform); + int pos = trans.find(m_lastTransform); TQString extract; extract += trans.mid(0, pos); diff --git a/ksvg/impl/SVGAnimatedPointsImpl.cc b/ksvg/impl/SVGAnimatedPointsImpl.cc index d3eb426d..852d90e0 100644 --- a/ksvg/impl/SVGAnimatedPointsImpl.cc +++ b/ksvg/impl/SVGAnimatedPointsImpl.cc @@ -69,12 +69,12 @@ void SVGAnimatedPointsImpl::parsePoints(TQString _points, SVGPointListImpl *poin _points = _points.simplifyWhiteSpace(); - if(_points.tqcontains(",,") || _points.tqcontains(", ,")) + if(_points.contains(",,") || _points.contains(", ,")) return; - _points.tqreplace(',', ' '); - _points.tqreplace('\r', TQString()); - _points.tqreplace('\n', TQString()); + _points.replace(',', ' '); + _points.replace('\r', TQString()); + _points.replace('\n', TQString()); _points = _points.simplifyWhiteSpace(); diff --git a/ksvg/impl/SVGAnimationElementImpl.cc b/ksvg/impl/SVGAnimationElementImpl.cc index 3fd29d1e..9fbab696 100644 --- a/ksvg/impl/SVGAnimationElementImpl.cc +++ b/ksvg/impl/SVGAnimationElementImpl.cc @@ -84,8 +84,8 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const double result; - int doublePointOne = parse.tqfind(':'); - int doublePointTwo = parse.tqfind(':', doublePointOne + 1); + int doublePointOne = parse.find(':'); + int doublePointTwo = parse.find(':', doublePointOne + 1); if(doublePointOne != -1 && doublePointTwo != -1) // Spec: "Full clock values" { @@ -96,7 +96,7 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const result = (3600 * hours) + (60 * minutes) + seconds; - if(parse.tqfind('.') != -1) + if(parse.find('.') != -1) { TQString temp = parse.mid(9, 2); milliseconds = temp.toUInt(); @@ -111,7 +111,7 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const result = (60 * minutes) + seconds; - if(parse.tqfind('.') != -1) + if(parse.find('.') != -1) { TQString temp = parse.mid(6, 2); milliseconds = temp.toUInt(); @@ -120,7 +120,7 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const } else // Spec: "Timecount values" { - int dotPosition = parse.tqfind('.'); + int dotPosition = parse.find('.'); if(parse.endsWith("h")) { @@ -304,34 +304,34 @@ void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const } else if(current.startsWith("wallclock")) { - int firstBrace = current.tqfind("("); - int secondBrace = current.tqfind(")"); + int firstBrace = current.find("("); + int secondBrace = current.find(")"); TQString wallclockValue = current.mid(firstBrace + 1, secondBrace - firstBrace - 2); kdDebug() << "WALLCLOCK VALUE " << wallclockValue << endl; } - else if(current.tqcontains(".")) + else if(current.contains(".")) { - int dotPosition = current.tqfind("."); + int dotPosition = current.find("."); TQString element = current.mid(0, dotPosition); TQString clockValue; - if(current.tqcontains("begin")) + if(current.contains("begin")) clockValue = current.mid(dotPosition + 6); - else if(current.tqcontains("end")) + else if(current.contains("end")) clockValue = current.mid(dotPosition + 4); - else if(current.tqcontains("repeat")) + else if(current.contains("repeat")) clockValue = current.mid(dotPosition + 7); else // DOM2 Event Reference { int plusMinusPosition = -1; - if(current.tqcontains("+")) - plusMinusPosition = current.tqfind("+"); - else if(current.tqcontains("-")) - plusMinusPosition = current.tqfind("-"); + if(current.contains("+")) + plusMinusPosition = current.find("+"); + else if(current.contains("-")) + plusMinusPosition = current.find("-"); TQString event = current.mid(dotPosition + 1, plusMinusPosition - dotPosition - 1); @@ -405,9 +405,9 @@ void SVGAnimationElementImpl::setAttributes() { SVGElementImpl::setAttributes(); - // Spec: Default value is "tqreplace" + // Spec: Default value is "replace" if(KSVG_TOKEN_NOT_PARSED(Additive)) - KSVG_SET_ALT_ATTRIBUTE(Additive, "tqreplace") + KSVG_SET_ALT_ATTRIBUTE(Additive, "replace") // Spec: Default value is "none" if(KSVG_TOKEN_NOT_PARSED(Accumulate)) diff --git a/ksvg/impl/SVGColorImpl.cc b/ksvg/impl/SVGColorImpl.cc index 3808fe90..6520e9d7 100644 --- a/ksvg/impl/SVGColorImpl.cc +++ b/ksvg/impl/SVGColorImpl.cc @@ -398,7 +398,7 @@ void SVGColorImpl::setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM TQColor color; TQString content = iccColor.string().right(iccColor.string().length() - 10); - TQString iccTarget = content.mid(0, content.tqfind(',')); + TQString iccTarget = content.mid(0, content.find(',')); TQStringList colors = TQStringList::split(',', content); TQString r = colors[1]; diff --git a/ksvg/impl/SVGDocumentImpl.cc b/ksvg/impl/SVGDocumentImpl.cc index 2b0383ec..4e541847 100644 --- a/ksvg/impl/SVGDocumentImpl.cc +++ b/ksvg/impl/SVGDocumentImpl.cc @@ -252,7 +252,7 @@ void SVGDocumentImpl::slotSVGContent(TQIODevice *dev) args.getURLMode = false; TQString url = m_baseURL.prettyURL(); - int pos = url.tqfind('#'); // url can become like this.svg#svgView(viewBox(63,226,74,74)), get part after '#' + int pos = url.find('#'); // url can become like this.svg#svgView(viewBox(63,226,74,74)), get part after '#' if(pos > -1) args.SVGFragmentId = url.mid(pos + 1); @@ -358,7 +358,7 @@ void SVGDocumentImpl::checkFinishedLoading() void SVGDocumentImpl::addForwardReferencingUseElement(SVGUseElementImpl *use) { - if(!m_forwardReferencingUseElements.tqcontains(use)) + if(!m_forwardReferencingUseElements.contains(use)) m_forwardReferencingUseElements.append(use); } diff --git a/ksvg/impl/SVGEcma.cc b/ksvg/impl/SVGEcma.cc index c7105d41..0ab19f3a 100644 --- a/ksvg/impl/SVGEcma.cc +++ b/ksvg/impl/SVGEcma.cc @@ -74,7 +74,7 @@ using namespace KSVG; isSupported SVGDOMNodeBridge::IsSupported DontDelete|Function 2 addEventListener SVGDOMNodeBridge::AddEventListener DontDelete|Function 3 removeEventListener SVGDOMNodeBridge::RemoveEventListener DontDelete|Function 3 - tqcontains SVGDOMNodeBridge::Contains DontDelete|Function 1 + contains SVGDOMNodeBridge::Contains DontDelete|Function 1 getNodeName SVGDOMNodeBridge::GetNodeName DontDelete|Function 0 getNodeValue SVGDOMNodeBridge::GetNodeValue DontDelete|Function 0 getNodeType SVGDOMNodeBridge::GetNodeType DontDelete|Function 0 @@ -178,10 +178,10 @@ void removeItem(ExecState *exec, DOM::Node &node) void correctHandles(SVGElementImpl *main, DOM::Node &node) { DOM::Element old(node.handle()); - DOM::Element *tqreplace = static_cast<DOM::Element *>(main->ownerDoc()->getElementFromHandle(node.handle())); + DOM::Element *replace = static_cast<DOM::Element *>(main->ownerDoc()->getElementFromHandle(node.handle())); - if(tqreplace && node.nodeType() == DOM::Node::ELEMENT_NODE) - *tqreplace = old; + if(replace && node.nodeType() == DOM::Node::ELEMENT_NODE) + *replace = old; if(node.hasChildNodes()) { @@ -556,7 +556,7 @@ Value SVGDOMElementBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const { // For now, we strip the NS part (Rob) DOM::DOMString attr = args[1].toString(exec).string(); - int pos = attr.string().tqfind(':'); + int pos = attr.string().find(':'); if(pos > -1) attr = attr.string().mid(pos + 1); diff --git a/ksvg/impl/SVGElementImpl.cc b/ksvg/impl/SVGElementImpl.cc index 099918f5..13fc9e46 100644 --- a/ksvg/impl/SVGElementImpl.cc +++ b/ksvg/impl/SVGElementImpl.cc @@ -328,7 +328,7 @@ TQDict<DOM::DOMString> &SVGElementImpl::attributes() // khtml overrides void SVGElementImpl::setAttribute(const DOM::DOMString &name, const DOM::DOMString &value) { - m_attributes.tqreplace(name.string(), new DOM::DOMString(value)); + m_attributes.replace(name.string(), new DOM::DOMString(value)); } // Changes internal value. This will have no effect on getAttribute(). @@ -368,7 +368,7 @@ DOM::DOMString SVGElementImpl::getAttributeInternal(const DOM::DOMString &name) bool SVGElementImpl::hasAttribute(const DOM::DOMString &name) { - return m_attributes.tqfind(name.string()) != 0; + return m_attributes.find(name.string()) != 0; } bool SVGElementImpl::hasAttributes() diff --git a/ksvg/impl/SVGFitToViewBoxImpl.cc b/ksvg/impl/SVGFitToViewBoxImpl.cc index 7fc3856b..aaee3045 100644 --- a/ksvg/impl/SVGFitToViewBoxImpl.cc +++ b/ksvg/impl/SVGFitToViewBoxImpl.cc @@ -75,7 +75,7 @@ void SVGFitToViewBoxImpl::parseViewBox(const TQString &s) // allow for viewbox def with ',' or whitespace TQString viewbox(s); - TQStringList points = TQStringList::split(' ', viewbox.tqreplace(',', ' ').simplifyWhiteSpace()); + TQStringList points = TQStringList::split(' ', viewbox.replace(',', ' ').simplifyWhiteSpace()); viewBox()->baseVal()->setX(points[0].toFloat()); viewBox()->baseVal()->setY(points[1].toFloat()); diff --git a/ksvg/impl/SVGImageElementImpl.cc b/ksvg/impl/SVGImageElementImpl.cc index 4a60d622..258ce95e 100644 --- a/ksvg/impl/SVGImageElementImpl.cc +++ b/ksvg/impl/SVGImageElementImpl.cc @@ -380,7 +380,7 @@ bool SVGImageElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &, S if(test && m_item) { - if(m_item->bbox().tqcontains(p)) + if(m_item->bbox().contains(p)) { mev->setTarget(dynamic_cast<SVGElementImpl *>(this)); return true; diff --git a/ksvg/impl/SVGLangSpaceImpl.cc b/ksvg/impl/SVGLangSpaceImpl.cc index 5a55ef15..edc35a4d 100644 --- a/ksvg/impl/SVGLangSpaceImpl.cc +++ b/ksvg/impl/SVGLangSpaceImpl.cc @@ -67,19 +67,19 @@ TQString SVGLangSpaceImpl::handleText(const TQString &data) const { // Spec: What to do here? // It will convert all newline and tab characters into space characters - result.tqreplace("\n\r", TQString(" ")); - result.tqreplace("\r\n", TQString(" ")); - result.tqreplace('\t', ' '); + result.replace("\n\r", TQString(" ")); + result.replace("\r\n", TQString(" ")); + result.replace('\t', ' '); } else if(xmlspace() == "default") { // Spec: What to do here? - // First, it will remove all newline characters (tqreplace) + // First, it will remove all newline characters (replace) // Then it will convert all tab characters into space characters (simplifyWhiteSpace) // Then, it will strip off all leading and trailing space characters (stripWhiteSpace) // Then, all contiguous space characters will be consolidated. (simplifyWhiteSpace) - result.tqreplace('\n', TQString()); - result.tqreplace('\r', TQString()); + result.replace('\n', TQString()); + result.replace('\r', TQString()); result = result.stripWhiteSpace().simplifyWhiteSpace(); } diff --git a/ksvg/impl/SVGMaskElementImpl.cc b/ksvg/impl/SVGMaskElementImpl.cc index 8096c26d..afbc1e74 100644 --- a/ksvg/impl/SVGMaskElementImpl.cc +++ b/ksvg/impl/SVGMaskElementImpl.cc @@ -420,7 +420,7 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin { CacheKey key(referencingElement, imageWidth, imageHeight); - if(!m_maskCache.tqfind(key, tqmask)) + if(!m_maskCache.find(key, tqmask)) { tqmask = createMask(referencingElement, imageWidth, imageHeight); m_maskCache.insert(key, tqmask, imageWidth * imageHeight); diff --git a/ksvg/impl/SVGPatternElementImpl.cc b/ksvg/impl/SVGPatternElementImpl.cc index 99c79ff6..672e62d3 100644 --- a/ksvg/impl/SVGPatternElementImpl.cc +++ b/ksvg/impl/SVGPatternElementImpl.cc @@ -486,7 +486,7 @@ SVGPatternElementImpl::Tile SVGPatternElementImpl::createTile(SVGShapeImpl *refe TQSize size(imageWidth, imageHeight); TQImage image; - if(!m_tileCache.tqfind(size, image)) + if(!m_tileCache.find(size, image)) { image = createTile(referencingElement, imageWidth, imageHeight); m_tileCache.insert(size, image, image.width() * image.height() * 4); diff --git a/ksvg/impl/SVGSVGElementImpl.cc b/ksvg/impl/SVGSVGElementImpl.cc index 68bb7dd1..d72b488f 100644 --- a/ksvg/impl/SVGSVGElementImpl.cc +++ b/ksvg/impl/SVGSVGElementImpl.cc @@ -382,7 +382,7 @@ DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementI { // TODO : add the tqshape to list if the test succeeds SVGRectImpl *current = tqshape->getBBox(); - if(rect->qrect().tqcontains(current->qrect(), true)) + if(rect->qrect().contains(current->qrect(), true)) kdDebug() << "tqshape : " << element->nodeName().string() << " is fully enclosed" << endl; current->deref(); @@ -412,7 +412,7 @@ bool SVGSVGElementImpl::checkEnclosure(SVGElementImpl *element, SVGRectImpl *rec return false; SVGRectImpl *current = tqshape->getBBox(); - bool result = rect->qrect().tqcontains(current->qrect()); + bool result = rect->qrect().contains(current->qrect()); current->deref(); return result; } diff --git a/ksvg/impl/SVGStylableImpl.cc b/ksvg/impl/SVGStylableImpl.cc index 2bc64df7..32db8575 100644 --- a/ksvg/impl/SVGStylableImpl.cc +++ b/ksvg/impl/SVGStylableImpl.cc @@ -532,7 +532,7 @@ TQString SVGStylableImpl::extractUrlId(const TQString &url) if(url.startsWith("url(#")) { - int idstart = url.tqfind("#") + 1; + int idstart = url.find("#") + 1; id = url.mid(idstart, url.length() - idstart - 1); } else @@ -552,7 +552,7 @@ void SVGStylableImpl::setStartMarker(const TQString &startMarker) { if(startMarker.startsWith("url(#")) { - int idstart = startMarker.tqfind("#") + 1; + int idstart = startMarker.find("#") + 1; m_startMarker = startMarker.mid(idstart, startMarker.length() - idstart - 1); } else if(startMarker == "none") @@ -563,7 +563,7 @@ void SVGStylableImpl::setMidMarker(const TQString &midMarker) { if(midMarker.startsWith("url(#")) { - int idstart = midMarker.tqfind("#") + 1; + int idstart = midMarker.find("#") + 1; m_midMarker = midMarker.mid(idstart, midMarker.length() - idstart - 1); } else if(midMarker == "none") @@ -574,7 +574,7 @@ void SVGStylableImpl::setEndMarker(const TQString &endMarker) { if(endMarker.startsWith("url(#")) { - int idstart = endMarker.tqfind("#") + 1; + int idstart = endMarker.find("#") + 1; m_endMarker = endMarker.mid(idstart, endMarker.length() - idstart - 1); } else if(endMarker == "none") @@ -600,7 +600,7 @@ void SVGStylableImpl::setColor(const TQString ¶m, SVGColorImpl *svgColor) { if(param.stripWhiteSpace().startsWith("#")) { - if(param.tqcontains("icc-color")) + if(param.contains("icc-color")) { TQString first = param.left(7); TQString last = param.right(param.length() - 8); @@ -622,19 +622,19 @@ void SVGStylableImpl::setColor(const TQString ¶m, SVGColorImpl *svgColor) TQString g = colors[1]; TQString b = colors[2].left((colors[2].length() - 1)); - if(r.tqcontains("%")) + if(r.contains("%")) { r = r.left(r.length() - 1); r = TQString::number(int((double(255 * r.toDouble()) / 100.0))); } - if(g.tqcontains("%")) + if(g.contains("%")) { g = g.left(g.length() - 1); g = TQString::number(int((double(255 * g.toDouble()) / 100.0))); } - if(b.tqcontains("%")) + if(b.contains("%")) { b = b.left(b.length() - 1); b = TQString::number(int((double(255 * b.toDouble()) / 100.0))); @@ -946,12 +946,12 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value & // Hacks // #1 Replace "'" characters by "" - param = param.tqreplace('\'', TQString()); + param = param.replace('\'', TQString()); // #2 Replace "MS-Gothic" by "MS Gothic" - param = param.tqreplace("MS-Gothic", "MS Gothic"); + param = param.replace("MS-Gothic", "MS Gothic"); // #3 Replace "Helvetica" by "Arial" - param = param.tqreplace("Helvetica", "Arial"); - param = param.tqreplace("helvetica", "Arial"); + param = param.replace("Helvetica", "Arial"); + param = param.replace("helvetica", "Arial"); if(!m_fontFamily) { diff --git a/ksvg/impl/SVGTextElementImpl.cc b/ksvg/impl/SVGTextElementImpl.cc index 7603c622..82a53ea9 100644 --- a/ksvg/impl/SVGTextElementImpl.cc +++ b/ksvg/impl/SVGTextElementImpl.cc @@ -111,7 +111,7 @@ bool SVGTextElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &, SV if(test) { - if(m_item->bbox().tqcontains(p)) + if(m_item->bbox().contains(p)) { mev->setTarget(dynamic_cast<SVGElementImpl *>(this)); return true; diff --git a/ksvg/impl/SVGTimeScheduler.cc b/ksvg/impl/SVGTimeScheduler.cc index d2a10e5a..29862959 100644 --- a/ksvg/impl/SVGTimeScheduler.cc +++ b/ksvg/impl/SVGTimeScheduler.cc @@ -92,7 +92,7 @@ void SVGTimer::notifyAll() animation->handleTimerEvent(); SVGElementImpl *target = animation->targetElement(); - if(!elements.tqcontains(target)) + if(!elements.contains(target)) elements.append(target); } } diff --git a/ksvg/impl/SVGURIReferenceImpl.cc b/ksvg/impl/SVGURIReferenceImpl.cc index 52db7a86..8a6fda76 100644 --- a/ksvg/impl/SVGURIReferenceImpl.cc +++ b/ksvg/impl/SVGURIReferenceImpl.cc @@ -50,7 +50,7 @@ SVGAnimatedStringImpl *SVGURIReferenceImpl::href() const bool SVGURIReferenceImpl::parseURIReference(const TQString &urireference, TQString &uri, TQString &elementreference) { - int seperator = urireference.tqfind("#"); + int seperator = urireference.find("#"); if(seperator == -1) return false; @@ -71,14 +71,14 @@ TQString SVGURIReferenceImpl::getTarget(const TQString &url) { if(url.startsWith("url(")) // URI References, ie. fill:url(#target) { - unsigned int start = url.tqfind("#") + 1; - unsigned int end = url.tqfindRev(")"); + unsigned int start = url.find("#") + 1; + unsigned int end = url.findRev(")"); return url.mid(start, end - start); } - else if(url.tqfind("#") > -1) // format is #target + else if(url.find("#") > -1) // format is #target { - unsigned int start = url.tqfind("#") + 1; + unsigned int start = url.find("#") + 1; return url.mid(start, url.length() - start); } diff --git a/ksvg/impl/SVGUnitConverter.h b/ksvg/impl/SVGUnitConverter.h index db85c42d..cb8bac04 100644 --- a/ksvg/impl/SVGUnitConverter.h +++ b/ksvg/impl/SVGUnitConverter.h @@ -48,7 +48,7 @@ public: void modify(SVGAnimatedLengthImpl *obj, const TQString &value) { - UnitData *data = m_dict.tqfind(obj); + UnitData *data = m_dict.find(obj); if(data) data->valueAsString = value; diff --git a/ksvg/impl/libs/libtext2path/libtext2path.spec b/ksvg/impl/libs/libtext2path/libtext2path.spec index 208de711..e0c217bd 100644 --- a/ksvg/impl/libs/libtext2path/libtext2path.spec +++ b/ksvg/impl/libs/libtext2path/libtext2path.spec @@ -31,8 +31,8 @@ make -j make install-strip DESTDIR=$RPM_BUILD_ROOT cd -tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > /%{name}-master.list -tqfind . -type f -o -type l | sed 's|^\.||' >> $RPM_BUILD_DIR/%{name}-master.list +find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > /%{name}-master.list +find . -type f -o -type l | sed 's|^\.||' >> $RPM_BUILD_DIR/%{name}-master.list %clean rm -rf $RPM_BUILD_DIR/%{name}-%{version} diff --git a/ksvg/impl/libs/libtext2path/src/Cache.h b/ksvg/impl/libs/libtext2path/src/Cache.h index 51d09f45..a85fdf92 100644 --- a/ksvg/impl/libs/libtext2path/src/Cache.h +++ b/ksvg/impl/libs/libtext2path/src/Cache.h @@ -118,7 +118,7 @@ namespace T2P } // Lookup entry - SharedT tqfind(const std::string &key) + SharedT find(const std::string &key) { for(typename std::vector<SharedT>::const_iterator it = m_entries.begin(); it != m_entries.end(); ++it) { diff --git a/ksvg/impl/libs/libtext2path/src/Converter.cpp b/ksvg/impl/libs/libtext2path/src/Converter.cpp index 2085e003..11de3177 100644 --- a/ksvg/impl/libs/libtext2path/src/Converter.cpp +++ b/ksvg/impl/libs/libtext2path/src/Converter.cpp @@ -90,7 +90,7 @@ void Converter::setKerning(bool mode) SharedFont Converter::requestFont(const FontVisualParams *params) { std::string cacheKey = cacheFontKey(params); - SharedFont cached = m_fontCache.tqfind(cacheKey); + SharedFont cached = m_fontCache.find(cacheKey); // If not available in cache, create new one and cache it :) if(cached) @@ -122,7 +122,7 @@ GlyphAffinePair *Converter::requestGlyph(GlyphRenderParams *params, Rectangle &b // needed to generate the cache lookup key selectGlyph(params); - SharedGlyph cached = m_glyphCache.tqfind(cacheGlyphKey(params)); + SharedGlyph cached = m_glyphCache.find(cacheGlyphKey(params)); // If not available in cache, render new one and cache it :) // If we're mixing ie. japanese and latin characters (TTB tqlayout), diff --git a/ksvg/impl/svgpathparser.cc b/ksvg/impl/svgpathparser.cc index e072b715..590ac2ba 100644 --- a/ksvg/impl/svgpathparser.cc +++ b/ksvg/impl/svgpathparser.cc @@ -100,7 +100,7 @@ SVGPathParser::parseSVG( const TQString &s, bool process ) if(!s.isEmpty()) { TQString d = s; - d = d.tqreplace(',', ' '); + d = d.replace(',', ' '); d = d.simplifyWhiteSpace(); const char *ptr = d.latin1(); const char *end = d.latin1() + d.length() + 1; diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp index 83b62fb4..c9042b56 100644 --- a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp +++ b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp @@ -1064,29 +1064,29 @@ void LibartPath::init(const SVGMatrixImpl *screenCTM) double cury = m_array[index - 1].y3; // Find last subpath - int tqfind = -1; + int find = -1; for(int i = index - 1; i >= 0; i--) { if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO) { - tqfind = i; + find = i; break; } } // Fix a problem where the .svg file used floats as values... (sofico.svg) - if(curx != m_array[tqfind].x3 && cury != m_array[tqfind].y3) + if(curx != m_array[find].x3 && cury != m_array[find].y3) { - if((int) curx == (int) m_array[tqfind].x3 && (int) cury == (int) m_array[tqfind].y3) + if((int) curx == (int) m_array[find].x3 && (int) cury == (int) m_array[find].y3) { ensureSpace(m_array, index) m_array[index].code = ART_LINETO; - m_array[index].x3 = m_array[tqfind].x3; - m_array[index].y3 = m_array[tqfind].y3; + m_array[index].x3 = m_array[find].x3; + m_array[index].y3 = m_array[find].y3; - curx = m_array[tqfind].x3; - cury = m_array[tqfind].y3; + curx = m_array[find].x3; + cury = m_array[find].y3; index++; } @@ -1095,16 +1095,16 @@ void LibartPath::init(const SVGMatrixImpl *screenCTM) // handle filled paths that are not closed explicitly if(m_path->getFillColor()->paintType() != SVG_PAINTTYPE_NONE) { - if((int) curx != (int) m_array[tqfind].x3 || (int) cury != (int) m_array[tqfind].y3) + if((int) curx != (int) m_array[find].x3 || (int) cury != (int) m_array[find].y3) { ensureSpace(m_array, index) m_array[index].code = (ArtPathcode)ART_END2; - m_array[index].x3 = m_array[tqfind].x3; - m_array[index].y3 = m_array[tqfind].y3; + m_array[index].x3 = m_array[find].x3; + m_array[index].y3 = m_array[find].y3; - curx = m_array[tqfind].x3; - cury = m_array[tqfind].y3; + curx = m_array[find].x3; + cury = m_array[find].y3; index++; } @@ -1147,12 +1147,12 @@ void LibartPath::svgMoveTo(double x1, double y1, bool closed, bool) if(index > 0 && !closed) { // Find last subpath - int tqfind = -1; + int find = -1; for(int i = index - 1; i >= 0; i--) { if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO) { - tqfind = i; + find = i; break; } } @@ -1160,8 +1160,8 @@ void LibartPath::svgMoveTo(double x1, double y1, bool closed, bool) ensureSpace(m_array, index) m_array[index].code = (ArtPathcode) ART_END2; - m_array[index].x3 = m_array[tqfind].x3; - m_array[index].y3 = m_array[tqfind].y3; + m_array[index].x3 = m_array[find].x3; + m_array[index].y3 = m_array[find].y3; index++; } @@ -1205,25 +1205,25 @@ void LibartPath::svgClosePath() double curx = m_array[index - 1].x3; double cury = m_array[index - 1].y3; - int tqfind = -1; + int find = -1; for(int i = index - 1; i >= 0; i--) { if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO) { - tqfind = i; + find = i; break; } } - if(tqfind != -1) + if(find != -1) { - if(m_array[tqfind].x3 != curx || m_array[tqfind].y3 != cury) + if(m_array[find].x3 != curx || m_array[find].y3 != cury) { ensureSpace(m_array, index) m_array[index].code = ART_LINETO; - m_array[index].x3 = m_array[tqfind].x3; - m_array[index].y3 = m_array[tqfind].y3; + m_array[index].x3 = m_array[find].x3; + m_array[index].y3 = m_array[find].y3; } } } @@ -1505,10 +1505,10 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2) bool strokeOk = stroke && stroke->svp && text->isStroked() && text->getStrokeWidth()->baseVal()->value() > 0; // Spec: A zero value causes no stroke to be painted. if(fillOk || strokeOk) { - if(m_fillPainters.tqfind(text)) + if(m_fillPainters.find(text)) m_fillPainters[text]->update(text); - if(m_strokePainters.tqfind(text)) + if(m_strokePainters.find(text)) m_strokePainters[text]->update(text); } fill = ++it1; @@ -1574,10 +1574,10 @@ void LibartText::draw() if(fillOk || strokeOk) { - if(fillOk && m_fillPainters.tqfind(text)) + if(fillOk && m_fillPainters.find(text)) m_fillPainters[text]->draw(m_canvas, fill->svp, text, text); - if(strokeOk && m_strokePainters.tqfind(text)) + if(strokeOk && m_strokePainters.find(text)) m_strokePainters[text]->draw(m_canvas, stroke->svp, text, text); } fill = ++it1; @@ -1655,11 +1655,11 @@ void LibartText::renderCallback(SVGTextContentElementImpl *element, const SVGMat m_drawFillItems.append(fillElement); m_drawStrokeItems.append(strokeElement); - if(!m_fillPainters.tqfind(element) && element->isFilled()) + if(!m_fillPainters.find(element) && element->isFilled()) m_fillPainters.insert(element, new LibartFillPainter(element)); // Spec: A zero value causes no stroke to be painted. - if(!m_strokePainters.tqfind(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) + if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) m_strokePainters.insert(element, new LibartStrokePainter(element)); } } @@ -1734,7 +1734,7 @@ void LibartText::addTextDecoration(SVGTextContentElementImpl *element, double x, m_drawFillItems.append(fillElement); - if(!m_fillPainters.tqfind(element) && element->isFilled()) + if(!m_fillPainters.find(element) && element->isFilled()) m_fillPainters.insert(element, new LibartFillPainter(element)); art_svp_free(temp); @@ -1752,7 +1752,7 @@ void LibartText::addTextDecoration(SVGTextContentElementImpl *element, double x, m_drawStrokeItems.append(strokeElement); // Spec: A zero value causes no stroke to be painted. - if(!m_strokePainters.tqfind(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) + if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) m_strokePainters.insert(element, new LibartStrokePainter(element)); } art_free(vec); diff --git a/ksvg/scripts/check_hashtablesize.pl b/ksvg/scripts/check_hashtablesize.pl index b1fd103a..d22e3f30 100755 --- a/ksvg/scripts/check_hashtablesize.pl +++ b/ksvg/scripts/check_hashtablesize.pl @@ -88,9 +88,9 @@ my %counter2; my %counter3; # Read hashtable size -my $readSize1 = `tqfind -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep Function`; -my $readSize2 = `tqfind -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep -v Function`; -my $readSize3 = `tqfind -type f | xargs grep -I DontDelete | grep KSVG::`; +my $readSize1 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep Function`; +my $readSize2 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep -v Function`; +my $readSize3 = `find -type f | xargs grep -I DontDelete | grep KSVG::`; my @result1 = split(/.\//, $readSize1); my @result2 = split(/.\//, $readSize2); @@ -100,9 +100,9 @@ my @result3 = split(/.\//, $readSize3); # calcSize1 = print out all prototype hashtables # calcSize2 = print out all non-prototype hashtables # calcSize3 = print out all svg*constructors hashtables -my $calcSize1 = `tqfind -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Impl:: | grep -v Bridge::`; -my $calcSize2 = `tqfind -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Proto::`; -my $calcSize3 = `tqfind -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep Constructor`; +my $calcSize1 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Impl:: | grep -v Bridge::`; +my $calcSize2 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Proto::`; +my $calcSize3 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep Constructor`; # Bring in suitable form calcSize($calcSize1, \%counter1, 5); diff --git a/ksvg/scripts/generate.pl b/ksvg/scripts/generate.pl index 0ef0ddc6..a9419dcc 100755 --- a/ksvg/scripts/generate.pl +++ b/ksvg/scripts/generate.pl @@ -26,7 +26,7 @@ my %excludes = ( # List headers, and exclude the ones listed above my @headers = (); my $incdir=$here; -opendir (INCS, $incdir) or die "Couldn't tqfind $incdir"; +opendir (INCS, $incdir) or die "Couldn't find $incdir"; foreach $filename (readdir(INCS)) { $entry = $incdir."/".$filename; if ( ( -e $entry or -l $entry ) # A real file or a symlink |