rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


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

@ -114,7 +114,7 @@ void K9Mplayer::receivedStdout (KProcess *proc, char *buffer, int buflen) {
slider->setValue(m_position);
}
int audio=0;
if (buf.tqcontains("ANS_switch_audio"))
if (buf.contains("ANS_switch_audio"))
sscanf(buf.latin1(),"ANS_switch_audio=%d",&audio);
if (audio >0) {
for (int i=0;i < m_dvdTitle->getaudioStreamCount();i++) {

@ -73,7 +73,7 @@ void k9Import::deviceAdded(k9CdDrive *_drive) {
void k9Import::deviceRemoved(k9CdDrive *_drive) {
int i=recorderList.tqfind(_drive);
int i=recorderList.find(_drive);
recorderList.remove( i);
cbOutputDev->removeItem(i+2);

@ -164,7 +164,7 @@ void k9MenuEdit::leTitleChanged(const TQString &_value) {
TQPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
for (k9MenuButton *b=l->first();b;b=l->next()) {
TQString c=_value;
b->setText(c.tqreplace("%n",TQString::number(b->getNum())));
b->setText(c.replace("%n",TQString::number(b->getNum())));
}
//m_menuEditor->getSelected()->setText(_value);
} else {

@ -92,7 +92,7 @@ void k9MenuEditor::clearSelection() {
bool k9MenuEditor::isSelected(TQCanvasItem *_item) {
k9CanvasSprite *s=(k9CanvasSprite *)_item;
k9MenuButton *button=s->getButton();
if (m_selection.tqfind(button) !=-1)
if (m_selection.find(button) !=-1)
return true;
else
return false;
@ -101,7 +101,7 @@ bool k9MenuEditor::isSelected(TQCanvasItem *_item) {
void k9MenuEditor::addSelection(TQCanvasItem *_item) {
k9CanvasSprite *s=(k9CanvasSprite *)_item;
k9MenuButton *button=s->getButton();
if (m_selection.tqfind(button) !=-1) {
if (m_selection.find(button) !=-1) {
button->select(false);
m_selection.remove(button);
} else {

@ -276,13 +276,13 @@ void k9NewDVD::getStderr(KProcess *_process, char *_buffer, int _length) {
TQCString tmp(_buffer,_length);
m_stdout=tmp;
int pos;
if (tmp.tqcontains("STAT:")) {
pos=tmp.tqfind("fixing VOBU");
if (tmp.contains("STAT:")) {
pos=tmp.find("fixing VOBU");
if (pos!=-1) {
TQString tmp2=tmp;
// m_progress->setTitle(i18n("Authoring"));
// m_progress->setLabelText(i18n("Fixing VOBUS"));
int end=tmp2.tqfind("%");
int end=tmp2.find("%");
if (end!=-1) {
pos =end -2;
tmp2=tmp2.mid(pos,end-pos);
@ -290,7 +290,7 @@ void k9NewDVD::getStderr(KProcess *_process, char *_buffer, int _length) {
// m_progress->setProgress(tmp2.toInt(),100);
}
} else {
pos=tmp.tqfind("STAT: VOBU ");
pos=tmp.find("STAT: VOBU ");
if (pos !=-1) {
TQCString tmp2(_buffer+pos,_length-pos);
int vobu,mb;
@ -312,10 +312,10 @@ void k9NewDVD::getStdout(KProcess *_process, char *_buffer, int _length) {
k9Process *process=(k9Process*) _process;
if (m_timers[process].elapsed() >500) {
TQCString tmp(_buffer,_length);
int pos=tmp.tqfind("Pos:");
int pos=tmp.find("Pos:");
if (pos!=-1) {
TQString tmp2=tmp.mid(pos);
tmp2=tmp2.tqreplace(":",": ").tqreplace("(","").tqreplace(")","").simplifyWhiteSpace();
tmp2=tmp2.replace(":",": ").replace("(","").replace(")","").simplifyWhiteSpace();
TQStringList sl=TQStringList::split(" ",tmp2);
float position;
sscanf(sl[1].latin1(),"%fs",&position);

@ -157,10 +157,10 @@ void k9CdDrives::readConfig() {
TQStringList::Iterator it3=lIO.at(i);
drive->name=(*it2);
TQString c=(*it3);
if (c.tqcontains("I")) {
if (c.contains("I")) {
drive->canReadDVD=true;
}
if (c.tqcontains("O")) {
if (c.contains("O")) {
drive->canWriteCDR=true;
drive->canWriteDVD=true;
}

@ -42,7 +42,7 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
d->connect(watcher.write, TQT_SIGNAL(activated(int)), TQT_SLOT(socketWrite(int)));
}
// FIXME-QT4 d->watchers.insertMulti(fd, watcher);
K9DBusDispatch::WatcherHash::iterator it = d->watchers.tqfind(fd);
K9DBusDispatch::WatcherHash::iterator it = d->watchers.find(fd);
if (it == d->watchers.end())
{
it = d->watchers.insert(fd, K9DBusDispatch::WatcherList());
@ -58,7 +58,7 @@ static void qDBusRemoveWatch(DBusWatch *watch, void *data)
int fd = dbus_watch_get_fd(watch);
K9DBusDispatch::WatcherHash::iterator it = d->watchers.tqfind(fd);
K9DBusDispatch::WatcherHash::iterator it = d->watchers.find(fd);
if (it != d->watchers.end())
{
K9DBusDispatch::WatcherList& list = *it;
@ -96,7 +96,7 @@ static void qDBusToggleWatch(DBusWatch *watch, void *data)
K9DBusDispatch *d=(K9DBusDispatch*)data;
int fd = dbus_watch_get_fd(watch);
K9DBusDispatch::WatcherHash::iterator it = d->watchers.tqfind(fd);
K9DBusDispatch::WatcherHash::iterator it = d->watchers.find(fd);
if (it != d->watchers.end()) {
K9DBusDispatch::WatcherList& list = *it;
for (K9DBusDispatch::WatcherList::iterator wit = list.begin(); wit != list.end();
@ -163,7 +163,7 @@ void K9DBusDispatch::purgeRemovedWatches()
void K9DBusDispatch::socketRead(int fd)
{
// FIXME-QT4 TQHashIterator<int, TQDBusConnectionPrivate::Watcher> it(watchers);
WatcherHash::const_iterator it = watchers.tqfind(fd);
WatcherHash::const_iterator it = watchers.find(fd);
if (it != watchers.end()) {
const WatcherList& list = *it;
for (WatcherList::const_iterator wit = list.begin(); wit != list.end(); ++wit) {
@ -179,7 +179,7 @@ void K9DBusDispatch::socketRead(int fd)
void K9DBusDispatch::socketWrite(int fd)
{
// FIXME-QT4 TQHashIterator<int, TQDBusConnectionPrivate::Watcher> it(watchers);
WatcherHash::const_iterator it = watchers.tqfind(fd);
WatcherHash::const_iterator it = watchers.find(fd);
if (it != watchers.end()) {
const WatcherList& list = *it;
for (WatcherList::const_iterator wit = list.begin(); wit != list.end(); ++wit) {

@ -69,7 +69,7 @@ void k9BurnDVD::makeIso(TQString _filename) {
}
void k9BurnDVD::setvolId(TQString _newVal) {
volId=_newVal.tqreplace(" ","_");
volId=_newVal.replace(" ","_");
}
void k9BurnDVD::setUseK3b(bool _newVal) {
@ -102,13 +102,13 @@ void k9BurnDVD::burnWithK3b() {
void k9BurnDVD::mkisoSizeStderr(KProcess *proc, char *buffer, int buflen) {
TQString c=TQString::tqfromLatin1( buffer,buflen);// (proc2->readStderr());
imageSize=c.tqreplace("\n","");
imageSize=c.replace("\n","");
;
}
void k9BurnDVD::mkisoSizeStdout(KProcess *proc, char *buffer, int buflen) {
TQString c=TQString::tqfromLatin1(buffer,buflen);// (proc2->readStdout());
imageSize=c.tqreplace("\n","");
imageSize=c.replace("\n","");
;
}
@ -336,19 +336,19 @@ void k9BurnDVD::growisoStderr(KProcess *proc, char *buffer, int buflen) {
int a,b;
int pos;
lastMsg=c;
if (c.tqcontains("Current Write Speed")) {
if (c.contains("Current Write Speed")) {
sscanf(c.latin1(),"%s \"Current Write Speed\" is %d.%d",s,&a,&b);
burnSpeed=a+b/10;
}
if (c.tqcontains("Speed set to")) {
if (c.contains("Speed set to")) {
sscanf(c.latin1(),"Speed set to %d",&a);
burnSpeed=a/1385;
}
progress->setTitle(i18n("Burning DVD"));
progress->setLabelText(i18n("Current write speed :%1 x").tqarg(burnSpeed));
if (c.tqcontains("% done")) {
pos=c.tqfind("%");
if (c.contains("% done")) {
pos=c.find("%");
if (pos!=-1) {
c=c.mid(1,pos-4);
//progress->setLabelText(c);
@ -373,7 +373,7 @@ void k9BurnDVD::growisoStderr(KProcess *proc, char *buffer, int buflen) {
void k9BurnDVD::growisoStdout(KProcess *proc, char *buffer, int buflen) {
TQString c=TQString::tqfromLatin1( buffer,buflen);// (proc->readStdout());
int pos;
pos=c.tqfind("STAT");
pos=c.find("STAT");
if (pos!=-1) {
c=c.mid(pos);
progress->setLabelText(c);

@ -185,7 +185,7 @@ void k9CellCopyList::addStreams(k9DVDTitle *_title,k9Cell *_cell) {
TQValueList<int>::iterator it;
bool found=false;
for ( it = _cell->subpicture.begin(); it != _cell->subpicture.end(); ++it ) {
if (l_sub->getID().tqcontains(*it))
if (l_sub->getID().contains(*it))
found=true;
}
if (!found)

@ -600,10 +600,10 @@ int k9DVD::scandvd (const TQString & device,bool _quickScan) {
subpc=(pgc->subp_control[i]>>16) & 0x1F;
l_sub->id.append(1+ subpc);
subpc=(pgc->subp_control[i]>>8) & 0x1F;
if (! l_sub->id.tqcontains(1+ subpc) && ! l_track->DF.tqcontains("noletterbox"))
if (! l_sub->id.contains(1+ subpc) && ! l_track->DF.contains("noletterbox"))
l_sub->id.append(1+ subpc);
subpc=pgc->subp_control[i] & 0x1F;
if (! l_sub->id.tqcontains(1+ subpc) && ! l_track->DF.tqcontains("nopanscan"))
if (! l_sub->id.contains(1+ subpc) && ! l_track->DF.contains("nopanscan"))
l_sub->id.append(1+ subpc);
}
kdDebug() << "VTS: " << l_track->VTS << " TTN: " << l_track->TTN << \
@ -811,7 +811,7 @@ void k9DVD::calcStreamSize(k9DVDTitle & track) {
break;
int id=streamList[x].id;
if ( (id >=0x20) && (id <=0x3f)) {
if ( l_sub->id.tqcontains(id - 0x20 +1) ) {
if ( l_sub->id.contains(id - 0x20 +1) ) {
l_sub->size_mb = streamList[x].size_mb;
break;
}

@ -495,7 +495,7 @@ void k9DVDAuthor::DVDAuthorStderr(KProcess *proc, char *buffer, int buflen ) {
float m_percent;
TQString m_remain;
int pos=m_stderr.tqfind("INFOPOS:");
int pos=m_stderr.find("INFOPOS:");
if (pos!=-1) {
progress->setTitle(i18n("Authoring"));
TQString tmp=m_stderr.mid(pos);
@ -532,12 +532,12 @@ void k9DVDAuthor::DVDAuthorStderr(KProcess *proc, char *buffer, int buflen ) {
int end;
lastMsg=m_stderr;
if (m_stderr.tqcontains("STAT:")) {
pos=m_stderr.tqfind("fixing VOBU");
if (m_stderr.contains("STAT:")) {
pos=m_stderr.find("fixing VOBU");
if (pos!=-1) {
progress->setTitle(i18n("Authoring"));
progress->setLabelText(i18n("Fixing VOBUS"));
end=m_stderr.tqfind("%");
end=m_stderr.find("%");
if (end!=-1) {
pos =end -2;
m_stderr=m_stderr.mid(pos,end-pos);
@ -548,7 +548,7 @@ void k9DVDAuthor::DVDAuthorStderr(KProcess *proc, char *buffer, int buflen ) {
}
}
pos=m_stderr.tqfind("INFOIMAGE:");
pos=m_stderr.find("INFOIMAGE:");
if (pos!=-1) {
progress->setImage(m_stderr.mid(pos+10));
}
@ -561,7 +561,7 @@ void k9DVDAuthor::DVDAuthorStdout(KProcess *proc, char *buffer, int buflen) {
TQString c=TQString::tqfromLatin1( buffer,buflen);
//(proc->readStdout());
int pos;
pos=c.tqfind("STAT");
pos=c.find("STAT");
if (pos!=-1) {
c=c.mid(pos);
progress->setLabelText(c);

@ -310,7 +310,7 @@ void k9MP4Enc::execute ( k9DVDTitle *_title )
sVOption=sVOption.simplifyWhiteSpace();
int pos;
//*m_process << "-ovc" << sVOption;
/* int pos=sVOption.tqfind("-vf");
/* int pos=sVOption.find("-vf");
if (pos==-1)
*m_process <<"-vf" << TQString("scale=%1:%2").tqarg(m_width).tqarg(m_height);
else
@ -341,7 +341,7 @@ void k9MP4Enc::execute ( k9DVDTitle *_title )
if ( _title->getaudioStream ( i )->getselected() )
{
//*m_process << "-oac" << sAOption;
pos=sAOption.tqfind ( "-af" );
pos=sAOption.find ( "-af" );
if ( pos==-1 )
*m_process << TQString ( "-af volume=%1" ).arg ( m_audioGain );
else
@ -439,11 +439,11 @@ void k9MP4Enc::slotCancel()
TQString k9MP4Enc::replaceParams ( TQString _value )
{
TQString str=_value;
str.tqreplace ( "$PASS",TQString::number ( m_pass ) );
str.tqreplace ( "$WIDTH",m_width );
str.tqreplace ( "$HEIGHT",m_height );
str.tqreplace ( "$VIDBR",TQString::number ( getBitRate ( m_title ) ) );
str.tqreplace ( "$AUDBR",m_audioBitrate );
str.replace ( "$PASS",TQString::number ( m_pass ) );
str.replace ( "$WIDTH",m_width );
str.replace ( "$HEIGHT",m_height );
str.replace ( "$VIDBR",TQString::number ( getBitRate ( m_title ) ) );
str.replace ( "$AUDBR",m_audioBitrate );
return str;
}
@ -483,7 +483,7 @@ void k9MP4Enc::getStdout ( KProcess *, char *buffer, int buflen )
if ( m_cpt!=0 )
return;
int pos=tmp.tqfind ( "Pos:" );
int pos=tmp.find ( "Pos:" );
if ( pos!=-1 )
{
TQString tmp2=tmp.mid ( pos );
@ -491,8 +491,8 @@ void k9MP4Enc::getStdout ( KProcess *, char *buffer, int buflen )
int frame;
int fps;
sscanf ( tmp2.latin1(),"Pos: %f%*s%d",&t,&frame );
tmp2=tmp2.mid ( tmp2.tqfind ( "(" ) +1 );
tmp2=tmp2.mid ( tmp2.tqfind ( ")" ) +1 );
tmp2=tmp2.mid ( tmp2.find ( "(" ) +1 );
tmp2=tmp2.mid ( tmp2.find ( ")" ) +1 );
sscanf ( tmp2.latin1(),"%d",&fps );
m_progress->setfps ( TQString::number ( fps ) );
@ -506,12 +506,12 @@ void k9MP4Enc::getStderr ( KProcess *proc, char *buffer, int buflen )
//m_stderr=TQString::tqfromLatin1(buffer,buflen);
TQCString cstderr ( buffer,buflen+1 );
if ( cstderr.tqfind ( "FATAL:" ) !=-1 )
if ( cstderr.find ( "FATAL:" ) !=-1 )
{
proc->kill();
}
int pos=cstderr.tqfind ( "INFOPOS:" );
int pos=cstderr.find ( "INFOPOS:" );
if ( pos!=-1 )
{
if ( m_timer3.elapsed() >500 )
@ -540,7 +540,7 @@ void k9MP4Enc::getStderr ( KProcess *proc, char *buffer, int buflen )
}
else
{
pos=cstderr.tqfind ( "INFOIMAGE:" );
pos=cstderr.find ( "INFOIMAGE:" );
if ( pos!=-1 )
{
m_progress->setImage ( cstderr.mid ( pos+10 ) );

@ -59,13 +59,13 @@ void k9LangSelect::fillLvLanguages() {
switch (litem->streamType) {
case SUB: {
l_sub=litem->subtitle;
if (slSubLang.tqcontains(l_sub->getlanguage())==0)
if (slSubLang.contains(l_sub->getlanguage())==0)
slSubLang.append(l_sub->getlanguage());
break;
}
case AUD: {
l_auds=litem->audioStream;
if (slAudLang.tqcontains(l_auds->getlanguage())==0)
if (slAudLang.contains(l_auds->getlanguage())==0)
slAudLang.append(l_auds->getlanguage());
break;
}

@ -1254,11 +1254,11 @@ void k9Main::deviceRemoved(k9CdDrive *_drive) {
if (_drive->device == dvd->getDevice())
closeDVD();
int i=driveList.tqfind(_drive);
int i=driveList.find(_drive);
driveList.remove(i);
cbInputDev->removeItem(i);
i=recorderList.tqfind(_drive);
i=recorderList.find(_drive);
recorderList.remove( i);
cbOutputDev->removeItem(i+2);

@ -479,7 +479,7 @@ const TQString & k9MencoderCmdGen::getCmd(const TQString &_root) {
KDoubleSpinBox *isb=(KDoubleSpinBox*) this->child(aSWidget.value().latin1(),"KDoubleSpinBox");
if (!sCmd2.isEmpty())
sCmd2 +=m_sepValues;
sCmd2+=sTmp+sPrefix+isb->text().tqreplace(",",".").stripWhiteSpace();
sCmd2+=sTmp+sPrefix+isb->text().replace(",",".").stripWhiteSpace();
sTmp="";
} else if(aSType.value()=="string" && Sck->isChecked()) {
TQComboBox *cb=(TQComboBox*) this->child(aSWidget.value().latin1(),TQCOMBOBOX_OBJECT_NAME_STRING);
@ -509,7 +509,7 @@ const TQString & k9MencoderCmdGen::getCmd(const TQString &_root) {
KDoubleSpinBox *isb=(KDoubleSpinBox*) this->child(aWidget.value().latin1(),"KDoubleSpinBox");
if (!sCmd.isEmpty())
sCmd +=m_sepOpt;
sCmd+= eOpt.attributeNode("name").value() + "=" + isb->text().tqreplace(",",".");
sCmd+= eOpt.attributeNode("name").value() + "=" + isb->text().replace(",",".");
} else if(aType.value()=="string") {
TQComboBox *cb=(TQComboBox*) this->child(aWidget.value().latin1(),TQCOMBOBOX_OBJECT_NAME_STRING);
if (!sCmd.isEmpty())
@ -549,7 +549,7 @@ bool k9MencoderCmdGen::getMencoderOptions(TQString &_cmd) {
void k9MencoderCmdGen::parseCmd(const TQString &_cmd){
TQString cmd(_cmd);
cmd=cmd.tqreplace("\n"," ").simplifyWhiteSpace();
cmd=cmd.replace("\n"," ").simplifyWhiteSpace();
TQStringList cmdList=TQStringList::split(" ",cmd);
for (TQStringList::iterator it=cmdList.begin();it!=cmdList.end();++it) {
if (*it=="-ovc") {
@ -622,7 +622,7 @@ void k9MencoderCmdGen::parseCodecOptions(const TQString &_root,const TQString &_
TQString value;
if (eOpt.attributeNode("type").isNull()) {
//it's a list of values
TQString sValues=sOpt.tqreplace("="+m_sepValues,"= "+m_sepValues).tqreplace(m_sepValues+m_sepValues,m_sepValues+" "+m_sepValues).tqreplace(m_sepValues+m_sepValues,m_sepValues+" "+m_sepValues).section("=",1);
TQString sValues=sOpt.replace("="+m_sepValues,"= "+m_sepValues).replace(m_sepValues+m_sepValues,m_sepValues+" "+m_sepValues).replace(m_sepValues+m_sepValues,m_sepValues+" "+m_sepValues).section("=",1);
TQStringList slValues=TQStringList::split(m_sepValues,sValues);
//loop on values nodes
TQDomNodeList lSOpt=eOpt.elementsByTagName("subopt");
@ -642,7 +642,7 @@ void k9MencoderCmdGen::parseCodecOptions(const TQString &_root,const TQString &_
for (int k=0;k<slValues.count();k++) {
TQString s=*(slValues.at(k));
if (s.startsWith(sPrefix)) {
eSOpt.setAttribute("default",s.tqreplace(sPrefix,""));
eSOpt.setAttribute("default",s.replace(sPrefix,""));
eSOpt.setAttribute("selected","true");
}
}

@ -375,7 +375,7 @@ void k9play::play() {
finished=1;
if (!finished && m_chapterList.count() >0) {
if (m_chapterList.tqfindIndex( TQString::number(ptt)) == -1) {
if (m_chapterList.findIndex( TQString::number(ptt)) == -1) {
dvdnav_part_play(dvdnav,tt, ptt+1);
kdebug( TQString("skipping chapter %1").tqarg(ptt));
continue;

Loading…
Cancel
Save