diff options
Diffstat (limited to 'kopete/plugins')
155 files changed, 1122 insertions, 1068 deletions
diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp index 113ec95e..b8f32bcf 100644 --- a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp +++ b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp @@ -39,8 +39,8 @@ static bool isURLInGroup(const KURL& url, const KBookmarkGroup& group) return false; } -BookmarksPlugin::BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &/*args*/) - : Kopete::Plugin(BookmarksPluginFactory::instance(), parent, name) +BookmarksPlugin::BookmarksPlugin(TQObject *tqparent, const char *name, const TQStringList &/*args*/) + : Kopete::Plugin(BookmarksPluginFactory::instance(), tqparent, name) { //kdDebug(14501) << "plugin loading" << endl; connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, TQT_SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) ); @@ -144,7 +144,7 @@ KBookmarkGroup BookmarksPlugin::getKopeteFolder() { KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager(); - return getFolder( mgr->root(), TQString::fromLatin1("kopete") ); + return getFolder( mgr->root(), TQString::tqfromLatin1("kopete") ); } KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const TQString& folder ) @@ -165,7 +165,7 @@ KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const TQString& TQTextCodec* BookmarksPlugin::getPageEncoding( const TQByteArray& data ) { - TQString temp = TQString::fromLatin1(data); + TQString temp = TQString::tqfromLatin1(data); TQRegExp rx("<meta[^>]*(charset|CHARSET)\\s*=\\s*[^>]*>"); int pos = rx.search( temp ); TQTextCodec *codec; @@ -176,7 +176,7 @@ TQTextCodec* BookmarksPlugin::getPageEncoding( const TQByteArray& data ) } //kdDebug(14501) << temp.mid(pos, rx.matchedLength()) << endl; temp = temp.mid(pos, rx.matchedLength()-1); - temp = temp.mid( temp.find("charset", 0, false)+7); + temp = temp.mid( temp.tqfind("charset", 0, false)+7); temp = temp.remove('=').simplifyWhiteSpace(); for( pos = 0 ; temp[pos].isLetterOrNumber() || temp[pos] == '-' ; pos++ ); temp = temp.left( pos ); diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.h b/kopete/plugins/addbookmarks/addbookmarksplugin.h index 459c1b8b..404fe994 100644 --- a/kopete/plugins/addbookmarks/addbookmarksplugin.h +++ b/kopete/plugins/addbookmarks/addbookmarksplugin.h @@ -27,8 +27,9 @@ class BookmarksPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: - BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &args); + BookmarksPlugin(TQObject *tqparent, const char *name, const TQStringList &args); private: typedef struct S_URLANDNAME{ diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp index 69b7fc1b..2c8f440f 100644 --- a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp +++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp @@ -26,8 +26,8 @@ typedef KGenericFactory<BookmarksPreferences> BookmarksPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_addbookmarks, BookmarksPreferencesFactory("kcm_kopete_addbookmarks") ) -BookmarksPreferences::BookmarksPreferences(TQWidget *parent, const char *name, const TQStringList &args) - : KCModule(BookmarksPreferencesFactory::instance(), parent, args) +BookmarksPreferences::BookmarksPreferences(TQWidget *tqparent, const char *name, const TQStringList &args) + : KCModule(BookmarksPreferencesFactory::instance(), tqparent, args) { Q_UNUSED( name ); ( new TQVBoxLayout (this) )->setAutoAdd( true ); @@ -104,7 +104,7 @@ void BookmarksPreferences::load() m_settings.isFolderForEachContact() == BookmarksPrefsSettings::UnselectedContacts ); list = m_settings.getContactsList(); for( it = list.begin() ; it != list.end() ; ++it){ - if ( ( item = p_dialog->contactList->findItem(*it, Qt::ExactMatch ) ) ){ + if ( ( item = p_dialog->contactList->tqfindItem(*it, TQt::ExactMatch ) ) ){ p_dialog->contactList->setSelected( item, true ); } } diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.h b/kopete/plugins/addbookmarks/addbookmarkspreferences.h index 30c94b70..2702de8a 100644 --- a/kopete/plugins/addbookmarks/addbookmarkspreferences.h +++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.h @@ -22,8 +22,9 @@ class BookmarksPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - BookmarksPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); + BookmarksPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList()); ~BookmarksPreferences(); diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp index 34d921c3..55a89d30 100644 --- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp +++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp @@ -15,8 +15,8 @@ #include "addbookmarksprefssettings.h" -BookmarksPrefsSettings::BookmarksPrefsSettings(TQObject *parent, const char *name) - : TQObject(parent, name) +BookmarksPrefsSettings::BookmarksPrefsSettings(TQObject *tqparent, const char *name) + : TQObject(tqparent, name) { load(); } @@ -71,9 +71,9 @@ bool BookmarksPrefsSettings::useSubfolderForContact( TQString nickname ) case Always: return true; case SelectedContacts: - return ( m_contactslist.find( nickname ) != m_contactslist.end() ); + return ( m_contactslist.tqfind( nickname ) != m_contactslist.end() ); case UnselectedContacts: - return ( m_contactslist.find( nickname ) == m_contactslist.end() ); + return ( m_contactslist.tqfind( nickname ) == m_contactslist.end() ); } } return false; diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h index 659f3c69..d4bd4c0b 100644 --- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h +++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h @@ -18,13 +18,14 @@ /** @author Roie Kerstein <sf_kersteinroie@bezeqint.net> */ -class BookmarksPrefsSettings : public QObject +class BookmarksPrefsSettings : public TQObject { Q_OBJECT + TQ_OBJECT public: enum UseSubfolders { Always=0, Never=1, SelectedContacts=2, UnselectedContacts=3 }; - BookmarksPrefsSettings(TQObject *parent = 0, const char *name = 0); + BookmarksPrefsSettings(TQObject *tqparent = 0, const char *name = 0); ~BookmarksPrefsSettings(); diff --git a/kopete/plugins/addbookmarks/addbookmarksprefsui.ui b/kopete/plugins/addbookmarks/addbookmarksprefsui.ui index 67be2b9e..20102dc5 100644 --- a/kopete/plugins/addbookmarks/addbookmarksprefsui.ui +++ b/kopete/plugins/addbookmarks/addbookmarksprefsui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>BookmarksPrefsUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>BookmarksPrefsUI</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>yesButton</cstring> </property> @@ -41,7 +41,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>noButton</cstring> </property> @@ -55,7 +55,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>onlySelectedButton</cstring> </property> @@ -72,7 +72,7 @@ <number>2</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>onlyNotSelectedButton</cstring> </property> @@ -85,12 +85,12 @@ </widget> </vbox> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>contactList</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_addUntrusted</cstring> </property> @@ -100,5 +100,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> 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 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AliasDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>AliasDialog</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -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></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -126,7 +126,7 @@ Do not include the '/' in the command (if you do it will be stripped off anyway) <string>If you want this alias to only be active for certain protocols, select those protocols here.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -136,7 +136,7 @@ Do not include the '/' in the command (if you do it will be stripped off anyway) <property name="text"> <string>For protocols:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <property name="buddy" stdset="0"> @@ -182,7 +182,7 @@ Do not include the '/' in the command (if you do it will be stripped off anyway) <tabstop>addButton</tabstop> <tabstop>kPushButton3</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> 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 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>AliasDialogBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AliasDialogBase</cstring> </property> @@ -97,7 +97,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> 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<AliasPlugin> 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<AliasPreferences> 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<Kopete::Protocol*, TQString> pr( protocol, *it ); - if( protocolMap.find( pr ) == protocolMap.end() ) + TQPair<Kopete::Protocol*, TQString> 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<Kopete::Protocol*,TQString>( *it, alias ), true ); + protocolMap.insert( TQPair<Kopete::Protocol*,TQString>( *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("<qt>Could not add alias <b>%1</b>. An" " alias name cannot contain the characters \"_\" or \"=\"." - "</qt>").arg(alias),i18n("Invalid Alias Name") ); + "</qt>").tqarg(alias),i18n("Invalid Alias Name") ); } else { @@ -353,7 +353,7 @@ void AliasPreferences::slotAddAlias() { KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. This " "command is already being handled by either another alias or " - "Kopete itself.</qt>").arg(alias), i18n("Could Not Add Alias") ); + "Kopete itself.</qt>").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("<qt>Could not add alias <b>%1</b>. An" " alias name cannot contain the characters \"_\" or \"=\"." - "</qt>").arg(alias),i18n("Invalid Alias Name") ); + "</qt>").tqarg(alias),i18n("Invalid Alias Name") ); } else { @@ -449,7 +449,7 @@ void AliasPreferences::slotEditAlias() { KMessageBox::error( this, i18n("<qt>Could not add alias <b>%1</b>. This " "command is already being handled by either another alias or " - "Kopete itself.</qt>").arg(alias), i18n("Could Not Add Alias") ); + "Kopete itself.</qt>").tqarg(alias), i18n("Could Not Add Alias") ); return; } } @@ -479,7 +479,7 @@ void AliasPreferences::slotDeleteAliases() i->text(0) ); - protocolMap.erase( QPair<Kopete::Protocol*,TQString>( *it, i->text(0) ) ); + protocolMap.erase( TQPair<Kopete::Protocol*,TQString>( *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<Kopete::Protocol*,ProtocolItem*> itemMap; - TQMap<QPair<Kopete::Protocol*,TQString>, bool> protocolMap; + TQMap<TQPair<Kopete::Protocol*,TQString>, bool> protocolMap; TQMap<TQString,AliasItem*> 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 <klistview.h> -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; diff --git a/kopete/plugins/autoreplace/autoreplaceconfig.cpp b/kopete/plugins/autoreplace/autoreplaceconfig.cpp index 2537f44a..09ef9d05 100644 --- a/kopete/plugins/autoreplace/autoreplaceconfig.cpp +++ b/kopete/plugins/autoreplace/autoreplaceconfig.cpp @@ -63,7 +63,7 @@ void AutoReplaceConfig::load() TQStringList AutoReplaceConfig::defaultAutoReplaceList() { - return TQStringList::split( ",", i18n( "list_of_words_to_replace", + return TQStringList::split( ",", i18n( "list_of_words_to_tqreplace", "ur,your,r,are,u,you,theres,there is,arent,are not,dont,do not" ) ); } diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.cpp b/kopete/plugins/autoreplace/autoreplaceplugin.cpp index f3610a7f..62060ef3 100644 --- a/kopete/plugins/autoreplace/autoreplaceplugin.cpp +++ b/kopete/plugins/autoreplace/autoreplaceplugin.cpp @@ -26,11 +26,11 @@ #include "autoreplaceconfig.h" typedef KGenericFactory<AutoReplacePlugin> AutoReplacePluginFactory; -K_EXPORT_COMPONENT_FACTORY( kopete_autoreplace, AutoReplacePluginFactory( "kopete_autoreplace" ) ) +K_EXPORT_COMPONENT_FACTORY( kopete_autotqreplace, AutoReplacePluginFactory( "kopete_autotqreplace" ) ) AutoReplacePlugin * AutoReplacePlugin::pluginStatic_ = 0L; -AutoReplacePlugin::AutoReplacePlugin( TQObject *parent, const char * name, const TQStringList & ) -: Kopete::Plugin( AutoReplacePluginFactory::instance(), parent, name ) +AutoReplacePlugin::AutoReplacePlugin( TQObject *tqparent, const char * name, const TQStringList & ) +: Kopete::Plugin( AutoReplacePluginFactory::instance(), tqparent, name ) { if( !pluginStatic_ ) pluginStatic_ = this; @@ -81,12 +81,12 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) bool isReplaced=false; for ( it = map.begin(); it != map.end(); ++it ) { - TQRegExp re( match.arg( TQRegExp::escape( it.key() ) ) ); + TQRegExp re( match.tqarg( TQRegExp::escape( it.key() ) ) ); if( re.search( replaced_message ) != -1 ) { TQString before = re.cap(1); TQString after = re.cap(3); - replaced_message.replace( re, before + map.find( it.key() ).data() + after ); + replaced_message.tqreplace( re, before + map.tqfind( it.key() ).data() + after ); isReplaced=true; } } @@ -101,8 +101,8 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) { TQString replaced_message = msg.plainBody(); // eventually add . at the end of the lines, sent lines only - replaced_message.replace( TQRegExp( "([a-z])$" ), "\\1." ); - // replaced_message.replace(TQRegExp( "([\\w])$" ), "\\1." ); + replaced_message.tqreplace( TQRegExp( "([a-z])$" ), "\\1." ); + // replaced_message.tqreplace(TQRegExp( "([\\w])$" ), "\\1." ); // the message is now the one with replaced words msg.setBody( replaced_message, Kopete::Message::PlainText ); @@ -113,7 +113,7 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) TQString replaced_message = msg.plainBody(); // eventually start each sent line with capital letter // TODO ". " "? " "! " - replaced_message[ 0 ] = replaced_message.at( 0 ).upper(); + replaced_message[ 0 ] = replaced_message.tqat( 0 ).upper(); // the message is now the one with replaced words msg.setBody( replaced_message, Kopete::Message::PlainText ); diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.h b/kopete/plugins/autoreplace/autoreplaceplugin.h index 7d9bcedf..de306a4b 100644 --- a/kopete/plugins/autoreplace/autoreplaceplugin.h +++ b/kopete/plugins/autoreplace/autoreplaceplugin.h @@ -38,11 +38,12 @@ class AutoReplaceConfig; class AutoReplacePlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: static AutoReplacePlugin *plugin(); - AutoReplacePlugin( TQObject *parent, const char *name, const TQStringList &args ); + AutoReplacePlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~AutoReplacePlugin(); private slots: diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.cpp b/kopete/plugins/autoreplace/autoreplacepreferences.cpp index 4f852610..628cb679 100644 --- a/kopete/plugins/autoreplace/autoreplacepreferences.cpp +++ b/kopete/plugins/autoreplace/autoreplacepreferences.cpp @@ -34,10 +34,10 @@ typedef KGenericFactory<AutoReplacePreferences> AutoReplacePreferencesFactory; -K_EXPORT_COMPONENT_FACTORY( kcm_kopete_autoreplace, AutoReplacePreferencesFactory( "kcm_kopete_autoreplace" ) ) +K_EXPORT_COMPONENT_FACTORY( kcm_kopete_autotqreplace, AutoReplacePreferencesFactory( "kcm_kopete_autotqreplace" ) ) -AutoReplacePreferences::AutoReplacePreferences( TQWidget *parent, const char * /* name */, const TQStringList &args ) -: KCAutoConfigModule( AutoReplacePreferencesFactory::instance(), parent, args ) +AutoReplacePreferences::AutoReplacePreferences( TQWidget *tqparent, const char * /* name */, const TQStringList &args ) +: KCAutoConfigModule( AutoReplacePreferencesFactory::instance(), tqparent, args ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new AutoReplacePrefsUI( this ); @@ -113,7 +113,7 @@ void AutoReplacePreferences::save() KCAutoConfigModule::save(); } -// read m_key m_value, create a QListViewItem +// read m_key m_value, create a TQListViewItem void AutoReplacePreferences::slotAddCouple() { TQString k = preferencesDialog->m_key->text(); @@ -123,10 +123,10 @@ void AutoReplacePreferences::slotAddCouple() TQListViewItem * lvi; TQListViewItem * oldLvi = 0; // see if we are replacing an existing entry - if ( ( oldLvi = preferencesDialog->m_list->findItem( k, 0 ) ) ) + if ( ( oldLvi = preferencesDialog->m_list->tqfindItem( k, 0 ) ) ) delete oldLvi; lvi = new TQListViewItem( preferencesDialog->m_list, k, v ); - // Triggers a size, geometry and content update + // Triggers a size, tqgeometry and content update // during the next iteration of the event loop preferencesDialog->m_list->triggerUpdate(); // select last added diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.h b/kopete/plugins/autoreplace/autoreplacepreferences.h index 00638bfa..72e0b548 100644 --- a/kopete/plugins/autoreplace/autoreplacepreferences.h +++ b/kopete/plugins/autoreplace/autoreplacepreferences.h @@ -32,9 +32,10 @@ class AutoReplaceConfig; class AutoReplacePreferences : public KCAutoConfigModule { Q_OBJECT + TQ_OBJECT public: - AutoReplacePreferences( TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList() ); + AutoReplacePreferences( TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList() ); ~AutoReplacePreferences(); virtual void save(); diff --git a/kopete/plugins/autoreplace/autoreplaceprefs.ui b/kopete/plugins/autoreplace/autoreplaceprefs.ui index 09db8e9d..f7cb8c55 100644 --- a/kopete/plugins/autoreplace/autoreplaceprefs.ui +++ b/kopete/plugins/autoreplace/autoreplaceprefs.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AutoReplacePrefsUI</class> <author>Roberto Pariset</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AutoReplacePrefsUI</cstring> </property> @@ -17,7 +17,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>gb_sentences</cstring> </property> @@ -28,7 +28,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>DotEndSentence</cstring> </property> @@ -36,7 +36,7 @@ <string>Add a dot at the end of each sent line</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>CapitalizeBeginningSentence</cstring> </property> @@ -46,7 +46,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>gb_options</cstring> </property> @@ -57,7 +57,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>AutoReplaceIncoming</cstring> </property> @@ -65,7 +65,7 @@ <string>Auto replace on incoming messages</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>AutoReplaceOutgoing</cstring> </property> @@ -78,7 +78,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>replacementsGroup</cstring> </property> @@ -89,15 +89,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="1" column="1" rowspan="2" colspan="1"> + <widget class="TQLayoutWidget" row="1" column="1" rowspan="2" colspan="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_add</cstring> </property> @@ -111,7 +111,7 @@ <bool>false</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_edit</cstring> </property> @@ -135,14 +135,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_remove</cstring> </property> @@ -155,15 +155,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -174,12 +174,12 @@ <cstring>m_key</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_key</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -190,14 +190,14 @@ <cstring>m_value</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_value</cstring> </property> </widget> </hbox> </widget> - <widget class="QListView" row="2" column="0"> + <widget class="TQListView" row="2" column="0"> <property name="name"> <cstring>m_list</cstring> </property> @@ -215,5 +215,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp index 33f4e3dd..a35a4cf4 100644 --- a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp +++ b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp @@ -28,15 +28,15 @@ typedef KGenericFactory<ConnectionStatusPlugin> ConnectionStatusPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_connectionstatus, ConnectionStatusPluginFactory( "kopete_connectionstatus" ) ) -ConnectionStatusPlugin::ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList& /* args */ ) -: Kopete::Plugin( ConnectionStatusPluginFactory::instance(), parent, name ) +ConnectionStatusPlugin::ConnectionStatusPlugin( TQObject *tqparent, const char *name, const TQStringList& /* args */ ) +: Kopete::Plugin( ConnectionStatusPluginFactory::instance(), tqparent, name ) { kdDebug( 14301 ) << k_funcinfo << endl; m_process = 0L; m_timer = new TQTimer(); - connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotCheckStatus() ) ); + connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotChecktqStatus() ) ); m_timer->start( 60000 ); m_pluginConnected = false; @@ -49,7 +49,7 @@ ConnectionStatusPlugin::~ConnectionStatusPlugin() delete m_process; } -void ConnectionStatusPlugin::slotCheckStatus() +void ConnectionStatusPlugin::slotChecktqStatus() { kdDebug( 14301 ) << k_funcinfo << endl; @@ -61,7 +61,7 @@ void ConnectionStatusPlugin::slotCheckStatus() return; } - m_buffer = TQString::null; + m_buffer = TQString(); // Use KProcess to run netstat -rn. We'll then parse the output of // netstat -rn in slotProcessStdout() to see if it mentions the @@ -87,8 +87,8 @@ void ConnectionStatusPlugin::slotProcessExited( KProcess *process ) if ( process == m_process ) { - setConnectedStatus( m_buffer.contains( "default" ) ); - m_buffer = TQString::null; + setConnectedtqStatus( m_buffer.tqcontains( "default" ) ); + m_buffer = TQString(); delete m_process; m_process = 0L; } @@ -98,11 +98,11 @@ void ConnectionStatusPlugin::slotProcessStdout( KProcess *, char *buffer, int bu { // Look for a default gateway //kdDebug( 14301 ) << k_funcinfo << endl; - m_buffer += TQString::fromLatin1( buffer, buflen ); + m_buffer += TQString::tqfromLatin1( buffer, buflen ); //kdDebug( 14301 ) << qsBuffer << endl; } -void ConnectionStatusPlugin::setConnectedStatus( bool connected ) +void ConnectionStatusPlugin::setConnectedtqStatus( bool connected ) { //kdDebug( 14301 ) << k_funcinfo << endl; diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.h b/kopete/plugins/connectionstatus/connectionstatusplugin.h index 56f662ab..50148b0a 100644 --- a/kopete/plugins/connectionstatus/connectionstatusplugin.h +++ b/kopete/plugins/connectionstatus/connectionstatusplugin.h @@ -29,13 +29,14 @@ class KProcess; class ConnectionStatusPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: - ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList &args ); + ConnectionStatusPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~ConnectionStatusPlugin(); private slots: - void slotCheckStatus(); + void slotChecktqStatus(); void slotProcessStdout( KProcess *process, char *buffer, int len ); /** @@ -44,7 +45,7 @@ private slots: void slotProcessExited( KProcess *process ); private: - void setConnectedStatus( bool newStatus ); + void setConnectedtqStatus( bool newtqStatus ); bool m_pluginConnected; KProcess *m_process; diff --git a/kopete/plugins/contactnotes/contactnotesedit.cpp b/kopete/plugins/contactnotes/contactnotesedit.cpp index 782476b9..607c0f17 100644 --- a/kopete/plugins/contactnotes/contactnotesedit.cpp +++ b/kopete/plugins/contactnotes/contactnotesedit.cpp @@ -33,7 +33,7 @@ ContactNotesEdit::ContactNotesEdit(Kopete::MetaContact *m,ContactNotesPlugin *p, TQVBox *w=new TQVBox(this); w->setSpacing(KDialog::spacingHint()); - m_label = new TQLabel(i18n("Notes about %1:").arg(m->displayName()) , w , "m_label"); + m_label = new TQLabel(i18n("Notes about %1:").tqarg(m->displayName()) , w , "m_label"); m_linesEdit= new TQTextEdit ( w , "m_linesEdit"); m_linesEdit->setText(p->notes(m)); diff --git a/kopete/plugins/contactnotes/contactnotesedit.h b/kopete/plugins/contactnotes/contactnotesedit.h index a027b1a8..81b9b71e 100644 --- a/kopete/plugins/contactnotes/contactnotesedit.h +++ b/kopete/plugins/contactnotes/contactnotesedit.h @@ -33,6 +33,7 @@ class ContactNotesPlugin; class ContactNotesEdit : public KDialogBase { Q_OBJECT + TQ_OBJECT public: ContactNotesEdit(Kopete::MetaContact *m,ContactNotesPlugin *p=0 ,const char *name=0); ~ContactNotesEdit(); diff --git a/kopete/plugins/contactnotes/contactnotesplugin.cpp b/kopete/plugins/contactnotes/contactnotesplugin.cpp index ce67e663..aaa4ee7a 100644 --- a/kopete/plugins/contactnotes/contactnotesplugin.cpp +++ b/kopete/plugins/contactnotes/contactnotesplugin.cpp @@ -29,8 +29,8 @@ typedef KGenericFactory<ContactNotesPlugin> ContactNotesPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_contactnotes, ContactNotesPluginFactory( "kopete_contactnotes" ) ) -ContactNotesPlugin::ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( ContactNotesPluginFactory::instance(), parent, name ) +ContactNotesPlugin::ContactNotesPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( ContactNotesPluginFactory::instance(), tqparent, name ) { if ( pluginStatic_ ) kdDebug(14302)<<"ContactNotesPlugin::ContactNotesPlugin : plugin already initialized"<<endl; diff --git a/kopete/plugins/contactnotes/contactnotesplugin.h b/kopete/plugins/contactnotes/contactnotesplugin.h index 3163d47b..1adadd96 100644 --- a/kopete/plugins/contactnotes/contactnotesplugin.h +++ b/kopete/plugins/contactnotes/contactnotesplugin.h @@ -40,11 +40,12 @@ namespace Kopete { class MetaContact; } class ContactNotesPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: static ContactNotesPlugin *plugin(); - ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList &args ); + ContactNotesPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~ContactNotesPlugin(); TQString notes(Kopete::MetaContact *m); diff --git a/kopete/plugins/cryptography/cryptographyguiclient.cpp b/kopete/plugins/cryptography/cryptographyguiclient.cpp index 898e7f1a..fecb025e 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.cpp +++ b/kopete/plugins/cryptography/cryptographyguiclient.cpp @@ -27,16 +27,16 @@ class CryptographyPlugin; -CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) - : TQObject(parent) , KXMLGUIClient(parent) +CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *tqparent ) + : TQObject(tqparent) , KXMLGUIClient(tqparent) { - if(!parent || parent->members().isEmpty()) + if(!tqparent || tqparent->members().isEmpty()) { deleteLater(); //we refuse to build this client, it is based on wrong parametters return; } - TQPtrList<Kopete::Contact> mb=parent->members(); + TQPtrList<Kopete::Contact> mb=tqparent->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) @@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) setInstance( KGenericFactory<CryptographyPlugin>::instance() ); - m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::fromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" ); - m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::fromLatin1("off") ) ; + m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::tqfromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" ); + m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::tqfromLatin1("off") ) ; setXMLFile("cryptographychatui.rc"); } @@ -60,7 +60,7 @@ CryptographyGUIClient::~CryptographyGUIClient() void CryptographyGUIClient::slotToggled() { - TQPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(parent())->members(); + TQPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(tqparent())->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) diff --git a/kopete/plugins/cryptography/cryptographyguiclient.h b/kopete/plugins/cryptography/cryptographyguiclient.h index 7f3d8c4f..5b8b22ed 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.h +++ b/kopete/plugins/cryptography/cryptographyguiclient.h @@ -27,8 +27,9 @@ class KToggleAction; class CryptographyGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - CryptographyGUIClient(Kopete::ChatSession *parent = 0); + CryptographyGUIClient(Kopete::ChatSession *tqparent = 0); ~CryptographyGUIClient(); private: diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp index 4e2e9686..bd1ce0dc 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.cpp +++ b/kopete/plugins/cryptography/cryptographyplugin.cpp @@ -45,14 +45,14 @@ //In Jabber, the JEP says it's not. so we don't use richtext in our message, but some client did. //We limit the html to some basis tag to limit security problem (bad links) // - Olivier -const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false ); +const TQRegExp CryptographyPlugin::isHTML( TQString::tqfromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false ); typedef KGenericFactory<CryptographyPlugin> CryptographyPluginFactory; static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) ) -CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ), +CryptographyPlugin::CryptographyPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( CryptographyPluginFactory::instance(), tqparent, name ), m_cachedPass() { if( !pluginStatic_ ) @@ -154,14 +154,14 @@ bool CryptographyPlugin::passphraseHandling() void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) { TQString body = msg.plainBody(); - if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") ) - || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) ) + if( !body.startsWith( TQString::tqfromLatin1("-----BEGIN PGP MESSAGE----") ) + || !body.tqcontains( TQString::tqfromLatin1("-----END PGP MESSAGE----") ) ) return; if( msg.direction() != Kopete::Message::Inbound ) { TQString plainBody; - if ( m_cachedMessages.contains( body ) ) + if ( m_cachedMessages.tqcontains( body ) ) { plainBody = m_cachedMessages[ body ]; m_cachedMessages.remove( body ); @@ -179,16 +179,16 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) plainBody = TQStyleSheet::escape( plainBody ); //this is the same algoritm as in Kopete::Message::escapedBody(); - plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br/>" ) ) - .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( " " ) ) - .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); + plainBody.tqreplace( TQString::tqfromLatin1( "\n" ), TQString::tqfromLatin1( "<br/>" ) ) + .tqreplace( TQString::tqfromLatin1( "\t" ), TQString::tqfromLatin1( " " ) ) + .tqreplace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( " " ) ); } - msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>") + msg.setBody( TQString::tqfromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>") + i18n("Outgoing Encrypted Message: ") - + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">") + + TQString::tqfromLatin1("</b></font></td></tr><tr><td class=\"highlight\">") + plainBody - + TQString::fromLatin1(" </td></tr></table>") + + TQString::tqfromLatin1(" </td></tr></table>") , Kopete::Message::RichText ); } @@ -202,7 +202,7 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) //the Message::unescape is there because client like fire replace linebreak by <BR> to work even if the protocol doesn't allow newlines (IRC) // cf http://fire.sourceforge.net/forums/viewtopic.php?t=174 and Bug #96052 - if(body.contains("<")) + if(body.tqcontains("<")) body= Kopete::Message::unescape(body); body = KgpgInterface::KgpgDecryptText( body, mPrivateKeyID ); @@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) body = Kopete::Message::escape( body ); } - msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>") + msg.setBody( TQString::tqfromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>") + i18n("Incoming Encrypted Message: ") - + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">") + + TQString::tqfromLatin1("</b></font></td></tr><tr><td class=\"highlight\">") + body - + TQString::fromLatin1(" </td></tr></table>") + + TQString::tqfromLatin1(" </td></tr></table>") , Kopete::Message::RichText ); } diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h index 1b1e4489..249eac9e 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.h +++ b/kopete/plugins/cryptography/cryptographyplugin.h @@ -40,6 +40,7 @@ namespace Kopete class CryptographyPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: enum CacheMode @@ -55,7 +56,7 @@ public: static bool passphraseHandling(); static const TQRegExp isHTML; - CryptographyPlugin( TQObject *parent, const char *name, const TQStringList &args ); + CryptographyPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~CryptographyPlugin(); public slots: diff --git a/kopete/plugins/cryptography/cryptographypreferences.cpp b/kopete/plugins/cryptography/cryptographypreferences.cpp index 8e1b96ee..765fb098 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.cpp +++ b/kopete/plugins/cryptography/cryptographypreferences.cpp @@ -27,8 +27,8 @@ typedef KGenericFactory<CryptographyPreferences> CryptographyPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_cryptography, CryptographyPreferencesFactory("kcm_kopete_cryptography")) -CryptographyPreferences::CryptographyPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), parent, args) +CryptographyPreferences::CryptographyPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), tqparent, args) { // Add actuall widget generated from ui file. preferencesDialog = new CryptographyPrefsUI(this); diff --git a/kopete/plugins/cryptography/cryptographypreferences.h b/kopete/plugins/cryptography/cryptographypreferences.h index 6053e96b..d032bc6e 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.h +++ b/kopete/plugins/cryptography/cryptographypreferences.h @@ -29,8 +29,9 @@ class KAutoConfig; */ class CryptographyPreferences : public KCAutoConfigModule { Q_OBJECT + TQ_OBJECT public: - CryptographyPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); + CryptographyPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList()); private: CryptographyPrefsUI *preferencesDialog; private slots: // Public slots diff --git a/kopete/plugins/cryptography/cryptographyprefsbase.ui b/kopete/plugins/cryptography/cryptographyprefsbase.ui index ecec3507..6cd3caca 100644 --- a/kopete/plugins/cryptography/cryptographyprefsbase.ui +++ b/kopete/plugins/cryptography/cryptographyprefsbase.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>CryptographyPrefsUI</class> <author>Olivier Goffart</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CryptographyPrefsUI</cstring> </property> @@ -17,7 +17,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -25,7 +25,7 @@ <string>Your private PGP key:</string> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>m_selectOwnKey</cstring> </property> @@ -41,7 +41,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>Also_my_key</cstring> </property> @@ -63,14 +63,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>50</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQButtonGroup" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_cache</cstring> </property> @@ -81,7 +81,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>Cache_Till_App_Close</cstring> </property> @@ -92,7 +92,7 @@ <bool>true</bool> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>Cache_Time</cstring> </property> @@ -114,7 +114,7 @@ <number>15</number> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -130,7 +130,7 @@ <string>minutes</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>Cache_Till_Time</cstring> </property> @@ -146,7 +146,7 @@ <string>For</string> </property> </widget> - <widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQRadioButton" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>Cache_Never</cstring> </property> @@ -156,7 +156,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>No_Passphrase_Handling</cstring> </property> @@ -184,12 +184,12 @@ <tabstop>Cache_Time</tabstop> <tabstop>Cache_Never</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>m_selectOwnKey_clicked()</slot> <slot>m_selectOwnKey_toggled(bool)</slot> <slot>m_selectOwnKey_stateChanged(int)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> </includehints> diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp index ae92647b..9d692e08 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp @@ -35,7 +35,7 @@ CryptographySelectUserKey::CryptographySelectUserKey(const TQString& key ,Kopete connect (view->m_selectKey , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotSelectPressed())); connect (view->m_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotRemovePressed())); - view->m_titleLabel->setText(i18n("Select public key for %1").arg(mc->displayName())); + view->m_titleLabel->setText(i18n("Select public key for %1").tqarg(mc->displayName())); view->m_editKey->setText(key); } CryptographySelectUserKey::~CryptographySelectUserKey() diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.h b/kopete/plugins/cryptography/cryptographyselectuserkey.h index 7ca5ec8e..a7f47853 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.h +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.h @@ -29,6 +29,7 @@ class CryptographyUserKey_ui; class CryptographySelectUserKey : public KDialogBase { Q_OBJECT + TQ_OBJECT public: CryptographySelectUserKey(const TQString &key, Kopete::MetaContact *mc); ~CryptographySelectUserKey(); diff --git a/kopete/plugins/cryptography/cryptographyuserkey_ui.ui b/kopete/plugins/cryptography/cryptographyuserkey_ui.ui index d84f2fec..ff766de4 100644 --- a/kopete/plugins/cryptography/cryptographyuserkey_ui.ui +++ b/kopete/plugins/cryptography/cryptographyuserkey_ui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>CryptographyUserKey_ui</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CryptographyUserKey_ui</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -32,7 +32,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>m_selectKey</cstring> </property> @@ -50,14 +50,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>m_removeButton</cstring> </property> @@ -65,7 +65,7 @@ <string>Remove</string> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>m_titleLabel</cstring> </property> @@ -75,5 +75,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp index e41e246d..d74f9baa 100644 --- a/kopete/plugins/cryptography/kgpginterface.cpp +++ b/kopete/plugins/cryptography/kgpginterface.cpp @@ -50,12 +50,12 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString userIDs=userIDs.simplifyWhiteSpace(); Options=Options.stripWhiteSpace(); - int ct=userIDs.find(" "); + int ct=userIDs.tqfind(" "); while (ct!=-1) // if multiple keys... { dests+=" --recipient "+userIDs.section(' ',0,0); userIDs.remove(0,ct+1); - ct=userIDs.find(" "); + ct=userIDs.tqfind(" "); } dests+=" --recipient "+userIDs; @@ -75,7 +75,7 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString if( !encResult.isEmpty() ) return encResult; else - return TQString::null; + return TQString(); } TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) @@ -95,15 +95,15 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) { /// pipe for passphrase //userID=TQString::fromUtf8(userID); - userID.replace('<',"<"); - TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID); + userID.tqreplace('<',"<"); + TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").tqarg(userID); if (counter>1) - passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").arg(TQString::number(4-counter))); + passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").tqarg(TQString::number(4-counter))); /// pipe for passphrase int code=KPasswordDialog::getPassword(password,passdlg); if (code!=TQDialog::Accepted) - return TQString::null; + return TQString(); CryptographyPlugin::setCachedPass(password); } @@ -135,7 +135,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) if( !encResult.isEmpty() ) return encResult; else - return TQString::null; + return TQString(); } TQString KgpgInterface::checkForUtf8(TQString txt) @@ -147,22 +147,22 @@ TQString KgpgInterface::checkForUtf8(TQString txt) /* Make sure the encoding is UTF-8. * Test structure suggested by Werner Koch */ if (txt.isEmpty()) - return TQString::null; + return TQString(); for (s = txt.ascii(); *s && !(*s & 0x80); s++) ; - if (*s && !strchr (txt.ascii(), 0xc3) && (txt.find("\\x")==-1)) + if (*s && !strchr (txt.ascii(), 0xc3) && (txt.tqfind("\\x")==-1)) return txt; /* The string is not in UTF-8 */ //if (strchr (txt.ascii(), 0xc3)) return (txt+" +++"); - if (txt.find("\\x")==-1) + if (txt.tqfind("\\x")==-1) return TQString::fromUtf8(txt.ascii()); - // if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) { - for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) { + // if (!strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) { + for ( int idx = 0 ; (idx = txt.tqfind( "\\x", idx )) >= 0 ; ++idx ) { char str[2] = "x"; str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 ); - txt.replace( idx, 4, str ); + txt.tqreplace( idx, 4, str ); } if (!strchr (txt.ascii(), 0xc3)) return TQString::fromUtf8(txt.ascii()); diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h index f324359e..9da953fe 100644 --- a/kopete/plugins/cryptography/kgpginterface.h +++ b/kopete/plugins/cryptography/kgpginterface.h @@ -30,6 +30,7 @@ class KgpgInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp index 88078ece..1f3d5a39 100644 --- a/kopete/plugins/cryptography/kgpgselkey.cpp +++ b/kopete/plugins/cryptography/kgpgselkey.cpp @@ -38,7 +38,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////// Secret key selection dialog, used when user wants to sign a key -KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) +KgpgSelKey::KgpgSelKey(TQWidget *tqparent, const char *name,bool showlocal):KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel) { TQString keyname; TQWidget *page = new TQWidget(this); @@ -122,7 +122,7 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo tst=tst.section(":",9,9); // FIXME: Same here: don't use popen! - Martijn - fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" ); + fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).tqarg( KShellProcess::quote( id ) ).latin1(), "r" ); bool dead=true; while ( fgets( line, sizeof(line), fp2)) { @@ -147,7 +147,7 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo if (!tst.isEmpty() && (!dead)) { KListViewItem *item=new KListViewItem(keysListpr,extractKeyName(tst)); - KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").arg(id).arg(tr).arg(val)); + KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").tqarg(id).tqarg(tr).tqarg(val)); sub->setSelectable(false); item->setPixmap(0,keyPair); } @@ -163,20 +163,20 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo keysListpr->setSelected(keysListpr->firstChild(),true); page->show(); - resize(this->minimumSize()); + resize(this->tqminimumSize()); setMainWidget(page); } TQString KgpgSelKey::extractKeyName(TQString fullName) { TQString kMail; - if (fullName.find("<")!=-1) + if (fullName.tqfind("<")!=-1) { kMail=fullName.section('<',-1,-1); kMail.truncate(kMail.length()-1); } TQString kName=fullName.section('<',0,0); - if (kName.find("(")!=-1) kName=kName.section('(',0,0); + if (kName.tqfind("(")!=-1) kName=kName.section('(',0,0); return TQString(kMail+" ("+kName+")").stripWhiteSpace(); } @@ -201,8 +201,8 @@ void KgpgSelKey::slotSelect(TQListViewItem *item) if (item==NULL) return; if (item->depth()!=0) { - keysListpr->setSelected(item->parent(),true); - keysListpr->setCurrentItem(item->parent()); + keysListpr->setSelected(item->tqparent(),true); + keysListpr->setCurrentItem(item->tqparent()); } } diff --git a/kopete/plugins/cryptography/kgpgselkey.h b/kopete/plugins/cryptography/kgpgselkey.h index 1e357482..190e8186 100644 --- a/kopete/plugins/cryptography/kgpgselkey.h +++ b/kopete/plugins/cryptography/kgpgselkey.h @@ -41,9 +41,10 @@ struct gpgKey { class KgpgSelKey : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool showlocal=true); + KgpgSelKey( TQWidget *tqparent = 0, const char *name = 0,bool showlocal=true); KListView *keysListpr; TQPixmap keyPair; TQCheckBox *local; diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp index 9c1561f1..43787d47 100644 --- a/kopete/plugins/cryptography/popuppublic.cpp +++ b/kopete/plugins/cryptography/popuppublic.cpp @@ -57,14 +57,14 @@ class UpdateViewItem2 : public KListViewItem { public: - UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault); + UpdateViewItem2(TQListView *tqparent, TQString name,TQString mail,TQString id,bool isDefault); virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align); virtual TQString key(int c,bool ) const; bool def; }; -UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault) - : KListViewItem(parent) +UpdateViewItem2::UpdateViewItem2(TQListView *tqparent, TQString name,TQString mail,TQString id,bool isDefault) + : KListViewItem(tqparent) { def=isDefault; setText(0,name); @@ -73,14 +73,14 @@ def=isDefault; } -void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment) +void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int tqalignment) { if ((def) && (column<2)) { TQFont font(p->font()); font.setBold(true); p->setFont(font); } - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } TQString UpdateViewItem2 :: key(int c,bool ) const @@ -90,8 +90,8 @@ TQString UpdateViewItem2 :: key(int c,bool ) const /////////////// main view -popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey): -KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true) +popupPublic::popupPublic(TQWidget *tqparent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey): +KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, tqparent, name,true) { TQWidget *page = plainPage(); TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint()); @@ -108,7 +108,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent keySingle=loader->loadIcon("kgpg_key1",KIcon::Small,20); keyGroup=loader->loadIcon("kgpg_key3",KIcon::Small,20); - if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile)); + if (filemode) setCaption(i18n("Select Public Key for %1").tqarg(sfile)); fmode=filemode; TQHButtonGroup *hBar=new TQHButtonGroup(page); @@ -144,7 +144,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0); KActionCollection *actcol=new KActionCollection(this); - (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); + (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, TQT_TQOBJECT(this), TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions); @@ -165,16 +165,16 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent "box enables you to use any key, even if it has not be signed.")); if (filemode) { - TQWidget *parentBox=new TQWidget(boutonboxoptions); - TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0); + TQWidget *tqparentBox=new TQWidget(boutonboxoptions); + TQHBoxLayout *shredBox=new TQHBoxLayout(tqparentBox,0); //shredBox->setFrameStyle(TQFrame::NoFrame); //shredBox->setMargin(0); - CBshred=new TQCheckBox(i18n("Shred source file"),parentBox); + CBshred=new TQCheckBox(i18n("Shred source file"),tqparentBox); TQWhatsThis::add (CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible")); TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>"); - KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").arg(shredWhatsThis),parentBox ); + KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").tqarg(shredWhatsThis),tqparentBox ); shredBox->addWidget(CBshred); shredBox->addWidget(warn); } @@ -187,7 +187,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent //BEGIN modified for Kopete - setWFlags( getWFlags() | Qt::WDestructiveClose ); + setWFlags( getWFlags() | TQt::WDestructiveClose ); /*CBarmor->setChecked( KGpgSettings::asciiArmor() ); @@ -221,7 +221,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent char line[200]="\0"; FILE *fp2; - seclist=TQString::null; + seclist=TQString(); fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r"); while ( fgets( line, sizeof(line), fp2)) @@ -269,7 +269,7 @@ void popupPublic::sort() if (current==NULL) return; - if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){ + if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){ if (current->isSelected()) { current->setSelected(false); reselect=true; @@ -279,7 +279,7 @@ void popupPublic::sort() while ( current->nextSibling() ) { current = current->nextSibling(); - if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) { + if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) { if (current->isSelected()) { current->setSelected(false); reselect=true; @@ -342,7 +342,7 @@ void popupPublic::refreshkeys() { if (!TQString(*it).isEmpty()) { - UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false); + UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString(),TQString(),false); item->setPixmap(0,keyGroup); } } @@ -433,16 +433,16 @@ void popupPublic::slotprocread(KProcIO *p) untrustedList<<id; break; } - if (keyString[11].find('D')!=-1) dead=true; + if (keyString[11].tqfind('D')!=-1) dead=true; tst=keyString[9]; - if (tst.find("<")!=-1) { + if (tst.tqfind("<")!=-1) { keymail=tst.section('<',-1,-1); keymail.truncate(keymail.length()-1); keyname=tst.section('<',0,0); - //if (keyname.find("(")!=-1) + //if (keyname.tqfind("(")!=-1) // keyname=keyname.section('(',0,0); } else { - keymail=TQString::null; + keymail=TQString(); keyname=tst;//.section('(',0,0); } @@ -452,9 +452,9 @@ void popupPublic::slotprocread(KProcIO *p) bool isDefaultKey=false; if (id.right(8)==defaultKey) isDefaultKey=true; UpdateViewItem2 *item=new UpdateViewItem2(keysList,keyname,keymail,id,isDefaultKey); - //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").arg(id).arg(tr).arg(val)); + //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").tqarg(id).tqarg(tr).tqarg(val)); //sub->setSelectable(false); - if (seclist.find(tst,0,FALSE)!=-1) + if (seclist.tqfind(tst,0,FALSE)!=-1) item->setPixmap(0,keyPair); else item->setPixmap(0,keySingle); diff --git a/kopete/plugins/cryptography/popuppublic.h b/kopete/plugins/cryptography/popuppublic.h index 7e3208aa..17c05ebb 100644 --- a/kopete/plugins/cryptography/popuppublic.h +++ b/kopete/plugins/cryptography/popuppublic.h @@ -31,12 +31,13 @@ class KListView; class TQButtonGroup; class KProcIO; -class popupPublic : public KDialogBase //QDialog +class popupPublic : public KDialogBase //TQDialog { Q_OBJECT + TQ_OBJECT public: - popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home)); + popupPublic(TQWidget *tqparent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+TQt::Key_Home)); ~popupPublic(); KListView *keysList; TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid; 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( "<?xml version=\"1.0\"?>\n" "<!DOCTYPE kopete-highlight-plugin>\n" "<highlight-plugin>\n" ); @@ -172,32 +172,32 @@ void HighlightConfig::save() for( ; filtreIt.current(); ++filtreIt ) { Filter *filtre = *filtreIt; - xml += TQString::fromLatin1( " <filter>\n <display-name>" ) + xml += TQString::tqfromLatin1( " <filter>\n <display-name>" ) + TQStyleSheet::escape(filtre->displayName) - + TQString::fromLatin1( "</display-name>\n" ); + + TQString::tqfromLatin1( "</display-name>\n" ); - xml += TQString::fromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) + - TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "</search>\n" ); + xml += TQString::tqfromLatin1(" <search caseSensitive=\"") + TQString::number( static_cast<int>( filtre->caseSensitive ) ) + + TQString::tqfromLatin1("\" regExp=\"") + TQString::number( static_cast<int>( filtre->isRegExp ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::tqfromLatin1( "</search>\n" ); - xml += TQString::fromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "</BG>\n" ); - xml += TQString::fromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "</FG>\n" ); + xml += TQString::tqfromLatin1(" <BG set=\"") + TQString::number( static_cast<int>( filtre->setBG ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::tqfromLatin1( "</BG>\n" ); + xml += TQString::tqfromLatin1(" <FG set=\"") + TQString::number( static_cast<int>( filtre->setFG ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::tqfromLatin1( "</FG>\n" ); - xml += TQString::fromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) + - TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "</importance>\n" ); + xml += TQString::tqfromLatin1(" <importance set=\"") + TQString::number( static_cast<int>( filtre->setImportance ) ) + + TQString::tqfromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::tqfromLatin1( "</importance>\n" ); - xml += TQString::fromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) + - TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "</sound>\n" ); + xml += TQString::tqfromLatin1(" <sound set=\"") + TQString::number( static_cast<int>( filtre->playSound ) ) + + TQString::tqfromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::tqfromLatin1( "</sound>\n" ); - xml += TQString::fromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) + - TQString::fromLatin1( "\"></raise>\n" ); + xml += TQString::tqfromLatin1(" <raise set=\"") + TQString::number( static_cast<int>( filtre->raiseView ) ) + + TQString::tqfromLatin1( "\"></raise>\n" ); - xml += TQString::fromLatin1( " </filter>\n" ); + xml += TQString::tqfromLatin1( " </filter>\n" ); } - xml += TQString::fromLatin1( "</highlight-plugin>\n" ); + xml += TQString::tqfromLatin1( "</highlight-plugin>\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<HighlightPlugin> 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<HighlightPreferences> 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 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>HighlightPrefsUI</class> <author>Olivier Goffart</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HighlighPrefsUI</cstring> </property> @@ -20,7 +20,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -39,7 +39,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>m_add</cstring> </property> @@ -47,7 +47,7 @@ <string>Add</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>m_remove</cstring> </property> @@ -58,7 +58,7 @@ <string>Remove</string> </property> </widget> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>m_rename</cstring> </property> @@ -95,7 +95,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -114,7 +114,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -127,7 +127,7 @@ </sizepolicy> </property> <property name="text"> - <string>If the message contains:</string> + <string>If the message tqcontains:</string> </property> </widget> <widget class="KLineEdit"> @@ -135,15 +135,15 @@ <cstring>m_search</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_regexp</cstring> </property> @@ -151,7 +151,7 @@ <string>Regular expression</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_editregexp</cstring> </property> @@ -177,7 +177,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -186,7 +186,7 @@ </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_case</cstring> </property> @@ -196,7 +196,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -215,15 +215,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_setImportance</cstring> </property> @@ -277,7 +277,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>21</height> @@ -286,15 +286,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_setBG</cstring> </property> @@ -328,7 +328,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>21</height> @@ -337,15 +337,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_setFG</cstring> </property> @@ -379,7 +379,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> @@ -388,15 +388,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_sound</cstring> </property> @@ -411,15 +411,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_raise</cstring> </property> @@ -452,7 +452,7 @@ <tabstop>m_soundFN</tabstop> <tabstop>m_raise</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp index d2e4839d..5a84e021 100644 --- a/kopete/plugins/history/converter.cpp +++ b/kopete/plugins/history/converter.cpp @@ -40,17 +40,17 @@ void HistoryPlugin::convertOldHistory() i18n( "Would you like to remove old history files?" ) , i18n( "History Converter" ), KStdGuiItem::del(), i18n("Keep") ) == KMessageBox::Yes; KProgressDialog *progressDlg=new KProgressDialog(Kopete::UI::Global::mainWidget() , "history_progress_dlg" , i18n( "History converter" ) , - TQString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) + TQString() , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) progressDlg->setAllowCancel(false); //because i am too lazy to allow to cancel - TQString kopetedir=locateLocal( "data", TQString::fromLatin1( "kopete")); + TQString kopetedir=locateLocal( "data", TQString::tqfromLatin1( "kopete")); TQDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/ d.setFilter( TQDir::Dirs ); - const QFileInfoList *list = d.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = d.entryInfoList(); + TQFileInfoListIterator it( *list ); TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { @@ -74,9 +74,9 @@ void HistoryPlugin::convertOldHistory() KGlobal::config()->setGroup("MSN"); accountId=KGlobal::config()->readEntry( "UserID" ); } - else if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" ) + else if(fi->fileName() == "ICTQProtocol" || fi->fileName() == "icq_logs" ) { - protocolId="ICQProtocol"; + protocolId="ICTQProtocol"; KGlobal::config()->setGroup("ICQ"); accountId=KGlobal::config()->readEntry( "UIN" ); } @@ -106,23 +106,23 @@ void HistoryPlugin::convertOldHistory() TQDir d2( fi->absFilePath() ); d2.setFilter( TQDir::Files ); d2.setNameFilter("*.log"); - const QFileInfoList *list = d2.entryInfoList(); - QFileInfoListIterator it2( *list ); + const TQFileInfoList *list = d2.entryInfoList(); + TQFileInfoListIterator it2( *list ); TQFileInfo *fi2; progressDlg->progressBar()->reset(); progressDlg->progressBar()->setTotalSteps(d2.count()); - progressDlg->setLabel(i18n("Parsing old history in %1").arg(fi->fileName())); + progressDlg->setLabel(i18n("Parsing old history in %1").tqarg(fi->fileName())); progressDlg->show(); //if it was not already showed... while ( (fi2 = it2.current()) != 0 ) { //we assume that all "-" are dots. (like in hotmail.com) - TQString contactId=fi2->fileName().replace(".log" , TQString::null).replace("-" , "."); + TQString contactId=fi2->fileName().tqreplace(".log" , TQString()).tqreplace("-" , "."); if(!contactId.isEmpty() ) { - progressDlg->setLabel(i18n("Parsing old history in %1:\n%2").arg(fi->fileName()).arg(contactId)); + progressDlg->setLabel(i18n("Parsing old history in %1:\n%2").tqarg(fi->fileName()).tqarg(contactId)); kapp->processEvents(0); //make sure the text is updated in the progressDlg int month=0; @@ -155,12 +155,12 @@ void HistoryPlugin::convertOldHistory() buffer += TQString::fromUtf8(cbuf); } - if( buffer.startsWith( TQString::fromLatin1( "<message " ) ) ) + if( buffer.startsWith( TQString::tqfromLatin1( "<message " ) ) ) { msgBlock = buffer; // find the end of the message block - while( !feof( f ) && buffer != TQString::fromLatin1( "</message>\n" ) /*strcmp("</message>\n", cbuf )*/ ) + while( !feof( f ) && buffer != TQString::tqfromLatin1( "</message>\n" ) /*strcmp("</message>\n", cbuf )*/ ) { fgets(cbuf, CBUFLENGTH, f); buffer = TQString::fromUtf8(cbuf); @@ -178,7 +178,7 @@ void HistoryPlugin::convertOldHistory() msgelement = xmllist.documentElement(); node = msgelement.firstChild(); - if( msgelement.attribute( TQString::fromLatin1( "direction" ) ) == TQString::fromLatin1( "inbound" ) ) + if( msgelement.attribute( TQString::tqfromLatin1( "direction" ) ) == TQString::tqfromLatin1( "inbound" ) ) dir = Kopete::Message::Inbound; else dir = Kopete::Message::Outbound; @@ -194,12 +194,12 @@ void HistoryPlugin::convertOldHistory() element = node.toElement(); tagname = element.tagName(); - if( tagname == TQString::fromLatin1( "srcnick" ) ) + if( tagname == TQString::tqfromLatin1( "srcnick" ) ) nick = element.text(); - else if( tagname == TQString::fromLatin1( "date" ) ) + else if( tagname == TQString::tqfromLatin1( "date" ) ) date = element.text(); - else if( tagname == TQString::fromLatin1( "body" ) ) + else if( tagname == TQString::tqfromLatin1( "body" ) ) body = element.text().stripWhiteSpace(); } @@ -213,11 +213,11 @@ void HistoryPlugin::convertOldHistory() if(!docElem.isNull()) { TQDate date(year,month,1); - TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString name = protocolId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + contactId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { TQTextStream *stream = file.textStream(); @@ -254,7 +254,7 @@ void HistoryPlugin::convertOldHistory() headElem.appendChild(contactElem); TQDomElement importElem = doc.createElement( "imported" ); importElem.setAttribute( "from", fi->fileName() ); - importElem.setAttribute( "date", TQDateTime::currentDateTime().toString() ); + importElem.setAttribute( "date", TQDateTime::tqcurrentDateTime().toString() ); headElem.appendChild(importElem); } TQDomElement msgElem = doc.createElement( "msg" ); @@ -275,11 +275,11 @@ void HistoryPlugin::convertOldHistory() if(!docElem.isNull()) { TQDate date(year,month,1); - TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString name = protocolId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + contactId.tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { TQTextStream *stream = file.textStream(); @@ -310,15 +310,15 @@ bool HistoryPlugin::detectOldHistory() return false; - TQDir d( locateLocal( "data", TQString::fromLatin1( "kopete/logs")) ); + TQDir d( locateLocal( "data", TQString::tqfromLatin1( "kopete/logs")) ); d.setFilter( TQDir::Dirs ); if(d.count() >= 3) // '.' and '..' are included return false; //the new history already exists - TQDir d2( locateLocal( "data", TQString::fromLatin1( "kopete")) ); + TQDir d2( locateLocal( "data", TQString::tqfromLatin1( "kopete")) ); d2.setFilter( TQDir::Dirs ); - const QFileInfoList *list = d2.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = d2.entryInfoList(); + TQFileInfoListIterator it( *list ); TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { @@ -327,7 +327,7 @@ bool HistoryPlugin::detectOldHistory() if(fi->fileName() == "MSNProtocol" || fi->fileName() == "msn_logs" ) return true; - else if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" ) + else if(fi->fileName() == "ICTQProtocol" || fi->fileName() == "icq_logs" ) return true; else if(fi->fileName() == "AIMProtocol" || fi->fileName() == "aim_logs" ) return true; diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp index 5dc550be..2496f893 100644 --- a/kopete/plugins/history/historydialog.cpp +++ b/kopete/plugins/history/historydialog.cpp @@ -60,7 +60,7 @@ class KListViewDateItem : public KListViewItem { public: - KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc); + KListViewDateItem(KListView* tqparent, TQDate date, Kopete::MetaContact *mc); TQDate date() { return mDate; } Kopete::MetaContact *metaContact() { return mMetaContact; } @@ -73,8 +73,8 @@ private: -KListViewDateItem::KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc) - : KListViewItem(parent, date.toString(Qt::ISODate), mc->displayName()) +KListViewDateItem::KListViewDateItem(KListView* tqparent, TQDate date, Kopete::MetaContact *mc) + : KListViewItem(tqparent, date.toString(Qt::ISODate), mc->displayName()) { mDate = date; mMetaContact = mc; @@ -93,16 +93,16 @@ int KListViewDateItem::compare(TQListViewItem *i, int col, bool ascending) const } -HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, - const char* name) : KDialogBase(parent, name, false, - i18n("History for %1").arg(mc->displayName()), 0), mSearching(false) +HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* tqparent, + const char* name) : KDialogBase(tqparent, name, false, + i18n("History for %1").tqarg(mc->displayName()), 0), mSearching(false) { TQString fontSize; TQString htmlCode; TQString fontStyle; kdDebug(14310) << k_funcinfo << "called." << endl; - setWFlags(Qt::WDestructiveClose); // send TQT_SIGNAL(closing()) on quit + setWFlags(TQt::WDestructiveClose); // send TQT_SIGNAL(closing()) on quit // FIXME: Allow to show this dialog for only one contact mMetaContact = mc; @@ -125,7 +125,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, } if (mMetaContact) - mMainWidget->contactComboBox->setCurrentItem(mMetaContactList.find(mMetaContact)+1); + mMainWidget->contactComboBox->setCurrentItem(mMetaContactList.tqfind(mMetaContact)+1); mMainWidget->dateSearchLine->setListView(mMainWidget->dateListView); mMainWidget->dateListView->setSorting(0, 0); //newest-first @@ -147,8 +147,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, mHtmlView = mHtmlPart->view(); mHtmlView->setMarginWidth(4); mHtmlView->setMarginHeight(4); - mHtmlView->setFocusPolicy(NoFocus); - mHtmlView->setSizePolicy( + mHtmlView->setFocusPolicy(TQ_NoFocus); + mHtmlView->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(mHtmlView); @@ -157,7 +157,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, mHtmlPart->begin(); htmlCode = "<html><head>" + fontStyle + "</head><body class=\"hf\"></body></html>"; - mHtmlPart->write( TQString::fromLatin1( htmlCode.latin1() ) ); + mHtmlPart->write( TQString::tqfromLatin1( htmlCode.latin1() ) ); mHtmlPart->end(); @@ -174,8 +174,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, //initActions KActionCollection* ac = new KActionCollection(this); - mCopyAct = KStdAction::copy( this, TQT_SLOT(slotCopy()), ac ); - mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), ac ); + mCopyAct = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), ac ); + mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::tqfromLatin1( "editcopy" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotCopyURL() ), ac ); resize(650, 700); centerOnScreen(this); @@ -196,7 +196,7 @@ void HistoryDialog::init() { if(mMetaContact) { - HistoryLogger logger(mMetaContact, this); + HistoryLogger logger(mMetaContact, TQT_TQOBJECT(this)); init(mMetaContact); } else @@ -204,7 +204,7 @@ void HistoryDialog::init() TQPtrListIterator<Kopete::MetaContact> it(mMetaContactList); for(; it.current(); ++it) { - HistoryLogger logger(*it, this); + HistoryLogger logger(*it, TQT_TQOBJECT(this)); init(*it); } @@ -226,12 +226,12 @@ void HistoryDialog::slotLoadDays() DMPair pair(mInit.dateMCList.first()); mInit.dateMCList.pop_front(); - HistoryLogger logger(pair.metaContact(), this); + HistoryLogger logger(pair.metaContact(), TQT_TQOBJECT(this)); TQValueList<int> dayList = logger.getDaysForMonth(pair.date()); for (unsigned int i=0; i<dayList.count(); i++) { TQDate c2Date(pair.date().year(),pair.date().month(),dayList[i]); - if (mInit.dateMCList.find(pair) == mInit.dateMCList.end()) + if (mInit.dateMCList.tqfind(pair) == mInit.dateMCList.end()) new KListViewDateItem(mMainWidget->dateListView, c2Date, pair.metaContact()); } mMainWidget->searchProgress->advance(1); @@ -255,24 +255,24 @@ void HistoryDialog::init(Kopete::Contact *c) { // Get year and month list TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); - const TQString contact_in_filename=c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ); + const TQString contact_in_filename=c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ); TQFileInfo *fi; // BEGIN check if there are Kopete 0.7.x TQDir d1(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) )); d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); d1.setSorting( TQDir::Name ); - const QFileInfoList *list1 = d1.entryInfoList(); + const TQFileInfoList *list1 = d1.entryInfoList(); if ( list1 != 0 ) { - QFileInfoListIterator it1( *list1 ); + TQFileInfoListIterator it1( *list1 ); while ( (fi = it1.current()) != 0 ) { - if(fi->fileName().contains(contact_in_filename)) + if(fi->fileName().tqcontains(contact_in_filename)) { rx.search(fi->fileName()); @@ -288,20 +288,20 @@ void HistoryDialog::init(Kopete::Contact *c) // END of kopete 0.7.x check TQString logDir = locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + - TQString::fromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + + TQString::tqfromLatin1( "/" ) + + c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) ); TQDir d(logDir); d.setFilter( TQDir::Files | TQDir::NoSymLinks ); d.setSorting( TQDir::Name ); - const QFileInfoList *list = d.entryInfoList(); + const TQFileInfoList *list = d.entryInfoList(); if ( list != 0 ) { - QFileInfoListIterator it( *list ); + TQFileInfoListIterator it( *list ); while ( (fi = it.current()) != 0 ) { - if(fi->fileName().contains(contact_in_filename)) + if(fi->fileName().tqcontains(contact_in_filename)) { rx.search(fi->fileName()); @@ -325,7 +325,7 @@ void HistoryDialog::dateSelected(TQListViewItem* it) TQDate chosenDate = item->date(); - HistoryLogger logger(item->metaContact(), this); + HistoryLogger logger(item->metaContact(), TQT_TQOBJECT(this)); TQValueList<Kopete::Message> msgs=logger.readMessages(chosenDate); setMessages(msgs); @@ -339,16 +339,16 @@ void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs) htmlBody.removeChild(htmlBody.childNodes().item(htmlBody.childNodes().length() - 1)); // ---- - TQString dir = (TQApplication::reverseLayout() ? TQString::fromLatin1("rtl") : - TQString::fromLatin1("ltr")); + TQString dir = (TQApplication::reverseLayout() ? TQString::tqfromLatin1("rtl") : + TQString::tqfromLatin1("ltr")); TQValueList<Kopete::Message>::iterator it = msgs.begin(); TQString accountLabel; TQString resultHTML = "<b><font color=\"red\">" + (*it).timestamp().date().toString() + "</font></b><br/>"; - DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); - newNode.setAttribute(TQString::fromLatin1("dir"), dir); + DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::tqfromLatin1("span")); + newNode.setAttribute(TQString::tqfromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -375,7 +375,7 @@ void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs) if (!mMainWidget->searchLine->text().isEmpty()) // If there is a search, then we hightlight the keywords { - body = body.replace(mMainWidget->searchLine->text(), "<span style=\"background-color:yellow\">" + mMainWidget->searchLine->text() + "</span>", false); + body = body.tqreplace(mMainWidget->searchLine->text(), "<span style=\"background-color:yellow\">" + mMainWidget->searchLine->text() + "</span>", false); } resultHTML += "(<b>" + (*it).timestamp().time().toString() + "</b>) " @@ -384,8 +384,8 @@ void HistoryDialog::setMessages(TQValueList<Kopete::Message> msgs) : "<font color=\"" + KopetePrefs::prefs()->textColor().light(200).name() + "\"><b><</b></font> ") + body + "<br/>"; - newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); - newNode.setAttribute(TQString::fromLatin1("dir"), dir); + newNode = mHtmlPart->document().createElement(TQString::tqfromLatin1("span")); + newNode.setAttribute(TQString::tqfromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -477,12 +477,12 @@ void HistoryDialog::slotSearch() curItem = static_cast<KListViewDateItem *>(curItem->nextSibling()) ) { - qApp->processEvents(); + tqApp->processEvents(); if (!mSearching) return; TQDate month(curItem->date().year(),curItem->date().month(),1); // if we haven't searched the relevant history logs, search them now - if (!monthsSearched[month].contains(curItem->metaContact())) + if (!monthsSearched[month].tqcontains(curItem->metaContact())) { monthsSearched[month].push_back(curItem->metaContact()); TQPtrList<Kopete::Contact> contacts = curItem->metaContact()->contacts(); @@ -496,7 +496,7 @@ void HistoryDialog::slotSearch() if (!file.isOpen()) { kdWarning(14310) << k_funcinfo << "Error opening " << - file.name() << ": " << file.errorString() << endl; + file.name() << ": " << file.errorString().data() << endl; continue; } @@ -505,19 +505,19 @@ void HistoryDialog::slotSearch() while(!stream.atEnd()) { textLine = stream.readLine(); - if (textLine.contains(mMainWidget->searchLine->text(), false)) + if (textLine.tqcontains(mMainWidget->searchLine->text(), false)) { if(rx.search(textLine) != -1) { // only match message body - if (rx.cap(2).contains(mMainWidget->searchLine->text())) + if (rx.cap(2).tqcontains(mMainWidget->searchLine->text())) matches[TQDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact()); } // this will happen when multiline messages are searched, properly // parsing the files would fix this else { } } - qApp->processEvents(); + tqApp->processEvents(); if (!mSearching) return; } file.close(); @@ -525,7 +525,7 @@ void HistoryDialog::slotSearch() } // relevant logfiles have been searched now, check if current date matches - if (matches[curItem->date()].contains(curItem->metaContact())) + if (matches[curItem->date()].tqcontains(curItem->metaContact())) curItem->setVisible(true); // Next date item @@ -553,7 +553,7 @@ void HistoryDialog::slotContactChanged(int index) else { mMetaContact = mMetaContactList.at(index-1); - setCaption(i18n("History for %1").arg(mMetaContact->displayName())); + setCaption(i18n("History for %1").tqarg(mMetaContact->displayName())); init(); } } @@ -597,16 +597,16 @@ void HistoryDialog::slotCopy() if ( qsSelection.isEmpty() ) return; disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); - TQApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard); - TQApplication::clipboard()->setText(qsSelection, QClipboard::Selection); + TQApplication::tqclipboard()->setText(qsSelection, TQClipboard::Clipboard); + TQApplication::tqclipboard()->setText(qsSelection, TQClipboard::Selection); connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } void HistoryDialog::slotCopyURL() { disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); - TQApplication::clipboard()->setText( mURL, QClipboard::Clipboard); - TQApplication::clipboard()->setText( mURL, QClipboard::Selection); + TQApplication::tqclipboard()->setText( mURL, TQClipboard::Clipboard); + TQApplication::tqclipboard()->setText( mURL, TQClipboard::Selection); connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } diff --git a/kopete/plugins/history/historydialog.h b/kopete/plugins/history/historydialog.h index 63b08470..783bb3a7 100644 --- a/kopete/plugins/history/historydialog.h +++ b/kopete/plugins/history/historydialog.h @@ -62,9 +62,10 @@ class DMPair class HistoryDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent=0, + HistoryDialog(Kopete::MetaContact *mc, TQWidget* tqparent=0, const char* name="HistoryDialog"); ~HistoryDialog(); diff --git a/kopete/plugins/history/historyguiclient.cpp b/kopete/plugins/history/historyguiclient.cpp index 4b1798ae..57dfdc1c 100644 --- a/kopete/plugins/history/historyguiclient.cpp +++ b/kopete/plugins/history/historyguiclient.cpp @@ -27,12 +27,12 @@ class HistoryPlugin; -HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name) - : TQObject(parent, name), KXMLGUIClient(parent) +HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *tqparent, const char *name) + : TQObject(tqparent, name), KXMLGUIClient(tqparent) { setInstance(KGenericFactory<HistoryPlugin>::instance()); - m_manager = parent; + m_manager = tqparent; // Refuse to build this client, it is based on wrong parameters if(!m_manager || m_manager->members().isEmpty()) @@ -41,7 +41,7 @@ HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name TQPtrList<Kopete::Contact> mb=m_manager->members(); m_logger=new HistoryLogger( mb.first() , this ); - actionLast=new KAction( i18n("History Last" ), TQString::fromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" ); + actionLast=new KAction( i18n("History Last" ), TQString::tqfromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" ); actionPrev = KStdAction::back( this, TQT_SLOT(slotPrevious()), actionCollection() , "historyPrevious" ); actionNext = KStdAction::forward( this, TQT_SLOT(slotNext()), actionCollection() , "historyNext" ); diff --git a/kopete/plugins/history/historyguiclient.h b/kopete/plugins/history/historyguiclient.h index 792325fc..b48595fc 100644 --- a/kopete/plugins/history/historyguiclient.h +++ b/kopete/plugins/history/historyguiclient.h @@ -29,8 +29,9 @@ class KAction; class HistoryGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - HistoryGUIClient(Kopete::ChatSession *parent = 0, const char *name = 0); + HistoryGUIClient(Kopete::ChatSession *tqparent = 0, const char *name = 0); ~HistoryGUIClient(); HistoryLogger *logger() const { return m_logger; } diff --git a/kopete/plugins/history/historylogger.cpp b/kopete/plugins/history/historylogger.cpp index 96f4d6dc..714fe966 100644 --- a/kopete/plugins/history/historylogger.cpp +++ b/kopete/plugins/history/historylogger.cpp @@ -37,15 +37,15 @@ #include "kopetechatsession.h" // ----------------------------------------------------------------------------- -HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const char *name ) - : TQObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *tqparent, const char *name ) + : TQObject(tqparent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_metaContact=m; m_hideOutgoing=false; m_cachedMonth=-1; - m_realMonth=TQDate::currentDate().month(); + m_realMonth=TQDate::tqcurrentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact @@ -55,15 +55,15 @@ HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const c } -HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *parent, const char *name ) - : TQObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *tqparent, const char *name ) + : TQObject(tqparent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_cachedMonth=-1; m_metaContact=c->metaContact(); m_hideOutgoing=false; - m_realMonth=TQDate::currentDate().month(); + m_realMonth=TQDate::tqcurrentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact @@ -107,14 +107,14 @@ void HistoryLogger::setCurrentMonth(int month) TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain) { - if(m_realMonth!=TQDate::currentDate().month()) + if(m_realMonth!=TQDate::tqcurrentDate().month()) { //We changed month, our indice are not correct anymore, clean memory. // or we will see what i called "the 31 midnight bug"(TM) :-) -Olivier m_documents.clear(); m_cachedMonth=-1; m_currentMonth++; //Not usre it's ok, but should work; m_oldMonth++; // idem - m_realMonth=TQDate::currentDate().month(); + m_realMonth=TQDate::tqcurrentDate().month(); } if(!m_metaContact) @@ -125,7 +125,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int return TQDomDocument(); } - if(!m_metaContact->contacts().contains(c)) + if(!m_metaContact->contacts().tqcontains(c)) { if(contain) *contain=false; @@ -133,11 +133,11 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int } TQMap<unsigned int , TQDomDocument> documents = m_documents[c]; - if (documents.contains(month)) + if (documents.tqcontains(month)) return documents[month]; - TQDomDocument doc = getDocument(c, TQDate::currentDate().addMonths(0-month), canLoad, contain); + TQDomDocument doc = getDocument(c, TQDate::tqcurrentDate().addMonths(0-month), canLoad, contain); documents.insert(month, doc); m_documents[c]=documents; @@ -156,7 +156,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate return TQDomDocument(); } - if(!m_metaContact->contacts().contains(c)) + if(!m_metaContact->contacts().tqcontains(c)) { if(contain) *contain=false; @@ -170,7 +170,7 @@ TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate return TQDomDocument(); } - QString FileName = getFileName(c, date); + TQString FileName = getFileName(c, date); TQDomDocument doc( "Kopete-History" ); @@ -223,7 +223,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co } - if(!c || !m_metaContact->contacts().contains(c) ) + if(!c || !m_metaContact->contacts().tqcontains(c) ) { /*TQPtrList<Kopete::Contact> contacts= m_metaContact->contacts(); TQPtrListIterator<Kopete::Contact> it( contacts ); @@ -253,8 +253,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co TQDomElement headElem = doc.createElement( "head" ); docElem.appendChild( headElem ); TQDomElement dateElem = doc.createElement( "date" ); - dateElem.setAttribute( "year", TQString::number(TQDate::currentDate().year()) ); - dateElem.setAttribute( "month", TQString::number(TQDate::currentDate().month()) ); + dateElem.setAttribute( "year", TQString::number(TQDate::tqcurrentDate().year()) ); + dateElem.setAttribute( "month", TQString::number(TQDate::tqcurrentDate().month()) ); headElem.appendChild(dateElem); TQDomElement myselfElem = doc.createElement( "contact" ); myselfElem.setAttribute( "type", "myself" ); @@ -280,7 +280,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co // On hight-traffic channel, saving can take lots of CPU. (because the file is big) // So i wait a time proportional to the time needed to save.. - const TQString filename=getFileName(c,TQDate::currentDate()); + const TQString filename=getFileName(c,TQDate::tqcurrentDate()); if(!m_toSaveFileName.isEmpty() && m_toSaveFileName != filename) { //that mean the contact or the month has changed, save it now. saveToDisk(); @@ -316,14 +316,14 @@ void HistoryLogger::saveToDisk() m_toSaveDocument.save( *stream, 1 ); file.close(); - m_saveTimerTime=QMIN(t.elapsed()*1000, 300000); + m_saveTimerTime=TQMIN(t.elapsed()*1000, 300000); //a time 1000 times supperior to the time needed to save. but with a upper limit of 5 minutes //on a my machine, (2.4Ghz, but old HD) it should take about 10 ms to save the file. // So that would mean save every 10 seconds, which seems to be ok. // But it may take 500 ms if the file to save becomes too big (1Mb). kdDebug(14310) << k_funcinfo << m_toSaveFileName << " saved in " << t.elapsed() << " ms " <<endl ; - m_toSaveFileName=TQString::null; + m_toSaveFileName=TQString(); m_toSaveDocument=TQDomDocument(); } else @@ -376,8 +376,8 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(TQDate date) to.append( dir==Kopete::Message::Inbound ? (*it)->account()->myself() : *it ); Kopete::Message msg(dt, from, to, msgElem2.text(), dir); - msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>") - .arg( dt.toString(Qt::LocalDate), msg.escapedBody() ), + msg.setBody( TQString::tqfromLatin1("<span title=\"%1\">%2</span>") + .tqarg( dt.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText); @@ -403,7 +403,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(TQDate date) TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, const Kopete::Contact *c, Sens sens, bool reverseOrder, bool colorize) { - //TQDate dd = TQDate::currentDate().addMonths(0-m_currentMonth); + //TQDate dd = TQDate::tqcurrentDate().addMonths(0-m_currentMonth); TQValueList<Kopete::Message> messages; @@ -418,7 +418,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, return messages; } - if(c && !m_metaContact->contacts().contains(c) ) + if(c && !m_metaContact->contacts().tqcontains(c) ) return messages; if(sens ==0 ) //if no sens are selected, just continue in the previous sens @@ -473,7 +473,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, // date, this date will bocomes the limit. TQDomNode n; - if(m_currentElements.contains(*it)) + if(m_currentElements.tqcontains(*it)) n=m_currentElements[*it]; else //there is not yet "next message" register, so we will take the first (for the current month) { @@ -490,7 +490,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, if( !msgElem2.isNull() && msgElem2.tagName()=="msg") { rxTime.search(msgElem2.attribute("time")); - TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + TQDate d=TQDate::tqcurrentDate().addMonths(0-m_currentMonth); TQDateTime dt( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); if(!timestamp.isValid() || ((sens==Chronological )? dt < timestamp : dt > timestamp) ) { @@ -512,7 +512,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, } else //we don't have to merge the history. just take the next item in the contact { - if(m_currentElements.contains(currentContact)) + if(m_currentElements.tqcontains(currentContact)) msgElem=m_currentElements[currentContact]; else { @@ -572,7 +572,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, if(!m_hideOutgoing || dir != Kopete::Message::Outbound) { //parse only if we don't hide it - if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) )) + if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().tqcontains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().tqcontains(m_filter,m_filterCaseSensitive) )) { TQString f=msgElem.attribute("from" ); const Kopete::Contact *from=(f.isNull() || !currentContact) ? 0L : currentContact->account()->contacts()[f]; @@ -587,23 +587,23 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, { //parse timestamp only if it was not already parsed rxTime.search(msgElem.attribute("time")); - TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + TQDate d=TQDate::tqcurrentDate().addMonths(0-m_currentMonth); timestamp=TQDateTime( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) ); } Kopete::Message msg(timestamp, from, to, msgElem.text(), dir); if (colorize) { - msg.setBody( TQString::fromLatin1("<span style=\"color:%1\" title=\"%2\">%3</span>") - .arg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ), + msg.setBody( TQString::tqfromLatin1("<span style=\"color:%1\" title=\"%2\">%3</span>") + .tqarg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); msg.setFg( fgColor ); } else { - msg.setBody( TQString::fromLatin1("<span title=\"%1\">%2</span>") - .arg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ), + msg.setBody( TQString::tqfromLatin1("<span title=\"%1\">%2</span>") + .tqarg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); } @@ -635,7 +635,7 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, TQRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)"); rx.search(msgElem.attribute("time")); - TQDate d = TQDate::currentDate().addMonths(0-m_currentMonth); + TQDate d = TQDate::tqcurrentDate().addMonths(0-m_currentMonth); timestamp = TQDateTime( TQDate(d.year(), d.month(), rx.cap(1).toUInt()), TQTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) ); @@ -663,25 +663,25 @@ TQValueList<Kopete::Message> HistoryLogger::readMessages(unsigned int lines, TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date) { - TQString name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString name = c->protocol()->pluginId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - TQString filename=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; + TQString filename=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ; //Check if there is a kopete 0.7.x file TQFileInfo fi(filename); if(!fi.exists()) { - name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + - TQString::fromLatin1( "/" ) + - c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + name = c->protocol()->pluginId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + + TQString::tqfromLatin1( "/" ) + + c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) + date.toString(".yyyyMM"); - TQString filename2=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; + TQString filename2=locateLocal( "data", TQString::tqfromLatin1( "kopete/logs/" ) + name+ TQString::tqfromLatin1( ".xml" ) ) ; TQFileInfo fi2(filename2); if(fi2.exists()) @@ -702,20 +702,20 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) // BEGIN check if there are Kopete 0.7.x TQDir d1(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) )); d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); d1.setSorting( TQDir::Name ); - const QFileInfoList *list1 = d1.entryInfoList(); - QFileInfoListIterator it1( *list1 ); + const TQFileInfoList *list1 = d1.entryInfoList(); + TQFileInfoListIterator it1( *list1 ); while ( (fi = it1.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) + if(fi->fileName().tqcontains(c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt(); if(result < 0) { @@ -730,22 +730,22 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) TQDir d(locateLocal("data",TQString("kopete/logs/")+ - c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + - TQString::fromLatin1( "/" ) + - c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + c->protocol()->pluginId().tqreplace( TQRegExp(TQString::tqfromLatin1("[./~?*]")),TQString::tqfromLatin1("-")) + + TQString::tqfromLatin1( "/" ) + + c->account()->accountId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ) )); d.setFilter( TQDir::Files | TQDir::NoSymLinks ); d.setSorting( TQDir::Name ); - const QFileInfoList *list = d.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = d.entryInfoList(); + TQFileInfoListIterator it( *list ); while ( (fi = it.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) + if(fi->fileName().tqcontains(c->contactId().tqreplace( TQRegExp( TQString::tqfromLatin1( "[./~?*]" ) ), TQString::tqfromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::tqcurrentDate().year() - rx.cap(1).toUInt()) +TQDate::tqcurrentDate().month() - rx.cap(2).toUInt(); if(result < 0) { kdWarning(14310) << k_funcinfo << "Kopete only found log file made in the future. Check your date!" << endl; @@ -838,7 +838,7 @@ TQValueList<int> HistoryLogger::getDaysForMonth(TQDate date) pos += rxTime.matchedLength(); int day=rxTime.capturedTexts()[1].toInt(); - if ( day !=lastDay && dayList.find(day) == dayList.end()) // avoid duplicates + if ( day !=lastDay && dayList.tqfind(day) == dayList.end()) // avoid duplicates { dayList.append(rxTime.capturedTexts()[1].toInt()); lastDay=day; diff --git a/kopete/plugins/history/historylogger.h b/kopete/plugins/history/historylogger.h index c8a7690c..6d01754d 100644 --- a/kopete/plugins/history/historylogger.h +++ b/kopete/plugins/history/historylogger.h @@ -32,9 +32,10 @@ class TQTimer; * * @author Olivier Goffart */ -class HistoryLogger : public QObject +class HistoryLogger : public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -46,8 +47,8 @@ public: /** * Constructor, takes the contact, and the color of messages */ - HistoryLogger( Kopete::MetaContact *m , TQObject *parent = 0, const char *name = 0); - HistoryLogger( Kopete::Contact *c , TQObject *parent = 0, const char *name = 0); + HistoryLogger( Kopete::MetaContact *m , TQObject *tqparent = 0, const char *name = 0); + HistoryLogger( Kopete::Contact *c , TQObject *tqparent = 0, const char *name = 0); ~HistoryLogger(); diff --git a/kopete/plugins/history/historyplugin.cpp b/kopete/plugins/history/historyplugin.cpp index af92fc09..789b331c 100644 --- a/kopete/plugins/history/historyplugin.cpp +++ b/kopete/plugins/history/historyplugin.cpp @@ -41,11 +41,11 @@ typedef KGenericFactory<HistoryPlugin> HistoryPluginFactory; static const KAboutData aboutdata("kopete_history", I18N_NOOP("History") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_history, HistoryPluginFactory( &aboutdata ) ) -HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( HistoryPluginFactory::instance(), parent, name ), m_loggerFactory( this ) +HistoryPlugin::HistoryPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( HistoryPluginFactory::instance(), tqparent, name ), m_loggerFactory( this ) { KAction *viewMetaContactHistory = new KAction( i18n("View &History" ), - TQString::fromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), + TQString::tqfromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), actionCollection(), "viewMetaContactHistory" ); viewMetaContactHistory->setEnabled( Kopete::ContactList::self()->selectedMetaContacts().count() == 1 ); @@ -76,7 +76,7 @@ HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQString TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions(); for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it) { - if(!m_loggers.contains(*it)) + if(!m_loggers.tqcontains(*it)) { m_loggers.insert(*it, new HistoryGUIClient( *it ) ); connect( *it, TQT_SIGNAL(closing(Kopete::ChatSession*)), @@ -102,7 +102,7 @@ void HistoryPlugin::messageDisplayed(const Kopete::Message &m) if(m.direction()==Kopete::Message::Internal || !m.manager()) return; - if(!m_loggers.contains(m.manager())) + if(!m_loggers.tqcontains(m.manager())) { m_loggers.insert(m.manager() , new HistoryGUIClient( m.manager() ) ); connect(m.manager(), TQT_SIGNAL(closing(Kopete::ChatSession*)), @@ -136,7 +136,7 @@ void HistoryPlugin::slotViewHistory() void HistoryPlugin::slotViewCreated( KopeteView* v ) { - if(v->plugin()->pluginInfo()->pluginName() != TQString::fromLatin1("kopete_chatwindow") ) + if(v->plugin()->pluginInfo()->pluginName() != TQString::tqfromLatin1("kopete_chatwindow") ) return; //Email chat windows are not supported. bool autoChatWindow = HistoryConfig::auto_chatwindow(); @@ -149,7 +149,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) if(!m_currentChatSession) return; //i am sorry - if(!m_loggers.contains(m_currentChatSession)) + if(!m_loggers.tqcontains(m_currentChatSession)) { m_loggers.insert(m_currentChatSession , new HistoryGUIClient( m_currentChatSession ) ); connect( m_currentChatSession, TQT_SIGNAL(closing(Kopete::ChatSession*)), diff --git a/kopete/plugins/history/historyplugin.h b/kopete/plugins/history/historyplugin.h index 8c0f553d..560d09b5 100644 --- a/kopete/plugins/history/historyplugin.h +++ b/kopete/plugins/history/historyplugin.h @@ -74,8 +74,9 @@ public: class HistoryPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: - HistoryPlugin( TQObject *parent, const char *name, const TQStringList &args ); + HistoryPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~HistoryPlugin(); /** diff --git a/kopete/plugins/history/historypreferences.cpp b/kopete/plugins/history/historypreferences.cpp index 370e6721..959f9653 100644 --- a/kopete/plugins/history/historypreferences.cpp +++ b/kopete/plugins/history/historypreferences.cpp @@ -29,8 +29,8 @@ typedef KGenericFactory<HistoryPreferences> HistoryConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_history, HistoryConfigFactory( "kcm_kopete_history" ) ) -HistoryPreferences::HistoryPreferences(TQWidget *parent, const char*/*name*/, const TQStringList &args) - : KCModule(HistoryConfigFactory::instance(), parent, args) +HistoryPreferences::HistoryPreferences(TQWidget *tqparent, const char*/*name*/, const TQStringList &args) + : KCModule(HistoryConfigFactory::instance(), tqparent, args) { kdDebug(14310) << k_funcinfo << "called." << endl; (new TQVBoxLayout(this))->setAutoAdd(true); diff --git a/kopete/plugins/history/historypreferences.h b/kopete/plugins/history/historypreferences.h index bed6de7b..848580b2 100644 --- a/kopete/plugins/history/historypreferences.h +++ b/kopete/plugins/history/historypreferences.h @@ -29,8 +29,9 @@ class HistoryPrefsUI; class HistoryPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - HistoryPreferences(TQWidget *parent=0, const char* name=0, + HistoryPreferences(TQWidget *tqparent=0, const char* name=0, const TQStringList &args = TQStringList()); ~HistoryPreferences(); diff --git a/kopete/plugins/history/historyprefsui.ui b/kopete/plugins/history/historyprefsui.ui index 5942a07a..8bcea1ae 100644 --- a/kopete/plugins/history/historyprefsui.ui +++ b/kopete/plugins/history/historyprefsui.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>HistoryPrefsUI</class> <author>Olivier Goffart</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HistoryPrefsWidget</cstring> </property> @@ -20,7 +20,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpChatHistory</cstring> </property> @@ -31,7 +31,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>lblNoLinesPerPage</cstring> </property> @@ -59,7 +59,7 @@ <string>The number of message that are shown when borwsing history in the chat window</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>colorLabel</cstring> </property> @@ -108,7 +108,7 @@ <string>This is the number of messages that will be added automatically in the chat window when opening a new chat.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>numberLabel</cstring> </property> @@ -122,7 +122,7 @@ <string>This is the number of messages that will be added automatically in the chat window when opening a new chat.</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>chkShowPrevious</cstring> </property> @@ -148,7 +148,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>90</height> @@ -178,7 +178,7 @@ <tabstop>Number_Auto_chatwindow</tabstop> <tabstop>History_color</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/kopete/plugins/history/historyviewer.ui b/kopete/plugins/history/historyviewer.ui index 4cef647e..cdf49bbe 100644 --- a/kopete/plugins/history/historyviewer.ui +++ b/kopete/plugins/history/historyviewer.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>HistoryViewer</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>HistoryViewer</cstring> </property> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>200</height> @@ -33,19 +33,19 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>statusLabel</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>20</height> @@ -62,15 +62,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>searchErase</cstring> </property> @@ -81,7 +81,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -94,7 +94,7 @@ <cstring>searchLine</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>searchButton</cstring> </property> @@ -109,13 +109,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>70</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>150</width> <height>32767</height> @@ -127,16 +127,16 @@ </widget> </hbox> </widget> - <widget class="QSplitter" row="1" column="0"> + <widget class="TQSplitter" row="1" column="0"> <property name="name"> <cstring>splitter2</cstring> </property> <property name="orientation"> <enum>Horizontal</enum> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -160,13 +160,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -207,13 +207,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -225,7 +225,7 @@ </widget> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>htmlFrame</cstring> </property> @@ -237,7 +237,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -251,15 +251,15 @@ </property> </widget> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -288,7 +288,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -296,7 +296,7 @@ <string>Message Filter:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>All messages</string> @@ -323,7 +323,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>0</height> @@ -336,7 +336,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kprogress.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kopete/plugins/latex/latexguiclient.cpp b/kopete/plugins/latex/latexguiclient.cpp index ea9420fb..154a176a 100644 --- a/kopete/plugins/latex/latexguiclient.cpp +++ b/kopete/plugins/latex/latexguiclient.cpp @@ -33,13 +33,13 @@ #include "latexplugin.h" #include "latexguiclient.h" -LatexGUIClient::LatexGUIClient( Kopete::ChatSession *parent, const char *name ) -: TQObject( parent, name ), KXMLGUIClient( parent ) +LatexGUIClient::LatexGUIClient( Kopete::ChatSession *tqparent, const char *name ) +: TQObject( tqparent, name ), KXMLGUIClient( tqparent ) { setInstance( LatexPlugin::plugin()->instance() ); connect( LatexPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) ); - m_manager = parent; + m_manager = tqparent; new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, TQT_SLOT( slotPreview() ), actionCollection(), "latexPreview" ); @@ -57,14 +57,14 @@ void LatexGUIClient::slotPreview() Kopete::Message msg = m_manager->view()->currentMessage(); TQString messageText = msg.plainBody(); - if(!messageText.contains("$$")) //we haven't found any latex strings + if(!messageText.tqcontains("$$")) //we haven't found any latex strings { KMessageBox::sorry(reinterpret_cast<TQWidget*>(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") ); return; } msg=Kopete::Message( msg.from() , msg.to() , - i18n("<b>Preview of the latex message :</b> <br />%1").arg(msg.plainBody()), + i18n("<b>Preview of the latex message :</b> <br />%1").tqarg(msg.plainBody()), Kopete::Message::Internal , Kopete::Message::RichText); m_manager->appendMessage(msg) ; } diff --git a/kopete/plugins/latex/latexguiclient.h b/kopete/plugins/latex/latexguiclient.h index 03fdbd9e..6807ccb8 100644 --- a/kopete/plugins/latex/latexguiclient.h +++ b/kopete/plugins/latex/latexguiclient.h @@ -37,9 +37,10 @@ namespace Kopete { class ChatSession; } class LatexGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - LatexGUIClient( Kopete::ChatSession *parent, const char *name=0L); + LatexGUIClient( Kopete::ChatSession *tqparent, const char *name=0L); ~LatexGUIClient(); private slots: diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp index 11537aba..61fab8a6 100644 --- a/kopete/plugins/latex/latexplugin.cpp +++ b/kopete/plugins/latex/latexplugin.cpp @@ -41,8 +41,8 @@ typedef KGenericFactory<LatexPlugin> LatexPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_latex, LatexPluginFactory( "kopete_latex" ) ) -LatexPlugin::LatexPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) -: Kopete::Plugin( LatexPluginFactory::instance(), parent, name ) +LatexPlugin::LatexPlugin( TQObject *tqparent, const char *name, const TQStringList &/*args*/ ) +: Kopete::Plugin( LatexPluginFactory::instance(), tqparent, name ) { // kdDebug() << k_funcinfo << endl; if( !s_pluginStatic ) @@ -101,7 +101,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) } TQString messageText = msg.plainBody(); - if( !messageText.contains("$$")) + if( !messageText.tqcontains("$$")) return; //kdDebug() << k_funcinfo << " Using converter: " << m_convScript << endl; @@ -132,7 +132,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) if(!securityCheck(formul)) continue; - TQString fileName=handleLatex(formul.replace("$$","")); + TQString fileName=handleLatex(formul.tqreplace("$$","")); // get the image and encode it with base64 #if ENCODED_IMAGE_MODE @@ -145,7 +145,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); renderedImage.save( &buffer, "PNG" ); - TQString imageURL = TQString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) ); + TQString imageURL = TQString::tqfromLatin1("data:image/png;base64,%1").tqarg( KCodecs::base64Encode( ba ) ); replaceMap[match] = imageURL; } #else @@ -167,8 +167,8 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) continue; imagePxWidth = theImage.width(); imagePxHeight = theImage.height(); - TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n - messageText.replace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> "); + TQString escapedLATEX=TQStyleSheet::escape(it.key()).tqreplace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n + messageText.tqreplace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> "); } msg.setBody( messageText, Kopete::Message::RichText ); @@ -187,7 +187,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg) return; TQString messageText = msg.plainBody(); - if( !messageText.contains("$$")) + if( !messageText.tqcontains("$$")) return; /* if( msg.from()->protocol()->pluginId()!="MSNProtocol" ) return;*/ @@ -206,7 +206,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg) if(!url.isNull()) { - TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","""); + TQString escapedLATEX= TQStyleSheet::escape(messageText).tqreplace("\"","""); TQString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />"; msg.setBody( messageText, Kopete::Message::RichText ); } @@ -230,9 +230,9 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula) int hDPI, vDPI; hDPI = LatexConfig::self()->horizontalDPI(); vDPI = LatexConfig::self()->verticalDPI(); - p << m_convScript << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ; + p << m_convScript << argumentRes.tqarg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.tqarg(fileName) /*<< argumentFormat*/ << latexFormula ; - kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl; + kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.tqarg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.tqarg(fileName) << endl; // FIXME our sucky sync filter API limitations :-) p.start(KProcess::Block); @@ -241,7 +241,7 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula) bool LatexPlugin::securityCheck(const TQString &latexFormula) { - return !latexFormula.contains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" + return !latexFormula.tqcontains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" "|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode" "|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks" "|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]")); diff --git a/kopete/plugins/latex/latexplugin.h b/kopete/plugins/latex/latexplugin.h index 2eb9365b..5413626f 100644 --- a/kopete/plugins/latex/latexplugin.h +++ b/kopete/plugins/latex/latexplugin.h @@ -42,11 +42,12 @@ namespace Kopete { class Message; class ChatSession; } class LatexPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: static LatexPlugin *plugin(); - LatexPlugin( TQObject *parent, const char *name, const TQStringList &args ); + LatexPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~LatexPlugin(); public slots: diff --git a/kopete/plugins/latex/latexpreferences.cpp b/kopete/plugins/latex/latexpreferences.cpp index ff02c831..e7396282 100644 --- a/kopete/plugins/latex/latexpreferences.cpp +++ b/kopete/plugins/latex/latexpreferences.cpp @@ -30,8 +30,8 @@ typedef KGenericFactory<LatexPreferences> LatexPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_latex, LatexPreferencesFactory( "kcm_kopete_latex" ) ) -LatexPreferences::LatexPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCModule(LatexPreferencesFactory::instance(), parent, args) +LatexPreferences::LatexPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCModule(LatexPreferencesFactory::instance(), tqparent, args) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_preferencesDialog = new LatexPrefsUI(this); diff --git a/kopete/plugins/latex/latexpreferences.h b/kopete/plugins/latex/latexpreferences.h index e5a70140..518d0fc6 100644 --- a/kopete/plugins/latex/latexpreferences.h +++ b/kopete/plugins/latex/latexpreferences.h @@ -31,9 +31,10 @@ class TQListViewItem; class LatexPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - LatexPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + LatexPreferences(TQWidget *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~LatexPreferences(); virtual void save(); diff --git a/kopete/plugins/latex/latexprefsbase.ui b/kopete/plugins/latex/latexprefsbase.ui index fbb11a21..fc2a865a 100644 --- a/kopete/plugins/latex/latexprefsbase.ui +++ b/kopete/plugins/latex/latexprefsbase.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>LatexPrefsUI</class> <author>Duncan Mac-Vicar</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>LatexPrefsUI</cstring> </property> @@ -17,7 +17,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -29,7 +29,7 @@ <p>This plugin requires ImageMagick convert program installed in order to work.</p></string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -50,22 +50,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -83,7 +83,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>280</width> <height>20</height> @@ -92,9 +92,9 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -105,7 +105,7 @@ <cstring>horizontalDPI</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -128,7 +128,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>220</width> <height>20</height> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -158,7 +158,7 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kopete/plugins/motionautoaway/COPYING.motion b/kopete/plugins/motionautoaway/COPYING.motion index 0b84a43f..0a56ad07 100644 --- a/kopete/plugins/motionautoaway/COPYING.motion +++ b/kopete/plugins/motionautoaway/COPYING.motion @@ -59,7 +59,7 @@ modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains + 0. This License applies to any program or other work which tqcontains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -154,7 +154,7 @@ Sections 1 and 2 above provided that you also do one of the following: The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any +code means all the source code for all modules it tqcontains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include diff --git a/kopete/plugins/motionautoaway/motionawayplugin.cpp b/kopete/plugins/motionautoaway/motionawayplugin.cpp index 8dbd8853..da4e5431 100644 --- a/kopete/plugins/motionautoaway/motionawayplugin.cpp +++ b/kopete/plugins/motionautoaway/motionawayplugin.cpp @@ -79,7 +79,7 @@ typedef __signed__ long long __s64; #define DEF_WIDTH 352 #define DEF_HEIGHT 288 -#define DEF_QUALITY 50 +#define DEF_TQUALITY 50 #define DEF_CHANGES 5000 #define DEF_POLL_INTERVAL 1500 @@ -92,14 +92,14 @@ typedef __signed__ long long __s64; typedef KGenericFactory<MotionAwayPlugin> MotionAwayPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_motionaway, MotionAwayPluginFactory( "kopete_motionaway" ) ) -MotionAwayPlugin::MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( MotionAwayPluginFactory::instance(), parent, name ) +MotionAwayPlugin::MotionAwayPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( MotionAwayPluginFactory::instance(), tqparent, name ) { kdDebug(14305) << k_funcinfo << "Called." << endl; /* This should be read from config someday may be */ m_width = DEF_WIDTH; m_height = DEF_HEIGHT; - m_quality = DEF_QUALITY; + m_quality = DEF_TQUALITY; m_maxChanges = DEF_CHANGES; m_gap = DEF_GAP; diff --git a/kopete/plugins/motionautoaway/motionawayplugin.h b/kopete/plugins/motionautoaway/motionawayplugin.h index c15caa3a..c966b832 100644 --- a/kopete/plugins/motionautoaway/motionawayplugin.h +++ b/kopete/plugins/motionautoaway/motionawayplugin.h @@ -36,9 +36,10 @@ class TQTimer; class MotionAwayPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: - MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList &args ); + MotionAwayPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~MotionAwayPlugin(); public slots: diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.cpp b/kopete/plugins/motionautoaway/motionawaypreferences.cpp index 889d4d30..46697051 100644 --- a/kopete/plugins/motionautoaway/motionawaypreferences.cpp +++ b/kopete/plugins/motionautoaway/motionawaypreferences.cpp @@ -30,8 +30,8 @@ typedef KGenericFactory<MotionAwayPreferences> MotionAwayPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_motionaway, MotionAwayPreferencesFactory("kcm_kopete_motionaway")) -MotionAwayPreferences::MotionAwayPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCModule(MotionAwayPreferencesFactory::instance(), parent, args) +MotionAwayPreferences::MotionAwayPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCModule(MotionAwayPreferencesFactory::instance(), tqparent, args) { // Add actuall widget generated from ui file. ( new TQVBoxLayout( this ) )->setAutoAdd( true ); diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.h b/kopete/plugins/motionautoaway/motionawaypreferences.h index c93784d3..246541d5 100644 --- a/kopete/plugins/motionautoaway/motionawaypreferences.h +++ b/kopete/plugins/motionautoaway/motionawaypreferences.h @@ -29,8 +29,9 @@ class motionawayPrefsUI; class MotionAwayPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - MotionAwayPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); + MotionAwayPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual void save(); virtual void load(); diff --git a/kopete/plugins/motionautoaway/motionawayprefs.ui b/kopete/plugins/motionautoaway/motionawayprefs.ui index 134f939a..e43ae524 100644 --- a/kopete/plugins/motionautoaway/motionawayprefs.ui +++ b/kopete/plugins/motionautoaway/motionawayprefs.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>motionawayPrefsUI</class> <author>Duncan Mac-Vicar P.</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>motionawayPrefsUI</cstring> </property> @@ -25,7 +25,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -47,7 +47,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -58,15 +58,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -87,7 +87,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>95</width> <height>20</height> @@ -114,7 +114,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -123,7 +123,7 @@ </spacer> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -134,15 +134,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>BecomeAvailableWithActivity</cstring> </property> @@ -163,7 +163,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -172,15 +172,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -201,7 +201,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -210,9 +210,9 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> @@ -223,7 +223,7 @@ <cstring>AwayTimeout</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -241,7 +241,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>180</width> <height>20</height> @@ -260,7 +260,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -279,7 +279,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -288,7 +288,7 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.cpp b/kopete/plugins/netmeeting/netmeetingguiclient.cpp index 9dffde7f..d8daa817 100644 --- a/kopete/plugins/netmeeting/netmeetingguiclient.cpp +++ b/kopete/plugins/netmeeting/netmeetingguiclient.cpp @@ -32,11 +32,11 @@ class NetMeetingPlugin; -NetMeetingGUIClient::NetMeetingGUIClient( MSNChatSession *parent, const char *name ) -: TQObject( parent, name ) , KXMLGUIClient(parent) +NetMeetingGUIClient::NetMeetingGUIClient( MSNChatSession *tqparent, const char *name ) +: TQObject( tqparent, name ) , KXMLGUIClient(tqparent) { setInstance(KGenericFactory<NetMeetingPlugin>::instance()); - m_manager=parent; + m_manager=tqparent; new KAction( i18n( "Invite to Use NetMeeting" ), 0, this, TQT_SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ; diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.h b/kopete/plugins/netmeeting/netmeetingguiclient.h index c847a5cd..5c337431 100644 --- a/kopete/plugins/netmeeting/netmeetingguiclient.h +++ b/kopete/plugins/netmeeting/netmeetingguiclient.h @@ -34,9 +34,10 @@ class NetMeetingPlugin; class NetMeetingGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - NetMeetingGUIClient( MSNChatSession *parent, const char *name=0L); + NetMeetingGUIClient( MSNChatSession *tqparent, const char *name=0L); ~NetMeetingGUIClient(); private slots: diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.cpp b/kopete/plugins/netmeeting/netmeetinginvitation.cpp index 5fb799c1..73e08d4a 100644 --- a/kopete/plugins/netmeeting/netmeetinginvitation.cpp +++ b/kopete/plugins/netmeeting/netmeetinginvitation.cpp @@ -32,8 +32,8 @@ #include <tqtimer.h> #include <kprocess.h> -NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, TQObject *parent) - : TQObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") ) +NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, TQObject *tqparent) + : TQObject(tqparent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") ) { m_contact=c; oki=false; @@ -59,12 +59,12 @@ void NetMeetingInvitation::parseInvitation(const TQString& msg) TQRegExp rx("Invitation-Command: ([A-Z]*)"); rx.search(msg); TQString command=rx.cap(1); - if( msg.contains("Invitation-Command: INVITE") ) + if( msg.tqcontains("Invitation-Command: INVITE") ) { MSNInvitation::parseInvitation(msg); //for the cookie unsigned int result = KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), - i18n("%1 wants to start a chat with NetMeeting; do you want to accept it? " ).arg(m_contact->metaContact()->displayName()), + i18n("%1 wants to start a chat with NetMeeting; do you want to accept it? " ).tqarg(m_contact->metaContact()->displayName()), i18n("MSN Plugin") , i18n("Accept"),i18n("Refuse")); MSNChatSession* manager=dynamic_cast<MSNChatSession*>(m_contact->manager()); @@ -98,7 +98,7 @@ void NetMeetingInvitation::parseInvitation(const TQString& msg) } } } - else if( msg.contains("Invitation-Command: ACCEPT") ) + else if( msg.tqcontains("Invitation-Command: ACCEPT") ) { if( ! incoming() ) { @@ -162,7 +162,7 @@ void NetMeetingInvitation::startMeeting(const TQString & ip_address) KConfig *config=KGlobal::config(); config->setGroup("Netmeeting Plugin"); - TQString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address); + TQString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").tqarg(ip_address); kdDebug() << k_funcinfo << app << endl ; diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.h b/kopete/plugins/netmeeting/netmeetinginvitation.h index eb4b2ba6..4efe3ed1 100644 --- a/kopete/plugins/netmeeting/netmeetinginvitation.h +++ b/kopete/plugins/netmeeting/netmeetinginvitation.h @@ -28,8 +28,9 @@ class MSNContact; class NetMeetingInvitation : public TQObject , public MSNInvitation { Q_OBJECT + TQ_OBJECT public: - NetMeetingInvitation(bool incoming ,MSNContact*, TQObject *parent = 0); + NetMeetingInvitation(bool incoming ,MSNContact*, TQObject *tqparent = 0); ~NetMeetingInvitation(); static TQString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; } diff --git a/kopete/plugins/netmeeting/netmeetingplugin.cpp b/kopete/plugins/netmeeting/netmeetingplugin.cpp index 2d71c257..715f26e6 100644 --- a/kopete/plugins/netmeeting/netmeetingplugin.cpp +++ b/kopete/plugins/netmeeting/netmeetingplugin.cpp @@ -35,8 +35,8 @@ static const KAboutData aboutdata("kopete_netmeeting", I18N_NOOP("NetMeeting") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_netmeeting, KGenericFactory<NetMeetingPlugin>( &aboutdata ) ) -NetMeetingPlugin::NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) -: Kopete::Plugin( KGlobal::instance(), parent, name ) +NetMeetingPlugin::NetMeetingPlugin( TQObject *tqparent, const char *name, const TQStringList &/*args*/ ) +: Kopete::Plugin( KGlobal::instance(), tqparent, name ) { if(MSNProtocol::protocol()) slotPluginLoaded(MSNProtocol::protocol()); @@ -81,7 +81,7 @@ void NetMeetingPlugin::slotNewKMM(Kopete::ChatSession *KMM) void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c ) { - if(!invitation && bodyMSG.contains(NetMeetingInvitation::applicationID())) + if(!invitation && bodyMSG.tqcontains(NetMeetingInvitation::applicationID())) { invitation=new NetMeetingInvitation(true,c,msnMM); invitation->parseInvitation(bodyMSG); diff --git a/kopete/plugins/netmeeting/netmeetingplugin.h b/kopete/plugins/netmeeting/netmeetingplugin.h index 495eb510..da877926 100644 --- a/kopete/plugins/netmeeting/netmeetingplugin.h +++ b/kopete/plugins/netmeeting/netmeetingplugin.h @@ -29,9 +29,10 @@ class MSNInvitation; class NetMeetingPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: - NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &args ); + NetMeetingPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~NetMeetingPlugin(); private slots: diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.cpp b/kopete/plugins/netmeeting/netmeetingpreferences.cpp index 313eb197..1c737cab 100644 --- a/kopete/plugins/netmeeting/netmeetingpreferences.cpp +++ b/kopete/plugins/netmeeting/netmeetingpreferences.cpp @@ -39,8 +39,8 @@ typedef KGenericFactory<NetmeetingPreferences> NetmeetingPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_netmeeting, NetmeetingPreferencesFactory( "kcm_kopete_netmeeting" ) ) -NetmeetingPreferences::NetmeetingPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCModule(NetmeetingPreferencesFactory::instance(), parent, args) +NetmeetingPreferences::NetmeetingPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCModule(NetmeetingPreferencesFactory::instance(), tqparent, args) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new NetmeetingPrefsUI(this); diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.h b/kopete/plugins/netmeeting/netmeetingpreferences.h index 6ad09f58..2711eab8 100644 --- a/kopete/plugins/netmeeting/netmeetingpreferences.h +++ b/kopete/plugins/netmeeting/netmeetingpreferences.h @@ -28,9 +28,10 @@ class NetmeetingPrefsUI; class NetmeetingPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - NetmeetingPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + NetmeetingPreferences(TQWidget *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~NetmeetingPreferences(); virtual void save(); diff --git a/kopete/plugins/netmeeting/netmeetingprefs_ui.ui b/kopete/plugins/netmeeting/netmeetingprefs_ui.ui index ed84eb6b..f9ab61be 100644 --- a/kopete/plugins/netmeeting/netmeetingprefs_ui.ui +++ b/kopete/plugins/netmeeting/netmeetingprefs_ui.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>NetmeetingPrefsUI</class> <author>Olivier Goffart</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Form1</cstring> </property> @@ -17,7 +17,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -26,7 +26,7 @@ This is not the same as webcam chat you can find in the newer Windows Messenger®, but uses the older NetMeeting chat you can find in old versions.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -44,15 +44,15 @@ This is not the same as webcam chat you can find in the newer Windows Messenger <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -91,14 +91,14 @@ This is not the same as webcam chat you can find in the newer Windows Messenger </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string><b>%1</b> will be replaced by the ip to call</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -112,7 +112,7 @@ This is not the same as webcam chat you can find in the newer Windows Messenger <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>60</height> @@ -139,7 +139,7 @@ This is not the same as webcam chat you can find in the newer Windows Messenger </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kopete/plugins/nowlistening/nlamarok.cpp b/kopete/plugins/nowlistening/nlamarok.cpp index 9101758c..348217bc 100644 --- a/kopete/plugins/nowlistening/nlamarok.cpp +++ b/kopete/plugins/nowlistening/nlamarok.cpp @@ -91,7 +91,7 @@ void NLamaroK::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } } @@ -107,7 +107,7 @@ void NLamaroK::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_album; } } @@ -117,7 +117,7 @@ void NLamaroK::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_artist; } } diff --git a/kopete/plugins/nowlistening/nljuk.cpp b/kopete/plugins/nowlistening/nljuk.cpp index 422e0db9..fe58aba4 100644 --- a/kopete/plugins/nowlistening/nljuk.cpp +++ b/kopete/plugins/nowlistening/nljuk.cpp @@ -58,13 +58,13 @@ void NLJuk::update() { TQDataStream arg( data, IO_WriteOnly ); - arg << TQString::fromLatin1("Album"); + arg << TQString::tqfromLatin1("Album"); if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_album; } } @@ -72,13 +72,13 @@ void NLJuk::update() { TQDataStream arg( data, IO_WriteOnly ); - arg << TQString::fromLatin1("Artist"); + arg << TQString::tqfromLatin1("Artist"); if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_artist; } } @@ -86,13 +86,13 @@ void NLJuk::update() { TQDataStream arg( data, IO_WriteOnly ); - arg << TQString::fromLatin1("Title"); + arg << TQString::tqfromLatin1("Title"); if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkaffeine.cpp b/kopete/plugins/nowlistening/nlkaffeine.cpp index d5823298..c2b70ba3 100644 --- a/kopete/plugins/nowlistening/nlkaffeine.cpp +++ b/kopete/plugins/nowlistening/nlkaffeine.cpp @@ -85,7 +85,7 @@ void NLKaffeine::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkscd.cpp b/kopete/plugins/nowlistening/nlkscd.cpp index 06bf6c28..bd9b9b6b 100644 --- a/kopete/plugins/nowlistening/nlkscd.cpp +++ b/kopete/plugins/nowlistening/nlkscd.cpp @@ -69,7 +69,7 @@ void NLKscd::update() << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) reply >> m_artist; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -82,7 +82,7 @@ void NLKscd::update() << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) reply >> m_album; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -94,7 +94,7 @@ void NLKscd::update() kdDebug( 14307 ) << "NLKscd::update() - there was some error using DCOP." << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; //kdDebug( 14307 ) << "the result is: " << newTrack.latin1() // << endl; diff --git a/kopete/plugins/nowlistening/nlnoatun.cpp b/kopete/plugins/nowlistening/nlnoatun.cpp index c9c504c2..4f414a11 100644 --- a/kopete/plugins/nowlistening/nlnoatun.cpp +++ b/kopete/plugins/nowlistening/nlnoatun.cpp @@ -39,7 +39,7 @@ void NLNoatun::update() m_playing = false; TQString newTrack; // see if it's registered with DCOP - TQCString appname = find(); + TQCString appname = tqfind(); if ( !appname.isEmpty() ) { // see if it's playing @@ -76,7 +76,7 @@ void NLNoatun::update() << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } else kdDebug( 14307 ) << "NLNoatun::update(), title() returned unexpected reply type!" << endl; @@ -97,7 +97,7 @@ void NLNoatun::update() kdDebug( 14307 ) << "NLNoatun::update() - noatun not found" << endl; } -TQCString NLNoatun::find() const +TQCString NLNoatun::tqfind() const { TQCString app = "noatun"; if ( !m_client->isApplicationRegistered( app ) ) @@ -137,7 +137,7 @@ TQString NLNoatun::currentProperty( TQCString appname, TQString property ) const else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> result; } diff --git a/kopete/plugins/nowlistening/nlnoatun.h b/kopete/plugins/nowlistening/nlnoatun.h index 85e1aaac..30956611 100644 --- a/kopete/plugins/nowlistening/nlnoatun.h +++ b/kopete/plugins/nowlistening/nlnoatun.h @@ -32,7 +32,7 @@ class NLNoatun : public NLMediaPlayer NLNoatun( DCOPClient *client ); virtual void update(); protected: - TQCString find() const; + TQCString tqfind() const; TQString currentProperty( TQCString appname, TQString property ) const; DCOPClient *m_client; }; diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp index c5e47ef0..ddbf50bd 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp @@ -29,11 +29,11 @@ #include <klocale.h> #include <kmessagebox.h> -NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *parent, NowListeningPlugin *plugin ) - : TQObject(parent) , KXMLGUIClient(parent) +NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *tqparent, NowListeningPlugin *plugin ) + : TQObject(tqparent) , KXMLGUIClient(tqparent) { connect(plugin, TQT_SIGNAL(readyForUnload()), TQT_SLOT(slotPluginUnloaded())); - m_msgManager = parent; + m_msgManager = tqparent; m_action = new KAction( i18n( "Send Media Info" ), 0, this, TQT_SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" ); setXMLFile("nowlisteningchatui.rc"); diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.h b/kopete/plugins/nowlistening/nowlisteningguiclient.h index b12b0424..7ed37b7e 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.h +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.h @@ -34,9 +34,10 @@ namespace Kopete { class NowListeningGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - NowListeningGUIClient( Kopete::ChatSession* parent, NowListeningPlugin* plugin ); + NowListeningGUIClient( Kopete::ChatSession* tqparent, NowListeningPlugin* plugin ); virtual ~NowListeningGUIClient() {} protected slots: diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp index 4c286b0f..0d782a39 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp +++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp @@ -47,7 +47,7 @@ #include "nlkaffeine.h" #include "nowlisteningguiclient.h" -#if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS +#if defined TQ_WS_X11 && !defined K_WS_TQTONLY && defined HAVE_XMMS #include "nlxmms.h" #endif @@ -78,8 +78,8 @@ public: typedef KGenericFactory<NowListeningPlugin> NowListeningPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_nowlistening, NowListeningPluginFactory( "kopete_nowlistening" ) ) -NowListeningPlugin::NowListeningPlugin( TQObject *parent, const char* name, const TQStringList& /*args*/ ) -: Kopete::Plugin( NowListeningPluginFactory::instance(), parent, name ) +NowListeningPlugin::NowListeningPlugin( TQObject *tqparent, const char* name, const TQStringList& /*args*/ ) +: Kopete::Plugin( NowListeningPluginFactory::instance(), tqparent, name ) { if ( pluginStatic_ ) kdDebug( 14307 )<<"####"<<"Now Listening already initialized"<<endl; @@ -116,7 +116,7 @@ NowListeningPlugin::NowListeningPlugin( TQObject *parent, const char* name, cons d->m_mediaPlayerList.append( new NLamaroK( d->m_client ) ); d->m_mediaPlayerList.append( new NLKaffeine( d->m_client ) ); -#if defined Q_WS_X11 && !defined K_WS_QTONLY && HAVE_XMMS +#if defined TQ_WS_X11 && !defined K_WS_TQTONLY && HAVE_XMMS d->m_mediaPlayerList.append( new NLXmms() ); #endif @@ -205,7 +205,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) for( Kopete::Contact *c = dest.first() ; c ; c = dest.next() ) { const TQString& cId = c->contactId(); - if( 0 == d->m_musicSentTo.contains( cId ) ) + if( 0 == d->m_musicSentTo.tqcontains( cId ) ) { mustSendAnyway = true; @@ -298,7 +298,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() // KDE4 TODO: Use the new status message framework, and remove this "hack". if( isPlaying ) { - advert = TQString("[Music]%1").arg(mediaList); + advert = TQString("[Music]%1").tqarg(mediaList); } } @@ -306,9 +306,9 @@ void NowListeningPlugin::slotAdvertCurrentMusic() { if( NowListeningConfig::self()->appendStatusAdvertising() ) { - // Check for the now listening message in parenthesis, - // include the header to not override other messages in parenthesis. - TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) ); + // Check for the now listening message in tqparenthesis, + // include the header to not override other messages in tqparenthesis. + TQRegExp statusSong( TQString(" \\(%1.*\\)$").tqarg( NowListeningConfig::header()) ); // HACK: Don't keep appending the now listened song. Replace it in the status message. advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); @@ -318,16 +318,16 @@ void NowListeningPlugin::slotAdvertCurrentMusic() { if(statusSong.search(advert) != -1) { - advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) ); + advert = advert.tqreplace(statusSong, TQString(" (%1)").tqarg(mediaPlayerAdvert(false)) ); } else { - advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) ); + advert += TQString(" (%1)").tqarg( mediaPlayerAdvert(false) ); } } else { - advert = advert.replace(statusSong, ""); + advert = advert.tqreplace(statusSong, ""); } } else @@ -336,7 +336,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() } } - a->setOnlineStatus(a->myself()->onlineStatus(), advert); + a->setOnlineStatus(a->myself()->onlinetqStatus(), advert); } } } @@ -432,7 +432,7 @@ TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, // recursively replace contents of matching () TQString substitution = substDepthFirst( player, in.mid( i + 1, j - i - 1), true ) ; - in.replace ( i, j - i + 1, substitution ); + in.tqreplace ( i, j - i + 1, substitution ); // perform substitution and return the result i = i + substitution.length() - 1; break; @@ -446,34 +446,34 @@ TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, // no () found, perform substitution! // get each string (to) to substitute for (from) bool done = false; - if ( in.contains ( "%track" ) ) + if ( in.tqcontains ( "%track" ) ) { if ( track.isEmpty() ) track = i18n("Unknown track"); - in.replace( "%track", track ); + in.tqreplace( "%track", track ); done = true; } - if ( in.contains ( "%artist" ) && !artist.isEmpty() ) + if ( in.tqcontains ( "%artist" ) && !artist.isEmpty() ) { if ( artist.isEmpty() ) artist = i18n("Unknown artist"); - in.replace( "%artist", artist ); + in.tqreplace( "%artist", artist ); done = true; } - if ( in.contains ( "%album" ) && !album.isEmpty() ) + if ( in.tqcontains ( "%album" ) && !album.isEmpty() ) { if ( album.isEmpty() ) album = i18n("Unknown album"); - in.replace( "%album", album ); + in.tqreplace( "%album", album ); done = true; } - if ( in.contains ( "%player" ) && !playerName.isEmpty() ) + if ( in.tqcontains ( "%player" ) && !playerName.isEmpty() ) { if ( playerName.isEmpty() ) playerName = i18n("Unknown player"); - in.replace( "%player", playerName ); + in.tqreplace( "%player", playerName ); done = true; } // make whether we return anything dependent on whether we diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.h b/kopete/plugins/nowlistening/nowlisteningplugin.h index 1108a9a5..6b7b3d71 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.h +++ b/kopete/plugins/nowlistening/nowlisteningplugin.h @@ -37,11 +37,12 @@ class TQStringList; class NowListeningPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT friend class NowListeningGUIClient; public: - NowListeningPlugin( TQObject *parent, const char *name, const TQStringList &args ); + NowListeningPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); virtual ~NowListeningPlugin(); static NowListeningPlugin* plugin(); diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp index 118b37da..6e1751ab 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp @@ -36,8 +36,8 @@ typedef KGenericFactory<NowListeningPreferences> NowListeningPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_nowlistening, NowListeningPreferencesFactory( "kcm_kopete_nowlistening" ) ) -NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCModule( NowListeningPreferencesFactory::instance(), parent, args ) +NowListeningPreferences::NowListeningPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCModule( NowListeningPreferencesFactory::instance(), tqparent, args ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new NowListeningPrefsUI( this ); @@ -50,7 +50,7 @@ NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* / preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Juk")); preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("amaroK")); preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kaffeine")); -#if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS +#if defined TQ_WS_X11 && !defined K_WS_TQTONLY && defined HAVE_XMMS preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("XMMS")); #endif load(); diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.h b/kopete/plugins/nowlistening/nowlisteningpreferences.h index 078b1a0c..a0881113 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.h +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.h @@ -32,8 +32,9 @@ class NowListeningConfig; class NowListeningPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - NowListeningPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); + NowListeningPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual ~NowListeningPreferences(); virtual void save(); virtual void load(); diff --git a/kopete/plugins/nowlistening/nowlisteningprefs.ui b/kopete/plugins/nowlistening/nowlisteningprefs.ui index 08dd72b9..dc418729 100644 --- a/kopete/plugins/nowlistening/nowlisteningprefs.ui +++ b/kopete/plugins/nowlistening/nowlisteningprefs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>NowListeningPrefsUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>NowListeningPrefsUI</cstring> </property> @@ -25,18 +25,18 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>advertiseNewMediaToBuddiesLabel</cstring> </property> <property name="text"> <string><b>Share Your Musical Taste</b></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QFrame" row="1" column="0"> + <widget class="TQFrame" row="1" column="0"> <property name="name"> <cstring>advertiseNewMediaToBuddiesHLine</cstring> </property> @@ -47,11 +47,11 @@ <enum>Sunken</enum> </property> </widget> - <widget class="QTabWidget" row="2" column="0"> + <widget class="TQTabWidget" row="2" column="0"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -62,15 +62,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>useThisMessageLabel</cstring> </property> @@ -78,7 +78,7 @@ <string>Use this message when advertising:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>helperLabel</cstring> </property> @@ -86,33 +86,33 @@ <string>%track, %artist, %album, %player will be substituted if known. Expressions in brackets depend on a substitution being made.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_headerLabel</cstring> </property> <property name="text"> <string>Start with:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="buddy" stdset="0"> <cstring>m_header</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_Header</cstring> </property> @@ -120,21 +120,21 @@ Expressions in brackets depend on a substitution being made.</string> <string>Now Listening To: </string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_perTrackLabel</cstring> </property> <property name="text"> <string>For each track:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="buddy" stdset="0"> <cstring>m_perTrack</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_PerTrack</cstring> </property> @@ -142,21 +142,21 @@ Expressions in brackets depend on a substitution being made.</string> <string>%track (by %artist)(on %album)</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_conjunctionLabel</cstring> </property> <property name="text"> <string>Conjunction (if >1 track):</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> <property name="buddy" stdset="0"> <cstring>m_conjunction</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>kcfg_Conjunction</cstring> </property> @@ -178,7 +178,7 @@ Expressions in brackets depend on a substitution being made.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -187,7 +187,7 @@ Expressions in brackets depend on a substitution being made.</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -198,7 +198,7 @@ Expressions in brackets depend on a substitution being made.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -212,7 +212,7 @@ Expressions in brackets depend on a substitution being made.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kcfg_ExplicitAdvertising</cstring> </property> @@ -222,7 +222,7 @@ or by typing "/media" in the chat window edit area.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kcfg_ChatAdvertising</cstring> </property> @@ -230,7 +230,7 @@ window edit area.</string> <string>&Show in chat window (automatic)</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kcfg_StatusAdvertising</cstring> </property> @@ -239,7 +239,7 @@ window edit area.</string> in place of your status message.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kcfg_AppendStatusAdvertising</cstring> </property> @@ -259,7 +259,7 @@ in place of your status message.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>80</height> @@ -268,7 +268,7 @@ in place of your status message.</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -279,15 +279,15 @@ in place of your status message.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2_2</cstring> + <cstring>tqlayout2_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_UseSpecifiedMediaPlayer</cstring> </property> @@ -332,7 +332,7 @@ in place of your status message.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -352,7 +352,7 @@ in place of your status message.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -369,7 +369,7 @@ in place of your status message.</string> <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistbox.h</includehint> </includehints> diff --git a/kopete/plugins/smpppdcs/Changelog.smpppdcs b/kopete/plugins/smpppdcs/Changelog.smpppdcs index 80854a86..4884da4f 100644 --- a/kopete/plugins/smpppdcs/Changelog.smpppdcs +++ b/kopete/plugins/smpppdcs/Changelog.smpppdcs @@ -19,7 +19,7 @@ Changelog * using KConfigXT for configuration * using dcopidl2cpp stub generated from kinternetiface.h (from kinternet package), no more own implementation -* experimental implementation of the the KDED-NetworkStatus (not active, yet) +* experimental implementation of the the KDED-NetworktqStatus (not active, yet) * significantly speeded up automatic detection of a SMPPPD * BUGFIX: reloading the plugin in a already running Kopete will no more result in an inactive plugin diff --git a/kopete/plugins/smpppdcs/detector.h b/kopete/plugins/smpppdcs/detector.h index 094de9e5..1889a84f 100644 --- a/kopete/plugins/smpppdcs/detector.h +++ b/kopete/plugins/smpppdcs/detector.h @@ -48,7 +48,7 @@ public: */ virtual ~Detector() {} - virtual void checkStatus() const = 0; + virtual void checktqStatus() const = 0; virtual void smpppdServerChange() {} diff --git a/kopete/plugins/smpppdcs/detectornetstat.cpp b/kopete/plugins/smpppdcs/detectornetstat.cpp index cb9a393a..a08f2c4f 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.cpp +++ b/kopete/plugins/smpppdcs/detectornetstat.cpp @@ -21,13 +21,13 @@ #include "detectornetstat.h" DetectorNetstat::DetectorNetstat(IConnector* connector) - : Detector(connector), m_buffer(TQString::null), m_process(NULL) {} + : Detector(connector), m_buffer(TQString()), m_process(NULL) {} DetectorNetstat::~DetectorNetstat() { delete m_process; } -void DetectorNetstat::checkStatus() const { +void DetectorNetstat::checktqStatus() const { kdDebug(14312) << k_funcinfo << endl; if(m_process) { @@ -37,7 +37,7 @@ void DetectorNetstat::checkStatus() const { return; } - m_buffer = TQString::null; + m_buffer = TQString(); // Use KProcess to run netstat -r. We'll then parse the output of // netstat -r in slotProcessStdout() to see if it mentions the @@ -59,15 +59,15 @@ void DetectorNetstat::checkStatus() const { void DetectorNetstat::slotProcessStdout(KProcess *, char *buffer, int buflen) { // Look for a default gateway kdDebug(14312) << k_funcinfo << endl; - m_buffer += TQString::fromLatin1(buffer, buflen); + m_buffer += TQString::tqfromLatin1(buffer, buflen); kdDebug(14312) << m_buffer << endl; } void DetectorNetstat::slotProcessExited(KProcess *process) { kdDebug(14312) << k_funcinfo << m_buffer << endl; if(process == m_process) { - m_connector->setConnectedStatus(m_buffer.contains("default")); - m_buffer = TQString::null; + m_connector->setConnectedtqStatus(m_buffer.tqcontains("default")); + m_buffer = TQString(); delete m_process; m_process = 0L; } diff --git a/kopete/plugins/smpppdcs/detectornetstat.h b/kopete/plugins/smpppdcs/detectornetstat.h index bd41ae58..1f6d1161 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.h +++ b/kopete/plugins/smpppdcs/detectornetstat.h @@ -29,6 +29,7 @@ class IConnector; */ class DetectorNetstat : protected TQObject, public Detector { Q_OBJECT + TQ_OBJECT DetectorNetstat(const DetectorNetstat&); DetectorNetstat& operator=(const DetectorNetstat&); @@ -37,7 +38,7 @@ public: DetectorNetstat(IConnector* connector); virtual ~DetectorNetstat(); - virtual void checkStatus() const; + virtual void checktqStatus() const; private slots: // Original cs-plugin code diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp index e2b1ae19..a6fd2cb6 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp @@ -22,45 +22,45 @@ #include "iconnector.h" #include "detectornetworkstatus.h" -DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector) +DetectorNetworktqStatus::DetectorNetworktqStatus(IConnector* connector) : Detector(connector), m_connManager(NULL) { m_connManager = ConnectionManager::self(); - connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus)), - this, TQT_SLOT(statusChanged(const TQString&, NetworkStatus::EnumStatus))); + connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworktqStatus::EnumtqStatus)), + this, TQT_SLOT(statusChanged(const TQString&, NetworktqStatus::EnumtqStatus))); } -DetectorNetworkStatus::~DetectorNetworkStatus() {} +DetectorNetworktqStatus::~DetectorNetworktqStatus() {} -void DetectorNetworkStatus::checkStatus() const { +void DetectorNetworktqStatus::checktqStatus() const { // needs to do nothing } -void DetectorNetworkStatus::statusChanged(const TQString& host, NetworkStatus::EnumStatus status) { +void DetectorNetworktqStatus::statusChanged(const TQString& host, NetworktqStatus::EnumtqStatus status) { switch(status) { - case NetworkStatus::Offline: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl; + case NetworktqStatus::Offline: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Offline" << endl; break; - case NetworkStatus::OfflineFailed: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineFailed" << endl; + case NetworktqStatus::OfflineFailed: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::OfflineFailed" << endl; break; - case NetworkStatus::OfflineDisconnected: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::OfflineDisconnected" << endl; + case NetworktqStatus::OfflineDisconnected: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::OfflineDisconnected" << endl; break; - case NetworkStatus::ShuttingDown: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::ShuttingDown" << endl; + case NetworktqStatus::ShuttingDown: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::ShuttingDown" << endl; break; - case NetworkStatus::Establishing: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Establishing" << endl; + case NetworktqStatus::Establishing: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Establishing" << endl; break; - case NetworkStatus::Online: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Online" << endl; + case NetworktqStatus::Online: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Online" << endl; break; - case NetworkStatus::NoNetworks: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::NoNetworks" << endl; + case NetworktqStatus::NoNetworks: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::NoNetworks" << endl; break; - case NetworkStatus::Unreachable: - kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Unreachable" << endl; + case NetworktqStatus::Unreachable: + kdDebug(14312) << k_funcinfo << host << ": NetworktqStatus::Unreachable" << endl; break; } } diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.h b/kopete/plugins/smpppdcs/detectornetworkstatus.h index dd3a7394..1c1896e6 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.h +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.h @@ -27,21 +27,22 @@ class ConnectionManager; /** @author Heiko Schäfer <heiko@rangun.de> */ -class DetectorNetworkStatus : protected TQObject, public Detector +class DetectorNetworktqStatus : protected TQObject, public Detector { Q_OBJECT + TQ_OBJECT - DetectorNetworkStatus(const DetectorNetworkStatus&); - DetectorNetworkStatus& operator=(const DetectorNetworkStatus&); + DetectorNetworktqStatus(const DetectorNetworktqStatus&); + DetectorNetworktqStatus& operator=(const DetectorNetworktqStatus&); public: - DetectorNetworkStatus(IConnector* connector); - virtual ~DetectorNetworkStatus(); + DetectorNetworktqStatus(IConnector* connector); + virtual ~DetectorNetworktqStatus(); - virtual void checkStatus() const; + virtual void checktqStatus() const; protected slots: - void statusChanged(const TQString& host, NetworkStatus::EnumStatus status); + void statusChanged(const TQString& host, NetworktqStatus::EnumtqStatus status); private: ConnectionManager * m_connManager; diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.cpp b/kopete/plugins/smpppdcs/detectorsmpppd.cpp index 772090d9..1b932d6d 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.cpp +++ b/kopete/plugins/smpppdcs/detectorsmpppd.cpp @@ -31,9 +31,9 @@ DetectorSMPPPD::DetectorSMPPPD(IConnector * connector) DetectorSMPPPD::~DetectorSMPPPD() {} /*! - \fn DetectorSMPPPD::checkStatus() + \fn DetectorSMPPPD::checktqStatus() */ -void DetectorSMPPPD::checkStatus() const { +void DetectorSMPPPD::checktqStatus() const { kdDebug(14312) << k_funcinfo << "Checking for online status..." << endl; #ifndef NOKINTERNETDCOP @@ -41,10 +41,10 @@ void DetectorSMPPPD::checkStatus() const { if(kapp->dcopClient() && m_kinternetApp != "") { switch(getConnectionStatusDCOP()) { case CONNECTED: - m_connector->setConnectedStatus(true); + m_connector->setConnectedtqStatus(true); return; case DISCONNECTED: - m_connector->setConnectedStatus(false); + m_connector->setConnectedtqStatus(false); return; default: break; @@ -63,9 +63,9 @@ void DetectorSMPPPD::checkStatus() const { c.setPassword(SMPPPDCSConfig::self()->password().utf8()); if(c.connect(server, port)) { - m_connector->setConnectedStatus(c.isOnline()); + m_connector->setConnectedtqStatus(c.isOnline()); } else { kdDebug(14312) << k_funcinfo << "not connected to smpppd => I'll try again later" << endl; - m_connector->setConnectedStatus(false); + m_connector->setConnectedtqStatus(false); } } diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.h b/kopete/plugins/smpppdcs/detectorsmpppd.h index 197fe65b..cba377e0 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.h +++ b/kopete/plugins/smpppdcs/detectorsmpppd.h @@ -39,7 +39,7 @@ public: DetectorSMPPPD(IConnector* connector); virtual ~DetectorSMPPPD(); - virtual void checkStatus() const; + virtual void checktqStatus() const; }; diff --git a/kopete/plugins/smpppdcs/iconnector.h b/kopete/plugins/smpppdcs/iconnector.h index c4846862..ab63ec71 100644 --- a/kopete/plugins/smpppdcs/iconnector.h +++ b/kopete/plugins/smpppdcs/iconnector.h @@ -37,9 +37,9 @@ public: * This method needs to get reimplemented at classes which implement * this interface. * - * @param newStatus the status of the internet connection, <code>TRUE</code> if there is a connection, otherwise <code>FALSE</code> + * @param newtqStatus the status of the internet connection, <code>TRUE</code> if there is a connection, otherwise <code>FALSE</code> */ - virtual void setConnectedStatus(bool newStatus) = 0; + virtual void setConnectedtqStatus(bool newtqStatus) = 0; }; #endif diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp index 5ff1654b..2ba2b740 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp @@ -22,7 +22,7 @@ using namespace SMPPPD; Client::Client() - : m_state(NULL), m_sock(NULL), m_serverID(TQString::null), m_serverVer(TQString::null), m_password(TQString::null) { + : m_state(NULL), m_sock(NULL), m_serverID(TQString()), m_serverVer(TQString()), m_password(TQString()) { changeState(Unsettled::instance()); } diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp index f51aa301..668496ef 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp @@ -48,8 +48,8 @@ void Ready::disconnect(Client * client) { delete socket(client); setSocket(client, NULL); - setServerID(client, TQString::null); - setServerVersion(client, TQString::null); + setServerID(client, TQString()); + setServerVersion(client, TQString()); } changeState(client, Unsettled::instance()); diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp index 3d1f8a79..ef29d992 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp @@ -86,17 +86,17 @@ bool Unsettled::connect(Client * client, const TQString& server, uint port) { TQString response = read(client)[0]; - if(response != TQString::null && + if(response != TQString() && ver.exactMatch(response)) { setServerID(client, response); setServerVersion(client, ver.cap(1)); changeState(client, Ready::instance()); return true; - } else if(response != TQString::null && + } else if(response != TQString() && clg.exactMatch(response)) { - if(password(client) != TQString::null) { + if(password(client) != TQString()) { // we are challenged, ok, respond - write(client, TQString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); + write(client, TQString("response = %1\n").tqarg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); response = read(client)[0]; if(ver.exactMatch(response)) { setServerID(client, response); diff --git a/kopete/plugins/smpppdcs/onlineinquiry.cpp b/kopete/plugins/smpppdcs/onlineinquiry.cpp index 4cab45d7..99dc7d5c 100644 --- a/kopete/plugins/smpppdcs/onlineinquiry.cpp +++ b/kopete/plugins/smpppdcs/onlineinquiry.cpp @@ -35,11 +35,11 @@ bool OnlineInquiry::isOnline(bool useSMPPPD) { m_detector = new DetectorNetstat(this); } - m_detector->checkStatus(); + m_detector->checktqStatus(); return m_online; } -void OnlineInquiry::setConnectedStatus(bool newStatus) { - m_online = newStatus; +void OnlineInquiry::setConnectedtqStatus(bool newtqStatus) { + m_online = newtqStatus; } diff --git a/kopete/plugins/smpppdcs/onlineinquiry.h b/kopete/plugins/smpppdcs/onlineinquiry.h index c9b5221a..7a0fcef2 100644 --- a/kopete/plugins/smpppdcs/onlineinquiry.h +++ b/kopete/plugins/smpppdcs/onlineinquiry.h @@ -14,8 +14,8 @@ ************************************************************************* */ -#ifndef ONLINEINQUIRY_H -#define ONLINEINQUIRY_H +#ifndef ONLINEINTQUIRY_H +#define ONLINEINTQUIRY_H #include "iconnector.h" @@ -35,7 +35,7 @@ public: bool isOnline(bool useSMPPPD); - virtual void setConnectedStatus(bool newStatus); + virtual void setConnectedtqStatus(bool newtqStatus); private: Detector * m_detector; diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp index f17f2ca9..14f133c1 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp @@ -37,9 +37,9 @@ typedef KGenericFactory<SMPPPDCSPlugin> SMPPPDCSPluginFactory; K_EXPORT_COMPONENT_FACTORY(kopete_smpppdcs, SMPPPDCSPluginFactory("kopete_smpppdcs")) -SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *parent, const char * name, const TQStringList& /* args */) - : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), parent, name), - m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworkStatus(NULL), m_timer(NULL), +SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *tqparent, const char * name, const TQStringList& /* args */) + : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), tqparent, name), + m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworktqStatus(NULL), m_timer(NULL), m_onlineInquiry(NULL) { kdDebug(14312) << k_funcinfo << endl; @@ -51,7 +51,7 @@ m_onlineInquiry(NULL) { m_detectorNetstat = new DetectorNetstat(this); // experimental, not used yet - m_detectorNetworkStatus = new DetectorNetworkStatus(this); + m_detectorNetworktqStatus = new DetectorNetworktqStatus(this); // we wait for the allPluginsLoaded signal, to connect // as early as possible after startup, but not before @@ -72,7 +72,7 @@ SMPPPDCSPlugin::~SMPPPDCSPlugin() { delete m_timer; delete m_detectorSMPPPD; delete m_detectorNetstat; - delete m_detectorNetworkStatus; + delete m_detectorNetworktqStatus; delete m_onlineInquiry; } @@ -80,7 +80,7 @@ void SMPPPDCSPlugin::allPluginsLoaded() { if(Kopete::PluginManager::self()->isAllPluginsLoaded()) { m_timer = new TQTimer(); - connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus())); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotChecktqStatus())); if(SMPPPDCSConfig::self()->useSmpppd()) { m_timer->start(30000); @@ -90,7 +90,7 @@ void SMPPPDCSPlugin::allPluginsLoaded() { m_timer->start(60000); } - slotCheckStatus(); + slotChecktqStatus(); } } @@ -98,19 +98,19 @@ bool SMPPPDCSPlugin::isOnline() const { return m_onlineInquiry->isOnline(SMPPPDCSConfig::self()->useSmpppd()); } -void SMPPPDCSPlugin::slotCheckStatus() { +void SMPPPDCSPlugin::slotChecktqStatus() { // reread config to get changes SMPPPDCSConfig::self()->readConfig(); if(SMPPPDCSConfig::self()->useSmpppd()) { - m_detectorSMPPPD->checkStatus(); + m_detectorSMPPPD->checktqStatus(); } else { - m_detectorNetstat->checkStatus(); + m_detectorNetstat->checktqStatus(); } } -void SMPPPDCSPlugin::setConnectedStatus( bool connected ) { +void SMPPPDCSPlugin::setConnectedtqStatus( bool connected ) { kdDebug(14312) << k_funcinfo << connected << endl; // We have to handle a few cases here. First is the machine is connected, and the plugin thinks @@ -153,7 +153,7 @@ void SMPPPDCSPlugin::connectAllowed() { } #endif - if(!list.contains(it.current()->protocol()->pluginId() + "_" + it.current()-> + if(!list.tqcontains(it.current()->protocol()->pluginId() + "_" + it.current()-> accountId())) { it.current()->connect(); } @@ -178,7 +178,7 @@ void SMPPPDCSPlugin::disconnectAllowed() { } #endif - if(!list.contains(it.current()->protocol()->pluginId() + "_" + it.current()->accountId())) { + if(!list.tqcontains(it.current()->protocol()->pluginId() + "_" + it.current()->accountId())) { it.current()->disconnect(); } } diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.h b/kopete/plugins/smpppdcs/smpppdcsplugin.h index 7b8bdb94..13cd8ec3 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.h +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.h @@ -48,6 +48,7 @@ class OnlineInquiry; */ class SMPPPDCSPlugin : public Kopete::Plugin, public IConnector, virtual public SMPPPDCSIFace { Q_OBJECT + TQ_OBJECT SMPPPDCSPlugin(const SMPPPDCSPlugin&); SMPPPDCSPlugin& operator=(const SMPPPDCSPlugin&); @@ -55,7 +56,7 @@ public: /** * @brief Creates an <code>SMPPPDCSPlugin</code> instance */ - SMPPPDCSPlugin( TQObject *parent, const char *name, const TQStringList &args ); + SMPPPDCSPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); /** * @brief Destroys an <code>SMPPPDCSPlugin</code> instance @@ -76,7 +77,7 @@ public: * * @see SMPPPDCSPrefs */ - virtual void setConnectedStatus( bool newStatus ); + virtual void setConnectedtqStatus( bool newtqStatus ); virtual TQString detectionMethod() const; @@ -86,7 +87,7 @@ public slots: void smpppdServerChanged(const TQString& server); private slots: - void slotCheckStatus(); + void slotChecktqStatus(); void allPluginsLoaded(); private: @@ -98,7 +99,7 @@ private: Detector * m_detectorSMPPPD; Detector * m_detectorNetstat; - Detector * m_detectorNetworkStatus; + Detector * m_detectorNetworktqStatus; bool m_pluginConnected; TQTimer * m_timer; OnlineInquiry * m_onlineInquiry; diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp index 671008bc..de950965 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp @@ -35,8 +35,8 @@ typedef KGenericFactory<SMPPPDCSPreferences> SMPPPDCSPreferencesFactory; K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs")) -SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name */, const TQStringList& args) - : KCModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) { +SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * tqparent, const char * /* name */, const TQStringList& args) + : KCModule(SMPPPDCSPreferencesFactory::instance(), tqparent, args), m_ui(NULL) { Kopete::AccountManager * manager = Kopete::AccountManager::self(); (new TQVBoxLayout(this))->setAutoAdd(true); @@ -54,7 +54,7 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name } if(it.current()->inherits("Kopete::ManagedConnectionAccount")) { - protoName += TQString(", %1").arg(i18n("connection status is managed by Kopete")); + protoName += TQString(", %1").tqarg(i18n("connection status is managed by Kopete")); } TQCheckListItem * cli = new TQCheckListItem(m_ui->accountList, @@ -134,7 +134,7 @@ void SMPPPDCSPreferences::load() while(it.current()) { TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current()); if(rex.search(cli->text(0)) > -1) { - bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1)); + bool isOn = list.tqcontains(rex.cap(2) + "Protocol_" + rex.cap(1)); // m_accountMapOld[cli->text(0)].m_on = isOn; m_accountMapCur[cli->text(0)].m_on = isOn; cli->setOn(isOn); diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.h b/kopete/plugins/smpppdcs/smpppdcspreferences.h index d521412d..3671d552 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.h +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.h @@ -25,7 +25,7 @@ class SMPPPDCSPrefs; class AccountPrivMap { public: - AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString::null) + AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString()) : m_on(isOn), m_id(id) {} bool m_on; TQString m_id; @@ -38,6 +38,7 @@ public: */ class SMPPPDCSPreferences : public KCModule { Q_OBJECT + TQ_OBJECT SMPPPDCSPreferences(const SMPPPDCSPreferences&); SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&); @@ -48,7 +49,7 @@ public: /** * @brief Creates an <code>SMPPPDCSPreferences</code> instance */ - SMPPPDCSPreferences(TQWidget * parent = 0, const char * name = 0, const TQStringList &args = TQStringList()); + SMPPPDCSPreferences(TQWidget * tqparent = 0, const char * name = 0, const TQStringList &args = TQStringList()); /** * @brief Destroys an <code>SMPPPDCSPreferences</code> instance diff --git a/kopete/plugins/smpppdcs/smpppdcsprefs.ui b/kopete/plugins/smpppdcs/smpppdcsprefs.ui index 067c55a3..80e8e6ed 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefs.ui +++ b/kopete/plugins/smpppdcs/smpppdcsprefs.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SMPPPDCSPrefsBase</class> <author>Heiko Schaefer</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SMPPPDCSPrefsBase</cstring> </property> @@ -20,11 +20,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -35,9 +35,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> @@ -49,12 +49,12 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>csMethod</cstring> </property> <property name="title"> - <string>Method of Connection Status Detection</string> + <string>Method of Connection tqStatus Detection</string> </property> <vbox> <property name="name"> @@ -66,7 +66,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>useNetstat</cstring> </property> @@ -80,7 +80,7 @@ <string>Uses the netstat command to find a gateway; suitable on dial-up computers</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>useSmpppd</cstring> </property> @@ -91,7 +91,7 @@ <string>Uses the smpppd on a gateway; suitable for a computer in a private network</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>autoCSLayout</cstring> </property> @@ -120,7 +120,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>341</width> <height>20</height> @@ -131,7 +131,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>smpppdPrefs</cstring> </property> @@ -168,7 +168,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -179,7 +179,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -203,14 +203,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>6</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>toIgnoreLabel</cstring> </property> @@ -275,7 +275,7 @@ <tabstop>useSmpppd</tabstop> <tabstop>accountList</tabstop> </tabstops> -<layoutdefaults spacing="0" margin="0"/> +<tqlayoutdefaults spacing="0" margin="0"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>smpppdlocationwidget.h</includehint> diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp index 4dbedc54..f66f9e47 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp @@ -35,8 +35,8 @@ #include "smpppdcsprefsimpl.h" #include "smpppdsearcher.h" -SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl) - : SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) { +SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* tqparent, const char* name, WFlags fl) + : SMPPPDCSPrefsBase(tqparent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) { // search for our main-plugin instance Kopete::Plugin * p = Kopete::PluginManager::self()->plugin("kopete_smpppdcs"); @@ -55,7 +55,7 @@ SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl) } // if netstat is NOT available, disable the option and set to SMPPPD - if(KStandardDirs::findExe("netstat") == TQString::null) { + if(KStandardDirs::findExe("netstat") == TQString()) { autoCSTest->setEnabled(FALSE); useNetstat->setEnabled(FALSE); useNetstat->setChecked(FALSE); diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h index 4dcbe46b..607197c3 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h @@ -32,13 +32,14 @@ class SMPPPDSearcher; class SMPPPDCSPrefs : public SMPPPDCSPrefsBase { Q_OBJECT + TQ_OBJECT SMPPPDCSPrefs(const SMPPPDCSPrefs&); SMPPPDCSPrefs& operator=(const SMPPPDCSPrefs&); public: - SMPPPDCSPrefs(TQWidget* parent, const char* name = 0, WFlags fl = 0); + SMPPPDCSPrefs(TQWidget* tqparent, const char* name = 0, WFlags fl = 0); ~SMPPPDCSPrefs(); signals: diff --git a/kopete/plugins/smpppdcs/smpppdlocationui.ui b/kopete/plugins/smpppdcs/smpppdlocationui.ui index 0424f6f6..9452893f 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationui.ui +++ b/kopete/plugins/smpppdcs/smpppdlocationui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SMPPPDLocationWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SMPPPDLocationWidgetBase</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -47,7 +47,7 @@ <string>The server on which the SMPPPD is running</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -58,9 +58,9 @@ <cstring>port</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> @@ -83,7 +83,7 @@ <string>The port on which the SMPPPD is running on</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -101,7 +101,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>130</width> <height>20</height> @@ -110,7 +110,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_passwordLabel</cstring> </property> @@ -139,7 +139,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="0"/> +<tqlayoutdefaults spacing="6" margin="0"/> <includehints> <includehint>klineedit.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp index 44de2552..a1f5f9a5 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp @@ -18,8 +18,8 @@ #include "smpppdlocationwidget.h" -SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* parent, const char* name, WFlags fl) - : SMPPPDLocationWidgetBase(parent, name, fl) {} +SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* tqparent, const char* name, WFlags fl) + : SMPPPDLocationWidgetBase(tqparent, name, fl) {} SMPPPDLocationWidget::~SMPPPDLocationWidget() {} diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.h b/kopete/plugins/smpppdcs/smpppdlocationwidget.h index 16d1edfb..3f0ba866 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.h +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.h @@ -25,12 +25,13 @@ class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase { Q_OBJECT + TQ_OBJECT SMPPPDLocationWidget(const SMPPPDLocationWidget&); SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&); public: - SMPPPDLocationWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0); + SMPPPDLocationWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0); ~SMPPPDLocationWidget(); void setServer(const TQString& serv); diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.cpp b/kopete/plugins/smpppdcs/smpppdsearcher.cpp index a06e30a9..4ec77196 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.cpp +++ b/kopete/plugins/smpppdcs/smpppdsearcher.cpp @@ -64,7 +64,7 @@ void SMPPPDSearcher::searchNetwork() { void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; - TQString myBuf = TQString::fromLatin1(buf,len); + TQString myBuf = TQString::tqfromLatin1(buf,len); TQRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"); // tokenize the string into lines TQStringList toks = TQStringList::split("\n", myBuf); @@ -82,7 +82,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf kdDebug(14312) << k_funcinfo << endl; TQRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*"); - TQString myBuf = TQString::fromLatin1(buf,len); + TQString myBuf = TQString::tqfromLatin1(buf,len); if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) { // if netstat -r found no gateway we search the network @@ -105,8 +105,8 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf /*! \fn SMPPPDSearcher::scan() const */ -bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) { - kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl; +bool SMPPPDSearcher::scan(const TQString& ip, const TQString& tqmask) { + kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << tqmask << "..." << endl; SMPPPD::Client client; @@ -123,7 +123,7 @@ bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) { uint min_range = 0; uint max_range = 255; - // calculate ip range (only last mask entry) + // calculate ip range (only last tqmask entry) TQRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"); if(lastRex.exactMatch(ip)) { @@ -134,7 +134,7 @@ bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) { ipToks.push_back(lastRex.cap(i)); } - if(lastRex.exactMatch(mask)) { + if(lastRex.exactMatch(tqmask)) { uint lastWordMask = lastRex.cap(4).toUInt(); if(lastWordMask == 0) { diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.h b/kopete/plugins/smpppdcs/smpppdsearcher.h index 81c9cb03..1e96f737 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.h +++ b/kopete/plugins/smpppdcs/smpppdsearcher.h @@ -30,6 +30,7 @@ class KProcess; */ class SMPPPDSearcher : public TQObject { Q_OBJECT + TQ_OBJECT SMPPPDSearcher(const SMPPPDSearcher&); SMPPPDSearcher& operator=(const SMPPPDSearcher&); @@ -59,13 +60,13 @@ protected: * @brief Scans a network for a smpppd * * Scans a network for a smpppd described by - * ip and mask. + * ip and tqmask. * * @param ip the ntwork ip - * @param mask the network mask + * @param tqmask the network tqmask * @return <code>TRUE</code> if an smpppd was found */ - bool scan(const TQString& ip, const TQString& mask); + bool scan(const TQString& ip, const TQString& tqmask); signals: /** diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.cpp b/kopete/plugins/smpppdcs/unittest/clienttest.cpp index f668135f..7e19290d 100644 --- a/kopete/plugins/smpppdcs/unittest/clienttest.cpp +++ b/kopete/plugins/smpppdcs/unittest/clienttest.cpp @@ -53,12 +53,12 @@ void ClientTest::testCommunicationBeforeConnect() { void ClientTest::testServerIDBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverID(), TQString::null); + CHECK(c.serverID(), TQString()); } void ClientTest::testServerVersionBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverVersion(), TQString::null); + CHECK(c.serverVersion(), TQString()); } void ClientTest::testCommunicationAfterConnect() { @@ -102,7 +102,7 @@ void ClientTest::testServerIDAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverID(), TQString::null); + CHECK(c.serverID(), TQString()); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } @@ -112,7 +112,7 @@ void ClientTest::testServerVersionAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverVersion(), TQString::null); + CHECK(c.serverVersion(), TQString()); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.h b/kopete/plugins/smpppdcs/unittest/clienttest.h index 5db7ef7b..0da9d71e 100644 --- a/kopete/plugins/smpppdcs/unittest/clienttest.h +++ b/kopete/plugins/smpppdcs/unittest/clienttest.h @@ -24,6 +24,7 @@ */ class ClientTest : public KUnitTest::SlotTester { Q_OBJECT + TQ_OBJECT ClientTest(const ClientTest&); ClientTest& operator=(const ClientTest&); diff --git a/kopete/plugins/statistics/statisticscontact.cpp b/kopete/plugins/statistics/statisticscontact.cpp index 821b8f59..c178b39b 100644 --- a/kopete/plugins/statistics/statisticscontact.cpp +++ b/kopete/plugins/statistics/statisticscontact.cpp @@ -28,10 +28,10 @@ #include "statisticscontact.h" #include "statisticsdb.h" -StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldStatus(Kopete::OnlineStatus::Unknown) +StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldtqStatus(Kopete::OnlineStatus::Unknown) { m_isChatWindowOpen = false; - m_oldStatusDateTime = TQDateTime::currentDateTime(); + m_oldStatusDateTime = TQDateTime::tqcurrentDateTime(); // Last*Changed are always false at start m_timeBetweenTwoMessagesChanged = false; @@ -60,7 +60,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) // Generate statisticsContactId or get it from database TQStringList buffer = m_db->query(TQString("SELECT statisticid FROM contacts " "WHERE contactid LIKE '%1';" - ).arg(c->contactId())); + ).tqarg(c->contactId())); if (buffer.isEmpty()) { @@ -68,7 +68,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) if ( !c->metaContact()->metaContactId().isEmpty() && !m_db->query(TQString("SELECT metacontactid FROM commonstats " "WHERE metacontactid LIKE '%1';" - ).arg(c->metaContact()->metaContactId())).isEmpty()) + ).tqarg(c->metaContact()->metaContactId())).isEmpty()) { // Use old style id m_statisticsContactId = c->metaContact()->metaContactId(); @@ -76,12 +76,12 @@ void StatisticsContact::initialize(Kopete::Contact *c) else { // Create new id - m_statisticsContactId = QUuid::createUuid().toString(); + m_statisticsContactId = TQUuid::createUuid().toString(); } // Assign contactId to m_statisticsContactId m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" - ).arg(m_statisticsContactId).arg(c->contactId())); + ).tqarg(m_statisticsContactId).tqarg(c->contactId())); } else { @@ -107,7 +107,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) // Get last time a message was received - m_lastMessageReceived = TQDateTime::currentDateTime(); + m_lastMessageReceived = TQDateTime::tqcurrentDateTime(); // Check for lastPresent @@ -129,11 +129,11 @@ void StatisticsContact::contactAdded( Kopete::Contact *c ) // Check if contact is allready in database if not add it if (m_db->query(TQString("SELECT id FROM contacts " "WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" - ).arg(m_statisticsContactId).arg(c->contactId())).isEmpty()) + ).tqarg(m_statisticsContactId).tqarg(c->contactId())).isEmpty()) { // Assign contactId to m_statisticsContactId m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" - ).arg(m_statisticsContactId).arg(c->contactId())); + ).tqarg(m_statisticsContactId).tqarg(c->contactId())); } kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; } @@ -151,7 +151,7 @@ void StatisticsContact::contactRemoved( Kopete::Contact *c ) kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" - ).arg(m_statisticsContactId).arg(c->contactId())); + ).tqarg(m_statisticsContactId).tqarg(c->contactId())); } void StatisticsContact::removeFromDB() @@ -160,11 +160,11 @@ void StatisticsContact::removeFromDB() return; kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; - m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(TQString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(TQString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1';").tqarg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").tqarg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").tqarg(m_statisticsContactId)); - m_statisticsContactId = TQString::null; + m_statisticsContactId = TQString(); } void StatisticsContact::commonStatsSave(const TQString name, const TQString statVar1, const TQString statVar2, const bool statVarChanged) @@ -176,7 +176,7 @@ void StatisticsContact::commonStatsSave(const TQString name, const TQString stat return; m_db->query(TQString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'" - "WHERE statname LIKE '%3' AND metacontactid LIKE '%4';").arg(statVar1).arg(statVar2).arg(name).arg(m_statisticsContactId)); + "WHERE statname LIKE '%3' AND metacontactid LIKE '%4';").tqarg(statVar1).tqarg(statVar2).tqarg(name).tqarg(m_statisticsContactId)); } @@ -196,7 +196,7 @@ void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1 if (m_statisticsContactId.isEmpty()) return; - TQStringList buffer = m_db->query(TQString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId)); + TQStringList buffer = m_db->query(TQString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").tqarg(name, m_statisticsContactId)); if (!buffer.isEmpty()) { statVar1 = buffer[0]; @@ -204,7 +204,7 @@ void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1 } else { - m_db->query(TQString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name)); + m_db->query(TQString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").tqarg(m_statisticsContactId, name)); statVar1 = defaultValue1; statVar2 = defaultValue2; } @@ -234,18 +234,18 @@ void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1 void StatisticsContact::newMessageReceived(Kopete::Message& m) { kdDebug() << "statistics: new message received" << endl; - TQDateTime currentDateTime = TQDateTime::currentDateTime(); + TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); if (m_timeBetweenTwoMessagesOn != -1 && m_isChatWindowOpen) { - m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(currentDateTime))/(1 + m_timeBetweenTwoMessagesOn); + m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(tqcurrentDateTime))/(1 + m_timeBetweenTwoMessagesOn); } setIsChatWindowOpen(true); m_timeBetweenTwoMessagesOn += 1; - m_lastMessageReceived = currentDateTime; + m_lastMessageReceived = tqcurrentDateTime; // Message lenght @@ -254,7 +254,7 @@ void StatisticsContact::newMessageReceived(Kopete::Message& m) // Last talked /// @todo do this in message sent too. So we need setLastTalk() - m_lastTalk = currentDateTime; + m_lastTalk = tqcurrentDateTime; m_messageLengthChanged = true; m_lastTalkChanged = true; @@ -269,32 +269,32 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta if (m_statisticsContactId.isEmpty()) return; - TQDateTime currentDateTime = TQDateTime::currentDateTime(); + TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); - /// We don't want to log if oldStatus is unknown + /// We don't want to log if oldtqStatus is unknown /// the change could not be a real one; see StatisticsPlugin::slotMySelfOnlineStatusChanged - if (m_oldStatus != Kopete::OnlineStatus::Unknown) + if (m_oldtqStatus != Kopete::OnlineStatus::Unknown) { - kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldStatus) << endl; + kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldtqStatus) << endl; m_db->query(TQString("INSERT INTO contactstatus " "(metacontactid, status, datetimebegin, datetimeend) " - "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(TQString::number(m_oldStatusDateTime.toTime_t())).arg(TQString::number(currentDateTime.toTime_t()))); + "VALUES('%1', '%2', '%3', '%4'" ");").tqarg(m_statisticsContactId).tqarg(Kopete::OnlineStatus::statusTypeToString(m_oldtqStatus)).tqarg(TQString::number(m_oldStatusDateTime.toTime_t())).tqarg(TQString::number(tqcurrentDateTime.toTime_t()))); } - if (m_oldStatus == Kopete::OnlineStatus::Online || m_oldStatus == Kopete::OnlineStatus::Away) + if (m_oldtqStatus == Kopete::OnlineStatus::Online || m_oldtqStatus == Kopete::OnlineStatus::Away) // If the last status was Online or Away, the last time contact was present is the time he goes offline { - m_lastPresent = currentDateTime; + m_lastPresent = tqcurrentDateTime; m_lastPresentChanged = true; } - m_oldStatus = status; - m_oldStatusDateTime = currentDateTime; + m_oldtqStatus = status; + m_oldStatusDateTime = tqcurrentDateTime; } -bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) +bool StatisticsContact::wastqStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) { if (m_statisticsContactId.isEmpty()) return false; @@ -303,7 +303,7 @@ bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusTyp "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "AND status LIKE '%4' " "ORDER BY datetimebegin;" - ).arg(m_statisticsContactId).arg(dt.toTime_t()).arg(dt.toTime_t()).arg(Kopete::OnlineStatus::statusTypeToString(status))); + ).tqarg(m_statisticsContactId).tqarg(dt.toTime_t()).tqarg(dt.toTime_t()).tqarg(Kopete::OnlineStatus::statusTypeToString(status))); if (!values.isEmpty()) return true; @@ -318,7 +318,7 @@ TQString StatisticsContact::statusAt(TQDateTime dt) TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "ORDER BY datetimebegin;" - ).arg(m_statisticsContactId).arg(dt.toTime_t()).arg(dt.toTime_t())); + ).tqarg(m_statisticsContactId).tqarg(dt.toTime_t()).tqarg(dt.toTime_t())); if (!values.isEmpty()) return Kopete::OnlineStatus(Kopete::OnlineStatus::statusStringToType(values[0])).description(); else return ""; @@ -337,7 +337,7 @@ TQString StatisticsContact::mainStatusDate(const TQDate& date) "(datetimebegin >= %2 AND datetimebegin <= %3 OR " "datetimeend >= %4 AND datetimeend <= %5) " "ORDER BY datetimebegin;" - ).arg(m_statisticsContactId).arg(dt1.toTime_t()).arg(dt2.toTime_t()).arg(dt1.toTime_t()).arg(dt2.toTime_t()); + ).tqarg(m_statisticsContactId).tqarg(dt1.toTime_t()).tqarg(dt2.toTime_t()).tqarg(dt1.toTime_t()).tqarg(dt2.toTime_t()); kdDebug() << request << endl; TQStringList values = m_db->query(request); @@ -389,8 +389,8 @@ TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::St if (m_statisticsContactId.isEmpty()) return mainEvents; - TQDateTime currentDateTime = TQDateTime::currentDateTime(); - buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId)); + TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); + buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").tqarg(m_statisticsContactId)); // Only select the events for which the previous is not Unknown AND the status is status. @@ -413,7 +413,7 @@ TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::St dt1.setTime_t(values[0].toInt()); dt2.setTime_t(values[values.count()-1].toInt()); - avEventsPerDay = qRound((double)values.count()/(double)dt1.daysTo(dt2)); + avEventsPerDay = tqRound((double)values.count()/(double)dt1.daysTo(dt2)); kdDebug() << "statistics: average events per day : " <<avEventsPerDay << endl; // We want to work on hours @@ -430,7 +430,7 @@ TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::St // Then we put some centroids (centroids in [0..24[) TQValueList<int> centroids; - int incr=qRound((double)hoursValues.count()/(double)avEventsPerDay); + int incr=tqRound((double)hoursValues.count()/(double)avEventsPerDay); incr = incr ? incr : 1; for (uint i=0; i<hoursValues.count(); i+=incr) { @@ -442,7 +442,7 @@ TQValueList<TQTime> StatisticsContact::mainEvents(const Kopete::OnlineStatus::St // We need to compute the centroids centroids = computeCentroids(centroids, hoursValues); - // Convert to QDateTime + // Convert to TQDateTime for (uint i=0; i<centroids.count(); i++) { kdDebug() << "statistics: new centroid : " << centroids[i] << endl; @@ -491,7 +491,7 @@ TQValueList<int> StatisticsContact::computeCentroids(const TQValueList<int>& cen int value = values[j]; if (whichCentroid[j] == i) { - newCentroids[i] = qRound((double)(value + newCentroids[i]*weight)/(double)(weight + 1)); + newCentroids[i] = tqRound((double)(value + newCentroids[i]*weight)/(double)(weight + 1)); weight++; } diff --git a/kopete/plugins/statistics/statisticscontact.h b/kopete/plugins/statistics/statisticscontact.h index 9d7f6575..1559e1fd 100644 --- a/kopete/plugins/statistics/statisticscontact.h +++ b/kopete/plugins/statistics/statisticscontact.h @@ -55,9 +55,9 @@ public: TQString statisticsContactId() { return m_statisticsContactId; } /** \brief Access method - * \return m_oldStatus + * \return m_oldtqStatus */ - Kopete::OnlineStatus::StatusType oldStatus() { return m_oldStatus; } + Kopete::OnlineStatus::StatusType oldtqStatus() { return m_oldtqStatus; } /** \brief Access method * \return m_oldStatusDateTime @@ -106,7 +106,7 @@ public: /** * \returns true if contact was status at dt, false else. */ - bool wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status); + bool wastqStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status); /** * \returns the status of the contact at dt. Return false if dt is invalid. @@ -209,9 +209,9 @@ private: /** * The interest of statistics contact is to manage the changes of status - * in order to correctly update the database. That's why here we keep the oldStatus + * in order to correctly update the database. That's why here we keep the oldtqStatus */ - Kopete::OnlineStatus::StatusType m_oldStatus; + Kopete::OnlineStatus::StatusType m_oldtqStatus; /// We keep the old status datetime here TQDateTime m_oldStatusDateTime; diff --git a/kopete/plugins/statistics/statisticsdb.cpp b/kopete/plugins/statistics/statisticsdb.cpp index 8f25623e..7d4cbe76 100644 --- a/kopete/plugins/statistics/statisticsdb.cpp +++ b/kopete/plugins/statistics/statisticsdb.cpp @@ -68,7 +68,7 @@ StatisticsDB::StatisticsDB() // Creates the tables if they do not exist. TQStringList result = query("SELECT name FROM sqlite_master WHERE type='table'"); - if (!result.contains("contacts")) + if (!result.tqcontains("contacts")) { query(TQString("CREATE TABLE contacts " "(id INTEGER PRIMARY KEY," @@ -77,7 +77,7 @@ StatisticsDB::StatisticsDB() ");")); } - if (!result.contains("contactstatus")) + if (!result.tqcontains("contactstatus")) { kdDebug() << "[Statistics] Database empty"<< endl; query(TQString("CREATE TABLE contactstatus " @@ -89,7 +89,7 @@ StatisticsDB::StatisticsDB() ");")); } - if (!result.contains("commonstats")) + if (!result.tqcontains("commonstats")) { // To store things like the contact answer time etc. query(TQString("CREATE TABLE commonstats" @@ -102,7 +102,7 @@ StatisticsDB::StatisticsDB() } /// @fixme This is not used anywhere - if (!result.contains("statsgroup")) + if (!result.tqcontains("statsgroup")) { query(TQString("CREATE TABLE statsgroup" "(id INTEGER PRIMARY KEY," diff --git a/kopete/plugins/statistics/statisticsdcopiface.h b/kopete/plugins/statistics/statisticsdcopiface.h index 9a769935..36336ae2 100644 --- a/kopete/plugins/statistics/statisticsdcopiface.h +++ b/kopete/plugins/statistics/statisticsdcopiface.h @@ -60,15 +60,15 @@ k_dcop: /** * \returns return the status of the contact at datetime. */ - virtual TQString dcopStatus(TQString id, TQString datetime) = 0; + virtual TQString dcoptqStatus(TQString id, TQString datetime) = 0; /** * \returns return the status of the contact at timeStamp. */ - virtual TQString dcopStatus(TQString id, int timeStamp) = 0; + virtual TQString dcoptqStatus(TQString id, int timeStamp) = 0; /** * \returns the main status (most used status) of the contact id at date (not time) timeStamp. Will take the day where timeStamp is. */ - virtual TQString dcopMainStatus(TQString id, int timeStamp) = 0; + virtual TQString dcopMaintqStatus(TQString id, int timeStamp) = 0; }; #endif // STATISTICSDCOP_H diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp index 461dd696..59b2da59 100644 --- a/kopete/plugins/statistics/statisticsdialog.cpp +++ b/kopete/plugins/statistics/statisticsdialog.cpp @@ -40,9 +40,9 @@ #include "statisticsplugin.h" #include "statisticsdb.h" -StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, TQWidget* parent, - const char* name) : KDialogBase(parent, name, false, - i18n("Statistics for %1").arg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact) +StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, TQWidget* tqparent, + const char* name) : KDialogBase(tqparent, name, false, + i18n("Statistics for %1").tqarg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact) { mainWidget = new StatisticsWidget(this); setMainWidget(mainWidget); @@ -63,7 +63,7 @@ StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, mainWidget->tabWidget->setCurrentPage(0); mainWidget->timePicker->setTime(TQTime::currentTime()); - mainWidget->datePicker->setDate(TQDate::currentDate()); + mainWidget->datePicker->setDate(TQDate::tqcurrentDate()); connect(mainWidget->askButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAskButtonClicked())); setFocus(); @@ -107,7 +107,7 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs void StatisticsDialog::generatePageForMonth(const int monthOfYear) { TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " - "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId())); + "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").tqarg(m_contact->statisticsContactId())); TQStringList values2; @@ -123,13 +123,13 @@ void StatisticsDialog::generatePageForMonth(const int monthOfYear) values2.push_back(values[i+2]); } } - generatePageFromQStringList(values2, TQDate::longMonthName(monthOfYear)); + generatePageFromTQStringList(values2, TQDate::longMonthName(monthOfYear)); } void StatisticsDialog::generatePageForDay(const int dayOfWeek) { TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " - "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId())); + "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").tqarg(m_contact->statisticsContactId())); TQStringList values2; @@ -161,12 +161,12 @@ void StatisticsDialog::generatePageForDay(const int dayOfWeek) } } } - generatePageFromQStringList(values2, TQDate::longDayName(dayOfWeek)); + generatePageFromTQStringList(values2, TQDate::longDayName(dayOfWeek)); } /// @todo chart problem at midnight. -void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQString & subTitle) +void StatisticsDialog::generatePageFromTQStringList(TQStringList values, const TQString & subTitle) { generalHTMLPart->begin(); generalHTMLPart->write(TQString("<html><head><style>.bar { margin:0px;} " @@ -190,8 +190,8 @@ void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQ "margin-right: 5px;" "padding:3px 3px 3px 10px;}" "</style></head><body>" + - i18n("<h1>Statistics for %1</h1>").arg(m_contact->metaContact()->displayName()) + - "<h3>%1</h3><hr>").arg(subTitle)); + i18n("<h1>Statistics for %1</h1>").tqarg(m_contact->metaContact()->displayName()) + + "<h3>%1</h3><hr>").tqarg(subTitle)); generalHTMLPart->write(i18n("<div class=\"statgroup\"><b><a href=\"main:generalinfo\" title=\"General summary view\">General</a></b><br>" "<span title=\"Select the a day or a month to view the stat for\"><b>Days: </b>" @@ -217,14 +217,14 @@ void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQ "<a href=\"monthofyear:12\">December</a> " "</span></div><br>")); -// mainWidget->listView->addColumn(i18n("Status")); +// mainWidget->listView->addColumn(i18n("tqStatus")); // mainWidget->listView->addColumn(i18n("Start Date")); // mainWidget->listView->addColumn(i18n("End Date")); // mainWidget->listView->addColumn(i18n("Start Date")); // mainWidget->listView->addColumn(i18n("End Date")); TQString todayString; - todayString.append(i18n("<div class=\"statgroup\" title=\"Contact status history for today\"><h2>Today</h2><table width=\"100%\"><tr><td>Status</td><td>From</td><td>To</td></tr>")); + todayString.append(i18n("<div class=\"statgroup\" title=\"Contact status history for today\"><h2>Today</h2><table width=\"100%\"><tr><td>tqStatus</td><td>From</td><td>To</td></tr>")); bool today; @@ -265,7 +265,7 @@ void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQ TQDateTime dateTime2; dateTime2.setTime_t(values[i+2].toInt()); - if (dateTime1.date() == TQDate::currentDate() || dateTime2.date() == TQDate::currentDate()) + if (dateTime1.date() == TQDate::tqcurrentDate() || dateTime2.date() == TQDate::tqcurrentDate()) today = true; else today = false; @@ -351,7 +351,7 @@ void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQ } else color="white"; - todayString.append(TQString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").arg(color, status, dateTime1.time().toString(), dateTime2.time().toString())); + todayString.append(TQString("<tr style=\"color:%1\"><td>%2</td><td>%3</td><td>%4</td></tr>").tqarg(color, status, dateTime1.time().toString(), dateTime2.time().toString())); } @@ -386,11 +386,11 @@ void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQ // Some "total times" generalHTMLPart->write(i18n("<div class=\"statgroup\">")); generalHTMLPart->write(i18n("<b title=\"The total time I have been able to see %1 status\">" - "Total seen time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalTime))); + "Total seen time :</b> %2 hour(s)<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalTime))); generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 online\">" - "Total online time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOnlineTime))); - generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 away\">Total busy time :</b> %2 hour(s)<br>").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalAwayTime))); - generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 offline\">Total offline time :</b> %2 hour(s)").arg(m_contact->metaContact()->displayName()).arg(stringFromSeconds(totalOfflineTime))); + "Total online time :</b> %2 hour(s)<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalOnlineTime))); + generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 away\">Total busy time :</b> %2 hour(s)<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalAwayTime))); + generalHTMLPart->write(i18n("<b title=\"The total time I have seen %1 offline\">Total offline time :</b> %2 hour(s)").tqarg(m_contact->metaContact()->displayName()).tqarg(stringFromSeconds(totalOfflineTime))); generalHTMLPart->write(TQString("</div>")); if (subTitle == i18n("General information")) @@ -399,25 +399,25 @@ void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQ */ { generalHTMLPart->write(TQString("<div class=\"statgroup\">")); - generalHTMLPart->write(i18n("<b>Average message length :</b> %1 characters<br>").arg(m_contact->messageLength())); - generalHTMLPart->write(i18n("<b>Time between two messages : </b> %1 second(s)").arg(m_contact->timeBetweenTwoMessages())); + generalHTMLPart->write(i18n("<b>Average message length :</b> %1 characters<br>").tqarg(m_contact->messageLength())); + generalHTMLPart->write(i18n("<b>Time between two messages : </b> %1 second(s)").tqarg(m_contact->timeBetweenTwoMessages())); generalHTMLPart->write(TQString("</div>")); generalHTMLPart->write(TQString("<div class=\"statgroup\">")); - generalHTMLPart->write(i18n("<b title=\"The last time you talked with %1\">Last talk :</b> %2<br>").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastTalk()))); - generalHTMLPart->write(i18n("<b title=\"The last time I have seen %1 online or away\">Last time contact was present :</b> %2").arg(m_contact->metaContact()->displayName()).arg(KGlobal::locale()->formatDateTime(m_contact->lastPresent()))); + generalHTMLPart->write(i18n("<b title=\"The last time you talked with %1\">Last talk :</b> %2<br>").tqarg(m_contact->metaContact()->displayName()).tqarg(KGlobal::locale()->formatDateTime(m_contact->lastTalk()))); + generalHTMLPart->write(i18n("<b title=\"The last time I have seen %1 online or away\">Last time contact was present :</b> %2").tqarg(m_contact->metaContact()->displayName()).tqarg(KGlobal::locale()->formatDateTime(m_contact->lastPresent()))); generalHTMLPart->write(TQString("</div>")); //generalHTMLPart->write(TQString("<div class=\"statgroup\">")); - //generalHTMLPart->write(i18n("<b title=\"%1 uses to set his status online at these hours (EXPERIMENTAL)\">Main online events :</b><br>").arg(m_contact->metaContact()->displayName())); + //generalHTMLPart->write(i18n("<b title=\"%1 uses to set his status online at these hours (EXPERIMENTAL)\">Main online events :</b><br>").tqarg(m_contact->metaContact()->displayName())); //TQValueList<TQTime> mainEvents = m_contact->mainEvents(Kopete::OnlineStatus::Online); //for (uint i=0; i<mainEvents.count(); i++) - //generalHTMLPart->write(TQString("%1<br>").arg(mainEvents[i].toString())); + //generalHTMLPart->write(TQString("%1<br>").tqarg(mainEvents[i].toString())); //generalHTMLPart->write(TQString("</div>")); generalHTMLPart->write("<div title=\"" +i18n("Current status") + "\" class=\"statgroup\">"); - generalHTMLPart->write(i18n("Is <b>%1</b> since <b>%2</b>").arg( - Kopete::OnlineStatus(m_contact->oldStatus()).description(), + generalHTMLPart->write(i18n("Is <b>%1</b> since <b>%2</b>").tqarg( + Kopete::OnlineStatus(m_contact->oldtqStatus()).description(), KGlobal::locale()->formatDateTime(m_contact->oldStatusDateTime()))); generalHTMLPart->write(TQString("</div>")); } @@ -434,13 +434,13 @@ void StatisticsDialog::generatePageFromQStringList(TQStringList values, const TQ for (uint i=0; i<24; i++) { - int hrWidth = qRound((double)hours[i]/(double)hours[iMaxHours]*100.); + int hrWidth = tqRound((double)hours[i]/(double)hours[iMaxHours]*100.); chartString += TQString("<img class=\"margin:0px;\" height=\"") +(totalTime ? TQString::number(hrWidth) : TQString::number(0)) +TQString("\" src=\"file://") +colorPath +"\" width=\"4%\" title=\"" - +i18n("Between %1:00 and %2:00, I was able to see %3 status %4% of the hour.").arg(i).arg((i+1)%24).arg(m_contact->metaContact()->displayName()).arg(hrWidth) + +i18n("Between %1:00 and %2:00, I was able to see %3 status %4% of the hour.").tqarg(i).tqarg((i+1)%24).tqarg(m_contact->metaContact()->displayName()).tqarg(hrWidth) +TQString("\">"); } generalHTMLPart->write(chartString); @@ -478,8 +478,8 @@ void StatisticsDialog::generatePageGeneral() TQStringList values; values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;") - .arg(m_contact->statisticsContactId())); - generatePageFromQStringList(values, i18n("General information")); + .tqarg(m_contact->statisticsContactId())); + generatePageFromTQStringList(values, i18n("General information")); } TQString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const TQString & caption, const TQString & color) @@ -493,7 +493,7 @@ TQString StatisticsDialog::generateHTMLChart(const int *hours, const int *hours2 { int totalTime = hours[i] + hours2[i] + hours3[i]; - int hrWidth = qRound((double)hours[i]/(double)totalTime*100.); + int hrWidth = tqRound((double)hours[i]/(double)totalTime*100.); chartString += TQString("<img class=\"margin:0px;\" height=\"") +(totalTime ? TQString::number(hrWidth) : TQString::number(0)) +TQString("\" src=\"file://") @@ -524,9 +524,9 @@ void StatisticsDialog::slotAskButtonClicked() if (mainWidget->questionComboBox->currentItem()==0) { TQString text = i18n("1 is date, 2 is contact name, 3 is online status", "%1, %2 was %3") - .arg(KGlobal::locale()->formatDateTime(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time()))) - .arg(m_contact->metaContact()->displayName()) - .arg(m_contact->statusAt(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time()))); + .tqarg(KGlobal::locale()->formatDateTime(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time()))) + .tqarg(m_contact->metaContact()->displayName()) + .tqarg(m_contact->statusAt(TQDateTime(mainWidget->datePicker->date(), mainWidget->timePicker->time()))); mainWidget->answerEdit->setText(text); } else if (mainWidget->questionComboBox->currentItem()==1) diff --git a/kopete/plugins/statistics/statisticsdialog.h b/kopete/plugins/statistics/statisticsdialog.h index 505ea0ef..63d5f499 100644 --- a/kopete/plugins/statistics/statisticsdialog.h +++ b/kopete/plugins/statistics/statisticsdialog.h @@ -39,8 +39,9 @@ namespace KParts class StatisticsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - StatisticsDialog(StatisticsContact *contact, StatisticsDB* db, TQWidget* parent=0, + StatisticsDialog(StatisticsContact *contact, StatisticsDB* db, TQWidget* tqparent=0, const char* name="StatisticsDialog"); private: TQString generateHTMLChart(const int *hours, const int *hours2, const int *hours3, const TQString & caption, const TQString & color); @@ -55,7 +56,7 @@ class StatisticsDialog : public KDialogBase /// Metacontact for which we get the statistics from m_db StatisticsContact *m_contact; - void generatePageFromQStringList(TQStringList values, const TQString & subTitle); + void generatePageFromTQStringList(TQStringList values, const TQString & subTitle); /// Generates the main page void generatePageGeneral(); diff --git a/kopete/plugins/statistics/statisticsplugin.cpp b/kopete/plugins/statistics/statisticsplugin.cpp index bef49af8..09015d7a 100644 --- a/kopete/plugins/statistics/statisticsplugin.cpp +++ b/kopete/plugins/statistics/statisticsplugin.cpp @@ -46,14 +46,14 @@ typedef KGenericFactory<StatisticsPlugin> StatisticsPluginFactory; static const KAboutData aboutdata("kopete_statistics", I18N_NOOP("Statistics") , "0.1" ); K_EXPORT_COMPONENT_FACTORY( kopete_statistics, StatisticsPluginFactory( &aboutdata ) ) -StatisticsPlugin::StatisticsPlugin( TQObject *parent, const char *name, const TQStringList &) +StatisticsPlugin::StatisticsPlugin( TQObject *tqparent, const char *name, const TQStringList &) : DCOPObject("StatisticsDCOPIface"), - Kopete::Plugin( StatisticsPluginFactory::instance(), parent, name ) + Kopete::Plugin( StatisticsPluginFactory::instance(), tqparent, name ) { KAction *viewMetaContactStatistics = new KAction( i18n("View &Statistics" ), - TQString::fromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()), + TQString::tqfromLatin1( "log" ), 0, this, TQT_SLOT(slotViewStatistics()), actionCollection(), "viewMetaContactStatistics" ); viewMetaContactStatistics->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count() == 1); @@ -101,7 +101,7 @@ StatisticsPlugin::~StatisticsPlugin() void StatisticsPlugin::slotAboutToReceive(Kopete::Message& m) { - if ( statisticsMetaContactMap.contains(m.from()->metaContact()) ) + if ( statisticsMetaContactMap.tqcontains(m.from()->metaContact()) ) statisticsMetaContactMap[m.from()->metaContact()]->newMessageReceived(m); } @@ -118,7 +118,7 @@ void StatisticsPlugin::slotViewClosed(Kopete::ChatSession* session) for (; it.current(); ++it) { // If this contact is not in other chat sessions - if (!it.current()->manager() && statisticsMetaContactMap.contains(it.current()->metaContact())) + if (!it.current()->manager() && statisticsMetaContactMap.tqcontains(it.current()->metaContact())) statisticsMetaContactMap[it.current()->metaContact()]->setIsChatWindowOpen(false); } } @@ -129,7 +129,7 @@ void StatisticsPlugin::slotViewStatistics() kdDebug() << k_funcinfo << "statistics - dialog :"+ mc->displayName() << endl; - if ( mc && statisticsMetaContactMap.contains(mc) ) + if ( mc && statisticsMetaContactMap.tqcontains(mc) ) { (new StatisticsDialog(statisticsMetaContactMap[mc], db()))->show(); } @@ -137,7 +137,7 @@ void StatisticsPlugin::slotViewStatistics() void StatisticsPlugin::slotOnlineStatusChanged(Kopete::MetaContact *mc, Kopete::OnlineStatus::StatusType status) { - if ( statisticsMetaContactMap.contains(mc) ) + if ( statisticsMetaContactMap.tqcontains(mc) ) statisticsMetaContactMap[mc]->onlineStatusChanged(status); } @@ -164,7 +164,7 @@ void StatisticsPlugin::slotMetaContactAdded(Kopete::MetaContact *mc) void StatisticsPlugin::slotMetaContactRemoved(Kopete::MetaContact *mc) { - if (statisticsMetaContactMap.contains(mc)) + if (statisticsMetaContactMap.tqcontains(mc)) { StatisticsContact *sc = statisticsMetaContactMap[mc]; statisticsMetaContactMap.remove(mc); @@ -175,7 +175,7 @@ void StatisticsPlugin::slotMetaContactRemoved(Kopete::MetaContact *mc) void StatisticsPlugin::slotContactAdded( Kopete::Contact *c) { - if (statisticsMetaContactMap.contains(c->metaContact())) + if (statisticsMetaContactMap.tqcontains(c->metaContact())) { StatisticsContact *sc = statisticsMetaContactMap[c->metaContact()]; sc->contactAdded(c); @@ -185,7 +185,7 @@ void StatisticsPlugin::slotContactAdded( Kopete::Contact *c) void StatisticsPlugin::slotContactRemoved( Kopete::Contact *c) { - if (statisticsMetaContactMap.contains(c->metaContact())) + if (statisticsMetaContactMap.tqcontains(c->metaContact())) statisticsMetaContactMap[c->metaContact()]->contactRemoved(c); statisticsContactMap.remove(c->contactId()); @@ -195,7 +195,7 @@ void StatisticsPlugin::dcopStatisticsDialog(TQString id) { kdDebug() << k_funcinfo << "statistics - DCOP dialog :" << id << endl; - if (statisticsContactMap.contains(id)) + if (statisticsContactMap.tqcontains(id)) { (new StatisticsDialog(statisticsContactMap[id], db()))->show(); } @@ -205,63 +205,63 @@ bool StatisticsPlugin::dcopWasOnline(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopWasStatus(id, dt, Kopete::OnlineStatus::Online); + return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Online); } bool StatisticsPlugin::dcopWasOnline(TQString id, TQString dateTime) { - return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online); + return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Online); } bool StatisticsPlugin::dcopWasAway(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopWasStatus(id, dt, Kopete::OnlineStatus::Away); + return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Away); } bool StatisticsPlugin::dcopWasAway(TQString id, TQString dateTime) { - return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away); + return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Away); } bool StatisticsPlugin::dcopWasOffline(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopWasStatus(id, dt, Kopete::OnlineStatus::Offline); + return dcopWastqStatus(id, dt, Kopete::OnlineStatus::Offline); } bool StatisticsPlugin::dcopWasOffline(TQString id, TQString dateTime) { - return dcopWasStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline); + return dcopWastqStatus(id, TQDateTime::fromString(dateTime), Kopete::OnlineStatus::Offline); } -bool StatisticsPlugin::dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status) +bool StatisticsPlugin::dcopWastqStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status) { kdDebug() << k_funcinfo << "statistics - DCOP wasOnline :" << id << endl; - if (dateTime.isValid() && statisticsContactMap.contains(id)) + if (dateTime.isValid() && statisticsContactMap.tqcontains(id)) { - return statisticsContactMap[id]->wasStatus(dateTime, status); + return statisticsContactMap[id]->wastqStatus(dateTime, status); } return false; } -TQString StatisticsPlugin::dcopStatus(TQString id, int timeStamp) +TQString StatisticsPlugin::dcoptqStatus(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - return dcopStatus(id, dt.toString()); + return dcoptqStatus(id, dt.toString()); } -TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime) +TQString StatisticsPlugin::dcoptqStatus(TQString id, TQString dateTime) { TQDateTime dt = TQDateTime::fromString(dateTime); - if (dt.isValid() && statisticsContactMap.contains(id)) + if (dt.isValid() && statisticsContactMap.tqcontains(id)) { return statisticsContactMap[id]->statusAt(dt); } @@ -269,11 +269,11 @@ TQString StatisticsPlugin::dcopStatus(TQString id, TQString dateTime) return ""; } -TQString StatisticsPlugin::dcopMainStatus(TQString id, int timeStamp) +TQString StatisticsPlugin::dcopMaintqStatus(TQString id, int timeStamp) { TQDateTime dt; dt.setTime_t(timeStamp); - if (dt.isValid() && statisticsContactMap.contains(id)) + if (dt.isValid() && statisticsContactMap.tqcontains(id)) { return statisticsContactMap[id]->mainStatusDate(dt.date()); } diff --git a/kopete/plugins/statistics/statisticsplugin.h b/kopete/plugins/statistics/statisticsplugin.h index 47658093..b3b9c9f9 100644 --- a/kopete/plugins/statistics/statisticsplugin.h +++ b/kopete/plugins/statistics/statisticsplugin.h @@ -50,7 +50,7 @@ class KActionCollection; * In the future, it will maybe make prediction on when the contact should be available for chat. * * \subsection install_sec How it works ... - * Each Metacontact is bound to a StatisticsContact which has access to the SQLITE database. + * Each Metacontact is bound to a StatisticsContact which has access to the STQLITE database. * This StatisticsContact stores the last status of the metacontact; the member function onlineStatusChanged is called when the * metacontact status changed (this is managed in the slot slotOnlineStatusChanged of StatisticsPlugin) and then the DB is * updated for the contact. @@ -61,7 +61,7 @@ class KActionCollection; * * <table> * <tr> - * <td>Event</td><td>Changes to database</td><td>oldStatus</td> + * <td>Event</td><td>Changes to database</td><td>oldtqStatus</td> * </tr> * <tr> * <td>John 17:44 Away <i>(connexion)</i></td><td> - <i>(oldstatus was offline)</i></td><td>oldstatus = away </td> @@ -99,9 +99,10 @@ class KActionCollection; class StatisticsPlugin : public Kopete::Plugin, virtual public StatisticsDCOPIface { Q_OBJECT + TQ_OBJECT public: /// Standard plugin constructors - StatisticsPlugin(TQObject *parent, const char *name, const TQStringList &args); + StatisticsPlugin(TQObject *tqparent, const char *name, const TQStringList &args); ~StatisticsPlugin(); /// Method to access m_db member @@ -190,12 +191,12 @@ public slots: bool dcopWasOffline(TQString id, int timeStamp); bool dcopWasOffline(TQString id, TQString dt); - bool dcopWasStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status); + bool dcopWastqStatus(TQString id, TQDateTime dateTime, Kopete::OnlineStatus::StatusType status); - TQString dcopStatus(TQString id, TQString dateTime); - TQString dcopStatus(TQString id, int timeStamp); + TQString dcoptqStatus(TQString id, TQString dateTime); + TQString dcoptqStatus(TQString id, int timeStamp); - TQString dcopMainStatus(TQString id, int timeStamp); + TQString dcopMaintqStatus(TQString id, int timeStamp); private: StatisticsDB *m_db; diff --git a/kopete/plugins/statistics/statisticswidget.ui b/kopete/plugins/statistics/statisticswidget.ui index ca866e18..0a128691 100644 --- a/kopete/plugins/statistics/statisticswidget.ui +++ b/kopete/plugins/statistics/statisticswidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>StatisticsWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>StatisticsWidget</cstring> </property> @@ -24,11 +24,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -39,7 +39,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -50,9 +50,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> @@ -68,16 +68,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>31</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> @@ -96,15 +96,15 @@ </sizepolicy> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -127,7 +127,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -148,7 +148,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>60</width> <height>41</height> @@ -159,7 +159,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -170,23 +170,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> - <string>Contact Status at Date & Time</string> + <string>Contact tqStatus at Date & Time</string> </property> </item> <item> <property name="text"> - <string>Most Used Status at Date</string> + <string>Most Used tqStatus at Date</string> </property> </item> <property name="name"> @@ -201,7 +201,7 @@ </sizepolicy> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>askButton</cstring> </property> @@ -213,7 +213,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -224,7 +224,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTextEdit" row="0" column="0"> + <widget class="TQTextEdit" row="0" column="0"> <property name="name"> <cstring>answerEdit</cstring> </property> @@ -236,7 +236,7 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdatepicker.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kopete/plugins/texteffect/texteffectplugin.cpp b/kopete/plugins/texteffect/texteffectplugin.cpp index 47bdbc14..664a38a8 100644 --- a/kopete/plugins/texteffect/texteffectplugin.cpp +++ b/kopete/plugins/texteffect/texteffectplugin.cpp @@ -28,8 +28,8 @@ typedef KGenericFactory<TextEffectPlugin> TextEffectPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_texteffect, TextEffectPluginFactory( "kopete_texteffect" ) ) -TextEffectPlugin::TextEffectPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) -: Kopete::Plugin( TextEffectPluginFactory::instance(), parent, name ) +TextEffectPlugin::TextEffectPlugin( TQObject *tqparent, const char *name, const TQStringList &/*args*/ ) +: Kopete::Plugin( TextEffectPluginFactory::instance(), tqparent, name ) { if( !pluginStatic_ ) pluginStatic_=this; diff --git a/kopete/plugins/texteffect/texteffectplugin.h b/kopete/plugins/texteffect/texteffectplugin.h index 6766bcfa..4090b6b3 100644 --- a/kopete/plugins/texteffect/texteffectplugin.h +++ b/kopete/plugins/texteffect/texteffectplugin.h @@ -41,11 +41,12 @@ class TextEffectConfig; class TextEffectPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: static TextEffectPlugin *plugin(); - TextEffectPlugin( TQObject *parent, const char *name, const TQStringList &args ); + TextEffectPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~TextEffectPlugin(); public slots: diff --git a/kopete/plugins/texteffect/texteffectpreferences.cpp b/kopete/plugins/texteffect/texteffectpreferences.cpp index 9fb2994c..ddbe5f61 100644 --- a/kopete/plugins/texteffect/texteffectpreferences.cpp +++ b/kopete/plugins/texteffect/texteffectpreferences.cpp @@ -35,10 +35,10 @@ typedef KGenericFactory<TextEffectPreferences> TextEffectPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_texteffect, TextEffectPreferencesFactory( "kcm_kopete_texteffect" ) ) -TextEffectPreferences::TextEffectPreferences(TQWidget *parent, +TextEffectPreferences::TextEffectPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) - : KCModule(TextEffectPreferencesFactory::instance(), parent, args) + : KCModule(TextEffectPreferencesFactory::instance(), tqparent, args) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); @@ -106,7 +106,7 @@ void TextEffectPreferences::load() preferencesDialog->m_casewaves->setChecked(config->waves()); - // Call parent's save method + // Call tqparent's save method KCModule::load(); // Indicate that we have not changed ^_^ @@ -134,7 +134,7 @@ void TextEffectPreferences::save() // Notify the plugin that the settings have changed //TextEffectPlugin::plugin()->slotSettingsChanged(); - // Call parent's save method + // Call tqparent's save method KCModule::save(); // Indicate that we have not changed ^_^ @@ -157,7 +157,7 @@ void TextEffectPreferences::slotAddPressed() TQColor myColor; if( KColorDialog::getColor( myColor ) == KColorDialog::Accepted ) { - preferencesDialog->mColorsListBox->insertItem(myColor.name()); + preferencesDialog->mColorsListBox->insertItem(TQString(myColor.name())); } // Indicate that something has changed diff --git a/kopete/plugins/texteffect/texteffectpreferences.h b/kopete/plugins/texteffect/texteffectpreferences.h index 4a64ac1f..eb30faed 100644 --- a/kopete/plugins/texteffect/texteffectpreferences.h +++ b/kopete/plugins/texteffect/texteffectpreferences.h @@ -30,12 +30,13 @@ class TQStringList; class TextEffectPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - TextEffectPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + TextEffectPreferences(TQWidget *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~TextEffectPreferences(); - // Overloaded from parent + // Overloaded from tqparent virtual void save(); virtual void load(); virtual void defaults(); diff --git a/kopete/plugins/texteffect/texteffectprefs.ui b/kopete/plugins/texteffect/texteffectprefs.ui index 95ff801c..919e2f54 100644 --- a/kopete/plugins/texteffect/texteffectprefs.ui +++ b/kopete/plugins/texteffect/texteffectprefs.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>TextEffectPrefs</class> <author>Olivier Goffart</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TextEffectPrefs</cstring> </property> @@ -23,11 +23,11 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>TabWidget3</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -38,7 +38,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -54,7 +54,7 @@ <cstring>mColorsListBox</cstring> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>mColorsAdd</cstring> </property> @@ -62,7 +62,7 @@ <string>&Add...</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>mColorsRemove</cstring> </property> @@ -70,7 +70,7 @@ <string>&Remove</string> </property> </widget> - <widget class="QPushButton" row="2" column="1"> + <widget class="TQPushButton" row="2" column="1"> <property name="name"> <cstring>mColorsUp</cstring> </property> @@ -78,7 +78,7 @@ <string>Move &Up</string> </property> </widget> - <widget class="QPushButton" row="3" column="1"> + <widget class="TQPushButton" row="3" column="1"> <property name="name"> <cstring>mColorsDown</cstring> </property> @@ -96,7 +96,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>81</height> @@ -105,7 +105,7 @@ </spacer> </grid> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>m_colorRandom</cstring> </property> @@ -127,7 +127,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>m_fg</cstring> </property> @@ -135,7 +135,7 @@ <string>Change global text foreground color</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>m_char</cstring> </property> @@ -143,7 +143,7 @@ <string>Change color every letter</string> </property> </widget> - <widget class="QCheckBox" row="5" column="0"> + <widget class="TQCheckBox" row="5" column="0"> <property name="name"> <cstring>m_words</cstring> </property> @@ -153,7 +153,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -164,7 +164,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_lamer</cstring> </property> @@ -180,7 +180,7 @@ <string>L4m3r t4lk</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_casewaves</cstring> </property> @@ -206,7 +206,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>279</height> @@ -224,7 +224,7 @@ <includes> <include location="global" impldecl="in implementation">knuminput.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistbox.h</includehint> </includehints> diff --git a/kopete/plugins/translator/translatordialog.cpp b/kopete/plugins/translator/translatordialog.cpp index 02e405ec..15c6b7d9 100644 --- a/kopete/plugins/translator/translatordialog.cpp +++ b/kopete/plugins/translator/translatordialog.cpp @@ -21,7 +21,7 @@ #include "translatordialog.h" -TranslatorDialog::TranslatorDialog(const TQString &text,TQWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok) +TranslatorDialog::TranslatorDialog(const TQString &text,TQWidget *tqparent, const char *name ) : KDialogBase(tqparent,name,true,i18n("Translator Plugin"), Ok) { m_textEdit=new KTextEdit(this); setMainWidget(m_textEdit); diff --git a/kopete/plugins/translator/translatordialog.h b/kopete/plugins/translator/translatordialog.h index 40a5523e..79c910d0 100644 --- a/kopete/plugins/translator/translatordialog.h +++ b/kopete/plugins/translator/translatordialog.h @@ -31,9 +31,10 @@ class KTextEdit; class TranslatorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TranslatorDialog(const TQString &translated, TQWidget *parent=0, const char *name=0); + TranslatorDialog(const TQString &translated, TQWidget *tqparent=0, const char *name=0); ~TranslatorDialog(); TQString translatedText(); diff --git a/kopete/plugins/translator/translatorguiclient.cpp b/kopete/plugins/translator/translatorguiclient.cpp index ef5ac9ac..f583fcd1 100644 --- a/kopete/plugins/translator/translatorguiclient.cpp +++ b/kopete/plugins/translator/translatorguiclient.cpp @@ -33,13 +33,13 @@ #include "translatorguiclient.h" #include "translatorlanguages.h" -TranslatorGUIClient::TranslatorGUIClient( Kopete::ChatSession *parent, const char *name ) -: TQObject( parent, name ), KXMLGUIClient( parent ) +TranslatorGUIClient::TranslatorGUIClient( Kopete::ChatSession *tqparent, const char *name ) +: TQObject( tqparent, name ), KXMLGUIClient( tqparent ) { setInstance( TranslatorPlugin::plugin()->instance() ); connect( TranslatorPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) ); - m_manager = parent; + m_manager = tqparent; new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, TQT_SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" ); diff --git a/kopete/plugins/translator/translatorguiclient.h b/kopete/plugins/translator/translatorguiclient.h index 68cb4fa7..e292b0e2 100644 --- a/kopete/plugins/translator/translatorguiclient.h +++ b/kopete/plugins/translator/translatorguiclient.h @@ -37,9 +37,10 @@ namespace Kopete { class ChatSession; } class TranslatorGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - TranslatorGUIClient( Kopete::ChatSession *parent, const char *name=0L); + TranslatorGUIClient( Kopete::ChatSession *tqparent, const char *name=0L); ~TranslatorGUIClient(); private slots: diff --git a/kopete/plugins/translator/translatorplugin.cpp b/kopete/plugins/translator/translatorplugin.cpp index 9bff86f2..175cb9d8 100644 --- a/kopete/plugins/translator/translatorplugin.cpp +++ b/kopete/plugins/translator/translatorplugin.cpp @@ -17,7 +17,7 @@ * * ************************************************************************* Patched by Francesco Rossi <redsh@email.it> in order to support new - google translation page layout (13-sept-2007) + google translation page tqlayout (13-sept-2007) */ #include <tqapplication.h> @@ -51,8 +51,8 @@ K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( &aboutda K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( "kopete_translator" ) ) #endif -TranslatorPlugin::TranslatorPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( TranslatorPluginFactory::instance(), parent, name ) +TranslatorPlugin::TranslatorPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( TranslatorPluginFactory::instance(), tqparent, name ) { kdDebug( 14308 ) << k_funcinfo << endl; @@ -237,14 +237,14 @@ TQString TranslatorPlugin::translateMessage( const TQString &msg, const TQString if ( from == to ) { kdDebug( 14308 ) << k_funcinfo << "Src and Dst languages are the same" << endl; - return TQString::null; + return TQString(); } // We search for src_dst - if(! m_languages->supported( m_service ).contains( from + "_" + to ) ) + if(! m_languages->supported( m_service ).tqcontains( from + "_" + to ) ) { kdDebug( 14308 ) << k_funcinfo << from << "_" << to << " is not supported by service " << m_service << endl; - return TQString::null; + return TQString(); } @@ -253,7 +253,7 @@ TQString TranslatorPlugin::translateMessage( const TQString &msg, const TQString else if ( m_service == "google" ) return googleTranslateMessage( msg ,from, to ); else - return TQString::null; + return TQString(); } TQString TranslatorPlugin::googleTranslateMessage( const TQString &msg, const TQString &from, const TQString &to ) @@ -282,9 +282,9 @@ TQString TranslatorPlugin::googleTranslateMessage( const TQString &msg, const TQ // FIXME: We need to make the libkopete API async to get rid of this processEvents. // It often causes crashes in the code. - Martijn while ( !m_completed[ job ] ) - qApp->processEvents(); + tqApp->processEvents(); - TQString data = TQString::fromLatin1( m_data[ job ] ); + TQString data = TQString::tqfromLatin1( m_data[ job ] ); // After hacks, we need to clean m_data.remove( job ); @@ -318,7 +318,7 @@ TQString TranslatorPlugin::babelTranslateMessage( const TQString &msg, const TQS // FIXME: We need to make the libkopete API async to get rid of this processEvents. // It often causes crashes in the code. - Martijn while ( !m_completed[ job ] ) - qApp->processEvents(); + tqApp->processEvents(); TQString data = TQString::fromUtf8( m_data[ job ] ); @@ -364,7 +364,7 @@ void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const TQString &tr msg.setBody( translated, msg.format() ); break; case ShowOriginal: - msg.setBody( i18n( "%2 \nAuto Translated: \n%1" ).arg( translated, msg.plainBody() ), msg.format() ); + msg.setBody( i18n( "%2 \nAuto Translated: \n%1" ).tqarg( translated, msg.plainBody() ), msg.format() ); break; case ShowDialog: { diff --git a/kopete/plugins/translator/translatorplugin.h b/kopete/plugins/translator/translatorplugin.h index d82a00be..d7b40a2d 100644 --- a/kopete/plugins/translator/translatorplugin.h +++ b/kopete/plugins/translator/translatorplugin.h @@ -52,13 +52,14 @@ class TranslatorLanguages; class TranslatorPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT friend class TranslatorGUIClient; public: static TranslatorPlugin *plugin(); - TranslatorPlugin( TQObject *parent, const char *name, const TQStringList &args ); + TranslatorPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~TranslatorPlugin(); enum TranslateMode diff --git a/kopete/plugins/translator/translatorprefs.cpp b/kopete/plugins/translator/translatorprefs.cpp index 8d06b49f..4eca00e6 100644 --- a/kopete/plugins/translator/translatorprefs.cpp +++ b/kopete/plugins/translator/translatorprefs.cpp @@ -30,7 +30,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_translator, TranslatorConfigFactory( "kcm class TranslatorPreferences : public KCAutoConfigModule { public: - TranslatorPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args ) + TranslatorPreferences( TQWidget *tqparent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), tqparent, args ) { TranslatorPrefsUI *preferencesDialog = new TranslatorPrefsUI(this); diff --git a/kopete/plugins/translator/translatorprefsbase.ui b/kopete/plugins/translator/translatorprefsbase.ui index 56b75543..f6c063a2 100644 --- a/kopete/plugins/translator/translatorprefsbase.ui +++ b/kopete/plugins/translator/translatorprefsbase.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>TranslatorPrefsUI</class> <author>Duncan Mac-Vicar P.</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TranslatorPrefsUI</cstring> </property> @@ -25,12 +25,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>Service</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -38,7 +38,7 @@ <string>Translation service:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -46,7 +46,7 @@ <string>Default native language:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>myLang</cstring> </property> @@ -59,7 +59,7 @@ </sizepolicy> </property> </widget> - <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>IncomingMessages</cstring> </property> @@ -70,7 +70,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>IncomingDontTranslate</cstring> </property> @@ -84,7 +84,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>IncomingShowOriginal</cstring> </property> @@ -98,7 +98,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>IncomingTranslate</cstring> </property> @@ -111,7 +111,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>OutgoingMessages</cstring> </property> @@ -122,7 +122,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingDontTranslate</cstring> </property> @@ -136,7 +136,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingShowOriginal</cstring> </property> @@ -150,7 +150,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingTranslate</cstring> </property> @@ -158,7 +158,7 @@ <string>Translate directly</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingAsk</cstring> </property> @@ -178,7 +178,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -187,5 +187,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kopete/plugins/webpresence/DESIGN b/kopete/plugins/webpresence/DESIGN index d62c9c34..cd7ed095 100644 --- a/kopete/plugins/webpresence/DESIGN +++ b/kopete/plugins/webpresence/DESIGN @@ -8,5 +8,5 @@ Every so often, it writes a file containing a snapshot of who is online and who Use KIO::NetAccess to upload the files! -Getting Info about Local User's Status +Getting Info about Local User's tqStatus Goal is to allow ppl who don't have us on their contactlist to see what our current status is and what our UIN/id is for each protocol. So we need to know (protocol, uin, status). diff --git a/kopete/plugins/webpresence/webpresence_html.xsl b/kopete/plugins/webpresence/webpresence_html.xsl index f768ccf5..5dac1837 100644 --- a/kopete/plugins/webpresence/webpresence_html.xsl +++ b/kopete/plugins/webpresence/webpresence_html.xsl @@ -17,7 +17,7 @@ <xsl:template match="webpresence"> <html> <head> - <title>My IM Status</title> + <title>My IM tqStatus</title> </head> <body> <p class="name"><xsl:value-of select="name"/></p> diff --git a/kopete/plugins/webpresence/webpresence_xhtml.xsl b/kopete/plugins/webpresence/webpresence_xhtml.xsl index 9d749c14..4ba456d5 100644 --- a/kopete/plugins/webpresence/webpresence_xhtml.xsl +++ b/kopete/plugins/webpresence/webpresence_xhtml.xsl @@ -16,7 +16,7 @@ <xsl:template match="webpresence"> <html> <head> - <title>My IM Status</title> + <title>My IM tqStatus</title> </head> <body> <p class="name"><xsl:value-of select="name"/></p> diff --git a/kopete/plugins/webpresence/webpresenceplugin.cpp b/kopete/plugins/webpresence/webpresenceplugin.cpp index bb7b9d4c..2755c12a 100644 --- a/kopete/plugins/webpresence/webpresenceplugin.cpp +++ b/kopete/plugins/webpresence/webpresenceplugin.cpp @@ -51,8 +51,8 @@ typedef KGenericFactory<WebPresencePlugin> WebPresencePluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_webpresence, WebPresencePluginFactory( "kopete_webpresence" ) ) -WebPresencePlugin::WebPresencePlugin( TQObject *parent, const char *name, const TQStringList& /*args*/ ) - : Kopete::Plugin( WebPresencePluginFactory::instance(), parent, name ), +WebPresencePlugin::WebPresencePlugin( TQObject *tqparent, const char *name, const TQStringList& /*args*/ ) + : Kopete::Plugin( WebPresencePluginFactory::instance(), tqparent, name ), shuttingDown( false ), resultFormatting( WEB_HTML ) { m_writeScheduler = new TQTimer( this ); @@ -228,7 +228,7 @@ KTempFile* WebPresencePlugin::generateFile() // insert the current date/time TQDomElement date = doc.createElement( "listdate" ); TQDomText t = doc.createTextNode( - KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) ); + KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime() ) ); date.appendChild( t ); root.appendChild( date ); @@ -272,30 +272,30 @@ KTempFile* WebPresencePlugin::generateFile() accName.appendChild( accNameText ); acc.appendChild( accName ); - TQDomElement accStatus = doc.createElement( "accountstatus" ); + TQDomElement acctqStatus = doc.createElement( "accountstatus" ); TQDomText statusText = doc.createTextNode( ( me ) - ? statusAsString( me->onlineStatus() ) + ? statusAsString( me->onlinetqStatus() ) : notKnown ) ; - accStatus.appendChild( statusText ); + acctqStatus.appendChild( statusText ); // Dont add these if we're shutting down, because the result // would be quite weird. if ( !shuttingDown ) { // Add away message as an attribute, if one exists. - if ( me->onlineStatus().status() == Kopete::OnlineStatus::Away && + if ( me->onlinetqStatus().status() == Kopete::OnlineStatus::Away && !me->property("awayMessage").value().toString().isEmpty() ) { - accStatus.setAttribute( "awayreason", + acctqStatus.setAttribute( "awayreason", me->property("awayMessage").value().toString() ); } // Add the online status description as an attribute, if one exits. - if ( !me->onlineStatus().description().isEmpty() ) { - accStatus.setAttribute( "statusdescription", - me->onlineStatus().description() ); + if ( !me->onlinetqStatus().description().isEmpty() ) { + acctqStatus.setAttribute( "statusdescription", + me->onlinetqStatus().description() ); } } - acc.appendChild( accStatus ); + acc.appendChild( acctqStatus ); if ( showAddresses ) { @@ -430,13 +430,13 @@ ProtocolList WebPresencePlugin::allProtocols() return result; } -TQString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newStatus ) +TQString WebPresencePlugin::statusAsString( const Kopete::OnlineStatus &newtqStatus ) { if (shuttingDown) return "OFFLINE"; TQString status; - switch ( newStatus.status() ) + switch ( newtqStatus.status() ) { case Kopete::OnlineStatus::Online: status = "ONLINE"; diff --git a/kopete/plugins/webpresence/webpresenceplugin.h b/kopete/plugins/webpresence/webpresenceplugin.h index eec5647e..6580a3c9 100644 --- a/kopete/plugins/webpresence/webpresenceplugin.h +++ b/kopete/plugins/webpresence/webpresenceplugin.h @@ -38,6 +38,7 @@ typedef TQValueList<Kopete::Protocol*> ProtocolList; class WebPresencePlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT private: int frequency; @@ -62,7 +63,7 @@ private: TQString resultURL; public: - WebPresencePlugin( TQObject *parent, const char *name, const TQStringList &args ); + WebPresencePlugin( TQObject *tqparent, const char *name, const TQStringList &args ); virtual ~WebPresencePlugin(); virtual void aboutToUnload(); @@ -108,7 +109,7 @@ protected: /** * Converts numeric status to a string */ - TQString statusAsString( const Kopete::OnlineStatus &newStatus ); + TQString statusAsString( const Kopete::OnlineStatus &newtqStatus ); /** * Schedules writes */ diff --git a/kopete/plugins/webpresence/webpresencepreferences.cpp b/kopete/plugins/webpresence/webpresencepreferences.cpp index 8aebcd53..a727277b 100644 --- a/kopete/plugins/webpresence/webpresencepreferences.cpp +++ b/kopete/plugins/webpresence/webpresencepreferences.cpp @@ -27,8 +27,8 @@ typedef KGenericFactory<WebPresencePreferences> WebPresencePreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_webpresence, WebPresencePreferencesFactory("kcm_kopete_webpresence")) -WebPresencePreferences::WebPresencePreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCModule(WebPresencePreferencesFactory::instance(), parent, args) +WebPresencePreferences::WebPresencePreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCModule(WebPresencePreferencesFactory::instance(), tqparent, args) { // Add actuall widget generated from ui file. ( new TQVBoxLayout( this ) )->setAutoAdd( true ); @@ -37,7 +37,7 @@ WebPresencePreferences::WebPresencePreferences(TQWidget *parent, const char* /*n preferencesDialog->formatStylesheetURL->setFilter( "*.xsl" ); // KAutoConfig stuff - kautoconfig = new KAutoConfig(KGlobal::config(), this, "kautoconfig"); + kautoconfig = new KAutoConfig(KGlobal::config(), TQT_TQOBJECT(this), "kautoconfig"); connect(kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(widgetModified())); connect(kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(widgetModified())); kautoconfig->addWidget(preferencesDialog, "Web Presence Plugin"); diff --git a/kopete/plugins/webpresence/webpresencepreferences.h b/kopete/plugins/webpresence/webpresencepreferences.h index 8c272cdc..f7a9fd19 100644 --- a/kopete/plugins/webpresence/webpresencepreferences.h +++ b/kopete/plugins/webpresence/webpresencepreferences.h @@ -29,9 +29,10 @@ class KAutoConfig; */ class WebPresencePreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - WebPresencePreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); + WebPresencePreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual void save(); virtual void defaults(); diff --git a/kopete/plugins/webpresence/webpresenceprefs.ui b/kopete/plugins/webpresence/webpresenceprefs.ui index 9aae819a..7f872fb7 100644 --- a/kopete/plugins/webpresence/webpresenceprefs.ui +++ b/kopete/plugins/webpresence/webpresenceprefs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WebPresencePrefsUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WebPresencePrefsUI</cstring> </property> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -42,7 +42,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -74,7 +74,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>449</width> <height>0</height> @@ -83,7 +83,7 @@ </spacer> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2_2</cstring> </property> @@ -100,7 +100,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>formatHTML</cstring> </property> @@ -119,7 +119,7 @@ This version should be easily opened by most web browsers.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>formatXHTML</cstring> </property> @@ -135,7 +135,7 @@ This version should be easily opened by most web browsers.</string> Note that some web browsers do not support XHTML. You should also make sure your web server serves it out with the correct mime type, such as application/xhtml+xml.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>formatXML</cstring> </property> @@ -149,7 +149,7 @@ Note that some web browsers do not support XHTML. You should also make sure your <string>Save the output in XML format using the UTF-8 encoding.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>formatStylesheet</cstring> </property> @@ -157,9 +157,9 @@ Note that some web browsers do not support XHTML. You should also make sure your <string>XML transformation &using this XSLT sheet:</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -175,7 +175,7 @@ Note that some web browsers do not support XHTML. You should also make sure your <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -192,7 +192,7 @@ Note that some web browsers do not support XHTML. You should also make sure your </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>useImagesHTML</cstring> </property> @@ -222,7 +222,7 @@ images/winpopup_protocol.png</string> </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -239,7 +239,7 @@ images/winpopup_protocol.png</string> <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>showName</cstring> </property> @@ -250,7 +250,7 @@ images/winpopup_protocol.png</string> <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>showAnotherName</cstring> </property> @@ -258,9 +258,9 @@ images/winpopup_protocol.png</string> <string>Use another &name:</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -276,14 +276,14 @@ images/winpopup_protocol.png</string> <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> </size> </property> </spacer> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>showThisName</cstring> </property> @@ -293,7 +293,7 @@ images/winpopup_protocol.png</string> </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>includeIMAddress</cstring> </property> @@ -313,7 +313,7 @@ images/winpopup_protocol.png</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>93</height> @@ -357,7 +357,7 @@ images/winpopup_protocol.png</string> <tabstop>showThisName</tabstop> <tabstop>includeIMAddress</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> |