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 --- kopete/plugins/highlight/highlightconfig.cpp | 72 +++++++++++------------ kopete/plugins/highlight/highlightplugin.cpp | 10 ++-- kopete/plugins/highlight/highlightplugin.h | 3 +- kopete/plugins/highlight/highlightpreferences.cpp | 4 +- kopete/plugins/highlight/highlightpreferences.h | 3 +- kopete/plugins/highlight/highlightprefsbase.ui | 68 ++++++++++----------- 6 files changed, 81 insertions(+), 79 deletions(-) (limited to 'kopete/plugins/highlight') diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp index d6e04d7f..2cfab23b 100644 --- a/kopete/plugins/highlight/highlightconfig.cpp +++ b/kopete/plugins/highlight/highlightconfig.cpp @@ -78,11 +78,11 @@ void HighlightConfig::load() { m_filters.clear(); //clear filters - TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "highlight.xml" ) ); if( filename.isEmpty() ) return ; - TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) ); + TQDomDocument filterList( TQString::tqfromLatin1( "highlight-plugin" ) ); TQFile filterListFile( filename ); filterListFile.open( IO_ReadOnly ); @@ -96,7 +96,7 @@ void HighlightConfig::load() TQDomElement element = node.toElement(); if( !element.isNull() ) { -// if( element.tagName() == TQString::fromLatin1("filter") +// if( element.tagName() == TQString::tqfromLatin1("filter") // { Filter *filtre=newFilter(); TQDomNode filterNode = node.firstChild(); @@ -106,40 +106,40 @@ void HighlightConfig::load() TQDomElement filterElement = filterNode.toElement(); if( !filterElement.isNull() ) { - if( filterElement.tagName() == TQString::fromLatin1( "display-name" ) ) + if( filterElement.tagName() == TQString::tqfromLatin1( "display-name" ) ) { filtre->displayName = filterElement.text(); } - else if( filterElement.tagName() == TQString::fromLatin1( "search" ) ) + else if( filterElement.tagName() == TQString::tqfromLatin1( "search" ) ) { filtre->search = filterElement.text(); - filtre->caseSensitive= ( filterElement.attribute( TQString::fromLatin1( "caseSensitive" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ) ); - filtre->isRegExp= ( filterElement.attribute( TQString::fromLatin1( "regExp" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); + filtre->caseSensitive= ( filterElement.attribute( TQString::tqfromLatin1( "caseSensitive" ), TQString::tqfromLatin1( "1" ) ) == TQString::tqfromLatin1( "1" ) ); + filtre->isRegExp= ( filterElement.attribute( TQString::tqfromLatin1( "regExp" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) ); } - else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) ) + else if( filterElement.tagName() == TQString::tqfromLatin1( "FG" ) ) { filtre->FG = filterElement.text(); - filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); + filtre->setFG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) ); } - else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) ) + else if( filterElement.tagName() == TQString::tqfromLatin1( "BG" ) ) { filtre->BG = filterElement.text(); - filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); + filtre->setBG= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) ); } - else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) ) + else if( filterElement.tagName() == TQString::tqfromLatin1( "importance" ) ) { filtre->importance = filterElement.text().toUInt(); - filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); + filtre->setImportance= ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) ); } - else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) ) + else if( filterElement.tagName() == TQString::tqfromLatin1( "sound" ) ) { filtre->soundFN = filterElement.text(); - filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); + filtre->playSound = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) ); } - else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) ) + else if( filterElement.tagName() == TQString::tqfromLatin1( "raise" ) ) { - filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); + filtre->raiseView = ( filterElement.attribute( TQString::tqfromLatin1( "set" ), TQString::tqfromLatin1( "0" ) ) == TQString::tqfromLatin1( "1" ) ); } } filterNode = filterNode.nextSibling(); @@ -154,7 +154,7 @@ void HighlightConfig::load() void HighlightConfig::save() { - TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) ); + TQString fileName = locateLocal( "appdata", TQString::tqfromLatin1( "highlight.xml" ) ); KSaveFile file( fileName ); if( file.status() == 0 ) @@ -162,7 +162,7 @@ void HighlightConfig::save() TQTextStream *stream = file.textStream(); stream->setEncoding( TQTextStream::UnicodeUTF8 ); - TQString xml = TQString::fromLatin1( + TQString xml = TQString::tqfromLatin1( "\n" "\n" "\n" ); @@ -172,32 +172,32 @@ void HighlightConfig::save() for( ; filtreIt.current(); ++filtreIt ) { Filter *filtre = *filtreIt; - xml += TQString::fromLatin1( " \n " ) + xml += TQString::tqfromLatin1( " \n " ) + TQStyleSheet::escape(filtre->displayName) - + TQString::fromLatin1( "\n" ); + + TQString::tqfromLatin1( "\n" ); - xml += TQString::fromLatin1(" ( filtre->caseSensitive ) ) + - TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast( filtre->isRegExp ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "\n" ); + xml += TQString::tqfromLatin1(" ( filtre->caseSensitive ) ) + + TQString::tqfromLatin1("\" regExp=\"") + TQString::number( static_cast( filtre->isRegExp ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::tqfromLatin1( "\n" ); - xml += TQString::fromLatin1(" ( filtre->setBG ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "\n" ); - xml += TQString::fromLatin1(" ( filtre->setFG ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "\n" ); + xml += TQString::tqfromLatin1(" ( filtre->setBG ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::tqfromLatin1( "\n" ); + xml += TQString::tqfromLatin1(" ( filtre->setFG ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::tqfromLatin1( "\n" ); - xml += TQString::fromLatin1(" ( filtre->setImportance ) ) + - TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "\n" ); + xml += TQString::tqfromLatin1(" ( filtre->setImportance ) ) + + TQString::tqfromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::tqfromLatin1( "\n" ); - xml += TQString::fromLatin1(" ( filtre->playSound ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "\n" ); + xml += TQString::tqfromLatin1(" ( filtre->playSound ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::tqfromLatin1( "\n" ); - xml += TQString::fromLatin1(" ( filtre->raiseView ) ) + - TQString::fromLatin1( "\">\n" ); + xml += TQString::tqfromLatin1(" ( filtre->raiseView ) ) + + TQString::tqfromLatin1( "\">\n" ); - xml += TQString::fromLatin1( " \n" ); + xml += TQString::tqfromLatin1( " \n" ); } - xml += TQString::fromLatin1( "\n" ); + xml += TQString::tqfromLatin1( "\n" ); *stream << xml; } diff --git a/kopete/plugins/highlight/highlightplugin.cpp b/kopete/plugins/highlight/highlightplugin.cpp index 7ec6ba5e..843d7ed5 100644 --- a/kopete/plugins/highlight/highlightplugin.cpp +++ b/kopete/plugins/highlight/highlightplugin.cpp @@ -29,8 +29,8 @@ typedef KGenericFactory HighlightPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_highlight, HighlightPluginFactory( "kopete_highlight" ) ) -HighlightPlugin::HighlightPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) -: Kopete::Plugin( HighlightPluginFactory::instance(), parent, name ) +HighlightPlugin::HighlightPlugin( TQObject *tqparent, const char *name, const TQStringList &/*args*/ ) +: Kopete::Plugin( HighlightPluginFactory::instance(), tqparent, name ) { if( !pluginStatic_ ) pluginStatic_=this; @@ -70,8 +70,8 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg ) { ++it; if(f->isRegExp ? - msg.plainBody().contains(TQRegExp(f->search , f->caseSensitive)) : - msg.plainBody().contains(f->search , f->caseSensitive) ) + msg.plainBody().tqcontains(TQRegExp(f->search , f->caseSensitive)) : + msg.plainBody().tqcontains(f->search , f->caseSensitive) ) { if(f->setBG) msg.setBg(f->BG); @@ -80,7 +80,7 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg ) if(f->setImportance) msg.setImportance((Kopete::Message::MessageImportance)f->importance); if(f->playSound) - KNotifyClient::userEvent (TQString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN ); + KNotifyClient::userEvent (TQString(), KNotifyClient::Sound, KNotifyClient::Default, f->soundFN ); if (f->raiseView && msg.manager() && msg.manager()->view()) { diff --git a/kopete/plugins/highlight/highlightplugin.h b/kopete/plugins/highlight/highlightplugin.h index f5b0f671..866e69d1 100644 --- a/kopete/plugins/highlight/highlightplugin.h +++ b/kopete/plugins/highlight/highlightplugin.h @@ -43,11 +43,12 @@ class Filter; class HighlightPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: static HighlightPlugin *plugin(); - HighlightPlugin( TQObject *parent, const char *name, const TQStringList &args ); + HighlightPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~HighlightPlugin(); public slots: diff --git a/kopete/plugins/highlight/highlightpreferences.cpp b/kopete/plugins/highlight/highlightpreferences.cpp index 5e8da39c..128ed822 100644 --- a/kopete/plugins/highlight/highlightpreferences.cpp +++ b/kopete/plugins/highlight/highlightpreferences.cpp @@ -39,8 +39,8 @@ typedef KGenericFactory HighlightPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_highlight, HighlightPreferencesFactory( "kcm_kopete_highlight" ) ) -HighlightPreferences::HighlightPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCModule(HighlightPreferencesFactory::instance(), parent, args) +HighlightPreferences::HighlightPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCModule(HighlightPreferencesFactory::instance(), tqparent, args) { donttouch=true; ( new TQVBoxLayout( this ) )->setAutoAdd( true ); diff --git a/kopete/plugins/highlight/highlightpreferences.h b/kopete/plugins/highlight/highlightpreferences.h index ff51aa1f..8d7d8242 100644 --- a/kopete/plugins/highlight/highlightpreferences.h +++ b/kopete/plugins/highlight/highlightpreferences.h @@ -31,9 +31,10 @@ class TQListViewItem; class HighlightPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - HighlightPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + HighlightPreferences(TQWidget *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~HighlightPreferences(); virtual void save(); diff --git a/kopete/plugins/highlight/highlightprefsbase.ui b/kopete/plugins/highlight/highlightprefsbase.ui index b8150c56..2d853f0e 100644 --- a/kopete/plugins/highlight/highlightprefsbase.ui +++ b/kopete/plugins/highlight/highlightprefsbase.ui @@ -1,7 +1,7 @@ HighlightPrefsUI Olivier Goffart - + HighlighPrefsUI @@ -20,7 +20,7 @@ unnamed - + groupBox1 @@ -39,7 +39,7 @@ unnamed - + m_add @@ -47,7 +47,7 @@ Add - + m_remove @@ -58,7 +58,7 @@ Remove - + m_rename @@ -95,7 +95,7 @@ - + groupBox2 @@ -114,7 +114,7 @@ unnamed - + textLabel1 @@ -127,7 +127,7 @@ - If the message contains: + If the message tqcontains: @@ -135,15 +135,15 @@ m_search - + - layout3 + tqlayout3 unnamed - + m_regexp @@ -151,7 +151,7 @@ Regular expression - + m_editregexp @@ -177,7 +177,7 @@ Expanding - + 20 20 @@ -186,7 +186,7 @@ - + m_case @@ -196,7 +196,7 @@ - + buttonGroup2 @@ -215,15 +215,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + m_setImportance @@ -277,7 +277,7 @@ Expanding - + 31 21 @@ -286,15 +286,15 @@ - + - layout5 + tqlayout5 unnamed - + m_setBG @@ -328,7 +328,7 @@ Expanding - + 31 21 @@ -337,15 +337,15 @@ - + - layout6 + tqlayout6 unnamed - + m_setFG @@ -379,7 +379,7 @@ Expanding - + 41 21 @@ -388,15 +388,15 @@ - + - layout7 + tqlayout7 unnamed - + m_sound @@ -411,15 +411,15 @@ - + - layout8 + tqlayout8 unnamed - + m_raise @@ -452,7 +452,7 @@ m_soundFN m_raise - + klistview.h klineedit.h -- cgit v1.2.1