rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmplayer@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 0d5a05983c
commit 63c4fb318b

@ -968,7 +968,7 @@ int main(int argc, char **argv) {
repeat_count = atol (argv [++i]); repeat_count = atol (argv [++i]);
} else if (!strcmp (argv [i], "-cb")) { } else if (!strcmp (argv [i], "-cb")) {
TQString str = argv [++i]; TQString str = argv [++i];
int pos = str.tqfind ('/'); int pos = str.find ('/');
if (pos > -1) { if (pos > -1) {
fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ()); fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ());
callback = new KMPlayer::Callback_stub callback = new KMPlayer::Callback_stub

@ -171,7 +171,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPart::KMPlayerPart (TQWidget * wtqparent, const char
TQStringList::const_iterator end = args.end (); TQStringList::const_iterator end = args.end ();
int turned_off_features = 0; int turned_off_features = 0;
for ( ; it != end; ++it) { for ( ; it != end; ++it) {
int equalPos = (*it).tqfind("="); int equalPos = (*it).find("=");
if (equalPos > 0) { if (equalPos > 0) {
TQString name = (*it).left (equalPos).lower (); TQString name = (*it).left (equalPos).lower ();
TQString value = (*it).right ((*it).length () - equalPos - 1); TQString value = (*it).right ((*it).length () - equalPos - 1);
@ -434,7 +434,7 @@ KDE_NO_EXPORT bool KMPlayerPart::openURL (const KURL & _url) {
url = KURL (m_docbase, m_file_name); // fix misdetected SRC attr url = KURL (m_docbase, m_file_name); // fix misdetected SRC attr
else if (_url != m_docbase) { else if (_url != m_docbase) {
url = _url; url = _url;
if (!m_file_name.isEmpty () && _url.url ().tqfind (m_file_name) < 0) { if (!m_file_name.isEmpty () && _url.url ().find (m_file_name) < 0) {
KURL u (m_file_name); KURL u (m_file_name);
if ((u.protocol () == TQString ("mms")) || if ((u.protocol () == TQString ("mms")) ||
_url.protocol ().isEmpty ()) { _url.protocol ().isEmpty ()) {
@ -878,10 +878,10 @@ KDE_NO_EXPORT void KMPlayerLiveConnectExtension::evaluate (
const TQString & scr, TQString & result) { const TQString & scr, TQString & result) {
TQString script (scr); TQString script (scr);
KParts::LiveConnectExtension::ArgList args; KParts::LiveConnectExtension::ArgList args;
script = script.tqreplace ('\\', "\\\\"); script = script.replace ('\\', "\\\\");
script = script.tqreplace ('\n', "\\n"); script = script.replace ('\n', "\\n");
script = script.tqreplace ('\r', ""); script = script.replace ('\r', "");
script = script.tqreplace ('"', "\\\""); script = script.replace ('"', "\\\"");
script = TQString ("this.__kmplayer__res=eval(\"%1\")").arg (script); script = TQString ("this.__kmplayer__res=eval(\"%1\")").arg (script);
args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, script)); args.push_back(qMakePair(KParts::LiveConnectExtension::TypeString, script));

@ -410,7 +410,7 @@ bool Runtime::parseParam (const TrieString & name, const TQString & val) {
} }
} }
} else if (name.startsWith ("repeat")) { } else if (name.startsWith ("repeat")) {
if (val.tqfind ("indefinite") > -1) if (val.find ("indefinite") > -1)
repeat_count = dur_infinite; repeat_count = dur_infinite;
else else
repeat_count = val.toInt (); repeat_count = val.toInt ();
@ -556,7 +556,7 @@ void SizeType::reset () {
SizeType & SizeType::operator = (const TQString & s) { SizeType & SizeType::operator = (const TQString & s) {
TQString strval (s); TQString strval (s);
int p = strval.tqfind (TQChar ('%')); int p = strval.find (TQChar ('%'));
if (p > -1) { if (p > -1) {
strval.truncate (p); strval.truncate (p);
perc_size = strval.toDouble (&isset); perc_size = strval.toDouble (&isset);
@ -920,7 +920,7 @@ KDE_NO_EXPORT void AnimateData::reset () {
} else } else
anim_timer = 0; anim_timer = 0;
accumulate = acc_none; accumulate = acc_none;
additive = add_tqreplace; additive = add_replace;
change_by = 0; change_by = 0;
calcMode = calc_linear; calcMode = calc_linear;
change_from.truncate (0); change_from.truncate (0);
@ -1114,7 +1114,7 @@ KDE_NO_EXPORT void AnimateMotionData::reset () {
} else } else
anim_timer = 0; anim_timer = 0;
accumulate = acc_none; accumulate = acc_none;
additive = add_tqreplace; additive = add_replace;
calcMode = calc_linear; calcMode = calc_linear;
change_from.truncate (0); change_from.truncate (0);
change_by.truncate (0); change_by.truncate (0);
@ -1170,7 +1170,7 @@ bool AnimateMotionData::parseParam (const TrieString & name, const TQString & va
} }
bool AnimateMotionData::getCoordinates (const TQString &coord, SizeType &x, SizeType &y) { bool AnimateMotionData::getCoordinates (const TQString &coord, SizeType &x, SizeType &y) {
int p = coord.tqfind (TQChar (',')); int p = coord.find (TQChar (','));
if (p > 0) { if (p > 0) {
x = coord.left (p).stripWhiteSpace (); x = coord.left (p).stripWhiteSpace ();
y = coord.mid (p + 1).stripWhiteSpace (); y = coord.mid (p + 1).stripWhiteSpace ();
@ -1653,7 +1653,7 @@ KDE_NO_EXPORT void SMIL::Smil::closed () {
layout_node = e; layout_node = e;
} else if (e->id == id_node_title) { } else if (e->id == id_node_title) {
TQString str = e->innerText (); TQString str = e->innerText ();
pretty_name = str.left (str.tqfind (TQChar ('\n'))); pretty_name = str.left (str.find (TQChar ('\n')));
} else if (e->id == id_node_meta) { } else if (e->id == id_node_meta) {
Element * elm = convertNode <Element> (e); Element * elm = convertNode <Element> (e);
const TQString name = elm->getAttribute (StringPool::attr_name); const TQString name = elm->getAttribute (StringPool::attr_name);
@ -2630,7 +2630,7 @@ KDE_NO_EXPORT void SMIL::Switch::begin () {
Element *elm = convertNode <Element> (e); Element *elm = convertNode <Element> (e);
TQString lang = elm->getAttribute ("systemLanguage"); TQString lang = elm->getAttribute ("systemLanguage");
if (!lang.isEmpty ()) { if (!lang.isEmpty ()) {
lang = lang.tqreplace (TQChar ('-'), TQChar ('_')); lang = lang.replace (TQChar ('-'), TQChar ('_'));
char *clang = getenv ("LANG"); char *clang = getenv ("LANG");
if (!clang) { if (!clang) {
if (!fallback) if (!fallback)
@ -2691,7 +2691,7 @@ KDE_NO_EXPORT void SMIL::Switch::childDone (NodePtr child) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
KDE_NO_CDTOR_EXPORT SMIL::LinkingBase::LinkingBase (NodePtr & d, short id) KDE_NO_CDTOR_EXPORT SMIL::LinkingBase::LinkingBase (NodePtr & d, short id)
: Element(d, id), show (show_tqreplace) {} : Element(d, id), show (show_replace) {}
KDE_NO_EXPORT void SMIL::LinkingBase::deactivate () { KDE_NO_EXPORT void SMIL::LinkingBase::deactivate () {
mediatype_activated = 0L; mediatype_activated = 0L;

@ -286,7 +286,7 @@ private:
void applyStep (); void applyStep ();
TimerInfoPtrW anim_timer; TimerInfoPtrW anim_timer;
enum { acc_none, acc_sum } accumulate; enum { acc_none, acc_sum } accumulate;
enum { add_tqreplace, add_sum } additive; enum { add_replace, add_sum } additive;
int change_by; int change_by;
enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode; enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode;
TQString change_from; TQString change_from;
@ -315,7 +315,7 @@ private:
bool getCoordinates (const TQString &coord, SizeType &x, SizeType &y); bool getCoordinates (const TQString &coord, SizeType &x, SizeType &y);
TimerInfoPtrW anim_timer; TimerInfoPtrW anim_timer;
enum { acc_none, acc_sum } accumulate; enum { acc_none, acc_sum } accumulate;
enum { add_tqreplace, add_sum } additive; enum { add_replace, add_sum } additive;
enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode; enum { calc_discrete, calc_linear, calc_paced, calc_spline } calcMode;
TQString change_from; TQString change_from;
TQString change_by; TQString change_by;
@ -730,7 +730,7 @@ public:
ConnectionPtr mediatype_activated; ConnectionPtr mediatype_activated;
ConnectionPtr mediatype_attach; ConnectionPtr mediatype_attach;
TQString href; TQString href;
enum { show_new, show_tqreplace } show; enum { show_new, show_replace } show;
protected: protected:
LinkingBase (NodePtr & d, short id); LinkingBase (NodePtr & d, short id);
}; };

@ -612,7 +612,7 @@ KDE_NO_EXPORT void KMPlayerApp::initMenu () {
TQPopupMenu * bookmarkmenu = m_view->controlPanel()->bookmarkMenu (); TQPopupMenu * bookmarkmenu = m_view->controlPanel()->bookmarkMenu ();
m_view->controlPanel()->popupMenu ()->removeItem (KMPlayer::ControlPanel::menu_bookmark); m_view->controlPanel()->popupMenu ()->removeItem (KMPlayer::ControlPanel::menu_bookmark);
menuBar ()->insertItem (i18n ("&Bookmarks"), bookmarkmenu, -1, 2); menuBar ()->insertItem (i18n ("&Bookmarks"), bookmarkmenu, -1, 2);
m_sourcemenu = menuBar ()->tqfindItem (menuBar ()->idAt (0)); m_sourcemenu = menuBar ()->findItem (menuBar ()->idAt (0));
m_sourcemenu->setText (i18n ("S&ource")); m_sourcemenu->setText (i18n ("S&ource"));
m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("dvd_mount"), KIcon::Small, 0, true), i18n ("&DVD"), m_dvdmenu, -1, 5); m_sourcemenu->popup ()->insertItem (KGlobal::iconLoader ()->loadIconSet (TQString ("dvd_mount"), KIcon::Small, 0, true), i18n ("&DVD"), m_dvdmenu, -1, 5);
m_dvdmenu->clear (); m_dvdmenu->clear ();
@ -2020,7 +2020,7 @@ KDE_NO_EXPORT void KMPlayerDVDNavSource::deactivate () {
} }
KDE_NO_EXPORT void KMPlayerDVDNavSource::play () { KDE_NO_EXPORT void KMPlayerDVDNavSource::play () {
if (!m_menu->tqfindItem (DVDNav_previous)) { if (!m_menu->findItem (DVDNav_previous)) {
m_menu->insertItem (i18n ("&Previous"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_previous); m_menu->insertItem (i18n ("&Previous"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_previous);
m_menu->insertItem (i18n ("&Next"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_next); m_menu->insertItem (i18n ("&Next"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_next);
m_menu->insertItem (i18n ("&Root"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_root); m_menu->insertItem (i18n ("&Root"), TQT_TQOBJECT(this), TQT_SLOT (navMenuClicked (int)), 0, DVDNav_root);

@ -434,7 +434,7 @@ void Settings::show (const char * pagename) {
configdialog->m_GeneralPageOutput->videoDriver->setCurrentItem (videodriver); configdialog->m_GeneralPageOutput->videoDriver->setCurrentItem (videodriver);
configdialog->m_GeneralPageOutput->audioDriver->setCurrentItem (audiodriver); configdialog->m_GeneralPageOutput->audioDriver->setCurrentItem (audiodriver);
configdialog->m_SourcePageURL->backend->setCurrentItem (configdialog->m_SourcePageURL->backend->tqfindItem (backends["urlsource"])); configdialog->m_SourcePageURL->backend->setCurrentItem (configdialog->m_SourcePageURL->backend->findItem (backends["urlsource"]));
int id = 0; int id = 0;
const PartBase::ProcessMap::const_iterator e = m_player->players ().end (); const PartBase::ProcessMap::const_iterator e = m_player->players ().end ();
for (PartBase::ProcessMap::const_iterator i = m_player->players ().begin(); i != e; ++i) { for (PartBase::ProcessMap::const_iterator i = m_player->players ().begin(); i != e; ++i) {
@ -599,12 +599,12 @@ void Settings::okPressed () {
if (KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ()).isLocalFile () || if (KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ()).isLocalFile () ||
KURL::isRelativeURL (configdialog->m_SourcePageURL->url->url ())) { KURL::isRelativeURL (configdialog->m_SourcePageURL->url->url ())) {
TQFileInfo fi (configdialog->m_SourcePageURL->url->url ()); TQFileInfo fi (configdialog->m_SourcePageURL->url->url ());
int hpos = configdialog->m_SourcePageURL->url->url ().tqfindRev ('#'); int hpos = configdialog->m_SourcePageURL->url->url ().findRev ('#');
TQString xine_directives (""); TQString xine_directives ("");
while (!fi.exists () && hpos > -1) { while (!fi.exists () && hpos > -1) {
xine_directives = configdialog->m_SourcePageURL->url->url ().mid (hpos); xine_directives = configdialog->m_SourcePageURL->url->url ().mid (hpos);
fi.setFile (configdialog->m_SourcePageURL->url->url ().left (hpos)); fi.setFile (configdialog->m_SourcePageURL->url->url ().left (hpos));
hpos = configdialog->m_SourcePageURL->url->url ().tqfindRev ('#', hpos-1); hpos = configdialog->m_SourcePageURL->url->url ().findRev ('#', hpos-1);
} }
if (!fi.exists ()) { if (!fi.exists ()) {
urlchanged = false; urlchanged = false;
@ -628,10 +628,10 @@ void Settings::okPressed () {
if (urlchanged) { if (urlchanged) {
KURL url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ()); KURL url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->url->url ());
m_player->setURL (url); m_player->setURL (url);
if (urllist.tqfind (url.prettyURL ()) == urllist.end ()) if (urllist.find (url.prettyURL ()) == urllist.end ())
configdialog->m_SourcePageURL->urllist->insertItem (url.prettyURL (), 0); configdialog->m_SourcePageURL->urllist->insertItem (url.prettyURL (), 0);
KURL sub_url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->sub_url->url ()); KURL sub_url = KURL::fromPathOrURL (configdialog->m_SourcePageURL->sub_url->url ());
if (sub_urllist.tqfind (sub_url.prettyURL ()) == sub_urllist.end ()) if (sub_urllist.find (sub_url.prettyURL ()) == sub_urllist.end ())
configdialog->m_SourcePageURL->sub_urllist->insertItem (sub_url.prettyURL (), 0); configdialog->m_SourcePageURL->sub_urllist->insertItem (sub_url.prettyURL (), 0);
} }
urllist.clear (); urllist.clear ();

@ -287,7 +287,7 @@ bool PartBase::setProcess (Mrl *mrl) {
m_config->setGroup (mrl->mimetype); m_config->setGroup (mrl->mimetype);
p = m_config->readEntry ("player", "" ); p = m_config->readEntry ("player", "" );
remember_backend = !(!p.isEmpty () && remember_backend = !(!p.isEmpty () &&
m_players.tqcontains (p) && m_players.contains (p) &&
m_players [p]->supports (m_source->name ())); m_players [p]->supports (m_source->name ()));
} }
} }
@ -300,7 +300,7 @@ bool PartBase::setProcess (Mrl *mrl) {
p = m_config->readEntry (m_source->name (), ""); p = m_config->readEntry (m_source->name (), "");
} }
if (p.isEmpty () || if (p.isEmpty () ||
!m_players.tqcontains (p) || !m_players.contains (p) ||
!m_players [p]->supports (m_source->name ())) { !m_players [p]->supports (m_source->name ())) {
// finally find first supported player // finally find first supported player
p.truncate (0); p.truncate (0);
@ -486,7 +486,7 @@ bool PartBase::openURL (const KURL & url) {
kdDebug () << "PartBase::openURL " << url.url() << url.isValid () << endl; kdDebug () << "PartBase::openURL " << url.url() << url.isValid () << endl;
if (!m_view) return false; if (!m_view) return false;
stop (); stop ();
Source * src = (url.isEmpty () ? m_sources ["urlsource"] : (!url.protocol ().compare ("kmplayer") && m_sources.tqcontains (url.host ()) ? m_sources [url.host ()] : m_sources ["urlsource"])); Source * src = (url.isEmpty () ? m_sources ["urlsource"] : (!url.protocol ().compare ("kmplayer") && m_sources.contains (url.host ()) ? m_sources [url.host ()] : m_sources ["urlsource"]));
src->setSubURL (KURL ()); src->setSubURL (KURL ());
src->setURL (url); src->setURL (url);
setSource (src); setSource (src);
@ -1563,7 +1563,7 @@ TQString URLSource::prettyName () {
static bool isPlayListMime (const TQString & mime) { static bool isPlayListMime (const TQString & mime) {
TQString m (mime); TQString m (mime);
int plugin_pos = m.tqfind ("-plugin"); int plugin_pos = m.find ("-plugin");
if (plugin_pos > 0) if (plugin_pos > 0)
m.truncate (plugin_pos); m.truncate (plugin_pos);
const char * mimestr = m.ascii (); const char * mimestr = m.ascii ();
@ -1616,7 +1616,7 @@ KDE_NO_EXPORT void URLSource::read (NodePtr root, TQTextStream & textstream) {
break; break;
kdDebug () << "Group found: " << line << endl; kdDebug () << "Group found: " << line << endl;
} else if (groupfound) { } else if (groupfound) {
int eq_pos = line.tqfind (TQChar ('=')); int eq_pos = line.find (TQChar ('='));
if (eq_pos > 0) { if (eq_pos > 0) {
if (line.lower ().startsWith (TQString ("numberofentries"))) { if (line.lower ().startsWith (TQString ("numberofentries"))) {
nr = line.mid (eq_pos + 1).stripWhiteSpace ().toInt (); nr = line.mid (eq_pos + 1).stripWhiteSpace ().toInt ();
@ -1874,7 +1874,7 @@ void DataCache::add (const TQString & url, const TQByteArray & data) {
} }
bool DataCache::get (const TQString & url, TQByteArray & data) { bool DataCache::get (const TQString & url, TQByteArray & data) {
DataMap::const_iterator it = cache_map.tqfind (url); DataMap::const_iterator it = cache_map.find (url);
if (it != cache_map.end ()) { if (it != cache_map.end ()) {
data.duplicate (it.data ()); data.duplicate (it.data ());
return true; return true;
@ -1883,7 +1883,7 @@ bool DataCache::get (const TQString & url, TQByteArray & data) {
} }
bool DataCache::preserve (const TQString & url) { bool DataCache::preserve (const TQString & url) {
PreserveMap::const_iterator it = preserve_map.tqfind (url); PreserveMap::const_iterator it = preserve_map.find (url);
if (it == preserve_map.end ()) { if (it == preserve_map.end ()) {
preserve_map.insert (url, true); preserve_map.insert (url, true);
return true; return true;
@ -1892,11 +1892,11 @@ bool DataCache::preserve (const TQString & url) {
} }
bool DataCache::isPreserved (const TQString & url) { bool DataCache::isPreserved (const TQString & url) {
return preserve_map.tqfind (url) != preserve_map.end (); return preserve_map.find (url) != preserve_map.end ();
} }
bool DataCache::unpreserve (const TQString & url) { bool DataCache::unpreserve (const TQString & url) {
const PreserveMap::iterator it = preserve_map.tqfind (url); const PreserveMap::iterator it = preserve_map.find (url);
if (it == preserve_map.end ()) if (it == preserve_map.end ())
return false; return false;
preserve_map.erase (it); preserve_map.erase (it);

@ -1821,7 +1821,7 @@ bool SimpleSAXParser::parse (TQTextStream & d) {
} else { } else {
if (!white_space.isEmpty ()) { if (!white_space.isEmpty ()) {
if (!in_character_data) { if (!in_character_data) {
int pos = white_space.tqfindRev (TQChar ('\n')); int pos = white_space.findRev (TQChar ('\n'));
if (pos > -1) if (pos > -1)
white_space = white_space.mid (pos + 1); white_space = white_space.mid (pos + 1);
} }

@ -692,7 +692,7 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) {
m_source->setLoading (int (m_cacheRegExp.cap(1).toDouble())); m_source->setLoading (int (m_cacheRegExp.cap(1).toDouble()));
} }
} else if (out.startsWith ("ID_LENGTH")) { } else if (out.startsWith ("ID_LENGTH")) {
int pos = out.tqfind ('='); int pos = out.find ('=');
if (pos > 0) { if (pos > 0) {
int l = (int) out.mid (pos + 1).toDouble (&ok); int l = (int) out.mid (pos + 1).toDouble (&ok);
if (ok && l >= 0) { if (ok && l >= 0) {
@ -710,35 +710,35 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) {
kdDebug () << "Reference File " << endl; kdDebug () << "Reference File " << endl;
m_tmpURL.truncate (0); m_tmpURL.truncate (0);
} else if (out.startsWith ("ID_VIDEO_WIDTH")) { } else if (out.startsWith ("ID_VIDEO_WIDTH")) {
int pos = out.tqfind ('='); int pos = out.find ('=');
if (pos > 0) { if (pos > 0) {
int w = out.mid (pos + 1).toInt (); int w = out.mid (pos + 1).toInt ();
m_source->setDimensions (m_mrl, w, m_source->height ()); m_source->setDimensions (m_mrl, w, m_source->height ());
} }
} else if (out.startsWith ("ID_VIDEO_HEIGHT")) { } else if (out.startsWith ("ID_VIDEO_HEIGHT")) {
int pos = out.tqfind ('='); int pos = out.find ('=');
if (pos > 0) { if (pos > 0) {
int h = out.mid (pos + 1).toInt (); int h = out.mid (pos + 1).toInt ();
m_source->setDimensions (m_mrl, m_source->width (), h); m_source->setDimensions (m_mrl, m_source->width (), h);
} }
} else if (out.startsWith ("ID_VIDEO_ASPECT")) { } else if (out.startsWith ("ID_VIDEO_ASPECT")) {
int pos = out.tqfind ('='); int pos = out.find ('=');
if (pos > 0) { if (pos > 0) {
bool ok; bool ok;
TQString val = out.mid (pos + 1); TQString val = out.mid (pos + 1);
float a = val.toFloat (&ok); float a = val.toFloat (&ok);
if (!ok) { if (!ok) {
val.tqreplace (',', '.'); val.replace (',', '.');
a = val.toFloat (&ok); a = val.toFloat (&ok);
} }
if (ok && a > 0.001) if (ok && a > 0.001)
m_source->setAspect (m_mrl, a); m_source->setAspect (m_mrl, a);
} }
} else if (out.startsWith ("ID_AID_")) { } else if (out.startsWith ("ID_AID_")) {
int pos = out.tqfind ('_', 7); int pos = out.find ('_', 7);
if (pos > 0) { if (pos > 0) {
int id = out.mid (7, pos - 7).toInt (); int id = out.mid (7, pos - 7).toInt ();
pos = out.tqfind ('=', pos); pos = out.find ('=', pos);
if (pos > 0) { if (pos > 0) {
if (!alanglist_end) { if (!alanglist_end) {
alanglist = new LangInfo (id, out.mid (pos + 1)); alanglist = new LangInfo (id, out.mid (pos + 1));
@ -751,10 +751,10 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) {
} }
} }
} else if (out.startsWith ("ID_SID_")) { } else if (out.startsWith ("ID_SID_")) {
int pos = out.tqfind ('_', 7); int pos = out.find ('_', 7);
if (pos > 0) { if (pos > 0) {
int id = out.mid (7, pos - 7).toInt (); int id = out.mid (7, pos - 7).toInt ();
pos = out.tqfind ('=', pos); pos = out.find ('=', pos);
if (pos > 0) { if (pos > 0) {
if (!slanglist_end) { if (!slanglist_end) {
slanglist = new LangInfo (id, out.mid (pos + 1)); slanglist = new LangInfo (id, out.mid (pos + 1));
@ -767,10 +767,10 @@ KDE_NO_EXPORT void MPlayer::processOutput (KProcess *, char * str, int slen) {
} }
} }
} else if (out.startsWith ("ICY Info")) { } else if (out.startsWith ("ICY Info")) {
int p = out.tqfind ("StreamTitle=", 8); int p = out.find ("StreamTitle=", 8);
if (p > -1) { if (p > -1) {
p += 12; p += 12;
int e = out.tqfind (';', p); int e = out.find (';', p);
if (e > -1) if (e > -1)
e -= p; e -= p;
((PlayListNotify *)m_source)->setInfoMessage (out.mid (p, e)); ((PlayListNotify *)m_source)->setInfoMessage (out.mid (p, e));
@ -1022,9 +1022,9 @@ bool MEncoder::deMediafiedPlay () {
if (!post090 && myurl.startsWith (TQString ("tv://"))) if (!post090 && myurl.startsWith (TQString ("tv://")))
; // skip it ; // skip it
else if (!post090 && myurl.startsWith (TQString ("vcd://"))) else if (!post090 && myurl.startsWith (TQString ("vcd://")))
args += myurl.tqreplace (0, 6, TQString (" -vcd ")); args += myurl.replace (0, 6, TQString (" -vcd "));
else if (!post090 && myurl.startsWith (TQString ("dvd://"))) else if (!post090 && myurl.startsWith (TQString ("dvd://")))
args += myurl.tqreplace (0, 6, TQString (" -dvd ")); args += myurl.replace (0, 6, TQString (" -dvd "));
else else
args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl))); args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl)));
} }
@ -1084,9 +1084,9 @@ bool MPlayerDumpstream::deMediafiedPlay () {
if (!post090 && myurl.startsWith (TQString ("tv://"))) if (!post090 && myurl.startsWith (TQString ("tv://")))
; // skip it ; // skip it
else if (!post090 && myurl.startsWith (TQString ("vcd://"))) else if (!post090 && myurl.startsWith (TQString ("vcd://")))
args += myurl.tqreplace (0, 6, TQString (" -vcd ")); args += myurl.replace (0, 6, TQString (" -vcd "));
else if (!post090 && myurl.startsWith (TQString ("dvd://"))) else if (!post090 && myurl.startsWith (TQString ("dvd://")))
args += myurl.tqreplace (0, 6, TQString (" -dvd ")); args += myurl.replace (0, 6, TQString (" -dvd "));
else else
args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl))); args += ' ' + KProcess::quote (TQString (TQFile::encodeName (myurl)));
} }
@ -2281,7 +2281,7 @@ KDE_NO_EXPORT TQString NpPlayer::evaluateScript (const TQString & script) {
} }
static int getStreamId (const TQString &path) { static int getStreamId (const TQString &path) {
int p = path.tqfindRev (TQChar ('_')); int p = path.findRev (TQChar ('_'));
if (p < 0) { if (p < 0) {
kdError() << "wrong object path " << path << endl; kdError() << "wrong object path " << path << endl;
return -1; return -1;
@ -2329,7 +2329,7 @@ void NpPlayer::requestStream (const TQString &path, const TQString & url, const
KDE_NO_EXPORT void NpPlayer::destroyStream (const TQString &s) { KDE_NO_EXPORT void NpPlayer::destroyStream (const TQString &s) {
int sid = getStreamId (s); int sid = getStreamId (s);
if (sid >= 0 && streams.tqcontains ((TQ_UINT32) sid)) { if (sid >= 0 && streams.contains ((TQ_UINT32) sid)) {
NpStream *ns = streams[(TQ_UINT32) sid]; NpStream *ns = streams[(TQ_UINT32) sid];
ns->close (); ns->close ();
if (!write_in_progress) if (!write_in_progress)

@ -227,7 +227,7 @@ KDE_NO_EXPORT void TVInput::setNodeName (const TQString & name) {
Node * p = parentNode ().ptr (); Node * p = parentNode ().ptr ();
TQString nm (name); TQString nm (name);
if (p && p->id == id_node_tv_device) { if (p && p->id == id_node_tv_device) {
int pos = name.tqfind (TQString (" - ") + p->mrl ()->pretty_name); int pos = name.find (TQString (" - ") + p->mrl ()->pretty_name);
if (pos > -1) if (pos > -1)
nm.truncate (pos); nm.truncate (pos);
} }

@ -373,8 +373,8 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () {
cmd_done = (line.length () > 3 && line[3] == ' '); // from svdrpsend.pl cmd_done = (line.length () > 3 && line[3] == ' '); // from svdrpsend.pl
// kdDebug () << "readyRead " << cmd_done << " " << commands->command << endl; // kdDebug () << "readyRead " << cmd_done << " " << commands->command << endl;
if (!strcmp (commands->command, cmd_list_channels) && m_document) { if (!strcmp (commands->command, cmd_list_channels) && m_document) {
int p = line.tqfind (';'); int p = line.find (';');
int q = line.tqfind (':'); int q = line.find (':');
if (q > 0 && (p < 0 || q < p)) if (q > 0 && (p < 0 || q < p))
p = q; p = q;
if (p > 0) if (p > 0)
@ -393,7 +393,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () {
if (v && line.length () > 4) { if (v && line.length () > 4) {
TQString ch = line.mid (4); TQString ch = line.mid (4);
setTitle (ch); setTitle (ch);
KMPlayer::PlayListItem * lvi = static_cast <KMPlayer::PlayListItem *> (v->playList ()->tqfindItem (ch, 0)); KMPlayer::PlayListItem * lvi = static_cast <KMPlayer::PlayListItem *> (v->playList ()->findItem (ch, 0));
if (lvi && lvi->node != m_last_channel) { if (lvi && lvi->node != m_last_channel) {
KMPlayer::PlayListItem * si = static_cast <KMPlayer::PlayListItem *> (v->playList ()->selectedItem ()); KMPlayer::PlayListItem * si = static_cast <KMPlayer::PlayListItem *> (v->playList ()->selectedItem ());
bool jump_selection = (si && (si->node == m_document || si->node == m_last_channel)); bool jump_selection = (si && (si->node == m_document || si->node == m_last_channel));
@ -417,7 +417,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () {
} }
} }
} else if (cmd_done && !strcmp(commands->command,cmd_volume_query)){ } else if (cmd_done && !strcmp(commands->command,cmd_volume_query)){
int pos = line.tqfindRev (TQChar (' ')); int pos = line.findRev (TQChar (' '));
if (pos > 0) { if (pos > 0) {
TQString vol = line.mid (pos + 1); TQString vol = line.mid (pos + 1);
if (!vol.compare ("mute")) if (!vol.compare ("mute"))
@ -534,7 +534,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::jump (KMPlayer::NodePtr e) {
KDE_NO_EXPORT void KMPlayerVDRSource::jump (const TQString & channel) { KDE_NO_EXPORT void KMPlayerVDRSource::jump (const TQString & channel) {
TQCString c ("CHAN "); TQCString c ("CHAN ");
TQCString ch = channel.local8Bit (); TQCString ch = channel.local8Bit ();
int p = ch.tqfind (' '); int p = ch.find (' ');
if (p > 0) if (p > 0)
c += ch.left (p); c += ch.left (p);
else else

@ -517,7 +517,7 @@ void View::addText (const TQString & str, bool eol) {
tmplog.truncate (0); tmplog.truncate (0);
m_tmplog_needs_eol = false; m_tmplog_needs_eol = false;
} else { } else {
int pos = tmplog.tqfindRev (TQChar ('\n')); int pos = tmplog.findRev (TQChar ('\n'));
if (pos >= 0) { if (pos >= 0) {
m_multiedit->append (tmplog.left (pos)); m_multiedit->append (tmplog.left (pos));
tmplog = tmplog.mid (pos+1); tmplog = tmplog.mid (pos+1);

@ -70,7 +70,7 @@ extern "C" {
if (args->count () > 1) if (args->count () > 1)
for (int i = 0; i < args->count (); i++) { for (int i = 0; i < args->count (); i++) {
KURL url = args->url (i); KURL url = args->url (i);
if (url.url ().tqfind ("://") < 0) if (url.url ().find ("://") < 0)
url = KURL (TQFileInfo (url.url ()).absFilePath ()); url = KURL (TQFileInfo (url.url ()).absFilePath ());
if (url.isValid ()) if (url.isValid ())
kmplayer->addURL (url); kmplayer->addURL (url);

@ -134,7 +134,7 @@ KDE_NO_CDTOR_EXPORT PlayListView::PlayListView (TQWidget * tqparent, View * view
menu_pix = KGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small); menu_pix = KGlobal::iconLoader ()->loadIcon (TQString ("player_playlist"), KIcon::Small);
config_pix = KGlobal::iconLoader ()->loadIcon (TQString ("configure"), KIcon::Small); config_pix = KGlobal::iconLoader ()->loadIcon (TQString ("configure"), KIcon::Small);
url_pix = KGlobal::iconLoader ()->loadIcon (TQString ("www"), KIcon::Small); url_pix = KGlobal::iconLoader ()->loadIcon (TQString ("www"), KIcon::Small);
m_tqfind = KStdAction::find (TQT_TQOBJECT(this), TQT_SLOT (slotFind ()), ac, "tqfind"); m_find = KStdAction::find (TQT_TQOBJECT(this), TQT_SLOT (slotFind ()), ac, "find");
m_find_next = KStdAction::findNext (TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()), ac, "next"); m_find_next = KStdAction::findNext (TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()), ac, "next");
m_find_next->setEnabled (false); m_find_next->setEnabled (false);
connect (this, TQT_SIGNAL (contextMenuRequested (TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT (contextMenuItem (TQListViewItem *, const TQPoint &, int))); connect (this, TQT_SIGNAL (contextMenuRequested (TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT (contextMenuItem (TQListViewItem *, const TQPoint &, int)));
@ -312,7 +312,7 @@ void PlayListView::selectItem (const TQString & txt) {
TQListViewItem * item = selectedItem (); TQListViewItem * item = selectedItem ();
if (item && item->text (0) == txt) if (item && item->text (0) == txt)
return; return;
item = tqfindItem (txt, 0); item = findItem (txt, 0);
if (item) { if (item) {
setSelected (item, true); setSelected (item, true);
ensureItemVisible (item); ensureItemVisible (item);
@ -346,7 +346,7 @@ KDE_NO_EXPORT void PlayListView::contextMenuItem (TQListViewItem * vi, const TQP
if (item->node || item->m_attr) { if (item->node || item->m_attr) {
RootPlayListItem * ritem = rootItem (vi); RootPlayListItem * ritem = rootItem (vi);
if (m_itemmenu->count () > 0) { if (m_itemmenu->count () > 0) {
m_tqfind->unplug (m_itemmenu); m_find->unplug (m_itemmenu);
m_find_next->unplug (m_itemmenu); m_find_next->unplug (m_itemmenu);
m_itemmenu->clear (); m_itemmenu->clear ();
} }
@ -368,7 +368,7 @@ KDE_NO_EXPORT void PlayListView::contextMenuItem (TQListViewItem * vi, const TQP
m_itemmenu->setItemChecked (2, ritem->show_all_nodes); m_itemmenu->setItemChecked (2, ritem->show_all_nodes);
} }
m_itemmenu->insertSeparator (); m_itemmenu->insertSeparator ();
m_tqfind->plug (m_itemmenu); m_find->plug (m_itemmenu);
m_find_next->plug (m_itemmenu); m_find_next->plug (m_itemmenu);
emit prepareMenu (item, m_itemmenu); emit prepareMenu (item, m_itemmenu);
m_itemmenu->exec (p); m_itemmenu->exec (p);
@ -506,7 +506,7 @@ KDE_NO_EXPORT void PlayListView::itemIsRenamed (TQListViewItem * qitem) {
updateTree (ri, item->node, true); updateTree (ri, item->node, true);
} else if (item->m_attr) { } else if (item->m_attr) {
TQString txt = item->text (0); TQString txt = item->text (0);
int pos = txt.tqfind (TQChar ('=')); int pos = txt.find (TQChar ('='));
if (pos > -1) { if (pos > -1) {
item->m_attr->setName (txt.left (pos)); item->m_attr->setName (txt.left (pos));
item->m_attr->setValue (txt.mid (pos + 1)); item->m_attr->setValue (txt.mid (pos + 1));
@ -553,7 +553,7 @@ KDE_NO_EXPORT void PlayListView::editCurrent () {
KDE_NO_EXPORT void PlayListView::slotFind () { KDE_NO_EXPORT void PlayListView::slotFind () {
m_current_find_elm = 0L; m_current_find_elm = 0L;
if (!m_find_dialog) { if (!m_find_dialog) {
m_find_dialog = new KFindDialog (false, this, "kde_kmplayer_tqfind", KFindDialog::CaseSensitive); m_find_dialog = new KFindDialog (false, this, "kde_kmplayer_find", KFindDialog::CaseSensitive);
m_find_dialog->setHasSelection (false); m_find_dialog->setHasSelection (false);
connect(m_find_dialog, TQT_SIGNAL(okClicked ()), this, TQT_SLOT(slotFindOk ())); connect(m_find_dialog, TQT_SIGNAL(okClicked ()), this, TQT_SLOT(slotFindOk ()));
} else } else
@ -607,7 +607,7 @@ KDE_NO_EXPORT void PlayListView::slotFindOk () {
slotFindNext (); slotFindNext ();
} }
/* A bit tricky, but between the tqfind's PlayListItems might be gone, so /* A bit tricky, but between the find's PlayListItems might be gone, so
* try to match on the generated tree following the source's document tree * try to match on the generated tree following the source's document tree
*/ */
KDE_NO_EXPORT void PlayListView::slotFindNext () { KDE_NO_EXPORT void PlayListView::slotFindNext () {
@ -640,9 +640,9 @@ KDE_NO_EXPORT void PlayListView::slotFindNext () {
} else if (!elm) } else if (!elm)
val = n->nodeValue (); val = n->nodeValue ();
if (((opt & KFindDialog::RegularExpression) && if (((opt & KFindDialog::RegularExpression) &&
val.tqfind (regexp, 0) > -1) || val.find (regexp, 0) > -1) ||
(!(opt & KFindDialog::RegularExpression) && (!(opt & KFindDialog::RegularExpression) &&
val.tqfind (str, 0, cs) > -1)) { val.find (str, 0, cs) > -1)) {
node = n; node = n;
m_current_find_attr = 0L; m_current_find_attr = 0L;
found = true; found = true;
@ -650,9 +650,9 @@ KDE_NO_EXPORT void PlayListView::slotFindNext () {
for (AttributePtr a = convertNode <Element> (n)->attributes ()->first (); a; a = a->nextSibling ()) { for (AttributePtr a = convertNode <Element> (n)->attributes ()->first (); a; a = a->nextSibling ()) {
TQString attr = a->name ().toString (); TQString attr = a->name ().toString ();
if (((opt & KFindDialog::RegularExpression) && if (((opt & KFindDialog::RegularExpression) &&
(attr.tqfind (regexp, 0) || a->value ().tqfind (regexp, 0) > -1)) || (attr.find (regexp, 0) || a->value ().find (regexp, 0) > -1)) ||
(!(opt & KFindDialog::RegularExpression) && (!(opt & KFindDialog::RegularExpression) &&
(attr.tqfind (str, 0, cs) > -1 || a->value ().tqfind (str, 0, cs) > -1))) { (attr.find (str, 0, cs) > -1 || a->value ().find (str, 0, cs) > -1))) {
node = n; node = n;
m_current_find_attr = a; m_current_find_attr = a;
found = true; found = true;

@ -136,7 +136,7 @@ private:
SharedPtr <TreeUpdate> tree_update; SharedPtr <TreeUpdate> tree_update;
View * m_view; View * m_view;
TQPopupMenu * m_itemmenu; TQPopupMenu * m_itemmenu;
KAction * m_tqfind; KAction * m_find;
KAction * m_find_next; KAction * m_find_next;
KFindDialog * m_find_dialog; KFindDialog * m_find_dialog;
TQPixmap folder_pix; TQPixmap folder_pix;

@ -158,7 +158,7 @@ KDE_NO_EXPORT void Preferences::addPrefPage (PreferencesPage * page) {
page->prefLocation (item, icon, subitem); page->prefLocation (item, icon, subitem);
if (item.isEmpty ()) if (item.isEmpty ())
return; return;
TQMap<TQString, TQTabWidget *>::iterator en_it = entries.tqfind (item); TQMap<TQString, TQTabWidget *>::iterator en_it = entries.find (item);
if (en_it == entries.end ()) { if (en_it == entries.end ()) {
frame = addPage (item, TQString(), KGlobal::iconLoader()->loadIcon ((icon), KIcon::NoGroup, 32)); frame = addPage (item, TQString(), KGlobal::iconLoader()->loadIcon ((icon), KIcon::NoGroup, 32));
vlay = new TQVBoxLayout (frame, marginHint(), spacingHint()); vlay = new TQVBoxLayout (frame, marginHint(), spacingHint());
@ -176,7 +176,7 @@ KDE_NO_EXPORT void Preferences::removePrefPage(PreferencesPage * page) {
page->prefLocation (item, icon, subitem); page->prefLocation (item, icon, subitem);
if (item.isEmpty ()) if (item.isEmpty ())
return; return;
TQMap<TQString, TQTabWidget *>::iterator en_it = entries.tqfind (item); TQMap<TQString, TQTabWidget *>::iterator en_it = entries.find (item);
if (en_it == entries.end ()) if (en_it == entries.end ())
return; return;
TQTabWidget * tab = en_it.data (); TQTabWidget * tab = en_it.data ();
@ -462,7 +462,7 @@ KDE_NO_EXPORT void PrefRecordPage::sourceChanged (Source * olds, Source * nws) {
} }
if (nws) { if (nws) {
for (RecorderPage * p = m_recorders; p; p = p->next, ++id) { for (RecorderPage * p = m_recorders; p; p = p->next, ++id) {
TQButton * radio = recorder->tqfind (id); TQButton * radio = recorder->find (id);
bool b = m_player->recorders () [p->recorderName ()]->supports (nws->name ()); bool b = m_player->recorders () [p->recorderName ()]->supports (nws->name ());
radio->setEnabled (b); radio->setEnabled (b);
if (b) nr_recs++; if (b) nr_recs++;
@ -475,7 +475,7 @@ KDE_NO_EXPORT void PrefRecordPage::sourceChanged (Source * olds, Source * nws) {
} }
KDE_NO_EXPORT void PrefRecordPage::recorderClicked (int id) { KDE_NO_EXPORT void PrefRecordPage::recorderClicked (int id) {
bool b = recorder->tqfind(id)->text().tqfind (TQString::tqfromLatin1("Xine")) > -1; bool b = recorder->find(id)->text().find (TQString::tqfromLatin1("Xine")) > -1;
replay->setEnabled (!b); replay->setEnabled (!b);
if (b) if (b)
replay->setButton (Settings::ReplayNo); replay->setButton (Settings::ReplayNo);

@ -118,7 +118,7 @@ void CachedImage::setUrl (const TQString & url) {
if (url.isEmpty ()) { if (url.isEmpty ()) {
data = ImageDataPtr (new ImageData (url)); data = ImageDataPtr (new ImageData (url));
} else { } else {
ImageDataMap::iterator i = image_data_map->tqfind (url); ImageDataMap::iterator i = image_data_map->find (url);
if (i == image_data_map->end ()) { if (i == image_data_map->end ()) {
data = ImageDataPtr (new ImageData (url)); data = ImageDataPtr (new ImageData (url));
image_data_map->insert (url, ImageDataPtrW (data)); image_data_map->insert (url, ImageDataPtrW (data));
@ -741,7 +741,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) {
int line_count = 0; int line_count = 0;
Single min_xoff = w; Single min_xoff = w;
while (!str.isEmpty ()) { while (!str.isEmpty ()) {
int len = str.tqfind (TQChar ('\n')); int len = str.find (TQChar ('\n'));
bool skip_cr = false; bool skip_cr = false;
if (len > 1 && str[len-1] == TQChar ('\r')) { if (len > 1 && str[len-1] == TQChar ('\r')) {
--len; --len;
@ -764,7 +764,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) {
int br_pos = int (line->txt.length () * frag); //educated guess int br_pos = int (line->txt.length () * frag); //educated guess
while (br_pos > 0) { while (br_pos > 0) {
line->txt.truncate (br_pos); line->txt.truncate (br_pos);
br_pos = line->txt.tqfindRev (TQChar (' ')); br_pos = line->txt.findRev (TQChar (' '));
if (br_pos < 1) if (br_pos < 1)
break; break;
line->txt.truncate (br_pos); line->txt.truncate (br_pos);

@ -1093,7 +1093,7 @@ int main(int argc, char **argv) {
configfile[sizeof (configfile) - 1] = 0; configfile[sizeof (configfile) - 1] = 0;
} else if (!strcmp (argv [i], "-cb") && ++i < argc) { } else if (!strcmp (argv [i], "-cb") && ++i < argc) {
TQString str = argv [i]; TQString str = argv [i];
int pos = str.tqfind ('/'); int pos = str.find ('/');
if (pos > -1) { if (pos > -1) {
fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ()); fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ());
callback = new KMPlayer::Callback_stub callback = new KMPlayer::Callback_stub

@ -648,7 +648,7 @@ int main(int argc, char **argv) {
configfile[sizeof (configfile) - 1] = 0; configfile[sizeof (configfile) - 1] = 0;
} else if (!strcmp (argv [i], "-cb")) { } else if (!strcmp (argv [i], "-cb")) {
TQString str = argv [++i]; TQString str = argv [++i];
int pos = str.tqfind ('/'); int pos = str.find ('/');
if (pos > -1) { if (pos > -1) {
fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ()); fprintf (stderr, "callback is %s %s\n", str.left (pos).ascii (), str.mid (pos + 1).ascii ());
callback = new KMPlayer::Callback_stub callback = new KMPlayer::Callback_stub

Loading…
Cancel
Save