From 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 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/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/components/csseditor/colorrequester.cpp | 4 +- quanta/components/csseditor/csseditor.cpp | 54 ++++----- quanta/components/csseditor/csseditor_globals.cpp | 4 +- quanta/components/csseditor/cssselector.cpp | 6 +- .../components/csseditor/cssshpropertyparser.cpp | 12 +- quanta/components/csseditor/fontfamilychooser.cpp | 8 +- quanta/components/csseditor/shorthandformer.cpp | 126 ++++++++++----------- quanta/components/csseditor/stylesheetparser.cpp | 22 ++-- .../debugger/conditionalbreakpointdialog.cpp | 2 +- quanta/components/debugger/dbgp/dbgpnetwork.cpp | 2 +- quanta/components/debugger/dbgp/dbgpsettings.cpp | 2 +- quanta/components/debugger/dbgp/qbytearrayfifo.cpp | 8 +- quanta/components/debugger/dbgp/qbytearrayfifo.h | 2 +- .../debugger/dbgp/quantadebuggerdbgp.cpp | 12 +- .../components/debugger/debuggerbreakpointlist.cpp | 8 +- .../components/debugger/debuggerbreakpointlist.h | 2 +- quanta/components/debugger/gubed/gubedsettings.cpp | 2 +- .../debugger/gubed/quantadebuggergubed.cpp | 62 +++++----- .../debugger/quantadebuggerinterface.cpp | 18 +-- quanta/components/framewizard/treenode.cpp | 2 +- quanta/components/framewizard/treenode.h | 2 +- .../components/framewizard/visualframeeditor.cpp | 38 +++---- quanta/components/tableeditor/tableeditor.cpp | 18 +-- 23 files changed, 208 insertions(+), 208 deletions(-) (limited to 'quanta/components') diff --git a/quanta/components/csseditor/colorrequester.cpp b/quanta/components/csseditor/colorrequester.cpp index fc4399bb..3dfd357b 100644 --- a/quanta/components/csseditor/colorrequester.cpp +++ b/quanta/components/csseditor/colorrequester.cpp @@ -93,7 +93,7 @@ KLineEdit * colorRequester::lineEdit() const{ void colorRequester::setInitialValue(/*const TQString& s*/){ TQString temp = d->edit->text(); temp.remove(" "); - if( temp.tqcontains("#") != 0){ + if( temp.contains("#") != 0){ temp.remove("#"); if(temp.length() == 3) { TQString temp2; @@ -113,7 +113,7 @@ void colorRequester::setInitialValue(/*const TQString& s*/){ } else - if( temp.tqcontains("rgb(") != 0){ + if( temp.contains("rgb(") != 0){ temp.remove("rgb(").remove(")"); TQStringList rgbValues = TQStringList::split(",",temp); // bool ok; diff --git a/quanta/components/csseditor/csseditor.cpp b/quanta/components/csseditor/csseditor.cpp index afe90315..07fc1815 100644 --- a/quanta/components/csseditor/csseditor.cpp +++ b/quanta/components/csseditor/csseditor.cpp @@ -136,19 +136,19 @@ void CSSEditor::buildListView(TQDomNodeList l, TQListView *lv){ } void CSSEditor::setCurrentPropOn(const TQString& s){ - if( (m_currentProp = static_cast(lvVisual->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvVisual->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvAll->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvAll->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvAural->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvAural->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvInteractive->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvInteractive->findItem( s,0 )) )) m_currentProp->setOn(true); else - if( (m_currentProp = static_cast(lvPaged->tqfindItem( s,0 )) )) + if( (m_currentProp = static_cast(lvPaged->findItem( s,0 )) )) m_currentProp->setOn(true); if( m_currentProp && m_currentProp->depth() ) { @@ -167,14 +167,14 @@ void CSSEditor::setCurrentPropOn(const TQString& s){ } void CSSEditor::setSidesOfPropertyBorderOn(const TQString& s){ - static_cast(lvVisual->tqfindItem( "border-top",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-right",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-bottom",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-left",0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-top-"+s,0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-right-"+s,0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-bottom-"+s,0 ))->setOn(true); - static_cast(lvVisual->tqfindItem( "border-left-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-top",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-right",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-bottom",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-left",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-top-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-right-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-bottom-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-left-"+s,0 ))->setOn(true); } void CSSEditor::hidePreviewer(){ @@ -266,7 +266,7 @@ void CSSEditor::initialize(){ const TQString propertyName((*it).section(":",0,0).stripWhiteSpace()); const TQString propertyValue((*it).section(":",1)); - if( ShorthandFormer::SHFormList().tqcontains(propertyName)==0 ) { + if( ShorthandFormer::SHFormList().contains(propertyName)==0 ) { temp+= propertyName + " : " + propertyValue +";\n\t"; addAndSetPropertyOn(propertyName,propertyValue); } @@ -323,12 +323,12 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ m_ps->setComboBox(); TQStringList values = TQStringList::split(",",curr.attribute("value")); m_ps->ComboBox()->insertStringList(values); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) - if( values.tqcontains(m_currentProp->text(0))) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) + if( values.contains(m_currentProp->text(0))) m_ps->ComboBox()->setCurrentText(m_properties[m_currentProp->text(0)]); if(curr.attribute("editable") == "yes"){ m_ps->ComboBox()->setEditable(true); - /*if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + /*if(m_properties.contains(m_currentProp->text(0)) !=0 ) m_ps->ComboBox()->setEditText(m_properties[m_currentProp->text(0)]); */ } } @@ -344,7 +344,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "number") m_ps->setLineEdit(); else if( valueTypeName == "integer") { - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) { + if(m_properties.contains(m_currentProp->text(0)) !=0 ) { if(!curr.attribute("minValue").isNull()) m_ps->setSpinBox(m_properties[m_currentProp->text(0)],curr.attribute("minValue")); else @@ -359,7 +359,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "length") { lengthEditor *editor = new lengthEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -367,7 +367,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ } else if( valueTypeName == "percentage") { - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ percentageEditor *editor = new percentageEditor(m_properties[m_currentProp->text(0)],m_ps); m_ps->installMiniEditor(editor); } @@ -380,7 +380,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "doubleLength") { doubleLengthEditor *editor = new doubleLengthEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), sx(temp.section(" ",0,0)), dx(temp.section(" ",1,1)); @@ -394,7 +394,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "doublePercentage") { doublePercentageEditor *editor = new doublePercentageEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), sx(temp.section(" ",0,0)), dx(temp.section(" ",1,1)); @@ -407,7 +407,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "frequency") { frequencyEditor *editor = new frequencyEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -416,7 +416,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "time") { timeEditor *editor = new timeEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -425,7 +425,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "angle") { angleEditor *editor = new angleEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) + if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else editor->setInitialValue(TQString()); @@ -454,7 +454,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ if( valueTypeName == "colors") { RGBcolorSlider *RGBeditor = new RGBcolorSlider(m_ps); colorRequester *CReditor = new colorRequester(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ CReditor->lineEdit()->setText(m_properties[m_currentProp->text(0)]); CReditor->setInitialValue(); @@ -474,7 +474,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){ else if( valueTypeName == "fontDialog" ){ fontEditor *editor = new fontEditor(m_ps); - if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){ + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ editor->setInitialValue(m_properties[m_currentProp->text(0)]); } else editor->setInitialValue(TQString()); diff --git a/quanta/components/csseditor/csseditor_globals.cpp b/quanta/components/csseditor/csseditor_globals.cpp index 3e9e1ca2..bd0eac48 100644 --- a/quanta/components/csseditor/csseditor_globals.cpp +++ b/quanta/components/csseditor/csseditor_globals.cpp @@ -34,12 +34,12 @@ void mySpinBox::checkSuffix(const TQString&){// check if the suffix is present a if(!suffix().isEmpty()){ const TQString suf(suffix()); TQString t(editor()->text()); - if( t.tqcontains(suf) ==0 ) { + if( t.contains(suf) ==0 ) { editor()->setText( t + suf); editor()->setCursorPosition(editor()->cursorPosition() - 1); } else - if( t.tqcontains(suf) >1 ) { + if( t.contains(suf) >1 ) { editor()->setText( t.remove(suf) + suf); editor()->setCursorPosition(editor()->cursorPosition() - 1); } diff --git a/quanta/components/csseditor/cssselector.cpp b/quanta/components/csseditor/cssselector.cpp index 2598336c..316a8db4 100644 --- a/quanta/components/csseditor/cssselector.cpp +++ b/quanta/components/csseditor/cssselector.cpp @@ -324,15 +324,15 @@ void CSSSelector::loadCSSContent(const TQString& s){ for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) { if(!it.key().startsWith("@rule") && !it.key().startsWith("/*")){ TQListViewItem *item; - if(it.key().tqcontains(":")){ + if(it.key().contains(":")){ item = new TQListViewItem(lvPseudo); } else - if(it.key().tqcontains("#")){ + if(it.key().contains("#")){ item = new TQListViewItem(lvIDs); } else - if(it.key().tqcontains(".")){ + if(it.key().contains(".")){ item = new TQListViewItem(lvClasses); } else { diff --git a/quanta/components/csseditor/cssshpropertyparser.cpp b/quanta/components/csseditor/cssshpropertyparser.cpp index b523a1b4..d117b5f5 100644 --- a/quanta/components/csseditor/cssshpropertyparser.cpp +++ b/quanta/components/csseditor/cssshpropertyparser.cpp @@ -61,7 +61,7 @@ TQString CSSSHPropertyParser::extractQuotedStringList(){ unsigned int i=0; while(!stop && iinsertItem( m_currentSelectedFont ); switch(m_fontOrigin) { - case available: lbAvailable->removeItem(lbAvailable->index(lbAvailable->tqfindItem(m_currentSelectedFont))); + case available: lbAvailable->removeItem(lbAvailable->index(lbAvailable->findItem(m_currentSelectedFont))); break; - case generic : lbGeneric->removeItem(lbGeneric->index(lbGeneric->tqfindItem(m_currentSelectedFont))); + case generic : lbGeneric->removeItem(lbGeneric->index(lbGeneric->findItem(m_currentSelectedFont))); break; } } @@ -156,7 +156,7 @@ TQStringList fontFamilyChooser::fontList(){ TQStringList list; TQListBoxItem *item = lbSelected->firstItem(); while( item != 0 ){ - if( item->text().tqcontains( TQRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); + if( item->text().contains( TQRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); else list.append( item->text() ); item = item->next(); } diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp index 4843986c..95b06d99 100644 --- a/quanta/components/csseditor/shorthandformer.cpp +++ b/quanta/components/csseditor/shorthandformer.cpp @@ -52,167 +52,167 @@ static const TQStringList backgroundRepeatValueList = TQStringList::split(",",ba ShorthandFormer::ShorthandFormer( TQMap m){ m_properties = m; - if(m_properties.tqcontains("cue-after")){ + if(m_properties.contains("cue-after")){ cue_after= m_properties["cue-after"]; m_properties.remove("cue-after"); } - if(m_properties.tqcontains("cue-before")){ + if(m_properties.contains("cue-before")){ cue_before = m_properties["cue-before"]; m_properties.remove("cue-before"); } - if(m_properties.tqcontains("pause-before")){ + if(m_properties.contains("pause-before")){ pause_before= m_properties["pause-before"]; m_properties.remove("pause-before"); } - if(m_properties.tqcontains("pause-after")){ + if(m_properties.contains("pause-after")){ pause_after = m_properties["pause-after"]; m_properties.remove("pause-after"); } - if(m_properties.tqcontains("background-color")){ + if(m_properties.contains("background-color")){ background_color = m_properties["background-color"]; m_properties.remove("background-color"); } - if(m_properties.tqcontains("background-image")){ + if(m_properties.contains("background-image")){ background_image = m_properties["background-image"]; m_properties.remove("background-image"); } - if(m_properties.tqcontains("background-repeat")){ + if(m_properties.contains("background-repeat")){ background_repeat = m_properties["background-repeat"]; m_properties.remove("background-repeat"); } - if(m_properties.tqcontains("background-attachment")){ + if(m_properties.contains("background-attachment")){ background_attachment = m_properties["background-attachment"]; m_properties.remove("background-attachment"); } - if(m_properties.tqcontains("background-position")){ + if(m_properties.contains("background-position")){ background_position = m_properties["background-position"]; m_properties.remove("background-position"); } - if(m_properties.tqcontains("border-top-style")){ + if(m_properties.contains("border-top-style")){ border_top_style = m_properties["border-top-style"]; m_properties.remove("border-top-style"); } - if(m_properties.tqcontains("border-top-color")){ + if(m_properties.contains("border-top-color")){ border_top_color = m_properties["border-top-color"]; m_properties.remove("border-top-color"); } - if(m_properties.tqcontains("border-top-width")){ + if(m_properties.contains("border-top-width")){ border_top_width = m_properties["border-top-width"]; m_properties.remove("border-top-width"); } - if(m_properties.tqcontains("border-left-style")){ + if(m_properties.contains("border-left-style")){ border_left_style = m_properties["border-left-style"]; m_properties.remove("border-left-style"); } - if(m_properties.tqcontains("border-left-color")){ + if(m_properties.contains("border-left-color")){ border_left_color = m_properties["border-left-color"]; m_properties.remove("border-left-color"); } - if(m_properties.tqcontains("border-left-width")){ + if(m_properties.contains("border-left-width")){ border_left_width = m_properties["border-left-width"]; m_properties.remove("border-left-width"); } - if(m_properties.tqcontains("border-right-style")){ + if(m_properties.contains("border-right-style")){ border_right_style = m_properties["border-right-style"]; m_properties.remove("border-right-style"); } - if(m_properties.tqcontains("border-right-color")){ + if(m_properties.contains("border-right-color")){ border_right_color = m_properties["border-right-color"]; m_properties.remove("border-right-color"); } - if(m_properties.tqcontains("border-right-width")){ + if(m_properties.contains("border-right-width")){ border_right_width= m_properties["border-right-width"]; m_properties.remove("border-right-width"); } - if(m_properties.tqcontains("border-bottom-style")){ + if(m_properties.contains("border-bottom-style")){ border_bottom_style = m_properties["border-bottom-style"]; m_properties.remove("border-bottom-style"); } - if(m_properties.tqcontains("border-bottom-color")){ + if(m_properties.contains("border-bottom-color")){ border_bottom_color = m_properties["border-bottom-color"]; m_properties.remove("border-bottom-color"); } - if(m_properties.tqcontains("border-bottom-width")){ + if(m_properties.contains("border-bottom-width")){ border_bottom_width = m_properties["border-bottom-width"]; m_properties.remove("border-bottom-width"); } - if(m_properties.tqcontains("outline-style")){ + if(m_properties.contains("outline-style")){ outline_style = m_properties["outline-style"]; m_properties.remove("outline-style"); } - if(m_properties.tqcontains("outline-color")){ + if(m_properties.contains("outline-color")){ outline_color = m_properties["outline-color"]; m_properties.remove("outline-color"); } - if(m_properties.tqcontains("outline-width")){ + if(m_properties.contains("outline-width")){ outline_width = m_properties["outline-width"]; m_properties.remove("outline-width"); } - if(m_properties.tqcontains("list-style-type")){ + if(m_properties.contains("list-style-type")){ list_style_type= m_properties["list-style-type"]; m_properties.remove("list-style-type"); } - if(m_properties.tqcontains("list-style-image")){ + if(m_properties.contains("list-style-image")){ list_style_image = m_properties["list-style-image"]; m_properties.remove("list-style-image"); } - if(m_properties.tqcontains("list-style-position")){ + if(m_properties.contains("list-style-position")){ list_style_position = m_properties["list-style-position"]; m_properties.remove("list-style-position"); } - if(m_properties.tqcontains("font-style")){ + if(m_properties.contains("font-style")){ font_style = m_properties["font-style"]; m_properties.remove("font-style"); } - if(m_properties.tqcontains("font-variant")){ + if(m_properties.contains("font-variant")){ font_variant = m_properties["font-variant"]; m_properties.remove("font-variant"); } - if(m_properties.tqcontains("font-weight")){ + if(m_properties.contains("font-weight")){ font_weight = m_properties["font-weight"]; m_properties.remove("font-weight"); } - if(m_properties.tqcontains("font-size")){ + if(m_properties.contains("font-size")){ font_size = m_properties["font-size"]; m_properties.remove("font-size"); } - if(m_properties.tqcontains("line-height")){ + if(m_properties.contains("line-height")){ line_height= m_properties["line-height"]; m_properties.remove("line-height"); } - if(m_properties.tqcontains("font-family")){ + if(m_properties.contains("font-family")){ font_family = m_properties["font-family"]; m_properties.remove("font-family"); } - if(m_properties.tqcontains("margin-top")){ + if(m_properties.contains("margin-top")){ margin_top = m_properties["margin-top"]; m_properties.remove("margin-top"); } - if(m_properties.tqcontains("margin-bottom")){ + if(m_properties.contains("margin-bottom")){ margin_bottom = m_properties["margin-bottom"]; m_properties.remove("margin-bottom"); } - if(m_properties.tqcontains("margin-left")){ + if(m_properties.contains("margin-left")){ margin_left = m_properties["margin-left"]; m_properties.remove("margin-left"); } - if(m_properties.tqcontains("margin-right")){ + if(m_properties.contains("margin-right")){ margin_right = m_properties["margin-right"]; m_properties.remove("margin-right"); } - if(m_properties.tqcontains("padding-top")){ + if(m_properties.contains("padding-top")){ padding_top = m_properties["padding-top"]; m_properties.remove("padding-top"); } - if(m_properties.tqcontains("padding-bottom")){ + if(m_properties.contains("padding-bottom")){ padding_bottom = m_properties["padding-bottom"]; m_properties.remove("padding-bottom"); } - if(m_properties.tqcontains("padding-left")){ + if(m_properties.contains("padding-left")){ padding_left = m_properties["padding-left"]; m_properties.remove("padding-left"); } - if(m_properties.tqcontains("padding-right")){ + if(m_properties.contains("padding-right")){ padding_right = m_properties["padding-right"]; m_properties.remove("padding-right"); } @@ -517,11 +517,11 @@ TQMap ShorthandFormer::expandBackgroundProp(const TQStringLi while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( (*it).tqcontains("url(") || temp == "none" || temp == "inherit" ){ + if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){ expandedProps["background-image"] = (*it); } else - if( backgroundRepeatValueList.tqcontains(temp)!=0 ) { + if( backgroundRepeatValueList.contains(temp)!=0 ) { expandedProps["background-repeat"] = (*it); } else @@ -529,12 +529,12 @@ TQMap ShorthandFormer::expandBackgroundProp(const TQStringLi expandedProps["background-attachment"] = (*it); } else - if( (*it).tqcontains("rgb(") || (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit" ){ + if( (*it).contains("rgb(") || (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit" ){ expandedProps["background-color"] = (*it); } else - if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).tqcontains(globalPercentagePattern) || (*it).tqcontains(globalLengthPattern) || temp == "inherit"){ - if( expandedProps.tqcontains("background-position") ) + if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).contains(globalPercentagePattern) || (*it).contains(globalLengthPattern) || temp == "inherit"){ + if( expandedProps.contains("background-position") ) expandedProps["background-position"] = ( expandedProps["background-position"] + " " + (*it) ); else expandedProps["background-position"] = (*it); @@ -590,7 +590,7 @@ TQMap ShorthandFormer::expandFontProp(const TQStringList& l) fontPseudoSHFormValues.append("message-box"); fontPseudoSHFormValues.append("small-caption"); fontPseudoSHFormValues.append("status-bar"); - if( l.count()==1 && fontPseudoSHFormValues.tqcontains(l[0]) != 0) { + if( l.count()==1 && fontPseudoSHFormValues.contains(l[0]) != 0) { expandedProps["font"] = l[0]; return expandedProps; } @@ -599,18 +599,18 @@ TQMap ShorthandFormer::expandFontProp(const TQStringList& l) while ( it != l.end() ) { TQString currentIt = (*it); TQString temp(currentIt.stripWhiteSpace()); - if( fontStyleValueList.tqcontains(temp)!=0 ) expandedProps["font-style"] = (*it); + if( fontStyleValueList.contains(temp)!=0 ) expandedProps["font-style"] = (*it); else - if( fontVariantValueList.tqcontains(temp)!=0 ) expandedProps["font-variant"] = currentIt ; + if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ; else - if( fontWeightValueList.tqcontains(temp)!=0) expandedProps["font-weight"] = currentIt; + if( fontWeightValueList.contains(temp)!=0) expandedProps["font-weight"] = currentIt; else - if( (fontSizeValueList.tqcontains(temp)!=0 || currentIt.tqcontains(globalPercentagePattern)!=0 || currentIt.tqcontains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() ) + if( (fontSizeValueList.contains(temp)!=0 || currentIt.contains(globalPercentagePattern)!=0 || currentIt.contains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() ) { expandedProps["font-size"] = currentIt; } else - if( currentIt.tqcontains(percentagePattern)!=0 || currentIt.tqcontains(numberPattern)!=0 || currentIt.tqcontains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" ) + if( currentIt.contains(percentagePattern)!=0 || currentIt.contains(numberPattern)!=0 || currentIt.contains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" ) { expandedProps["line-height"] = (currentIt.remove('/')); } @@ -640,7 +640,7 @@ TQMap ShorthandFormer::expandListstyleProp( const TQStringLis TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( listTypeValueList.tqcontains(temp)!=0) { + if( listTypeValueList.contains(temp)!=0) { expandedProps["list-style-type"] = (*it) ; } else @@ -648,7 +648,7 @@ TQMap ShorthandFormer::expandListstyleProp( const TQStringLis expandedProps["list-style-position"] = (*it); } else - if( (*it).tqcontains("url(") || temp == "none" || temp == "inherit" ) + if( (*it).contains("url(") || temp == "none" || temp == "inherit" ) expandedProps["list-style-image"] = (*it); ++it; @@ -661,12 +661,12 @@ TQMap ShorthandFormer::expandOutlineProp( const TQStringList TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps["outline-style"] = (*it); + if( borderStyleValueList.contains(temp)!=0 ) expandedProps["outline-style"] = (*it); else - if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "invert" || temp == "inherit") + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "invert" || temp == "inherit") expandedProps["outline-color"] = (*it) ; else - if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0) + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0) expandedProps["outline-width"] = (*it); ++it; } @@ -679,12 +679,12 @@ TQMap ShorthandFormer::expandBoxSide(const TQString& subProp TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( borderStyleValueList.tqcontains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it); + if( borderStyleValueList.contains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it); else - if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit") + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit") expandedProps[subPropName + "-color"] = (*it) ; else - if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0) + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0) expandedProps[subPropName + "-width"] = (*it); ++it; } @@ -696,21 +696,21 @@ TQMap ShorthandFormer::expandBorderProp(const TQStringList& TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { TQString temp((*it).stripWhiteSpace()); - if( borderStyleValueList.tqcontains(temp)!=0 ){ + if( borderStyleValueList.contains(temp)!=0 ){ expandedProps["border-top-style"] = (*it); expandedProps["border-left-style"] = (*it); expandedProps["border-right-style"] = (*it); expandedProps["border-bottom-style"] = (*it); } else - if( (*it).tqcontains(globalColorPattern) || CSSEditorGlobals::HTMLColors.tqcontains((*it))!=0 || temp == "transparent" || temp == "inherit"){ + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit"){ expandedProps["border-top-color"] = (*it); expandedProps["border-left-color"] = (*it); expandedProps["border-right-color"] = (*it); expandedProps["border-bottom-color"] = (*it); } else - if( (*it).tqcontains(globalLengthPattern) || widthValueList.tqcontains(temp)!=0){ + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0){ expandedProps["border-top-width"] = (*it); expandedProps["border-left-width"] = (*it); expandedProps["border-right-width"] = (*it); diff --git a/quanta/components/csseditor/stylesheetparser.cpp b/quanta/components/csseditor/stylesheetparser.cpp index 06e7600a..0a573925 100644 --- a/quanta/components/csseditor/stylesheetparser.cpp +++ b/quanta/components/csseditor/stylesheetparser.cpp @@ -151,21 +151,21 @@ void stylesheetParser::parseSelector(){ int closingParentheses = 1, openingParentheses = 0; while(true){ - openingParentheses = numberOfParenthesisInAParenthesisBlock(closed,m_styleSheet.left(closingParenthesisPos+1)); //m_styleSheet.left(closingParenthesisPos+1).tqcontains("{"); + openingParentheses = numberOfParenthesisInAParenthesisBlock(closed,m_styleSheet.left(closingParenthesisPos+1)); //m_styleSheet.left(closingParenthesisPos+1).contains("{"); if(openingParentheses==closingParentheses){ - TQString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.tqfind("{")*/).stripWhiteSpace(), - selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.tqfind("{")*/+1, closingParenthesisPos - m_styleSheet.tqfind("{") -1); + TQString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(), + selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/+1, closingParenthesisPos - m_styleSheet.find("{") -1); selectorName.remove("\n").remove("\t"); selectorValue.remove("\n").remove("\t"); TQPair tmp(selectorValue,++m_orderNumber); - if (m_stylesheetStructure.tqcontains(selectorName)) + if (m_stylesheetStructure.contains(selectorName)) { uint i = 2; TQString s = selectorName + TQString("-v%1").tqarg(i); - while (m_stylesheetStructure.tqcontains(s)) + while (m_stylesheetStructure.contains(s)) { i++; s = selectorName + TQString("-v%1").tqarg(i); @@ -176,7 +176,7 @@ void stylesheetParser::parseSelector(){ break; } else { - closingParenthesisPos = findParanthesis(m_styleSheet, '{',closingParenthesisPos+1)/*m_styleSheet.tqfind("}",closingParenthesisPos+1)*/; + closingParenthesisPos = findParanthesis(m_styleSheet, '{',closingParenthesisPos+1)/*m_styleSheet.find("}",closingParenthesisPos+1)*/; closingParentheses++; } } @@ -188,13 +188,13 @@ void stylesheetParser::parseSelector(){ void stylesheetParser::parseAtRules1(){ //TODO this needs to be fixed : in case the at rule is not properly closed the parser hangs - if(m_styleSheet.tqfind("{") == -1) { + if(m_styleSheet.find("{") == -1) { m_stopProcessing = true; emit errorOccurred(m_styleSheet.mid(0,20) + "...\n " + msg2); return; } - int closingParenthesisPos = m_styleSheet.tqfind("}"), + int closingParenthesisPos = m_styleSheet.find("}"), closingParentheses = 0; if(closingParenthesisPos==-1) return; @@ -202,12 +202,12 @@ void stylesheetParser::parseAtRules1(){ int openingParentheses=0; while(true){ - openingParentheses = m_styleSheet.left(closingParenthesisPos+1).tqcontains("{"); + openingParentheses = m_styleSheet.left(closingParenthesisPos+1).contains("{"); if(openingParentheses==closingParentheses) break; else { - closingParenthesisPos = m_styleSheet.tqfind("}",closingParenthesisPos+1); + closingParenthesisPos = m_styleSheet.find("}",closingParenthesisPos+1); if( closingParenthesisPos!= -1 ) closingParentheses++; else { @@ -227,7 +227,7 @@ void stylesheetParser::parseAtRules1(){ void stylesheetParser::parseAtRules2(){ //TODO this needs to be fixed : in case the at rule is not properly closed the parser hangs - int semicolonPos = m_styleSheet.tqfind(";"); + int semicolonPos = m_styleSheet.find(";"); if(semicolonPos==-1) { m_stopProcessing = true; diff --git a/quanta/components/debugger/conditionalbreakpointdialog.cpp b/quanta/components/debugger/conditionalbreakpointdialog.cpp index 9dfeb5a6..055512da 100644 --- a/quanta/components/debugger/conditionalbreakpointdialog.cpp +++ b/quanta/components/debugger/conditionalbreakpointdialog.cpp @@ -56,7 +56,7 @@ ConditionalBreakpointDialog::~ConditionalBreakpointDialog() void ConditionalBreakpointDialog::slotExpressionChanged() { - if(comboExpression->currentText().tqfind( TQRegExp("[^=!]=[^=]"), 0 ) >= 0) + if(comboExpression->currentText().find( TQRegExp("[^=!]=[^=]"), 0 ) >= 0) ledWarning->on(); else ledWarning->off(); diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.cpp b/quanta/components/debugger/dbgp/dbgpnetwork.cpp index d5ce7b86..584e71f0 100644 --- a/quanta/components/debugger/dbgp/dbgpnetwork.cpp +++ b/quanta/components/debugger/dbgp/dbgpnetwork.cpp @@ -262,7 +262,7 @@ void DBGpNetwork::slotReadyRead() // If datalen == -1, we didnt read the size yet, otherwise we're reading data. if(m_datalen == -1) { - bytes = m_fifo.tqfind('\0'); + bytes = m_fifo.find('\0'); if(bytes < 0) break; diff --git a/quanta/components/debugger/dbgp/dbgpsettings.cpp b/quanta/components/debugger/dbgp/dbgpsettings.cpp index c76e00c2..e9bbc249 100644 --- a/quanta/components/debugger/dbgp/dbgpsettings.cpp +++ b/quanta/components/debugger/dbgp/dbgpsettings.cpp @@ -23,7 +23,7 @@ DBGpSettings::DBGpSettings(const TQString &protocolversion) : DBGpSettingsS(0, "DBGpSettings", false, 0) { - textAbout->setText(textAbout->text().tqreplace("%PROTOCOLVERSION%", protocolversion)); + textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); connect(checkLocalProject, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotLocalProjectToggle(bool))); } diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp index 6a52ac39..578fedb9 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp @@ -38,7 +38,7 @@ TQString TQByteArrayFifo::retrieve( ) for(size_t cnt = 0; cnt < m_size; cnt++) m_array[cnt] = m_array[cnt + size]; - // Resize array, needed for tqfind() to work + // Resize array, needed for find() to work m_array.resize(m_size); return str; @@ -60,13 +60,13 @@ bool TQByteArrayFifo::append(const char * chars, size_t size ) return true; } -long TQByteArrayFifo::tqfind( char character ) +long TQByteArrayFifo::find( char character ) { - // If size is 0, tqfind() outputs a warning for some reason + // If size is 0, find() outputs a warning for some reason if(m_size == 0) return -1; - return m_array.tqfind(character); + return m_array.find(character); } TQString TQByteArrayFifo::base64Encoded() diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.h b/quanta/components/debugger/dbgp/qbytearrayfifo.h index 2f46df76..9672c619 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.h +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.h @@ -31,7 +31,7 @@ class TQByteArrayFifo bool append(const char * chars, size_t size); TQString retrieve(); TQString base64Encoded(); - long tqfind(char character); + long find(char character); size_t length() { return m_size; } private: diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp index ac3793bd..44071116 100644 --- a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp @@ -384,7 +384,7 @@ void QuantaDebuggerDBGp::stackShow(const TQDomNode&node) // Type isnt currently correct with xdebug // type = (attribute(child, "type") == "file" ? File : Eval); typestr = attribute(child, "filename"); - if(typestr.tqfind(TQRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) + if(typestr.find(TQRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) type = Eval; else type = File; @@ -573,15 +573,15 @@ void QuantaDebuggerDBGp::fileOpened(const TQString&) // Watch a variable void QuantaDebuggerDBGp::addWatch(const TQString & variable) { - if(m_watchlist.tqfind(variable) == m_watchlist.end()) + if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); m_network.sendCommand("property_get", "-n " + variable); } // Remove watch void QuantaDebuggerDBGp::removeWatch(DebuggerVariable *variable) { - if(m_watchlist.tqfind(variable->name()) != m_watchlist.end()) - m_watchlist.remove(m_watchlist.tqfind(variable->name())); + if(m_watchlist.find(variable->name()) != m_watchlist.end()) + m_watchlist.remove(m_watchlist.find(variable->name())); } // Show conditional breakpoint state @@ -850,8 +850,8 @@ void QuantaDebuggerDBGp::profilerOpen() void QuantaDebuggerDBGp::profilerOpen(bool forceopen) { TQString profileroutput = m_profilerFilename; - profileroutput.tqreplace("%a", m_appid); - profileroutput.tqreplace("%c", m_initialscript); + profileroutput.replace("%a", m_appid); + profileroutput.replace("%c", m_initialscript); if(m_profilerMapFilename) profileroutput = mapServerPathToLocal( profileroutput); diff --git a/quanta/components/debugger/debuggerbreakpointlist.cpp b/quanta/components/debugger/debuggerbreakpointlist.cpp index 2d18309f..6a47d296 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.cpp +++ b/quanta/components/debugger/debuggerbreakpointlist.cpp @@ -50,7 +50,7 @@ void DebuggerBreakpointList::add(DebuggerBreakpoint* bp) void DebuggerBreakpointList::remove(DebuggerBreakpoint* bp) { - BreakpointList_t::iterator it = tqfind(*bp); + BreakpointList_t::iterator it = find(*bp); if(it == m_breakpointList->end()) return; @@ -113,7 +113,7 @@ void DebuggerBreakpointList::clear() bool DebuggerBreakpointList::exists(DebuggerBreakpoint* bp) { - BreakpointList_t::iterator it = tqfind(*bp); + BreakpointList_t::iterator it = find(*bp); if(it == m_breakpointList->end()) return false; @@ -124,7 +124,7 @@ bool DebuggerBreakpointList::exists(DebuggerBreakpoint* bp) } -BreakpointList_t::iterator DebuggerBreakpointList::tqfind(const DebuggerBreakpoint &bp) +BreakpointList_t::iterator DebuggerBreakpointList::find(const DebuggerBreakpoint &bp) { BreakpointList_t::iterator it; @@ -180,7 +180,7 @@ void DebuggerBreakpointList::updateBreakpointKey( const DebuggerBreakpoint & bp, { //DebuggerBreakpoint *bpp = new DebuggerBreakpoint(bp); BreakpointList_t::iterator it; - it = tqfind(bp); + it = find(bp); if(it != m_breakpointList->end()) { (*it)->setKey(newkey); diff --git a/quanta/components/debugger/debuggerbreakpointlist.h b/quanta/components/debugger/debuggerbreakpointlist.h index ef9233bc..aa6cd803 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.h +++ b/quanta/components/debugger/debuggerbreakpointlist.h @@ -31,7 +31,7 @@ class DebuggerBreakpointList private: BreakpointList_t* m_breakpointList; BreakpointList_t::iterator m_current; - BreakpointList_t::iterator tqfind(const DebuggerBreakpoint &bp); + BreakpointList_t::iterator find(const DebuggerBreakpoint &bp); public: DebuggerBreakpointList(); diff --git a/quanta/components/debugger/gubed/gubedsettings.cpp b/quanta/components/debugger/gubed/gubedsettings.cpp index b6df9b25..9464dc81 100644 --- a/quanta/components/debugger/gubed/gubedsettings.cpp +++ b/quanta/components/debugger/gubed/gubedsettings.cpp @@ -22,7 +22,7 @@ GubedSettings::GubedSettings(const TQString &protocolversion) : GubedSettingsS(0, "GubedSettings", false, 0) { - textAbout->setText(textAbout->text().tqreplace("%PROTOCOLVERSION%", protocolversion)); + textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); } GubedSettings::~GubedSettings() diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.cpp b/quanta/components/debugger/gubed/quantadebuggergubed.cpp index e14ca894..7b84380d 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.cpp +++ b/quanta/components/debugger/gubed/quantadebuggergubed.cpp @@ -383,13 +383,13 @@ void QuantaDebuggerGubed::slotReadyRead() // If datalen == -1, we didnt read the command yet, otherwise were reading data. if(m_datalen == -1) { - bytes = m_buffer.tqfind(";"); + bytes = m_buffer.find(";"); if(bytes < 0) break; data = m_buffer.left(bytes); m_buffer.remove(0, bytes + 1); - bytes = data.tqfind(":"); + bytes = data.find(":"); m_command = data.left(bytes); data.remove(0, bytes + 1); m_datalen = data.toLong(); @@ -445,7 +445,7 @@ void QuantaDebuggerGubed::processCommand(const TQString& datas) long argcnt = args["args"].toLong(); TQString msg = i18n(args["message"].ascii()); // How will we get these messages throught to the translators? for(int cnt = 1; cnt <= argcnt; cnt++) - msg.tqreplace("%" + TQString("%1").tqarg(cnt) + "%", args[TQString("arg%1").tqarg(cnt)]); + msg.replace("%" + TQString("%1").tqarg(cnt) + "%", args[TQString("arg%1").tqarg(cnt)]); debuggerInterface()->showtqStatus(msg, false); } @@ -768,15 +768,15 @@ void QuantaDebuggerGubed::fileOpened(const TQString&) // Watch a variable void QuantaDebuggerGubed::addWatch(const TQString &variable) { - if(m_watchlist.tqfind(variable) == m_watchlist.end()) + if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); sendCommand("getwatch", "variable", variable.ascii(), (char*)0L); } // Remove watch void QuantaDebuggerGubed::removeWatch(DebuggerVariable *variable) { - if(m_watchlist.tqfind(variable->name()) != m_watchlist.end()) - m_watchlist.remove(m_watchlist.tqfind(variable->name())); + if(m_watchlist.find(variable->name()) != m_watchlist.end()) + m_watchlist.remove(m_watchlist.find(variable->name())); //sendCommand("unwatchvariable", var->name()); } @@ -1038,13 +1038,13 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) return ca; } - cnt = args.mid(2, args.tqfind("{") - 3).toLong(); - TQString data = args.mid(args.tqfind("{") + 1); + cnt = args.mid(2, args.find("{") - 3).toLong(); + TQString data = args.mid(args.find("{") + 1); TQString tmp, func; while(cnt > 0) { - tmp = data.left(data.tqfind("\"")); + tmp = data.left(data.find("\"")); length = tmp.mid(2, tmp.length() - 3).toLong(); func = data.mid(tmp.length() + 1, length); @@ -1053,8 +1053,8 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) if(data.left(1) == "i") { // Integer data - tmp = data.mid(data.tqfind(":") + 1); - tmp = tmp.left(tmp.tqfind(";")); + tmp = data.mid(data.find(":") + 1); + tmp = tmp.left(tmp.find(";")); ca[func] = tmp; data = data.mid(tmp.length() + 3); // kdDebug(24002) << k_funcinfo << "**i " << func << ": " << ca[func] << endl; @@ -1062,7 +1062,7 @@ StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) else { // String data - tmp = data.left(data.tqfind("\"")); + tmp = data.left(data.find("\"")); length = tmp.mid(2, tmp.length() - 3).toLong(); ca[func] = data.mid(tmp.length() + 1, length); @@ -1098,8 +1098,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) if(type == "s") { // Get length of key - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 1); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 1); length = tempstring.toUInt(); key = str.left(length + 1); @@ -1108,8 +1108,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) } else if(type == "i") { - key = str.left(str.tqfind(';')); - str.remove(0, str.tqfind(';') + 1); + key = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); } @@ -1122,8 +1122,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:4:"$row";i:6; */ - data = str.left(str.tqfind(';')); - str.remove(0, str.tqfind(';') + 1); + data = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Integer); } @@ -1132,9 +1132,9 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:8:"$boolvar";b:1; */ - data = str.left(str.tqfind(';')); + data = str.left(str.find(';')); data = (data == "0" ? i18n("False"): i18n("True")); - str.remove(0, str.tqfind(';') + 1); + str.remove(0, str.find(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Boolean); } else if(type == "N") @@ -1151,8 +1151,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of string - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 1); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 1); length = tempstring.toUInt(); data = str.left(length + 1); @@ -1168,8 +1168,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of array - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 2); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 2); length = tempstring.toUInt(); TQPtrList vars ; @@ -1193,13 +1193,13 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) */ // Get length of array - tempstring = str.left(str.tqfind(':')); - str.remove(0, str.tqfind(':') + 2); - tempstring = str.mid(str.tqfind(':') + 1); - tempstring = tempstring.left(tempstring.tqfind(':')); + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 2); + tempstring = str.mid(str.find(':') + 1); + tempstring = tempstring.left(tempstring.find(':')); length = tempstring.toUInt(); - str.remove(0, str.tqfind('{') + 1); + str.remove(0, str.find('{') + 1); TQPtrList vars ; while(length > 0) @@ -1220,8 +1220,8 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) /* Example: s:9:"$floatvar";d:12.5600000000000004973799150320701301097869873046875;" */ - data = str.left(str.tqfind(';')); - str.remove(0, str.tqfind(';') + 1); + data = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Float); } diff --git a/quanta/components/debugger/quantadebuggerinterface.cpp b/quanta/components/debugger/quantadebuggerinterface.cpp index be930d17..83eb582c 100644 --- a/quanta/components/debugger/quantadebuggerinterface.cpp +++ b/quanta/components/debugger/quantadebuggerinterface.cpp @@ -86,20 +86,20 @@ const TQString QuantaDebuggerInterface::activeFileParts(const TQString & str) // n/d/p = name/dir/path // Filename, filedir and filepath - newstr.tqreplace("%afn", ViewManager::ref()->activeDocument()->url().fileName()); - newstr.tqreplace("%afd", ViewManager::ref()->activeDocument()->url().directory()); - newstr.tqreplace("%afp", ViewManager::ref()->activeDocument()->url().path()); + newstr.replace("%afn", ViewManager::ref()->activeDocument()->url().fileName()); + newstr.replace("%afd", ViewManager::ref()->activeDocument()->url().directory()); + newstr.replace("%afp", ViewManager::ref()->activeDocument()->url().path()); // filedir and filepath relative to project root - newstr.tqreplace("%rfpp", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().path())); - newstr.tqreplace("%rfpd", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().directory())); + newstr.replace("%rfpp", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().path())); + newstr.replace("%rfpd", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().directory())); // filedir and filepath relative to document root - newstr.tqreplace("%rfdp", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().path())); - newstr.tqreplace("%rfdd", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().directory())); + newstr.replace("%rfdp", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().path())); + newstr.replace("%rfdd", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().directory())); - newstr.tqreplace("%apd", Project::ref()->projectBaseURL().path()); - newstr.tqreplace("%add", Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory()); + newstr.replace("%apd", Project::ref()->projectBaseURL().path()); + newstr.replace("%add", Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory()); kdDebug(24002) << k_funcinfo << ", BaseURL " << Project::ref()->projectBaseURL().path() << ", active doc : " << ViewManager::ref()->activeDocument()->url().path() << ", documentFolderForURL" << Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()) << ", newstr" << newstr << endl; diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp index ecf42bf8..592d33d5 100644 --- a/quanta/components/framewizard/treenode.cpp +++ b/quanta/components/framewizard/treenode.cpp @@ -98,7 +98,7 @@ void tree::refreshGeometries(treeNode *n){ treeNode* tree::findNode(const TQString &l){ if(l==m_root->label()) return m_root; - return m_nodeList.tqfind(l); + return m_nodeList.find(l); } TQString tree::addChildNode(const TQString &l){ diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h index a1d568a6..428a381f 100644 --- a/quanta/components/framewizard/treenode.h +++ b/quanta/components/framewizard/treenode.h @@ -46,7 +46,7 @@ class treeNode { void setLabel(const TQString &l) { m_label = l; } void removeChildren() { m_tqchildrenList.clear(); } void setParentLabel(const TQString &s){ m_parentLabel = s;} - int childPosition(treeNode* n){ return m_tqchildrenList.tqfind(n); } + int childPosition(treeNode* n){ return m_tqchildrenList.find(n); } bool insertChild(unsigned int pos, treeNode* n) { return m_tqchildrenList.insert( pos, n); } TQString label() const { return m_label; } TQString parentLabel() const { return m_parentLabel; } diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp index 3795a3ce..215bdf63 100644 --- a/quanta/components/framewizard/visualframeeditor.cpp +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -109,9 +109,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ // then every asterisk must be assigned a percentage of 10% so the real percentage // notation is cols="40%,50%,10%" for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if(!(*it).tqcontains("%") && !(*it).tqcontains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; - if((*it).tqcontains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); - if((*it).tqcontains("*")) { + if(!(*it).contains("%") && !(*it).contains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; + if((*it).contains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); + if((*it).contains("*")) { int weight= (*it).section("*",0,0).toInt(); if( weight==0 ) weight=1; weightAsteriskCounter += weight; @@ -125,7 +125,7 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ // a quelli effettivamente generati dal metodo build che opera un'altra normalizzazione. // In genere la differenza �dell' 1% for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if((*it).tqcontains("*")){ + if((*it).contains("*")){ int weight= (*it).section("*",0,0).toInt(); if(weight==0) weight=1; int newPercentage = weight*leftPercentageDistributedAmongAsterisks; @@ -138,9 +138,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ TQString line = m_existingStructure.first(); - if(line.tqcontains("findNode(tqparent)->atts()->tqgeometry(); TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); - int dummyDimension=dummy.height()-cancelledPixels(line.tqcontains(",")+1); + int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1); TQPtrList list=m_internalTree->findNode(tqparent)->tqchildrenList(); TQPtrListIterator it( list ); @@ -157,7 +157,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ ++it; TQRect newGeometry(dummy); double newDimension; - if(percentages.first().tqcontains("%")) + if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; else newDimension=(double)percentages.first().toInt(); newGeometry.setHeight( proxInt(newDimension) ); @@ -166,15 +166,15 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ } } else - if(line.tqcontains("cols")) { - split(tqparent,(line.tqcontains(",")+1),VERTICAL); + if(line.contains("cols")) { + split(tqparent,(line.contains(",")+1),VERTICAL); TQRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); pattern.search(line); TQRect dummy=m_internalTree->findNode(tqparent)->atts()->tqgeometry(); TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); - int dummyDimension=dummy.width()-cancelledPixels(line.tqcontains(",")+1); + int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1); TQPtrList list=m_internalTree->findNode(tqparent)->tqchildrenList(); TQPtrListIterator it( list ); @@ -183,7 +183,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ ++it; TQRect newGeometry(dummy); double newDimension; - if(percentages.first().tqcontains("%")) + if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; else newDimension=(double)percentages.first().toInt(); newGeometry.setWidth( proxInt(newDimension) ); @@ -201,7 +201,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ } else { TQMap attributeMap; - if( line.tqcontains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; + if( line.contains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; else attributeMap["noresize"] = TQString(); TQRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files @@ -287,7 +287,7 @@ void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* tqparent){ if(n->hasChildren()) { TQString splitterName("splitter"+TQString::number(++splitterIdNumber,10)); TQSplitter *splitter = new TQSplitter(tqparent,splitterName.ascii()); - if(SIZES.tqcontains(splitterName)) splitter->setSizes( SIZES[splitterName] ); + if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] ); switch( n->splitType() ){ case VERTICAL : splitter->setOrientation(Qt::Horizontal);break; case HORIZONTAL : splitter->setOrientation(Qt::Vertical);break; @@ -421,9 +421,9 @@ TQString VisualFrameEditor::formatStructure(){ TQString s; int tabNum = 0; for ( TQStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { - if((*it).tqcontains("")) { + if((*it).contains("")) { tabNum--; s.truncate(s.length()-1); } @@ -441,9 +441,9 @@ TQString VisualFrameEditor::framesetStructure() { } void VisualFrameEditor::setMarkupLanguage(const TQString& s){ - if( s.tqcontains("xhtml",false)!=0 ) m_markupLanguage = XHTML; + if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML; else - if( s.tqcontains("html",false)!=0 ) m_markupLanguage = HTML; + if( s.contains("html",false)!=0 ) m_markupLanguage = HTML; } #include "visualframeeditor.moc" diff --git a/quanta/components/tableeditor/tableeditor.cpp b/quanta/components/tableeditor/tableeditor.cpp index e9475242..c49d2be0 100644 --- a/quanta/components/tableeditor/tableeditor.cpp +++ b/quanta/components/tableeditor/tableeditor.cpp @@ -152,7 +152,7 @@ void TableEditor::slotContextMenuRequested( int row, int col, const TQPoint & po TQTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); TQRect rect(TQPoint(selection.topRow(), selection.leftCol()) , TQPoint(selection.bottomRow(), selection.rightCol())); - if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.tqcontains(m_row, m_col)) { + if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.contains(m_row, m_col)) { m_popup->setItemVisible(m_mergeCellsId, true); m_popup->setItemVisible(m_mergeSeparatorId, true); } @@ -919,7 +919,7 @@ void TableEditor::slotRemoveRow() if ((*it3).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it3).mergedRow][(*it3).mergedCol]); - if (mainTableNode->node && !updatedMainNodes.tqcontains(mainTableNode)) + if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) { int rowspan = mainTableNode->node->tag->attributeValue("rowspan", true).toInt(); rowspan--; @@ -970,7 +970,7 @@ void TableEditor::slotRemoveCol() if ((*it2).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it2).mergedRow][(*it2).mergedCol]); - if (mainTableNode->node && !updatedMainNodes.tqcontains(mainTableNode)) + if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) { int colspan = mainTableNode->node->tag->attributeValue("colspan", true).toInt(); colspan--; @@ -1163,7 +1163,7 @@ void TableEditor::slotEditChildTable() table = *it; if (table.row == m_row && table.col == m_col) { TQString cellData = m_dataTable->text(table.row, table.col); - int pos = cellData.tqfind(table.nestedData); + int pos = cellData.find(table.nestedData); if (pos == -1) { KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); error = true; @@ -1182,9 +1182,9 @@ void TableEditor::slotEditChildTable() baseNode = localParser->parse(w); tempDocCreated = true; //try to find the child table position - int pos2 = tableData.tqfind(cellData); + int pos2 = tableData.find(cellData); if (pos2 != -1) - pos2 = tableData.tqfind(table.nestedData, pos2); + pos2 = tableData.find(table.nestedData, pos2); else { KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); error = true; @@ -1192,8 +1192,8 @@ void TableEditor::slotEditChildTable() break; } tableData = tableData.left(pos2); - table.bLine = tableData.tqcontains('\n'); - pos2 = tableData.tqfindRev('\n'); + table.bLine = tableData.contains('\n'); + pos2 = tableData.findRev('\n'); if (pos2 != -1) { table.bCol = tableData.length() - pos2; } else { @@ -1214,7 +1214,7 @@ void TableEditor::slotEditChildTable() if (editor.exec()) { int length = table.nestedData.length(); (*it).nestedData = editor.readModifiedTable(); - cellData.tqreplace(pos, length, (*it).nestedData); + cellData.replace(pos, length, (*it).nestedData); setCellText(m_dataTable, table.row, table.col, cellData); } //cleanup on success -- cgit v1.2.1