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/alias/aliasdialog.ui | 12 +++--- kopete/plugins/alias/aliasdialogbase.ui | 4 +- kopete/plugins/alias/aliasplugin.cpp | 4 +- kopete/plugins/alias/aliasplugin.h | 3 +- kopete/plugins/alias/aliaspreferences.cpp | 62 +++++++++++++++---------------- kopete/plugins/alias/aliaspreferences.h | 5 ++- kopete/plugins/alias/editaliasdialog.cpp | 6 +-- kopete/plugins/alias/editaliasdialog.h | 5 ++- 8 files changed, 52 insertions(+), 49 deletions(-) (limited to 'kopete/plugins/alias') diff --git a/kopete/plugins/alias/aliasdialog.ui b/kopete/plugins/alias/aliasdialog.ui index 1d980d52..b6a7a895 100644 --- a/kopete/plugins/alias/aliasdialog.ui +++ b/kopete/plugins/alias/aliasdialog.ui @@ -1,6 +1,6 @@ AliasDialog - + AliasDialog @@ -19,7 +19,7 @@ unnamed - + textLabel2 @@ -45,7 +45,7 @@ You can use the variables <b>%1, %2 ... %9</b> in your command, and Do not include the '/' in the command (if you do it will be stripped off anyway).</qt> - + textLabel1 @@ -126,7 +126,7 @@ Do not include the '/' in the command (if you do it will be stripped off anyway) If you want this alias to only be active for certain protocols, select those protocols here. - + textLabel4 @@ -136,7 +136,7 @@ Do not include the '/' in the command (if you do it will be stripped off anyway) For protocols: - + AlignTop @@ -182,7 +182,7 @@ Do not include the '/' in the command (if you do it will be stripped off anyway) addButton kPushButton3 - + klineedit.h klineedit.h diff --git a/kopete/plugins/alias/aliasdialogbase.ui b/kopete/plugins/alias/aliasdialogbase.ui index f70cc5bf..01e15f9e 100644 --- a/kopete/plugins/alias/aliasdialogbase.ui +++ b/kopete/plugins/alias/aliasdialogbase.ui @@ -1,6 +1,6 @@ AliasDialogBase - + AliasDialogBase @@ -97,7 +97,7 @@ - + klistview.h kpushbutton.h diff --git a/kopete/plugins/alias/aliasplugin.cpp b/kopete/plugins/alias/aliasplugin.cpp index 4824e2fb..4158e3cf 100644 --- a/kopete/plugins/alias/aliasplugin.cpp +++ b/kopete/plugins/alias/aliasplugin.cpp @@ -17,8 +17,8 @@ typedef KGenericFactory AliasPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_alias, AliasPluginFactory( "kopete_alias" ) ) AliasPlugin * AliasPlugin::pluginStatic_ = 0L; -AliasPlugin::AliasPlugin( TQObject *parent, const char * name, const TQStringList & ) - : Kopete::Plugin( AliasPluginFactory::instance(), parent, name ) +AliasPlugin::AliasPlugin( TQObject *tqparent, const char * name, const TQStringList & ) + : Kopete::Plugin( AliasPluginFactory::instance(), tqparent, name ) { if( !pluginStatic_ ) pluginStatic_ = this; diff --git a/kopete/plugins/alias/aliasplugin.h b/kopete/plugins/alias/aliasplugin.h index cf53c791..f961fac4 100644 --- a/kopete/plugins/alias/aliasplugin.h +++ b/kopete/plugins/alias/aliasplugin.h @@ -15,11 +15,12 @@ class AliasPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: static AliasPlugin *plugin(); - AliasPlugin( TQObject *parent, const char *name, const TQStringList &args ); + AliasPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~AliasPlugin(); private: diff --git a/kopete/plugins/alias/aliaspreferences.cpp b/kopete/plugins/alias/aliaspreferences.cpp index a331a592..330c8d5d 100644 --- a/kopete/plugins/alias/aliaspreferences.cpp +++ b/kopete/plugins/alias/aliaspreferences.cpp @@ -32,14 +32,14 @@ typedef KGenericFactory AliasPreferencesFactory; -class AliasItem : public QListViewItem +class AliasItem : public TQListViewItem { public: - AliasItem( TQListView *parent, + AliasItem( TQListView *tqparent, uint number, const TQString &alias, const TQString &command, const ProtocolList &p ) : - TQListViewItem( parent, alias, command ) + TQListViewItem( tqparent, alias, command ) { protocolList = p; id = number; @@ -75,13 +75,13 @@ class AliasItem : public QListViewItem if ( isSelected() && ( column == 0 || listView()->allColumnsShowFocus() ) ) { - p->fillRect( QMAX( cellWidth, r - marg ), 0, + p->fillRect( TQMAX( cellWidth, r - marg ), 0, width - cellWidth - r + marg, height(), cg.brush( TQColorGroup::Highlight ) ); if ( isEnabled() || !lv ) p->setPen( cg.highlightedText() ); else if ( !isEnabled() && lv ) - p->setPen( lv->palette().disabled().highlightedText() ); + p->setPen( lv->tqpalette().disabled().highlightedText() ); } // And last, draw the online status icons @@ -98,17 +98,17 @@ class AliasItem : public QListViewItem } else { - // Use Qt's own drawing + // Use TQt's own drawing TQListViewItem::paintCell( p, cg, column, width, align ); } } }; -class ProtocolItem : public QListViewItem +class ProtocolItem : public TQListViewItem { public: - ProtocolItem( TQListView *parent, KPluginInfo *p ) : - TQListViewItem( parent, p->name() ) + ProtocolItem( TQListView *tqparent, KPluginInfo *p ) : + TQListViewItem( tqparent, p->name() ) { this->setPixmap( 0, SmallIcon( p->icon() ) ); id = p->pluginName(); @@ -119,8 +119,8 @@ class ProtocolItem : public QListViewItem K_EXPORT_COMPONENT_FACTORY( kcm_kopete_alias, AliasPreferencesFactory( "kcm_kopete_alias" ) ) -AliasPreferences::AliasPreferences( TQWidget *parent, const char *, const TQStringList &args ) - : KCModule( AliasPreferencesFactory::instance(), parent, args ) +AliasPreferences::AliasPreferences( TQWidget *tqparent, const char *, const TQStringList &args ) + : KCModule( AliasPreferencesFactory::instance(), tqparent, args ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new AliasDialogBase( this ); @@ -204,14 +204,14 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) { if( *it2 == protocol->pluginId() ) { - QPair pr( protocol, *it ); - if( protocolMap.find( pr ) == protocolMap.end() ) + TQPair pr( protocol, *it ); + if( protocolMap.tqfind( pr ) == protocolMap.end() ) { Kopete::CommandHandler::commandHandler()->registerAlias( protocol, *it, aliasCommand, - TQString::fromLatin1("Custom alias for %1").arg(aliasCommand), + TQString::tqfromLatin1("Custom alias for %1").tqarg(aliasCommand), Kopete::CommandHandler::UserAlias ); @@ -221,7 +221,7 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) if( item ) { item->protocolList.append( protocol ); - item->repaint(); + item->tqrepaint(); } else { @@ -241,8 +241,8 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) void AliasPreferences::save() { KConfig *config = KGlobal::config(); - config->deleteGroup( TQString::fromLatin1("AliasPlugin") ); - config->setGroup( TQString::fromLatin1("AliasPlugin") ); + config->deleteGroup( TQString::tqfromLatin1("AliasPlugin") ); + config->setGroup( TQString::tqfromLatin1("AliasPlugin") ); TQStringList aliases; AliasItem *item = (AliasItem*)preferencesDialog->aliasList->firstChild(); @@ -271,11 +271,11 @@ void AliasPreferences::save() void AliasPreferences::addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id ) { - TQRegExp spaces( TQString::fromLatin1("\\s+") ); + TQRegExp spaces( TQString::tqfromLatin1("\\s+") ); - if( alias.startsWith( TQString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::tqfromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( command.startsWith( TQString::fromLatin1("/") ) ) + if( command.startsWith( TQString::tqfromLatin1("/") ) ) command = command.section( '/', 1 ); if( id == 0 ) @@ -309,13 +309,13 @@ void AliasPreferences::addAlias( TQString &alias, TQString &command, const Proto *it, alias, command, - TQString::fromLatin1("Custom alias for %1").arg(command), + TQString::tqfromLatin1("Custom alias for %1").tqarg(command), Kopete::CommandHandler::UserAlias, 0, argc ); - protocolMap.insert( QPair( *it, alias ), true ); + protocolMap.insert( TQPair( *it, alias ), true ); } } @@ -328,14 +328,14 @@ void AliasPreferences::slotAddAlias() if( addDialog.exec() == TQDialog::Accepted ) { TQString alias = addDialog.alias->text(); - if( alias.startsWith( TQString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::tqfromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( TQRegExp("[_=]") ) ) + if( alias.tqcontains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("Could not add alias %1. An" " alias name cannot contain the characters \"_\" or \"=\"." - "").arg(alias),i18n("Invalid Alias Name") ); + "").tqarg(alias),i18n("Invalid Alias Name") ); } else { @@ -353,7 +353,7 @@ void AliasPreferences::slotAddAlias() { KMessageBox::error( this, i18n("Could not add alias %1. This " "command is already being handled by either another alias or " - "Kopete itself.").arg(alias), i18n("Could Not Add Alias") ); + "Kopete itself.").tqarg(alias), i18n("Could Not Add Alias") ); return; } } @@ -418,13 +418,13 @@ void AliasPreferences::slotEditAlias() if( editDialog.exec() == TQDialog::Accepted ) { TQString alias = editDialog.alias->text(); - if( alias.startsWith( TQString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::tqfromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( TQRegExp("[_=]") ) ) + if( alias.tqcontains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("Could not add alias %1. An" " alias name cannot contain the characters \"_\" or \"=\"." - "").arg(alias),i18n("Invalid Alias Name") ); + "").tqarg(alias),i18n("Invalid Alias Name") ); } else { @@ -449,7 +449,7 @@ void AliasPreferences::slotEditAlias() { KMessageBox::error( this, i18n("Could not add alias %1. This " "command is already being handled by either another alias or " - "Kopete itself.").arg(alias), i18n("Could Not Add Alias") ); + "Kopete itself.").tqarg(alias), i18n("Could Not Add Alias") ); return; } } @@ -479,7 +479,7 @@ void AliasPreferences::slotDeleteAliases() i->text(0) ); - protocolMap.erase( QPair( *it, i->text(0) ) ); + protocolMap.erase( TQPair( *it, i->text(0) ) ); } aliasMap.erase( i->text(0) ); diff --git a/kopete/plugins/alias/aliaspreferences.h b/kopete/plugins/alias/aliaspreferences.h index 9ad25f38..99d6a479 100644 --- a/kopete/plugins/alias/aliaspreferences.h +++ b/kopete/plugins/alias/aliaspreferences.h @@ -24,9 +24,10 @@ namespace Kopete { class Plugin; } class AliasPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - AliasPreferences( TQWidget *parent = 0, const char *name = 0, + AliasPreferences( TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList() ); ~AliasPreferences(); @@ -46,7 +47,7 @@ class AliasPreferences : public KCModule void loadProtocols( EditAliasDialog *dialog ); const ProtocolList selectedProtocols( EditAliasDialog *dialog ); TQMap itemMap; - TQMap, bool> protocolMap; + TQMap, bool> protocolMap; TQMap aliasMap; }; diff --git a/kopete/plugins/alias/editaliasdialog.cpp b/kopete/plugins/alias/editaliasdialog.cpp index 6acdf153..1adeea03 100644 --- a/kopete/plugins/alias/editaliasdialog.cpp +++ b/kopete/plugins/alias/editaliasdialog.cpp @@ -24,8 +24,8 @@ #include -EditAliasDialog::EditAliasDialog( TQWidget* parent, const char* name ) -: AliasDialog( parent, name ) +EditAliasDialog::EditAliasDialog( TQWidget* tqparent, const char* name ) +: AliasDialog( tqparent, name ) { TQObject::connect( alias, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) ); TQObject::connect( command, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) ); @@ -48,4 +48,4 @@ void EditAliasDialog::checkButtonsEnabled() #include "editaliasdialog.moc" -// kate: space-indent off; replace-tabs off; tab-width 4; indent-mode csands; +// kate: space-indent off; tqreplace-tabs off; tab-width 4; indent-mode csands; diff --git a/kopete/plugins/alias/editaliasdialog.h b/kopete/plugins/alias/editaliasdialog.h index f5967368..7176904c 100644 --- a/kopete/plugins/alias/editaliasdialog.h +++ b/kopete/plugins/alias/editaliasdialog.h @@ -25,8 +25,9 @@ class TQWidget; class EditAliasDialog : public AliasDialog { Q_OBJECT + TQ_OBJECT public: - EditAliasDialog( TQWidget* parent = 0, const char* name = 0 ); + EditAliasDialog( TQWidget* tqparent = 0, const char* name = 0 ); virtual ~EditAliasDialog(); public slots: @@ -35,4 +36,4 @@ public slots: #endif -// kate: space-indent off; replace-tabs off; tab-width 4; indent-mode csands; +// kate: space-indent off; tqreplace-tabs off; tab-width 4; indent-mode csands; -- cgit v1.2.1