diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
commit | bab40890696ec68c337dc290880423a0602b83c7 (patch) | |
tree | 6ba03f720b1fa88235ba339e7aedb4455430357e /khtml/css | |
parent | f7e71d47719ab6094cf4a9fafffa5ea351973522 (diff) | |
download | tdelibs-bab40890696ec68c337dc290880423a0602b83c7.tar.gz tdelibs-bab40890696ec68c337dc290880423a0602b83c7.zip |
Finished remaining porting to new TQt API
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214736 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/css')
-rw-r--r-- | khtml/css/css_stylesheetimpl.cpp | 6 | ||||
-rw-r--r-- | khtml/css/css_valueimpl.cpp | 6 | ||||
-rw-r--r-- | khtml/css/csshelper.cpp | 12 | ||||
-rw-r--r-- | khtml/css/cssstyleselector.cpp | 16 |
4 files changed, 20 insertions, 20 deletions
diff --git a/khtml/css/css_stylesheetimpl.cpp b/khtml/css/css_stylesheetimpl.cpp index 8189a6846..a27ed5286 100644 --- a/khtml/css/css_stylesheetimpl.cpp +++ b/khtml/css/css_stylesheetimpl.cpp @@ -324,7 +324,7 @@ StyleSheetListImpl::~StyleSheetListImpl() void StyleSheetListImpl::add( StyleSheetImpl* s ) { - if ( !styleSheets.containsRef( s ) ) { + if ( !styleSheets.tqcontainsRef( s ) ) { s->ref(); styleSheets.append( s ); } @@ -379,8 +379,8 @@ MediaListImpl::MediaListImpl( CSSRuleImpl *parentRule, const DOMString &media ) bool MediaListImpl::contains( const DOMString &medium ) const { - return m_lstMedia.empty() || m_lstMedia.contains( medium ) || - m_lstMedia.contains( "all" ); + return m_lstMedia.empty() || m_lstMedia.tqcontains( medium ) || + m_lstMedia.tqcontains( "all" ); } CSSStyleSheetImpl *MediaListImpl::parentStyleSheet() const diff --git a/khtml/css/css_valueimpl.cpp b/khtml/css/css_valueimpl.cpp index 0fa8bc837..28df97b62 100644 --- a/khtml/css/css_valueimpl.cpp +++ b/khtml/css/css_valueimpl.cpp @@ -766,7 +766,7 @@ DOM::DOMString CSSPrimitiveValueImpl::cssText() const + TQString::number(tqGreen(m_value.rgbcolor)) + "," + TQString::number(tqAlpha(m_value.rgbcolor)/255.0) + ")"; } else { - text = TQColor(m_value.rgbcolor).name(); + text = TQString(TQColor(m_value.rgbcolor).name()); } break; case CSSPrimitiveValue::CSS_PAIR: @@ -886,9 +886,9 @@ FontFamilyValueImpl::FontFamilyValueImpl( const TQString &string) parsedFontName = string; // a language tag is often added in braces at the end. Remove it. - parsedFontName.replace(parenReg, TQString::null); + parsedFontName.replace(parenReg, TQString()); // remove [Xft] qualifiers - parsedFontName.replace(braceReg, TQString::null); + parsedFontName.replace(braceReg, TQString()); #ifndef APPLE_CHANGES const TQString &available = KHTMLSettings::availableFamilies(); diff --git a/khtml/css/csshelper.cpp b/khtml/css/csshelper.cpp index f1d681bd6..96e184f2f 100644 --- a/khtml/css/csshelper.cpp +++ b/khtml/css/csshelper.cpp @@ -49,8 +49,8 @@ DOMString khtml::parseURL(const DOMString &url) int o = 0; int l = i->l; - while(o < l && (i->s[o] <= ' ')) { o++; l--; } - while(l > 0 && (i->s[o+l-1] <= ' ')) l--; + while(o < l && (i->s[o] <= TQChar(' '))) { o++; l--; } + while(l > 0 && (i->s[o+l-1] <= TQChar(' '))) l--; if(l >= 5 && (i->s[o].lower() == 'u') && @@ -62,8 +62,8 @@ DOMString khtml::parseURL(const DOMString &url) l -= 5; } - while(o < l && (i->s[o] <= ' ')) { o++; l--; } - while(l > 0 && (i->s[o+l-1] <= ' ')) l--; + while(o < l && (i->s[o] <= TQChar(' '))) { o++; l--; } + while(l > 0 && (i->s[o+l-1] <= TQChar(' '))) l--; if(l >= 2 && i->s[o] == i->s[o+l-1] && (i->s[o].latin1() == '\'' || i->s[o].latin1() == '\"')) { @@ -71,8 +71,8 @@ DOMString khtml::parseURL(const DOMString &url) l -= 2; } - while(o < l && (i->s[o] <= ' ')) { o++; l--; } - while(l > 0 && (i->s[o+l-1] <= ' ')) l--; + while(o < l && (i->s[o] <= TQChar(' '))) { o++; l--; } + while(l > 0 && (i->s[o+l-1] <= TQChar(' '))) l--; DOMStringImpl* j = new DOMStringImpl(i->s+o,l); diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp index abe6a89ef..a8993bf5f 100644 --- a/khtml/css/cssstyleselector.cpp +++ b/khtml/css/cssstyleselector.cpp @@ -257,7 +257,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet, u.setQuery( TQString::null ); u.setRef( TQString::null ); encodedurl.file = u.url(); - int pos = encodedurl.file.findRev('/'); + int pos = encodedurl.file.tqfindRev('/'); encodedurl.path = encodedurl.file; if ( pos > 0 ) { encodedurl.path.truncate( pos ); @@ -831,9 +831,9 @@ static void cleanpath(TQString &path) while ( (pos = path.tqfind( "/../" )) != -1 ) { int prev = 0; if ( pos > 0 ) - prev = path.findRev( "/", pos -1 ); + prev = path.tqfindRev( "/", pos -1 ); // don't remove the host, i.e. http://foo.org/../foo.html - if (prev < 0 || (prev > 3 && path.findRev("://", prev-1) == prev-2)) + if (prev < 0 || (prev > 3 && path.tqfindRev("://", prev-1) == prev-2)) path.remove( pos, 3); else // matching directory found ? @@ -1158,7 +1158,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm // Be smart compare on length first if (sel_len > val_len) return false; // Selector string may not contain spaces - if ((sel->attr != ATTR_CLASS || e->hasClassList()) && sel->value.tqfind(' ') != -1) return false; + if ((sel->attr != ATTR_CLASS || e->hasClassList()) && sel->value.find(' ') != -1) return false; if (sel_len == val_len) return (caseSensitive && !strcmp(sel->value, value)) || (!caseSensitive && !strcasecmp(sel->value, value)); @@ -1189,21 +1189,21 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm //kdDebug( 6080 ) << "checking for contains match" << endl; TQConstString val_str(value->tqunicode(), value->length()); TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); - return val_str.string().contains(sel_str.string(), caseSensitive); + return val_str.string().tqcontains(sel_str.string(), caseSensitive); } case CSSSelector::Begin: { //kdDebug( 6080 ) << "checking for beginswith match" << endl; TQConstString val_str(value->tqunicode(), value->length()); TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); - return val_str.string().startsWith(sel_str.string(), caseSensitive); + return val_str.string().tqstartsWith(sel_str.string(), caseSensitive); } case CSSSelector::End: { //kdDebug( 6080 ) << "checking for endswith match" << endl; TQConstString val_str(value->tqunicode(), value->length()); TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); - return val_str.string().endsWith(sel_str.string(), caseSensitive); + return val_str.string().tqendsWith(sel_str.string(), caseSensitive); } case CSSSelector::Hyphen: { @@ -2079,7 +2079,7 @@ static TQColor colorForCSSValue( int css_value ) KConfig bckgrConfig("kdesktoprc", true, false); // No multi-screen support bckgrConfig.setGroup("Desktop0"); // Desktop background. - return bckgrConfig.readColorEntry("Color1", &tqApp->palette().disabled().background()); + return bckgrConfig.readColorEntry("Color1", &tqApp->tqpalette().disabled().background()); } return TQColor(); } |