rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/adept@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 75f3e2548c
commit 22cbf2e118

@ -93,7 +93,7 @@ TQString ItemChangelog::changelogUrl() {
//// Get the version string. //// Get the version string.
TQString version = TQString( m_pkg.candidateVersion().versionString() ); TQString version = TQString( m_pkg.candidateVersion().versionString() );
int epoch = version.tqfind(':'); int epoch = version.find(':');
if (epoch > -1) { if (epoch > -1) {
version = version.mid(epoch + 1); version = version.mid(epoch + 1);
} }

@ -90,15 +90,15 @@ TQString formatLongDescription( TQString l )
{ {
TQRegExp rx( u8( "^(.*)\n" ) ); TQRegExp rx( u8( "^(.*)\n" ) );
rx.setMinimal( true ); rx.setMinimal( true );
l.tqreplace( rx, u8( "\\1</p><p>" ) ); l.replace( rx, u8( "\\1</p><p>" ) );
rx = TQRegExp( u8( "\\n[ ]*\\.\\n" ) ); rx = TQRegExp( u8( "\\n[ ]*\\.\\n" ) );
l.tqreplace( rx, u8( "</p><p>" ) ); l.replace( rx, u8( "</p><p>" ) );
rx = TQRegExp( u8( "\n " ) ); rx = TQRegExp( u8( "\n " ) );
l.tqreplace( rx, u8( " " ) ); l.replace( rx, u8( " " ) );
rx = TQRegExp( u8( "\n - (.*)(\n|$)" ) ); rx = TQRegExp( u8( "\n - (.*)(\n|$)" ) );
rx.setMinimal( true ); rx.setMinimal( true );
l.tqreplace( rx, u8( "\n<li>\\1</li>\n" ) ); l.replace( rx, u8( "\n<li>\\1</li>\n" ) );
l.tqreplace( rx, u8( "\n<li>\\1</li>\n" ) ); l.replace( rx, u8( "\n<li>\\1</li>\n" ) );
return TQString( "<p>" ) + l + u8( "</p>" ); return TQString( "<p>" ) + l + u8( "</p>" );
} }

@ -291,22 +291,22 @@ void DPkgPM::dpkgMonitor ()
// parse status updates from dpkg // parse status updates from dpkg
while ( true ) { while ( true ) {
std::string::size_type colon, nl = b.tqfind( '\n' ); std::string::size_type colon, nl = b.find( '\n' );
m_statusBuffer.append( string( b, 0, nl ) ); m_statusBuffer.append( string( b, 0, nl ) );
if ( nl == std::string::npos ) if ( nl == std::string::npos )
break; break;
// cerr << "dpkg status completed line: " << m_statusBuffer << endl; // cerr << "dpkg status completed line: " << m_statusBuffer << endl;
colon = m_statusBuffer.tqfind( ": " ); colon = m_statusBuffer.find( ": " );
string l( m_statusBuffer, 0, colon ); string l( m_statusBuffer, 0, colon );
string r( m_statusBuffer, colon + 2, string::npos ); string r( m_statusBuffer, colon + 2, string::npos );
if ( l == "status" ) { if ( l == "status" ) {
colon = r.tqfind( ": " ); colon = r.find( ": " );
std::string p( r, 0, colon ); std::string p( r, 0, colon );
r = string( r, colon + 2, string::npos ); r = string( r, colon + 2, string::npos );
colon = r.tqfind( ": " ); colon = r.find( ": " );
std::string e( r, 0, colon ); std::string e( r, 0, colon );
if ( colon == string::npos ) if ( colon == string::npos )
r = ""; r = "";
@ -317,7 +317,7 @@ void DPkgPM::dpkgMonitor ()
b = string( b, nl + 1, string::npos ); b = string( b, nl + 1, string::npos );
m_statusBuffer = string(); m_statusBuffer = string();
nl = b.tqfind( '\n' ); nl = b.find( '\n' );
} }
} }
} }
@ -348,7 +348,7 @@ bool DPkgPM::runScripts (const char *Cnf, bool sP)
// Determine the protocol version // Determine the protocol version
string OptSec = Opts->Value; string OptSec = Opts->Value;
string::size_type Pos; string::size_type Pos;
if ((Pos = OptSec.tqfind(' ')) == string::npos || Pos == 0) if ((Pos = OptSec.find(' ')) == string::npos || Pos == 0)
Pos = OptSec.length(); Pos = OptSec.length();
OptSec = "DPkg::Tools::Options::" + string(Opts->Value.c_str(),Pos); OptSec = "DPkg::Tools::Options::" + string(Opts->Value.c_str(),Pos);

@ -90,15 +90,15 @@ TQString formatLongDescription( TQString l )
{ {
TQRegExp rx( u8( "^(.*)\n" ) ); TQRegExp rx( u8( "^(.*)\n" ) );
rx.setMinimal( true ); rx.setMinimal( true );
l.tqreplace( rx, u8( "\\1</p><p>" ) ); l.replace( rx, u8( "\\1</p><p>" ) );
rx = TQRegExp( u8( "\\n[ ]*\\.\\n" ) ); rx = TQRegExp( u8( "\\n[ ]*\\.\\n" ) );
l.tqreplace( rx, u8( "</p><p>" ) ); l.replace( rx, u8( "</p><p>" ) );
rx = TQRegExp( u8( "\n " ) ); rx = TQRegExp( u8( "\n " ) );
l.tqreplace( rx, u8( " " ) ); l.replace( rx, u8( " " ) );
rx = TQRegExp( u8( "\n - (.*)(\n|$)" ) ); rx = TQRegExp( u8( "\n - (.*)(\n|$)" ) );
rx.setMinimal( true ); rx.setMinimal( true );
l.tqreplace( rx, u8( "\n<li>\\1</li>\n" ) ); l.replace( rx, u8( "\n<li>\\1</li>\n" ) );
l.tqreplace( rx, u8( "\n<li>\\1</li>\n" ) ); l.replace( rx, u8( "\n<li>\\1</li>\n" ) );
return TQString( "<p>" ) + l + u8( "</p>" ); return TQString( "<p>" ) + l + u8( "</p>" );
} }

@ -232,7 +232,7 @@ namespace tut
throw std::invalid_argument("group shall be non-null"); throw std::invalid_argument("group shall be non-null");
} }
groups::iterator found = groups_.tqfind(name); groups::iterator found = groups_.find(name);
if( found != groups_.end() ) if( found != groups_.end() )
{ {
std::string msg("attempt to add already existent group "+name); std::string msg("attempt to add already existent group "+name);
@ -316,7 +316,7 @@ namespace tut
{ {
callback_->run_started(); callback_->run_started();
const_iterator i = groups_.tqfind(group_name); const_iterator i = groups_.find(group_name);
if( i == groups_.end() ) if( i == groups_.end() )
{ {
throw no_such_group(group_name); throw no_such_group(group_name);
@ -347,7 +347,7 @@ namespace tut
{ {
callback_->run_started(); callback_->run_started();
const_iterator i = groups_.tqfind(group_name); const_iterator i = groups_.find(group_name);
if( i == groups_.end() ) if( i == groups_.end() )
{ {
throw no_such_group(group_name); throw no_such_group(group_name);
@ -724,7 +724,7 @@ namespace tut
if( tests_.rbegin()->first < n ) throw beyond_last_test(); if( tests_.rbegin()->first < n ) throw beyond_last_test();
// withing scope; check if given test exists // withing scope; check if given test exists
tests_iterator ti = tests_.tqfind(n); tests_iterator ti = tests_.find(n);
if( ti == tests_.end() ) throw no_such_test(); if( ti == tests_.end() ) throw no_such_test();
safe_holder<object> obj; safe_holder<object> obj;

Loading…
Cancel
Save