summaryrefslogtreecommitdiffstats
path: root/kcontrol/ebrowsing
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
commit9a3f0aacd44fb866833ebcb852df3cd31475cb33 (patch)
tree9f699684624f4e78e13e7dd2393a103cc6fa8274 /kcontrol/ebrowsing
parent341ad02235b9c85cd31782225181ed475b74eaa3 (diff)
downloadtdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.tar.gz
tdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/ebrowsing')
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp2
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp44
-rw-r--r--kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp4
-rw-r--r--kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp6
-rw-r--r--kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp30
5 files changed, 43 insertions, 43 deletions
diff --git a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp
index 6604a5a08..fc92c945d 100644
--- a/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp
@@ -459,7 +459,7 @@ SearchProviderItem *FilterOptions::displaySearchProvider(SearchProvider *p, bool
item = new SearchProviderItem(m_dlg->lvSearchProviders, p);
- if (m_favoriteEngines.tqfind(p->desktopEntryName())!=m_favoriteEngines.end())
+ if (m_favoriteEngines.find(p->desktopEntryName())!=m_favoriteEngines.end())
item->setOn(true);
for (itemCount = 1; itemCount < totalCount; itemCount++)
diff --git a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp
index 0e800a36c..9f3a245fc 100644
--- a/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp
@@ -64,7 +64,7 @@ TQString KURISearchFilterEngine::webShortcutQuery( const TQString& typedString )
if (m_bWebShortcutsEnabled)
{
TQString search = typedString;
- int pos = search.tqfind(m_cKeywordDelimiter);
+ int pos = search.find(m_cKeywordDelimiter);
TQString key;
if (pos > -1)
@@ -98,7 +98,7 @@ TQString KURISearchFilterEngine::autoWebSearchQuery( const TQString& typedString
if (m_bWebShortcutsEnabled && !m_defaultSearchEngine.isEmpty())
{
// Make sure we ignore supported protocols, e.g. "smb:", "http:"
- int pos = typedString.tqfind(':');
+ int pos = typedString.find(':');
if (pos == -1 || !KProtocolInfo::isKnownProtocol(typedString.left(pos)))
{
@@ -147,7 +147,7 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
int i = 0;
int n = 0;
TQString s = userquery.mid (pos, qsexpr.matchedLength());
- while ((i = s.tqfind(" ")) != -1)
+ while ((i = s.find(" ")) != -1)
{
s = s.replace (i, 1, "%20");
n++;
@@ -163,11 +163,11 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
// Back-substitute quoted strings (%20 -> " "):
{
int i = 0;
- while ((i = userquery.tqfind("%20")) != -1)
- userquery = userquery.tqreplace(i, 3, " ");
+ while ((i = userquery.find("%20")) != -1)
+ userquery = userquery.replace(i, 3, " ");
for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it )
- *it = (*it).tqreplace("%20", " ");
+ *it = (*it).replace("%20", " ");
}
PIDDBG << "Generating substitution map:\n";
@@ -187,23 +187,23 @@ TQStringList KURISearchFilterEngine::modifySubstitutionMap(SubstMap& map,
v = l[i-1];
// Back-substitute quoted strings (%20 -> " "):
- while ((j = v.tqfind("%20")) != -1)
- v = v.tqreplace(j, 3, " ");
+ while ((j = v.find("%20")) != -1)
+ v = v.replace(j, 3, " ");
// Insert partial queries (referenced by \1 ... \n) to map:
- map.tqreplace(TQString::number(i), v);
+ map.replace(TQString::number(i), v);
PDVAR (" map['" + nr + "']", map[nr]);
// Insert named references (referenced by \name) to map:
j = 0;
- if ((i>0) && (pos = v.tqfind("=")) > 0)
+ if ((i>0) && (pos = v.find("=")) > 0)
{
TQString s = v.mid(pos + 1);
TQString k = v.left(pos);
// Back-substitute references contained in references (e.g. '\refname' substitutes to 'thisquery=\0')
- while ((j = s.tqfind("%5C")) != -1) s = s.tqreplace(j, 3, "\\");
- map.tqreplace(k, s);
+ while ((j = s.find("%5C")) != -1) s = s.replace(j, 3, "\\");
+ map.replace(k, s);
PDVAR (" map['" + k + "']", map[k]);
}
}
@@ -231,12 +231,12 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap &
// Check, if old style '\1' is found and replace it with \{@} (compatibility mode):
{
int pos = -1;
- if ((pos = newurl.tqfind("\\1")) >= 0)
+ if ((pos = newurl.find("\\1")) >= 0)
{
PIDDBG << "WARNING: Using compatibility mode for newurl='" << newurl
<< "'. Please replace old style '\\1' with new style '\\{0}' "
"in the query definition.\n";
- newurl = newurl.tqreplace(pos, 2, "\\{@}");
+ newurl = newurl.replace(pos, 2, "\\{@}");
}
}
@@ -275,7 +275,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap &
// Substitute a range of keywords
if (range.search(rlitem, 0) >= 0)
{
- int pos = rlitem.tqfind("-");
+ int pos = rlitem.find("-");
int first = rlitem.left(pos).toInt();
int last = rlitem.right(rlitem.length()-pos-1).toInt();
@@ -307,7 +307,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap &
v = encodeString(s, encodingMib);
PDVAR (" default", s);
}
- else if (map.tqcontains(rlitem))
+ else if (map.contains(rlitem))
{
// Use value from substitution map:
found = true;
@@ -340,7 +340,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap &
// Encode '+', otherwise it would be interpreted as space in the resulting url:
int vpos = 0;
- while ((vpos = v.tqfind('+')) != -1)
+ while ((vpos = v.find('+')) != -1)
v = v.replace (vpos, 1, "%2B");
}
@@ -353,7 +353,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap &
i++;
}
- newurl = newurl.tqreplace(pos, reflist.matchedLength(), v);
+ newurl = newurl.replace(pos, reflist.matchedLength(), v);
}
// Special handling for \{@};
@@ -370,7 +370,7 @@ TQString KURISearchFilterEngine::substituteQuery(const TQString& url, SubstMap &
// Substitute \{@} with list of unmatched query strings
int vpos = 0;
- while ((vpos = newurl.tqfind("\\@")) != -1)
+ while ((vpos = newurl.find("\\@")) != -1)
newurl = newurl.replace (vpos, 2, v);
}
}
@@ -397,7 +397,7 @@ TQString KURISearchFilterEngine::formatResult( const TQString& url,
{
// Return nothing if userquery is empty and it contains
// substitution strings...
- if (query.isEmpty() && url.tqfind(TQRegExp(TQRegExp::escape("\\{"))) > 0)
+ if (query.isEmpty() && url.find(TQRegExp(TQRegExp::escape("\\{"))) > 0)
return TQString::null;
// Debug info of map:
@@ -427,13 +427,13 @@ TQString KURISearchFilterEngine::formatResult( const TQString& url,
PDVAR ("query definition", url);
// Add charset indicator for the query to substitution map:
- map.tqreplace("ikw_charset", cseta);
+ map.replace("ikw_charset", cseta);
// Add charset indicator for the fallback query to substitution map:
TQString csetb = cset2;
if (csetb.isEmpty())
csetb = "iso-8859-1";
- map.tqreplace("wsc_charset", csetb);
+ map.replace("wsc_charset", csetb);
TQString newurl = substituteQuery (url, map, userquery, csetacodec->mibEnum());
diff --git a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp
index 183d2a288..586f947ff 100644
--- a/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp
+++ b/kcontrol/ebrowsing/plugins/ikws/searchproviderdlg.cpp
@@ -60,7 +60,7 @@ SearchProviderDialog::SearchProviderDialog(SearchProvider *provider,
m_dlg->leName->setText(m_provider->name());
m_dlg->leQuery->setText(m_provider->query());
m_dlg->leShortcut->setText(m_provider->keys().join(","));
- m_dlg->cbCharset->setCurrentItem(m_provider->charset().isEmpty() ? 0 : charsets.tqfindIndex(m_provider->charset()));
+ m_dlg->cbCharset->setCurrentItem(m_provider->charset().isEmpty() ? 0 : charsets.findIndex(m_provider->charset()));
m_dlg->leName->setEnabled(false);
m_dlg->leQuery->setFocus();
}
@@ -81,7 +81,7 @@ void SearchProviderDialog::slotChanged()
void SearchProviderDialog::slotOk()
{
- if ((m_dlg->leQuery->text().tqfind("\\{") == -1)
+ if ((m_dlg->leQuery->text().find("\\{") == -1)
&& KMessageBox::warningContinueCancel(0,
i18n("The URI does not contain a \\{...} placeholder for the user query.\n"
"This means that the same page is always going to be visited, "
diff --git a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp
index a893e9f3a..f81fda73d 100644
--- a/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp
+++ b/kcontrol/ebrowsing/plugins/localdomain/localdomainurifilter.cpp
@@ -71,8 +71,8 @@ bool LocalDomainURIFilter::filterURI( KURIFilterData& data ) const
bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const
{
// find() returns -1 when no match -> left()/truncate() are noops then
- TQString host( cmd.left( cmd.tqfind( '/' ) ) );
- host.truncate( host.tqfind( ':' ) ); // Remove port number
+ TQString host( cmd.left( cmd.find( '/' ) ) );
+ host.truncate( host.find( ':' ) ); // Remove port number
if( !(host == last_host && last_time > time( NULL ) - 5 ) ) {
@@ -95,7 +95,7 @@ bool LocalDomainURIFilter::isLocalDomainHost( TQString& cmd ) const
last_result = proc.wait( 1 ) && proc.normalExit() && !proc.exitStatus();
if( !m_fullname.isEmpty() )
- cmd.tqreplace( 0, host.length(), m_fullname );
+ cmd.replace( 0, host.length(), m_fullname );
}
return last_result;
diff --git a/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp b/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp
index 40d97e29d..bee6e99c4 100644
--- a/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp
+++ b/kcontrol/ebrowsing/plugins/shorturi/kshorturifilter.cpp
@@ -66,7 +66,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false )
// Match FQDN_PATTERN
exp.setPattern( QFL1(FQDN_PATTERN) );
- if ( cmd.tqcontains( exp ) )
+ if ( cmd.contains( exp ) )
{
if (verbose)
kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd
@@ -85,7 +85,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false )
// Match IPv4 addresses
exp.setPattern( QFL1(IPv4_PATTERN) );
- if ( cmd.tqcontains( exp ) )
+ if ( cmd.contains( exp ) )
{
if (verbose)
kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd
@@ -95,7 +95,7 @@ static bool isValidShortURL( const TQString& cmd, bool verbose = false )
// Match IPv6 addresses
exp.setPattern( QFL1(IPv6_PATTERN) );
- if ( cmd.tqcontains( exp ) )
+ if ( cmd.contains( exp ) )
{
if (verbose)
kdDebug() << "KShortURIFilter::isValidShortURL: " << cmd
@@ -121,7 +121,7 @@ static TQString removeArgs( const TQString& _cmd )
do
{
- spacePos = cmd.tqfind( ' ', spacePos+1 );
+ spacePos = cmd.find( ' ', spacePos+1 );
} while ( spacePos > 1 && cmd[spacePos - 1] == '\\' );
if( spacePos > 0 )
@@ -182,7 +182,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
// You mean caching the last filtering, to try and reuse it, to save stat()s? (David)
const TQString starthere_proto = QFL1("start-here:");
- if (cmd.tqfind(starthere_proto, 0, true) == 0 )
+ if (cmd.find(starthere_proto, 0, true) == 0 )
{
setFilteredURI( data, KURL("system:/") );
setURIType( data, KURIFilterData::LOCAL_DIR );
@@ -193,8 +193,8 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
const TQString man_proto = QFL1("man:");
const TQString info_proto = QFL1("info:");
if( cmd[0] == '#' ||
- cmd.tqfind( man_proto, 0, true ) == 0 ||
- cmd.tqfind( info_proto, 0, true ) == 0 )
+ cmd.find( man_proto, 0, true ) == 0 ||
+ cmd.find( info_proto, 0, true ) == 0 )
{
if( cmd.left(2) == QFL1("##") )
cmd = QFL1("info:/") + cmd.mid(2);
@@ -213,7 +213,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
if ( cmd.startsWith( TQString::tqfromLatin1( "\\\\") ) )
{
// make sure path is unix style
- cmd.tqreplace('\\', '/');
+ cmd.replace('\\', '/');
cmd.prepend( TQString::tqfromLatin1( "smb:" ) );
setFilteredURI( data, KURL( cmd ));
setURIType( data, KURIFilterData::NET_PROTOCOL );
@@ -257,7 +257,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
if( path[0] == '~' )
{
- int slashPos = path.tqfind('/');
+ int slashPos = path.find('/');
if( slashPos == -1 )
slashPos = path.length();
if( slashPos == 1 ) // ~/
@@ -293,7 +293,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
const char* exp = getenv( path.mid( 1, r.matchedLength() - 1 ).local8Bit().data() );
if(exp)
{
- path.tqreplace( 0, r.matchedLength(), TQString::fromLocal8Bit(exp) );
+ path.replace( 0, r.matchedLength(), TQString::fromLocal8Bit(exp) );
expanded = true;
}
}
@@ -303,7 +303,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
{
// Look for #ref again, after $ and ~ expansion (testcase: $QTDIR/doc/html/functions.html#s)
// Can't use KURL here, setPath would escape it...
- int pos = path.tqfind('#');
+ int pos = path.find('#');
if ( pos > -1 )
{
ref = path.mid( pos + 1 );
@@ -354,12 +354,12 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
if ( !exists ) {
// Support for name filter (/foo/*.txt), see also KonqMainWindow::detectNameFilter
// If the app using this filter doesn't support it, well, it'll simply error out itself
- int lastSlash = path.tqfindRev( '/' );
- if ( lastSlash > -1 && path.tqfind( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
+ int lastSlash = path.findRev( '/' );
+ if ( lastSlash > -1 && path.find( ' ', lastSlash ) == -1 ) // no space after last slash, otherwise it's more likely command-line arguments
{
TQString fileName = path.mid( lastSlash + 1 );
TQString testPath = path.left( lastSlash + 1 );
- if ( ( fileName.tqfind( '*' ) != -1 || fileName.tqfind( '[' ) != -1 || fileName.tqfind( '?' ) != -1 )
+ if ( ( fileName.find( '*' ) != -1 || fileName.find( '[' ) != -1 || fileName.find( '?' ) != -1 )
&& stat( TQFile::encodeName(testPath).data(), &buff ) == 0 )
{
nameFilter = fileName;
@@ -453,7 +453,7 @@ bool KShortURIFilter::filterURI( KURIFilterData& data ) const
// Okay this is the code that allows users to supply custom matches for
// specific URLs using Qt's regexp class. This is hard-coded for now.
// TODO: Make configurable at some point...
- if ( !cmd.tqcontains( ' ' ) )
+ if ( !cmd.contains( ' ' ) )
{
TQValueList<URLHint>::ConstIterator it;
for( it = m_urlHints.begin(); it != m_urlHints.end(); ++it )