summaryrefslogtreecommitdiffstats
path: root/ksirc/kstextview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/kstextview.cpp')
-rw-r--r--ksirc/kstextview.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/ksirc/kstextview.cpp b/ksirc/kstextview.cpp
index 65a9d725..7189a23a 100644
--- a/ksirc/kstextview.cpp
+++ b/ksirc/kstextview.cpp
@@ -645,7 +645,7 @@ bool Tokenizer::parseNextToken( Token &tok )
return false;
tok.id = Token::Text;
- tok.value = StringPtr( m_text.tqunicode() + idx,
+ tok.value = StringPtr( m_text.unicode() + idx,
m_text.length() - idx );
tok.attributes.clear();
return true;
@@ -658,7 +658,7 @@ bool Tokenizer::parseNextToken( Token &tok )
{
tok.id = Token::Text;
tok.attributes.clear();
- tok.value = StringPtr( m_text.tqunicode(),
+ tok.value = StringPtr( m_text.unicode(),
(*m_lastTag).index );
m_textBeforeFirstTagProcessed = true;
@@ -676,7 +676,7 @@ bool Tokenizer::parseNextToken( Token &tok )
if ( lastType == TagIndex::Open &&
type == TagIndex::Close )
{
- const TQChar *tagStart = m_text.tqunicode() + lastIndex + 1;
+ const TQChar *tagStart = m_text.unicode() + lastIndex + 1;
uint tagLen = ( index - 1 ) - ( lastIndex + 1 ) + 1;
// </bleh> ?
if ( *tagStart == '/' )
@@ -699,7 +699,7 @@ bool Tokenizer::parseNextToken( Token &tok )
{
tok.id = Token::Text;
tok.attributes.clear();
- tok.value = StringPtr( m_text.tqunicode() + lastIndex + 1,
+ tok.value = StringPtr( m_text.unicode() + lastIndex + 1,
( index - 1 ) - lastIndex );
m_lastTag = it;
@@ -715,7 +715,7 @@ bool Tokenizer::parseNextToken( Token &tok )
Tokenizer::TagIndexList Tokenizer::scanTagIndices( const TQString &text )
{
- const TQChar *start = text.tqunicode();
+ const TQChar *start = text.unicode();
const TQChar *p = start;
const TQChar *endP = p + text.length();
bool quoted = false;
@@ -754,7 +754,7 @@ Tokenizer::TagIndexList Tokenizer::scanTagIndices( const TQString &text )
void Tokenizer::resolveEntities( TQString &text, TagIndexList &tags )
{
- const TQChar *p = text.tqunicode();
+ const TQChar *p = text.unicode();
const TQChar *endP = p + text.length();
uint i = 0;
bool scanForSemicolon = false;
@@ -793,13 +793,13 @@ void Tokenizer::resolveEntities( TQString &text, TagIndexList &tags )
if ( entityValue.isNull() )
continue;
- const uint ampersandPos = ampersand - text.tqunicode();
+ const uint ampersandPos = ampersand - text.unicode();
text[ ampersandPos ] = entityValue;
text.remove( ampersandPos + 1, entityLength + 1 );
i = ampersandPos;
- p = text.tqunicode() + i;
- endP = text.tqunicode() + text.length();
+ p = text.unicode() + i;
+ endP = text.unicode() + text.length();
ampersand = 0;
uint adjustment = entityLength + 1;
@@ -1225,7 +1225,7 @@ TextParag::~TextParag()
{
}
-void TextParag::tqlayout( int width )
+void TextParag::layout( int width )
{
TQPtrList<Item> items;
@@ -1658,7 +1658,7 @@ void TextView::viewportResizeEvent( TQResizeEvent *ev )
TQScrollView::viewportResizeEvent(ev);
if ( ev->size().width() != ev->oldSize().width() )
- tqlayout();
+ layout();
int newdiff = ev->size().height() - ev->oldSize().height();
setContentsPos( 0, contentsY()-newdiff );
@@ -1720,7 +1720,7 @@ void TextView::clear()
stopAutoScroll();
clearSelection();
m_parags.clear();
- tqlayout();
+ layout();
viewport()->erase();
}
@@ -1728,7 +1728,7 @@ TextParagIterator TextView::appendParag( const TQString &richText )
{
TextParag *parag = new TextParag( this, richText );
m_parags.append( parag );
- tqlayout( false );
+ layout( false );
scrollToBottom();
TQPtrListIterator<TextParag> it( m_parags );
it.toLast();
@@ -1758,7 +1758,7 @@ bool TextView::removeParag( const TextParagIterator &parag )
if(m_selectionEnd.item != 0)
m_selectionEnd.pos.ry() -= height;
- //tqlayout( false );
+ //layout( false );
contentsChange(-height, true);
@@ -1814,7 +1814,7 @@ void TextView::setLinkColor( const TQColor &linkColor )
void TextView::copy()
{
- TQApplication::tqclipboard()->setText( m_selectedText );
+ TQApplication::clipboard()->setText( m_selectedText );
}
void TextView::clearSelectionInternal()
@@ -1953,7 +1953,7 @@ void TextView::contentsMouseReleaseEvent( TQMouseEvent *ev )
m_selectionMaybeStart = SelectionPoint();
if ( (ev->button() & Qt::LeftButton) && !m_selectedText.isEmpty() )
- TQApplication::tqclipboard()->setText( m_selectedText, TQClipboard::Selection );
+ TQApplication::clipboard()->setText( m_selectedText, TQClipboard::Selection );
if ( clicked ) {
emitLinkClickedForMouseEvent( ev );
@@ -1962,7 +1962,7 @@ void TextView::contentsMouseReleaseEvent( TQMouseEvent *ev )
if (ev->button() & Qt::MidButton)
{
- emit pasteReq( KApplication::tqclipboard()->text( TQClipboard::Selection ) );
+ emit pasteReq( KApplication::clipboard()->text( TQClipboard::Selection ) );
return;
}
}
@@ -1973,7 +1973,7 @@ void TextView::fontChange( const TQFont & )
for (; it.current(); ++it )
it.current()->fontChange( font() );
- tqlayout( true );
+ layout( true );
}
void TextView::startDrag()
@@ -2156,7 +2156,7 @@ TQString TextView::updateSelection( const SelectionPoint &start, const Selection
return selectedText;
}
-void TextView::tqlayout( bool force )
+void TextView::layout( bool force )
{
int height = 0;
int contentsWidth = visibleWidth();
@@ -2166,7 +2166,7 @@ void TextView::tqlayout( bool force )
for (; it.current(); ++it )
{
if ( !it.current()->isLayouted() || force )
- it.current()->tqlayout( width );
+ it.current()->layout( width );
height += it.current()->height();
contentsWidth = kMax( contentsWidth, it.current()->minWidth() );
@@ -2182,7 +2182,7 @@ void TextView::tqlayout( bool force )
void TextView::contentsChange(int heightChange, bool force)
{
if(m_height == -1){
- tqlayout(force);
+ layout(force);
}
else {
m_height += heightChange;
@@ -2248,7 +2248,7 @@ void TextParagIterator::setRichText( const TQString &richText )
m_paragIt.current()->setRichText( richText );
TextView *textView = m_paragIt.current()->textView();
- textView->tqlayout( false );
+ textView->layout( false );
if ( textView->isUpdatesEnabled() )
textView->updateContents();