summaryrefslogtreecommitdiffstats
path: root/kbarcode/dsrichtext.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit33038ab0e8b8e7fb05093f953e4f6f724c6e2482 (patch)
tree6a5f53930c5919157cb0f1e928500f97ff8dde95 /kbarcode/dsrichtext.cpp
parent7a4cd8d44ee83c7de058bb0da8ae6676166e9325 (diff)
downloadkbarcode-33038ab0e8b8e7fb05093f953e4f6f724c6e2482.tar.gz
kbarcode-33038ab0e8b8e7fb05093f953e4f6f724c6e2482.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/dsrichtext.cpp')
-rw-r--r--kbarcode/dsrichtext.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kbarcode/dsrichtext.cpp b/kbarcode/dsrichtext.cpp
index 15d08fe..2898f1d 100644
--- a/kbarcode/dsrichtext.cpp
+++ b/kbarcode/dsrichtext.cpp
@@ -47,7 +47,7 @@ Another example
DSRichText::DSRichText( const TQString & t )
: text( t )
{
- if( text.tqfind("<html>") == -1 )
+ if( text.find("<html>") == -1 )
text = "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\"font-size:10pt;font-family:Nimbus Sans l\"><p>"
+ t + "</p></body></html>";
@@ -66,7 +66,7 @@ DSRichText::DSRichText( const TQString & t )
m_base = parseStyle( parse( tmp, "style=\"", "\"", pos ), &m_color );
}
- pos = text.tqfind( "<p", 0 ); // initalize pos correctly
+ pos = text.find( "<p", 0 ); // initalize pos correctly
while( parseParagraph() ); // empty while loop
}
@@ -246,7 +246,7 @@ bool DSRichText::parseParagraph()
break;
if( d[i] == '<' ) {
- TQString span = d.mid( i, d.tqfind( ">", i ) - i + 1 );
+ TQString span = d.mid( i, d.find( ">", i ) - i + 1 );
i += span.length();
if( span.startsWith( "<span " ) ) {
@@ -275,7 +275,7 @@ TQFont DSRichText::parseStyle( const TQString & s, TQColor* color )
TQFont f = m_base;
*color = m_color;
- for ( int i = 0; i < style.tqcontains(';')+1; i++ ) {
+ for ( int i = 0; i < style.contains(';')+1; i++ ) {
TQString s = style.section( ';', i, i );
if( s.isEmpty() )
continue;
@@ -311,17 +311,17 @@ TQFont DSRichText::parseStyle( const TQString & s, TQColor* color )
return f;
}
-TQString DSRichText::parse( const TQString & t, const TQString & tqfind, const TQString & tqfind2, int start )
+TQString DSRichText::parse( const TQString & t, const TQString & find, const TQString & find2, int start )
{
- int s = t.tqfind( tqfind, start );
+ int s = t.find( find, start );
if( s == -1 || s < start )
return TQString();
- int pend = t.tqfind( tqfind2, s + tqfind.length() );
- if( pend == -1 || pend < (signed int)(s + tqfind.length()) )
+ int pend = t.find( find2, s + find.length() );
+ if( pend == -1 || pend < (signed int)(s + find.length()) )
return TQString();
- TQString text = t.mid( s, pend - s + tqfind2.length() );
+ TQString text = t.mid( s, pend - s + find2.length() );
return text;
}
@@ -396,10 +396,10 @@ inline int DSRichText::yDeviation( const formated_line* line )
TQString DSRichText::replaceEscapeSequences( const TQString & t )
{
TQString tmp = TQString( t );
- tmp = tmp.tqreplace( DSREPLACE( "&lt;" ), "<" );
- tmp = tmp.tqreplace( DSREPLACE( "&gt;" ), ">" );
- tmp = tmp.tqreplace( DSREPLACE( "&amp;" ), "&" );
- tmp = tmp.tqreplace( DSREPLACE( "&quot;" ), "\"" );
+ tmp = tmp.replace( DSREPLACE( "&lt;" ), "<" );
+ tmp = tmp.replace( DSREPLACE( "&gt;" ), ">" );
+ tmp = tmp.replace( DSREPLACE( "&amp;" ), "&" );
+ tmp = tmp.replace( DSREPLACE( "&quot;" ), "\"" );
return tmp;
}
@@ -410,8 +410,8 @@ TQString DSRichText::parseParagraphTag( const TQString &t, int* tqalignment )
d = d.mid( 3, d.length() - 3 );
} else if( d.startsWith("<p ") ) {
*tqalignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) );
- if( d.tqcontains( ">" ) ) {
- int x = d.tqfind(">" ) + 1;
+ if( d.contains( ">" ) ) {
+ int x = d.find(">" ) + 1;
d = d.mid( x, d.length() - x );
}
}