summaryrefslogtreecommitdiffstats
path: root/kbugbuster/backend/htmlparser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kbugbuster/backend/htmlparser.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbugbuster/backend/htmlparser.cpp')
-rw-r--r--kbugbuster/backend/htmlparser.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kbugbuster/backend/htmlparser.cpp b/kbugbuster/backend/htmlparser.cpp
index 055b8d11..e9840e6b 100644
--- a/kbugbuster/backend/htmlparser.cpp
+++ b/kbugbuster/backend/htmlparser.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#include "htmlparser.h"
@@ -100,35 +100,35 @@ void HtmlParser::processResult( Package::List & )
TQString HtmlParser::getAttribute( const TQString &line, const TQString &name )
{
- int pos1 = line.find( name + "=\"" );
- if ( pos1 < 1 ) return TQString::null;
+ int pos1 = line.tqfind( name + "=\"" );
+ if ( pos1 < 1 ) return TQString();
pos1 += name.length() + 2;
- int pos2 = line.find( "\"", pos1 );
- if ( pos2 < 1 ) return TQString::null;
+ int pos2 = line.tqfind( "\"", pos1 );
+ if ( pos2 < 1 ) return TQString();
return line.mid( pos1, pos2 - pos1 );
}
bool HtmlParser::getCpts( const TQString &line, TQString &key,
TQStringList &values )
{
- if ( !line.contains( TQRegExp( "\\s*cpts" ) ) ) return false;
+ if ( !line.tqcontains( TQRegExp( "\\s*cpts" ) ) ) return false;
// kdDebug() << "LINE: " << line << endl;
- int pos1 = line.find( "[" );
+ int pos1 = line.tqfind( "[" );
if ( pos1 < 0 ) return false;
- int pos2 = line.find( "]", ++pos1 );
+ int pos2 = line.tqfind( "]", ++pos1 );
if ( pos2 < 0 ) return false;
key = line.mid( pos1, pos2 - pos1 );
- int pos3 = key.find( "'" );
+ int pos3 = key.tqfind( "'" );
if ( pos3 >= 0 ) {
- int pos4 = key.find( "'", ++pos3 );
+ int pos4 = key.tqfind( "'", ++pos3 );
if ( pos4 >= 0 ) key = key.mid( pos3, pos4 - pos3 );
}
// kdDebug() << " KEY: " << key << endl;
- pos1 = line.find( "'", ++pos2 );
- if ( pos1 >= 0 ) pos2 = line.find( "'", ++pos1 );
+ pos1 = line.tqfind( "'", ++pos2 );
+ if ( pos1 >= 0 ) pos2 = line.tqfind( "'", ++pos1 );
while ( pos1 >= 0 && pos2 >= 0 ) {
TQString value = line.mid( pos1, pos2 - pos1 );
@@ -136,8 +136,8 @@ bool HtmlParser::getCpts( const TQString &line, TQString &key,
values.append( value );
- pos1 = line.find( "'", ++pos2 );
- if ( pos1 >= 0 ) pos2 = line.find( "'", ++pos1 );
+ pos1 = line.tqfind( "'", ++pos2 );
+ if ( pos1 >= 0 ) pos2 = line.tqfind( "'", ++pos1 );
}
return true;
@@ -153,7 +153,7 @@ KBB::Error HtmlParser_2_10::parseLine( const TQString &line, Bug::List &bugs )
// kdDebug() << " NUMBER: " << number << endl;
TQString summary;
- int pos = line.findRev( "summary>" );
+ int pos = line.tqfindRev( "summary>" );
if ( pos >= 0 ) summary = line.mid( pos + 8 );
Bug bug( new BugImpl( summary, Person(), number, 0xFFFFFFFF, Bug::SeverityUndefined,
@@ -248,13 +248,13 @@ KBB::Error HtmlParser_2_17_1::parseLine( const TQString &line, Package::List & )
switch ( mState ) {
case Idle:
case SearchComponents:
- if ( line.contains( "var cpts" ) ) mState = Components;
+ if ( line.tqcontains( "var cpts" ) ) mState = Components;
break;
case SearchProducts:
- if ( line.contains( "onchange=\"selectProduct" ) ) mState = Products;
+ if ( line.tqcontains( "onchange=\"selectProduct" ) ) mState = Products;
break;
case Components: {
- if ( line.contains( TQRegExp( "\\s*function" ) ) ) {
+ if ( line.tqcontains( TQRegExp( "\\s*function" ) ) ) {
mState = SearchProducts;
}
TQString key;
@@ -264,7 +264,7 @@ KBB::Error HtmlParser_2_17_1::parseLine( const TQString &line, Package::List & )
}
}
case Products: {
- if ( line.contains( "</select>" ) ) mState = Finished;
+ if ( line.tqcontains( "</select>" ) ) mState = Finished;
TQString product = getAttribute( line, "value" );
if ( !product.isEmpty() ) {
kdDebug() << "PRODUCT: " << product << endl;