summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/chatwindow/chattexteditpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/kopete/chatwindow/chattexteditpart.cpp')
-rw-r--r--kopete/kopete/chatwindow/chattexteditpart.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kopete/kopete/chatwindow/chattexteditpart.cpp b/kopete/kopete/chatwindow/chattexteditpart.cpp
index e284903d..d3d3afc4 100644
--- a/kopete/kopete/chatwindow/chattexteditpart.cpp
+++ b/kopete/kopete/chatwindow/chattexteditpart.cpp
@@ -31,8 +31,8 @@
#include <tqtimer.h>
#include <tqregexp.h>
-ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, TQWidget *parent, const char *name )
- : KopeteRichTextEditPart( parent, name, session->protocol()->capabilities() ), m_session(session)
+ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, TQWidget *tqparent, const char *name )
+ : KopeteRichTextEditPart( tqparent, name, session->protocol()->capabilities() ), m_session(session)
{
historyPos = -1;
@@ -107,7 +107,7 @@ KDictSpellingHighlighter* ChatTextEditPart::spellHighlighter()
}
// NAUGHTY, BAD AND WRONG! (but needed to fix nick complete bugs)
-#include <private/qrichtext_p.h>
+#include <private/tqrichtext_p.h>
class EvilTextEdit : public KTextEdit
{
public:
@@ -130,8 +130,8 @@ void ChatTextEditPart::complete()
if ( parIdx > 0 )
{
- int firstSpace = txt.findRev( TQRegExp( TQString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1;
- int lastSpace = txt.find( TQRegExp( TQString::fromLatin1("[\\s\\:]") ), firstSpace );
+ int firstSpace = txt.tqfindRev( TQRegExp( TQString::tqfromLatin1("\\s\\S+") ), parIdx - 1 ) + 1;
+ int lastSpace = txt.tqfind( TQRegExp( TQString::tqfromLatin1("[\\s\\:]") ), firstSpace );
if( lastSpace == -1 )
lastSpace = txt.length();
@@ -143,7 +143,7 @@ void ChatTextEditPart::complete()
if ( word != m_lastMatch )
{
match = mComplete->makeCompletion( word );
- m_lastMatch = TQString::null;
+ m_lastMatch = TQString();
parIdx -= word.length();
}
else
@@ -158,13 +158,13 @@ void ChatTextEditPart::complete()
if ( para == 0 && firstSpace == 0 && rightText[0] != TQChar(':') )
{
- rightText = match + TQString::fromLatin1(": ") + rightText;
+ rightText = match + TQString::tqfromLatin1(": ") + rightText;
parIdx += 2;
}
else
rightText = match + rightText;
- // insert *before* remove. this is becase Qt adds an extra blank line
+ // insert *before* remove. this is becase TQt adds an extra blank line
// if the rich text control becomes empty (if you remove the only para).
// disable updates while we change the contents to eliminate flicker.
edit()->setUpdatesEnabled( false );
@@ -245,11 +245,11 @@ bool ChatTextEditPart::canSend()
return true;
}
-void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &newStatus, const Kopete::OnlineStatus &oldStatus )
+void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &newtqStatus, const Kopete::OnlineStatus &oldtqStatus )
{
//FIXME: should use signal contact->isReachableChanged, but it doesn't exist ;(
- if ( ( oldStatus.status() == Kopete::OnlineStatus::Offline )
- != ( newStatus.status() == Kopete::OnlineStatus::Offline ) )
+ if ( ( oldtqStatus.status() == Kopete::OnlineStatus::Offline )
+ != ( newtqStatus.status() == Kopete::OnlineStatus::Offline ) )
{
emit canSendChanged( canSend() );
}
@@ -257,19 +257,19 @@ void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete
void ChatTextEditPart::sendMessage()
{
- TQString txt = text( Qt::PlainText );
+ TQString txt = text( TQt::PlainText );
// avoid sending emtpy messages or enter keys (see bug 100334)
if ( txt.isEmpty() || txt == "\n" )
return;
- if ( m_lastMatch.isNull() && ( txt.find( TQRegExp( TQString::fromLatin1("^\\w+:\\s") ) ) > -1 ) )
+ if ( m_lastMatch.isNull() && ( txt.tqfind( TQRegExp( TQString::tqfromLatin1("^\\w+:\\s") ) ) > -1 ) )
{ //no last match and it finds something of the form of "word:" at the start of a line
- TQString search = txt.left( txt.find(':') );
+ TQString search = txt.left( txt.tqfind(':') );
if( !search.isEmpty() )
{
TQString match = mComplete->makeCompletion( search );
if( !match.isNull() )
- edit()->setText( txt.replace(0,search.length(),match) );
+ edit()->setText( txt.tqreplace(0,search.length(),match) );
}
}
@@ -277,7 +277,7 @@ void ChatTextEditPart::sendMessage()
{
//FIXME: what is the next line for?
mComplete->addItem( m_lastMatch );
- m_lastMatch = TQString::null;
+ m_lastMatch = TQString();
}
slotStoppedTypingTimer();
@@ -291,7 +291,7 @@ void ChatTextEditPart::sendMessage()
bool ChatTextEditPart::isTyping()
{
- TQString txt = text( Qt::PlainText );
+ TQString txt = text( TQt::PlainText );
//Make sure the message is empty. TQString::isEmpty()
//returns false if a message contains just whitespace
@@ -365,7 +365,7 @@ void ChatTextEditPart::historyDown()
historyPos--;
- TQString newText = ( historyPos >= 0 ? historyList[historyPos] : TQString::null );
+ TQString newText = ( historyPos >= 0 ? historyList[historyPos] : TQString() );
TextFormat format=edit()->textFormat();