diff options
Diffstat (limited to 'lib/kotext/KoTextIterator.cpp')
-rw-r--r-- | lib/kotext/KoTextIterator.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/kotext/KoTextIterator.cpp b/lib/kotext/KoTextIterator.cpp index 87a90fb3..ed320ed1 100644 --- a/lib/kotext/KoTextIterator.cpp +++ b/lib/kotext/KoTextIterator.cpp @@ -33,7 +33,7 @@ * So we go from the first to the last textobject, or from the last to the first textobject. */ -void KoTextIterator::init( const QValueList<KoTextObject *> & lstObjects, KoTextView* textView, int options ) +void KoTextIterator::init( const TQValueList<KoTextObject *> & lstObjects, KoTextView* textView, int options ) { Q_ASSERT( !lstObjects.isEmpty() ); @@ -89,7 +89,7 @@ void KoTextIterator::init( const QValueList<KoTextObject *> & lstObjects, KoText m_lstObjects.pop_front(); m_lstObjects.push_back( textobj ); if ( m_lstObjects.first() == initialFirst ) { // safety - kdWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl; + kdWarning(32500) << "Didn't manage to tqfind " << textView->textObject() << " in the list of textobjects!!!" << endl; break; } } @@ -99,7 +99,7 @@ void KoTextIterator::init( const QValueList<KoTextObject *> & lstObjects, KoText m_lstObjects.pop_back(); m_lstObjects.push_front( textobj ); if ( m_lstObjects.first() == initialFirst ) { // safety - kdWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl; + kdWarning(32500) << "Didn't manage to tqfind " << textView->textObject() << " in the list of textobjects!!!" << endl; break; } } @@ -128,7 +128,7 @@ void KoTextIterator::init( const QValueList<KoTextObject *> & lstObjects, KoText m_currentParag = m_firstParag; #ifdef DEBUG_ITERATOR kdDebug(32500) << "KoTextIterator::init from(" << *m_currentTextObj << "," << m_firstParag->paragId() << ") - to(" << (forw?m_lstObjects.last():m_lstObjects.first()) << "," << m_lastParag->paragId() << "), " << m_lstObjects.count() << " textObjects." << endl; - QValueList<KoTextObject *>::Iterator it = m_lstObjects.begin(); + TQValueList<KoTextObject *>::Iterator it = m_lstObjects.begin(); for( ; it != m_lstObjects.end(); ++it ) kdDebug(32500) << (*it) << " " << (*it)->name() << endl; #endif @@ -161,12 +161,12 @@ void KoTextIterator::restart() void KoTextIterator::connectTextObjects() { - QValueList<KoTextObject *>::Iterator it = m_lstObjects.begin(); + TQValueList<KoTextObject *>::Iterator it = m_lstObjects.begin(); for( ; it != m_lstObjects.end(); ++it ) { - connect( (*it), SIGNAL( paragraphDeleted( KoTextParag* ) ), - this, SLOT( slotParagraphDeleted( KoTextParag* ) ) ); - connect( (*it), SIGNAL( paragraphModified( KoTextParag*, int, int, int ) ), - this, SLOT( slotParagraphModified( KoTextParag*, int, int, int ) ) ); + connect( (*it), TQT_SIGNAL( paragraphDeleted( KoTextParag* ) ), + this, TQT_SLOT( slotParagraphDeleted( KoTextParag* ) ) ); + connect( (*it), TQT_SIGNAL( paragraphModified( KoTextParag*, int, int, int ) ), + this, TQT_SLOT( slotParagraphModified( KoTextParag*, int, int, int ) ) ); // We don't connect to destroyed(), because for undo/redo purposes, // we never really delete textdocuments nor textobjects. // So this is never called. @@ -291,34 +291,34 @@ int KoTextIterator::currentStartIndex() const return currentTextAndIndex().first; } -QString KoTextIterator::currentText() const +TQString KoTextIterator::currentText() const { return currentTextAndIndex().second; } -QPair<int, QString> KoTextIterator::currentTextAndIndex() const +TQPair<int, TQString> KoTextIterator::currentTextAndIndex() const { Q_ASSERT( m_currentParag ); Q_ASSERT( m_currentParag->string() ); - QString str = m_currentParag->string()->toString(); + TQString str = m_currentParag->string()->toString(); str.truncate( str.length() - 1 ); // remove trailing space bool forw = ! ( m_options & KFindDialog::FindBackwards ); if ( m_currentParag == m_firstParag ) { if ( m_firstParag == m_lastParag ) // special case, needs truncating at both ends - return forw ? qMakePair( m_firstIndex, str.mid( m_firstIndex, m_lastIndex - m_firstIndex ) ) - : qMakePair( m_lastIndex, str.mid( m_lastIndex, m_firstIndex - m_lastIndex ) ); + return forw ? tqMakePair( m_firstIndex, str.mid( m_firstIndex, m_lastIndex - m_firstIndex ) ) + : tqMakePair( m_lastIndex, str.mid( m_lastIndex, m_firstIndex - m_lastIndex ) ); else - return forw ? qMakePair( m_firstIndex, str.mid( m_firstIndex ) ) - : qMakePair( 0, str.left( m_firstIndex ) ); + return forw ? tqMakePair( m_firstIndex, str.mid( m_firstIndex ) ) + : tqMakePair( 0, str.left( m_firstIndex ) ); } if ( m_currentParag == m_lastParag ) { - return forw ? qMakePair( 0, str.left( m_lastIndex ) ) - : qMakePair( m_lastIndex, str.mid( m_lastIndex ) ); + return forw ? tqMakePair( 0, str.left( m_lastIndex ) ) + : tqMakePair( m_lastIndex, str.mid( m_lastIndex ) ); } // Not the first parag, nor the last, so we return it all - return qMakePair( 0, str ); + return tqMakePair( 0, str ); } bool KoTextIterator::hasText() const @@ -348,8 +348,8 @@ void KoTextIterator::setOptions( int options ) bool isBack = (options & KFindDialog::FindBackwards); if ( wasBack != isBack ) { - qSwap( m_firstParag, m_lastParag ); - qSwap( m_firstIndex, m_lastIndex ); + tqSwap( m_firstParag, m_lastParag ); + tqSwap( m_firstIndex, m_lastIndex ); if ( m_currentParag == 0 ) // done? -> reinit { #ifdef DEBUG_ITERATOR |