diff --git a/generators/chm/kio-msits/msits.cpp b/generators/chm/kio-msits/msits.cpp
index 09c2ebfa9..15f202b94 100644
--- a/generators/chm/kio-msits/msits.cpp
+++ b/generators/chm/kio-msits/msits.cpp
@@ -127,7 +127,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath )
{
kDebug() << "ProtocolMSITS::parseLoadAndLookup (const KUrl&) " << url.path() << endl;
- int pos = url.path().find ("::");
+ int pos = url.path().indexOf ("::");
if ( pos == -1 )
{
diff --git a/generators/chm/lib/kchmtreeviewitem.cpp b/generators/chm/lib/kchmtreeviewitem.cpp
index a65d8e70f..663b6ccd5 100644
--- a/generators/chm/lib/kchmtreeviewitem.cpp
+++ b/generators/chm/lib/kchmtreeviewitem.cpp
@@ -109,7 +109,7 @@ void KCHMMainTreeViewItem::paintCell( QPainter * p, const QColorGroup & cg, int
QColorGroup newcg ( cg );
QColor c = newcg.text();
- if ( url.find ('|') != -1 )
+ if ( url.indexOf ('|') != -1 )
newcg.setColor( QColorGroup::Text, Qt::red );
else if ( url[0] == ':' )
newcg.setColor( QColorGroup::Text, Qt::lightGray );
diff --git a/generators/chm/lib/kchmurl.cpp b/generators/chm/lib/kchmurl.cpp
index b608151cd..f8f0de783 100644
--- a/generators/chm/lib/kchmurl.cpp
+++ b/generators/chm/lib/kchmurl.cpp
@@ -9,7 +9,7 @@ namespace KCHMUrl
// Check whether the URL is external
QRegExp uriregex ( "^(\\w+):\\/\\/" );
- if ( uriregex.search ( url ) != -1 )
+ if ( uriregex.indexIn ( url ) != -1 )
{
QString proto = uriregex.cap ( 1 ).toLower();
@@ -34,7 +34,7 @@ namespace KCHMUrl
{
QRegExp uriregex ( "^ms-its:(.*)::(.*)$" );
- if ( uriregex.search ( url ) != -1 )
+ if ( uriregex.indexIn ( url ) != -1 )
{
chmfile = uriregex.cap ( 1 );
page = uriregex.cap ( 2 );
diff --git a/generators/chm/lib/xchmfile.cpp b/generators/chm/lib/xchmfile.cpp
index 4ff5dfaf9..a6d777c70 100644
--- a/generators/chm/lib/xchmfile.cpp
+++ b/generators/chm/lib/xchmfile.cpp
@@ -175,11 +175,11 @@ inline int CHMFile::findStringInQuotes (const QString& tag, int offset, QString&
m_entityDecodeMap["quot"] = "\""; // double quote
m_entityDecodeMap["apos"] = "'"; // single quote
}
- int qbegin = tag.find ('"', offset);
+ int qbegin = tag.indexOf ('"', offset);
if ( qbegin == -1 )
qFatal ("CHMFile::findStringInQuotes: cannot find first quote in tag: '%s'", tag.ascii());
- int qend = firstquote ? tag.find ('"', qbegin + 1) : tag.findRev ('"');
+ int qend = firstquote ? tag.indexOf ('"', qbegin + 1) : tag.lastIndexOf ('"');
if ( qend == -1 || qend <= qbegin )
qFatal ("CHMFile::findStringInQuotes: cannot find last quote in tag: '%s'", tag.ascii());
@@ -350,7 +350,7 @@ bool CHMFile::ParseHhcAndFillTree (const QString& file, QDomDocument *tree, bool
int stringlen = src.length();
while ( pos < stringlen
- && (pos = src.find ('<', pos)) != -1 )
+ && (pos = src.indexOf ('<', pos)) != -1 )
{
int i, word_end = 0;
@@ -360,8 +360,8 @@ bool CHMFile::ParseHhcAndFillTree (const QString& file, QDomDocument *tree, bool
if ( (src[i] == '"' || src[i] == '\'') )
{
// find where quote ends, either by another quote, or by '>' symbol (some people don't know HTML)
- int nextpos = src.find (src[i], i+1);
- if ( nextpos == -1 && (nextpos = src.find ('>', i+1)) == -1 )
+ int nextpos = src.indexOf (src[i], i+1);
+ if ( nextpos == -1 && (nextpos = src.indexOf ('>', i+1)) == -1 )
{
qWarning ("CHMFile::ParseHhcAndFillTree: corrupted TOC: %s", src.mid(i).ascii());
return false;
@@ -385,7 +385,7 @@ bool CHMFile::ParseHhcAndFillTree (const QString& file, QDomDocument *tree, bool
// qDebug ("tag: '%s', tagword: '%s'\n", tag.ascii(), tagword.ascii());
//