summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetecommandhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/kopetecommandhandler.cpp')
-rw-r--r--kopete/libkopete/kopetecommandhandler.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kopete/libkopete/kopetecommandhandler.cpp b/kopete/libkopete/kopetecommandhandler.cpp
index ec2618bc..acb3d767 100644
--- a/kopete/libkopete/kopetecommandhandler.cpp
+++ b/kopete/libkopete/kopetecommandhandler.cpp
@@ -45,7 +45,7 @@ class KopeteCommandGUIClient : public TQObject, public KXMLGUIClient
public:
KopeteCommandGUIClient( Kopete::ChatSession *manager ) : TQObject(manager), KXMLGUIClient(manager)
{
- setXMLFile( TQString::tqfromLatin1("kopetecommandui.rc") );
+ setXMLFile( TQString::fromLatin1("kopetecommandui.rc") );
TQDomDocument doc = domDocument();
TQDomNode menu = doc.documentElement().firstChild().firstChild().firstChild();
@@ -57,15 +57,15 @@ class KopeteCommandGUIClient : public TQObject, public KXMLGUIClient
{
KAction *a = static_cast<KAction*>( it.current() );
actionCollection()->insert( a );
- TQDomElement newNode = doc.createElement( TQString::tqfromLatin1("Action") );
- newNode.setAttribute( TQString::tqfromLatin1("name"),
- TQString::tqfromLatin1( a->name() ) );
+ TQDomElement newNode = doc.createElement( TQString::fromLatin1("Action") );
+ newNode.setAttribute( TQString::fromLatin1("name"),
+ TQString::fromLatin1( a->name() ) );
bool added = false;
for( TQDomElement n = menu.firstChild().toElement();
!n.isNull(); n = n.nextSibling().toElement() )
{
- if( TQString::tqfromLatin1(a->name()) < n.attribute(TQString::tqfromLatin1("name")))
+ if( TQString::fromLatin1(a->name()) < n.attribute(TQString::fromLatin1("name")))
{
menu.insertBefore( newNode, n );
added = true;
@@ -103,33 +103,33 @@ Kopete::CommandHandler::CommandHandler() : TQObject( tqApp )
mCommands.setAutoDelete( true );
p->pluginCommands.insert( this, mCommands );
- registerCommand( this, TQString::tqfromLatin1("help"), TQT_SLOT( slotHelpCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("help"), TQT_SLOT( slotHelpCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /help [<command>] - Used to list available commands, or show help for a specified command." ), 0, 1 );
- registerCommand( this, TQString::tqfromLatin1("close"), TQT_SLOT( slotCloseCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("close"), TQT_SLOT( slotCloseCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /close - Closes the current view." ) );
// FIXME: What's the difference with /close? The help doesn't explain it - Martijn
- registerCommand( this, TQString::tqfromLatin1("part"), TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("part"), TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /part - Closes the current view." ) );
- registerCommand( this, TQString::tqfromLatin1("clear"), TQT_SLOT( slotClearCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("clear"), TQT_SLOT( slotClearCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /clear - Clears the active view's chat buffer." ) );
- //registerCommand( this, TQString::tqfromLatin1("me"), TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession * ) ),
+ //registerCommand( this, TQString::fromLatin1("me"), TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession * ) ),
// i18n( "USAGE: /me <text> - Formats message as in '<nickname> went to the store'." ) );
- registerCommand( this, TQString::tqfromLatin1("away"), TQT_SLOT( slotAwayCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("away"), TQT_SLOT( slotAwayCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /away [<reason>] - Marks you as away/back for the current account only." ) );
- registerCommand( this, TQString::tqfromLatin1("awayall"), TQT_SLOT( slotAwayAllCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("awayall"), TQT_SLOT( slotAwayAllCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /awayall [<reason>] - Marks you as away/back for all accounts." ) );
- registerCommand( this, TQString::tqfromLatin1("say"), TQT_SLOT( slotSayCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("say"), TQT_SLOT( slotSayCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /say <text> - Say text in this chat. This is the same as just typing a message, but is very "
"useful for scripts." ), 1 );
- registerCommand( this, TQString::tqfromLatin1("exec"), TQT_SLOT( slotExecCommand( const TQString &, Kopete::ChatSession * ) ),
+ registerCommand( this, TQString::fromLatin1("exec"), TQT_SLOT( slotExecCommand( const TQString &, Kopete::ChatSession * ) ),
i18n( "USAGE: /exec [-o] <command> - Executes the specified command and displays the output in the chat buffer. "
"If -o is specified, the output is sent to all members of the chat."), 1 );
@@ -192,7 +192,7 @@ bool Kopete::CommandHandler::processMessage( const TQString &msg, Kopete::ChatSe
{
if( p->inCommand )
return false;
- TQRegExp splitRx( TQString::tqfromLatin1("^/([\\S]+)(.*)") );
+ TQRegExp splitRx( TQString::fromLatin1("^/([\\S]+)(.*)") );
TQString command;
TQString args;
if(splitRx.search(msg) != -1)
@@ -275,18 +275,18 @@ void Kopete::CommandHandler::slotExecCommand( const TQString &args, Kopete::Chat
if( !args.isEmpty() )
{
KProcess *proc = 0L;
- if ( kapp->authorize( TQString::tqfromLatin1( "shell_access" ) ) )
+ if ( kapp->authorize( TQString::fromLatin1( "shell_access" ) ) )
proc = new KProcess(manager);
if( proc )
{
- *proc << TQString::tqfromLatin1("sh") << TQString::tqfromLatin1("-c");
+ *proc << TQString::fromLatin1("sh") << TQString::fromLatin1("-c");
TQStringList argsList = parseArguments( args );
- if( argsList.front() == TQString::tqfromLatin1("-o") )
+ if( argsList.front() == TQString::fromLatin1("-o") )
{
p->processMap.insert( proc, ManagerPair(manager, Kopete::Message::Outbound) );
- *proc << args.section(TQRegExp(TQString::tqfromLatin1("\\s+")), 1);
+ *proc << args.section(TQRegExp(TQString::fromLatin1("\\s+")), 1);
}
else
{
@@ -371,7 +371,7 @@ void Kopete::CommandHandler::slotExecFinished(KProcess *proc)
TQStringList Kopete::CommandHandler::parseArguments( const TQString &args )
{
TQStringList arguments;
- TQRegExp quotedArgs( TQString::tqfromLatin1("\"(.*)\"") );
+ TQRegExp quotedArgs( TQString::fromLatin1("\"(.*)\"") );
quotedArgs.setMinimal( true );
if ( quotedArgs.search( args ) != -1 )
@@ -380,7 +380,7 @@ TQStringList Kopete::CommandHandler::parseArguments( const TQString &args )
arguments.append( quotedArgs.cap(i) );
}
- TQStringList otherArgs = TQStringList::split( TQRegExp(TQString::tqfromLatin1("\\s+")), args.section( quotedArgs, 0 ) );
+ TQStringList otherArgs = TQStringList::split( TQRegExp(TQString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) );
for( TQStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it )
arguments.append( *it );