diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:20 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:20 -0600 |
commit | c6611272c2bc4a42580848946c8c5d81bb0409c7 (patch) | |
tree | 0fd5b58844663dfcd00fb2b79cf67dd0fd429c62 /src/modules/editor | |
parent | 805c2821ceaddada48b346c6d11bd0dc1351a539 (diff) | |
download | kvirc-c6611272c2bc4a42580848946c8c5d81bb0409c7.tar.gz kvirc-c6611272c2bc4a42580848946c8c5d81bb0409c7.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 805c2821ceaddada48b346c6d11bd0dc1351a539.
Diffstat (limited to 'src/modules/editor')
-rw-r--r-- | src/modules/editor/scripteditor.cpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp index cd2e6576..25508d66 100644 --- a/src/modules/editor/scripteditor.cpp +++ b/src/modules/editor/scripteditor.cpp @@ -25,7 +25,7 @@ #include "scripteditor.h" -#include <layout.h> +#include <tqlayout.h> #include <tqtoolbutton.h> #include <kvi_tal_groupbox.h> #include "kvi_tal_popupmenu.h" @@ -55,7 +55,7 @@ #include "kvi_iconmanager.h" #include "kvi_kvs_kernel.h" -#include <layout.h> +#include <tqlayout.h> extern KviPointerList<KviScriptEditorImplementation> * g_pScriptEditorWindowList; @@ -107,11 +107,11 @@ void KviCompletionBox::updateContents(TQString buffer) if(pos>0) { szModule=buffer.left(pos); - if(szModule[0].unicode()=='$') + if(szModule[0].tqunicode()=='$') szModule.remove(0,1); } - if(pCur->unicode() == '$') + if(pCur->tqunicode() == '$') { buffer.remove(0,1); if(!buffer.isEmpty()) @@ -369,13 +369,13 @@ void KviScriptEditorWidget::keyPressEvent(TQKeyEvent * e) TQString szPrev=text(para-1); if(!szPrev.isEmpty()) { - if(szPrev.at(szPrev.length() - 1).unicode() == ' ') + if(szPrev.tqat(szPrev.length() - 1).tqunicode() == ' ') szPrev.remove(szPrev.length() - 1,1); TQString szCur; const TQChar * pCur = (const TQChar *)szPrev.ucs2(); if(pCur) { - while(pCur->unicode() && pCur->isSpace()) + while(pCur->tqunicode() && pCur->isSpace()) { szCur.append(*pCur); pCur++; @@ -557,9 +557,9 @@ void KviScriptEditorWidget::slotComplete(const TQString &str) bool bIsFirstWordInLine; getWordBeforeCursor(buffer,index,&bIsFirstWordInLine); int len=buffer.length(); -// if (buffer[1].unicode() == '$') len --; +// if (buffer[1].tqunicode() == '$') len --; complete.remove(0,len-1); - if (buffer[1].unicode() == '$') complete.append("("); + if (buffer[1].tqunicode() == '$') complete.append("("); else complete.append(" "); insert (complete); completelistbox->hide(); @@ -595,19 +595,19 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS const TQChar * pBegin; - while(c->unicode()) + while(c->tqunicode()) { if(bInComment) { pBegin = c; - while(c->unicode() && (c->unicode() != '*'))c++; - if(!c->unicode()) + while(c->tqunicode() && (c->tqunicode() != '*'))c++; + if(!c->tqunicode()) { setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); return IN_COMMENT; } c++; - if(c->unicode() == '/') + if(c->tqunicode() == '/') { // end of the comment! c++; @@ -620,14 +620,14 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS if(c->isSpace()) { - while(c->unicode() && c->isSpace())c++; - if(!c->unicode())continue; + while(c->tqunicode() && c->isSpace())c++; + if(!c->tqunicode())continue; } pBegin = c; // this does not break the bNewCommand flag - if((c->unicode() == '{') || (c->unicode() == '}')) + if((c->tqunicode() == '{') || (c->tqunicode() == '}')) { c++; setFormat(pBegin - pBuf,1,g_fntNormal,g_clrBracket); @@ -639,12 +639,12 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS { bNewCommand = false; - if(c->unicode() == '#') + if(c->tqunicode() == '#') { if(c > pBuf) { const TQChar * prev = c - 1; - if((prev->unicode() == ']') || (prev->unicode() == '}')) + if((prev->tqunicode() == ']') || (prev->tqunicode() == '}')) { // array or hash count c++; @@ -653,19 +653,19 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS } } // comment until the end of the line - while(c->unicode())c++; + while(c->tqunicode())c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); continue; } - if(c->unicode() == '/') + if(c->tqunicode() == '/') { c++; - if(c->unicode() == '/') + if(c->tqunicode() == '/') { - while(c->unicode())c++; + while(c->tqunicode())c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); continue; - } else if(c->unicode() == '*') + } else if(c->tqunicode() == '*') { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); @@ -674,13 +674,13 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS } c--; } - if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_'))) + if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_'))) { c++; - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); // special processing for callbacks and magic commands - if(pBegin->unicode() == 'e') + if(pBegin->tqunicode() == 'e') { if(c - pBegin == 4) { @@ -691,7 +691,7 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS } } else - if(pBegin->unicode() == 'f') + if(pBegin->tqunicode() == 'f') { if(c - pBegin == 8) { @@ -702,7 +702,7 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS } } - if(pBegin->unicode() == 'i') + if(pBegin->tqunicode() == 'i') { if(c - pBegin == 8) { @@ -717,28 +717,28 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS continue; } } - if(c->unicode() == '$') + if(c->tqunicode() == '$') { c++; - if(c->unicode() == '$') + if(c->tqunicode() == '$') { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); } else { - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrFunction); } continue; } - if(c->unicode() == '-') + if(c->tqunicode() == '-') { TQChar * pTmp =(TQChar *) c; c++; - if(c->unicode() == '-') c++; + if(c->tqunicode() == '-') c++; if(c->isLetter()) { - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); continue; } else { @@ -746,35 +746,35 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS } } - if(c->unicode() == '%') + if(c->tqunicode() == '%') { c++; - if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_'))) + if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_'))) { - while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_')))c++; + while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_')))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrVariable); continue; } c--; } - if(!c->unicode())continue; + if(!c->tqunicode())continue; - if(c->isLetterOrNumber() || c->unicode() == '_') + if(c->isLetterOrNumber() || c->tqunicode() == '_') { c++; - while(c->unicode() && c->isLetterOrNumber() || (c->unicode() == '_'))c++; + while(c->tqunicode() && c->isLetterOrNumber() || (c->tqunicode() == '_'))c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText); continue; } - if(c->unicode() == '\\') + if(c->tqunicode() == '\\') { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation); // the next char is to be interpreted as normal text pBegin = c; - if(c->unicode() && (c->unicode() != '\n')) + if(c->tqunicode() && (c->tqunicode() != '\n')) { c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText); @@ -785,13 +785,13 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS return IN_LINE; } - if(c->unicode() == '"') + if(c->tqunicode() == '"') { bInString = !bInString; c++; setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation); continue; - } else if(c->unicode() == ';') + } else if(c->tqunicode() == ';') { if(!bInString) bNewCommand = true; // the next will be a new command } @@ -1124,23 +1124,23 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co emit initFind(); setPaletteForegroundColor( TQColor( 0, 0, 0 ) ); setPaletteBackgroundColor( TQColor( 236, 233, 216 ) ); - TQGridLayout *layout = new TQGridLayout( this, 1, 1, 11, 6, "replace layout"); + TQGridLayout *tqlayout = new TQGridLayout( this, 1, 1, 11, 6, "replace tqlayout"); m_pFindlineedit = new TQLineEdit( this, "findlineedit" ); #ifndef COMPILE_USE_QT4 - m_pFindlineedit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pFindlineedit->sizePolicy().hasHeightForWidth() ) ); + m_pFindlineedit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pFindlineedit->sizePolicy().hasHeightForWidth() ) ); m_pFindlineedit->setFrameShape( TQLineEdit::LineEditPanel ); m_pFindlineedit->setFrameShadow( TQLineEdit::Sunken ); #endif - layout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 ); + tqlayout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 ); m_pReplacelineedit = new TQLineEdit( this, "replacelineedit" ); #ifndef COMPILE_USE_QT4 m_pReplacelineedit->setFrameShape( TQLineEdit::LineEditPanel ); m_pReplacelineedit->setFrameShadow( TQLineEdit::Sunken ); #endif - layout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 ); + tqlayout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 ); m_pFindlineedit->setFocus(); @@ -1150,36 +1150,36 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co findlabel->setAutoResize(true); #endif - layout->addWidget( findlabel, 2, 0 ); + tqlayout->addWidget( findlabel, 2, 0 ); TQLabel *replacelabel = new TQLabel( this, "replacelabel" ); replacelabel->setText(tr("Replace with")); #ifndef COMPILE_USE_QT4 replacelabel->setAutoResize(true); #endif - layout->addWidget( replacelabel, 3, 0 ); + tqlayout->addWidget( replacelabel, 3, 0 ); TQPushButton *cancelbutton = new TQPushButton( this, "cancelButton" ); cancelbutton->setText(tr("&Cancel")); - layout->addWidget( cancelbutton, 5, 2 ); + tqlayout->addWidget( cancelbutton, 5, 2 ); replacebutton = new TQPushButton( this, "replacebutton" ); replacebutton->setText(tr("&Replace")); replacebutton->setEnabled( FALSE ); - layout->addWidget( replacebutton, 5, 0 ); + tqlayout->addWidget( replacebutton, 5, 0 ); checkReplaceAll = new KviStyledCheckBox( this, "replaceAll" ); checkReplaceAll->setText(tr("&Replace in all Aliases")); - layout->addWidget( checkReplaceAll, 4, 0 ); + tqlayout->addWidget( checkReplaceAll, 4, 0 ); findNext = new TQPushButton(this, "findNext(WIP)" ); findNext->setText(tr("&Findnext")); - layout->addWidget( findNext, 2, 3 ); + tqlayout->addWidget( findNext, 2, 3 ); findNext->setEnabled(false); replace = new TQPushButton(this, "replace" ); replace->setText(tr("&Replace(WIP)")); - layout->addWidget( replace, 3, 3 ); + tqlayout->addWidget( replace, 3, 3 ); replace->setEnabled(false); #ifndef COMPILE_USE_QT4 |