diff options
Diffstat (limited to 'kate')
26 files changed, 245 insertions, 244 deletions
diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp index a9a4fe37c..a1600b307 100644 --- a/kate/part/katearbitraryhighlight.cpp +++ b/kate/part/katearbitraryhighlight.cpp @@ -90,7 +90,7 @@ void KateArbitraryHighlight::addHighlightToView(KateSuperRangeList* list, KateVi } void KateArbitraryHighlight::slotRangeListDeleted(TQObject* obj) { - int id=m_docHLs.findRef(static_cast<KateSuperRangeList*>(obj)); + int id=m_docHLs.tqfindRef(static_cast<KateSuperRangeList*>(obj)); if (id>=0) m_docHLs.take(id); for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) @@ -152,7 +152,7 @@ KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range) { for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next()) - if (l->contains(range)) + if (l->tqcontains(range)) return it.key(); // This must belong to a document-global highlight diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index aed42bbab..25c84c2b4 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -1411,7 +1411,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, uint pos, len = text.length(); bool seenOpen = false; for(pos = 0; pos < len; ++pos) { - int ch = text.at(pos).tqunicode(); + int ch = text.tqat(pos).tqunicode(); switch(ch) { case '<': seenOpen = true; @@ -1467,11 +1467,11 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, if(unclosedTag) { // find the start of the next attribute, so we can align with it do { - lastCh = text.at(++attrCol).tqunicode(); + lastCh = text.tqat(++attrCol).tqunicode(); }while(lastCh && lastCh != ' ' && lastCh != '\t'); while(lastCh == ' ' || lastCh == '\t') { - lastCh = text.at(++attrCol).tqunicode(); + lastCh = text.tqat(++attrCol).tqunicode(); } attrCol = prevLine->cursorX(attrCol, tabWidth); @@ -1606,7 +1606,7 @@ TQString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &st { KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); - int pos = textLine->string().findRev("/*"); + int pos = textLine->string().tqfindRev("/*"); // FIXME: /* inside /* is possible. This screws up in that case... if (pos >= 0) return initialWhitespace(textLine, pos); @@ -2372,9 +2372,9 @@ void KateVarIndent::slotVariableChanged( const TQString &var, const TQString &va { d->couples = 0; TQStringList l = TQStringList::split( " ", val ); - if ( l.contains("parens") ) d->couples |= Parens; - if ( l.contains("braces") ) d->couples |= Braces; - if ( l.contains("brackets") ) d->couples |= Brackets; + if ( l.tqcontains("parens") ) d->couples |= Parens; + if ( l.tqcontains("braces") ) d->couples |= Braces; + if ( l.tqcontains("brackets") ) d->couples |= Brackets; } else if ( var == "var-indent-couple-attribute" ) { diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp index e62efcf39..3325c69e9 100644 --- a/kate/part/katebuffer.cpp +++ b/kate/part/katebuffer.cpp @@ -86,7 +86,7 @@ class KateFileLoader public: KateFileLoader (const TQString &filename, TQTextCodec *codec, bool removeTrailingSpaces) : m_file (filename) - , m_buffer (kMin (m_file.size(), KATE_FILE_LOADER_BS)) + , m_buffer (kMin ((TQ_ULONG)m_file.size(), KATE_FILE_LOADER_BS)) , m_codec (codec) , m_decoder (m_codec->makeDecoder()) , m_position (0) diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp index 27dd22a82..210d461a2 100644 --- a/kate/part/katecmds.cpp +++ b/kate/part/katecmds.cpp @@ -157,7 +157,7 @@ bool KateCommands::CoreCommands::exec(Kate::View *view, } else if ( cmd == "set-highlight" ) { - TQString val = _cmd.section( ' ', 1 ).lower(); + TQString val = TQString(_cmd.section( ' ', 1 )).lower(); for ( uint i=0; i < v->doc()->hlModeCount(); i++ ) { if ( v->doc()->hlModeName( i ).lower() == val ) @@ -408,7 +408,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, TQString rep=repOld; // now set the backreferences in the replacement - TQStringList backrefs=matcher.capturedTexts(); + TQStringList backrefs=matcher.tqcapturedTexts(); int refnum=1; TQStringList::Iterator i = backrefs.begin(); @@ -442,7 +442,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, // TODO if replace contains \n, // change the line number and // check for text that needs be searched behind the last inserted newline. - int lns = rep.contains('\n'); + int lns = rep.tqcontains('\n'); if ( lns ) { line += lns; @@ -451,7 +451,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, { // if ( endcol >= startcol + len ) endcol -= (startcol + len); - uint sc = rep.length() - rep.findRev('\n') - 1; + uint sc = rep.length() - rep.tqfindRev('\n') - 1; matches += sedMagic( doc, line, find, repOld, delim, noCase, repeat, sc, endcol ); } } diff --git a/kate/part/katecodecompletion.cpp b/kate/part/katecodecompletion.cpp index e7f11b994..4de784289 100644 --- a/kate/part/katecodecompletion.cpp +++ b/kate/part/katecodecompletion.cpp @@ -51,7 +51,7 @@ *@short Listbox showing codecompletion *@author Jonas B. Jacobi <j.jacobi@gmx.de> */ -class KateCCListBox : public QListBox +class KateCCListBox : public TQListBox { public: /** @@ -90,7 +90,7 @@ class KateCCListBox : public QListBox } }; -class KateCompletionItem : public QListBoxText +class KateCompletionItem : public TQListBoxText { public: KateCompletionItem( TQListBox* lb, KTextEditor::CompletionEntry entry ) @@ -113,7 +113,7 @@ KateCodeCompletion::KateCodeCompletion( KateView* view ) , m_view( view ) , m_commentLabel( 0 ) { - m_completionPopup = new TQVBox( 0, 0, WType_Popup ); + m_completionPopup = new TQVBox( 0, 0, (WFlags)WType_Popup ); m_completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); m_completionPopup->setLineWidth( 1 ); @@ -163,9 +163,9 @@ void KateCodeCompletion::showCompletionBox( bool KateCodeCompletion::eventFilter( TQObject *o, TQEvent *e ) { - if ( o != m_completionPopup && - o != m_completionListBox && - o != m_completionListBox->viewport() ) + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_completionPopup) && + TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_completionListBox) && + TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_completionListBox->viewport()) ) return false; if( e->type() == TQEvent::Hide ) @@ -392,7 +392,7 @@ void KateCodeCompletion::showComment() } KateArgHint::KateArgHint( KateView* parent, const char* name ) - : TQFrame( parent, name, WType_Popup ) + : TQFrame( parent, name, (WFlags)WType_Popup ) { setBackgroundColor( black ); setPaletteForegroundColor( Qt::black ); @@ -404,7 +404,7 @@ KateArgHint::KateArgHint( KateView* parent, const char* name ) m_markCurrentFunction = true; - setFocusPolicy( StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); setFocusProxy( parent ); reset( -1, -1 ); @@ -533,7 +533,7 @@ void KateArgHint::show() bool KateArgHint::eventFilter( TQObject*, TQEvent* e ) { if( isVisible() && e->type() == TQEvent::KeyPress ){ - TQKeyEvent* ke = static_cast<TQKeyEvent*>( e ); + TQKeyEvent* ke = TQT_TQKEYEVENT( e ); if( (ke->state() & ControlButton) && ke->key() == Key_Left ){ setCurrentFunction( currentFunction() - 1 ); ke->accept(); diff --git a/kate/part/katecodecompletion.h b/kate/part/katecodecompletion.h index a8c4e5afe..276c3791b 100644 --- a/kate/part/katecodecompletion.h +++ b/kate/part/katecodecompletion.h @@ -50,7 +50,7 @@ class KateCodeCompletionCommentLabel : public TQLabel public: KateCodeCompletionCommentLabel( TQWidget* parent, const TQString& text) : TQLabel( parent, "toolTipTip", - WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ) + (WFlags)(WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) ) { setMargin(1); setIndent(0); diff --git a/kate/part/katecodefoldinghelpers.cpp b/kate/part/katecodefoldinghelpers.cpp index 91b4da88a..ab571d9d0 100644 --- a/kate/part/katecodefoldinghelpers.cpp +++ b/kate/part/katecodefoldinghelpers.cpp @@ -363,9 +363,9 @@ void KateCodeFoldingTree::debugDump() void KateCodeFoldingTree::dumpNode(KateCodeFoldingNode *node, const TQString &prefix) { //output node properties - kdDebug(13000)<<prefix<<TQString("Type: %1, startLineValid %2, startLineRel %3, endLineValid %4, endLineRel %5, visible %6"). + kdDebug(13000)<<prefix<<TQString(TQString("Type: %1, startLineValid %2, startLineRel %3, endLineValid %4, endLineRel %5, visible %6"). arg(node->type).arg(node->startLineValid).arg(node->startLineRel).arg(node->endLineValid). - arg(node->endLineRel).arg(node->visible)<<endl; + arg(node->endLineRel).arg(node->visible))<<endl; //output child node properties recursive if (node->noChildren()) @@ -1330,7 +1330,7 @@ void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line) lineMapping.clear(); hiddenLinesCountCacheValid = false; - kdDebug(13000)<<TQString("KateCodeFoldingTree::toggleRegionVisibility() %1").arg(line)<<endl; + kdDebug(13000)<<TQString(TQString("KateCodeFoldingTree::toggleRegionVisibility() %1").arg(line))<<endl; findAllNodesOpenedOrClosedAt(line); for (int i=0; i<(int)nodesForLine.count(); i++) diff --git a/kate/part/katecodefoldinghelpers.h b/kate/part/katecodefoldinghelpers.h index 7feee384e..d90757986 100644 --- a/kate/part/katecodefoldinghelpers.h +++ b/kate/part/katecodefoldinghelpers.h @@ -79,7 +79,7 @@ class KateCodeFoldingNode inline KateCodeFoldingNode *child (uint index) const { return m_children[index]; } - inline int findChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.find (node, start); } + inline int findChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.tqfind (node, start); } inline void appendChild (KateCodeFoldingNode *node) { m_children.resize(m_children.size()+1); m_children[m_children.size()-1] = node; } diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 366085c83..c4e0e3776 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -1062,7 +1062,7 @@ void KateSaveConfigTab::defaults() //END KateSaveConfigTab //BEGIN PluginListItem -class KatePartPluginListItem : public QCheckListItem +class KatePartPluginListItem : public TQCheckListItem { public: KatePartPluginListItem(bool checked, uint i, const TQString &name, TQListView *parent); @@ -1284,7 +1284,7 @@ KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc) TQHBox *hb1 = new TQHBox( gbInfo); new TQLabel( i18n("Author:"), hb1 ); author = new TQLabel (hb1); - author->setTextFormat (Qt::RichText); + author->setTextFormat (TQt::RichText); // license TQHBox *hb2 = new TQHBox( gbInfo); @@ -1476,8 +1476,8 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const TQByteArray &data) listData+=TQString(data); kdDebug(13000)<<TQString("CurrentListData: ")<<listData<<endl<<endl; - kdDebug(13000)<<TQString("Data length: %1").arg(data.size())<<endl; - kdDebug(13000)<<TQString("listData length: %1").arg(listData.length())<<endl; + kdDebug(13000)<<TQString(TQString("Data length: %1").arg(data.size()))<<endl; + kdDebug(13000)<<TQString(TQString("listData length: %1").arg(listData.length()))<<endl; if (data.size()==0) { if (listData.length()>0) diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index e32636cb8..d9cdb1974 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -1179,7 +1179,7 @@ bool KateDocument::editInsertText ( uint line, uint col, const TQString &str ) while ( (pos = s.tqfind('\t')) > -1 ) { l = tw - ( (col + pos)%tw ); - s.replace( pos, 1, TQString().fill( ' ', l ) ); + s.tqreplace( pos, 1, TQString().fill( ' ', l ) ); } } @@ -1734,7 +1734,7 @@ bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, co bool KateDocument::searchText (unsigned int startLine, unsigned int startCol, const TQRegExp ®exp, unsigned int *foundAtLine, unsigned int *foundAtCol, unsigned int *matchLen, bool backwards) { - kdDebug(13020)<<"KateDocument::searchText( "<<startLine<<", "<<startCol<<", "<<regexp.pattern()<<", "<<backwards<<" )"<<endl; + kdDebug(13020)<<"KateDocument::searchText( "<<startLine<<", "<<startCol<<", "<<TQString(regexp.pattern())<<", "<<backwards<<" )"<<endl; if (regexp.isEmpty() || !regexp.isValid()) return false; @@ -2151,12 +2151,12 @@ void KateDocument::clearMarks() void KateDocument::setPixmap( MarkInterface::MarkTypes type, const TQPixmap& pixmap ) { - m_markPixmaps.replace( type, new TQPixmap( pixmap ) ); + m_markPixmaps.tqreplace( type, new TQPixmap( pixmap ) ); } void KateDocument::setDescription( MarkInterface::MarkTypes type, const TQString& description ) { - m_markDescriptions.replace( type, new TQString( description ) ); + m_markDescriptions.tqreplace( type, new TQString( description ) ); } TQPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type ) @@ -2934,7 +2934,7 @@ void KateDocument::removeSuperCursor(KateSuperCursor *cursor, bool privateC) { bool KateDocument::ownedView(KateView *view) { // do we own the given view? - return (m_views.containsRef(view) > 0); + return (m_views.tqcontainsRef(view) > 0); } bool KateDocument::isLastView(int numViews) { @@ -3232,7 +3232,7 @@ void KateDocument::paste ( KateView* view ) if (s.isEmpty()) return; - uint lines = s.contains (TQChar ('\n')); + uint lines = s.tqcontains (TQChar ('\n')); m_undoDontMerge = true; @@ -3983,7 +3983,7 @@ void KateDocument::transform( KateView *v, const KateTextCursor &c, ! p && ! highlight()->isInWord( l->getChar( start - 1 )) ) || ( p && ! highlight()->isInWord( s.at( p-1 ) ) ) ) - s[p] = s.at(p).upper(); + s[p] = s.tqat(p).upper(); p++; } } @@ -4672,7 +4672,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) TQStringList types (TQStringList::split(';', kvLineMime.cap(1))); // no matching type found - if (!types.contains (mimeType ())) + if (!types.tqcontains (mimeType ())) return; s = kvLineMime.cap(2); @@ -4701,14 +4701,14 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) { p += kvVar.matchedLength(); var = kvVar.cap( 1 ); - val = kvVar.cap( 2 ).stripWhiteSpace(); + val = TQString(kvVar.cap( 2 )).stripWhiteSpace(); bool state; // store booleans here int n; // store ints here // only apply view & renderer config stuff if (onlyViewAndRenderer) { - if ( vvl.contains( var ) ) // FIXME define above + if ( vvl.tqcontains( var ) ) // FIXME define above setViewVariable( var, val ); } else @@ -4773,7 +4773,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) { TQStringList l; l << "unix" << "dos" << "mac"; - if ( (n = l.findIndex( val.lower() )) != -1 ) + if ( (n = l.tqfindIndex( val.lower() )) != -1 ) m_config->setEol( n ); } else if ( var == "encoding" ) @@ -4791,7 +4791,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) } // VIEW SETTINGS - else if ( vvl.contains( var ) ) + else if ( vvl.tqcontains( var ) ) setViewVariable( var, val ); else { @@ -4862,14 +4862,14 @@ bool KateDocument::checkBoolValue( TQString val, bool *result ) val = val.stripWhiteSpace().lower(); TQStringList l; l << "1" << "on" << "true"; - if ( l.contains( val ) ) + if ( l.tqcontains( val ) ) { *result = true; return true; } l.clear(); l << "0" << "off" << "false"; - if ( l.contains( val ) ) + if ( l.tqcontains( val ) ) { *result = false; return true; @@ -4893,7 +4893,7 @@ bool KateDocument::checkColorValue( TQString val, TQColor &c ) // KTextEditor::variable TQString KateDocument::variable( const TQString &name ) const { - if ( m_storedVariables.contains( name ) ) + if ( m_storedVariables.tqcontains( name ) ) return m_storedVariables[ name ]; return ""; @@ -4964,7 +4964,7 @@ bool KateDocument::createDigest( TQCString &result ) if ( f.open( IO_ReadOnly) ) { KMD5 md5; - ret = md5.update( f ); + ret = md5.update( TQT_TQIODEVICE_OBJECT(f) ); md5.hexDigest( result ); f.close(); ret = true; diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index 11d5e9a46..801791e5c 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -126,7 +126,7 @@ void KateFileTypeManager::save (TQPtrList<KateFileType> *v) for (uint z=0; z < g.count(); z++) { - if (newg.findIndex (g[z]) == -1) + if (newg.tqfindIndex (g[z]) == -1) config.deleteGroup (g[z]); } @@ -187,7 +187,7 @@ int KateFileTypeManager::fileType (KateDocument *doc) for (uint z=0; z < m_types.count(); z++) { - if (m_types.at(z)->mimetypes.findIndex (mt->name()) > -1) + if (m_types.at(z)->mimetypes.tqfindIndex (mt->name()) > -1) types.append (m_types.at(z)); } @@ -539,9 +539,9 @@ void KateViewFileTypeAction::slotAboutToShow() TQString hlName = KateFactory::self()->fileTypeManager()->list()->at(z)->name; TQString hlSection = KateFactory::self()->fileTypeManager()->list()->at(z)->section; - if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) ) + if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) ) { - if (subMenusName.contains(hlSection) < 1) + if (subMenusName.tqcontains(hlSection) < 1) { subMenusName << hlSection; TQPopupMenu *menu = new TQPopupMenu (); @@ -549,11 +549,11 @@ void KateViewFileTypeAction::slotAboutToShow() popupMenu()->insertItem (hlSection, menu); } - int m = subMenusName.findIndex (hlSection); + int m = subMenusName.tqfindIndex (hlSection); names << hlName; subMenus.at(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); } - else if (names.contains(hlName) < 1) + else if (names.tqcontains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); @@ -576,7 +576,7 @@ void KateViewFileTypeAction::slotAboutToShow() const KateFileType *t = 0; if ((t = KateFactory::self()->fileTypeManager()->fileType (doc->fileType()))) { - int i = subMenusName.findIndex (t->section); + int i = subMenusName.tqfindIndex (t->section); if (i >= 0 && subMenus.at(i)) subMenus.at(i)->setItemChecked (doc->fileType()+1, true); else diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index a18267f3b..aa0a94d24 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const TQString& text, int offset, int len) if (wordLen < minLen) return 0; - if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.tqunicode() + offset, wordLen).string()) ) + if ( dict[wordLen] && dict[wordLen]->tqfind(TQConstString(text.tqunicode() + offset, wordLen).string()) ) return offset2; return 0; @@ -815,7 +815,7 @@ int KateHlCOct::checkHgl(const TQString& text, int offset, int len) int offset2 = offset; - while ((len > 0) && (text[offset2] >= '0' && text[offset2] <= '7')) + while ((len > 0) && (text.at(offset2) >= '0' && text.at(offset2) <= '7')) { offset2++; len--; @@ -958,7 +958,7 @@ int KateHlRegExpr::checkHgl(const TQString& text, int offset, int /*len*/) TQStringList *KateHlRegExpr::capturedTexts() { - return new TQStringList(Expr->capturedTexts()); + return new TQStringList(Expr->tqcapturedTexts()); } KateHlItem *KateHlRegExpr::clone(const TQStringList *args) @@ -1038,7 +1038,7 @@ static int checkEscapedChar(const TQString& text, int offset, int& len) // replaced with something else but // for right now they work // check for hexdigits - for (i = 0; (len > 0) && (i < 2) && (text[offset] >= '0' && text[offset] <= '9' || (text[offset] & 0xdf) >= 'A' && (text[offset] & 0xdf) <= 'F'); i++) + for (i = 0; (len > 0) && (i < 2) && (text.at(offset) >= '0' && text.at(offset) <= '9' || (text[offset] & 0xdf) >= 'A' && (text[offset] & 0xdf) <= 'F'); i++) { offset++; len--; @@ -1051,7 +1051,7 @@ static int checkEscapedChar(const TQString& text, int offset, int& len) case '0': case '1': case '2': case '3' : case '4': case '5': case '6': case '7' : - for (i = 0; (len > 0) && (i < 3) && (text[offset] >='0'&& text[offset] <='7'); i++) + for (i = 0; (len > 0) && (i < 3) && (text.at(offset) >='0'&& text.at(offset) <='7'); i++) { offset++; len--; @@ -1293,7 +1293,7 @@ int KateHighlighting::makeDynamicContext(KateHlContext *model, const TQStringLis QPair<KateHlContext *, TQString> key(model, args->front()); short value; - if (dynamicCtxs.contains(key)) + if (dynamicCtxs.tqcontains(key)) value = dynamicCtxs[key]; else { @@ -1931,12 +1931,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data, if (!beginRegionStr.isEmpty()) { - regionId = RegionList->findIndex(beginRegionStr); + regionId = RegionList->tqfindIndex(beginRegionStr); if (regionId==-1) // if the region name doesn't already exist, add it to the list { (*RegionList)<<beginRegionStr; - regionId = RegionList->findIndex(beginRegionStr); + regionId = RegionList->tqfindIndex(beginRegionStr); } regionId++; @@ -1946,12 +1946,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data, if (!endRegionStr.isEmpty()) { - regionId2 = RegionList->findIndex(endRegionStr); + regionId2 = RegionList->tqfindIndex(endRegionStr); if (regionId2==-1) // if the region name doesn't already exist, add it to the list { (*RegionList)<<endRegionStr; - regionId2 = RegionList->findIndex(endRegionStr); + regionId2 = RegionList->tqfindIndex(endRegionStr); } regionId2 = -regionId2 - 1; @@ -2206,7 +2206,7 @@ void KateHighlighting::readGlobalKeywordConfig() // remove any weakDelimitars (if any) from the default list and store this list. for (uint s=0; s < weakDeliminator.length(); s++) { - int f = deliminator.find (weakDeliminator[s]); + int f = deliminator.tqfind (weakDeliminator[s]); if (f > -1) deliminator.remove (f, 1); @@ -2365,20 +2365,20 @@ int KateHighlighting::getIdFromString(TQStringList *ContextNameList, TQString tm } } - else if ( tmpLineEndContext.contains("##")) + else if ( tmpLineEndContext.tqcontains("##")) { int o = tmpLineEndContext.tqfind("##"); // FIXME at least with 'foo##bar'-style contexts the rules are picked up // but the default attribute is not TQString tmp=tmpLineEndContext.mid(o+2); - if (!embeddedHls.contains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo()); + if (!embeddedHls.tqcontains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo()); unres=tmp+':'+tmpLineEndContext.left(o); context=0; } else { - context=ContextNameList->findIndex(buildPrefix+tmpLineEndContext); + context=ContextNameList->tqfindIndex(buildPrefix+tmpLineEndContext); if (context==-1) { context=tmpLineEndContext.toInt(); @@ -2777,7 +2777,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) KateHlIncludeRule *ir=new KateHlIncludeRule(i,m_contexts[i]->items.count(),incCtxN,includeAttrib); //use the same way to determine cross hl file references as other items do - if (!embeddedHls.contains(incSet)) + if (!embeddedHls.tqcontains(incSet)) embeddedHls.insert(incSet,KateEmbeddedHlInfo()); else kdDebug(13010)<<"Skipping embeddedHls.insert for "<<incCtxN<<endl; @@ -2850,7 +2850,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) //BEGIN Resolve multiline region if possible if (!m_additionalData[ ident ]->multiLineRegion.isEmpty()) { - long commentregionid=RegionList.findIndex( m_additionalData[ ident ]->multiLineRegion ); + long commentregionid=RegionList.tqfindIndex( m_additionalData[ ident ]->multiLineRegion ); if (-1==commentregionid) { errorsAndWarnings+=i18n( "<B>%1</B>: Specified multiline comment region (%2) could not be resolved<BR>" @@ -3086,7 +3086,7 @@ int KateHlManager::realWildcardFind(const TQString &fileName) if (highlight->priority() > pri) { pri = highlight->priority(); - hl = hlList.findRef (highlight); + hl = hlList.tqfindRef (highlight); } } return hl; @@ -3124,7 +3124,7 @@ int KateHlManager::mimeFind( KateDocument *doc ) if (highlight->priority() > pri) { pri = highlight->priority(); - hl = hlList.findRef (highlight); + hl = hlList.tqfindRef (highlight); } } @@ -3421,9 +3421,9 @@ void KateViewHighlightAction::slotAboutToShow() if (!KateHlManager::self()->hlHidden(z)) { - if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) ) + if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) ) { - if (subMenusName.contains(hlSection) < 1) + if (subMenusName.tqcontains(hlSection) < 1) { subMenusName << hlSection; TQPopupMenu *menu = new TQPopupMenu (); @@ -3431,11 +3431,11 @@ void KateViewHighlightAction::slotAboutToShow() popupMenu()->insertItem ( '&' + hlSection, menu); } - int m = subMenusName.findIndex (hlSection); + int m = subMenusName.tqfindIndex (hlSection); names << hlName; subMenus.at(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); } - else if (names.contains(hlName) < 1) + else if (names.tqcontains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); @@ -3454,7 +3454,7 @@ void KateViewHighlightAction::slotAboutToShow() } popupMenu()->setItemChecked (0, false); - int i = subMenusName.findIndex (KateHlManager::self()->hlSection(doc->hlMode())); + int i = subMenusName.tqfindIndex (KateHlManager::self()->hlSection(doc->hlMode())); if (i >= 0 && subMenus.at(i)) subMenus.at(i)->setItemChecked (doc->hlMode(), true); else diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp index a9efac0e9..9959f59dd 100644 --- a/kate/part/katejscript.cpp +++ b/kate/part/katejscript.cpp @@ -1135,7 +1135,7 @@ void KateIndentJScriptManager::parseScriptHeader(const TQString &filePath, if (currentState==NOTHING) { if (keyValue.exactMatch(line)) { - TQStringList sl=keyValue.capturedTexts(); + TQStringList sl=keyValue.tqcapturedTexts(); kdDebug(13050)<<"key:"<<sl[1]<<endl<<"value:"<<sl[2]<<endl; kdDebug(13050)<<"key-length:"<<sl[1].length()<<endl<<"value-length:"<<sl[2].length()<<endl; TQString key=sl[1]; diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index f0f73aad0..f9dfb8abe 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -192,9 +192,9 @@ bool KatePrinter::print (KateDocument *doc) tags["d"] = KGlobal::locale()->formatDateTime(dt, true, false); tags["D"] = KGlobal::locale()->formatDateTime(dt, false, false); - tags["h"] = KGlobal::locale()->formatTime(dt.time(), false); - tags["y"] = KGlobal::locale()->formatDate(dt.date(), true); - tags["Y"] = KGlobal::locale()->formatDate(dt.date(), false); + tags["h"] = KGlobal::locale()->formatTime(TQT_TQTIME_OBJECT(dt.time()), false); + tags["y"] = KGlobal::locale()->formatDate(TQT_TQDATE_OBJECT(dt.date()), true); + tags["Y"] = KGlobal::locale()->formatDate(TQT_TQDATE_OBJECT(dt.date()), false); tags["f"] = doc->url().fileName(); tags["U"] = doc->url().prettyURL(); if ( selectionOnly ) diff --git a/kate/part/katerenderer.cpp b/kate/part/katerenderer.cpp index 59b237f57..cfcec76bb 100644 --- a/kate/part/katerenderer.cpp +++ b/kate/part/katerenderer.cpp @@ -545,8 +545,8 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i // input method edit area const TQColorGroup& cg = m_view->tqcolorGroup(); int h1, s1, v1, h2, s2, v2; - cg.color( TQColorGroup::Base ).hsv( &h1, &s1, &v1 ); - cg.color( TQColorGroup::Background ).hsv( &h2, &s2, &v2 ); + TQColor(cg.color( TQColorGroup::Base )).hsv( &h1, &s1, &v1 ); + TQColor(cg.color( TQColorGroup::Background )).hsv( &h2, &s2, &v2 ); fillColor.setHsv( h1, s1, ( v1 + v2 ) / 2 ); } else if (!selectionPainted && (isSel || currentHL.itemSet(KateAttribute::BGColor))) diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 76e187c8c..307caec09 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -80,7 +80,7 @@ This widget is designed to work with the KateStyleListView class exclusively. Added by anders, jan 23 2002. */ -class KateStyleListItem : public QListViewItem +class KateStyleListItem : public TQListViewItem { public: KateStyleListItem( TQListViewItem *parent=0, const TQString & stylename=0, @@ -141,7 +141,7 @@ class KateStyleListItem : public QListViewItem to use our own palette (that is set on the viewport rather than on the listview itself). */ -class KateStyleListCaption : public QListViewItem +class KateStyleListCaption : public TQListViewItem { public: KateStyleListCaption( TQListView *parent, const TQString & name ); @@ -244,7 +244,7 @@ uint KateSchemaManager::number (const TQString &name) return 1; int i; - if ((i = m_schemas.findIndex(name)) > -1) + if ((i = m_schemas.tqfindIndex(name)) > -1) return i; return 0; @@ -416,7 +416,7 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema ) m_linenumber->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) ); // If we havent this schema, read in from config file - if ( ! m_schemas.contains( newSchema ) ) + if ( ! m_schemas.tqcontains( newSchema ) ) { // fallback defaults TQColor tmp0 (KGlobalSettings::baseColor()); @@ -746,7 +746,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) m_hlDict[m_schema]->setAutoDelete (true); } - if (!m_hlDict[m_schema]->find(m_hl)) + if (!m_hlDict[m_schema]->tqfind(m_hl)) { kdDebug(13030) << "NEW HL, create list" << endl; @@ -775,9 +775,9 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) m_styles->viewport()->setPalette( p ); TQDict<KateStyleListCaption> prefixes; - for ( KateHlItemData *itemData = m_hlDict[m_schema]->find(m_hl)->last(); + for ( KateHlItemData *itemData = m_hlDict[m_schema]->tqfind(m_hl)->last(); itemData != 0L; - itemData = m_hlDict[m_schema]->find(m_hl)->prev()) + itemData = m_hlDict[m_schema]->tqfind(m_hl)->prev()) { kdDebug(13030) << "insert items " << itemData->name << endl; @@ -969,7 +969,7 @@ void KateSchemaConfigPage::newSchema () // soft update, no load from disk KateFactory::self()->schemaManager()->update (false); - int i = KateFactory::self()->schemaManager()->list ().findIndex (t); + int i = KateFactory::self()->schemaManager()->list ().tqfindIndex (t); update (); if (i > -1) @@ -1021,7 +1021,7 @@ void KateViewSchemaAction::slotAboutToShow() { TQString hlName = KateFactory::self()->schemaManager()->list().operator[](z); - if (names.contains(hlName) < 1) + if (names.tqcontains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( hlName, this, TQT_SLOT(setSchema(int)), 0, z+1); diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index 4a64af975..cc72bd8ae 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -393,7 +393,7 @@ void KateSearch::replaceOne() if (ccap <= ncaps ) { substitute = m_re.cap( ccap ); } else { - kdDebug()<<"KateSearch::replaceOne(): you don't have "<<ccap<<" backreferences in regexp '"<<m_re.pattern()<<"'"<<endl; + kdDebug()<<"KateSearch::replaceOne(): you don't have "<<ccap<<" backreferences in regexp '"<<TQString(m_re.pattern())<<"'"<<endl; break; } } else if ( argument == 'n' ) { @@ -418,13 +418,13 @@ void KateSearch::replaceOne() replaces++; // if we inserted newlines, we better adjust. - uint newlines = replaceWith.contains('\n'); + uint newlines = replaceWith.tqcontains('\n'); if ( newlines ) { if ( ! s.flags.backward ) { s.cursor.setLine( s.cursor.line() + newlines ); - s.cursor.setCol( replaceWith.length() - replaceWith.findRev('\n') ); + s.cursor.setCol( replaceWith.length() - replaceWith.tqfindRev('\n') ); } // selection? if ( s.flags.selected ) @@ -885,7 +885,7 @@ while ( (p = pattern.tqfind( '\\' + delim, p )) > -1 )\ { flags = re_rep2.cap( 1 ); pattern = re_rep2.cap( 2 ); - replacement = re_rep2.cap( 3 ).stripWhiteSpace(); + replacement = TQString(re_rep2.cap( 3 )).stripWhiteSpace(); } else { diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp index 6ce2b2a72..26134b9b2 100644 --- a/kate/part/katespell.cpp +++ b/kate/part/katespell.cpp @@ -113,7 +113,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to << "ISO 8859-9" << "ISO 8859-13" << "ISO 8859-15" << "UTF-8" << "KOI8-R" << "KOI8-U" << "CP1251" << "CP1255"; - int enc = ksEncodings.findIndex( m_view->doc()->encoding() ); + int enc = ksEncodings.tqfindIndex( m_view->doc()->encoding() ); if ( enc > -1 ) { ksc->setEncoding( enc ); diff --git a/kate/part/katesupercursor.cpp b/kate/part/katesupercursor.cpp index 8a2689014..46e385e91 100644 --- a/kate/part/katesupercursor.cpp +++ b/kate/part/katesupercursor.cpp @@ -410,8 +410,8 @@ bool KateSuperRange::owns(const KateTextCursor& cursor) const { if (!includes(cursor)) return false; - if (children()) - for (TQObjectListIt it(*children()); *it; ++it) + if (!childrenListObject().isEmpty()) + for (TQObjectListIt it(childrenListObject()); *it; ++it) if ((*it)->inherits("KateSuperRange")) if (static_cast<KateSuperRange*>(*it)->owns(cursor)) return false; @@ -636,7 +636,7 @@ bool KateSuperRangeList::rangesInclude(const KateTextCursor& cursor) void KateSuperRangeList::slotEliminated() { if (sender()) { - KateSuperRange* range = static_cast<KateSuperRange*>(const_cast<TQObject*>(sender())); + KateSuperRange* range = static_cast<KateSuperRange*>(const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender()))); emit rangeEliminated(range); if (m_trackingBoundaries) { @@ -662,7 +662,7 @@ void KateSuperRangeList::slotDeleted(TQObject* range) m_columnBoundaries.removeRef(r->m_end); } - int index = findRef(r); + int index = tqfindRef(r); if (index != -1) take(index); //else kdDebug(13020)<<"Range not found in list"<<endl; diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp index 1d6fcf452..687c54b9c 100644 --- a/kate/part/katetextline.cpp +++ b/kate/part/katetextline.cpp @@ -238,7 +238,7 @@ int KateTextLine::cursorX(uint pos, uint tabChars) const { uint x = 0; - const uint n = kMin (pos, m_text.length()); + const uint n = kMin (pos, (uint)m_text.length()); const TQChar *tqunicode = m_text.tqunicode(); for ( uint z = 0; z < n; z++) @@ -282,12 +282,12 @@ bool KateTextLine::searchText (uint startCol, const TQString &text, uint *foundA if ( col == (int) m_text.length() ) ++startCol; do { - index = m_text.findRev( text, col, casesensitive ); + index = m_text.tqfindRev( text, col, casesensitive ); col--; } while ( col >= 0 && l + index >= startCol ); } else - index = m_text.find (text, startCol, casesensitive); + index = m_text.tqfind (text, startCol, casesensitive); if (index > -1) { diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index c486a6d82..bdc11f7cf 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -131,7 +131,7 @@ KateView::KateView( KateDocument *doc, TQWidget *parent, const char * name ) doc->addView( this ); setFocusProxy( m_viewInternal ); - setFocusPolicy( StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); if (!doc->singleViewMode()) { setXMLFile( "katepartui.rc" ); @@ -187,21 +187,21 @@ KateView::~KateView() void KateView::setupConnections() { connect( m_doc, TQT_SIGNAL(undoChanged()), - this, TQT_SLOT(slotNewUndo()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotNewUndo()) ); connect( m_doc, TQT_SIGNAL(hlChanged()), - this, TQT_SLOT(slotHlChanged()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotHlChanged()) ); connect( m_doc, TQT_SIGNAL(canceled(const TQString&)), - this, TQT_SLOT(slotSaveCanceled(const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanceled(const TQString&)) ); connect( m_viewInternal, TQT_SIGNAL(dropEventPass(TQDropEvent*)), - this, TQT_SIGNAL(dropEventPass(TQDropEvent*)) ); + TQT_TQOBJECT(this), TQT_SIGNAL(dropEventPass(TQDropEvent*)) ); connect(this,TQT_SIGNAL(cursorPositionChanged()),this,TQT_SLOT(slotStatusMsg())); connect(this,TQT_SIGNAL(newStatus()),this,TQT_SLOT(slotStatusMsg())); - connect(m_doc, TQT_SIGNAL(undoChanged()), this, TQT_SLOT(slotStatusMsg())); + connect(m_doc, TQT_SIGNAL(undoChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg())); if ( m_doc->browserView() ) { connect( this, TQT_SIGNAL(dropEventPass(TQDropEvent*)), - this, TQT_SLOT(slotDropEventPass(TQDropEvent*)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotDropEventPass(TQDropEvent*)) ); } } @@ -212,21 +212,21 @@ void KateView::setupActions() m_toggleWriteLock = 0; - m_cut = a=KStdAction::cut(this, TQT_SLOT(cut()), ac); + m_cut = a=KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(cut()), ac); a->setWhatsThis(i18n("Cut the selected text and move it to the clipboard")); - m_paste = a=KStdAction::pasteText(this, TQT_SLOT(paste()), ac); + m_paste = a=KStdAction::pasteText(TQT_TQOBJECT(this), TQT_SLOT(paste()), ac); a->setWhatsThis(i18n("Paste previously copied or cut clipboard contents")); - m_copy = a=KStdAction::copy(this, TQT_SLOT(copy()), ac); + m_copy = a=KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), ac); a->setWhatsThis(i18n( "Use this command to copy the currently selected text to the system clipboard.")); - m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, this, TQT_SLOT(copyHTML()), ac, "edit_copy_html"); + m_copyHTML = a = new KAction(i18n("Copy as &HTML"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(copyHTML()), ac, "edit_copy_html"); a->setWhatsThis(i18n( "Use this command to copy the currently selected text as HTML to the system clipboard.")); if (!m_doc->readOnly()) { - a=KStdAction::save(this, TQT_SLOT(save()), ac); + a=KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), ac); a->setWhatsThis(i18n("Save the current document")); a=m_editUndo = KStdAction::undo(m_doc, TQT_SLOT(undo()), ac); @@ -235,56 +235,56 @@ void KateView::setupActions() a=m_editRedo = KStdAction::redo(m_doc, TQT_SLOT(redo()), ac); a->setWhatsThis(i18n("Revert the most recent undo operation")); - (new KAction(i18n("&Word Wrap Document"), "", 0, this, TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis( + (new KAction(i18n("&Word Wrap Document"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(applyWordWrap()), ac, "tools_apply_wordwrap"))->setWhatsThis( i18n("Use this command to wrap all lines of the current document which are longer than the width of the" " current view, to fit into this view.<br><br> This is a static word wrap, meaning it is not updated" " when the view is resized.")); // setup Tools menu - a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, this, TQT_SLOT(indent()), ac, "tools_indent"); + a=new KAction(i18n("&Indent"), "indent", Qt::CTRL+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(indent()), ac, "tools_indent"); a->setWhatsThis(i18n("Use this to indent a selected block of text.<br><br>" "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog.")); - a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, this, TQT_SLOT(unIndent()), ac, "tools_unindent"); + a=new KAction(i18n("&Unindent"), "unindent", Qt::CTRL+Qt::SHIFT+Qt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(unIndent()), ac, "tools_unindent"); a->setWhatsThis(i18n("Use this to unindent a selected block of text.")); - a=new KAction(i18n("&Clean Indentation"), 0, this, TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent"); + a=new KAction(i18n("&Clean Indentation"), 0, TQT_TQOBJECT(this), TQT_SLOT(cleanIndent()), ac, "tools_cleanIndent"); a->setWhatsThis(i18n("Use this to clean the indentation of a selected block of text (only tabs/only spaces)<br><br>" "You can configure whether tabs should be honored and used or replaced with spaces, in the configuration dialog.")); - a=new KAction(i18n("&Align"), 0, this, TQT_SLOT(align()), ac, "tools_align"); + a=new KAction(i18n("&Align"), 0, TQT_TQOBJECT(this), TQT_SLOT(align()), ac, "tools_align"); a->setWhatsThis(i18n("Use this to align the current line or block of text to its proper indent level.")); - a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, this, TQT_SLOT(comment()), + a=new KAction(i18n("C&omment"), CTRL+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(comment()), ac, "tools_comment"); a->setWhatsThis(i18n("This command comments out the current line or a selected block of text.<BR><BR>" "The characters for single/multiple line comments are defined within the language's highlighting.")); - a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, this, TQT_SLOT(uncomment()), + a=new KAction(i18n("Unco&mment"), CTRL+SHIFT+Qt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(uncomment()), ac, "tools_uncomment"); a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<BR><BR>" "The characters for single/multiple line comments are defined within the language's highlighting.")); a = m_toggleWriteLock = new KToggleAction( i18n("&Read Only Mode"), 0, 0, - this, TQT_SLOT( toggleWriteLock() ), + TQT_TQOBJECT(this), TQT_SLOT( toggleWriteLock() ), ac, "tools_toggle_write_lock" ); a->setWhatsThis( i18n("Lock/unlock the document for writing") ); - a = new KAction( i18n("Uppercase"), CTRL + Qt::Key_U, this, + a = new KAction( i18n("Uppercase"), CTRL + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(uppercase()), ac, "tools_uppercase" ); a->setWhatsThis( i18n("Convert the selection to uppercase, or the character to the " "right of the cursor if no text is selected.") ); - a = new KAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, this, + a = new KAction( i18n("Lowercase"), CTRL + SHIFT + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(lowercase()), ac, "tools_lowercase" ); a->setWhatsThis( i18n("Convert the selection to lowercase, or the character to the " "right of the cursor if no text is selected.") ); - a = new KAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, this, + a = new KAction( i18n("Capitalize"), CTRL + ALT + Qt::Key_U, TQT_TQOBJECT(this), TQT_SLOT(capitalize()), ac, "tools_capitalize" ); a->setWhatsThis( i18n("Capitalize the selection, or the word under the " "cursor if no text is selected.") ); - a = new KAction( i18n("Join Lines"), CTRL + Qt::Key_J, this, + a = new KAction( i18n("Join Lines"), CTRL + Qt::Key_J, TQT_TQOBJECT(this), TQT_SLOT( joinLines() ), ac, "tools_join_lines" ); } else @@ -298,13 +298,13 @@ void KateView::setupActions() a=KStdAction::print( m_doc, TQT_SLOT(print()), ac ); a->setWhatsThis(i18n("Print the current document.")); - a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), this, TQT_SLOT(reloadFile()), ac, "file_reload"); + a=new KAction(i18n("Reloa&d"), "reload", KStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(reloadFile()), ac, "file_reload"); a->setWhatsThis(i18n("Reload the current document from disk.")); - a=KStdAction::saveAs(this, TQT_SLOT(saveAs()), ac); + a=KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), ac); a->setWhatsThis(i18n("Save the current document to disk, with a name of your choice.")); - a=KStdAction::gotoLine(this, TQT_SLOT(gotoLine()), ac); + a=KStdAction::gotoLine(TQT_TQOBJECT(this), TQT_SLOT(gotoLine()), ac); a->setWhatsThis(i18n("This command opens a dialog and lets you choose a line that you want the cursor to move to.")); a=new KAction(i18n("&Configure Editor..."), 0, m_doc, TQT_SLOT(configDialog()),ac, "set_confdlg"); @@ -324,45 +324,45 @@ void KateView::setupActions() new KateViewIndentationAction (m_doc, i18n("&Indentation"),ac,"tools_indentation"); // html export - a = new KAction(i18n("E&xport as HTML..."), 0, 0, this, TQT_SLOT(exportAsHTML()), ac, "file_export_html"); + a = new KAction(i18n("E&xport as HTML..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(exportAsHTML()), ac, "file_export_html"); a->setWhatsThis(i18n("This command allows you to export the current document" " with all highlighting information into a HTML document.")); - m_selectAll = a=KStdAction::selectAll(this, TQT_SLOT(selectAll()), ac); + m_selectAll = a=KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(selectAll()), ac); a->setWhatsThis(i18n("Select the entire text of the current document.")); - m_deSelect = a=KStdAction::deselect(this, TQT_SLOT(clearSelection()), ac); + m_deSelect = a=KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(clearSelection()), ac); a->setWhatsThis(i18n("If you have selected something within the current document, this will no longer be selected.")); - a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, m_viewInternal, TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes"); + a=new KAction(i18n("Enlarge Font"), "viewmag+", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotIncFontSizes()), ac, "incFontSizes"); a->setWhatsThis(i18n("This increases the display font size.")); - a=new KAction(i18n("Shrink Font"), "viewmag-", 0, m_viewInternal, TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes"); + a=new KAction(i18n("Shrink Font"), "viewmag-", 0, TQT_TQOBJECT(m_viewInternal), TQT_SLOT(slotDecFontSizes()), ac, "decFontSizes"); a->setWhatsThis(i18n("This decreases the display font size.")); a= m_toggleBlockSelection = new KToggleAction( i18n("Bl&ock Selection Mode"), CTRL + SHIFT + Key_B, - this, TQT_SLOT(toggleBlockSelectionMode()), + TQT_TQOBJECT(this), TQT_SLOT(toggleBlockSelectionMode()), ac, "set_verticalSelect"); a->setWhatsThis(i18n("This command allows switching between the normal (line based) selection mode and the block selection mode.")); a= m_toggleInsert = new KToggleAction( i18n("Overwr&ite Mode"), Key_Insert, - this, TQT_SLOT(toggleInsert()), + TQT_TQOBJECT(this), TQT_SLOT(toggleInsert()), ac, "set_insert" ); a->setWhatsThis(i18n("Choose whether you want the text you type to be inserted or to overwrite existing text.")); KToggleAction *toggleAction; a= m_toggleDynWrap = toggleAction = new KToggleAction( i18n("&Dynamic Word Wrap"), Key_F10, - this, TQT_SLOT(toggleDynWordWrap()), + TQT_TQOBJECT(this), TQT_SLOT(toggleDynWordWrap()), ac, "view_dynamic_word_wrap" ); a->setWhatsThis(i18n("If this option is checked, the text lines will be wrapped at the view border on the screen.")); a= m_setDynWrapIndicators = new KSelectAction(i18n("Dynamic Word Wrap Indicators"), 0, ac, "dynamic_word_wrap_indicators"); a->setWhatsThis(i18n("Choose when the Dynamic Word Wrap Indicators should be displayed")); - connect(m_setDynWrapIndicators, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDynWrapIndicators(int))); + connect(m_setDynWrapIndicators, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setDynWrapIndicators(int))); TQStringList list2; list2.append(i18n("&Off")); list2.append(i18n("Follow &Line Numbers")); @@ -371,14 +371,14 @@ void KateView::setupActions() a= toggleAction=m_toggleFoldingMarkers = new KToggleAction( i18n("Show Folding &Markers"), Key_F9, - this, TQT_SLOT(toggleFoldingMarkers()), + TQT_TQOBJECT(this), TQT_SLOT(toggleFoldingMarkers()), ac, "view_folding_markers" ); a->setWhatsThis(i18n("You can choose if the codefolding marks should be shown, if codefolding is possible.")); toggleAction->setCheckedState(i18n("Hide Folding &Markers")); a= m_toggleIconBar = toggleAction = new KToggleAction( i18n("Show &Icon Border"), Key_F6, - this, TQT_SLOT(toggleIconBorder()), + TQT_TQOBJECT(this), TQT_SLOT(toggleIconBorder()), ac, "view_border"); a=toggleAction; a->setWhatsThis(i18n("Show/hide the icon border.<BR><BR> The icon border shows bookmark symbols, for instance.")); @@ -386,21 +386,21 @@ void KateView::setupActions() a= toggleAction=m_toggleLineNumbers = new KToggleAction( i18n("Show &Line Numbers"), Key_F11, - this, TQT_SLOT(toggleLineNumbersOn()), + TQT_TQOBJECT(this), TQT_SLOT(toggleLineNumbersOn()), ac, "view_line_numbers" ); a->setWhatsThis(i18n("Show/hide the line numbers on the left hand side of the view.")); toggleAction->setCheckedState(i18n("Hide &Line Numbers")); a= m_toggleScrollBarMarks = toggleAction = new KToggleAction( i18n("Show Scroll&bar Marks"), 0, - this, TQT_SLOT(toggleScrollBarMarks()), + TQT_TQOBJECT(this), TQT_SLOT(toggleScrollBarMarks()), ac, "view_scrollbar_marks"); a->setWhatsThis(i18n("Show/hide the marks on the vertical scrollbar.<BR><BR>The marks, for instance, show bookmarks.")); toggleAction->setCheckedState(i18n("Hide Scroll&bar Marks")); a = toggleAction = m_toggleWWMarker = new KToggleAction( i18n("Show Static &Word Wrap Marker"), 0, - this, TQT_SLOT( toggleWWMarker() ), + TQT_TQOBJECT(this), TQT_SLOT( toggleWWMarker() ), ac, "view_word_wrap_marker" ); a->setWhatsThis( i18n( "Show/hide the Word Wrap Marker, a vertical line drawn at the word " @@ -409,7 +409,7 @@ void KateView::setupActions() a= m_switchCmdLine = new KAction( i18n("Switch to Command Line"), Key_F7, - this, TQT_SLOT(switchToCmdLine()), + TQT_TQOBJECT(this), TQT_SLOT(switchToCmdLine()), ac, "switch_to_cmd_line" ); a->setWhatsThis(i18n("Show/hide the command line on the bottom of the view.")); @@ -421,10 +421,10 @@ void KateView::setupActions() list.append("&Macintosh"); m_setEndOfLine->setItems(list); m_setEndOfLine->setCurrentItem (m_doc->config()->eol()); - connect(m_setEndOfLine, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setEol(int))); + connect(m_setEndOfLine, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setEol(int))); // encoding menu - new KateViewEncodingAction (m_doc, this, i18n("E&ncoding"), ac, "set_encoding"); + new KateViewEncodingAction (m_doc, this, i18n("E&ncoding"), TQT_TQOBJECT(ac), "set_encoding"); m_search->createActions( ac ); m_spell->createActions( ac ); @@ -432,144 +432,144 @@ void KateView::setupActions() slotSelectionChanged (); - connect (this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + connect (this, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectionChanged())); } void KateView::setupEditActions() { - m_editActions = new KActionCollection( m_viewInternal, this, "edit_actions" ); + m_editActions = new KActionCollection( m_viewInternal, TQT_TQOBJECT(this), "edit_actions" ); KActionCollection* ac = m_editActions; new KAction( i18n("Move Word Left"), CTRL + Key_Left, - this,TQT_SLOT(wordLeft()), + TQT_TQOBJECT(this),TQT_SLOT(wordLeft()), ac, "word_left" ); new KAction( i18n("Select Character Left"), SHIFT + Key_Left, - this,TQT_SLOT(shiftCursorLeft()), + TQT_TQOBJECT(this),TQT_SLOT(shiftCursorLeft()), ac, "select_char_left" ); new KAction( i18n("Select Word Left"), SHIFT + CTRL + Key_Left, - this, TQT_SLOT(shiftWordLeft()), + TQT_TQOBJECT(this), TQT_SLOT(shiftWordLeft()), ac, "select_word_left" ); new KAction( i18n("Move Word Right"), CTRL + Key_Right, - this, TQT_SLOT(wordRight()), + TQT_TQOBJECT(this), TQT_SLOT(wordRight()), ac, "word_right" ); new KAction( i18n("Select Character Right"), SHIFT + Key_Right, - this, TQT_SLOT(shiftCursorRight()), + TQT_TQOBJECT(this), TQT_SLOT(shiftCursorRight()), ac, "select_char_right" ); new KAction( i18n("Select Word Right"), SHIFT + CTRL + Key_Right, - this,TQT_SLOT(shiftWordRight()), + TQT_TQOBJECT(this),TQT_SLOT(shiftWordRight()), ac, "select_word_right" ); new KAction( i18n("Move to Beginning of Line"), Key_Home, - this, TQT_SLOT(home()), + TQT_TQOBJECT(this), TQT_SLOT(home()), ac, "beginning_of_line" ); new KAction( i18n("Move to Beginning of Document"), KStdAccel::home(), - this, TQT_SLOT(top()), + TQT_TQOBJECT(this), TQT_SLOT(top()), ac, "beginning_of_document" ); new KAction( i18n("Select to Beginning of Line"), SHIFT + Key_Home, - this, TQT_SLOT(shiftHome()), + TQT_TQOBJECT(this), TQT_SLOT(shiftHome()), ac, "select_beginning_of_line" ); new KAction( i18n("Select to Beginning of Document"), SHIFT + CTRL + Key_Home, - this, TQT_SLOT(shiftTop()), + TQT_TQOBJECT(this), TQT_SLOT(shiftTop()), ac, "select_beginning_of_document" ); new KAction( i18n("Move to End of Line"), Key_End, - this, TQT_SLOT(end()), + TQT_TQOBJECT(this), TQT_SLOT(end()), ac, "end_of_line" ); new KAction( i18n("Move to End of Document"), KStdAccel::end(), - this, TQT_SLOT(bottom()), + TQT_TQOBJECT(this), TQT_SLOT(bottom()), ac, "end_of_document" ); new KAction( i18n("Select to End of Line"), SHIFT + Key_End, - this, TQT_SLOT(shiftEnd()), + TQT_TQOBJECT(this), TQT_SLOT(shiftEnd()), ac, "select_end_of_line" ); new KAction( i18n("Select to End of Document"), SHIFT + CTRL + Key_End, - this, TQT_SLOT(shiftBottom()), + TQT_TQOBJECT(this), TQT_SLOT(shiftBottom()), ac, "select_end_of_document" ); new KAction( i18n("Select to Previous Line"), SHIFT + Key_Up, - this, TQT_SLOT(shiftUp()), + TQT_TQOBJECT(this), TQT_SLOT(shiftUp()), ac, "select_line_up" ); new KAction( i18n("Scroll Line Up"),"", CTRL + Key_Up, - this, TQT_SLOT(scrollUp()), + TQT_TQOBJECT(this), TQT_SLOT(scrollUp()), ac, "scroll_line_up" ); - new KAction(i18n("Move to Next Line"), Key_Down, this, TQT_SLOT(down()), + new KAction(i18n("Move to Next Line"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(down()), ac, "move_line_down"); - new KAction(i18n("Move to Previous Line"), Key_Up, this, TQT_SLOT(up()), + new KAction(i18n("Move to Previous Line"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(up()), ac, "move_line_up"); - new KAction(i18n("Move Character Right"), Key_Right, this, + new KAction(i18n("Move Character Right"), Key_Right, TQT_TQOBJECT(this), TQT_SLOT(cursorRight()), ac, "move_cursor_right"); - new KAction(i18n("Move Character Left"), Key_Left, this, TQT_SLOT(cursorLeft()), + new KAction(i18n("Move Character Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(cursorLeft()), ac, "move_cusor_left"); new KAction( i18n("Select to Next Line"), SHIFT + Key_Down, - this, TQT_SLOT(shiftDown()), + TQT_TQOBJECT(this), TQT_SLOT(shiftDown()), ac, "select_line_down" ); new KAction( i18n("Scroll Line Down"), CTRL + Key_Down, - this, TQT_SLOT(scrollDown()), + TQT_TQOBJECT(this), TQT_SLOT(scrollDown()), ac, "scroll_line_down" ); new KAction( i18n("Scroll Page Up"), KStdAccel::prior(), - this, TQT_SLOT(pageUp()), + TQT_TQOBJECT(this), TQT_SLOT(pageUp()), ac, "scroll_page_up" ); new KAction( i18n("Select Page Up"), SHIFT + Key_PageUp, - this, TQT_SLOT(shiftPageUp()), + TQT_TQOBJECT(this), TQT_SLOT(shiftPageUp()), ac, "select_page_up" ); new KAction( i18n("Move to Top of View"), CTRL + Key_PageUp, - this, TQT_SLOT(topOfView()), + TQT_TQOBJECT(this), TQT_SLOT(topOfView()), ac, "move_top_of_view" ); new KAction( i18n("Select to Top of View"), CTRL + SHIFT + Key_PageUp, - this, TQT_SLOT(shiftTopOfView()), + TQT_TQOBJECT(this), TQT_SLOT(shiftTopOfView()), ac, "select_top_of_view" ); new KAction( i18n("Scroll Page Down"), KStdAccel::next(), - this, TQT_SLOT(pageDown()), + TQT_TQOBJECT(this), TQT_SLOT(pageDown()), ac, "scroll_page_down" ); new KAction( i18n("Select Page Down"), SHIFT + Key_PageDown, - this, TQT_SLOT(shiftPageDown()), + TQT_TQOBJECT(this), TQT_SLOT(shiftPageDown()), ac, "select_page_down" ); new KAction( i18n("Move to Bottom of View"), CTRL + Key_PageDown, - this, TQT_SLOT(bottomOfView()), + TQT_TQOBJECT(this), TQT_SLOT(bottomOfView()), ac, "move_bottom_of_view" ); new KAction( i18n("Select to Bottom of View"), CTRL + SHIFT + Key_PageDown, - this, TQT_SLOT(shiftBottomOfView()), + TQT_TQOBJECT(this), TQT_SLOT(shiftBottomOfView()), ac, "select_bottom_of_view" ); new KAction( i18n("Move to Matching Bracket"), CTRL + Key_6, - this, TQT_SLOT(toMatchingBracket()), + TQT_TQOBJECT(this), TQT_SLOT(toMatchingBracket()), ac, "to_matching_bracket" ); new KAction( i18n("Select to Matching Bracket"), SHIFT + CTRL + Key_6, - this, TQT_SLOT(shiftToMatchingBracket()), + TQT_TQOBJECT(this), TQT_SLOT(shiftToMatchingBracket()), ac, "select_matching_bracket" ); // anders: shortcuts doing any changes should not be created in browserextension @@ -577,30 +577,30 @@ void KateView::setupEditActions() { new KAction( i18n("Transpose Characters"), CTRL + Key_T, - this, TQT_SLOT(transpose()), + TQT_TQOBJECT(this), TQT_SLOT(transpose()), ac, "transpose_char" ); new KAction( i18n("Delete Line"), CTRL + Key_K, - this, TQT_SLOT(killLine()), + TQT_TQOBJECT(this), TQT_SLOT(killLine()), ac, "delete_line" ); new KAction( i18n("Delete Word Left"), KStdAccel::deleteWordBack(), - this, TQT_SLOT(deleteWordLeft()), + TQT_TQOBJECT(this), TQT_SLOT(deleteWordLeft()), ac, "delete_word_left" ); new KAction( i18n("Delete Word Right"), KStdAccel::deleteWordForward(), - this, TQT_SLOT(deleteWordRight()), + TQT_TQOBJECT(this), TQT_SLOT(deleteWordRight()), ac, "delete_word_right" ); new KAction(i18n("Delete Next Character"), Key_Delete, - this, TQT_SLOT(keyDelete()), + TQT_TQOBJECT(this), TQT_SLOT(keyDelete()), ac, "delete_next_character"); KAction *a = new KAction(i18n("Backspace"), Key_Backspace, - this, TQT_SLOT(backspace()), + TQT_TQOBJECT(this), TQT_SLOT(backspace()), ac, "backspace"); KShortcut cut = a->shortcut(); cut.append( KKey( SHIFT + Key_Backspace ) ); @@ -608,9 +608,9 @@ void KateView::setupEditActions() } connect( this, TQT_SIGNAL(gotFocus(Kate::View*)), - this, TQT_SLOT(slotGotFocus()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotGotFocus()) ); connect( this, TQT_SIGNAL(lostFocus(Kate::View*)), - this, TQT_SLOT(slotLostFocus()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotLostFocus()) ); m_editActions->readShortcutSettings( "Katepart Shortcuts" ); @@ -628,14 +628,14 @@ void KateView::setupCodeFolding() new KAction( i18n("Collapse Toplevel"), CTRL+SHIFT+Key_Minus, m_doc->foldingTree(),TQT_SLOT(collapseToplevelNodes()),ac,"folding_toplevel"); new KAction( i18n("Expand Toplevel"), CTRL+SHIFT+Key_Plus, - this,TQT_SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel"); + TQT_TQOBJECT(this),TQT_SLOT(slotExpandToplevel()),ac,"folding_expandtoplevel"); new KAction( i18n("Collapse One Local Level"), CTRL+Key_Minus, - this,TQT_SLOT(slotCollapseLocal()),ac,"folding_collapselocal"); + TQT_TQOBJECT(this),TQT_SLOT(slotCollapseLocal()),ac,"folding_collapselocal"); new KAction( i18n("Expand One Local Level"), CTRL+Key_Plus, - this,TQT_SLOT(slotExpandLocal()),ac,"folding_expandlocal"); + TQT_TQOBJECT(this),TQT_SLOT(slotExpandLocal()),ac,"folding_expandlocal"); #ifdef DEBUGACCELS - KAccel* debugAccels = new KAccel(this,this); + KAccel* debugAccels = new KAccel(this,TQT_TQOBJECT(this)); debugAccels->insert("KATE_DUMP_REGION_TREE",i18n("Show the code folding region tree"),"","Ctrl+Shift+Alt+D",m_doc,TQT_SLOT(dumpRegionTree())); debugAccels->insert("KATE_TEMPLATE_TEST",i18n("Basic template code test"),"","Ctrl+Shift+Alt+T",m_doc,TQT_SLOT(testTemplateCode())); debugAccels->setEnabled(true); @@ -665,15 +665,15 @@ void KateView::setupCodeCompletion() { m_codeCompletion = new KateCodeCompletion(this); connect( m_codeCompletion, TQT_SIGNAL(completionAborted()), - this, TQT_SIGNAL(completionAborted())); + TQT_TQOBJECT(this), TQT_SIGNAL(completionAborted())); connect( m_codeCompletion, TQT_SIGNAL(completionDone()), - this, TQT_SIGNAL(completionDone())); + TQT_TQOBJECT(this), TQT_SIGNAL(completionDone())); connect( m_codeCompletion, TQT_SIGNAL(argHintHidden()), - this, TQT_SIGNAL(argHintHidden())); + TQT_TQOBJECT(this), TQT_SIGNAL(argHintHidden())); connect( m_codeCompletion, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)), - this, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry))); + TQT_TQOBJECT(this), TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry))); connect( m_codeCompletion, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*)), - this, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*))); + TQT_TQOBJECT(this), TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString*))); } void KateView::slotGotFocus() @@ -1613,7 +1613,7 @@ void KateView::copy() const if (!hasSelection()) return; - TQApplication::clipboard()->setText(selection ()); + TQApplication::tqclipboard()->setText(selection ()); } void KateView::copyHTML() @@ -1629,7 +1629,7 @@ void KateView::copyHTML() drag->addDragObject( htmltextdrag); drag->addDragObject( new TQTextDrag( selection())); - TQApplication::clipboard()->setData(drag); + TQApplication::tqclipboard()->setData(drag); } TQString KateView::selectionAsHtml() @@ -1748,7 +1748,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, T charAttributes = m_renderer->attribute(line->attribute(curPos)); - if ( ! stylecache.contains( line->attribute(curPos) ) ) + if ( ! stylecache.tqcontains( line->attribute(curPos) ) ) { TQString textdecoration; TQString style; diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp index b379773bf..3f964e613 100644 --- a/kate/part/kateviewhelpers.cpp +++ b/kate/part/kateviewhelpers.cpp @@ -73,7 +73,7 @@ KateScrollBar::KateScrollBar (Orientation orientation, KateViewInternal* parent, void KateScrollBar::mousePressEvent(TQMouseEvent* e) { - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) m_middleMouseDown = true; TQScrollBar::mousePressEvent(e); @@ -94,7 +94,7 @@ void KateScrollBar::mouseMoveEvent(TQMouseEvent* e) { TQScrollBar::mouseMoveEvent(e); - if (e->state() | LeftButton) + if (e->state() | Qt::LeftButton) redrawMarks(); } @@ -212,7 +212,7 @@ void KateScrollBar::sliderMaybeMoved(int value) //END //BEGIN KateCmdLnWhatsThis -class KateCmdLnWhatsThis : public QWhatsThis +class KateCmdLnWhatsThis : public TQWhatsThis { public: KateCmdLnWhatsThis( KateCmdLine *parent ) @@ -685,7 +685,7 @@ const int iconPaneWidth = 16; const int halfIPW = 8; KateIconBorder::KateIconBorder ( KateViewInternal* internalView, TQWidget *parent ) - : TQWidget(parent, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase ) + : TQWidget(parent, "", (WFlags)(WStaticContents | WRepaintNoErase | WResizeNoErase) ) , m_view( internalView->m_view ) , m_doc( internalView->m_doc ) , m_viewInternal( internalView ) @@ -795,10 +795,10 @@ int KateIconBorder::lineNumberWidth() const int width = m_lineNumbersOn ? ((int)log10((double)(m_view->doc()->numLines())) + 1) * m_maxCharWidth + 4 : 0; if (m_view->dynWordWrap() && m_dynWrapIndicatorsOn) { - width = kMax(style().scrollBarExtent().width() + 4, width); + width = kMax(tqstyle().scrollBarExtent().width() + 4, width); if (m_cachedLNWidth != width || m_oldBackgroundColor != m_view->renderer()->config()->iconBarColor()) { - int w = style().scrollBarExtent().width(); + int w = tqstyle().scrollBarExtent().width(); int h = m_view->renderer()->config()->fontMetrics()->height(); TQSize newSize(w, h); @@ -1069,7 +1069,7 @@ void KateIconBorder::mouseReleaseEvent( TQMouseEvent* e ) { BorderArea area = positionToArea( e->pos() ); if( area == IconBorder) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { if( m_doc->editableMarks() & KateViewConfig::global()->defaultMarkType() ) { if( m_doc->mark( cursorOnLine ) & KateViewConfig::global()->defaultMarkType() ) m_doc->removeMark( cursorOnLine, KateViewConfig::global()->defaultMarkType() ); @@ -1080,7 +1080,7 @@ void KateIconBorder::mouseReleaseEvent( TQMouseEvent* e ) } } else - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { showMarkMenu( cursorOnLine, TQCursor::pos() ); } } diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp index 569397f05..34b098fb4 100644 --- a/kate/part/kateviewinternal.cpp +++ b/kate/part/kateviewinternal.cpp @@ -52,12 +52,12 @@ #include <tqvbox.h> KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc) - : TQWidget (view, "", Qt::WStaticContents | Qt::WRepaintNoErase | Qt::WResizeNoErase ) + : TQWidget (view, "", (WFlags)(WStaticContents | WRepaintNoErase | WResizeNoErase) ) , editSessionNumber (0) , editIsRunning (false) , m_view (view) , m_doc (doc) - , cursor (doc, true, 0, 0, this) + , cursor (doc, true, 0, 0, TQT_TQOBJECT(this)) , possibleTripleClick (false) , m_dummy (0) , m_startPos(doc, true, 0,0) @@ -94,7 +94,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc) // // scrollbar for lines // - m_lineScroll = new KateScrollBar(TQScrollBar::Vertical, this); + m_lineScroll = new KateScrollBar(Qt::Vertical, this); m_lineScroll->show(); m_lineScroll->setTracking (true); @@ -106,7 +106,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc) // bottom corner box m_dummy = new TQWidget(m_view); - m_dummy->setFixedHeight(style().scrollBarExtent().width()); + m_dummy->setFixedHeight(tqstyle().scrollBarExtent().width()); if (m_view->dynWordWrap()) m_dummy->hide(); @@ -131,7 +131,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc) // // scrollbar for columns // - m_columnScroll = new TQScrollBar(TQScrollBar::Horizontal,m_view); + m_columnScroll = new TQScrollBar(Qt::Horizontal,m_view); // hide the column scrollbar in the dynamic word wrap mode if (m_view->dynWordWrap()) @@ -174,7 +174,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc) // set initial cursor setCursor( KCursor::ibeamCursor() ); - m_mouseCursor = IbeamCursor; + m_mouseCursor = TQt::IbeamCursor; // call mouseMoveEvent also if no mouse button is pressed setMouseTracking(true); @@ -425,7 +425,7 @@ void KateViewInternal::scrollPos(KateTextCursor& c, bool force, bool calledExter updateView(false, viewLinesScrolled); int scrollHeight = -(viewLinesScrolled * (int)m_view->renderer()->fontHeight()); - int scrollbarWidth = style().scrollBarExtent().width(); + int scrollbarWidth = tqstyle().scrollBarExtent().width(); // // updates are for working around the scrollbar leaving blocks in the view @@ -2438,7 +2438,7 @@ bool KateViewInternal::isTargetSelected( const TQPoint& p ) bool KateViewInternal::eventFilter( TQObject *obj, TQEvent *e ) { - if (obj == m_lineScroll) + if (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_lineScroll)) { // the second condition is to make sure a scroll on the vertical bar doesn't cause a horizontal scroll ;) if (e->type() == TQEvent::Wheel && m_lineScroll->minValue() != m_lineScroll->maxValue()) @@ -2649,9 +2649,9 @@ void KateViewInternal::keyReleaseEvent( TQKeyEvent* e ) if (m_selChangedByUser) { - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); m_selChangedByUser = false; } @@ -2693,7 +2693,7 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) { switch (e->button()) { - case LeftButton: + case Qt::LeftButton: m_selChangedByUser = false; if (possibleTripleClick) @@ -2702,7 +2702,7 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) m_selectionMode = Line; - if ( e->state() & Qt::ShiftButton ) + if ( e->state() & TQt::ShiftButton ) { updateSelection( cursor, true ); } @@ -2711,9 +2711,9 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) m_view->selectLine( cursor ); } - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); // Keep the line at the select anchor selected during further // mouse selection @@ -2752,7 +2752,7 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) m_selectionMode = Mouse; } - if ( e->state() & Qt::ShiftButton ) + if ( e->state() & TQt::ShiftButton ) { if (selectAnchor.line() < 0) selectAnchor = cursor; @@ -2762,7 +2762,7 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) selStartCached.setLine( -1 ); // tqinvalidate } - if( !( e->state() & Qt::ShiftButton ) && isTargetSelected( e->pos() ) ) + if( !( e->state() & TQt::ShiftButton ) && isTargetSelected( e->pos() ) ) { dragInfo.state = diPending; dragInfo.start = e->pos(); @@ -2771,7 +2771,7 @@ void KateViewInternal::mousePressEvent( TQMouseEvent* e ) { dragInfo.state = diNone; - if ( e->state() & Qt::ShiftButton ) + if ( e->state() & TQt::ShiftButton ) { placeCursor( e->pos(), true, false ); if ( selStartCached.line() >= 0 ) @@ -2820,10 +2820,10 @@ void KateViewInternal::mouseDoubleClickEvent(TQMouseEvent *e) { switch (e->button()) { - case LeftButton: + case Qt::LeftButton: m_selectionMode = Word; - if ( e->state() & Qt::ShiftButton ) + if ( e->state() & TQt::ShiftButton ) { KateTextCursor oldSelectStart = m_view->selectStart; KateTextCursor oldSelectEnd = m_view->selectEnd; @@ -2889,9 +2889,9 @@ void KateViewInternal::mouseDoubleClickEvent(TQMouseEvent *e) // Move cursor to end (or beginning) of selected word if (m_view->hasSelection()) { - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); // Shift+DC before the "cached" word should move the cursor to the // beginning of the selection, not the end @@ -2927,15 +2927,15 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e ) { switch (e->button()) { - case LeftButton: + case Qt::LeftButton: m_selectionMode = Default; // selStartCached.setLine( -1 ); if (m_selChangedByUser) { - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); m_view->copy(); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); // Set cursor to edge of selection... which edge depends on what // "direction" the selection was made in if ( m_view->selectStart < selectAnchor ) @@ -2956,14 +2956,14 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e ) e->accept (); break; - case MidButton: + case Qt::MidButton: placeCursor( e->pos() ); if( m_doc->isReadWrite() ) { - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); m_view->paste (); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); } e->accept (); @@ -2977,7 +2977,7 @@ void KateViewInternal::mouseReleaseEvent( TQMouseEvent* e ) void KateViewInternal::mouseMoveEvent( TQMouseEvent* e ) { - if( e->state() & LeftButton ) + if( e->state() & Qt::LeftButton ) { if (dragInfo.state == diPending) { @@ -3033,13 +3033,13 @@ void KateViewInternal::mouseMoveEvent( TQMouseEvent* e ) // the arrow cursor as other Qt text editing widgets do if (m_mouseCursor != ArrowCursor) { setCursor( KCursor::arrowCursor() ); - m_mouseCursor = ArrowCursor; + m_mouseCursor = TQt::ArrowCursor; } } else { // normal text cursor if (m_mouseCursor != IbeamCursor) { setCursor( KCursor::ibeamCursor() ); - m_mouseCursor = IbeamCursor; + m_mouseCursor = TQt::IbeamCursor; } } diff --git a/kate/part/kateviewinternal.h b/kate/part/kateviewinternal.h index 8e7b3a896..c7dda2f73 100644 --- a/kate/part/kateviewinternal.h +++ b/kate/part/kateviewinternal.h @@ -33,6 +33,7 @@ #include <tqpoint.h> #include <tqtimer.h> #include <tqintdict.h> +#include <tqdragobject.h> class KateView; class KateIconBorder; @@ -221,7 +222,7 @@ class KateViewInternal : public TQWidget int scrollX; int scrollY; - Qt::tqCursorShape m_mouseCursor; + Qt::CursorShape m_mouseCursor; KateSuperCursor cursor; KateTextCursor displayCursor; diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp index a74cf5d90..249abf9f2 100644 --- a/kate/plugins/isearch/ISearchPlugin.cpp +++ b/kate/plugins/isearch/ISearchPlugin.cpp @@ -204,7 +204,7 @@ void ISearchPluginView::setAutoWrap( bool autoWrap ) bool ISearchPluginView::eventFilter( TQObject* o, TQEvent* e ) { - if( o != m_combo->lineEdit() ) + if( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(m_combo->lineEdit()) ) return false; if( e->type() == TQEvent::FocusIn ) { diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index 41c19b9ee..dcd19675b 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -206,7 +206,7 @@ void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const TQ TQString datatype = "TQString"; // If unsupported (and if we have a single word indeed), try application/x-singleword - if ( !info.mimeTypes().contains( mimetype ) && m_singleWord ) + if ( !info.mimeTypes().tqcontains( mimetype ) && m_singleWord ) mimetype = "application/x-singleword"; kdDebug() << "Running tool with datatype=" << datatype << " mimetype=" << mimetype << endl; |