rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 12 years ago
parent 03458c4e2c
commit d8762de953

@ -289,13 +289,13 @@ void blinken::mousePressEvent(TQMouseEvent *e)
hsd->showLevel(1);
m_updateButtonHighlighting = true;
}
else if (m_showPreferences && m_fontRect.tqcontains(e -> pos()) && !m_alwaysUseNonCoolFont)
else if (m_showPreferences && m_fontRect.contains(e -> pos()) && !m_alwaysUseNonCoolFont)
{
blinkenSettings::setCustomFont(!blinkenSettings::customFont());
blinkenSettings::writeConfig();
update();
}
else if (m_showPreferences && m_soundRect.tqcontains(e -> pos()))
else if (m_showPreferences && m_soundRect.contains(e -> pos()))
{
blinkenSettings::setPlaySounds(!blinkenSettings::playSounds());
blinkenSettings::writeConfig();
@ -316,9 +316,9 @@ void blinken::mousePressEvent(TQMouseEvent *e)
else if (m_game.phase() == blinkenGame::choosingLevel)
{
int level = 0;
if (m_levelsRect[1].tqcontains(e -> pos())) level = 1;
else if (m_levelsRect[0].tqcontains(e -> pos())) level = 2;
else if (m_levelsRect[2].tqcontains(e -> pos())) level = 3;
if (m_levelsRect[1].contains(e -> pos())) level = 1;
else if (m_levelsRect[0].contains(e -> pos())) level = 2;
else if (m_levelsRect[2].contains(e -> pos())) level = 3;
if (level)
{
for(int i = 0; i < 3; i++) m_overLevels[i] = false;
@ -665,7 +665,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
m_updateButtonHighlighting = false;
haveToUpdate = false;
if (m_highscoreRect.tqcontains(p))
if (m_highscoreRect.contains(p))
{
if (!m_overHighscore)
{
@ -679,7 +679,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if (m_menuRect.tqcontains(p))
if (m_menuRect.contains(p))
{
if (!m_overMenu)
{
@ -699,7 +699,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
}
else if (m_overMenu)
{
if (m_aboutKDERect.tqcontains(p))
if (m_aboutKDERect.contains(p))
{
if (!m_overAboutKDE)
{
@ -709,7 +709,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
}
else if (m_aboutBlinkenRect.tqcontains(p))
else if (m_aboutBlinkenRect.contains(p))
{
if (!m_overAboutBlinken)
{
@ -719,7 +719,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
}
else if (m_manualRect.tqcontains(p))
else if (m_manualRect.contains(p))
{
if (!m_overManual)
{
@ -739,7 +739,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
}
}
if (!m_showPreferences && m_centralLettersRect.tqcontains(p))
if (!m_showPreferences && m_centralLettersRect.contains(p))
{
m_overCentralLetters = true;
haveToUpdate = true;
@ -750,7 +750,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if (m_showPreferences && m_soundRect.tqcontains(p))
if (m_showPreferences && m_soundRect.contains(p))
{
m_overSound = true;
haveToUpdate = true;
@ -761,7 +761,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if (m_showPreferences && m_fontRect.tqcontains(p) && !m_alwaysUseNonCoolFont)
if (m_showPreferences && m_fontRect.contains(p) && !m_alwaysUseNonCoolFont)
{
m_overFont = true;
haveToUpdate = true;
@ -772,7 +772,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if (m_counterRect.tqcontains(p))
if (m_counterRect.contains(p))
{
m_overCounter = true;
haveToUpdate = true;
@ -783,7 +783,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if (m_quitRect.tqcontains(p))
if (m_quitRect.contains(p))
{
if (!m_overQuit)
{
@ -805,7 +805,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
case blinkenGame::waiting1:
case blinkenGame::learningTheSequence:
case blinkenGame::typingTheSequence:
if (m_centralTextRect.tqcontains(p))
if (m_centralTextRect.contains(p))
{
if (!m_overCentralText)
{
@ -823,7 +823,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p)
case blinkenGame::choosingLevel:
for (int i = 0; i < 3; i++)
{
if (m_levelsRect[i].tqcontains(p))
if (m_levelsRect[i].contains(p))
{
if (!m_overLevels[i])
{

@ -68,8 +68,8 @@ TQString Element::parsedOrbits( bool canBeEmpty )
TQString orbits = m_orbits;
TQRegExp rxs("([a-z])([0-9]+)");
TQRegExp rxb("([a-z]{2}) ",false);
orbits.tqreplace(rxs,"\\1<sup>\\2</sup>"); //superscript around electron number
orbits.tqreplace(rxb,"<b>\\1</b> "); //bold around element symbols
orbits.replace(rxs,"\\1<sup>\\2</sup>"); //superscript around electron number
orbits.replace(rxb,"<b>\\1</b> "); //bold around element symbols
return orbits;
}

@ -89,8 +89,8 @@ void eqchemView::clear()
void eqchemView::compute()
{
TQString equation( m_eqedit->text() );
equation.tqreplace("+", "+");
equation.tqreplace("->", " -> ");
equation.replace("+", "+");
equation.replace("->", " -> ");
equation.append(" ");
equation.prepend(" ");

@ -38,7 +38,7 @@ int KalziumUtils::maxSize( const TQString& string, const TQRect& rect, TQFont fo
r = p->boundingRect( TQRect(), TQt::AlignAuto, string );
r.moveBy( rect.left(), rect.top() );
if ( rect.tqcontains( r ) )
if ( rect.contains( r ) )
goodSizeFound = true;
else
size--;

@ -162,20 +162,20 @@ void OrbitsWidget::getNumberOfOrbits()
int cut = 0;
bool cont = true;
if ( !o.tqcontains( rxb ) ) //only true for H and He
if ( !o.contains( rxb ) ) //only true for H and He
numOfElectrons.append( o.toInt() );
else //every other element
{
while ( cont )
{
pos = o.tqfind( rxb );
pos = o.find( rxb );
cut = o.length()-pos-1;
numOfElectrons.append(o.left( pos ).toInt());
o = o.right( cut );
num++;
if ( !o.tqcontains( rxb ) )
if ( !o.contains( rxb ) )
{
numOfElectrons.append( o.toInt() );
cont = false;

@ -17,7 +17,7 @@ ABBREVIATE_BRIEF = "The $name class" \
is \
provides \
specifies \
tqcontains \
contains \
represents \
a \
an \

@ -78,7 +78,7 @@ Valid xml means:
<o r="Used to cook food" >cooker</o>
</e>
<e i="1" >
<o r="Keep warm by flame in cold weather" >fitqreplace</o>
<o r="Keep warm by flame in cold weather" >fireplace</o>
</e>
<e i="1" >
<o r="Holds items above the floor" >table</o>

@ -377,7 +377,7 @@ TQRect Kanagram::innerRect(const TQRect &rect, const int xMargin, const int yMar
void Kanagram::mousePressEvent(TQMouseEvent *e)
{
if (m_nextRect.tqcontains(e->pos()))
if (m_nextRect.contains(e->pos()))
{
hideHint();
m_game->nextAnagram();
@ -386,51 +386,51 @@ void Kanagram::mousePressEvent(TQMouseEvent *e)
update();
}
if(m_configRect.tqcontains(e->pos()))
if(m_configRect.contains(e->pos()))
{
showSettings();
}
if(m_quitRect.tqcontains(e->pos()))
if(m_quitRect.contains(e->pos()))
{
kapp->quit();
}
if(m_revealRect.tqcontains(e->pos()))
if(m_revealRect.contains(e->pos()))
{
m_game->restoreWord();
update();
}
if(m_logoRect.tqcontains(e->pos()))
if(m_logoRect.contains(e->pos()))
{
m_helpMenu->aboutApplication();
}
if(!m_showHint && m_overHelp)
{
if(m_handbookRect.tqcontains(e->pos()))
if(m_handbookRect.contains(e->pos()))
{
m_helpMenu->appHelpActivated();
}
if(m_aboutKDERect.tqcontains(e->pos()))
if(m_aboutKDERect.contains(e->pos()))
{
m_helpMenu->aboutKDE();
}
if(m_aboutAppRect.tqcontains(e->pos()))
if(m_aboutAppRect.contains(e->pos()))
{
m_helpMenu->aboutApplication();
}
}
if(m_hintBoxRect.tqcontains(e->pos()))
if(m_hintBoxRect.contains(e->pos()))
{
hideHint();
}
if(m_switcherRect.tqcontains(e->pos()) || m_arrowRect.tqcontains(e->pos()))
if(m_switcherRect.contains(e->pos()) || m_arrowRect.contains(e->pos()))
{
if(!(e->button() == Qt::RightButton))
m_game->nextVocab();
@ -444,7 +444,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e)
update();
}
if(m_hintRect.tqcontains(e->pos()))
if(m_hintRect.contains(e->pos()))
{
if(m_showHint == true) m_showHint = false;
else
@ -459,7 +459,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e)
update();
}
if(m_upRect.tqcontains(e->pos()) && m_inputBox->text() != "")
if(m_upRect.contains(e->pos()) && m_inputBox->text() != "")
{
if(m_inputBox->text().lower().stripWhiteSpace() == m_game->getWord())
{
@ -492,7 +492,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
bool haveToUpdate;
haveToUpdate = false;
if (m_nextRect.tqcontains(p))
if (m_nextRect.contains(p))
{
if (!m_overNext)
{
@ -506,7 +506,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_configRect.tqcontains(p))
if(m_configRect.contains(p))
{
if(!m_overConfig)
{
@ -520,7 +520,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_helpRect.tqcontains(p))
if(m_helpRect.contains(p))
{
if(!m_overHelp)
{
@ -534,7 +534,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_quitRect.tqcontains(p))
if(m_quitRect.contains(p))
{
if(!m_overQuit)
{
@ -548,7 +548,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_hintRect.tqcontains(p))
if(m_hintRect.contains(p))
{
if(!m_overHint)
{
@ -562,7 +562,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_hintBoxRect.tqcontains(p))
if(m_hintBoxRect.contains(p))
{
if(!m_overHintBox)
{
@ -576,7 +576,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_revealRect.tqcontains(p))
if(m_revealRect.contains(p))
{
if(!m_overReveal)
{
@ -590,7 +590,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_upRect.tqcontains(p))
if(m_upRect.contains(p))
{
if(!m_overUp)
{
@ -604,7 +604,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_switcherRect.tqcontains(p) || m_arrowRect.tqcontains(p))
if(m_switcherRect.contains(p) || m_arrowRect.contains(p))
{
if(!m_overSwitcher)
{
@ -618,7 +618,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_aboutAppRect.tqcontains(p))
if(m_aboutAppRect.contains(p))
{
if(!m_overAboutApp)
{
@ -634,7 +634,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
if(!m_showHint)
{
if(m_handbookRect.tqcontains(p))
if(m_handbookRect.contains(p))
{
if(!m_overHandbook)
{
@ -648,7 +648,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p)
haveToUpdate = true;
}
if(m_aboutKDERect.tqcontains(p))
if(m_aboutKDERect.contains(p))
{
if(!m_overAboutKDE)
{

@ -138,7 +138,7 @@ void KanagramGame::nextAnagram()
{
m_answeredWords.clear();
}
while(m_answeredWords.tqfindIndex(doc->getEntry(wordNumber)->getOriginal()) != -1)
while(m_answeredWords.findIndex(doc->getEntry(wordNumber)->getOriginal()) != -1)
{
wordNumber = m_random.getLong(totalWords);
}

@ -901,11 +901,11 @@ int KEduVocDocument::search(TQString substr, int id,
if (id == 0) {
for (int i = first; i < last; i++) {
if (word_start) {
if (getEntry(i)->getOriginal().tqfind (substr, 0, false) == 0) // case insensitive
if (getEntry(i)->getOriginal().find (substr, 0, false) == 0) // case insensitive
return i;
}
else {
if (getEntry(i)->getOriginal().tqfind (substr, 0, false) > -1) // case insensitive
if (getEntry(i)->getOriginal().find (substr, 0, false) > -1) // case insensitive
return i;
}
}
@ -913,11 +913,11 @@ int KEduVocDocument::search(TQString substr, int id,
else {
for (int i = first; i < last; i++) {
if (word_start) {
if (getEntry(i)->getTranslation(id).tqfind (substr, 0, false) == 0) // case insensitive
if (getEntry(i)->getTranslation(id).find (substr, 0, false) == 0) // case insensitive
return i;
}
else {
if (getEntry(i)->getTranslation(id).tqfind (substr, 0, false) > -1) // case insensitive
if (getEntry(i)->getTranslation(id).find (substr, 0, false) > -1) // case insensitive
return i;
}
}
@ -995,7 +995,7 @@ KEduVocDocument::FileType KEduVocDocument::detectFT(const TQString &filename)
if (c1 == '<' && c2 == '?' && c3 == 'x' && c4 == 'm' && c5 == 'l')
return kvtml;
if (line.tqfind (VCB_SEPARATOR) >= 0)
if (line.find (VCB_SEPARATOR) >= 0)
return vt_vcb;
if (line == LEX_IDENT_50)

@ -55,7 +55,7 @@ KEduVocExpression::KEduVocExpression (TQString &s, TQString separator, int _less
lesson = _lesson;
if (separator.length() ) {
int pos = s.tqfind(separator);
int pos = s.find(separator);
if (pos == -1) {
setOriginal(s.stripWhiteSpace());
@ -67,7 +67,7 @@ KEduVocExpression::KEduVocExpression (TQString &s, TQString separator, int _less
// s.stripWhiteSpace();
// gather all translations
while ((pos = s.tqfind(separator)) != -1) {
while ((pos = s.find(separator)) != -1) {
se = s.left(pos).stripWhiteSpace();
addTranslation(se, KV_NORM_GRADE, KV_NORM_GRADE);
s.remove (0, pos+separator.length() );

@ -783,7 +783,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement
if (!domAttrGrade.isNull())
{
TQString s = domAttrGrade.value();
if ((pos = s.tqfind(';')) >= 1)
if ((pos = s.find(';')) >= 1)
{
grade = s.left(pos).toInt();
rev_grade = s.mid(pos+1, s.length()).toInt();
@ -798,7 +798,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement
if (!domAttrCount.isNull())
{
TQString s = domAttrCount.value();
if ((pos = s.tqfind(';')) >= 1)
if ((pos = s.find(';')) >= 1)
{
count = s.left(pos).toInt();
rev_count = s.mid(pos+1, s.length()).toInt();
@ -813,7 +813,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement
if (!domAttrBad.isNull())
{
TQString s = domAttrBad.value();
if ((pos = s.tqfind(';')) >= 1)
if ((pos = s.find(';')) >= 1)
{
bcount = s.left(pos).toInt();
rev_bcount = s.mid(pos+1, s.length()).toInt();
@ -828,7 +828,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement
if (!domAttrDate.isNull())
{
TQString s = domAttrDate.value();
if ((pos = s.tqfind(';')) >= 1)
if ((pos = s.find(';')) >= 1)
{
date = s.left(pos).toInt();
rev_date = s.mid(pos+1, s.length()).toInt();
@ -841,7 +841,7 @@ bool KEduVocKvtmlReader::readExpressionChildAttributes( TQDomElement &domElement
if (!domAttrDate2.isNull())
{
TQString s = domAttrDate2.value();
if ((pos = s.tqfind(';')) >= 1)
if ((pos = s.find(';')) >= 1)
{
date = m_doc->decompressDate(s.left(pos));
rev_date = m_doc->decompressDate(s.mid(pos+1, s.length()));
@ -1633,7 +1633,7 @@ bool KEduVocKvtmlReader::readDoc(KEduVocDocument *doc)
if (!domAttrGenerator.isNull())
{
m_doc->generator = domAttrGenerator.value();
int pos = m_doc->generator.tqfindRev (KVD_VERS_PREFIX);
int pos = m_doc->generator.findRev (KVD_VERS_PREFIX);
if (pos >= 0)
{
m_doc->doc_version = m_doc->generator;

@ -781,7 +781,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato
TQString s;
TQString entype = s = (*first).getType(0);
int pos = s.tqfind (TQM_TYPE_DIV);
int pos = s.find (TQM_TYPE_DIV);
if (pos >= 0)
entype = s.left (pos);
else
@ -901,7 +901,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const TQString &generato
TQString s;
TQString entype = s = (*first).getType(0);
int pos = s.tqfind (TQM_TYPE_DIV);
int pos = s.find (TQM_TYPE_DIV);
if (pos >= 0)
entype = s.left (pos);
else

@ -114,7 +114,7 @@ void LeitnerSystem::deleteBox( LeitnerBox* box )
bool LeitnerSystem::insertBox( const TQString& name, int correctWordBox, int wrongWordBox )
{
if( getBoxNameList().tqcontains( name ) != 0 )
if( getBoxNameList().contains( name ) != 0 )
return false;
LeitnerBox tmpBox;
@ -133,9 +133,9 @@ void LeitnerSystem::setSystemName( const TQString& name )
int LeitnerSystem::getNumber( LeitnerBox* box )
{
if( m_boxes.tqfindIndex( *box ) == -1 )
if( m_boxes.findIndex( *box ) == -1 )
kdDebug() << "muhaha" << endl;
return m_boxes.tqfindIndex( *box );
return m_boxes.findIndex( *box );
}
bool LeitnerSystem::setBoxName( int box, const TQString& name )
@ -164,7 +164,7 @@ bool LeitnerSystem::setBoxName( LeitnerBox* box, const TQString& name )
bool LeitnerSystem::insertBox( const TQString& name )
{
if( getBoxNameList().tqcontains( name ) != 0 )
if( getBoxNameList().contains( name ) != 0 )
return false;
LeitnerBox tmpBox;

@ -109,7 +109,7 @@ void MainSettings::setupTranslations()
temp_languages.remove("..");
for (TQStringList::const_iterator it2 = temp_languages.begin(); it2 != temp_languages.end(); ++it2 )
{
if (!languages.tqcontains(*it2)) languages.append(*it2);
if (!languages.contains(*it2)) languages.append(*it2);
}
}

@ -94,7 +94,7 @@ void VocabEdit::slotSave()
TQString fileName;
if(m_fileName == "")
{
fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().tqreplace(" ", "") + ".kvtml";
fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().replace(" ", "") + ".kvtml";
}
else
{

@ -80,7 +80,7 @@
<cstring>txtDescription</cstring>
</property>
<property name="whatsThis" stdset="0">
<string>The description of the vocabulary. If you're creating a new vocabulary, add a description so that users of your vocabulary will know what kinds of words it tqcontains.</string>
<string>The description of the vocabulary. If you're creating a new vocabulary, add a description so that users of your vocabulary will know what kinds of words it contains.</string>
</property>
</widget>
<widget class="TQLineEdit" row="0" column="1">

@ -73,7 +73,7 @@ void KGroupEduca::clearAnswers()
for( unsigned int i=0 ; i<maxButton ; ++i )
{
TQButton *tmpButton;
if( (tmpButton = tqfind(i)) )
if( (tmpButton = find(i)) )
remove(tmpButton);
delete tmpButton;
}
@ -87,13 +87,13 @@ bool KGroupEduca::isChecked(int id)
{
case Radio:
{
KRadioEduca *tmpRadioButton = (KRadioEduca*) tqfind(id);
KRadioEduca *tmpRadioButton = (KRadioEduca*) find(id);
if(tmpRadioButton != 0) return tmpRadioButton->isChecked();
}
break;
case Check:
{
KCheckEduca *tmpCheckButton = (KCheckEduca*) tqfind(id);
KCheckEduca *tmpCheckButton = (KCheckEduca*) find(id);
if(tmpCheckButton != 0) return tmpCheckButton->isChecked();
}
break;

@ -261,10 +261,10 @@ void KControlHeader::loadCountryList(KLanguageCombo *combo)
TQString tag = *it;
int index;
index = tag.tqfindRev('/');
index = tag.findRev('/');
if (index != -1) tag = tag.mid(index + 1);
index = tag.tqfindRev('.');
index = tag.findRev('.');
if (index != -1) tag.truncate(index);
KSimpleConfig entry(*it);
@ -287,9 +287,9 @@ void KControlHeader::loadCountryList(KLanguageCombo *combo)
TQString submenu = '-' + entry.readEntry(TQString::tqfromLatin1("Region"));
TQString tag = *it;
int index = tag.tqfindRev('/');
int index = tag.findRev('/');
tag.truncate(index);
index = tag.tqfindRev('/');
index = tag.findRev('/');
tag = tag.mid(index+1);
combo->insertLanguage(tag, name, sub, submenu);
}

@ -105,12 +105,12 @@ int KTagComboBox::count() const
static inline TQPopupMenu *checkInsertIndex(TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu, int *index)
{
int pos = tags->tqfindIndex(submenu);
int pos = tags->findIndex(submenu);
TQPopupMenu *pi = 0;
if (pos != -1)
{
TQMenuItem *p = popup->tqfindItem(popup->idAt(pos));
TQMenuItem *p = popup->findItem(popup->idAt(pos));
pi = p?p->popup():0;
}
if (!pi) pi = popup;
@ -183,7 +183,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev)
bool KTagComboBox::containsTag( const TQString &str ) const
{
return _tags->tqcontains(str) > 0;
return _tags->contains(str) > 0;
}
TQString KTagComboBox::currentTag() const
@ -215,7 +215,7 @@ void KTagComboBox::setCurrentItem(int i)
void KTagComboBox::setCurrentItem(const TQString &code)
{
int i = _tags->tqfindIndex(code);
int i = _tags->findIndex(code);
if (code.isNull())
i = 0;
if (i != -1)

@ -905,7 +905,7 @@ void FileRead::setHeader( const TQString field, const TQString value)
if( (_header[field]).isEmpty() )
_header.insert( field, value );
else
_header.tqreplace( field, value );
_header.replace( field, value );
}
/** is Multi Answer */

@ -72,7 +72,7 @@ void askWidget::nextQuestion()
if (p_asked.count() < p_count)
{
aux = p_map -> getRandomDivision(isClickOnDivision());
while (p_asked.tqfind(aux) != p_asked.end()) aux = p_map -> getRandomDivision(isClickOnDivision());
while (p_asked.find(aux) != p_asked.end()) aux = p_map -> getRandomDivision(isClickOnDivision());
p_asked << aux;
nextQuestionHook(aux);
}

@ -80,7 +80,7 @@ void boxAsker::nextQuestionHook(const TQString &division)
{
// false because boxaskers never are clickOnDivision
otherDivision = p_map -> getRandomDivision(false);
while (auxList.tqfind(otherDivision) != auxList.end()) otherDivision = p_map -> getRandomDivision(false);
while (auxList.find(otherDivision) != auxList.end()) otherDivision = p_map -> getRandomDivision(false);
if (i == p_position) i++;
if (i < 4 && nextBoxAskerQuestionHook(otherDivision, i, false)) i++;
auxList << otherDivision;

@ -39,8 +39,8 @@ KGmap::~KGmap()
bool KGmap::addDivision(division *c)
{
bool b;
if (p_nameMap.tqfind(c -> getName()) == p_nameMap.end() &&
p_colorMap.tqfind(c -> getRGB()) == p_colorMap.end())
if (p_nameMap.find(c -> getName()) == p_nameMap.end() &&
p_colorMap.find(c -> getRGB()) == p_colorMap.end())
{
p_colorMap.insert(c -> getRGB(), c);
p_nameMap.insert(c -> getName(), c);
@ -129,7 +129,7 @@ TQString KGmap::getWhatIs(TQRgb c, bool all) const
{
// this is only asked from mapasker.cpp hence the true in canAsk
TQMap<TQRgb, division*>::const_iterator it;
it = p_colorMap.tqfind(c);
it = p_colorMap.find(c);
if (it == p_colorMap.end()) return "nothing";
else
{

@ -25,7 +25,7 @@ bool mapReader::parseMap(const TQString &path)
TQString aux;
p_map = new KGmap();
p_map -> setFile(path);
aux = path.left(path.tqfindRev('/') + 1); // aux = path but without the file name
aux = path.left(path.findRev('/') + 1); // aux = path but without the file name
mapParser handler(p_map, aux);
TQFile xmlFile(path);
if (xmlFile.exists())
@ -270,10 +270,10 @@ TQString mapParser::errorString()
TQString mapParser::getPreviousTag() const
{
return p_previousTags.right(p_previousTags.length() - p_previousTags.tqfindRev(':') - 1);
return p_previousTags.right(p_previousTags.length() - p_previousTags.findRev(':') - 1);
}
void mapParser::removeLastTag()
{
p_previousTags = p_previousTags.left(p_previousTags.tqfindRev(':'));
p_previousTags = p_previousTags.left(p_previousTags.findRev(':'));
}

@ -25,7 +25,7 @@ cd kdeedu/khangman
./add_language <language_code>
Here you must tqreplace <language_code> with your language code.
Here you must replace <language_code> with your language code.
The program will refuse a non-valid language code!

@ -90,7 +90,7 @@ void KHangMan::setupActions()
// Action for selecting language.
m_languageAction = new KSelectAction(i18n("&Language"), 0, actionCollection(), "languages");
m_languageAction->setItems(m_languageNames);
m_languageAction->setCurrentItem(m_languages.tqfindIndex(Prefs::selectedLanguage()));
m_languageAction->setCurrentItem(m_languages.findIndex(Prefs::selectedLanguage()));
connect(m_languageAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeLanguage(int)));
KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection());
@ -150,7 +150,7 @@ void KHangMan::slotChangeLevel(int index)
changeStatusbar("", IDS_ACCENTS);
#endif
Prefs::setCurrentLevel(index);
levelString.tqreplace(0, 1, levelString.left(1).lower());
levelString.replace(0, 1, levelString.left(1).lower());
Prefs::setLevelFile(levelString +".kvtml");
Prefs::writeConfig();
m_view->slotNewGame();
@ -159,12 +159,12 @@ void KHangMan::slotChangeLevel(int index)
void KHangMan::slotChangeLanguage(int index)
{
//good when no in English
kdDebug() << "Change to " << m_languages[m_languageNames.tqfindIndex(m_languageNames[index])] << endl;
Prefs::setSelectedLanguage(m_languages[m_languageNames.tqfindIndex(m_languageNames[index])]);
kdDebug() << "Change to " << m_languages[m_languageNames.findIndex(m_languageNames[index])] << endl;
Prefs::setSelectedLanguage(m_languages[m_languageNames.findIndex(m_languageNames[index])]);
Prefs::writeConfig();
loadLevels();
loadLangToolBar();
changeStatusbar(m_languageNames[m_languages.tqfindIndex(Prefs::selectedLanguage())], IDS_LANG);
changeStatusbar(m_languageNames[m_languages.findIndex(Prefs::selectedLanguage())], IDS_LANG);
setAccent();
setMessages();
m_view->slotNewGame();
@ -196,8 +196,8 @@ void KHangMan::setLanguages()
for (TQStringList::Iterator it =mdirs.begin(); it !=mdirs.end(); ++it ) {
TQDir dir(*it);
m_languages += dir.entryList(TQDir::Dirs, TQDir::Name);
m_languages.remove(m_languages.tqfind("."));
m_languages.remove(m_languages.tqfind(".."));
m_languages.remove(m_languages.find("."));
m_languages.remove(m_languages.find(".."));
}
m_languages.sort();
@ -209,7 +209,7 @@ void KHangMan::setLanguages()
TQStringList temp_languages;
for (uint i=0; i<m_languages.count(); i++) {
if (m_languages.tqcontains(m_languages[i])>1) {
if (m_languages.contains(m_languages[i])>1) {
temp_languages.append(m_languages[i]);
m_languages.remove(m_languages[i]);
}
@ -261,7 +261,7 @@ void KHangMan::loadSettings()
selectedLanguage = Prefs::selectedLanguage();
if (m_languages.grep(selectedLanguage).isEmpty())
selectedLanguage = "en";
changeStatusbar(m_languageNames[m_languages.tqfindIndex(Prefs::selectedLanguage())], IDS_LANG);
changeStatusbar(m_languageNames[m_languages.findIndex(Prefs::selectedLanguage())], IDS_LANG);
// Show/hide characters toolbar
if (Prefs::showCharToolbar())
secondToolbar->show();
@ -276,8 +276,8 @@ void KHangMan::setLevel()
if (currentLevel > (uint) levels.count())
currentLevel= 0;
levelString = levels[currentLevel];
levelString.tqreplace(0, 1, levelString.left(1).lower());
levelString = levels[currentLevel].tqreplace(0, 1, levels[currentLevel].left(1).lower()) ;
levelString.replace(0, 1, levelString.left(1).lower());
levelString = levels[currentLevel].replace(0, 1, levels[currentLevel].left(1).lower()) ;
}
void KHangMan::loadLevels()
@ -292,14 +292,14 @@ void KHangMan::loadLevels()
for (TQStringList::Iterator it = mfiles.begin(); it != mfiles.end(); ++it ) {
TQFile f( *it);
//find the last / in the file name
int location = f.name().tqfindRev("/");
int location = f.name().findRev("/");
//strip the string to keep only the filename and not the path
TQString mString = f.name().right(f.name().length()-location-1);
if (mString == Prefs::levelFile())
levelBool = true;
mString = mString.left(mString.length()-6);
//Put the first letter in Upper case
mString = mString.tqreplace(0, 1, mString.left(1).upper());
mString = mString.replace(0, 1, mString.left(1).upper());
levels+=mString;
}
//TODO else tell no files had been found
@ -307,13 +307,13 @@ void KHangMan::loadLevels()
// Sort easy, medium, hard at bottom, with the other categories at the top
levels.sort();
TQString tqreplace[3] = { "Easy", "Medium", "Hard" };
TQString replace[3] = { "Easy", "Medium", "Hard" };
for ( int i = 0; i < 3; ++i )
{
if ( levels.tqfindIndex( tqreplace[i] ) > -1 )
if ( levels.findIndex( replace[i] ) > -1 )
{
levels.remove( tqreplace[i] );
levels.append( tqreplace[i] );
levels.remove( replace[i] );
levels.append( replace[i] );
}
}
@ -338,7 +338,7 @@ void KHangMan::loadLevels()
if (levelBool == false)
{
Prefs::setLevelFile(levels[0].tqreplace(0, 1, levels[0].left(1).lower())+".kvtml");
Prefs::setLevelFile(levels[0].replace(0, 1, levels[0].left(1).lower())+".kvtml");
Prefs::setCurrentLevel(0);
currentLevel =0;
Prefs::writeConfig();
@ -351,7 +351,7 @@ void KHangMan::loadLevels()
setLevel();
TQString m_lstring = translatedLevels[currentLevel].utf8();
m_lstring.tqreplace(0, 1, m_lstring.left(1).upper());
m_lstring.replace(0, 1, m_lstring.left(1).upper());
changeStatusbar(m_lstring, IDS_LEVEL);
}

@ -102,30 +102,30 @@ void KHangManView::replaceLetters(const TQString& sChar)
// Replace letter in the word
if (Prefs::oneLetter()) {
// We just replace the next instance.
for (int count=0; count < m_word.tqcontains(sChar, false); count++) {
for (int count=0; count < m_word.contains(sChar, false); count++) {
index = m_word.tqfind(sChar, index, false);
index = m_word.find(sChar, index, false);
if (m_goodWord.at(2*index)=='_') {
m_goodWord.tqreplace((2*index), 1, m_word.at(index));
m_goodWord.replace((2*index), 1, m_word.at(index));
kdDebug() << "m_goodword " << m_goodWord << endl;
if (count == m_word.tqcontains(sChar, false)-1)
if (count == m_word.contains(sChar, false)-1)
b_end = true;
break;
}
else
index++;
if (count == m_word.tqcontains(sChar, false)-1)
if (count == m_word.contains(sChar, false)-1)
b_end = true;
}
}
else {
for (int count=0; count < m_word.tqcontains(sChar, false); count++) {
for (int count=0; count < m_word.contains(sChar, false); count++) {
//searching for letter location
index = m_word.tqfind(sChar, index, false);
index = m_word.find(sChar, index, false);
//we replace it...
m_goodWord.tqreplace((2*index), 1,m_word.at(index));
m_goodWord.replace((2*index), 1,m_word.at(index));
index++;
}
}
@ -146,7 +146,7 @@ void KHangManView::replaceLetters(const TQString& sChar)
if (!Prefs::oneLetter())
m_guessedLetters << sChar; //appends the list only if not in One Letter only mode...
if (m_word.tqcontains(sChar, false) == 1)
if (m_word.contains(sChar, false) == 1)
m_guessedLetters << sChar; //append if only one instance
if (Prefs::oneLetter() && b_end)
@ -159,28 +159,28 @@ bool KHangManView::containsChar(const TQString &sChar)
bool b = false;
if (m_accentedLetters && !Prefs::accentedLetters()) {
if (sChar=="i")
b = m_word.tqcontains(TQString::fromUtf8("í"), false);
b = m_word.contains(TQString::fromUtf8("í"), false);
if (sChar=="a")
b = m_word.tqcontains(TQString::fromUtf8("à"), false)
|| m_word.tqcontains(TQString::fromUtf8("á"), false)
|| m_word.tqcontains(TQString::fromUtf8("ã"), false);
b = m_word.contains(TQString::fromUtf8("à"), false)
|| m_word.contains(TQString::fromUtf8("á"), false)
|| m_word.contains(TQString::fromUtf8("ã"), false);
if (sChar=="u")
b = m_word.tqcontains(TQString::fromUtf8("ü"), false)
|| m_word.tqcontains(TQString::fromUtf8("ù"), false);
b = m_word.contains(TQString::fromUtf8("ü"), false)
|| m_word.contains(TQString::fromUtf8("ù"), false);
if (sChar=="o")
b = m_word.tqcontains(TQString::fromUtf8("ò"), false)
|| m_word.tqcontains(TQString::fromUtf8("ó"), false)
|| m_word.tqcontains(TQString::fromUtf8("õ"), false);
b = m_word.contains(TQString::fromUtf8("ò"), false)
|| m_word.contains(TQString::fromUtf8("ó"), false)
|| m_word.contains(TQString::fromUtf8("õ"), false);
if (sChar=="e")
b = m_word.tqcontains(TQString::fromUtf8("è"), false)
|| m_word.tqcontains(TQString::fromUtf8("é"), false);
b = m_word.contains(TQString::fromUtf8("è"), false)
|| m_word.contains(TQString::fromUtf8("é"), false);
}
return (b || m_word.tqcontains(sChar, false));
return (b || m_word.contains(sChar, false));
}
@ -379,7 +379,7 @@ void KHangManView::slotTry()
}
// Handle the guess.
if (!m_guessedLetters.tqcontains(guess.lower())) {
if (!m_guessedLetters.contains(guess.lower())) {
// The letter is not already guessed.
if (containsChar(guess)) {
@ -389,11 +389,11 @@ void KHangManView::slotTry()
TQString stripWord = m_goodWord;
TQString sword = m_word;
if (dd > 0) {
stripWord.tqreplace(2*c, 1, "");
stripWord.tqreplace(2*c-1, 1, "");
stripWord.replace(2*c, 1, "");
stripWord.replace(2*c-1, 1, "");
stripWord.tqreplace(2*(dd-1), 1, "");
stripWord.tqreplace(2*(dd-1)-1, 1, "");
stripWord.replace(2*(dd-1), 1, "");
stripWord.replace(2*(dd-1)-1, 1, "");
}
TQStringList rightChars = TQStringList::split(" ", stripWord, true);
@ -442,7 +442,7 @@ void KHangManView::slotTry()
m_guessedLetters << guess.lower();
m_guessedLetters << guess.upper();
m_missedLetters = m_missedLetters.tqreplace((2 * m_numMissedLetters),
m_missedLetters = m_missedLetters.replace((2 * m_numMissedLetters),
1, guess.lower());
m_numMissedLetters++;
update();
@ -496,7 +496,7 @@ void KHangManView::slotTry()
int x = 0;
int y = 0;
if (m_missedLetters.tqcontains(guess, false) > 0) {
if (m_missedLetters.contains(guess, false) > 0) {
// FIXME: popup should be better placed.
TQPoint abspos = popup->pos();
@ -513,7 +513,7 @@ void KHangManView::slotTry()
m_letterInput->setEnabled(false);
}
if (m_goodWord.tqcontains(guess, false) > 0) {
if (m_goodWord.contains(guess, false) > 0) {
TQPoint abspos = popup->pos();
if (Prefs::mode() == 0) {
@ -631,35 +631,35 @@ void KHangManView::game()
// If needed, display white space or - if in word or semi dot.
// 1. Find dashes.
int f = m_word.tqfind( "-" );
int f = m_word.find( "-" );
if (f>0) {
m_goodWord.tqreplace(2*f, 1, "-");
m_goodWord.replace(2*f, 1, "-");
int g = m_word.tqfind( "-", f+1);
int g = m_word.find( "-", f+1);
if (g>0)
m_goodWord.tqreplace(2*g, 3, "-");
m_goodWord.replace(2*g, 3, "-");
if (g>1)
m_goodWord.append("_");
}
// 2. Find white space.
c = m_word.tqfind( " " );
c = m_word.find( " " );
if (c > 0) {
m_goodWord.tqreplace(2*c, 1,