rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


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

@ -43,7 +43,7 @@ DrivesCombo::DrivesCombo(TQWidget* tqparent, const char* name)
while (!stream.eof()) while (!stream.eof())
{ {
line = stream.readLine(); line = stream.readLine();
if (line.tqcontains("cdfss")) if (line.contains("cdfss"))
{ {
kdDebug() << "DrivesCombo: found disc drive: " << line.section(' ', 0, 0) << endl; kdDebug() << "DrivesCombo: found disc drive: " << line.section(' ', 0, 0) << endl;
drives.append(line.section(' ', 0, 0)); drives.append(line.section(' ', 0, 0));

@ -39,9 +39,9 @@ GoogleImage::GoogleImage(TQString thumbURL, TQString size)
{ {
// thumbURL is in the following format - and we can regex the imageURL // thumbURL is in the following format - and we can regex the imageURL
// images?q=tbn:hKSEWNB8aNcJ:www.styxnet.com/deyoung/styx/stygians/cp_portrait.jpg // images?q=tbn:hKSEWNB8aNcJ:www.styxnet.com/deyoung/styx/stygians/cp_portrait.jpg
m_thumbURL = thumbURL.tqreplace("\"",""); m_thumbURL = thumbURL.replace("\"","");
m_imageURL = thumbURL.remove(TQRegExp("^.*q=tbn:[^:]*:")).tqreplace("\"",""); m_imageURL = thumbURL.remove(TQRegExp("^.*q=tbn:[^:]*:")).replace("\"","");
m_size = size.tqreplace("pixels - ", "\n(") + ")"; m_size = size.replace("pixels - ", "\n(") + ")";
} }
@ -120,28 +120,28 @@ void GoogleFetcher::slotLoadImageURLs(GoogleFetcher::ImageSize size)
// Go through each of the top (table) nodes // Go through each of the top (table) nodes
int pos = text.tqfind("/imgres?imgurl"); int pos = text.find("/imgres?imgurl");
int tpos; int tpos;
TQString s, c; TQString s, c;
while ( pos>-1 ) { while ( pos>-1 ) {
text = text.right( text.length()-pos-14 ); text = text.right( text.length()-pos-14 );
tpos = text.tqfind("&h="); tpos = text.find("&h=");
text = text.right( text.length()-tpos-3 ); text = text.right( text.length()-tpos-3 );
tpos = text.tqfind("&w="); tpos = text.find("&w=");
c = "pixels - " + text.left( tpos ); c = "pixels - " + text.left( tpos );
text = text.right( text.length()-tpos-3 ); text = text.right( text.length()-tpos-3 );
tpos = text.tqfind("&sz="); tpos = text.find("&sz=");
c = c + "x" + text.left( tpos ); c = c + "x" + text.left( tpos );
tpos = text.tqfind("src="); tpos = text.find("src=");
text = text.right( text.length()-tpos-4 ); text = text.right( text.length()-tpos-4 );
if ( (tpos=text.tqfind("width="))==-1 ) if ( (tpos=text.find("width="))==-1 )
break; break;
s = text.left( tpos-1 ); s = text.left( tpos-1 );
text = text.right( text.length()-tpos ); text = text.right( text.length()-tpos );
if ( (tpos=text.tqfind("></a>"))==-1 ) if ( (tpos=text.find("></a>"))==-1 )
break; break;
m_imageList.append(GoogleImage(s, c)); m_imageList.append(GoogleImage(s, c));
pos = text.tqfind("/imgres?imgurl"); pos = text.find("/imgres?imgurl");
} }
} // try } // try
catch (DOM::DOMException &e) catch (DOM::DOMException &e)
@ -273,7 +273,7 @@ bool GoogleFetcher::requestNewSearchTerms(bool noResults)
bool GoogleFetcher::hasImageResults( TQString &doc ) bool GoogleFetcher::hasImageResults( TQString &doc )
{ {
if ( !doc.tqcontains( "/imgres?imgurl" ) ) if ( !doc.contains( "/imgres?imgurl" ) )
return false; return false;
return true; return true;

@ -545,7 +545,7 @@ void PlayList::slotToggleShuffle()
void PlayList::slotPlaylistLoad() void PlayList::slotPlaylistLoad()
{ {
TQString path = KFileDialog::getOpenFileName(":kaffeine_openPlaylist", TQString("*.kaffeine|") + i18n("Kaffeine Playlists") + "\n*.*|" + i18n("All Files"), 0, i18n("Open Playlist")); TQString path = KFileDialog::getOpenFileName(":kaffeine_openPlaylist", TQString("*.kaffeine|") + i18n("Kaffeine Playlists") + "\n*.*|" + i18n("All Files"), 0, i18n("Open Playlist"));
if (path.isEmpty() || (!path.tqcontains(".kaffeine", false))) if (path.isEmpty() || (!path.contains(".kaffeine", false)))
return; return;
loadPlaylist(path); loadPlaylist(path);
@ -904,7 +904,7 @@ void PlayList::setCurrentEntry(TQListViewItem* item, bool playIcon)
} }
m_currentEntry = item; m_currentEntry = item;
if (m_random) if (m_random)
m_currentRandomListEntry = m_randomList.tqfind(item); m_currentRandomListEntry = m_randomList.find(item);
m_currentEntryMRL = newItem->toMRL(); m_currentEntryMRL = newItem->toMRL();
roller->setTitle( m_currentEntryMRL ); roller->setTitle( m_currentEntryMRL );
m_list->setCurrentItem(m_currentEntry); m_list->setCurrentItem(m_currentEntry);
@ -943,14 +943,14 @@ TQListViewItem* PlayList::insertItem(TQListViewItem* after, const MRL& m)
else else
tmp->setPixmap(MIME_COLUMN, KMimeType::mimeType(mrl.mime())->pixmap(KIcon::Small)); tmp->setPixmap(MIME_COLUMN, KMimeType::mimeType(mrl.mime())->pixmap(KIcon::Small));
if (tmp->length().tqcontains(':')) if (tmp->length().contains(':'))
m_playTime += timeStringToMs(tmp->length()); m_playTime += timeStringToMs(tmp->length());
if (m_searchSelection) if (m_searchSelection)
{ {
TQString text = m_playlistFilter->text(); TQString text = m_playlistFilter->text();
if ((!tmp->title().tqcontains(text, false)) && (!tmp->url().tqcontains(text, false)) if ((!tmp->title().contains(text, false)) && (!tmp->url().contains(text, false))
&& (!tmp->artist().tqcontains(text, false)) && (!tmp->album().tqcontains(text, false))) && (!tmp->artist().contains(text, false)) && (!tmp->album().contains(text, false)))
{ {
tmp->setVisible(false); tmp->setVisible(false);
} }
@ -958,7 +958,7 @@ TQListViewItem* PlayList::insertItem(TQListViewItem* after, const MRL& m)
if (tmp->isVisible()) if (tmp->isVisible())
{ {
if (tmp->length().tqcontains(':')); if (tmp->length().contains(':'));
m_playTimeVisible += timeStringToMs(tmp->length()); m_playTimeVisible += timeStringToMs(tmp->length());
m_countVisible++; m_countVisible++;
} }
@ -1042,7 +1042,7 @@ void PlayList::add(const TQStringList& urlList, TQListViewItem* after)
mediaName = url.mid(14); mediaName = url.mid(14);
else else
mediaName = url.mid(7); mediaName = url.mid(7);
int slash = mediaName.tqfind("/"); int slash = mediaName.find("/");
TQString filePath(mediaName.mid(slash)); TQString filePath(mediaName.mid(slash));
if (filePath == "/") if (filePath == "/")
filePath = ""; filePath = "";
@ -1099,7 +1099,7 @@ void PlayList::add(const TQStringList& urlList, TQListViewItem* after)
/*********** determine extension and mime type ************/ /*********** determine extension and mime type ************/
ext = mrl.kurl().fileName(); ext = mrl.kurl().fileName();
ext = ext.remove(0 , ext.tqfindRev('.') +1).lower(); ext = ext.remove(0 , ext.findRev('.') +1).lower();
// kdDebug() << "Extension: " << ext << endl; // kdDebug() << "Extension: " << ext << endl;
//kdDebug() << "PlayList: Try to determine mime of: " << mrl.url() << endl; //kdDebug() << "PlayList: Try to determine mime of: " << mrl.url() << endl;
@ -1130,24 +1130,24 @@ void PlayList::add(const TQStringList& urlList, TQListViewItem* after)
TQString secondLine = stream.readLine(); TQString secondLine = stream.readLine();
file.close(); file.close();
if (secondLine.tqcontains("kaffeine", false)) if (secondLine.contains("kaffeine", false))
{ {
kdDebug() << "PlayList: Try loading kaffeine playlist\n"; kdDebug() << "PlayList: Try loading kaffeine playlist\n";
playlist = PlaylistImport::kaffeine(mrl.url(), mrlList); playlist = PlaylistImport::kaffeine(mrl.url(), mrlList);
if (!playlist) if (!playlist)
continue; continue;
} }
if (secondLine.tqcontains("noatun", false)) if (secondLine.contains("noatun", false))
{ {
kdDebug() << "PlayList: Try loading noatun playlist\n"; kdDebug() << "PlayList: Try loading noatun playlist\n";
playlist = PlaylistImport::noatun(mrl.url(), mrlList); playlist = PlaylistImport::noatun(mrl.url(), mrlList);
} }
if (firstLine.tqcontains("asx", false)) if (firstLine.contains("asx", false))
{ {
kdDebug() << "PlayList: Try loading asx playlist\n"; kdDebug() << "PlayList: Try loading asx playlist\n";
playlist = PlaylistImport::asx(mrl.url(), mrlList); playlist = PlaylistImport::asx(mrl.url(), mrlList);
} }
if ( (firstLine.tqcontains("[playlist]", false)) || (ext == "pls") ) if ( (firstLine.contains("[playlist]", false)) || (ext == "pls") )
{ {
kdDebug() << "PlayList: Try loading pls playlist\n"; kdDebug() << "PlayList: Try loading pls playlist\n";
playlist = PlaylistImport::pls(mrl.url(), mrlList); playlist = PlaylistImport::pls(mrl.url(), mrlList);
@ -1228,7 +1228,7 @@ void PlayList::add(const TQStringList& urlList, TQListViewItem* after)
TQListViewItemIterator it(m_list); TQListViewItemIterator it(m_list);
while (it.current()) while (it.current())
{ {
if (dynamic_cast<PlaylistItem*>(*it)->mime().tqcontains("video")) if (dynamic_cast<PlaylistItem*>(*it)->mime().contains("video"))
movies << dynamic_cast<PlaylistItem*>(*it)->url(); movies << dynamic_cast<PlaylistItem*>(*it)->url();
++it; ++it;
} }
@ -1263,7 +1263,7 @@ void PlayList::add(const TQStringList& urlList, TQListViewItem* after)
* those starting with a different name than the movie, * those starting with a different name than the movie,
* prompt the user to select a sub * prompt the user to select a sub
*/ */
if (mime->name().tqcontains("video")) if (mime->name().contains("video"))
{ {
kdDebug() << "PlayList: Check for subtitle files" << endl; kdDebug() << "PlayList: Check for subtitle files" << endl;
subtitleURL = TQString(); subtitleURL = TQString();
@ -1331,7 +1331,7 @@ void PlayList::add(const TQStringList& urlList, TQListViewItem* after)
if (!subtitleURL.isNull()) if (!subtitleURL.isNull())
{ {
kdDebug() << "PlayList: Use subtitle file: " << subtitleURL << " for: " << mrl.url() << endl; kdDebug() << "PlayList: Use subtitle file: " << subtitleURL << " for: " << mrl.url() << endl;
mrl.setCurrentSubtitle(subs.tqfindIndex(subtitleURL)); mrl.setCurrentSubtitle(subs.findIndex(subtitleURL));
} }
} }
} /* if localFile() */ } /* if localFile() */
@ -1518,7 +1518,7 @@ void PlayList::getMetaInfo(MRL& mrl, const TQString& mimeName)
if (keys[n] == "Title") if (keys[n] == "Title")
{ {
title = metaGroup.item(keys[n]).value().toString().simplifyWhiteSpace(); title = metaGroup.item(keys[n]).value().toString().simplifyWhiteSpace();
if ((!title.isEmpty()) && (title.tqcontains(TQRegExp("\\w")) > 2) && (title.left(5).lower() != "track")) if ((!title.isEmpty()) && (title.contains(TQRegExp("\\w")) > 2) && (title.left(5).lower() != "track"))
{ {
if ((m_useAlternateEncoding) && (CodecUtf8->heuristicContentMatch(title.ascii(), title.length()) < 0)) if ((m_useAlternateEncoding) && (CodecUtf8->heuristicContentMatch(title.ascii(), title.length()) < 0))
{ {
@ -1596,7 +1596,7 @@ void PlayList::mergeMeta(const MRL& mrl)
} }
if (addTime) if (addTime)
{ {
if (tmp->length().tqcontains(':')); if (tmp->length().contains(':'));
{ {
m_playTime += timeStringToMs(tmp->length()); m_playTime += timeStringToMs(tmp->length());
if (tmp->isVisible()) if (tmp->isVisible())
@ -1681,7 +1681,7 @@ void PlayList::setCover( TQString s1, TQString s2, bool forceFetch )
TQImage img; TQImage img;
TQPixmap pix; TQPixmap pix;
TQString fname = s1+"_"+s2; TQString fname = s1+"_"+s2;
fname = fname.tqreplace( TQChar( '/' ), "_" ); fname = fname.replace( TQChar( '/' ), "_" );
fname = fname.upper(); fname = fname.upper();
fname = s+"covers/"+fname; fname = s+"covers/"+fname;
if ( !forceFetch && TQFile( fname ).exists() ) if ( !forceFetch && TQFile( fname ).exists() )
@ -1751,7 +1751,7 @@ void PlayList::slotRemoveSelected()
{ {
// kdDebug() << "Remove " << selected.at(i)->text(TITLE_COLUMN) << "\n"; // kdDebug() << "Remove " << selected.at(i)->text(TITLE_COLUMN) << "\n";
item = dynamic_cast<PlaylistItem *>(selected.at(i)); item = dynamic_cast<PlaylistItem *>(selected.at(i));
if (item->length().tqcontains(':')) if (item->length().contains(':'))
{ {
m_playTime -= timeStringToMs(item->length()); m_playTime -= timeStringToMs(item->length());
m_playTimeVisible -= timeStringToMs(item->length()); m_playTimeVisible -= timeStringToMs(item->length());
@ -1803,8 +1803,8 @@ void PlayList::setPlaylist(const TQString& name, bool clear)
if (clear) if (clear)
clearList(); clearList();
int index = 0; int index = 0;
if (m_playlistSelector->listBox()->tqfindItem(name)) if (m_playlistSelector->listBox()->findItem(name))
index = m_playlistSelector->listBox()->index(m_playlistSelector->listBox()->tqfindItem(name)); index = m_playlistSelector->listBox()->index(m_playlistSelector->listBox()->findItem(name));
else else
m_playlistSelector->insertItem(name, 0); m_playlistSelector->insertItem(name, 0);
m_playlistSelector->setCurrentItem(index); m_playlistSelector->setCurrentItem(index);
@ -1855,7 +1855,7 @@ void PlayList::slotNewPlaylistName(const TQString& text)
{ {
if ((text.isEmpty()) || (text == m_playlistSelector->text(m_currentPlaylist))) if ((text.isEmpty()) || (text == m_playlistSelector->text(m_currentPlaylist)))
return; return;
if (m_playlistSelector->listBox()->tqfindItem(text)) if (m_playlistSelector->listBox()->findItem(text))
{ {
kdDebug() << "PlayList: Name still exists!" << endl; kdDebug() << "PlayList: Name still exists!" << endl;
return; return;
@ -1905,7 +1905,7 @@ void PlayList::loadPlaylist(const TQString& pl)
saveCurrentPlaylist(); saveCurrentPlaylist();
TQString plName = KURL(pl).fileName(); TQString plName = KURL(pl).fileName();
plName = plName.remove(".kaffeine", false); plName = plName.remove(".kaffeine", false);
if (m_playlistSelector->listBox()->tqfindItem(plName)) if (m_playlistSelector->listBox()->findItem(plName))
{ {
TQString plNewName = NULL; TQString plNewName = NULL;
while (true) while (true)
@ -1915,7 +1915,7 @@ void PlayList::loadPlaylist(const TQString& pl)
i18n("Enter different playlist name:"), TQLineEdit::Normal, plName, &ok); i18n("Enter different playlist name:"), TQLineEdit::Normal, plName, &ok);
if ((ok) && (!plNewName.isEmpty())) if ((ok) && (!plNewName.isEmpty()))
{ {
if (m_playlistSelector->listBox()->tqfindItem(plNewName)) if (m_playlistSelector->listBox()->findItem(plNewName))
continue; continue;
else else
break; break;
@ -2093,11 +2093,11 @@ void PlayList::slotFindText(const TQString& text)
while ( it.current() ) while ( it.current() )
{ {
tmp = dynamic_cast<PlaylistItem *>(it.current()); tmp = dynamic_cast<PlaylistItem *>(it.current());
if (text.isEmpty() || tmp->title().tqcontains(text, false) || tmp->url().tqcontains(text, false) if (text.isEmpty() || tmp->title().contains(text, false) || tmp->url().contains(text, false)
|| tmp->artist().tqcontains(text, false) || tmp->album().tqcontains(text, false) ) || tmp->artist().contains(text, false) || tmp->album().contains(text, false) )
{ {
tmp->setVisible(true); tmp->setVisible(true);
if (tmp->length().tqcontains(':')) if (tmp->length().contains(':'))
m_playTimeVisible += timeStringToMs(tmp->length()); m_playTimeVisible += timeStringToMs(tmp->length());
m_countVisible++; m_countVisible++;

@ -146,7 +146,7 @@ void UrlListView::slotShowContextMenu(TQListViewItem* item, const TQPoint& pos,
else else
{ {
m_itemOfContextMenu = dynamic_cast<PlaylistItem *>(item); m_itemOfContextMenu = dynamic_cast<PlaylistItem *>(item);
if (m_itemOfContextMenu->mime().tqcontains("video")) if (m_itemOfContextMenu->mime().contains("video"))
enableSubEntry(); enableSubEntry();
else else
disableSubEntry(); disableSubEntry();
@ -291,7 +291,7 @@ void UrlListView::slotAddSubtitle()
TQString subtitleURL = KFileDialog::getOpenURL(openURL, TQString subtitleURL = KFileDialog::getOpenURL(openURL,
i18n("*.smi *.srt *.sub *.txt *.ssa *.asc|Subtitle Files\n*.*|All Files"), i18n("*.smi *.srt *.sub *.txt *.ssa *.asc|Subtitle Files\n*.*|All Files"),
0, i18n("Select Subtitle File")).path(); 0, i18n("Select Subtitle File")).path();
if(!(subtitleURL.isEmpty()) && !(m_itemOfContextMenu->subtitles().tqcontains(subtitleURL)) && TQFile::exists(subtitleURL)) if(!(subtitleURL.isEmpty()) && !(m_itemOfContextMenu->subtitles().contains(subtitleURL)) && TQFile::exists(subtitleURL))
{ {
m_itemOfContextMenu->addSubtitle(subtitleURL); m_itemOfContextMenu->addSubtitle(subtitleURL);
emit signalPlayItem(m_itemOfContextMenu); emit signalPlayItem(m_itemOfContextMenu);

@ -107,7 +107,7 @@ bool CDDB::readLine(TQCString& ret)
while (read_length < 40000) while (read_length < 40000)
{ {
// Look for a \n in buf // Look for a \n in buf
int ni = buf.tqfind('\n'); int ni = buf.find('\n');
if (ni >= 0) if (ni >= 0)
{ {
// Nice, so return this substring (without the \n), // Nice, so return this substring (without the \n),
@ -200,14 +200,14 @@ static int get_code (const TQCString &s)
static void parse_query_resp (const TQCString& _r, TQCString& catg, TQCString& d_id, TQCString& title) static void parse_query_resp (const TQCString& _r, TQCString& catg, TQCString& d_id, TQCString& title)
{ {
TQCString r = _r.stripWhiteSpace(); TQCString r = _r.stripWhiteSpace();
int i = r.tqfind(' '); int i = r.find(' ');
if (i) if (i)
{ {
catg = r.left(i).stripWhiteSpace(); catg = r.left(i).stripWhiteSpace();
r.remove(0, i+1); r.remove(0, i+1);
r = r.stripWhiteSpace(); r = r.stripWhiteSpace();
} }
i = r.tqfind(' '); i = r.find(' ');
if (i) if (i)
{ {
d_id = r.left(i).stripWhiteSpace(); d_id = r.left(i).stripWhiteSpace();
@ -265,7 +265,7 @@ bool CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream)
else if (r.left(6) == "TTITLE") else if (r.left(6) == "TTITLE")
{ {
r.remove(0, 6); r.remove(0, 6);
int e = r.tqfind('='); int e = r.find('=');
if (e) if (e)
{ {
bool ok; bool ok;
@ -281,7 +281,7 @@ bool CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream)
/* XXX We should canonicalize the strings ("\n" --> '\n' e.g.) */ /* XXX We should canonicalize the strings ("\n" --> '\n' e.g.) */
int si = m_title.tqfind(" / "); int si = m_title.find(" / ");
if (si > 0) if (si > 0)
{ {
m_artist = m_title.left(si).stripWhiteSpace(); m_artist = m_title.left(si).stripWhiteSpace();
@ -292,18 +292,18 @@ bool CDDB::parse_read_resp(TQTextStream *stream, TQTextStream *write_stream)
if (m_title.isEmpty()) if (m_title.isEmpty())
m_title = i18n("No Title"); m_title = i18n("No Title");
/*else /*else
m_title.tqreplace(TQRegExp("/"), "%2f");*/ m_title.replace(TQRegExp("/"), "%2f");*/
if (m_artist.isEmpty()) if (m_artist.isEmpty())
m_artist = i18n("Unknown"); m_artist = i18n("Unknown");
/*else /*else
m_artist.tqreplace(TQRegExp("/"), "%2f");*/ m_artist.replace(TQRegExp("/"), "%2f");*/
kdDebug(7101) << "CDDB: found Title: `" << m_title << "'" << endl; kdDebug(7101) << "CDDB: found Title: `" << m_title << "'" << endl;
for (int i = 0; i < m_tracks; i++) for (int i = 0; i < m_tracks; i++)
{ {
if (m_names[i].isEmpty()) if (m_names[i].isEmpty())
m_names[i] += i18n("Track %1").tqarg(i); m_names[i] += i18n("Track %1").tqarg(i);
m_names[i].tqreplace(TQRegExp("/"), "%2f"); m_names[i].replace(TQRegExp("/"), "%2f");
kdDebug(7101) << "CDDB: found Track " << i+1 << ": `" << m_names[i] kdDebug(7101) << "CDDB: found Track " << i+1 << ": `" << m_names[i]
<< "'" << endl; << "'" << endl;
} }
@ -464,7 +464,7 @@ bool CDDB::queryCD(TQValueList<int>& track_ofs)
} }
file.close(); file.close();
/*TQString newname (file.name()); /*TQString newname (file.name());
newname.truncate(newname.tqfindRev('.')); newname.truncate(newname.findRev('.'));
if (TQDir::current().rename(file.name(), newname)) { if (TQDir::current().rename(file.name(), newname)) {
kdDebug(7101) << "CDDB: rename failed" << endl; kdDebug(7101) << "CDDB: rename failed" << endl;
file.remove(); file.remove();

@ -176,13 +176,13 @@ bool Paranoia::findCdrom()
TQTextStream t( f ); TQTextStream t( f );
while ( !t.eof() && !stop ) { while ( !t.eof() && !stop ) {
s = t.readLine(); s = t.readLine();
if ( s.tqcontains("drive name:") ) if ( s.contains("drive name:") )
stop = true; stop = true;
} }
if ( !stop ) if ( !stop )
return false; return false;
pos = s.tqfind(":"); pos = s.find(":");
c = s.right( s.length()-pos-1 ); c = s.right( s.length()-pos-1 );
sscanf( c.latin1(), "%s %s %s %s", dev[0], dev[1], dev[2], dev[3] ); sscanf( c.latin1(), "%s %s %s %s", dev[0], dev[1], dev[2], dev[3] );
@ -198,15 +198,15 @@ bool Paranoia::procCdrom( TQString name )
{ {
int pos; int pos;
if ( name.tqcontains("sr") ) { if ( name.contains("sr") ) {
pos = name.tqfind("r"); pos = name.find("r");
name = name.right( name.length()-pos-1 ); name = name.right( name.length()-pos-1 );
name = "/dev/scd"+name; name = "/dev/scd"+name;
d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 );
if ( cdda_open( d )==0 ) if ( cdda_open( d )==0 )
return true; return true;
} }
else if ( name.tqcontains("hd") ) { else if ( name.contains("hd") ) {
name = "/dev/"+name; name = "/dev/"+name;
d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 ); d = cdda_identify( name.ascii(), CDDA_MESSAGE_PRINTIT, 0 );
if ( cdda_open( d )==0 ) if ( cdda_open( d )==0 )
@ -274,7 +274,7 @@ bool Paranoia::encode( const TQStringList &list, TQWidget *tqparent )
return false; return false;
} }
if ( !setPath( baseDir, TQString(encodingList[0]).tqreplace("/","_"), TQString(encodingList[1]).tqreplace("/","_") ) ) { if ( !setPath( baseDir, TQString(encodingList[0]).replace("/","_"), TQString(encodingList[1]).replace("/","_") ) ) {
return false; return false;
} }
isRunning = true; isRunning = true;
@ -292,7 +292,7 @@ bool Paranoia::loadEncoder( TQWidget *tqparent )
return false; return false;
} }
if ( service->serviceTypes().tqcontains("KaffeineAudioEncoder") ) { if ( service->serviceTypes().contains("KaffeineAudioEncoder") ) {
currentEncoder = KParts::ComponentFactory::createPartInstanceFromService<KaffeineAudioEncoder>(service, 0, service->name().ascii(), 0, 0, 0, &error); currentEncoder = KParts::ComponentFactory::createPartInstanceFromService<KaffeineAudioEncoder>(service, 0, service->name().ascii(), 0, 0, 0, &error);
if (error > 0) { if (error > 0) {
KMessageBox::error( tqparent, i18n("Loading of encoder '%1' failed.").tqarg(encoderDesktop) ); KMessageBox::error( tqparent, i18n("Loading of encoder '%1' failed.").tqarg(encoderDesktop) );
@ -389,7 +389,7 @@ void Paranoia::run()
for ( i=2; i<(int)encodingList.count(); ++i ) { for ( i=2; i<(int)encodingList.count(); ++i ) {
n = encodingList[i].left(2).toInt(); n = encodingList[i].left(2).toInt();
s = TQString(encodingList[i]).tqreplace("/","_")+currentEncoder->getExtension(); s = TQString(encodingList[i]).replace("/","_")+currentEncoder->getExtension();
f.setName( baseDir+s ); f.setName( baseDir+s );
initTrack( n ); initTrack( n );
max = 0; max = 0;

@ -242,7 +242,7 @@ void DVBconfig::startup()
else else
as = false; as = false;
fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s ) (%dms)\n", s.ascii(), t.ascii(), info.name, t1.msecsTo(TQTime::currentTime()) ); fprintf(stderr,"/dev/dvb/%s/%s : opened ( %s ) (%dms)\n", s.ascii(), t.ascii(), info.name, t1.msecsTo(TQTime::currentTime()) );
devList.append( new Device( s.tqreplace("adapter","").toInt(), t.tqreplace("frontend","").toInt(), info.type, info.name, as ) ); devList.append( new Device( s.replace("adapter","").toInt(), t.replace("frontend","").toInt(), info.type, info.name, as ) );
} }
close( fdFrontend ); close( fdFrontend );
} }
@ -1099,7 +1099,7 @@ void DvbConfigDialog::setSource( TQComboBox *box, TQString s )
{ {
int pos, i; int pos, i;
pos = s.tqfind("|"); pos = s.find("|");
if ( pos>=0 ) if ( pos>=0 )
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
for ( i=0; i<(int)box->count(); i++ ) { for ( i=0; i<(int)box->count(); i++ ) {
@ -1189,7 +1189,7 @@ void DvbConfigDialog::accept()
broadcastLe->setFocus(); broadcastLe->setFocus();
return; return;
} }
if ( !filenameFormatLe->text().tqcontains("%chan") && !filenameFormatLe->text().tqcontains("%date") && !filenameFormatLe->text().tqcontains("%name") ) { if ( !filenameFormatLe->text().contains("%chan") && !filenameFormatLe->text().contains("%date") && !filenameFormatLe->text().contains("%name") ) {
KMessageBox::sorry( this, i18n("Invalid filename format.") ); KMessageBox::sorry( this, i18n("Invalid filename format.") );
filenameFormatLe->setFocus(); filenameFormatLe->setFocus();
return; return;

@ -48,7 +48,7 @@ DVBevents::DVBevents( TQString devType, int anum, int tnum, const TQString &char
for ( KTrader::OfferList::Iterator it=offers.begin(); it!=end; ++it ) { for ( KTrader::OfferList::Iterator it=offers.begin(); it!=end; ++it ) {
error = 0; error = 0;
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);
if ( !ptr->name().tqcontains(devType) ) if ( !ptr->name().contains(devType) )
continue; continue;
plug = KParts::ComponentFactory::createPartInstanceFromService<KaffeineEpgPlugin>(ptr, 0, ptr->name().ascii(), 0, 0, 0, &error ); plug = KParts::ComponentFactory::createPartInstanceFromService<KaffeineEpgPlugin>(ptr, 0, ptr->name().ascii(), 0, 0, 0, &error );
plugName = ptr->desktopEntryName(); plugName = ptr->desktopEntryName();
@ -280,7 +280,7 @@ bool DVBevents::tableEIT( unsigned char* buffer )
if ( !nodesc ) { if ( !nodesc ) {
if ( start==desc->startDateTime ) if ( start==desc->startDateTime )
goto ifend; goto ifend;
currentEvents->take( currentEvents->tqfind( desc ) ); currentEvents->take( currentEvents->find( desc ) );
} }
desc->startDateTime = start; desc->startDateTime = start;
for ( i=0; i<(int)currentEvents->count(); i++ ) { for ( i=0; i<(int)currentEvents->count(); i++ ) {

@ -63,7 +63,7 @@ DVBout::DVBout( ChannelDesc chan, int anum, int tnum, KaffeineDvbPlugin *p )
patpmt = wpatpmt = false; patpmt = wpatpmt = false;
connect( &stopRecTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(stopRec()) ); connect( &stopRecTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(stopRec()) );
connect( &timerPatPmt, TQT_SIGNAL(timeout()), this, TQT_SLOT(setPatPmt()) ); connect( &timerPatPmt, TQT_SIGNAL(timeout()), this, TQT_SLOT(setPatPmt()) );
if ( !pids.tqcontains(8192) ) if ( !pids.contains(8192) )
timerPatPmt.start(500); timerPatPmt.start(500);
} }
@ -109,7 +109,7 @@ void DVBout::writePat()
tspat[0x0d] = tspat[0x0e] = 0x00; tspat[0x0f] = 0xe0; tspat[0x10] = 0x10; tspat[0x0d] = tspat[0x0e] = 0x00; tspat[0x0f] = 0xe0; tspat[0x10] = 0x10;
// Program Map PID // Program Map PID
pmtpid = 0xff; pmtpid = 0xff;
while ( pids.tqcontains( pmtpid ) ) pmtpid--; while ( pids.contains( pmtpid ) ) pmtpid--;
tspat[0x11] = 0x03; tspat[0x12] = 0xe8; tspat[0x13] = 0xe0; tspat[0x14] = pmtpid; tspat[0x11] = 0x03; tspat[0x12] = 0xe8; tspat[0x13] = 0xe0; tspat[0x14] = pmtpid;
// Put CRC in ts[0x15...0x18] // Put CRC in ts[0x15...0x18]
calculateCRC( tspat + 0x05, tspat + 0x15 ); calculateCRC( tspat + 0x05, tspat + 0x15 );
@ -300,7 +300,7 @@ bool DVBout::goLive( const TQString &name, int ringBufSize )
writePat(); writePat();
writePmt(); writePmt();
if ( !pids.tqcontains(8192) ) if ( !pids.contains(8192) )
patpmt = wpatpmt = true; patpmt = wpatpmt = true;
wbufSize = ringBufSize*1024*1024/(TS_SIZE*NTS); wbufSize = ringBufSize*1024*1024/(TS_SIZE*NTS);
wBuf = new unsigned char[TS_SIZE*NTS*wbufSize]; wBuf = new unsigned char[TS_SIZE*NTS*wbufSize];
@ -461,7 +461,7 @@ void DVBout::process( unsigned char *buf, int size )
for ( i=0; i<size; i+=TS_SIZE ) { for ( i=0; i<size; i+=TS_SIZE ) {
pid = (((buffer[1] & 0x1f) << 8) | buffer[2]); pid = (((buffer[1] & 0x1f) << 8) | buffer[2]);
if ( pids.tqcontains( pid ) || pids.tqcontains( 8192) ) { if ( pids.contains( pid ) || pids.contains( 8192) ) {
memcpy( thBuf+thWrite, buffer, TS_SIZE ); memcpy( thBuf+thWrite, buffer, TS_SIZE );
thWrite+=TS_SIZE; thWrite+=TS_SIZE;
if ( thWrite==(TS_SIZE*NTS ) ) { if ( thWrite==(TS_SIZE*NTS ) ) {

@ -484,7 +484,7 @@ void DvbPanel::searchChannel( const TQString &text )
channelsCb->visibleItems = 0; channelsCb->visibleItems = 0;
while ( it.current() ) { while ( it.current() ) {
if ( text.isEmpty() || it.current()->text( c ).tqcontains( text, false ) ) { if ( text.isEmpty() || it.current()->text( c ).contains( text, false ) ) {
it.current()->setVisible(true); it.current()->setVisible(true);
++channelsCb->visibleItems; ++channelsCb->visibleItems;
} }
@ -1406,9 +1406,9 @@ void DvbPanel::setRecord()
s = desc->title; s = desc->title;
if ( s.isEmpty() ) { if ( s.isEmpty() ) {
if ( !dvbConfig->filenameFormat.tqcontains("%chan") ) if ( !dvbConfig->filenameFormat.contains("%chan") )
s = curchan.name; s = curchan.name;
if ( !dvbConfig->filenameFormat.tqcontains("%date") ) if ( !dvbConfig->filenameFormat.contains("%date") )
s+="_"+TQDateTime::tqcurrentDateTime().toString( "yyyyMMdd-hhmmss" ); s+="_"+TQDateTime::tqcurrentDateTime().toString( "yyyyMMdd-hhmmss" );
} }
@ -1643,7 +1643,7 @@ void DvbPanel::newTimer( TQString channel, TQString name, TQDateTime begin, TQTi
RecTimer *t; RecTimer *t;
RecTimer *rt = new RecTimer(); RecTimer *rt = new RecTimer();
rt->name = name.tqreplace("/","_").tqreplace(">","_").tqreplace("<","_").tqreplace(":","_").tqreplace('"',"_").tqreplace("\\","_").tqreplace("|","_"); rt->name = name.replace("/","_").replace(">","_").replace("<","_").replace(":","_").replace('"',"_").replace("\\","_").replace("|","_");
rt->channel = channel; rt->channel = channel;
rt->begin = begin.addSecs( -(dvbConfig->beginMargin*60) ); rt->begin = begin.addSecs( -(dvbConfig->beginMargin*60) );
rt->duration = duration.addSecs( (dvbConfig->beginMargin+dvbConfig->endMargin)*60 ) ; rt->duration = duration.addSecs( (dvbConfig->beginMargin+dvbConfig->endMargin)*60 ) ;
@ -1901,7 +1901,7 @@ void DvbPanel::next()
TQListViewItem* nextItem; TQListViewItem* nextItem;
TQListViewItem* playingItem = channelsCb->tqfindItem( TQString().sprintf("%05d", dvbConfig->lastChannel), 0 ); TQListViewItem* playingItem = channelsCb->findItem( TQString().sprintf("%05d", dvbConfig->lastChannel), 0 );
if ( !playingItem == 0 ) // yes, it's in the current category if ( !playingItem == 0 ) // yes, it's in the current category
{ {
@ -1927,7 +1927,7 @@ void DvbPanel::previous()
TQListViewItem* prevItem; TQListViewItem* prevItem;
TQListViewItem* playingItem = channelsCb->tqfindItem( TQString().sprintf("%05d", dvbConfig->lastChannel), 0 ); TQListViewItem* playingItem = channelsCb->findItem( TQString().sprintf("%05d", dvbConfig->lastChannel), 0 );
if ( !playingItem == 0 ) // yes, it's in the current category if ( !playingItem == 0 ) // yes, it's in the current category
{ {
@ -2149,12 +2149,12 @@ bool DvbPanel::getChannelList()
while ( !tt.eof() ) { while ( !tt.eof() ) {
s = tt.readLine(); s = tt.readLine();
if ( s.startsWith("#") ) { if ( s.startsWith("#") ) {
if ( s.tqcontains("KaxTV") ) if ( s.contains("KaxTV") )
break; break;
continue; continue;
} }
chan = new ChannelDesc(); chan = new ChannelDesc();
pos = s.tqfind("|"); pos = s.find("|");
c = s.left( pos ); c = s.left( pos );
if ( c=="TV" || c=="TVC" ) if ( c=="TV" || c=="TVC" )
chan->type=1; chan->type=1;
@ -2163,13 +2163,13 @@ bool DvbPanel::getChannelList()
if ( c=="TVC" || c=="RAC" ) if ( c=="TVC" || c=="RAC" )
chan->fta=1; chan->fta=1;
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->name = s.left( pos ); chan->name = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
c = s.left( pos ); c = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
tpos = c.tqfind("("); tpos = c.find("(");
if ( tpos>0 ) if ( tpos>0 )
chan->vpid = c.left(tpos).toUShort(); chan->vpid = c.left(tpos).toUShort();
else else
@ -2183,17 +2183,17 @@ bool DvbPanel::getChannelList()
chan->vType = 2; chan->vType = 2;
if ( !chan->vpid ) if ( !chan->vpid )
chan->vType = 0; chan->vType = 0;
pos = s.tqfind("|"); pos = s.find("|");
c = s.left( pos ); c = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
while ( (pos=c.tqfind(","))!=-1 ) { while ( (pos=c.find(","))!=-1 ) {
t = c.left(pos); t = c.left(pos);
chan->napid++; chan->napid++;
if ( t.tqcontains("(ac3)") ) { if ( t.contains("(ac3)") ) {
chan->apid[chan->napid-1].ac3=1; chan->apid[chan->napid-1].ac3=1;
t.remove("(ac3)"); t.remove("(ac3)");
} }
if( (tpos=t.tqfind("("))!=-1 ) { if( (tpos=t.find("("))!=-1 ) {
t.remove(")"); t.remove(")");
chan->apid[chan->napid-1].lang=t.right( t.length()-tpos-1 ); chan->apid[chan->napid-1].lang=t.right( t.length()-tpos-1 );
t = t.left( tpos ); t = t.left( tpos );
@ -2201,16 +2201,16 @@ bool DvbPanel::getChannelList()
chan->apid[chan->napid-1].pid=t.toUShort(); chan->apid[chan->napid-1].pid=t.toUShort();
c = c.right( c.length()-pos-1 ); c = c.right( c.length()-pos-1 );
} }
pos = s.tqfind("|"); pos = s.find("|");
chan->ttpid = s.left(pos).toUShort(); chan->ttpid = s.left(pos).toUShort();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->sid = s.left(pos).toUShort(); chan->sid = s.left(pos).toUShort();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->tp.tsid = s.left(pos).toUShort(); chan->tp.tsid = s.left(pos).toUShort();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
c = s.left(pos); c = s.left(pos);
if ( c.startsWith("T") ) { if ( c.startsWith("T") ) {
chan->tp.type=FE_OFDM; chan->tp.type=FE_OFDM;
@ -2230,17 +2230,17 @@ bool DvbPanel::getChannelList()
chan->tp.source = "Atsc"; chan->tp.source = "Atsc";
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->tp.freq = s.left(pos).toULong(); chan->tp.freq = s.left(pos).toULong();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->tp.sr = s.left(pos).toULong(); chan->tp.sr = s.left(pos).toULong();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
c = s.left( pos ); c = s.left( pos );
chan->tp.pol = c[0].latin1(); chan->tp.pol = c[0].latin1();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 0 : chan->tp.coderateH = FEC_NONE; break; case 0 : chan->tp.coderateH = FEC_NONE; break;
case 12 : chan->tp.coderateH = FEC_1_2; break; case 12 : chan->tp.coderateH = FEC_1_2; break;
@ -2256,14 +2256,14 @@ bool DvbPanel::getChannelList()
case -1 : chan->tp.coderateH = FEC_AUTO; case -1 : chan->tp.coderateH = FEC_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 0 : chan->tp.inversion = INVERSION_OFF; break; case 0 : chan->tp.inversion = INVERSION_OFF; break;
case 1 : chan->tp.inversion = INVERSION_ON; break; case 1 : chan->tp.inversion = INVERSION_ON; break;
case -1 : chan->tp.inversion = INVERSION_AUTO; case -1 : chan->tp.inversion = INVERSION_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 8 : chan->tp.modulation = QPSK; break; case 8 : chan->tp.modulation = QPSK; break;
case 16 : chan->tp.modulation = QAM_16; break; case 16 : chan->tp.modulation = QAM_16; break;
@ -2279,7 +2279,7 @@ bool DvbPanel::getChannelList()
case -1 : chan->tp.modulation = QAM_AUTO; case -1 : chan->tp.modulation = QAM_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 0 : chan->tp.coderateL = FEC_NONE; break; case 0 : chan->tp.coderateL = FEC_NONE; break;
case 12 : chan->tp.coderateL = FEC_1_2; break; case 12 : chan->tp.coderateL = FEC_1_2; break;
@ -2295,7 +2295,7 @@ bool DvbPanel::getChannelList()
case -1 : chan->tp.coderateL = FEC_AUTO; case -1 : chan->tp.coderateL = FEC_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 8 : chan->tp.bandwidth = BANDWIDTH_8_MHZ; break; case 8 : chan->tp.bandwidth = BANDWIDTH_8_MHZ; break;
case 7 : chan->tp.bandwidth = BANDWIDTH_7_MHZ; break; case 7 : chan->tp.bandwidth = BANDWIDTH_7_MHZ; break;
@ -2303,14 +2303,14 @@ bool DvbPanel::getChannelList()
case -1 : chan->tp.bandwidth = BANDWIDTH_AUTO; case -1 : chan->tp.bandwidth = BANDWIDTH_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 2 : chan->tp.transmission = TRANSMISSION_MODE_2K; break; case 2 : chan->tp.transmission = TRANSMISSION_MODE_2K; break;
case 8 : chan->tp.transmission = TRANSMISSION_MODE_8K; break; case 8 : chan->tp.transmission = TRANSMISSION_MODE_8K; break;
case -1 : chan->tp.transmission = TRANSMISSION_MODE_AUTO; case -1 : chan->tp.transmission = TRANSMISSION_MODE_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 32 : chan->tp.guard = GUARD_INTERVAL_1_32; break; case 32 : chan->tp.guard = GUARD_INTERVAL_1_32; break;
case 16 : chan->tp.guard = GUARD_INTERVAL_1_16; break; case 16 : chan->tp.guard = GUARD_INTERVAL_1_16; break;
@ -2319,7 +2319,7 @@ bool DvbPanel::getChannelList()
case -1 : chan->tp.guard = GUARD_INTERVAL_AUTO; case -1 : chan->tp.guard = GUARD_INTERVAL_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 0 : chan->tp.hierarchy = HIERARCHY_NONE; break; case 0 : chan->tp.hierarchy = HIERARCHY_NONE; break;
case 1 : chan->tp.hierarchy = HIERARCHY_1; break; case 1 : chan->tp.hierarchy = HIERARCHY_1; break;
@ -2328,39 +2328,39 @@ bool DvbPanel::getChannelList()
case -1 : chan->tp.hierarchy = HIERARCHY_AUTO; case -1 : chan->tp.hierarchy = HIERARCHY_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->num = s.left(pos).toUInt(); chan->num = s.left(pos).toUInt();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
c = s.left( pos ); c = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
while ( (pos=c.tqfind(","))!=-1 ) { while ( (pos=c.find(","))!=-1 ) {
t = c.left(pos); t = c.left(pos);
tpos=t.tqfind("("); tpos=t.find("(");
ns = (int)chan->nsubpid; ns = (int)chan->nsubpid;
chan->subpid[ns].pid = t.left(tpos).toUShort(); chan->subpid[ns].pid = t.left(tpos).toUShort();
t = t.right( t.length()-tpos-1 ); t = t.right( t.length()-tpos-1 );
tpos=t.tqfind(")"); tpos=t.find(")");
chan->subpid[ns].type = t.left(tpos).toUShort(); chan->subpid[ns].type = t.left(tpos).toUShort();
t = t.right( t.length()-tpos-2 ); t = t.right( t.length()-tpos-2 );
tpos=t.tqfind(")"); tpos=t.find(")");
chan->subpid[ns].page = t.left(tpos).toUShort(); chan->subpid[ns].page = t.left(tpos).toUShort();
t = t.right( t.length()-tpos-2 ); t = t.right( t.length()-tpos-2 );
tpos=t.tqfind(")"); tpos=t.find(")");
chan->subpid[ns].id = t.left(tpos).toUShort(); chan->subpid[ns].id = t.left(tpos).toUShort();
t = t.right( t.length()-tpos-2 ); t = t.right( t.length()-tpos-2 );
tpos=t.tqfind(")"); tpos=t.find(")");
chan->subpid[ns].lang = t.left(tpos); chan->subpid[ns].lang = t.left(tpos);
c = c.right( c.length()-pos-1 ); c = c.right( c.length()-pos-1 );
chan->nsubpid++; chan->nsubpid++;
} }
pos = s.tqfind("|"); pos = s.find("|");
chan->category = s.left( pos ); chan->category = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->tp.nid = s.left(pos).toUShort(); chan->tp.nid = s.left(pos).toUShort();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
switch ( s.left(pos).toInt() ) { switch ( s.left(pos).toInt() ) {
case 20 : chan->tp.rolloff = ROLLOFF_20; break; case 20 : chan->tp.rolloff = ROLLOFF_20; break;
case 25 : chan->tp.rolloff = ROLLOFF_25; break; case 25 : chan->tp.rolloff = ROLLOFF_25; break;
@ -2368,7 +2368,7 @@ bool DvbPanel::getChannelList()
case -1 : chan->tp.rolloff = ROLLOFF_AUTO; case -1 : chan->tp.rolloff = ROLLOFF_AUTO;
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
chan->tp.S2 = s.left(pos).toInt(); chan->tp.S2 = s.left(pos).toInt();
if ( chan->tp.source.isEmpty() ) { if ( chan->tp.source.isEmpty() ) {
@ -2587,23 +2587,23 @@ bool DvbPanel::getTimerList()
if ( s.startsWith("#") ) if ( s.startsWith("#") )
continue; continue;
t = new RecTimer(); t = new RecTimer();
pos = s.tqfind("|"); pos = s.find("|");
t->name = s.left( pos ); t->name = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
t->channel = s.left( pos ); t->channel = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
t->begin = TQDateTime::fromString( s.left( pos ), Qt::ISODate ); t->begin = TQDateTime::fromString( s.left( pos ), Qt::ISODate );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
t->duration = TQTime::fromString( s.left( pos ) ); t->duration = TQTime::fromString( s.left( pos ) );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
//t->filetype = s.left( pos ).toInt(); //t->filetype = s.left( pos ).toInt();
t->mode = 0; t->mode = 0;
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
t->mode = s.left( pos ).toInt(); t->mode = s.left( pos ).toInt();
t->running = 0; t->running = 0;
timers.append( t ); timers.append( t );

@ -660,7 +660,7 @@ bool DVBsi::getSection( int pid, int tid, int timeout, int sid )
} }
cursid = getBits(buf+3,0,16); cursid = getBits(buf+3,0,16);
if ( sid && cursid!=sid && !sidList.tqcontains(cursid) ) { if ( sid && cursid!=sid && !sidList.contains(cursid) ) {
sidList.append( cursid ); sidList.append( cursid );
continue; continue;
} }

@ -158,7 +158,7 @@ bool DvbStream::canSource( ChannelDesc *chan )
return false; return false;
int i; int i;
for ( i=0; i<dvbDevice->numLnb; i++ ) { for ( i=0; i<dvbDevice->numLnb; i++ ) {
if ( dvbDevice->lnb[i].source.tqcontains(chan->tp.source) ) if ( dvbDevice->lnb[i].source.contains(chan->tp.source) )
return true; return true;
} }
return false; return false;
@ -181,7 +181,7 @@ int DvbStream::getSatPos( const TQString &src )
return -1; return -1;
for ( i=0; i<dvbDevice->numLnb; i++ ) for ( i=0; i<dvbDevice->numLnb; i++ )
if ( dvbDevice->lnb[i].source.tqcontains(src) ) if ( dvbDevice->lnb[i].source.contains(src) )
return i; return i;
return -1; return -1;
} }
@ -376,7 +376,7 @@ bool DvbStream::tuneDvb( ChannelDesc *chan, bool dvr )
switch( fe_info.type ) { switch( fe_info.type ) {
case FE_OFDM : { case FE_OFDM : {
TQString s = fe_info.name; TQString s = fe_info.name;
//if ( s.tqcontains("TerraTec/qanu USB2.0 Highspeed DVB-T Receiver") ) // cinergyT2 hack //if ( s.contains("TerraTec/qanu USB2.0 Highspeed DVB-T Receiver") ) // cinergyT2 hack
// freq+=167000; // freq+=167000;
if (freq < 1000000) if (freq < 1000000)
freq*=1000UL; freq*=1000UL;
@ -721,7 +721,7 @@ void DvbStream::moveRotor( int switchPos, ChannelDesc *chan, int hiband, bool dv
double DvbStream::getSourceAngle( TQString source ) double DvbStream::getSourceAngle( TQString source )
{ {
double angle=1.0; double angle=1.0;
int pos = source.tqfindRev("-"); int pos = source.findRev("-");
source.remove(0,pos+1); source.remove(0,pos+1);
source = source.upper(); source = source.upper();
if ( source.endsWith("W") ) if ( source.endsWith("W") )
@ -1302,10 +1302,10 @@ bool DvbStream::startTimer( ChannelDesc *chan, TQString path, int maxsize, RecTi
newout = true; newout = true;
} }
if ( t->mode && !name.tqcontains("%date") ) if ( t->mode && !name.contains("%date") )
name+= "-%date"; name+= "-%date";
name = name.tqreplace( "%chan", chan->name ).tqreplace("%date", t->begin.toString( "yyyyMMdd-hhmmss" ) ).tqreplace("%name", t->name ); name = name.replace( "%chan", chan->name ).replace("%date", t->begin.toString( "yyyyMMdd-hhmmss" ) ).replace("%name", t->name );
name = name.tqreplace( "/", "_" ).tqreplace( ">", "_" ).tqreplace("<","_").tqreplace(":","_").tqreplace('"',"_").tqreplace("\\","_").tqreplace("|","_"); name = name.replace( "/", "_" ).replace( ">", "_" ).replace("<","_").replace(":","_").replace('"',"_").replace("\\","_").replace("|","_");
name = path+name; name = path+name;
if ( !o->goRec( name, maxsize, t ) ) { if ( !o->goRec( name, maxsize, t ) ) {

@ -203,11 +203,11 @@ void KEvents::checkEpgSearch(TQString searchword)
break; break;
found=false; found=false;
if(desc->title.upper().tqfind(searchword.upper())!=-1) if(desc->title.upper().find(searchword.upper())!=-1)
found=true; found=true;
if(!desc->subtitle.isEmpty()) { if(!desc->subtitle.isEmpty()) {
if(desc->subtitle.upper().tqfind(searchword.upper())!=-1) if(desc->subtitle.upper().find(searchword.upper())!=-1)
found=true; found=true;
} }
@ -216,7 +216,7 @@ void KEvents::checkEpgSearch(TQString searchword)
for ( l=0; l<(int)desc->extEvents.count(); l++ ) { for ( l=0; l<(int)desc->extEvents.count(); l++ ) {
s = *desc->extEvents.at(l); s = *desc->extEvents.at(l);
if(!s.isEmpty()) { if(!s.isEmpty()) {
if(s.upper().tqfind(searchword.upper())!=-1) { if(s.upper().find(searchword.upper())!=-1) {
found=true; found=true;
s=""; s="";
break; break;
@ -228,7 +228,7 @@ void KEvents::checkEpgSearch(TQString searchword)
for ( l=0; l<(int)desc->shortEvents.count(); l++ ) { for ( l=0; l<(int)desc->shortEvents.count(); l++ ) {
s = desc->shortEvents.at(l)->name; s = desc->shortEvents.at(l)->name;
if(!s.isEmpty()) { if(!s.isEmpty()) {
if(s.upper().tqfind(searchword.upper())!=-1) { if(s.upper().find(searchword.upper())!=-1) {
found=true; found=true;
s=""; s="";
break; break;
@ -236,7 +236,7 @@ void KEvents::checkEpgSearch(TQString searchword)
} }
s = desc->shortEvents.at(l)->text; s = desc->shortEvents.at(l)->text;
if(!s.isEmpty()) { if(!s.isEmpty()) {
if(s.upper().tqfind(searchword.upper())!=-1) { if(s.upper().find(searchword.upper())!=-1) {
found=true; found=true;
s=""; s="";
break; break;

@ -185,19 +185,19 @@ void KTimerEditor::accept()
return; return;
} }
if ( nameLe->text().stripWhiteSpace().tqcontains("/") ) if ( nameLe->text().stripWhiteSpace().contains("/") )
goto stop; goto stop;
if ( nameLe->text().stripWhiteSpace().tqcontains(">") ) if ( nameLe->text().stripWhiteSpace().contains(">") )
goto stop; goto stop;
if ( nameLe->text().stripWhiteSpace().tqcontains("<") ) if ( nameLe->text().stripWhiteSpace().contains("<") )
goto stop; goto stop;
if ( nameLe->text().stripWhiteSpace().tqcontains("\\") ) if ( nameLe->text().stripWhiteSpace().contains("\\") )
goto stop; goto stop;
if ( nameLe->text().stripWhiteSpace().tqcontains(":") ) if ( nameLe->text().stripWhiteSpace().contains(":") )
goto stop; goto stop;
if ( nameLe->text().stripWhiteSpace().tqcontains("\"") ) if ( nameLe->text().stripWhiteSpace().contains("\"") )
goto stop; goto stop;
if ( nameLe->text().stripWhiteSpace().tqcontains("|") ) if ( nameLe->text().stripWhiteSpace().contains("|") )
goto stop; goto stop;
if ( duration->time()<TQTime(0,1) ) { if ( duration->time()<TQTime(0,1) ) {

@ -418,7 +418,7 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
trans = new Transponder(); trans = new Transponder();
pos = s.tqfind(" "); pos = s.find(" ");
if ( s.left(pos)=="T" ) { if ( s.left(pos)=="T" ) {
trans->type=FE_OFDM; trans->type=FE_OFDM;
trans->source = "Terrestrial"; trans->source = "Terrestrial";
@ -441,17 +441,17 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
} }
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
trans->freq = s.left(pos).toULong()/1000; trans->freq = s.left(pos).toULong()/1000;
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
if ( trans->type!=FE_ATSC ) if ( trans->type!=FE_ATSC )
pos = s.tqfind(" "); pos = s.find(" ");
if ( trans->type==FE_QPSK ) { if ( trans->type==FE_QPSK ) {
trans->pol = s.left(pos).lower()[0].latin1(); trans->pol = s.left(pos).lower()[0].latin1();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
} }
if ( trans->type!=FE_OFDM && trans->type!=FE_ATSC ) { if ( trans->type!=FE_OFDM && trans->type!=FE_ATSC ) {
trans->sr = s.left(pos).toULong()/1000; trans->sr = s.left(pos).toULong()/1000;
@ -489,7 +489,7 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
if ( s.left(pos)=="1/2" ) if ( s.left(pos)=="1/2" )
trans->coderateH = FEC_1_2; trans->coderateH = FEC_1_2;
else if ( s.left(pos)=="2/3" ) else if ( s.left(pos)=="2/3" )
@ -512,7 +512,7 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
trans->coderateH = FEC_AUTO; trans->coderateH = FEC_AUTO;
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
if ( trans->type==FE_OFDM ) { if ( trans->type==FE_OFDM ) {
if ( s.left(pos)=="1/2" ) if ( s.left(pos)=="1/2" )
trans->coderateL = FEC_1_2; trans->coderateL = FEC_1_2;
@ -542,7 +542,7 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
} }
if ( trans->type!=FE_QPSK ) { if ( trans->type!=FE_QPSK ) {
if ( s.left(pos)=="QPSK" ) if ( s.left(pos)=="QPSK" )
@ -563,7 +563,7 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
if ( trans->type==FE_OFDM ) { if ( trans->type==FE_OFDM ) {
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
if ( s.left(pos)=="8k" ) if ( s.left(pos)=="8k" )
trans->transmission = TRANSMISSION_MODE_8K; trans->transmission = TRANSMISSION_MODE_8K;
else if ( s.left(pos)=="2k" ) else if ( s.left(pos)=="2k" )
@ -573,7 +573,7 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
if ( s.left(pos)=="1/32" ) if ( s.left(pos)=="1/32" )
trans->guard = GUARD_INTERVAL_1_32; trans->guard = GUARD_INTERVAL_1_32;
else if ( s.left(pos)=="1/16" ) else if ( s.left(pos)=="1/16" )
@ -587,7 +587,7 @@ void ScanDialog::parseTp( TQString s, fe_type_t type, TQString src )
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
s = s.stripWhiteSpace(); s = s.stripWhiteSpace();
pos = s.tqfind(" "); pos = s.find(" ");
if ( s.left(pos)=="1" ) if ( s.left(pos)=="1" )
trans->hierarchy = HIERARCHY_1; trans->hierarchy = HIERARCHY_1;
else if ( s.left(pos)=="2" ) else if ( s.left(pos)=="2" )
@ -724,7 +724,7 @@ bool ScanDialog::checkChannUpdate( ChannelDesc *chan )
break; break;
} }
} }
chandesc->tqreplace(i,new ChannelDesc(*chan)); chandesc->replace(i,new ChannelDesc(*chan));
return false; return false;
} }
} }

@ -123,7 +123,7 @@ bool Ts2Rtp::addChannels( TQPtrList<ChannelDesc> *channels )
pids.append( d->apid[k].pid ); pids.append( d->apid[k].pid );
for ( k=0; k<d->nsubpid && k<MAX_DVBSUB; k++ ) for ( k=0; k<d->nsubpid && k<MAX_DVBSUB; k++ )
pids.append( d->subpid[k].pid ); pids.append( d->subpid[k].pid );
while ( pmtpid==17 || pids.tqcontains( pmtpid ) ) while ( pmtpid==17 || pids.contains( pmtpid ) )
--pmtpid; --pmtpid;
} }
desc->pmtpid = pmtpid--; desc->pmtpid = pmtpid--;

@ -180,32 +180,32 @@ void CdWidget::updateList( const TQString &list )
chan.clear(); chan.clear();
if ( list=="quit" ) return; if ( list=="quit" ) return;
while ( (pos = s.tqfind("|"))!=-1 ) { while ( (pos = s.find("|"))!=-1 ) {
name = s.left( pos ); name = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
vpid = s.left( pos ).toInt(); vpid = s.left( pos ).toInt();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
apid = s.left( pos ).toInt(); apid = s.left( pos ).toInt();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
if ( s.left( pos )=="n" ) ac3 = 0; if ( s.left( pos )=="n" ) ac3 = 0;
else ac3 = 1; else ac3 = 1;
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
subpid = s.left( pos ).toInt(); subpid = s.left( pos ).toInt();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
page = s.left( pos ).toInt(); page = s.left( pos ).toInt();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
id = s.left( pos ).toInt(); id = s.left( pos ).toInt();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
type = s.left( pos ).toInt(); type = s.left( pos ).toInt();
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
pos = s.tqfind("|"); pos = s.find("|");
lang = s.left( pos ); lang = s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
chan.append( new CdChannel( name, vpid, apid, ac3, subpid, page, id, type, lang ) ); chan.append( new CdChannel( name, vpid, apid, ac3, subpid, page, id, type, lang ) );

@ -68,7 +68,7 @@ void InstWizard::internalWizard()
info << "<b>" << i18n("Kaffeine-Xine") << "...</b><br>"; info << "<b>" << i18n("Kaffeine-Xine") << "...</b><br>";
KService::Ptr service = KService::serviceByDesktopName("xine_part"); KService::Ptr service = KService::serviceByDesktopName("xine_part");
if ((service) && (service->serviceTypes().tqcontains("KaffeinePart"))) if ((service) && (service->serviceTypes().contains("KaffeinePart")))
info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>"; info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>";
else else
info << "<font color=\"DarkRed\">" << i18n("Part not found. Please check your installation!") << "</font>"; info << "<font color=\"DarkRed\">" << i18n("Part not found. Please check your installation!") << "</font>";
@ -91,10 +91,10 @@ void InstWizard::internalWizard()
{ {
int major, minor, sub; int major, minor, sub;
xine_get_version(&major, &minor, &sub); xine_get_version(&major, &minor, &sub);
if (xineVersion.tqcontains("CVS", false)) if (xineVersion.contains("CVS", false))
info << "<font color=\"DarkBlue\">" << i18n("Developer version.") << "</font>"; info << "<font color=\"DarkBlue\">" << i18n("Developer version.") << "</font>";
if ((major == 1) && (minor == 0) && (sub == 0) && (xineVersion.tqcontains("rc", false))) if ((major == 1) && (minor == 0) && (sub == 0) && (xineVersion.contains("rc", false)))
{ {
info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires xine-lib >= %1. Download the latest version here:").tqarg("1.0") << " <a href=\"http://www.xinehq.de\">http://www.xinehq.de</a>.</font>"; info << "<font color=\"DarkRed\">" << i18n("Kaffeine requires xine-lib >= %1. Download the latest version here:").tqarg("1.0") << " <a href=\"http://www.xinehq.de\">http://www.xinehq.de</a>.</font>";
} }
@ -149,9 +149,9 @@ void InstWizard::internalWizard()
connect(&process, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), this, TQT_SLOT(slotStdout(KProcess*, char*, int))); connect(&process, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), this, TQT_SLOT(slotStdout(KProcess*, char*, int)));
process.start(KProcess::Block, KProcess::Stdout); process.start(KProcess::Block, KProcess::Stdout);
if (stdout.tqcontains('1')) if (stdout.contains('1'))
info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>"; info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>";
else if (stdout.tqcontains('0')) else if (stdout.contains('0'))
info << "<font color=\"DarkRed\">" << i18n("DMA mode off! For smooth DVD playback run as root:") + " \"hdparm -d1 /dev/dvd\".</font>"; info << "<font color=\"DarkRed\">" << i18n("DMA mode off! For smooth DVD playback run as root:") + " \"hdparm -d1 /dev/dvd\".</font>";
else else
info << "<font color=\"DarkBlue\">" << i18n("Can't check DMA mode. Permission denied or no such device:") info << "<font color=\"DarkBlue\">" << i18n("Can't check DMA mode. Permission denied or no such device:")
@ -188,7 +188,7 @@ void InstWizard::internalWizard()
info << "<hr><br><b>" << i18n("RESULT") << ":</b> "; info << "<hr><br><b>" << i18n("RESULT") << ":</b> ";
if (infoString.tqcontains("DarkRed")) if (infoString.contains("DarkRed"))
{ {
info << i18n("Found some problems, but nevertheless Kaffeine may work."); info << i18n("Found some problems, but nevertheless Kaffeine may work.");
} }

@ -291,7 +291,7 @@ void Kaffeine::updateArgs()
for (int i = 0; i < args->count(); i++ ) { for (int i = 0; i < args->count(); i++ ) {
TQDir path; TQDir path;
TQString url = TQFile::decodeName(args->arg(i)); TQString url = TQFile::decodeName(args->arg(i));
if ((url.left(1) != "/") && (!url.tqcontains("://")) && (url.lower() != "dvd") && (url.lower() != "vcd") if ((url.left(1) != "/") && (!url.contains("://")) && (url.lower() != "dvd") && (url.lower() != "vcd")
&& (url.lower() != "audiocd") && (url.lower() != "cdda") && (url.lower() != "dvb")) { && (url.lower() != "audiocd") && (url.lower() != "cdda") && (url.lower() != "dvb")) {
#if KDE_IS_VERSION(3,5,0) #if KDE_IS_VERSION(3,5,0)
KURL u = KIO::NetAccess::mostLocalURL(args->url(i), 0); KURL u = KIO::NetAccess::mostLocalURL(args->url(i), 0);
@ -382,7 +382,7 @@ void Kaffeine::slotLoadPart(const TQString& desktopName)
m_playerContainer = new PlayerContainer(playerWidget); m_playerContainer = new PlayerContainer(playerWidget);
connect(m_playerContainer, TQT_SIGNAL(signalURLDropEvent(const TQStringList&)), TQT_TQOBJECT(this), TQT_SLOT(slotLoadURLS(const TQStringList&))); connect(m_playerContainer, TQT_SIGNAL(signalURLDropEvent(const TQStringList&)), TQT_TQOBJECT(this), TQT_SLOT(slotLoadURLS(const TQStringList&)));
if (service->serviceTypes().tqcontains("KaffeinePart")) { if (service->serviceTypes().contains("KaffeinePart")) {
kdDebug() << "This is a KaffeinePart..." << endl; kdDebug() << "This is a KaffeinePart..." << endl;
int error = 0; int error = 0;
m_mediaPart = KParts::ComponentFactory::createPartInstanceFromService<KaffeinePart>(service, m_playerContainer, service->name().ascii(), TQT_TQOBJECT(this), 0, m_engineParameters, &error); m_mediaPart = KParts::ComponentFactory::createPartInstanceFromService<KaffeinePart>(service, m_playerContainer, service->name().ascii(), TQT_TQOBJECT(this), 0, m_engineParameters, &error);
@ -477,7 +477,7 @@ void Kaffeine::load(const TQStringList& urllist)
if (!urllist.count()) if (!urllist.count())
return; return;
if (urllist[0].tqcontains(".kaffeine", false)) if (urllist[0].contains(".kaffeine", false))
{ {
m_playlist->loadPlaylist(urllist[0]); m_playlist->loadPlaylist(urllist[0]);
} }
@ -503,7 +503,7 @@ void Kaffeine::slotPlay(const MRL& mrl)
if (m_mediaPart) if (m_mediaPart)
{ {
m_mediaPart->openURL(mrl); m_mediaPart->openURL(mrl);
if ( !mrl.mime().tqcontains("audio") ) if ( !mrl.mime().contains("audio") )
TQTimer::singleShot(300, TQT_TQOBJECT(this), TQT_SLOT(slotSwitchToPlayerWindow())); TQTimer::singleShot(300, TQT_TQOBJECT(this), TQT_SLOT(slotSwitchToPlayerWindow()));
} }
} }
@ -1394,7 +1394,7 @@ void Kaffeine::slotOpenURL()
TQString url = KInputDialog::getText(i18n("Open URL"), i18n("Enter a URL:"), "", &ok); TQString url = KInputDialog::getText(i18n("Open URL"), i18n("Enter a URL:"), "", &ok);
if (ok) if (ok)
{ {
if ((!(url.left(1) == "/")) && (!url.tqcontains(":/"))) if ((!(url.left(1) == "/")) && (!url.contains(":/")))
url.prepend("http://"); // assume http protocol url.prepend("http://"); // assume http protocol
load(url); load(url);
} }
@ -1425,7 +1425,7 @@ void Kaffeine::slotOpenDirectory()
} }
else { else {
s = path.path(); s = path.path();
if ( TQDir(s).entryList().tqcontains("VIDEO_TS") || TQDir(s).entryList().tqcontains("video_ts") ) if ( TQDir(s).entryList().contains("VIDEO_TS") || TQDir(s).entryList().contains("video_ts") )
s = s.prepend("dvd://"); s = s.prepend("dvd://");
load( s ); load( s );
} }
@ -1473,7 +1473,7 @@ bool Kaffeine::loadTMP(const TQStringList& list)
for (TQStringList::ConstIterator it = list.begin(); it != end; ++it) { for (TQStringList::ConstIterator it = list.begin(); it != end; ++it) {
TQString url = (*it).lower(); TQString url = (*it).lower();
TQString ext = url; TQString ext = url;
ext = ext.remove( 0 , ext.tqfindRev('.')+1 ).lower(); ext = ext.remove( 0 , ext.findRev('.')+1 ).lower();
if (url == "dvd") { if (url == "dvd") {
cddisc->startDVD( device ); cddisc->startDVD( device );
return true; return true;
@ -1490,10 +1490,10 @@ bool Kaffeine::loadTMP(const TQStringList& list)
playDvb(); playDvb();
return true; return true;
} }
else if ( sublist.tqcontains(ext)) { else if ( sublist.contains(ext)) {
MRL mrl = m_playlist->getCurrent(); MRL mrl = m_playlist->getCurrent();
if (!mrl.isEmpty()) { if (!mrl.isEmpty()) {
if (!mrl.subtitleFiles().tqcontains(url)) { if (!mrl.subtitleFiles().contains(url)) {
mrl.addSubtitleFile(*it); mrl.addSubtitleFile(*it);
mrl.setCurrentSubtitle(mrl.subtitleFiles().size() - 1); mrl.setCurrentSubtitle(mrl.subtitleFiles().size() - 1);
m_mediaPart->openURL(mrl); m_mediaPart->openURL(mrl);
@ -1698,12 +1698,12 @@ bool Kaffeine::isVideo()
if (m_mediaPart) if (m_mediaPart)
{ {
if (m_mediaPart->isPlaying()) if (m_mediaPart->isPlaying())
return m_playlist->getCurrent().mime().tqcontains("video"); return m_playlist->getCurrent().mime().contains("video");
else else
return false; return false;
} }
else else
return m_playlist->getCurrent().mime().tqcontains("video"); return m_playlist->getCurrent().mime().contains("video");
} }
TQString Kaffeine::title() TQString Kaffeine::title()

@ -179,7 +179,7 @@ bool GStreamerPart::openURL(const MRL& mrl)
currentDevice = ""; currentDevice = "";
TQString ext = m_mrl.kurl().fileName(); TQString ext = m_mrl.kurl().fileName();
ext = ext.remove( 0 , ext.tqfindRev('.')+1 ).lower(); ext = ext.remove( 0 , ext.findRev('.')+1 ).lower();
if ( m_mrl.mime().isNull() ) { if ( m_mrl.mime().isNull() ) {
KMimeType::Ptr mime = KMimeType::findByURL( m_mrl.kurl().path() ); KMimeType::Ptr mime = KMimeType::findByURL( m_mrl.kurl().path() );
@ -201,19 +201,19 @@ bool GStreamerPart::openURL(const MRL& mrl)
TQString secondLine = stream.readLine(); TQString secondLine = stream.readLine();
file.close(); file.close();
if ( secondLine.tqcontains("kaffeine", false) ) { if ( secondLine.contains("kaffeine", false) ) {
kdDebug() << "GStreamerPart: Try loading kaffeine playlist\n"; kdDebug() << "GStreamerPart: Try loading kaffeine playlist\n";
playlist = PlaylistImport::kaffeine( localFile, m_playlist ); playlist = PlaylistImport::kaffeine( localFile, m_playlist );
} }
if ( secondLine.tqcontains("noatun", false) ) { if ( secondLine.contains("noatun", false) ) {
kdDebug() << "GStreamerPart: Try loading noatun playlist\n"; kdDebug() << "GStreamerPart: Try loading noatun playlist\n";
playlist = PlaylistImport::noatun( localFile, m_playlist); playlist = PlaylistImport::noatun( localFile, m_playlist);
} }
if ( firstLine.tqcontains("asx", false) ) { if ( firstLine.contains("asx", false) ) {
kdDebug() << "GStreamerPart: Try loading asx playlist\n"; kdDebug() << "GStreamerPart: Try loading asx playlist\n";
playlist = PlaylistImport::asx( localFile, m_playlist ); playlist = PlaylistImport::asx( localFile, m_playlist );
} }
if ( firstLine.tqcontains("[playlist]", false) ) { if ( firstLine.contains("[playlist]", false) ) {
kdDebug() << "GStreamerPart: Try loading pls playlist\n"; kdDebug() << "GStreamerPart: Try loading pls playlist\n";
playlist = PlaylistImport::pls( localFile, m_playlist ); playlist = PlaylistImport::pls( localFile, m_playlist );
} }
@ -235,7 +235,7 @@ bool GStreamerPart::openURL(const MRL& mrl)
TQString s = mrl.url(); TQString s = mrl.url();
if ( s.startsWith("cdda://") ) { if ( s.startsWith("cdda://") ) {
s = s.remove("cdda://"); s = s.remove("cdda://");
if ( (pos=s.tqfindRev("/"))>-1 ) { if ( (pos=s.findRev("/"))>-1 ) {
currentDevice=s.left( pos ); currentDevice=s.left( pos );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
} }
@ -541,7 +541,7 @@ void GStreamerPart::processMetaInfo()
MRL mrl = m_playlist[m_current]; MRL mrl = m_playlist[m_current];
if ( (mrl.title().tqcontains("/") || mrl.title().tqcontains(".") || (mrl.title().isEmpty())) if ( (mrl.title().contains("/") || mrl.title().contains(".") || (mrl.title().isEmpty()))
&& !m_title.stripWhiteSpace().isEmpty() && m_title.length() > 1 ) && !m_title.stripWhiteSpace().isEmpty() && m_title.length() > 1 )
mrl.setTitle( m_title ); mrl.setTitle( m_title );
if (mrl.artist().isEmpty() && !m_artist.stripWhiteSpace().isEmpty()) if (mrl.artist().isEmpty() && !m_artist.stripWhiteSpace().isEmpty())
@ -707,7 +707,7 @@ void GStreamerPart::initActions()
connect(m_audioVisual, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotSetVisualPlugin(const TQString&))); connect(m_audioVisual, TQT_SIGNAL(activated(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotSetVisualPlugin(const TQString&)));
m_audioVisualPluginList.prepend("none"); m_audioVisualPluginList.prepend("none");
m_audioVisual->setItems(m_audioVisualPluginList); m_audioVisual->setItems(m_audioVisualPluginList);
m_audioVisual->setCurrentItem(m_audioVisual->items().tqfindIndex(m_visualPluginName)); m_audioVisual->setCurrentItem(m_audioVisual->items().findIndex(m_visualPluginName));
new KAction(i18n("&Mute"), "player_mute", Key_U, TQT_TQOBJECT(this), TQT_SLOT(slotMute()), actionCollection(), "audio_mute"); new KAction(i18n("&Mute"), "player_mute", Key_U, TQT_TQOBJECT(this), TQT_SLOT(slotMute()), actionCollection(), "audio_mute");
new KAction(i18n("&Auto"), "viewmagfit", Key_F5, TQT_TQOBJECT(m_video), TQT_SLOT(slotAspectRatioAuto()), actionCollection(), "aspect_auto"); new KAction(i18n("&Auto"), "viewmagfit", Key_F5, TQT_TQOBJECT(m_video), TQT_SLOT(slotAspectRatioAuto()), actionCollection(), "aspect_auto");

@ -223,7 +223,7 @@ bool PlaylistImport::m3u(const TQString& playlist , TQValueList<MRL>& mrls)
continue; continue;
} }
} }
url.tqreplace ('\\', '/'); /* for windows styled urls */ url.replace ('\\', '/'); /* for windows styled urls */
kUrl = KURL (plurl, url); /* maybe a relative url */ kUrl = KURL (plurl, url); /* maybe a relative url */
if (kUrl.isValid()) if (kUrl.isValid())
{ {
@ -296,12 +296,12 @@ bool PlaylistImport::pls(const TQString& playlist, TQValueList<MRL>& mrls)
continue; continue;
} }
if (tmp.tqcontains(regExp_File)) { if (tmp.contains(regExp_File)) {
entryCnt++; entryCnt++;
continue; continue;
} }
if (tmp.tqcontains(regExp_NumberOfEntries)) { if (tmp.contains(regExp_NumberOfEntries)) {
numberOfEntries = TQString(tmp.section('=', -1)).stripWhiteSpace().toUInt(); numberOfEntries = TQString(tmp.section('=', -1)).stripWhiteSpace().toUInt();
continue; continue;
} }
@ -341,7 +341,7 @@ bool PlaylistImport::pls(const TQString& playlist, TQValueList<MRL>& mrls)
inPlaylistSection = true; inPlaylistSection = true;
continue; continue;
} }
if ((*i).tqcontains(regExp_File)) { if ((*i).contains(regExp_File)) {
// Have a "File#=XYZ" line. // Have a "File#=XYZ" line.
index = extractIndex(*i); index = extractIndex(*i);
if (index > numberOfEntries || index == 0) if (index > numberOfEntries || index == 0)
@ -349,7 +349,7 @@ bool PlaylistImport::pls(const TQString& playlist, TQValueList<MRL>& mrls)
files[index-1] = TQString((*i).section('=', 1)).stripWhiteSpace(); files[index-1] = TQString((*i).section('=', 1)).stripWhiteSpace();
continue; continue;
} }
if ((*i).tqcontains(regExp_Title)) { if ((*i).contains(regExp_Title)) {
// Have a "Title#=XYZ" line. // Have a "Title#=XYZ" line.
index = extractIndex(*i); index = extractIndex(*i);
if (index > numberOfEntries || index == 0) if (index > numberOfEntries || index == 0)
@ -357,7 +357,7 @@ bool PlaylistImport::pls(const TQString& playlist, TQValueList<MRL>& mrls)
titles[index-1] = TQString((*i).section('=', 1)).stripWhiteSpace(); titles[index-1] = TQString((*i).section('=', 1)).stripWhiteSpace();
continue; continue;
} }
if ((*i).tqcontains(regExp_Length)) { if ((*i).contains(regExp_Length)) {
// Have a "Length#=XYZ" line. // Have a "Length#=XYZ" line.
index = extractIndex(*i); index = extractIndex(*i);
if (index > numberOfEntries || index == 0) if (index > numberOfEntries || index == 0)
@ -368,11 +368,11 @@ bool PlaylistImport::pls(const TQString& playlist, TQValueList<MRL>& mrls)
length[index-1] = TQTime().addSecs(time); length[index-1] = TQTime().addSecs(time);
continue; continue;
} }
if ((*i).tqcontains(regExp_NumberOfEntries)) { if ((*i).contains(regExp_NumberOfEntries)) {
// Have the "NumberOfEntries=#" line. // Have the "NumberOfEntries=#" line.
continue; continue;
} }
if ((*i).tqcontains(regExp_Version)) { if ((*i).contains(regExp_Version)) {
// Have the "Version=#" line. // Have the "Version=#" line.
tmp = TQString((*i).section('=', 1)).stripWhiteSpace(); tmp = TQString((*i).section('=', 1)).stripWhiteSpace();
// We only support Version=2 // We only support Version=2

@ -533,7 +533,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
{ {
case XINE_MSG_NO_ERROR: case XINE_MSG_NO_ERROR:
{ {
/* copy strings, and tqreplace '\0' separators by '\n' */ /* copy strings, and replace '\0' separators by '\n' */
char* s = data->messages; char* s = data->messages;
char* d = new char[2000]; char* d = new char[2000];
@ -647,7 +647,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
case XINE_MSG_ENCRYPTED_SOURCE: case XINE_MSG_ENCRYPTED_SOURCE:
{ {
message = i18n("The source seems encrypted, and can't be read. "); message = i18n("The source seems encrypted, and can't be read. ");
if (vw->m_trackURL.tqcontains("dvd:/")) if (vw->m_trackURL.contains("dvd:/"))
message = message + i18n("\nYour DVD is probably crypted. According to your country laws, you can or can't use libdvdcss to be able to read this disc. "); message = message + i18n("\nYour DVD is probably crypted. According to your country laws, you can or can't use libdvdcss to be able to read this disc. ");
if(data->explanation) if(data->explanation)
message = message + "(" + ((char *) data + data->parameters) + ")"; message = message + "(" + ((char *) data + data->parameters) + ")";
@ -685,7 +685,7 @@ void KXineWidget::timerEvent( TQTimerEvent* tevent )
TQTimer::singleShot(0, this, TQT_SLOT(slotPlayTimeShift())); TQTimer::singleShot(0, this, TQT_SLOT(slotPlayTimeShift()));
break; break;
} }
if ( m_trackURL=="DVB" || m_trackURL.tqcontains(".kaxtv") ) if ( m_trackURL=="DVB" || m_trackURL.contains(".kaxtv") )
break; break;
#ifdef XINE_PARAM_GAPLESS_SWITCH #ifdef XINE_PARAM_GAPLESS_SWITCH
@ -1204,7 +1204,7 @@ bool KXineWidget::initXine()
i = xine_config_register_enum(m_xineEngine, "audio.driver", 0, i = xine_config_register_enum(m_xineEngine, "audio.driver", 0,
m_audioChoices, m_audioInfo, NULL, 10, &KXineWidget::audioDriverChangedCallback, this); m_audioChoices, m_audioInfo, NULL, 10, &KXineWidget::audioDriverChangedCallback, this);
if (m_audioDriverList.tqcontains(m_preferedAudio)) if (m_audioDriverList.contains(m_preferedAudio))
m_audioDriverName = m_preferedAudio; m_audioDriverName = m_preferedAudio;
else else
m_audioDriverName = m_audioChoices[i]; m_audioDriverName = m_audioChoices[i];
@ -1230,7 +1230,7 @@ bool KXineWidget::initXine()
i = xine_config_register_enum(m_xineEngine, "video.driver", 0, i = xine_config_register_enum(m_xineEngine, "video.driver", 0,
m_videoChoices, m_videoInfo, NULL, 10, &KXineWidget::videoDriverChangedCallback, this); m_videoChoices, m_videoInfo, NULL, 10, &KXineWidget::videoDriverChangedCallback, this);
if (m_videoDriverList.tqcontains(m_preferedVideo)) if (m_videoDriverList.contains(m_preferedVideo))
m_videoDriverName = m_preferedVideo; m_videoDriverName = m_preferedVideo;
else else
m_videoDriverName = m_videoChoices[i]; m_videoDriverName = m_videoChoices[i];
@ -1601,7 +1601,7 @@ void getOSDLine( xine_osd_t *osd, int w, TQCString &dest, TQCString &source )
int prevPos, pos, tw, th; int prevPos, pos, tw, th;
bool wrap=false; bool wrap=false;
pos = source.tqfind(" "); pos = source.find(" ");
if ( pos==-1 ) { if ( pos==-1 ) {
dest = source; dest = source;
source = ""; source = "";
@ -1618,7 +1618,7 @@ void getOSDLine( xine_osd_t *osd, int w, TQCString &dest, TQCString &source )
if ( pos==-1 ) if ( pos==-1 )
break; break;
prevPos = pos; prevPos = pos;
pos = source.tqfind(" ",pos+1); pos = source.find(" ",pos+1);
dest = source.left( pos ); dest = source.left( pos );
} }
if ( wrap ) { if ( wrap ) {
@ -1738,7 +1738,7 @@ void KXineWidget::dvbShowOSD()
} }
if ( !dvbCurrentNext[1].isEmpty() ) { if ( !dvbCurrentNext[1].isEmpty() ) {
s = dvbCurrentNext[1]; s = dvbCurrentNext[1];
pos = s.tqfind("-"); pos = s.find("-");
c = s.left( pos+1 ); c = s.left( pos+1 );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
t = s; t = s;
@ -1791,7 +1791,7 @@ void KXineWidget::dvbShowOSD()
continue; continue;
} }
s = dvbCurrentNext[ j ]; s = dvbCurrentNext[ j ];
pos = s.tqfind("-"); pos = s.find("-");
c = s.left( pos+1 ); c = s.left( pos+1 );
s = s.right( s.length()-pos-1 ); s = s.right( s.length()-pos-1 );
ct = cs = s.utf8(); ct = cs = s.utf8();
@ -1933,7 +1933,7 @@ void KXineWidget::slotPlay()
setCursor(TQCursor(TQt::WaitCursor)); setCursor(TQCursor(TQt::WaitCursor));
m_trackURL = m_queue.first(); m_trackURL = m_queue.first();
m_queue.remove(m_queue.tqfind(m_trackURL)); m_queue.remove(m_queue.find(m_trackURL));
if (m_trackURL != m_logoFile) if (m_trackURL != m_logoFile)
emit signalXinetqStatus(i18n("Opening...")); emit signalXinetqStatus(i18n("Opening..."));
@ -1942,7 +1942,7 @@ void KXineWidget::slotPlay()
m_trackSubtitleURL = TQString(); m_trackSubtitleURL = TQString();
m_trackSaveURL = TQString(); m_trackSaveURL = TQString();
/*for (int i = 1; i <= m_trackURL.tqcontains('#'); i++) { /*for (int i = 1; i <= m_trackURL.contains('#'); i++) {
ref = m_trackURL.section('#', i, i); ref = m_trackURL.section('#', i, i);
if (ref.section(':', 0, 0) == "subtitle") if (ref.section(':', 0, 0) == "subtitle")
m_trackSubtitleURL = ref.section(':', 1); m_trackSubtitleURL = ref.section(':', 1);
@ -1953,15 +1953,15 @@ void KXineWidget::slotPlay()
TQString turl; TQString turl;
int pos; int pos;
if ( (pos=m_trackURL.tqfind("#subtitle:"))>-1 ) { if ( (pos=m_trackURL.find("#subtitle:"))>-1 ) {
turl = m_trackURL.left(pos); turl = m_trackURL.left(pos);
m_trackSubtitleURL = m_trackURL.right( m_trackURL.length()-pos ); m_trackSubtitleURL = m_trackURL.right( m_trackURL.length()-pos );
if ( (pos=m_trackSubtitleURL.tqfind("#save:"))>-1 ) { if ( (pos=m_trackSubtitleURL.find("#save:"))>-1 ) {
m_trackSaveURL = m_trackSubtitleURL.right( m_trackSubtitleURL.length()-pos ); m_trackSaveURL = m_trackSubtitleURL.right( m_trackSubtitleURL.length()-pos );
m_trackSubtitleURL = m_trackSubtitleURL.left(pos); m_trackSubtitleURL = m_trackSubtitleURL.left(pos);
} }
} }
else if ( (pos=m_trackURL.tqfind("#save:"))>-1 ) { else if ( (pos=m_trackURL.find("#save:"))>-1 ) {
turl = m_trackURL.left(pos); turl = m_trackURL.left(pos);
m_trackSaveURL = m_trackURL.right( m_trackURL.length()-pos ); m_trackSaveURL = m_trackURL.right( m_trackURL.length()-pos );
} }
@ -1970,11 +1970,11 @@ void KXineWidget::slotPlay()
m_trackSubtitleURL.remove("#subtitle:"); m_trackSubtitleURL.remove("#subtitle:");
m_trackSaveURL.remove("#save:"); m_trackSaveURL.remove("#save:");
turl = turl.tqreplace( "%", "%25" ).tqreplace( "#", "%23" ).tqreplace( ";", "%3b" ).tqreplace( " ", "%20" ); turl = turl.replace( "%", "%25" ).replace( "#", "%23" ).replace( ";", "%3b" ).replace( " ", "%20" );
if ( !m_trackSubtitleURL.isEmpty() ) if ( !m_trackSubtitleURL.isEmpty() )
turl = turl + "#subtitle:" + m_trackSubtitleURL.tqreplace( "%", "%25" ).tqreplace( "#", "%23" ).tqreplace( ";", "%3b" ).tqreplace( " ", "%20" ); turl = turl + "#subtitle:" + m_trackSubtitleURL.replace( "%", "%25" ).replace( "#", "%23" ).replace( ";", "%3b" ).replace( " ", "%20" );
if ( !m_trackSaveURL.isEmpty() ) if ( !m_trackSaveURL.isEmpty() )
turl = turl + "#save:" + m_trackSaveURL.tqreplace( "%", "%25" ).tqreplace( "#", "%23" ).tqreplace( ";", "%3b" ).tqreplace( " ", "%20" ); turl = turl + "#save:" + m_trackSaveURL.replace( "%", "%25" ).replace( "#", "%23" ).replace( ";", "%3b" ).replace( " ", "%20" );
if ( turl.startsWith("/") ) if ( turl.startsWith("/") )
turl.prepend("file://"); turl.prepend("file://");
@ -2243,7 +2243,7 @@ void KXineWidget::sendXineError()
emit signalXineError(error); emit signalXineError(error);
} }
else else
errorOut("Can't tqfind/play logo file!"); errorOut("Can't find/play logo file!");
} }
else else
{ {

@ -93,7 +93,7 @@ bool PositionSlider::eventFilter(TQObject *obj, TQEvent *ev)
TQMouseEvent *e = (TQMouseEvent *)ev; TQMouseEvent *e = (TQMouseEvent *)ev;
TQRect r = sliderRect(); TQRect r = sliderRect();
if( r.tqcontains( e->pos() ) || e->button() != Qt::LeftButton ) if( r.contains( e->pos() ) || e->button() != Qt::LeftButton )
return false; return false;
int range = maxValue() - minValue(); int range = maxValue() - minValue();

@ -311,7 +311,7 @@ void PostFilter::setConfig(const TQString &configString)
return; return;
} }
for( int i = 0; i < configStr.tqcontains(',') + 1; i++ ) for( int i = 0; i < configStr.contains(',') + 1; i++ )
{ {
TQString parameterConfig = configStr.section(',', i, i); TQString parameterConfig = configStr.section(',', i, i);
TQString parameterName = parameterConfig.section('=', 0, 0); TQString parameterName = parameterConfig.section('=', 0, 0);

@ -169,7 +169,7 @@ bool XinePart::openURL(const MRL& mrl)
bool playlist = false; bool playlist = false;
TQString ext = m_mrl.kurl().fileName(); TQString ext = m_mrl.kurl().fileName();
ext = ext.remove( 0 , ext.tqfindRev('.')+1 ).lower(); ext = ext.remove( 0 , ext.findRev('.')+1 ).lower();
if (!m_mrl.mime().isNull()) if (!m_mrl.mime().isNull())
{ {
@ -194,22 +194,22 @@ bool XinePart::openURL(const MRL& mrl)
TQString secondLine = stream.readLine(); TQString secondLine = stream.readLine();
file.close(); file.close();
if (secondLine.tqcontains("kaffeine", false)) if (secondLine.contains("kaffeine", false))
{ {
kdDebug() << "KafeinePart: Try loading kaffeine playlist\n"; kdDebug() << "KafeinePart: Try loading kaffeine playlist\n";
playlist = PlaylistImport::kaffeine(localFile, m_playlist); playlist = PlaylistImport::kaffeine(localFile, m_playlist);
} }
if (secondLine.tqcontains("noatun", false)) if (secondLine.contains("noatun", false))
{ {
kdDebug() << "XinePart: Try loading noatun playlist\n"; kdDebug() << "XinePart: Try loading noatun playlist\n";
playlist = PlaylistImport::noatun(localFile, m_playlist); playlist = PlaylistImport::noatun(localFile, m_playlist);
} }
if (firstLine.tqcontains("asx", false)) if (firstLine.contains("asx", false))
{ {
kdDebug() << "XinePart: Try loading asx playlist\n"; kdDebug() << "XinePart: Try loading asx playlist\n";
playlist = PlaylistImport::asx(localFile, m_playlist); playlist = PlaylistImport::asx(localFile, m_playlist);
} }
if (firstLine.tqcontains("smil", false)) if (firstLine.contains("smil", false))
{ {
kdDebug() << "XinePart: Try loading smil playlist\n"; kdDebug() << "XinePart: Try loading smil playlist\n";
if (KMessageBox::warningYesNo(0, i18n("SMIL (Synchronized Multimedia Integration Language) support is rudimentary!\nXinePart can now try to playback contained video sources without any tqlayout. Proceed?"), TQString(), KStdGuiItem::yes(), KStdGuiItem::no(), "smil_warning") == KMessageBox::Yes) if (KMessageBox::warningYesNo(0, i18n("SMIL (Synchronized Multimedia Integration Language) support is rudimentary!\nXinePart can now try to playback contained video sources without any tqlayout. Proceed?"), TQString(), KStdGuiItem::yes(), KStdGuiItem::no(), "smil_warning") == KMessageBox::Yes)
@ -223,7 +223,7 @@ bool XinePart::openURL(const MRL& mrl)
else else
return false; return false;
} }
if (firstLine.tqcontains("[playlist]", false)) if (firstLine.contains("[playlist]", false))
{ {
kdDebug() << "XinePart: Try loading pls playlist\n"; kdDebug() << "XinePart: Try loading pls playlist\n";
playlist = PlaylistImport::pls(localFile, m_playlist); playlist = PlaylistImport::pls(localFile, m_playlist);
@ -299,7 +299,7 @@ void XinePart::slotPlay(bool forcePlay)
/* /*
* is protocol supported by xine or not known by KIO? * is protocol supported by xine or not known by KIO?
*/ */
if ((TQString(SUPPORTED_PROTOCOLS).tqcontains(mrl.kurl().protocol())) if ((TQString(SUPPORTED_PROTOCOLS).contains(mrl.kurl().protocol()))
|| (!KProtocolInfo::isKnownProtocol(mrl.kurl()))) || (!KProtocolInfo::isKnownProtocol(mrl.kurl())))
{ {
TQString sub; TQString sub;
@ -617,7 +617,7 @@ void XinePart::slotAddSubtitle(void)
if (!(subtitleURL.isEmpty())) if (!(subtitleURL.isEmpty()))
{ {
if (!m_playlist[m_current].subtitleFiles().tqcontains(subtitleURL)) if (!m_playlist[m_current].subtitleFiles().contains(subtitleURL))
{ {
m_playlist[m_current].addSubtitleFile(subtitleURL); m_playlist[m_current].addSubtitleFile(subtitleURL);
} }
@ -711,7 +711,7 @@ void XinePart::slotChannelInfo(const TQStringList& audio, const TQStringList& su
for (TQStringList::ConstIterator it = subFiles.begin(); it != end; ++it) for (TQStringList::ConstIterator it = subFiles.begin(); it != end; ++it)
{ {
sub = (*it); sub = (*it);
sub = sub.remove(0 , sub.tqfindRev('/')+1); sub = sub.remove(0 , sub.findRev('/')+1);
subs.append(sub); subs.append(sub);
} }
m_subtitles->setItems(subs); m_subtitles->setItems(subs);
@ -1051,7 +1051,7 @@ void XinePart::slotMessage(const TQString& message)
{ {
TQString msg = message; TQString msg = message;
if ( msg.startsWith("@") ) { if ( msg.startsWith("@") ) {
if ( m_xine->isPlaying() && m_xine->getURL().tqcontains("#") ) // do not warn for url containing # if ( m_xine->isPlaying() && m_xine->getURL().contains("#") ) // do not warn for url containing #
return; return;
msg.remove(0,1); msg.remove(0,1);
} }
@ -1088,8 +1088,8 @@ void XinePart::slotTrackPlaying()
if (mrl.length().isNull()) /* no meta */ if (mrl.length().isNull()) /* no meta */
{ {
if ((!m_xine->getTitle().isEmpty()) && (!m_xine->getTitle().tqcontains('/')) if ((!m_xine->getTitle().isEmpty()) && (!m_xine->getTitle().contains('/'))
&& (m_xine->getTitle().tqcontains(TQRegExp("\\w")) > 2) && (m_xine->getTitle().left(5).lower() != "track")) && (m_xine->getTitle().contains(TQRegExp("\\w")) > 2) && (m_xine->getTitle().left(5).lower() != "track"))
mrl.setTitle(m_xine->getTitle()); mrl.setTitle(m_xine->getTitle());
if ((mrl.artist().isEmpty()) && (!m_xine->getArtist().isEmpty())) if ((mrl.artist().isEmpty()) && (!m_xine->getArtist().isEmpty()))
mrl.setArtist(m_xine->getArtist()); mrl.setArtist(m_xine->getArtist());
@ -1502,7 +1502,7 @@ void XinePart::loadConfig()
config->setGroup("Visualization"); config->setGroup("Visualization");
TQString visual = config->readEntry("Visual Plugin", "goom"); TQString visual = config->readEntry("Visual Plugin", "goom");
m_audioVisual->setCurrentItem(m_audioVisual->items().tqfindIndex(visual)); m_audioVisual->setCurrentItem(m_audioVisual->items().findIndex(visual));
m_xine->slotSetVisualPlugin(visual); m_xine->slotSetVisualPlugin(visual);
config->setGroup("Deinterlace"); config->setGroup("Deinterlace");
@ -1833,7 +1833,7 @@ TQString XinePart::supportedExtensions()
ext = ext.remove("txt"); ext = ext.remove("txt");
ext = "*." + ext; ext = "*." + ext;
ext.append(" smil"); ext.append(" smil");
ext = ext.tqreplace( ' ', " *." ); ext = ext.replace( ' ', " *." );
ext = ext + " " + ext.upper(); ext = ext + " " + ext.upper();
return ext; return ext;
@ -2088,7 +2088,7 @@ void VolumeSlider::wheelEvent(TQWheelEvent* e)
TQMouseEvent *e = (TQMouseEvent *)ev; TQMouseEvent *e = (TQMouseEvent *)ev;
TQRect r = sliderRect(); TQRect r = sliderRect();
if( r.tqcontains( e->pos() ) || e->button() != LeftButton ) if( r.contains( e->pos() ) || e->button() != LeftButton )
return FALSE; return FALSE;
int range = maxValue() - minValue(); int range = maxValue() - minValue();

@ -129,7 +129,7 @@ XineConfigEntry::XineConfigEntry(TQWidget* tqparent, TQGridLayout* grid, int row
} }
TQString m_keyName(entry->key); TQString m_keyName(entry->key);
m_keyName.remove( 0, m_keyName.tqfind(".") + 1 ); m_keyName.remove( 0, m_keyName.find(".") + 1 );
TQLabel* description = new TQLabel(m_keyName + "\n" + TQString::fromLocal8Bit(entry->description), tqparent); TQLabel* description = new TQLabel(m_keyName + "\n" + TQString::fromLocal8Bit(entry->description), tqparent);
description->tqsetAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter ); description->tqsetAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
@ -322,11 +322,11 @@ void XineConfig::createPage(const TQString& cat, bool expert, TQWidget* tqparent
do do
{ {
entCat = TQString(ent->key); entCat = TQString(ent->key);
entCat = entCat.left(entCat.tqfind(".")); entCat = entCat.left(entCat.find("."));
if (entCat == cat) if (entCat == cat)
{ {
if (((!expert) && (TQString(NON_EXPERT_OPTIONS).tqcontains(ent->key))) || if (((!expert) && (TQString(NON_EXPERT_OPTIONS).contains(ent->key))) ||
((expert) && (!TQString(NON_EXPERT_OPTIONS).tqcontains(ent->key)))) ((expert) && (!TQString(NON_EXPERT_OPTIONS).contains(ent->key))))
{ {
m_entries.append(new XineConfigEntry(tqparent, grid, row, ent)); m_entries.append(new XineConfigEntry(tqparent, grid, row, ent));
delete ent; delete ent;
@ -351,8 +351,8 @@ const TQStringList XineConfig::getCategories()
do do
{ {
entCat = TQString(ent->key); entCat = TQString(ent->key);
entCat = entCat.left(entCat.tqfind(".")); entCat = entCat.left(entCat.find("."));
if (cats.tqfindIndex(entCat) == -1) if (cats.findIndex(entCat) == -1)
{ {
// kdDebug() << "XineConfig: new category: " << entCat << endl; // kdDebug() << "XineConfig: new category: " << entCat << endl;
cats.append(entCat); cats.append(entCat);

@ -101,7 +101,7 @@ void SystemTray::mousePressEvent(TQMouseEvent *e)
KSystemTray::mousePressEvent(e); KSystemTray::mousePressEvent(e);
break; break;
case Qt::MidButton: case Qt::MidButton:
if(!TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos())) if(!TQT_TQRECT_OBJECT(rect()).contains(e->pos()))
return; return;
actionCollection()->action("trayplay")->activate(); actionCollection()->action("trayplay")->activate();
break; break;

Loading…
Cancel
Save