summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/dialogs/codeeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello/umbrello/dialogs/codeeditor.cpp')
-rw-r--r--umbrello/umbrello/dialogs/codeeditor.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/umbrello/umbrello/dialogs/codeeditor.cpp b/umbrello/umbrello/dialogs/codeeditor.cpp
index 934fc628..4f9f03a8 100644
--- a/umbrello/umbrello/dialogs/codeeditor.cpp
+++ b/umbrello/umbrello/dialogs/codeeditor.cpp
@@ -247,7 +247,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
// now do 'paragraph' background highlighting
// int endLine = paragraphs()-2;
- int endLine = text.tqcontains(TQRegExp("\n")) + startLine -1;
+ int endLine = text.contains(TQRegExp("\n")) + startLine -1;
if(m_isHighlighted)
for(int para=startLine;para<=endLine;para++)
setParagraphBackgroundColor(para,bgcolor);
@@ -255,7 +255,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
// record paragraph information
// Did we already start recording info for this tqparent object?
TextBlockInfo * tbinfo;
- if(m_tbInfoMap->tqcontains(tqparent))
+ if(m_tbInfoMap->contains(tqparent))
tbinfo = (*m_tbInfoMap)[tqparent];
else {
tbinfo = new TextBlockInfo();
@@ -278,7 +278,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
// lastly, update the para info
// start position is relative to the FIRST tqparent position
- int start = startLine - m_textBlockList.tqfindRef(tqparent);
+ int start = startLine - m_textBlockList.findRef(tqparent);
int size = endLine-startLine;
// create the object that records this particular "paragraph"
@@ -302,7 +302,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita
{
TextBlock * tblock = it.key();
TextBlockInfo * thisTbInfo = it.data();
- int firstLoc = m_textBlockList.tqfindRef(tblock);
+ int firstLoc = m_textBlockList.findRef(tblock);
ParaInfo * lastPi = thisTbInfo->m_paraList.last();
for(ParaInfo * pi = thisTbInfo->m_paraList.first(); pi; pi = thisTbInfo->m_paraList.next())
@@ -621,7 +621,7 @@ void CodeEditor::slotInsertCodeBlockBeforeSelected()
m_parentDoc->insertTextBlock(newBlock, tb, false);
- int location = m_textBlockList.tqfindRef(m_selectedTextBlock); // find first para of selected block
+ int location = m_textBlockList.findRef(m_selectedTextBlock); // find first para of selected block
TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
@@ -643,7 +643,7 @@ void CodeEditor::slotInsertCodeBlockAfterSelected()
// find last para of selected block
TextBlockInfo *tbinfo = (*m_tbInfoMap)[m_selectedTextBlock];
ParaInfo * lastpi = tbinfo->m_paraList.last();
- int location = m_textBlockList.tqfindRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1;
+ int location = m_textBlockList.findRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1;
TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
@@ -833,7 +833,7 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
TextBlockInfo *info = (*m_tbInfoMap)[block];
UMLObject * parentObj = info->getParent();
- int pstart = m_textBlockList.tqfindRef(block);
+ int pstart = m_textBlockList.findRef(block);
TQString content = "";
// Assemble content from editiable paras
@@ -913,7 +913,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
int minPos = baseIndent.length();
// add indent chars to the current line, if missing
- if(!m_backspacePressed && !currentParaText.tqcontains(TQRegExp('^'+baseIndent)))
+ if(!m_backspacePressed && !currentParaText.contains(TQRegExp('^'+baseIndent)))
{
insertAt(baseIndent,para,0);
setCursorPosition(para,pos+minPos);
@@ -957,7 +957,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// furthermore, IF its nothing but indentation + whitespace
// we switch this back to Auto-Generated.
- if(cmb && contents.tqcontains(TQRegExp('^'+baseIndent+"\\s$")))
+ if(cmb && contents.contains(TQRegExp('^'+baseIndent+"\\s$")))
{
cmb->setContentType(CodeBlock::AutoGenerated);
cmb->syncToParent();
@@ -1006,7 +1006,7 @@ bool CodeEditor::paraIsNotSingleLine (int para)
TextBlock * tBlock = m_textBlockList.at(para);
if(tBlock)
{
- int pstart = m_textBlockList.tqfindRef(tBlock);
+ int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
@@ -1030,7 +1030,7 @@ bool CodeEditor::isParaEditable (int para) {
int editEnd = tBlock->lastEditableLine();
bool hasEditableRange = (editStart > 0 || editEnd < 0) ? true : false;
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- int pstart = m_textBlockList.tqfindRef(tBlock);
+ int pstart = m_textBlockList.findRef(tBlock);
int relativeLine = para - pstart;
TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
@@ -1055,7 +1055,7 @@ void CodeEditor::changeTextBlockHighlighting(TextBlock * tBlock, bool selected)
{
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
- int pstart = m_textBlockList.tqfindRef(tBlock);
+ int pstart = m_textBlockList.findRef(tBlock);
for(ParaInfo * item = list.first(); item; item=list.next())
for(int p=(item->start+pstart);p<=(item->start+pstart+item->size);p++)
if(selected)
@@ -1113,7 +1113,7 @@ void CodeEditor::contractSelectedParagraph( int paraToRemove ) {
TextBlock * tBlock = m_textBlockList.at(paraToRemove);
if(tBlock)
{
- int pstart = m_textBlockList.tqfindRef(tBlock);
+ int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
@@ -1149,7 +1149,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
m_textBlockList.insert(priorPara,tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
TQPtrList<ParaInfo> list = info->m_paraList;
- int pstart = m_textBlockList.tqfindRef(tBlock);
+ int pstart = m_textBlockList.findRef(tBlock);
// now update the paragraph information
bool upStartPosition = false;