diff options
Diffstat (limited to 'kwordquiz/src')
-rw-r--r-- | kwordquiz/src/kvtmlwriter.cpp | 6 | ||||
-rw-r--r-- | kwordquiz/src/kwordquiz.cpp | 4 | ||||
-rw-r--r-- | kwordquiz/src/kwordquizview.cpp | 24 | ||||
-rw-r--r-- | kwordquiz/src/kwordquizview.h | 4 | ||||
-rw-r--r-- | kwordquiz/src/qaview.cpp | 2 | ||||
-rw-r--r-- | kwordquiz/src/wqlreader.cpp | 28 | ||||
-rw-r--r-- | kwordquiz/src/wqquiz.cpp | 20 |
7 files changed, 44 insertions, 44 deletions
diff --git a/kwordquiz/src/kvtmlwriter.cpp b/kwordquiz/src/kvtmlwriter.cpp index 4cf9ebe3..dc123113 100644 --- a/kwordquiz/src/kvtmlwriter.cpp +++ b/kwordquiz/src/kvtmlwriter.cpp @@ -81,9 +81,9 @@ KVTMLWriter::~KVTMLWriter() TQString KVTMLWriter::escape( const TQString & s) { TQString result = s; - result.tqreplace(TQChar('&'), "&"); //must be done first - result.tqreplace(TQChar('<'), "<"); - result.tqreplace(TQChar('>'), ">"); + result.replace(TQChar('&'), "&"); //must be done first + result.replace(TQChar('<'), "<"); + result.replace(TQChar('>'), ">"); return result; } diff --git a/kwordquiz/src/kwordquiz.cpp b/kwordquiz/src/kwordquiz.cpp index 5169921b..36043f64 100644 --- a/kwordquiz/src/kwordquiz.cpp +++ b/kwordquiz/src/kwordquiz.cpp @@ -175,7 +175,7 @@ void KWordQuizApp::initActions() editUnmarkBlank->setWhatsThis(i18n("Removes blanks from the current or selected word")); editUnmarkBlank->setToolTip(editUnmarkBlank->whatsThis()); - //@todo implement editFind = KStdAction::tqfind(this, TQT_SLOT(slotEditFind()), actionCollection()); + //@todo implement editFind = KStdAction::find(this, TQT_SLOT(slotEditFind()), actionCollection()); vocabLanguages = new KAction(i18n("&Column Titles..."), "languages", "CTRL+L", TQT_TQOBJECT(this), TQT_SLOT(slotVocabLanguages()), actionCollection(),"vocab_languages"); vocabLanguages->setWhatsThis(i18n("Defines the column titles for the active vocabulary")); @@ -595,7 +595,7 @@ bool KWordQuizApp::saveAsFileName( ) if(!url.isEmpty()){ //@todo check that a valid extension was really given - if (!url.fileName().tqcontains('.')) + if (!url.fileName().contains('.')) { if (fd->currentFilter() == "*.wql") url = KURL(url.path() + ".wql"); diff --git a/kwordquiz/src/kwordquizview.cpp b/kwordquiz/src/kwordquizview.cpp index 799644f5..9e78ce8c 100644 --- a/kwordquiz/src/kwordquizview.cpp +++ b/kwordquiz/src/kwordquizview.cpp @@ -284,16 +284,16 @@ bool KWordQuizView::gridIsEmpty() return true; } -TQWidget * KWordQuizView::beginEdit( int row, int col, bool tqreplace ) +TQWidget * KWordQuizView::beginEdit( int row, int col, bool replace ) { m_currentText = text(row, col); - cellEditor = TQTable::beginEdit(row, col, tqreplace); + cellEditor = TQTable::beginEdit(row, col, replace); if (cellEditor) cellEditor->installEventFilter(this); return cellEditor; } -void KWordQuizView::endEdit( int row, int col, bool accept, bool tqreplace ) +void KWordQuizView::endEdit( int row, int col, bool accept, bool replace ) { // this code gets called after enter and arrow keys, now we // only process if editing really has been done @@ -302,7 +302,7 @@ void KWordQuizView::endEdit( int row, int col, bool accept, bool tqreplace ) { if (((TQLineEdit *) cellWidget(row, col))->text() != m_currentText) addUndo(i18n("&Undo Entry")); - TQTable::endEdit(row, col, accept, tqreplace); //this will destroy the cellWidget + TQTable::endEdit(row, col, accept, replace); //this will destroy the cellWidget if (!text(row, col).isEmpty()) { TQTableItem* itm; @@ -472,7 +472,7 @@ void KWordQuizView::doEditPaste( ) br= br + sl.count() - 1; if (lc == 0) //left col? - if (sl[0].tqfind("\t") < ((int) sl[0].length() - 1)) + if (sl[0].find("\t") < ((int) sl[0].length() - 1)) rc = 1; //expand to second column; uint i = 0; @@ -666,7 +666,7 @@ void KWordQuizView::doEditMarkBlank( ) st = st.prepend(delim_start); st = st.append(delim_end); int ss = l->selectionStart(); - s = s.tqreplace(ss, len, st); + s = s.replace(ss, len, st); l->setText(s); l->setSelection(ss, st.length()); } @@ -691,7 +691,7 @@ void KWordQuizView::doEditUnmarkBlank( ) s.remove(delim_start); s.remove(delim_end); int ss = l->selectionStart(); - ls = ls.tqreplace(ss, len, s); + ls = ls.replace(ss, len, s); l->setText(ls); l->setSelection(ss, s.length()); } @@ -702,15 +702,15 @@ void KWordQuizView::doEditUnmarkBlank( ) s = l->text(); int cs = l->cursorPosition(); - int fr = s.tqfindRev(delim_start, cs); + int fr = s.findRev(delim_start, cs); if (fr > 0) { - s = s.tqreplace(fr, 1, ""); + s = s.replace(fr, 1, ""); cs--; } - int ff = s.tqfind(delim_end, cs); + int ff = s.find(delim_end, cs); if (ff > 0) - s = s.tqreplace(ff, 1, ""); + s = s.replace(ff, 1, ""); l->setText(s); l->setCursorPosition(cs); @@ -870,7 +870,7 @@ void KWordQuizView::slotSpecChar(const TQChar & c) TQString s = l->selectedText(); int len = s.length(); int ss = l->selectionStart(); - ls = ls.tqreplace(ss, len, c); + ls = ls.replace(ss, len, c); l->setText(ls); l->setSelection(ss, 1); } diff --git a/kwordquiz/src/kwordquizview.h b/kwordquiz/src/kwordquizview.h index a15b496e..9c4a3f0d 100644 --- a/kwordquiz/src/kwordquizview.h +++ b/kwordquiz/src/kwordquizview.h @@ -90,8 +90,8 @@ class KWordQuizView : public TQTable bool checkSyntax(bool all, bool blanks); void saveCurrentSelection(bool clear); protected: - TQWidget * beginEdit(int row, int col, bool tqreplace); - void endEdit ( int row, int col, bool accept, bool tqreplace ); + TQWidget * beginEdit(int row, int col, bool replace); + void endEdit ( int row, int col, bool accept, bool replace ); void activateNextCell(); void keyPressEvent( TQKeyEvent* ); bool eventFilter( TQObject*, TQEvent* ); diff --git a/kwordquiz/src/qaview.cpp b/kwordquiz/src/qaview.cpp index 86157be9..bfc9ab86 100644 --- a/kwordquiz/src/qaview.cpp +++ b/kwordquiz/src/qaview.cpp @@ -311,7 +311,7 @@ void QAView::slotSpecChar( const TQChar & c) TQString s = txtAnswer->selectedText(); int len = s.length(); int ss = txtAnswer->selectionStart(); - ls = ls.tqreplace(ss, len, c); + ls = ls.replace(ss, len, c); txtAnswer->setText(ls); txtAnswer->setSelection(ss, 1); } diff --git a/kwordquiz/src/wqlreader.cpp b/kwordquiz/src/wqlreader.cpp index 915fceb9..7eef97c7 100644 --- a/kwordquiz/src/wqlreader.cpp +++ b/kwordquiz/src/wqlreader.cpp @@ -75,18 +75,18 @@ KWqlDataItemList WqlReader::parse(const TQString &fileName) while (ts.readLine() != "[Font Info]"); s = ts.readLine(); - int p = s.tqfind("=", 0); + int p = s.find("=", 0); TQString fam = s.right(s.length() - (p + 1)); fam = fam.mid(1, fam.length() - 2); //g->font().setFamily(s); s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); int ps = s.toInt(0); s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); int b = 0; if (s == "1") @@ -95,7 +95,7 @@ KWqlDataItemList WqlReader::parse(const TQString &fileName) } s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); bool it = (s == "1"); @@ -103,52 +103,52 @@ KWqlDataItemList WqlReader::parse(const TQString &fileName) while (ts.readLine() != "[Character Info]"); s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); m_specialCharacters = s.right(s.length() - (p + 1)); while (ts.readLine() != "[Grid Info]"); ts.readLine(); //skip value for width of row headers s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); m_colWidth1 = s.toInt(0, 10); s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); m_colWidth2 = s.toInt(0, 10); s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); m_numRows = (s.toInt(0, 10) - 1); //We need to reduce by one since the header is not included // Selection s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); m_topLeft =s.toInt(0, 10) - 1; s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); m_topRight =s.toInt(0, 10) - 1; s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); m_bottomLeft =s.toInt(0, 10) - 1; s = ts.readLine(); - p = s.tqfind("=", 0); + p = s.find("=", 0); s = s.right(s.length() - (p + 1)); m_bottomRight =s.toInt(0, 10) - 1 ; while (ts.readLine() != "[Vocabulary]"); s = ts.readLine(); - p = s.tqfind(" [", 0); + p = s.find(" [", 0); s = s.left(p); s = s.stripWhiteSpace(); m_language1 = s; @@ -157,7 +157,7 @@ KWqlDataItemList WqlReader::parse(const TQString &fileName) while (!s.isNull()) { s = ts.readLine(); - p = s.tqfind("[", 0); + p = s.find("[", 0); TQString r = s.mid(p + 1, 10); int h = r.toInt(0, 10); s = s.left(p); diff --git a/kwordquiz/src/wqquiz.cpp b/kwordquiz/src/wqquiz.cpp index db4c716c..f780562d 100644 --- a/kwordquiz/src/wqquiz.cpp +++ b/kwordquiz/src/wqquiz.cpp @@ -239,12 +239,12 @@ bool WQQuiz::checkAnswer(int i, const TQString & a) if (TQString(m_correctBlank).length() > 0) { TQStringList la, ls; - if (ans.tqfind(";") > 0) + if (ans.find(";") > 0) ls = TQStringList::split(";", ans); else ls.append(ans); - if (m_correctBlank.tqfind(";") > 0) + if (m_correctBlank.find(";") > 0) la = TQStringList::split(";", m_correctBlank); else la.append(m_correctBlank); @@ -377,17 +377,17 @@ TQString WQQuiz::yourAnswer(int i, const TQString & s) { TQStringList ls; - if (s.tqfind(";") > 0) + if (s.find(";") > 0) ls = TQStringList::split(";", s, true); else ls.append(s); - result = m_answerBlank.tqreplace("..........", "<u></u>"); + result = m_answerBlank.replace("..........", "<u></u>"); int offset = 0, counter = 0; while (offset >= 0) { - offset = result.tqfind("<u>", offset); + offset = result.find("<u>", offset); if (offset >= 0) { result.insert(offset + 3, ls[counter]); @@ -474,7 +474,7 @@ TQString WQQuiz::blankAnswer(int i) rx.setMinimal(true); rx.setPattern("\\[.*\\]"); - r.tqreplace(rx, ".........."); + r.replace(rx, ".........."); if (r != tTemp) { @@ -486,9 +486,9 @@ TQString WQQuiz::blankAnswer(int i) if (offset >= 0) { if (m_correctBlank.length() > 0) - m_correctBlank = m_correctBlank + ";" + " " + tTemp.mid(offset + 1, tTemp.tqfind(']', offset) - offset - 1); + m_correctBlank = m_correctBlank + ";" + " " + tTemp.mid(offset + 1, tTemp.find(']', offset) - offset - 1); else - m_correctBlank = tTemp.mid(offset + 1, tTemp.tqfind(']', offset) - offset - 1); + m_correctBlank = tTemp.mid(offset + 1, tTemp.find(']', offset) - offset - 1); offset++; } } @@ -517,8 +517,8 @@ TQString WQQuiz::answer(int i) s = m_table->text(li.oneOp(), j); if (Prefs::enableBlanks()) { - s.tqreplace("[", "<u>"); - s.tqreplace("]", "</u>"); + s.replace("[", "<u>"); + s.replace("]", "</u>"); s.prepend("<qt>"); s.append("</qt>"); } |