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 ++-- 8 files changed, 118 insertions(+), 118 deletions(-) (limited to 'quanta/components/csseditor') 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; -- cgit v1.2.1