From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksirc/topic.cpp | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'ksirc/topic.cpp') diff --git a/ksirc/topic.cpp b/ksirc/topic.cpp index 49334f43..3afa199d 100644 --- a/ksirc/topic.cpp +++ b/ksirc/topic.cpp @@ -28,19 +28,19 @@ #include "ksparser.h" -KSircTopic::KSircTopic( TQWidget *parent, const char *name ) - : KActiveLabel( parent, name ) +KSircTopic::KSircTopic( TQWidget *tqparent, const char *name ) + : KActiveLabel( tqparent, name ) { m_editor = 0; m_doEdit = false; m_height = 0; -// setBackgroundColor( colorGroup().light() ); +// setBackgroundColor( tqcolorGroup().light() ); setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); setTextFormat( RichText ); setWordWrap(TQTextEdit::NoWrap); doResize(); -// setAlignment( alignment() | WordBreak ); +// tqsetAlignment( tqalignment() | WordBreak ); } void KSircTopic::setText( const TQString &_text) @@ -49,27 +49,27 @@ void KSircTopic::setText( const TQString &_text) TQString text = _text; TQString richText( "" ); - richText = richText.arg( ksopts->textColor.name() ); + richText = richText.tqarg( ksopts->textColor.name() ); - text.replace('&', "&"); - text.replace('<', "<"); - text.replace('>', ">"); + text.tqreplace('&', "&"); + text.tqreplace('<', "<"); + text.tqreplace('>', ">"); - text.replace('~', "~~"); + text.tqreplace('~', "~~"); // ### a bit of a hack: turn '<nick> message' into // <nick> message' . span itself isn't supported but it // enforces the creation of separate item objects and hence separate // drawing of '' and 'message' , which is needed for BiDi users, // according to UV Kochavi , to prevent output like - // 'nick< to catch queries. TQRegExp bidiRe( "^(<\\S+>)(.+)$" ); - text.replace( bidiRe, TQString::fromLatin1( "\\1\\2" ) ); + text.tqreplace( bidiRe, TQString::tqfromLatin1( "\\1\\2" ) ); TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); - text.replace( bidiRe2, TQString::fromLatin1( "\\1\\2" ) ); + text.tqreplace( bidiRe2, TQString::tqfromLatin1( "\\1\\2" ) ); TQRegExp bidiRe3( "^(>\\S+<)(.+)$" ); - text.replace( bidiRe3, TQString::fromLatin1( "\\1\\2" ) ); + text.tqreplace( bidiRe3, TQString::tqfromLatin1( "\\1\\2" ) ); KSParser parser; richText += parser.parse( text ); @@ -111,7 +111,7 @@ void KSircTopic::contentsMouseReleaseEvent( TQMouseEvent *e ) * the size really breaks and you get * a huge widget */ - m_editor->setGeometry( geometry() ); + m_editor->setGeometry( tqgeometry() ); m_editor->setFocus(); m_editor->show(); @@ -180,11 +180,11 @@ void KSircTopic::fontChange(TQFont &f) doResize(); } -KSircTopicEditor::KSircTopicEditor( TQWidget *parent, const char *name ) - : TQTextEdit( parent, name ) +KSircTopicEditor::KSircTopicEditor( TQWidget *tqparent, const char *name ) + : TQTextEdit( tqparent, name ) { setWFlags( WDestructiveClose ); - setFocusPolicy( TQWidget::ClickFocus ); + setFocusPolicy( TQ_ClickFocus ); connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) ); } @@ -205,13 +205,13 @@ void KSircTopicEditor::keyPressEvent( TQKeyEvent *ev ) TQTextEdit::keyPressEvent( ev ); } -void KSircTopicEditor::focusOutEvent( TQFocusEvent * ) +void KSircTopicEditor::focusOutEvent( TQFocusEvent * fe ) { - // we don't want to quit editing when someone brings up QLE's popup + // we don't want to quit editing when someone brings up TQLE's popup // menu - if ( TQFocusEvent::reason() == TQFocusEvent::Popup ) + if ( fe->reason() == TQFocusEvent::Popup ) { - TQWidget *focusw = qApp->focusWidget(); + TQWidget *focusw = tqApp->tqfocusWidget(); if ( focusw && m_popup && focusw == m_popup ) return; } @@ -228,9 +228,9 @@ TQPopupMenu *KSircTopicEditor::createPopupMenu( const TQPoint &pos ) void KSircTopicEditor::slotMaybeResize() { - if(text().contains("\n")){ + if(text().tqcontains("\n")){ TQString s = text(); - s.replace('\n', " "); + s.tqreplace('\n', " "); setText(s); setCursorPosition(0, s.length()); } -- cgit v1.2.1