diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:33:51 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:33:51 -0600 |
commit | 089118c18533dfa3e6ce5065dbebdd4db94051f1 (patch) | |
tree | ce014fb2326a80fcfafa2362b7ff88486aa17c96 /kopete/libkopete | |
parent | 83677e35509b4dafac63b76995652bdf3b49f209 (diff) | |
download | tdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.tar.gz tdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kopete/libkopete')
81 files changed, 797 insertions, 797 deletions
diff --git a/kopete/libkopete/avdevice/qvideostream.cpp b/kopete/libkopete/avdevice/qvideostream.cpp index 113aa16d..b1f821c9 100644 --- a/kopete/libkopete/avdevice/qvideostream.cpp +++ b/kopete/libkopete/avdevice/qvideostream.cpp @@ -213,7 +213,7 @@ void QVideoStream::init() d->shmh.shmaddr = (char *)shmat(d->shmh.shmid, 0, 0); d->xim->data = (char*)d->shmh.shmaddr; d->shmh.readOnly = False; - tqStatus s = XShmAttach(_w->x11Display(), &(d->shmh)); + Status s = XShmAttach(_w->x11Display(), &(d->shmh)); if (s) { XSync(_w->x11Display(), False); shmctl(d->shmh.shmid, IPC_RMID, 0); @@ -543,7 +543,7 @@ QVideoStreamGLWidget::QVideoStreamGLWidget(TQWidget* parent, const char* name) connect(_w, TQT_SIGNAL(resized(int, int)), this, TQT_SLOT(resize(int, int))); - tqtopLevelWidget()->installEventFilter(this); + topLevelWidget()->installEventFilter(this); _glfunTimer = new TQTimer(); } diff --git a/kopete/libkopete/clientiface.h b/kopete/libkopete/clientiface.h index ef1ac3f1..8385cfb8 100644 --- a/kopete/libkopete/clientiface.h +++ b/kopete/libkopete/clientiface.h @@ -14,14 +14,14 @@ k_dcop: /** * Get the status of the connection to the given host. * @param host - * @return a NetworktqStatus::EnumtqStatus representing the state of the connection to the given host + * @return a NetworkStatus::EnumStatus representing the state of the connection to the given host */ virtual int status( const TQString & host = TQString() ) = 0; /** * Request a connection to the named host, registering the application's usage of this connection * @param host The hostname the client wants to connect to. * @param userInitiated Indicates whether the connection is a direct result of a user action or is a background task. Used by the daemon to decide whether to create an on-demand connection. - * @return An NetworktqStatus::EnumRequestResult indicating whether the request was accepted + * @return An NetworkStatus::EnumRequestResult indicating whether the request was accepted */ virtual int request( const TQString & host, bool userInitiated ) = 0; /** diff --git a/kopete/libkopete/connectionmanager.cpp b/kopete/libkopete/connectionmanager.cpp index 62169986..4530fa9e 100644 --- a/kopete/libkopete/connectionmanager.cpp +++ b/kopete/libkopete/connectionmanager.cpp @@ -45,19 +45,19 @@ void ConnectionManager::initialise() { // determine initial state and set the state object accordingly. d->m_state = Inactive; - updatetqStatus(); + updateStatus(); } -void ConnectionManager::updatetqStatus() +void ConnectionManager::updateStatus() { - NetworktqStatus::EnumtqStatus daemontqStatus = (NetworktqStatus::EnumtqStatus)d->m_stub->status( TQString() ); + NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString() ); kdDebug() << k_funcinfo << endl; - switch ( daemontqStatus ) + switch ( daemonStatus ) { - case NetworktqStatus::Offline: - case NetworktqStatus::OfflineFailed: - case NetworktqStatus::OfflineDisconnected: - case NetworktqStatus::ShuttingDown: + case NetworkStatus::Offline: + case NetworkStatus::OfflineFailed: + case NetworkStatus::OfflineDisconnected: + case NetworkStatus::ShuttingDown: if ( d->m_state == Online ) { kdDebug() << "STATE IS PENDING" << endl; @@ -69,13 +69,13 @@ void ConnectionManager::updatetqStatus() d->m_state = Offline; } break; - case NetworktqStatus::Establishing: - case NetworktqStatus::Online: + case NetworkStatus::Establishing: + case NetworkStatus::Online: kdDebug() << "STATE IS ONLINE" << endl; d->m_state = Online; break; - case NetworktqStatus::NoNetworks: - case NetworktqStatus::Unreachable: + case NetworkStatus::NoNetworks: + case NetworkStatus::Unreachable: kdDebug() << "STATE IS INACTIVE" << endl; d->m_state = Inactive; break; @@ -87,38 +87,38 @@ ConnectionManager::~ConnectionManager() delete d; } -NetworktqStatus::EnumtqStatus ConnectionManager::status( const TQString & host ) +NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host ) { // need also to check that the daemon hasn't died - updatetqStatus(); + updateStatus(); if ( d->m_state == Pending ) - return NetworktqStatus::Offline; + return NetworkStatus::Offline; if ( d->m_state == Online ) - return NetworktqStatus::Online; + return NetworkStatus::Online; if ( d->m_state == Offline ) - return NetworktqStatus::Offline; - return NetworktqStatus::NoNetworks; + return NetworkStatus::Offline; + return NetworkStatus::NoNetworks; } -NetworktqStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) +NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) { kdDebug() << k_funcinfo << endl; - NetworktqStatus::EnumRequestResult result; + NetworkStatus::EnumRequestResult result; // if offline and the user has previously indicated they didn't want any new connections, suppress it if ( d->m_state == Offline && !userInitiated && d->m_userInitiatedOnly ) - result = NetworktqStatus::UserRefused; + result = NetworkStatus::UserRefused; // if offline, ask the user whether this connection should be allowed if ( d->m_state == Offline ) { if ( askToConnect( mainWidget ) ) - //result = NetworktqStatus::Connected; - result = (NetworktqStatus::EnumRequestResult)d->m_stub->request( host, userInitiated ); + //result = NetworkStatus::Connected; + result = (NetworkStatus::EnumRequestResult)d->m_stub->request( host, userInitiated ); else - result = NetworktqStatus::UserRefused; + result = NetworkStatus::UserRefused; } // otherwise, just ask for the connection else - result = (NetworktqStatus::EnumRequestResult)d->m_stub->request( host, userInitiated ); + result = (NetworkStatus::EnumRequestResult)d->m_stub->request( host, userInitiated ); return result; } @@ -131,12 +131,12 @@ void ConnectionManager::relinquishConnection( const TQString & host ) void ConnectionManager::slotStatusChanged( TQString host, int status ) { kdDebug() << k_funcinfo << endl; - updatetqStatus(); + updateStatus(); // reset user initiated only flag if we are now online if ( d->m_state == Online ) d->m_userInitiatedOnly = false; - emit statusChanged( host, (NetworktqStatus::EnumtqStatus)status ); + emit statusChanged( host, (NetworkStatus::EnumStatus)status ); } bool ConnectionManager::askToConnect( TQWidget * mainWidget ) @@ -147,7 +147,7 @@ bool ConnectionManager::askToConnect( TQWidget * mainWidget ) i18n("This application is currently in offline mode. Do you want to connect in order to carry out this operation?"), i18n("Leave Offline Mode?"), i18n("Connect"), i18n("Stay Offline"), - TQString::tqfromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); + TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); } #include "connectionmanager.moc" diff --git a/kopete/libkopete/connectionmanager.h b/kopete/libkopete/connectionmanager.h index 24d59f33..9890e474 100644 --- a/kopete/libkopete/connectionmanager.h +++ b/kopete/libkopete/connectionmanager.h @@ -32,19 +32,19 @@ class KOPETE_EXPORT ConnectionManager : public TQObject, virtual public DCOPObje static ConnectionManager* self(); enum State { Inactive, Online, Offline, Pending }; virtual ~ConnectionManager(); - NetworktqStatus::EnumtqStatus status( const TQString & host ); + NetworkStatus::EnumStatus status( const TQString & host ); // check if a hostname is available. Ask user if offline. Request host - NetworktqStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated ); + NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated ); // method to relinquish a connection void relinquishConnection( const TQString & host ); signals: // signal that the network for a hostname is up/down - void statusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status ); + void statusChanged( const TQString & host, NetworkStatus::EnumStatus status ); protected: // sets up internal state void initialise(); // reread the desktop status from the daemon and update internal state - void updatetqStatus(); + void updateStatus(); // ask if the user would like to reconnect bool askToConnect( TQWidget * mainWidget ); k_dcop: diff --git a/kopete/libkopete/kabcpersistence.cpp b/kopete/libkopete/kabcpersistence.cpp index b0727cce..6e712606 100644 --- a/kopete/libkopete/kabcpersistence.cpp +++ b/kopete/libkopete/kabcpersistence.cpp @@ -128,13 +128,13 @@ void KABCPersistence::write( MetaContact * mc ) for ( ; it != addressMap.end(); ++it ) { // read existing data for this key - TQString currentCustomForProtocol = theAddressee.custom( it.key(), TQString::tqfromLatin1( "All" ) ); + TQString currentCustomForProtocol = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); // merge without duplicating TQString toWrite = unionContents( currentCustomForProtocol, it.data().join( TQChar( 0xE000 ) ) ); // Note if nothing ends up in the KABC data, this is because insertCustom does nothing if any param is empty. kdDebug( 14010 ) << k_funcinfo << "Writing: " << it.key() << ", " << "All" << ", " << toWrite << endl; - theAddressee.insertCustom( it.key(), TQString::tqfromLatin1( "All" ), toWrite ); - TQString check = theAddressee.custom( it.key(), TQString::tqfromLatin1( "All" ) ); + theAddressee.insertCustom( it.key(), TQString::fromLatin1( "All" ), toWrite ); + TQString check = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); } ab->insertAddressee( theAddressee ); //kdDebug( 14010 ) << k_funcinfo << "dumping addressbook before write " << endl; @@ -274,20 +274,20 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) splitField( *it, app, name, value ); kdDebug( 14010 ) << "app=" << app << " name=" << name << " value=" << value << endl; - if ( app.startsWith( TQString::tqfromLatin1( "messaging/" ) ) ) + if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - if ( name == TQString::tqfromLatin1( "All" ) ) + if ( name == TQString::fromLatin1( "All" ) ) { kdDebug( 14010 ) << " syncing \"" << app << ":" << name << " with contactlist " << endl; // Get the protocol name from the custom field // by chopping the 'messaging/' prefix from the custom field app name TQString protocolName = app.right( app.length() - 10 ); // munge Jabber hack - if ( protocolName == TQString::tqfromLatin1( "xmpp" ) ) - protocolName = TQString::tqfromLatin1( "jabber" ); + if ( protocolName == TQString::fromLatin1( "xmpp" ) ) + protocolName = TQString::fromLatin1( "jabber" ); // Check Kopete supports it - Protocol * proto = dynamic_cast<Protocol*>( PluginManager::self()->loadPlugin( TQString::tqfromLatin1( "kopete_" ) + protocolName ) ); + Protocol * proto = dynamic_cast<Protocol*>( PluginManager::self()->loadPlugin( TQString::fromLatin1( "kopete_" ) + protocolName ) ); if ( !proto ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, @@ -339,7 +339,7 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) // if not, prompt to add it kdDebug( 14010 ) << proto->pluginId() << "://" << *it << " was not found in the contact list. Prompting to add..." << endl; if ( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), - i18n( "<qt>An address was added to this contact by another application.<br>Would you like to use it in Kopete?<br><b>Protocol:</b> %1<br><b>Address:</b> %2</qt>" ).tqarg( proto->displayName() ).tqarg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), TQString::tqfromLatin1( "ImportFromKABC" ) ) ) + i18n( "<qt>An address was added to this contact by another application.<br>Would you like to use it in Kopete?<br><b>Protocol:</b> %1<br><b>Address:</b> %2</qt>" ).tqarg( proto->displayName() ).tqarg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), TQString::fromLatin1( "ImportFromKABC" ) ) ) { // Check the accounts for this protocol are all connected // Most protocols do not allow you to add contacts while offline diff --git a/kopete/libkopete/kautoconfig.cpp b/kopete/libkopete/kautoconfig.cpp index bb28bb0e..21ec0e13 100644 --- a/kopete/libkopete/kautoconfig.cpp +++ b/kopete/libkopete/kautoconfig.cpp @@ -141,46 +141,46 @@ bool KAutoConfig::retrieveSettings(bool trackChanges){ if(trackChanges){ // QT - changedMap.insert(TQString::tqfromLatin1(TQBUTTON_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); - changedMap.insert(TQString::tqfromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); - changedMap.insert(TQString::tqfromLatin1(TQPUSHBUTTON_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); - changedMap.insert(TQString::tqfromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); - changedMap.insert(TQString::tqfromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), TQT_SIGNAL(activated (int))); + changedMap.insert(TQString::fromLatin1(TQBUTTON_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1(TQCHECKBOX_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1(TQPUSHBUTTON_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1(TQRADIOBUTTON_OBJECT_NAME_STRING), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), TQT_SIGNAL(activated (int))); //qsqlproperty map doesn't store the text, but the value! - //changedMap.insert(TQString::tqfromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged(const TQString &))); - changedMap.insert(TQString::tqfromLatin1(TQDATEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(const TQDate &))); - changedMap.insert(TQString::tqfromLatin1(TQDATETIMEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(const TQDateTime &))); - changedMap.insert(TQString::tqfromLatin1(TQDIAL_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged (int))); - changedMap.insert(TQString::tqfromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged(const TQString &))); - changedMap.insert(TQString::tqfromLatin1(TQSLIDER_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(int))); - changedMap.insert(TQString::tqfromLatin1(TQSPINBOX_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(int))); - changedMap.insert(TQString::tqfromLatin1(TQTIMEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(const TQTime &))); - changedMap.insert(TQString::tqfromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged())); - changedMap.insert(TQString::tqfromLatin1(TQTEXTBROWSER_OBJECT_NAME_STRING), TQT_SIGNAL(sourceChanged(const TQString &))); - changedMap.insert(TQString::tqfromLatin1(TQMULTILINEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged())); - changedMap.insert(TQString::tqfromLatin1(TQLISTBOX_OBJECT_NAME_STRING), TQT_SIGNAL(selectionChanged())); - changedMap.insert(TQString::tqfromLatin1(TQTABWIDGET_OBJECT_NAME_STRING), TQT_SIGNAL(currentChanged(TQWidget *))); + //changedMap.insert(TQString::fromLatin1(TQCOMBOBOX_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1(TQDATEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(const TQDate &))); + changedMap.insert(TQString::fromLatin1(TQDATETIMEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(const TQDateTime &))); + changedMap.insert(TQString::fromLatin1(TQDIAL_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged (int))); + changedMap.insert(TQString::fromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1(TQSLIDER_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1(TQSPINBOX_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1(TQTIMEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(valueChanged(const TQTime &))); + changedMap.insert(TQString::fromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1(TQTEXTBROWSER_OBJECT_NAME_STRING), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1(TQMULTILINEEDIT_OBJECT_NAME_STRING), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1(TQLISTBOX_OBJECT_NAME_STRING), TQT_SIGNAL(selectionChanged())); + changedMap.insert(TQString::fromLatin1(TQTABWIDGET_OBJECT_NAME_STRING), TQT_SIGNAL(currentChanged(TQWidget *))); // KDE - changedMap.insert( TQString::tqfromLatin1("KComboBox"), TQT_SIGNAL(activated (int))); - changedMap.insert( TQString::tqfromLatin1("KFontCombo"), TQT_SIGNAL(activated (int))); - changedMap.insert( TQString::tqfromLatin1("KFontRequester"), TQT_SIGNAL(fontSelected(const TQFont &))); - changedMap.insert( TQString::tqfromLatin1("KFontChooser"), TQT_SIGNAL(fontSelected(const TQFont &))); - changedMap.insert( TQString::tqfromLatin1("KHistoryCombo"), TQT_SIGNAL(activated (int))); - - changedMap.insert( TQString::tqfromLatin1("KColorButton"), TQT_SIGNAL(changed(const TQColor &))); - changedMap.insert( TQString::tqfromLatin1("KDatePicker"), TQT_SIGNAL(dateSelected (TQDate))); - changedMap.insert( TQString::tqfromLatin1("KEditListBox"), TQT_SIGNAL(changed())); - changedMap.insert( TQString::tqfromLatin1("KListBox"), TQT_SIGNAL(selectionChanged())); - changedMap.insert( TQString::tqfromLatin1("KLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); - changedMap.insert( TQString::tqfromLatin1("KPasswordEdit"), TQT_SIGNAL(textChanged(const TQString &))); - changedMap.insert( TQString::tqfromLatin1("KRestrictedLine"), TQT_SIGNAL(textChanged(const TQString &))); - changedMap.insert( TQString::tqfromLatin1("KTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); - changedMap.insert( TQString::tqfromLatin1("KTextEdit"), TQT_SIGNAL(textChanged())); - changedMap.insert( TQString::tqfromLatin1("KURLRequester"), TQT_SIGNAL(textChanged (const TQString& ))); - changedMap.insert( TQString::tqfromLatin1("KIntNumInput"), TQT_SIGNAL(valueChanged (int))); - changedMap.insert( TQString::tqfromLatin1("KIntSpinBox"), TQT_SIGNAL(valueChanged (int))); - changedMap.insert( TQString::tqfromLatin1("KDoubleNumInput"), TQT_SIGNAL(valueChanged (double))); + changedMap.insert( TQString::fromLatin1("KComboBox"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontCombo"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontRequester"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KFontChooser"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KHistoryCombo"), TQT_SIGNAL(activated (int))); + + changedMap.insert( TQString::fromLatin1("KColorButton"), TQT_SIGNAL(changed(const TQColor &))); + changedMap.insert( TQString::fromLatin1("KDatePicker"), TQT_SIGNAL(dateSelected (TQDate))); + changedMap.insert( TQString::fromLatin1("KEditListBox"), TQT_SIGNAL(changed())); + changedMap.insert( TQString::fromLatin1("KListBox"), TQT_SIGNAL(selectionChanged())); + changedMap.insert( TQString::fromLatin1("KLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KPasswordEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KRestrictedLine"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert( TQString::fromLatin1("KURLRequester"), TQT_SIGNAL(textChanged (const TQString& ))); + changedMap.insert( TQString::fromLatin1("KIntNumInput"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KIntSpinBox"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KDoubleNumInput"), TQT_SIGNAL(valueChanged (double))); } // Go through all of the tqchildren of the widgets and find all known widgets @@ -215,8 +215,8 @@ bool KAutoConfig::saveSettings() { TQVariant defaultValue = d->defaultValues[groupWidget]; TQVariant currentValue = propertyMap->property(groupWidget); #if KDE_IS_VERSION( 3, 1, 90 ) - if(!config->hasDefault(TQString::tqfromLatin1(groupWidget->name())) && currentValue == defaultValue){ - config->revertToDefault(TQString::tqfromLatin1(groupWidget->name())); + if(!config->hasDefault(TQString::fromLatin1(groupWidget->name())) && currentValue == defaultValue){ + config->revertToDefault(TQString::fromLatin1(groupWidget->name())); widgetChanged = true; } else{ @@ -390,7 +390,7 @@ bool KAutoConfig::parseChildren(const TQWidget *widget, { parseTheChildren = false; // Disable the widget if it is immutable? - if(config->entryIsImmutable( TQString::tqfromLatin1(childWidget->name()))) + if(config->entryIsImmutable( TQString::fromLatin1(childWidget->name()))) childWidget->setEnabled(false); else { @@ -408,15 +408,15 @@ bool KAutoConfig::parseChildren(const TQWidget *widget, propertyMap->setProperty(childWidget, setting); valueChanged = true; } - if(trackChanges && changedMap.find(TQString::tqfromLatin1(childWidget->className())) != + if(trackChanges && changedMap.find(TQString::fromLatin1(childWidget->className())) != changedMap.end()) { - connect(childWidget, changedMap[TQString::tqfromLatin1(childWidget->className())], + connect(childWidget, changedMap[TQString::fromLatin1(childWidget->className())], this, TQT_SIGNAL(widgetModified())); } #ifndef NDEBUG else if(trackChanges && - changedMap.find(TQString::tqfromLatin1(childWidget->className())) == changedMap.end()) + changedMap.find(TQString::fromLatin1(childWidget->className())) == changedMap.end()) { // Without a signal kautoconfigdialog could incorectly // enable/disable the buttons diff --git a/kopete/libkopete/knotification.cpp b/kopete/libkopete/knotification.cpp index cd7fa13a..f818d101 100644 --- a/kopete/libkopete/knotification.cpp +++ b/kopete/libkopete/knotification.cpp @@ -109,7 +109,7 @@ void KNotification::notifyByMessagebox() return; TQString action=d->actions[0]; - WId winId=d->widget ? d->widget->tqtopLevelWidget()->winId() : 0; + WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; if( action.isEmpty()) { @@ -171,7 +171,7 @@ void KNotification::notifyByPassivePopup(const TQPixmap &pix ) TQString title = config.readEntry( "Comment", appName ); //KPassivePopup::message(title, text, icon, senderWinId); - WId winId=d->widget ? d->widget->tqtopLevelWidget()->winId() : 0; + WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; KPassivePopup *pop = new KPassivePopup( checkWinId(appName, winId) ); TQObject::connect(this, TQT_SIGNAL(closed()), pop, TQT_SLOT(deleteLater())); @@ -198,22 +198,22 @@ void KNotification::notifyByPassivePopup(const TQPixmap &pix ) } vb=new TQVBox(hb); TQLabel *msg = new TQLabel( d->text, vb, "msg_label" ); - msg->tqsetAlignment( AlignLeft ); + msg->setAlignment( AlignLeft ); } if ( !d->actions.isEmpty() ) { - TQString linkCode=TQString::tqfromLatin1("<p align=\"right\">"); + TQString linkCode=TQString::fromLatin1("<p align=\"right\">"); int i=0; for ( TQStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) { i++; - linkCode+=TQString::tqfromLatin1(" <a href=\"%1\">%2</a> ").tqarg( TQString::number(i) , TQStyleSheet::escape(*it) ); + linkCode+=TQString::fromLatin1(" <a href=\"%1\">%2</a> ").tqarg( TQString::number(i) , TQStyleSheet::escape(*it) ); } - linkCode+=TQString::tqfromLatin1("</p>"); + linkCode+=TQString::fromLatin1("</p>"); KActiveLabel *link = new KActiveLabel(linkCode , vb ); - //link->tqsetAlignment( AlignRight ); + //link->setAlignment( AlignRight ); TQObject::disconnect(link, TQT_SIGNAL(linkClicked(const TQString &)), link, TQT_SLOT(openLink(const TQString &))); TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(slotPopupLinkClicked(const TQString &))); TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), pop, TQT_SLOT(hide())); @@ -373,7 +373,7 @@ KNotification *KNotification::userEvent( const TQString& text, const TQPixmap& p notify->d->text=text; notify->d->actions=actions; notify->d->level=level; - WId winId=widget ? widget->tqtopLevelWidget()->winId() : 0; + WId winId=widget ? widget->topLevelWidget()->winId() : 0; //we will catch some event that will not be fired by the old deamon diff --git a/kopete/libkopete/kopeteaccount.cpp b/kopete/libkopete/kopeteaccount.cpp index ab9d7624..e0f7cfd2 100644 --- a/kopete/libkopete/kopeteaccount.cpp +++ b/kopete/libkopete/kopeteaccount.cpp @@ -79,21 +79,21 @@ public: KConfigGroup *configGroup; uint connectionTry; TQString customIcon; - Kopete::OnlineStatus restoretqStatus; + Kopete::OnlineStatus restoreStatus; TQString restoreMessage; }; Account::Account( Protocol *parent, const TQString &accountId, const char *name ) : TQObject( parent, name ), d( new Private( parent, accountId ) ) { - d->configGroup=new KConfigGroup(KGlobal::config(), TQString::tqfromLatin1( "Account_%1_%2" ).tqarg( d->protocol->pluginId(), d->id )); + d->configGroup=new KConfigGroup(KGlobal::config(), TQString::fromLatin1( "Account_%1_%2" ).tqarg( d->protocol->pluginId(), d->id )); d->excludeconnect = d->configGroup->readBoolEntry( "ExcludeConnect", false ); d->color = d->configGroup->readColorEntry( "Color", &d->color ); d->customIcon = d->configGroup->readEntry( "Icon", TQString() ); d->priority = d->configGroup->readNumEntry( "Priority", 0 ); - d->restoretqStatus = Kopete::OnlineStatus::Online; + d->restoreStatus = Kopete::OnlineStatus::Online; d->restoreMessage = ""; TQObject::connect( &d->suppressStatusTimer, TQT_SIGNAL( timeout() ), @@ -118,8 +118,8 @@ Account::~Account() void Account::reconnect() { - kdDebug( 14010 ) << k_funcinfo << "account " << d->id << " restoreStatus " << d->restoretqStatus.status() << " restoreMessage " << d->restoreMessage << endl; - setOnlineStatus( d->restoretqStatus, d->restoreMessage ); + kdDebug( 14010 ) << k_funcinfo << "account " << d->id << " restoreStatus " << d->restoreStatus.status() << " restoreMessage " << d->restoreMessage << endl; + setOnlineStatus( d->restoreStatus, d->restoreMessage ); } void Account::disconnected( DisconnectReason reason ) @@ -361,10 +361,10 @@ bool Account::addContact(const TQString &contactId , MetaContact *parent, AddMod KActionMenu * Account::actionMenu() { //default implementation - KActionMenu *menu = new KActionMenu( accountId(), myself()->onlinetqStatus().iconFor( this ), this ); + KActionMenu *menu = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this ); TQString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); - menu->popupMenu()->insertTitle( myself()->onlinetqStatus().iconFor( myself() ), + menu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), nick.isNull() ? accountLabel() : i18n( "%2 <%1>" ).tqarg( accountLabel(), nick ) ); @@ -383,7 +383,7 @@ bool Account::isConnected() const bool Account::isAway() const { - return d->myself && ( d->myself->onlinetqStatus().status() == Kopete::OnlineStatus::Away ); + return d->myself && ( d->myself->onlineStatus().status() == Kopete::OnlineStatus::Away ); } Contact * Account::myself() const @@ -417,12 +417,12 @@ void Account::setMyself( Contact *myself ) } void Account::slotOnlineStatusChanged( Contact * /* contact */, - const OnlineStatus &newtqStatus, const OnlineStatus &oldtqStatus ) + const OnlineStatus &newStatus, const OnlineStatus &oldStatus ) { - bool wasOffline = !oldtqStatus.isDefinitelyOnline(); - bool isOffline = !newtqStatus.isDefinitelyOnline(); + bool wasOffline = !oldStatus.isDefinitelyOnline(); + bool isOffline = !newStatus.isDefinitelyOnline(); - if ( wasOffline || newtqStatus.status() == OnlineStatus::Offline ) + if ( wasOffline || newStatus.status() == OnlineStatus::Offline ) { // Wait for five seconds until we treat status notifications for contacts // as unrelated to our own status change. @@ -437,19 +437,19 @@ void Account::slotOnlineStatusChanged( Contact * /* contact */, if ( !isOffline ) { - d->restoretqStatus = newtqStatus; + d->restoreStatus = newStatus; d->restoreMessage = myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); // kdDebug( 14010 ) << k_funcinfo << "account " << d->id << " restoreStatus " << d->restoreStatus.status() << " restoreMessage " << d->restoreMessage << endl; } /* kdDebug(14010) << k_funcinfo << "account " << d->id << " changed status. was " - << Kopete::OnlineStatus::statusTypeToString(oldtqStatus.status()) << ", is " - << Kopete::OnlineStatus::statusTypeToString(newtqStatus.status()) << endl;*/ + << Kopete::OnlineStatus::statusTypeToString(oldStatus.status()) << ", is " + << Kopete::OnlineStatus::statusTypeToString(newStatus.status()) << endl;*/ if ( wasOffline != isOffline ) emit isConnectedChanged(); } -void Account::setAllContactstqStatus( const Kopete::OnlineStatus &status ) +void Account::setAllContactsStatus( const Kopete::OnlineStatus &status ) { d->suppressStatusNotification = true; d->suppressStatusTimer.start( 5000, true ); @@ -462,7 +462,7 @@ void Account::setAllContactstqStatus( const Kopete::OnlineStatus &status ) void Account::slotContactPropertyChanged( Contact * /* contact */, const TQString &key, const TQVariant &old, const TQVariant &newVal ) { - if ( key == TQString::tqfromLatin1("awayMessage") && old != newVal && isConnected() ) + if ( key == TQString::fromLatin1("awayMessage") && old != newVal && isConnected() ) { d->restoreMessage = newVal.toString(); // kdDebug( 14010 ) << k_funcinfo << "account " << d->id << " restoreMessage " << d->restoreMessage << endl; @@ -550,7 +550,7 @@ TQString Account::pluginData( Plugin* /*plugin*/, const TQString &key ) const void Account::setAway(bool away, const TQString& reason) { - setOnlineStatus( OnlineStatusManager::self()->onlinetqStatus(protocol() , away ? OnlineStatusManager::Away : OnlineStatusManager::Online) , reason ); + setOnlineStatus( OnlineStatusManager::self()->onlineStatus(protocol() , away ? OnlineStatusManager::Away : OnlineStatusManager::Online) , reason ); } void Account::setCustomIcon( const TQString & i) diff --git a/kopete/libkopete/kopeteaccount.h b/kopete/libkopete/kopeteaccount.h index b7915b5e..90ae678b 100644 --- a/kopete/libkopete/kopeteaccount.h +++ b/kopete/libkopete/kopeteaccount.h @@ -301,7 +301,7 @@ public: /** * @brief Indicate whether the account is away. * - * This is a convenience method that queries @ref Contact::onlinetqStatus() on @ref myself(). + * This is a convenience method that queries @ref Contact::onlineStatus() on @ref myself(). * This function is safe to call if @ref setMyself() has not been called yet. */ bool isAway() const; @@ -409,7 +409,7 @@ protected slots: * * @param status the status to set all contacts of this account except @ref myself() to. */ - void setAllContactstqStatus( const Kopete::OnlineStatus &status ); + void setAllContactsStatus( const Kopete::OnlineStatus &status ); signals: /** @@ -450,10 +450,10 @@ public slots: /** * @brief Go online for this service. * - * @param initialtqStatus is the status to connect with. If it is an invalid status for this + * @param initialStatus is the status to connect with. If it is an invalid status for this * account, the default online for the account should be used. */ - virtual void connect( const Kopete::OnlineStatus& initialtqStatus = OnlineStatus() ) = 0; + virtual void connect( const Kopete::OnlineStatus& initialStatus = OnlineStatus() ) = 0; /** * @brief Go offline for this service. @@ -516,7 +516,7 @@ private slots: /** * The @ref myself() contact's online status changed. */ - void slotOnlineStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &newtqStatus, const Kopete::OnlineStatus &oldtqStatus ); + void slotOnlineStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &newStatus, const Kopete::OnlineStatus &oldStatus ); /** * The @ref myself() contact's property changed. diff --git a/kopete/libkopete/kopeteaccountmanager.cpp b/kopete/libkopete/kopeteaccountmanager.cpp index 69bf272a..7f014519 100644 --- a/kopete/libkopete/kopeteaccountmanager.cpp +++ b/kopete/libkopete/kopeteaccountmanager.cpp @@ -138,7 +138,7 @@ void AccountManager::setAwayAll( const TQString &awayReason, bool away ) { // FIXME: ICQ's invisible online should be set to invisible away Contact *self = it.current()->myself(); - bool isInvisible = self && self->onlinetqStatus().status() == OnlineStatus::Invisible; + bool isInvisible = self && self->onlineStatus().status() == OnlineStatus::Invisible; if ( anyConnected ) { if ( it.current()->isConnected() && !isInvisible ) @@ -160,7 +160,7 @@ void AccountManager::setOnlineStatus( uint category , const TQString& awayMessag for ( TQPtrListIterator<Account> it( d->accounts ); it.current(); ++it ) { Account *account = it.current(); - Kopete::OnlineStatus status = OnlineStatusManager::self()->onlinetqStatus(account->protocol() , katgor); + Kopete::OnlineStatus status = OnlineStatusManager::self()->onlineStatus(account->protocol() , katgor); if ( anyConnected ) { if ( account->isConnected() || ( (flags & ConnectIfOffline) && !account->excludeConnect() ) ) @@ -332,7 +332,7 @@ void AccountManager::removeAccount( Account *account ) { // FIXME: pluginId() should return the internal name and not the class name, so // we can get rid of this hack - Olivier/Martijn - TQString protocolName = protocol->pluginId().remove( TQString::tqfromLatin1( "Protocol" ) ).lower(); + TQString protocolName = protocol->pluginId().remove( TQString::fromLatin1( "Protocol" ) ).lower(); PluginManager::self()->setPluginEnabled( protocolName, false ); PluginManager::self()->unloadPlugin( protocolName ); @@ -365,14 +365,14 @@ void AccountManager::load() // Don't try to optimize duplicate calls out, the plugin queue is smart enough // (and fast enough) to handle that without adding complexity here KConfig *config = KGlobal::config(); - TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::tqfromLatin1( "^Account_" ) ) ); + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); TQString protocol = config->readEntry( "Protocol" ); - if ( protocol.endsWith( TQString::tqfromLatin1( "Protocol" ) ) ) - protocol = TQString::tqfromLatin1( "kopete_" ) + protocol.lower().remove( TQString::tqfromLatin1( "protocol" ) ); + if ( protocol.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + protocol = TQString::fromLatin1( "kopete_" ) + protocol.lower().remove( TQString::fromLatin1( "protocol" ) ); if ( config->readBoolEntry( "Enabled", true ) ) PluginManager::self()->loadPlugin( protocol, PluginManager::LoadAsync ); @@ -388,7 +388,7 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) // Iterate over all groups that start with "Account_" as those are accounts // and parse them if they are from this protocol KConfig *config = KGlobal::config(); - TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::tqfromLatin1( "^Account_" ) ) ); + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); @@ -423,14 +423,14 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) } void AccountManager::slotAccountOnlineStatusChanged(Contact *c, - const OnlineStatus &oldtqStatus, const OnlineStatus &newtqStatus) + const OnlineStatus &oldStatus, const OnlineStatus &newStatus) { Account *account = c->account(); if (!account) return; //kdDebug(14010) << k_funcinfo << endl; - emit accountOnlineStatusChanged(account, oldtqStatus, newtqStatus); + emit accountOnlineStatusChanged(account, oldStatus, newStatus); } } //END namespace Kopete diff --git a/kopete/libkopete/kopeteaccountmanager.h b/kopete/libkopete/kopeteaccountmanager.h index a8163245..f1ba6443 100644 --- a/kopete/libkopete/kopeteaccountmanager.h +++ b/kopete/libkopete/kopeteaccountmanager.h @@ -196,11 +196,11 @@ signals: * \brief An account has changed its onlinestatus * Technically this monitors Account::myself() onlinestatus changes * \param account Account which changed its onlinestatus - * \param oldtqStatus The online status before the change - * \param newtqStatus The new online status + * \param oldStatus The online status before the change + * \param newStatus The new online status */ void accountOnlineStatusChanged(Kopete::Account *account, - const Kopete::OnlineStatus &oldtqStatus, const Kopete::OnlineStatus &newtqStatus); + const Kopete::OnlineStatus &oldStatus, const Kopete::OnlineStatus &newStatus); private: /** @@ -211,7 +211,7 @@ private: private slots: void slotPluginLoaded( Kopete::Plugin *plugin ); void slotAccountOnlineStatusChanged(Kopete::Contact *c, - const Kopete::OnlineStatus &oldtqStatus, const Kopete::OnlineStatus &newtqStatus); + const Kopete::OnlineStatus &oldStatus, const Kopete::OnlineStatus &newStatus); /** * \internal diff --git a/kopete/libkopete/kopeteaway.cpp b/kopete/libkopete/kopeteaway.cpp index 035e12c2..46214376 100644 --- a/kopete/libkopete/kopeteaway.cpp +++ b/kopete/libkopete/kopeteaway.cpp @@ -469,7 +469,7 @@ void Kopete::Away::setActive() { if(i->isConnected() && i->isAway()) { - i->setOnlineStatus( Kopete::OnlineStatusManager::self()->onlinetqStatus( i->protocol() , + i->setOnlineStatus( Kopete::OnlineStatusManager::self()->onlineStatus( i->protocol() , Kopete::OnlineStatusManager::Online ) ); } @@ -499,21 +499,21 @@ void Kopete::Away::setAutoAway() TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { - if(i->myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Online) + if(i->myself()->onlineStatus().status() == Kopete::OnlineStatus::Online) { d->autoAwayAccounts.append(i); if(d->useAutoAwayMessage) { // Display a specific away message - i->setOnlineStatus( Kopete::OnlineStatusManager::self()->onlinetqStatus( i->protocol() , + i->setOnlineStatus( Kopete::OnlineStatusManager::self()->onlineStatus( i->protocol() , Kopete::OnlineStatusManager::Idle ) , getInstance()->d->autoAwayMessage); } else { // Display the last away message used - i->setOnlineStatus( Kopete::OnlineStatusManager::self()->onlinetqStatus( i->protocol() , + i->setOnlineStatus( Kopete::OnlineStatusManager::self()->onlineStatus( i->protocol() , Kopete::OnlineStatusManager::Idle ) , getInstance()->d->awayMessage); } diff --git a/kopete/libkopete/kopeteblacklister.cpp b/kopete/libkopete/kopeteblacklister.cpp index 7030fdbd..29dbf727 100644 --- a/kopete/libkopete/kopeteblacklister.cpp +++ b/kopete/libkopete/kopeteblacklister.cpp @@ -42,7 +42,7 @@ BlackLister::BlackLister(const TQString &protocolId, const TQString &accountId, d->owner = accountId; d->protocol = protocolId; config->setGroup("BlackLister"); - d->blacklist = config->readListEntry( d->protocol + TQString::tqfromLatin1("_") + d->owner ); + d->blacklist = config->readListEntry( d->protocol + TQString::fromLatin1("_") + d->owner ); } BlackLister::~BlackLister() @@ -90,7 +90,7 @@ void BlackLister::saveToDisk() KConfig *config = KGlobal::config(); config->setGroup("BlackLister"); - config->writeEntry( d->protocol + TQString::tqfromLatin1("_") + d->owner, d->blacklist ); + config->writeEntry( d->protocol + TQString::fromLatin1("_") + d->owner, d->blacklist ); config->sync(); } diff --git a/kopete/libkopete/kopetechatsession.cpp b/kopete/libkopete/kopetechatsession.cpp index d49e135c..46c19361 100644 --- a/kopete/libkopete/kopetechatsession.cpp +++ b/kopete/libkopete/kopetechatsession.cpp @@ -49,7 +49,7 @@ class KMMPrivate public: Kopete::ContactPtrList mContactList; const Kopete::Contact *mUser; - TQMap<const Kopete::Contact *, Kopete::OnlineStatus> contacttqStatus; + TQMap<const Kopete::Contact *, Kopete::OnlineStatus> contactStatus; Kopete::Protocol *mProtocol; bool isEmpty; bool mCanBeDeleted; @@ -101,27 +101,27 @@ Kopete::ChatSession::~ChatSession() delete d; } -void Kopete::ChatSession::slotOnlineStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus ) +void Kopete::ChatSession::slotOnlineStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus ) { slotUpdateDisplayName(); - emit onlineStatusChanged((Kopete::Contact*)c, status, oldtqStatus); + emit onlineStatusChanged((Kopete::Contact*)c, status, oldStatus); } void Kopete::ChatSession::setContactOnlineStatus( const Kopete::Contact *contact, const Kopete::OnlineStatus &status ) { - Kopete::OnlineStatus oldtqStatus = d->contacttqStatus[ contact ]; - d->contacttqStatus[ contact ] = status; + Kopete::OnlineStatus oldStatus = d->contactStatus[ contact ]; + d->contactStatus[ contact ] = status; disconnect( contact, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); - emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldtqStatus ); + emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldStatus ); } const Kopete::OnlineStatus Kopete::ChatSession::contactOnlineStatus( const Kopete::Contact *contact ) const { - if ( d->contacttqStatus.contains( contact ) ) - return d->contacttqStatus[ contact ]; + if ( d->contactStatus.contains( contact ) ) + return d->contactStatus[ contact ]; - return contact->onlinetqStatus(); + return contact->onlineStatus(); } const TQString Kopete::ChatSession::displayName() @@ -156,7 +156,7 @@ void Kopete::ChatSession::slotUpdateDisplayName() do { if(! d->displayName.isNull() ) - d->displayName.append( TQString::tqfromLatin1( ", " ) ) ; + d->displayName.append( TQString::fromLatin1( ", " ) ) ; if ( c->metaContact() ) d->displayName.append( c->metaContact()->displayName() ); @@ -171,7 +171,7 @@ void Kopete::ChatSession::slotUpdateDisplayName() //If we have only 1 contact, add the status of him if ( d->mContactList.count() == 1 ) { - d->displayName.append( TQString::tqfromLatin1( " (%1)" ).tqarg( d->mContactList.first()->onlinetqStatus().description() ) ); + d->displayName.append( TQString::fromLatin1( " (%1)" ).tqarg( d->mContactList.first()->onlineStatus().description() ) ); } emit displayNameChanged(); @@ -248,7 +248,7 @@ void Kopete::ChatSession::sendMessage( Kopete::Message &message ) emit messageSent( sentMessage, this ); if ( !account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) { - KNotification::event(TQString::tqfromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); + KNotification::event(TQString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); } } else @@ -264,7 +264,7 @@ void Kopete::ChatSession::messageSucceeded() void Kopete::ChatSession::emitNudgeNotification() { - KNotification::event( TQString::tqfromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); + KNotification::event( TQString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); } void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) @@ -275,7 +275,7 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) { TQString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); if ( KopetePrefs::prefs()->highlightEnabled() && !nick.isEmpty() && - msg.plainBody().contains( TQRegExp( TQString::tqfromLatin1( "\\b(%1)\\b" ).tqarg( nick ), false ) ) ) + msg.plainBody().contains( TQRegExp( TQString::fromLatin1( "\\b(%1)\\b" ).tqarg( nick ), false ) ) ) { msg.setImportance( Kopete::Message::Highlight ); } @@ -294,10 +294,10 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) // emit messageAppended( msg, this ); } -void Kopete::ChatSession::addContact( const Kopete::Contact *c, const Kopete::OnlineStatus &initialtqStatus, bool suppress ) +void Kopete::ChatSession::addContact( const Kopete::Contact *c, const Kopete::OnlineStatus &initialStatus, bool suppress ) { - if( !d->contacttqStatus.contains(c) ) - d->contacttqStatus[ c ] = initialtqStatus; + if( !d->contactStatus.contains(c) ) + d->contactStatus[ c ] = initialStatus; addContact( c, suppress ); } @@ -386,7 +386,7 @@ void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const TQStrin slotUpdateDisplayName(); } - d->contacttqStatus.remove( c ); + d->contactStatus.remove( c ); emit contactRemoved( c, reason, format, suppressNotification ); } diff --git a/kopete/libkopete/kopetechatsession.h b/kopete/libkopete/kopetechatsession.h index 802a4e39..cab992c9 100644 --- a/kopete/libkopete/kopetechatsession.h +++ b/kopete/libkopete/kopetechatsession.h @@ -130,7 +130,7 @@ public: * Set a special icon for a contact in this kmm only. * by default, all contact have their own status */ - void setContactOnlineStatus( const Contact *contact, const OnlineStatus &newtqStatus ); + void setContactOnlineStatus( const Contact *contact, const OnlineStatus &newStatus ); /** * @brief get the status of a contact. @@ -296,13 +296,13 @@ public slots: /** * Add a contact to the session with a pre-set initial status * @param c is the contact - * @param initialtqStatus The initial contactOnlineStatus of the contact + * @param initialStatus The initial contactOnlineStatus of the contact * @param suppress mean the there will be no automatic notifications in the chatwindow. * (note that i don't like the param suppress at all. it is used in irc to show a different notification (with an info text) * a TQStringinfo would be more interesting, but it is also used to don't show the notification when entering in a channel) * @see contactOnlineStatus */ - void addContact( const Kopete::Contact *c, const Kopete::OnlineStatus &initialtqStatus, bool suppress = false ); + void addContact( const Kopete::Contact *c, const Kopete::OnlineStatus &initialStatus, bool suppress = false ); /** * Remove a contact from the session @@ -371,7 +371,7 @@ public slots: private slots: void slotUpdateDisplayName(); void slotViewDestroyed(); - void slotOnlineStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus ); + void slotOnlineStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus ); void slotContactDestroyed( Kopete::Contact *contact ); protected: diff --git a/kopete/libkopete/kopetecommandhandler.cpp b/kopete/libkopete/kopetecommandhandler.cpp index ec2618bc..acb3d767 100644 --- a/kopete/libkopete/kopetecommandhandler.cpp +++ b/kopete/libkopete/kopetecommandhandler.cpp @@ -45,7 +45,7 @@ class KopeteCommandGUIClient : public TQObject, public KXMLGUIClient public: KopeteCommandGUIClient( Kopete::ChatSession *manager ) : TQObject(manager), KXMLGUIClient(manager) { - setXMLFile( TQString::tqfromLatin1("kopetecommandui.rc") ); + setXMLFile( TQString::fromLatin1("kopetecommandui.rc") ); TQDomDocument doc = domDocument(); TQDomNode menu = doc.documentElement().firstChild().firstChild().firstChild(); @@ -57,15 +57,15 @@ class KopeteCommandGUIClient : public TQObject, public KXMLGUIClient { KAction *a = static_cast<KAction*>( it.current() ); actionCollection()->insert( a ); - TQDomElement newNode = doc.createElement( TQString::tqfromLatin1("Action") ); - newNode.setAttribute( TQString::tqfromLatin1("name"), - TQString::tqfromLatin1( a->name() ) ); + TQDomElement newNode = doc.createElement( TQString::fromLatin1("Action") ); + newNode.setAttribute( TQString::fromLatin1("name"), + TQString::fromLatin1( a->name() ) ); bool added = false; for( TQDomElement n = menu.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if( TQString::tqfromLatin1(a->name()) < n.attribute(TQString::tqfromLatin1("name"))) + if( TQString::fromLatin1(a->name()) < n.attribute(TQString::fromLatin1("name"))) { menu.insertBefore( newNode, n ); added = true; @@ -103,33 +103,33 @@ Kopete::CommandHandler::CommandHandler() : TQObject( tqApp ) mCommands.setAutoDelete( true ); p->pluginCommands.insert( this, mCommands ); - registerCommand( this, TQString::tqfromLatin1("help"), TQT_SLOT( slotHelpCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("help"), TQT_SLOT( slotHelpCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /help [<command>] - Used to list available commands, or show help for a specified command." ), 0, 1 ); - registerCommand( this, TQString::tqfromLatin1("close"), TQT_SLOT( slotCloseCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("close"), TQT_SLOT( slotCloseCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /close - Closes the current view." ) ); // FIXME: What's the difference with /close? The help doesn't explain it - Martijn - registerCommand( this, TQString::tqfromLatin1("part"), TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("part"), TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /part - Closes the current view." ) ); - registerCommand( this, TQString::tqfromLatin1("clear"), TQT_SLOT( slotClearCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("clear"), TQT_SLOT( slotClearCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /clear - Clears the active view's chat buffer." ) ); - //registerCommand( this, TQString::tqfromLatin1("me"), TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession * ) ), + //registerCommand( this, TQString::fromLatin1("me"), TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession * ) ), // i18n( "USAGE: /me <text> - Formats message as in '<nickname> went to the store'." ) ); - registerCommand( this, TQString::tqfromLatin1("away"), TQT_SLOT( slotAwayCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("away"), TQT_SLOT( slotAwayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /away [<reason>] - Marks you as away/back for the current account only." ) ); - registerCommand( this, TQString::tqfromLatin1("awayall"), TQT_SLOT( slotAwayAllCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("awayall"), TQT_SLOT( slotAwayAllCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /awayall [<reason>] - Marks you as away/back for all accounts." ) ); - registerCommand( this, TQString::tqfromLatin1("say"), TQT_SLOT( slotSayCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("say"), TQT_SLOT( slotSayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /say <text> - Say text in this chat. This is the same as just typing a message, but is very " "useful for scripts." ), 1 ); - registerCommand( this, TQString::tqfromLatin1("exec"), TQT_SLOT( slotExecCommand( const TQString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("exec"), TQT_SLOT( slotExecCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /exec [-o] <command> - Executes the specified command and displays the output in the chat buffer. " "If -o is specified, the output is sent to all members of the chat."), 1 ); @@ -192,7 +192,7 @@ bool Kopete::CommandHandler::processMessage( const TQString &msg, Kopete::ChatSe { if( p->inCommand ) return false; - TQRegExp splitRx( TQString::tqfromLatin1("^/([\\S]+)(.*)") ); + TQRegExp splitRx( TQString::fromLatin1("^/([\\S]+)(.*)") ); TQString command; TQString args; if(splitRx.search(msg) != -1) @@ -275,18 +275,18 @@ void Kopete::CommandHandler::slotExecCommand( const TQString &args, Kopete::Chat if( !args.isEmpty() ) { KProcess *proc = 0L; - if ( kapp->authorize( TQString::tqfromLatin1( "shell_access" ) ) ) + if ( kapp->authorize( TQString::fromLatin1( "shell_access" ) ) ) proc = new KProcess(manager); if( proc ) { - *proc << TQString::tqfromLatin1("sh") << TQString::tqfromLatin1("-c"); + *proc << TQString::fromLatin1("sh") << TQString::fromLatin1("-c"); TQStringList argsList = parseArguments( args ); - if( argsList.front() == TQString::tqfromLatin1("-o") ) + if( argsList.front() == TQString::fromLatin1("-o") ) { p->processMap.insert( proc, ManagerPair(manager, Kopete::Message::Outbound) ); - *proc << args.section(TQRegExp(TQString::tqfromLatin1("\\s+")), 1); + *proc << args.section(TQRegExp(TQString::fromLatin1("\\s+")), 1); } else { @@ -371,7 +371,7 @@ void Kopete::CommandHandler::slotExecFinished(KProcess *proc) TQStringList Kopete::CommandHandler::parseArguments( const TQString &args ) { TQStringList arguments; - TQRegExp quotedArgs( TQString::tqfromLatin1("\"(.*)\"") ); + TQRegExp quotedArgs( TQString::fromLatin1("\"(.*)\"") ); quotedArgs.setMinimal( true ); if ( quotedArgs.search( args ) != -1 ) @@ -380,7 +380,7 @@ TQStringList Kopete::CommandHandler::parseArguments( const TQString &args ) arguments.append( quotedArgs.cap(i) ); } - TQStringList otherArgs = TQStringList::split( TQRegExp(TQString::tqfromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); + TQStringList otherArgs = TQStringList::split( TQRegExp(TQString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); for( TQStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it ) arguments.append( *it ); diff --git a/kopete/libkopete/kopetecontact.cpp b/kopete/libkopete/kopetecontact.cpp index 44eb7c4b..89109418 100644 --- a/kopete/libkopete/kopetecontact.cpp +++ b/kopete/libkopete/kopetecontact.cpp @@ -63,7 +63,7 @@ struct Contact::Private public: bool fileCapable; - OnlineStatus onlinetqStatus; + OnlineStatus onlineStatus; Account *account; MetaContact *metaContact; @@ -124,45 +124,45 @@ Contact::~Contact() -OnlineStatus Contact::onlinetqStatus() const +OnlineStatus Contact::onlineStatus() const { if ( this == account()->myself() || account()->isConnected() ) - return d->onlinetqStatus; + return d->onlineStatus; else - return protocol()->accountOfflinetqStatus(); + return protocol()->accountOfflineStatus(); } void Contact::setOnlineStatus( const OnlineStatus &status ) { - if( status == d->onlinetqStatus ) + if( status == d->onlineStatus ) return; - OnlineStatus oldtqStatus = d->onlinetqStatus; - d->onlinetqStatus = status; + OnlineStatus oldStatus = d->onlineStatus; + d->onlineStatus = status; Kopete::Global::Properties *globalProps = Kopete::Global::Properties::self(); // Contact changed from Offline to another status - if( oldtqStatus.status() == OnlineStatus::Offline && + if( oldStatus.status() == OnlineStatus::Offline && status.status() != OnlineStatus::Offline ) { - setProperty( globalProps->onlineSince(), TQDateTime::tqcurrentDateTime() ); + setProperty( globalProps->onlineSince(), TQDateTime::currentDateTime() ); /*kdDebug(14010) << k_funcinfo << "REMOVING lastSeen property for " << d->displayName << endl;*/ removeProperty( globalProps->lastSeen() ); } - else if( oldtqStatus.status() != OnlineStatus::Offline && - oldtqStatus.status() != OnlineStatus::Unknown && + else if( oldStatus.status() != OnlineStatus::Offline && + oldStatus.status() != OnlineStatus::Unknown && status.status() == OnlineStatus::Offline ) // Contact went back offline { removeProperty( globalProps->onlineSince() ); /*kdDebug(14010) << k_funcinfo << "SETTING lastSeen property for " << d->displayName << endl;*/ - setProperty( globalProps->lastSeen(), TQDateTime::tqcurrentDateTime() ); + setProperty( globalProps->lastSeen(), TQDateTime::currentDateTime() ); } if ( this == account()->myself() || account()->isConnected() ) - emit onlineStatusChanged( this, status, oldtqStatus ); + emit onlineStatusChanged( this, status, oldStatus ); } void Contact::slotAccountIsConnectedChanged() @@ -171,9 +171,9 @@ void Contact::slotAccountIsConnectedChanged() return; if ( account()->isConnected() ) - emit onlineStatusChanged( this, d->onlinetqStatus, protocol()->accountOfflinetqStatus() ); + emit onlineStatusChanged( this, d->onlineStatus, protocol()->accountOfflineStatus() ); else - emit onlineStatusChanged( this, protocol()->accountOfflinetqStatus(), d->onlinetqStatus ); + emit onlineStatusChanged( this, protocol()->accountOfflineStatus(), d->onlineStatus ); } @@ -202,14 +202,14 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) TQString titleText; TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nick.isEmpty() ) - titleText = TQString::tqfromLatin1( "%1 (%2)" ).tqarg( contactId(), onlinetqStatus().description() ); + titleText = TQString::fromLatin1( "%1 (%2)" ).tqarg( contactId(), onlineStatus().description() ); else - titleText = TQString::tqfromLatin1( "%1 <%2> (%3)" ).tqarg( nick, contactId(), onlinetqStatus().description() ); + titleText = TQString::fromLatin1( "%1 <%2> (%3)" ).tqarg( nick, contactId(), onlineStatus().description() ); menu->insertTitle( titleText ); if( metaContact() && metaContact()->isTemporary() && contactId() != account()->myself()->contactId() ) { - KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::tqfromLatin1( "add_user" ), + KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::fromLatin1( "add_user" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotAddContact() ), TQT_TQOBJECT(menu), "actionAddContact" ); actionAddContact->plug( menu ); menu->insertSeparator(); @@ -315,7 +315,7 @@ void Contact::setMetaContact( MetaContact *m ) result = KMessageBox::questionYesNoCancel( Kopete::UI::Global::mainWidget(), i18n( "You are moving the contact `%1' to the meta contact `%2'.\n" "`%3' will be empty afterwards. Do you want to delete this contact?" ) .tqarg(contactId(), m ? m->displayName() : TQString(), old->displayName()) - , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::tqfromLatin1("delete_old_contact_when_move") ); + , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::fromLatin1("delete_old_contact_when_move") ); if(result==KMessageBox::Cancel) return; } @@ -368,7 +368,7 @@ void Contact::serializeProperties(TQMap<TQString, TQString> &serializedData) continue; TQVariant val = it.data().value(); - TQString key = TQString::tqfromLatin1("prop_%1_%2").tqarg(TQString::tqfromLatin1(val.typeName()), it.key()); + TQString key = TQString::fromLatin1("prop_%1_%2").tqarg(TQString::fromLatin1(val.typeName()), it.key()); serializedData[key] = val.toString(); @@ -383,7 +383,7 @@ void Contact::deserializeProperties( { TQString key = it.key(); - if ( !key.startsWith( TQString::tqfromLatin1("prop_") ) ) // avoid parsing other serialized data + if ( !key.startsWith( TQString::fromLatin1("prop_") ) ) // avoid parsing other serialized data continue; TQStringList keyList = TQStringList::split( TQChar('_'), key, false ); @@ -419,20 +419,20 @@ bool Contact::isReachable() { // The default implementation returns false when offline and true // otherwise. Subclass if you need more control over the process. - return onlinetqStatus().status() != OnlineStatus::Offline; + return onlineStatus().status() != OnlineStatus::Offline; } void Contact::startChat() { - KopeteView *v=manager( CanCreate )->view(true, TQString::tqfromLatin1("kopete_chatwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_chatwindow") ); if(v) v->raise(true); } void Contact::sendMessage() { - KopeteView *v=manager( CanCreate )->view(true, TQString::tqfromLatin1("kopete_emailwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_emailwindow") ); if(v) v->raise(true); } @@ -458,8 +458,8 @@ void Contact::slotDelete() { if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "Are you sure you want to remove the contact '%1' from your contact list?" ). - arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::tqfromLatin1("delete_user") ), - TQString::tqfromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) + arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::fromLatin1("delete_user") ), + TQString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue ) { deleteContact(); @@ -524,7 +524,7 @@ TQPtrList<KAction> *Contact::customContextMenuActions( ChatSession * /* manager bool Contact::isOnline() const { - return onlinetqStatus().isDefinitelyOnline(); + return onlineStatus().isDefinitelyOnline(); } @@ -645,7 +645,7 @@ TQString Contact::toolTip() const // -------------------------------------------------------------------------- // Fixed part of tooltip - TQString iconName = TQString::tqfromLatin1("kopete-contact-icon:%1:%2:%3") + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") .tqarg( KURL::encode_string( protocol()->pluginId() ), KURL::encode_string( account()->accountId() ), KURL::encode_string( contactId() ) ); @@ -656,14 +656,14 @@ TQString Contact::toolTip() const { tip = i18n( "<b>DISPLAY NAME</b><br><img src=\"%2\"> CONTACT STATUS", "<b><nobr>%3</nobr></b><br><img src=\"%2\"> %1" ). - arg( Kopete::Message::escape( onlinetqStatus().description() ), iconName, + arg( Kopete::Message::escape( onlineStatus().description() ), iconName, Kopete::Message::escape( d->contactId ) ); } else { tip = i18n( "<b>DISPLAY NAME</b> (CONTACT ID)<br><img src=\"%2\"> CONTACT STATUS", "<nobr><b>%4</b> (%3)</nobr><br><img src=\"%2\"> %1" ). - arg( Kopete::Message::escape( onlinetqStatus().description() ), iconName, + arg( Kopete::Message::escape( onlineStatus().description() ), iconName, Kopete::Message::escape( contactId() ), Kopete::Emoticons::parseEmoticons( Kopete::Message::escape( nick ) ) ); } @@ -673,7 +673,7 @@ TQString Contact::toolTip() const for(TQStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) { - if((*it) == TQString::tqfromLatin1("FormattedName")) + if((*it) == TQString::fromLatin1("FormattedName")) { TQString name = formattedName(); if(!name.isEmpty()) @@ -682,7 +682,7 @@ TQString Contact::toolTip() const "<br><b>Full Name:</b> <nobr>%1</nobr>").tqarg(TQStyleSheet::escape(name)); } } - else if ((*it) == TQString::tqfromLatin1("FormattedIdleTime")) + else if ((*it) == TQString::fromLatin1("FormattedIdleTime")) { TQString time = formattedIdleTime(); if(!time.isEmpty()) @@ -691,7 +691,7 @@ TQString Contact::toolTip() const "<br><b>Idle:</b> <nobr>%1</nobr>").tqarg(time); } } - else if ((*it) == TQString::tqfromLatin1("homePage")) + else if ((*it) == TQString::fromLatin1("homePage")) { TQString url = property(*it).value().toString(); if(!url.isEmpty()) @@ -701,7 +701,7 @@ TQString Contact::toolTip() const arg( KURL::encode_string( url ), Kopete::Message::escape( TQStyleSheet::escape(url) ) ); } } - else if ((*it) == TQString::tqfromLatin1("awayMessage")) + else if ((*it) == TQString::fromLatin1("awayMessage")) { TQString awaymsg = property(*it).value().toString(); if(!awaymsg.isEmpty()) @@ -755,14 +755,14 @@ TQString Contact::toolTip() const TQString Kopete::Contact::formattedName() const { - if( hasProperty(TQString::tqfromLatin1("FormattedName")) ) - return property(TQString::tqfromLatin1("FormattedName")).value().toString(); + if( hasProperty(TQString::fromLatin1("FormattedName")) ) + return property(TQString::fromLatin1("FormattedName")).value().toString(); TQString ret; Kopete::ContactProperty first, last; - first = property(TQString::tqfromLatin1("firstName")); - last = property(TQString::tqfromLatin1("lastName")); + first = property(TQString::fromLatin1("firstName")); + last = property(TQString::fromLatin1("lastName")); if(!first.isNull()) { if(!last.isNull()) // contact has both first and last name diff --git a/kopete/libkopete/kopetecontact.h b/kopete/libkopete/kopetecontact.h index e24e23f0..05160664 100644 --- a/kopete/libkopete/kopetecontact.h +++ b/kopete/libkopete/kopetecontact.h @@ -204,7 +204,7 @@ public: * @brief Get the online status of the contact * @return the online status of the contact */ - OnlineStatus onlinetqStatus() const; + OnlineStatus onlineStatus() const; /** * \brief Set the contact's online status @@ -510,7 +510,7 @@ signals: * The contact's online status changed */ void onlineStatusChanged( Kopete::Contact *contact, - const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus ); + const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus ); /** * The contact is about to be destroyed. diff --git a/kopete/libkopete/kopetecontactlist.cpp b/kopete/libkopete/kopetecontactlist.cpp index 1a16b04d..95c625c3 100644 --- a/kopete/libkopete/kopetecontactlist.cpp +++ b/kopete/libkopete/kopetecontactlist.cpp @@ -378,14 +378,14 @@ void ContactList::loadXML() // don't save when we're in the middle of this... d->loaded = false; - TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( filename.isEmpty() ) { d->loaded=true; return ; } - TQDomDocument contactList( TQString::tqfromLatin1( "kopete-contact-list" ) ); + TQDomDocument contactList( TQString::fromLatin1( "kopete-contact-list" ) ); TQFile contactListFile( filename ); contactListFile.open( IO_ReadOnly ); @@ -393,10 +393,10 @@ void ContactList::loadXML() TQDomElement list = contactList.documentElement(); - TQString versionString = list.attribute( TQString::tqfromLatin1( "version" ), TQString() ); + TQString versionString = list.attribute( TQString::fromLatin1( "version" ), TQString() ); uint version = 0; - if( TQRegExp( TQString::tqfromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) - version = versionString.replace( TQString::tqfromLatin1( "." ), TQString() ).toUInt(); + if( TQRegExp( TQString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) + version = versionString.replace( TQString::fromLatin1( "." ), TQString() ).toUInt(); if( version < Private::ContactListVersion ) { @@ -410,7 +410,7 @@ void ContactList::loadXML() convertContactList( filename, version, Private::ContactListVersion ); - contactList = TQDomDocument ( TQString::tqfromLatin1( "kopete-contact-list" ) ); + contactList = TQDomDocument ( TQString::fromLatin1( "kopete-contact-list" ) ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); @@ -423,7 +423,7 @@ void ContactList::loadXML() TQDomElement element = list.firstChild().toElement(); while( !element.isNull() ) { - if( element.tagName() == TQString::tqfromLatin1("meta-contact") ) + if( element.tagName() == TQString::fromLatin1("meta-contact") ) { //TODO: id isn't used //TQString id = element.attribute( "id", TQString() ); @@ -439,7 +439,7 @@ void ContactList::loadXML() metaContact ); } } - else if( element.tagName() == TQString::tqfromLatin1("kopete-group") ) + else if( element.tagName() == TQString::fromLatin1("kopete-group") ) { Kopete::Group *group = new Kopete::Group(); if( !group->fromXML( element ) ) @@ -453,7 +453,7 @@ void ContactList::loadXML() } } // Only load myself metacontact information when Global Identity is enabled. - else if( element.tagName() == TQString::tqfromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) + else if( element.tagName() == TQString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) { if( !myself()->fromXML( element ) ) { @@ -479,19 +479,19 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers // changes to allow incremental (multi-pass) conversion so we don't have // to rewrite the whole conversion code for each change. - TQDomDocument contactList( TQString::tqfromLatin1( "messaging-contact-list" ) ); + TQDomDocument contactList( TQString::fromLatin1( "messaging-contact-list" ) ); TQFile contactListFile( fileName ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); TQDomElement oldList = contactList.documentElement(); - TQDomDocument newList( TQString::tqfromLatin1( "kopete-contact-list" ) ); - newList.appendChild( newList.createProcessingInstruction( TQString::tqfromLatin1( "xml" ), TQString::tqfromLatin1( "version=\"1.0\"" ) ) ); + TQDomDocument newList( TQString::fromLatin1( "kopete-contact-list" ) ); + newList.appendChild( newList.createProcessingInstruction( TQString::fromLatin1( "xml" ), TQString::fromLatin1( "version=\"1.0\"" ) ) ); - TQDomElement newRoot = newList.createElement( TQString::tqfromLatin1( "kopete-contact-list" ) ); + TQDomElement newRoot = newList.createElement( TQString::fromLatin1( "kopete-contact-list" ) ); newList.appendChild( newRoot ); - newRoot.setAttribute( TQString::tqfromLatin1( "version" ), TQString::tqfromLatin1( "1.0" ) ); + newRoot.setAttribute( TQString::fromLatin1( "version" ), TQString::fromLatin1( "1.0" ) ); TQDomNode oldNode = oldList.firstChild(); while( !oldNode.isNull() ) @@ -499,10 +499,10 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers TQDomElement oldElement = oldNode.toElement(); if( !oldElement.isNull() ) { - if( oldElement.tagName() == TQString::tqfromLatin1("meta-contact") ) + if( oldElement.tagName() == TQString::fromLatin1("meta-contact") ) { // Ignore ID, it is not used in the current list anyway - TQDomElement newMetaContact = newList.createElement( TQString::tqfromLatin1( "meta-contact" ) ); + TQDomElement newMetaContact = newList.createElement( TQString::fromLatin1( "meta-contact" ) ); newRoot.appendChild( newMetaContact ); // Plugin data is stored completely different, and requires @@ -518,48 +518,48 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers while( !oldContactNode.isNull() ) { TQDomElement oldContactElement = oldContactNode.toElement(); - if( !oldContactElement.isNull() && oldContactElement.tagName() == TQString::tqfromLatin1("address-book-field") ) + if( !oldContactElement.isNull() && oldContactElement.tagName() == TQString::fromLatin1("address-book-field") ) { // Convert address book fields. // Jabber will be called "xmpp", Aim/Toc and Aim/Oscar both will // be called "aim". MSN, AIM, IRC, Oscar and SMS don't use address // book fields yet; Gadu and ICQ can be converted as-is. // As Yahoo is unfinished we won't try to convert at all. - TQString id = oldContactElement.attribute( TQString::tqfromLatin1( "id" ), TQString() ); + TQString id = oldContactElement.attribute( TQString::fromLatin1( "id" ), TQString() ); TQString data = oldContactElement.text(); TQString app, key, val; - TQString separator = TQString::tqfromLatin1( "," ); - if( id == TQString::tqfromLatin1( "messaging/gadu" ) ) - separator = TQString::tqfromLatin1( "\n" ); - else if( id == TQString::tqfromLatin1( "messaging/icq" ) ) - separator = TQString::tqfromLatin1( ";" ); - else if( id == TQString::tqfromLatin1( "messaging/jabber" ) ) - id = TQString::tqfromLatin1( "messaging/xmpp" ); - - if( id == TQString::tqfromLatin1( "messaging/gadu" ) || id == TQString::tqfromLatin1( "messaging/icq" ) || - id == TQString::tqfromLatin1( "messaging/winpopup" ) || id == TQString::tqfromLatin1( "messaging/xmpp" ) ) + TQString separator = TQString::fromLatin1( "," ); + if( id == TQString::fromLatin1( "messaging/gadu" ) ) + separator = TQString::fromLatin1( "\n" ); + else if( id == TQString::fromLatin1( "messaging/icq" ) ) + separator = TQString::fromLatin1( ";" ); + else if( id == TQString::fromLatin1( "messaging/jabber" ) ) + id = TQString::fromLatin1( "messaging/xmpp" ); + + if( id == TQString::fromLatin1( "messaging/gadu" ) || id == TQString::fromLatin1( "messaging/icq" ) || + id == TQString::fromLatin1( "messaging/winpopup" ) || id == TQString::fromLatin1( "messaging/xmpp" ) ) { app = id; - key = TQString::tqfromLatin1( "All" ); + key = TQString::fromLatin1( "All" ); val = data.replace( separator, TQChar( 0xE000 ) ); } if( !app.isEmpty() ) { - TQDomElement addressBookField = newList.createElement( TQString::tqfromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( TQString::tqfromLatin1( "app" ), app ); - addressBookField.setAttribute( TQString::tqfromLatin1( "key" ), key ); + addressBookField.setAttribute( TQString::fromLatin1( "app" ), app ); + addressBookField.setAttribute( TQString::fromLatin1( "key" ), key ); addressBookField.appendChild( newList.createTextNode( val ) ); // ICQ didn't store the contactId locally, only in the address // book fields, so we need to be able to access it later - if( id == TQString::tqfromLatin1( "messaging/icq" ) ) + if( id == TQString::fromLatin1( "messaging/icq" ) ) icqData = TQStringList::split( TQChar( 0xE000 ), val ); - else if( id == TQString::tqfromLatin1("messaging/gadu") ) + else if( id == TQString::fromLatin1("messaging/gadu") ) gaduData = TQStringList::split( TQChar( 0xE000 ), val ); } } @@ -573,103 +573,103 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers TQDomElement oldContactElement = oldContactNode.toElement(); if( !oldContactElement.isNull() ) { - if( oldContactElement.tagName() == TQString::tqfromLatin1("display-name") ) + if( oldContactElement.tagName() == TQString::fromLatin1("display-name") ) { - TQDomElement displayName = newList.createElement( TQString::tqfromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldContactElement.text() ) ); newMetaContact.appendChild( displayName ); } - else if( oldContactElement.tagName() == TQString::tqfromLatin1("groups") ) + else if( oldContactElement.tagName() == TQString::fromLatin1("groups") ) { - TQDomElement groups = newList.createElement( TQString::tqfromLatin1( "groups" ) ); + TQDomElement groups = newList.createElement( TQString::fromLatin1( "groups" ) ); newMetaContact.appendChild( groups ); TQDomNode oldGroup = oldContactElement.firstChild(); while( !oldGroup.isNull() ) { TQDomElement oldGroupElement = oldGroup.toElement(); - if ( oldGroupElement.tagName() == TQString::tqfromLatin1("group") ) + if ( oldGroupElement.tagName() == TQString::fromLatin1("group") ) { - TQDomElement group = newList.createElement( TQString::tqfromLatin1( "group" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "group" ) ); group.appendChild( newList.createTextNode( oldGroupElement.text() ) ); groups.appendChild( group ); } - else if ( oldGroupElement.tagName() == TQString::tqfromLatin1("top-level") ) + else if ( oldGroupElement.tagName() == TQString::fromLatin1("top-level") ) { - TQDomElement group = newList.createElement( TQString::tqfromLatin1( "top-level" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "top-level" ) ); groups.appendChild( group ); } oldGroup = oldGroup.nextSibling(); } } - else if( oldContactElement.tagName() == TQString::tqfromLatin1( "plugin-data" ) ) + else if( oldContactElement.tagName() == TQString::fromLatin1( "plugin-data" ) ) { // Convert the plugin data - TQString id = oldContactElement.attribute( TQString::tqfromLatin1( "plugin-id" ), TQString() ); + TQString id = oldContactElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString() ); TQString data = oldContactElement.text(); bool convertOldAim = false; uint fieldCount = 1; TQString addressBookLabel; - if( id == TQString::tqfromLatin1("MSNProtocol") ) + if( id == TQString::fromLatin1("MSNProtocol") ) { fieldCount = 3; - addressBookLabel = TQString::tqfromLatin1("msn"); + addressBookLabel = TQString::fromLatin1("msn"); } - else if( id == TQString::tqfromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { fieldCount = 3; - addressBookLabel = TQString::tqfromLatin1("irc"); + addressBookLabel = TQString::fromLatin1("irc"); } - else if( id == TQString::tqfromLatin1("OscarProtocol") ) + else if( id == TQString::fromLatin1("OscarProtocol") ) { fieldCount = 2; - addressBookLabel = TQString::tqfromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == TQString::tqfromLatin1("AIMProtocol") ) + else if( id == TQString::fromLatin1("AIMProtocol") ) { - id = TQString::tqfromLatin1("OscarProtocol"); + id = TQString::fromLatin1("OscarProtocol"); convertOldAim = true; - addressBookLabel = TQString::tqfromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == TQString::tqfromLatin1("ICTQProtocol") || id == TQString::tqfromLatin1("WPProtocol") || id == TQString::tqfromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("ICTQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) { fieldCount = 1; } - else if( id == TQString::tqfromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { fieldCount = 4; } - else if( id == TQString::tqfromLatin1("SMSProtocol") ) + else if( id == TQString::fromLatin1("SMSProtocol") ) { // SMS used a variable serializing using a dot as delimiter. // The minimal count is three though (id, name, delimiter). fieldCount = 2; - addressBookLabel = TQString::tqfromLatin1("sms"); + addressBookLabel = TQString::fromLatin1("sms"); } if( pluginData[ id ].isNull() ) { - pluginData[ id ] = newList.createElement( TQString::tqfromLatin1( "plugin-data" ) ); - pluginData[ id ].setAttribute( TQString::tqfromLatin1( "plugin-id" ), id ); + pluginData[ id ] = newList.createElement( TQString::fromLatin1( "plugin-data" ) ); + pluginData[ id ].setAttribute( TQString::fromLatin1( "plugin-id" ), id ); newMetaContact.appendChild( pluginData[ id ] ); } // Do the actual conversion - if( id == TQString::tqfromLatin1( "MSNProtocol" ) || id == TQString::tqfromLatin1( "OscarProtocol" ) || - id == TQString::tqfromLatin1( "AIMProtocol" ) || id == TQString::tqfromLatin1( "IRCProtocol" ) || - id == TQString::tqfromLatin1( "ICTQProtocol" ) || id == TQString::tqfromLatin1( "JabberProtocol" ) || - id == TQString::tqfromLatin1( "SMSProtocol" ) || id == TQString::tqfromLatin1( "WPProtocol" ) || - id == TQString::tqfromLatin1( "GaduProtocol" ) ) + if( id == TQString::fromLatin1( "MSNProtocol" ) || id == TQString::fromLatin1( "OscarProtocol" ) || + id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) || + id == TQString::fromLatin1( "ICTQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) || + id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) || + id == TQString::fromLatin1( "GaduProtocol" ) ) { - TQStringList strList = TQStringList::split( TQString::tqfromLatin1( "||" ), data ); + TQStringList strList = TQStringList::split( TQString::fromLatin1( "||" ), data ); // Unescape '||' for( TQStringList::iterator it = strList.begin(); it != strList.end(); ++it ) { - ( *it ).replace( TQString::tqfromLatin1( "\\|;" ), TQString::tqfromLatin1( "|" ) ). - replace( TQString::tqfromLatin1( "\\\\" ), TQString::tqfromLatin1( "\\" ) ); + ( *it ).replace( TQString::fromLatin1( "\\|;" ), TQString::fromLatin1( "|" ) ). + replace( TQString::fromLatin1( "\\\\" ), TQString::fromLatin1( "\\" ) ); } uint idx = 0; @@ -677,65 +677,65 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers { TQDomElement dataField; - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "contactId" ) ); - if( id == TQString::tqfromLatin1("ICTQProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) ); + if( id == TQString::fromLatin1("ICTQProtocol") ) dataField.appendChild( newList.createTextNode( icqData[ idx ] ) ); - else if( id == TQString::tqfromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) ); - else if( id == TQString::tqfromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "displayName" ) ); - if( convertOldAim || id == TQString::tqfromLatin1("ICTQProtocol") || id == TQString::tqfromLatin1("WPProtocol") || id == TQString::tqfromLatin1("GaduProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) ); + if( convertOldAim || id == TQString::fromLatin1("ICTQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - else if( id == TQString::tqfromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); - if( id == TQString::tqfromLatin1("MSNProtocol") ) + if( id == TQString::fromLatin1("MSNProtocol") ) { - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == TQString::tqfromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "serverName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serverName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == TQString::tqfromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "accountId" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "accountId" ) ); dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) ); } - else if( id == TQString::tqfromLatin1( "SMSProtocol" ) && - ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::tqfromLatin1( "." ) ) + else if( id == TQString::fromLatin1( "SMSProtocol" ) && + ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::fromLatin1( "." ) ) { - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "serviceName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serviceName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); - dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "servicePrefs" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "servicePrefs" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) ); // Add extra fields @@ -744,30 +744,30 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers // MSN, AIM, IRC, Oscar and SMS didn't store address book fields up // to now, so create one - if( id != TQString::tqfromLatin1("ICTQProtocol") && id != TQString::tqfromLatin1("JabberProtocol") && id != TQString::tqfromLatin1("WPProtocol") && id != TQString::tqfromLatin1("GaduProtocol") ) + if( id != TQString::fromLatin1("ICTQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") ) { - TQDomElement addressBookField = newList.createElement( TQString::tqfromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( TQString::tqfromLatin1( "app" ), - TQString::tqfromLatin1( "messaging/" ) + addressBookLabel ); - addressBookField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "All" ) ); + addressBookField.setAttribute( TQString::fromLatin1( "app" ), + TQString::fromLatin1( "messaging/" ) + addressBookLabel ); + addressBookField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "All" ) ); addressBookField.appendChild( newList.createTextNode( strList[ idx ] ) ); } idx += fieldCount; } } - else if( id == TQString::tqfromLatin1("ContactNotesPlugin") || id == TQString::tqfromLatin1("CryptographyPlugin") || id == TQString::tqfromLatin1("TranslatorPlugin") ) + else if( id == TQString::fromLatin1("ContactNotesPlugin") || id == TQString::fromLatin1("CryptographyPlugin") || id == TQString::fromLatin1("TranslatorPlugin") ) { - TQDomElement dataField = newList.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); + TQDomElement dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - if( id == TQString::tqfromLatin1("ContactNotesPlugin") ) - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "notes" ) ); - else if( id == TQString::tqfromLatin1("CryptographyPlugin") ) - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "gpgKey" ) ); - else if( id == TQString::tqfromLatin1("TranslatorPlugin") ) - dataField.setAttribute( TQString::tqfromLatin1( "key" ), TQString::tqfromLatin1( "languageKey" ) ); + if( id == TQString::fromLatin1("ContactNotesPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "notes" ) ); + else if( id == TQString::fromLatin1("CryptographyPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "gpgKey" ) ); + else if( id == TQString::fromLatin1("TranslatorPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "languageKey" ) ); dataField.appendChild( newList.createTextNode( data ) ); } @@ -776,9 +776,9 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers oldContactNode = oldContactNode.nextSibling(); } } - else if( oldElement.tagName() == TQString::tqfromLatin1("kopete-group") ) + else if( oldElement.tagName() == TQString::fromLatin1("kopete-group") ) { - TQDomElement newGroup = newList.createElement( TQString::tqfromLatin1( "kopete-group" ) ); + TQDomElement newGroup = newList.createElement( TQString::fromLatin1( "kopete-group" ) ); newRoot.appendChild( newGroup ); TQDomNode oldGroupNode = oldNode.firstChild(); @@ -786,38 +786,38 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers { TQDomElement oldGroupElement = oldGroupNode.toElement(); - if( oldGroupElement.tagName() == TQString::tqfromLatin1("display-name") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("display-name") ) { - TQDomElement displayName = newList.createElement( TQString::tqfromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldGroupElement.text() ) ); newGroup.appendChild( displayName ); } - if( oldGroupElement.tagName() == TQString::tqfromLatin1("type") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("type") ) { - if( oldGroupElement.text() == TQString::tqfromLatin1("Temporary") ) - newGroup.setAttribute( TQString::tqfromLatin1( "type" ), TQString::tqfromLatin1( "temporary" ) ); - else if( oldGroupElement.text() == TQString::tqfromLatin1( "TopLevel" ) ) - newGroup.setAttribute( TQString::tqfromLatin1( "type" ), TQString::tqfromLatin1( "top-level" ) ); + if( oldGroupElement.text() == TQString::fromLatin1("Temporary") ) + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "temporary" ) ); + else if( oldGroupElement.text() == TQString::fromLatin1( "TopLevel" ) ) + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "top-level" ) ); else - newGroup.setAttribute( TQString::tqfromLatin1( "type" ), TQString::tqfromLatin1( "standard" ) ); + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); } - if( oldGroupElement.tagName() == TQString::tqfromLatin1("view") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("view") ) { - if( oldGroupElement.text() == TQString::tqfromLatin1("collapsed") ) - newGroup.setAttribute( TQString::tqfromLatin1( "view" ), TQString::tqfromLatin1( "collapsed" ) ); + if( oldGroupElement.text() == TQString::fromLatin1("collapsed") ) + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "collapsed" ) ); else - newGroup.setAttribute( TQString::tqfromLatin1( "view" ), TQString::tqfromLatin1( "expanded" ) ); + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); } - else if( oldGroupElement.tagName() == TQString::tqfromLatin1("plugin-data") ) + else if( oldGroupElement.tagName() == TQString::fromLatin1("plugin-data") ) { // Per-group plugin data // FIXME: This needs updating too, ideally, convert this in a later // contactlist.xml version - TQDomElement groupPluginData = newList.createElement( TQString::tqfromLatin1( "plugin-data" ) ); + TQDomElement groupPluginData = newList.createElement( TQString::fromLatin1( "plugin-data" ) ); newGroup.appendChild( groupPluginData ); - groupPluginData.setAttribute( TQString::tqfromLatin1( "plugin-id" ), - oldGroupElement.attribute( TQString::tqfromLatin1( "plugin-id" ), TQString() ) ); + groupPluginData.setAttribute( TQString::fromLatin1( "plugin-id" ), + oldGroupElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString() ) ); groupPluginData.appendChild( newList.createTextNode( oldGroupElement.text() ) ); } @@ -836,7 +836,7 @@ void ContactList::convertContactList( const TQString &fileName, uint /* fromVers // Close the file, and save the new file contactListFile.close(); - TQDir().rename( fileName, fileName + TQString::tqfromLatin1( ".bak" ) ); + TQDir().rename( fileName, fileName + TQString::fromLatin1( ".bak" ) ); // kdDebug( 14010 ) << k_funcinfo << "XML output:\n" << newList.toString( 2 ) << endl; @@ -862,7 +862,7 @@ void Kopete::ContactList::saveXML() return; } - TQString contactListFileName = locateLocal( "appdata", TQString::tqfromLatin1( "contactlist.xml" ) ); + TQString contactListFileName = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); KSaveFile contactListFile( contactListFileName ); if( contactListFile.status() == 0 ) { @@ -894,8 +894,8 @@ void Kopete::ContactList::saveXML() const TQDomDocument ContactList::toXML() { TQDomDocument doc; - doc.appendChild( doc.createElement( TQString::tqfromLatin1("kopete-contact-list") ) ); - doc.documentElement().setAttribute( TQString::tqfromLatin1("version"), TQString::tqfromLatin1("1.0")); + doc.appendChild( doc.createElement( TQString::fromLatin1("kopete-contact-list") ) ); + doc.documentElement().setAttribute( TQString::fromLatin1("version"), TQString::fromLatin1("1.0")); // Save group information. ie: Open/Closed, pehaps later icons? Who knows. for( Kopete::Group *g = d->groups.first(); g; g = d->groups.next() ) @@ -910,7 +910,7 @@ const TQDomDocument ContactList::toXML() if( Kopete::Config::enableGlobalIdentity() ) { TQDomElement myselfElement = myself()->toXML(true); // Save minimal information. - myselfElement.setTagName( TQString::tqfromLatin1("myself-meta-contact") ); + myselfElement.setTagName( TQString::fromLatin1("myself-meta-contact") ); doc.documentElement().appendChild( doc.importNode( myselfElement, true ) ); } @@ -934,7 +934,7 @@ TQStringList ContactList::contactStatuses() const TQPtrListIterator<Kopete::MetaContact> it( d->contacts ); for( ; it.current(); ++it ) { - meta_contacts.append( TQString::tqfromLatin1( "%1 (%2)" ). + meta_contacts.append( TQString::fromLatin1( "%1 (%2)" ). arg( it.current()->displayName(), it.current()->statusString() )); } return meta_contacts; diff --git a/kopete/libkopete/kopetecontactlistelement.cpp b/kopete/libkopete/kopetecontactlistelement.cpp index a9e812cd..89e9ea29 100644 --- a/kopete/libkopete/kopetecontactlistelement.cpp +++ b/kopete/libkopete/kopetecontactlistelement.cpp @@ -90,21 +90,21 @@ const TQValueList<TQDomElement> ContactListElement::toXML() { TQDomDocument pluginData; TQValueList<TQDomElement> pluginNodes; - pluginData.appendChild( pluginData.createElement( TQString::tqfromLatin1( "plugin-data" ) ) ); + pluginData.appendChild( pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ) ); if ( !d->pluginData.isEmpty() ) { TQMap<TQString, TQMap<TQString, TQString> >::ConstIterator pluginIt; for ( pluginIt = d->pluginData.begin(); pluginIt != d->pluginData.end(); ++pluginIt ) { - TQDomElement pluginElement = pluginData.createElement( TQString::tqfromLatin1( "plugin-data" ) ); - pluginElement.setAttribute( TQString::tqfromLatin1( "plugin-id" ), pluginIt.key() ); + TQDomElement pluginElement = pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ); + pluginElement.setAttribute( TQString::fromLatin1( "plugin-id" ), pluginIt.key() ); TQMap<TQString, TQString>::ConstIterator it; for ( it = pluginIt.data().begin(); it != pluginIt.data().end(); ++it ) { - TQDomElement pluginDataField = pluginData.createElement( TQString::tqfromLatin1( "plugin-data-field" ) ); - pluginDataField.setAttribute( TQString::tqfromLatin1( "key" ), it.key() ); + TQDomElement pluginDataField = pluginData.createElement( TQString::fromLatin1( "plugin-data-field" ) ); + pluginDataField.setAttribute( TQString::fromLatin1( "key" ), it.key() ); pluginDataField.appendChild( pluginData.createTextNode( it.data() ) ); pluginElement.appendChild( pluginDataField ); } @@ -115,39 +115,39 @@ const TQValueList<TQDomElement> ContactListElement::toXML() } if ( !d->icons.isEmpty() ) { - TQDomElement iconsElement = pluginData.createElement( TQString::tqfromLatin1( "custom-icons" ) ); - iconsElement.setAttribute( TQString::tqfromLatin1( "use" ), d->useCustomIcon ? TQString::tqfromLatin1( "1" ) : TQString::tqfromLatin1( "0" ) ); + TQDomElement iconsElement = pluginData.createElement( TQString::fromLatin1( "custom-icons" ) ); + iconsElement.setAttribute( TQString::fromLatin1( "use" ), d->useCustomIcon ? TQString::fromLatin1( "1" ) : TQString::fromLatin1( "0" ) ); for ( TQMap<IconState, TQString >::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it ) { - TQDomElement iconElement = pluginData.createElement( TQString::tqfromLatin1( "icon" ) ); + TQDomElement iconElement = pluginData.createElement( TQString::fromLatin1( "icon" ) ); TQString stateStr; switch ( it.key() ) { case Open: - stateStr = TQString::tqfromLatin1( "open" ); + stateStr = TQString::fromLatin1( "open" ); break; case Closed: - stateStr = TQString::tqfromLatin1( "closed" ); + stateStr = TQString::fromLatin1( "closed" ); break; case Online: - stateStr = TQString::tqfromLatin1( "online" ); + stateStr = TQString::fromLatin1( "online" ); break; case Away: - stateStr = TQString::tqfromLatin1( "away" ); + stateStr = TQString::fromLatin1( "away" ); break; case Offline: - stateStr = TQString::tqfromLatin1( "offline" ); + stateStr = TQString::fromLatin1( "offline" ); break; case Unknown: - stateStr = TQString::tqfromLatin1( "unknown" ); + stateStr = TQString::fromLatin1( "unknown" ); break; case None: default: - stateStr = TQString::tqfromLatin1( "none" ); + stateStr = TQString::fromLatin1( "none" ); break; } - iconElement.setAttribute( TQString::tqfromLatin1( "state" ), stateStr ); + iconElement.setAttribute( TQString::fromLatin1( "state" ), stateStr ); iconElement.appendChild( pluginData.createTextNode( it.data() ) ); iconsElement.appendChild( iconElement ); } @@ -159,52 +159,52 @@ const TQValueList<TQDomElement> ContactListElement::toXML() bool ContactListElement::fromXML( const TQDomElement& element ) { - if ( element.tagName() == TQString::tqfromLatin1( "plugin-data" ) ) + if ( element.tagName() == TQString::fromLatin1( "plugin-data" ) ) { TQMap<TQString, TQString> pluginData; - TQString pluginId = element.attribute( TQString::tqfromLatin1( "plugin-id" ), TQString() ); + TQString pluginId = element.attribute( TQString::fromLatin1( "plugin-id" ), TQString() ); //in kopete 0.6 the AIM protocol was called OSCAR - if ( pluginId == TQString::tqfromLatin1( "OscarProtocol" ) ) - pluginId = TQString::tqfromLatin1( "AIMProtocol" ); + if ( pluginId == TQString::fromLatin1( "OscarProtocol" ) ) + pluginId = TQString::fromLatin1( "AIMProtocol" ); TQDomNode field = element.firstChild(); while( !field.isNull() ) { TQDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == TQString::tqfromLatin1( "plugin-data-field" ) ) + if ( fieldElement.tagName() == TQString::fromLatin1( "plugin-data-field" ) ) { - pluginData.insert( fieldElement.attribute( TQString::tqfromLatin1( "key" ), - TQString::tqfromLatin1( "undefined-key" ) ), fieldElement.text() ); + pluginData.insert( fieldElement.attribute( TQString::fromLatin1( "key" ), + TQString::fromLatin1( "undefined-key" ) ), fieldElement.text() ); } field = field.nextSibling(); } d->pluginData.insert( pluginId, pluginData ); } - else if ( element.tagName() == TQString::tqfromLatin1( "custom-icons" ) ) + else if ( element.tagName() == TQString::fromLatin1( "custom-icons" ) ) { - d->useCustomIcon= element.attribute( TQString::tqfromLatin1( "use" ), TQString::tqfromLatin1( "1" ) ) == TQString::tqfromLatin1( "1" ); + d->useCustomIcon= element.attribute( TQString::fromLatin1( "use" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ); TQDomNode ic = element.firstChild(); while( !ic.isNull() ) { TQDomElement iconElement = ic.toElement(); - if ( iconElement.tagName() == TQString::tqfromLatin1( "icon" ) ) + if ( iconElement.tagName() == TQString::fromLatin1( "icon" ) ) { - TQString stateStr = iconElement.attribute( TQString::tqfromLatin1( "state" ), TQString() ); + TQString stateStr = iconElement.attribute( TQString::fromLatin1( "state" ), TQString() ); TQString icon = iconElement.text(); IconState state = None; - if ( stateStr == TQString::tqfromLatin1( "open" ) ) + if ( stateStr == TQString::fromLatin1( "open" ) ) state = Open; - if ( stateStr == TQString::tqfromLatin1( "closed" ) ) + if ( stateStr == TQString::fromLatin1( "closed" ) ) state = Closed; - if ( stateStr == TQString::tqfromLatin1( "online" ) ) + if ( stateStr == TQString::fromLatin1( "online" ) ) state = Online; - if ( stateStr == TQString::tqfromLatin1( "offline" ) ) + if ( stateStr == TQString::fromLatin1( "offline" ) ) state = Offline; - if ( stateStr == TQString::tqfromLatin1( "away" ) ) + if ( stateStr == TQString::fromLatin1( "away" ) ) state = Away; - if ( stateStr == TQString::tqfromLatin1( "unknown" ) ) + if ( stateStr == TQString::fromLatin1( "unknown" ) ) state = Unknown; d->icons[ state ] = icon; diff --git a/kopete/libkopete/kopeteeventpresentation.cpp b/kopete/libkopete/kopeteeventpresentation.cpp index 9314df14..f1017181 100644 --- a/kopete/libkopete/kopeteeventpresentation.cpp +++ b/kopete/libkopete/kopeteeventpresentation.cpp @@ -76,15 +76,15 @@ TQString Kopete::EventPresentation::toString() switch ( m_type ) { case Sound: - type= TQString::tqfromLatin1("sound"); + type= TQString::fromLatin1("sound"); break; case Message: - type= TQString::tqfromLatin1("message"); + type= TQString::fromLatin1("message"); break; case Chat: - type= TQString::tqfromLatin1("chat"); + type= TQString::fromLatin1("chat"); break; } - TQString stringRep = TQString::tqfromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).tqarg(type).tqarg(m_content).tqarg(m_enabled).tqarg(m_singleShot); + TQString stringRep = TQString::fromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).tqarg(type).tqarg(m_content).tqarg(m_enabled).tqarg(m_singleShot); return stringRep; } diff --git a/kopete/libkopete/kopeteglobal.cpp b/kopete/libkopete/kopeteglobal.cpp index e7643142..c8c21c25 100644 --- a/kopete/libkopete/kopeteglobal.cpp +++ b/kopete/libkopete/kopeteglobal.cpp @@ -108,85 +108,85 @@ bool Properties::isRegistered(const TQString &key) const ContactPropertyTmpl &Properties::fullName() const { - return createProp(TQString::tqfromLatin1("FormattedName"), + return createProp(TQString::fromLatin1("FormattedName"), i18n("Full Name")); } const ContactPropertyTmpl &Properties::idleTime() const { - return createProp(TQString::tqfromLatin1("idleTime"), + return createProp(TQString::fromLatin1("idleTime"), i18n("Idle Time")); } const ContactPropertyTmpl &Properties::onlineSince() const { - return createProp(TQString::tqfromLatin1("onlineSince"), + return createProp(TQString::fromLatin1("onlineSince"), i18n("Online Since")); } const ContactPropertyTmpl &Properties::lastSeen() const { - return createProp(TQString::tqfromLatin1("lastSeen"), + return createProp(TQString::fromLatin1("lastSeen"), i18n("Last Seen"), TQString(), true); } const ContactPropertyTmpl &Properties::awayMessage() const { - return createProp(TQString::tqfromLatin1("awayMessage"), + return createProp(TQString::fromLatin1("awayMessage"), i18n("Away Message")); } const ContactPropertyTmpl &Properties::firstName() const { - return createProp(TQString::tqfromLatin1("firstName"), + return createProp(TQString::fromLatin1("firstName"), i18n("First Name"), TQString(), true); } const ContactPropertyTmpl &Properties::lastName() const { - return createProp(TQString::tqfromLatin1("lastName"), + return createProp(TQString::fromLatin1("lastName"), i18n("Last Name"), TQString(), true); } const ContactPropertyTmpl &Properties::privatePhone() const { - return createProp(TQString::tqfromLatin1("privatePhoneNumber"), + return createProp(TQString::fromLatin1("privatePhoneNumber"), i18n("Private Phone"), TQString(), true); } const ContactPropertyTmpl &Properties::privateMobilePhone() const { - return createProp(TQString::tqfromLatin1("privateMobilePhoneNumber"), + return createProp(TQString::fromLatin1("privateMobilePhoneNumber"), i18n("Private Mobile Phone"), TQString(), true); } const ContactPropertyTmpl &Properties::workPhone() const { - return createProp(TQString::tqfromLatin1("workPhoneNumber"), + return createProp(TQString::fromLatin1("workPhoneNumber"), i18n("Work Phone"), TQString(), true); } const ContactPropertyTmpl &Properties::workMobilePhone() const { - return createProp(TQString::tqfromLatin1("workMobilePhoneNumber"), + return createProp(TQString::fromLatin1("workMobilePhoneNumber"), i18n("Work Mobile Phone"), TQString(), true); } const ContactPropertyTmpl &Properties::emailAddress() const { - return createProp(TQString::tqfromLatin1("emailAddress"), - i18n("Email Address"), TQString::tqfromLatin1("mail_generic"), true); + return createProp(TQString::fromLatin1("emailAddress"), + i18n("Email Address"), TQString::fromLatin1("mail_generic"), true); } const ContactPropertyTmpl &Properties::nickName() const { - return createProp(TQString::tqfromLatin1("nickName"), + return createProp(TQString::fromLatin1("nickName"), i18n("Nick Name"), TQString(), true); } const ContactPropertyTmpl &Properties::photo() const { - return createProp(TQString::tqfromLatin1("photo"), + return createProp(TQString::fromLatin1("photo"), i18n("Photo"), TQString(), true); } @@ -241,14 +241,14 @@ void installEmoticonTheme(const TQString &archiveName) kapp->processEvents(); TQString currentBundleMimeType = KMimeType::findByPath(archiveName, 0, false)->name(); - if( currentBundleMimeType == TQString::tqfromLatin1("application/x-zip") ) + if( currentBundleMimeType == TQString::fromLatin1("application/x-zip") ) archive = new KZip(archiveName); - else if( currentBundleMimeType == TQString::tqfromLatin1("application/x-tgz") || - currentBundleMimeType == TQString::tqfromLatin1("application/x-tbz") || - currentBundleMimeType == TQString::tqfromLatin1("application/x-gzip") || - currentBundleMimeType == TQString::tqfromLatin1("application/x-bzip2") ) + else if( currentBundleMimeType == TQString::fromLatin1("application/x-tgz") || + currentBundleMimeType == TQString::fromLatin1("application/x-tbz") || + currentBundleMimeType == TQString::fromLatin1("application/x-gzip") || + currentBundleMimeType == TQString::fromLatin1("application/x-bzip2") ) archive = new KTar(archiveName); - else if(archiveName.endsWith(TQString::tqfromLatin1("jisp")) || archiveName.endsWith(TQString::tqfromLatin1("zip")) ) + else if(archiveName.endsWith(TQString::fromLatin1("jisp")) || archiveName.endsWith(TQString::fromLatin1("zip")) ) archive = new KZip(archiveName); else archive = new KTar(archiveName); @@ -273,8 +273,8 @@ void installEmoticonTheme(const TQString &archiveName) if (currentEntry->isDirectory()) { currentDir = dynamic_cast<KArchiveDirectory*>( currentEntry ); - if (currentDir && ( currentDir->entry(TQString::tqfromLatin1("emoticons.xml")) != NULL || - currentDir->entry(TQString::tqfromLatin1("icondef.xml")) != NULL ) ) + if (currentDir && ( currentDir->entry(TQString::fromLatin1("emoticons.xml")) != NULL || + currentDir->entry(TQString::fromLatin1("icondef.xml")) != NULL ) ) foundThemes.append(currentDir->name()); } } @@ -295,7 +295,7 @@ void installEmoticonTheme(const TQString &archiveName) progressDlg->setLabel( i18n("<qt>Installing <strong>%1</strong> emoticon theme</qt>") .tqarg(*it)); - progressDlg->resize(progressDlg->tqsizeHint()); + progressDlg->resize(progressDlg->sizeHint()); kapp->processEvents(); if (progressDlg->wasCancelled()) diff --git a/kopete/libkopete/kopetegroup.cpp b/kopete/libkopete/kopetegroup.cpp index fc1290ba..6206545a 100644 --- a/kopete/libkopete/kopetegroup.cpp +++ b/kopete/libkopete/kopetegroup.cpp @@ -104,27 +104,27 @@ TQPtrList<MetaContact> Group::members() const const TQDomElement Group::toXML() { TQDomDocument group; - group.appendChild( group.createElement( TQString::tqfromLatin1( "kopete-group" ) ) ); - group.documentElement().setAttribute( TQString::tqfromLatin1( "groupId" ), TQString::number( groupId() ) ); + group.appendChild( group.createElement( TQString::fromLatin1( "kopete-group" ) ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "groupId" ), TQString::number( groupId() ) ); TQString type; switch ( d->type ) { case Temporary: - type = TQString::tqfromLatin1( "temporary" ); + type = TQString::fromLatin1( "temporary" ); break; case TopLevel: - type = TQString::tqfromLatin1( "top-level" ); + type = TQString::fromLatin1( "top-level" ); break; default: - type = TQString::tqfromLatin1( "standard" ); // == Normal + type = TQString::fromLatin1( "standard" ); // == Normal break; } - group.documentElement().setAttribute( TQString::tqfromLatin1( "type" ), type ); - group.documentElement().setAttribute( TQString::tqfromLatin1( "view" ), TQString::tqfromLatin1( d->expanded ? "expanded" : "collapsed" ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "type" ), type ); + group.documentElement().setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) ); - TQDomElement displayName = group.createElement( TQString::tqfromLatin1( "display-name" ) ); + TQDomElement displayName = group.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( group.createTextNode( d->displayName ) ); group.documentElement().appendChild( displayName ); @@ -143,7 +143,7 @@ const TQDomElement Group::toXML() bool Group::fromXML( const TQDomElement &data ) { - TQString strGroupId = data.attribute( TQString::tqfromLatin1( "groupId" ) ); + TQString strGroupId = data.attribute( TQString::fromLatin1( "groupId" ) ); if ( !strGroupId.isEmpty() ) { d->groupId = strGroupId.toUInt(); @@ -154,8 +154,8 @@ bool Group::fromXML( const TQDomElement &data ) // Don't overwrite type for Temporary and TopLevel groups if ( d->type != Temporary && d->type != TopLevel ) { - TQString type = data.attribute( TQString::tqfromLatin1( "type" ), TQString::tqfromLatin1( "standard" ) ); - if ( type == TQString::tqfromLatin1( "temporary" ) ) + TQString type = data.attribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); + if ( type == TQString::fromLatin1( "temporary" ) ) { if ( d->type != Temporary ) { @@ -163,7 +163,7 @@ bool Group::fromXML( const TQDomElement &data ) return false; } } - else if ( type == TQString::tqfromLatin1( "top-level" ) ) + else if ( type == TQString::fromLatin1( "top-level" ) ) { if ( d->type != TopLevel ) { @@ -177,20 +177,20 @@ bool Group::fromXML( const TQDomElement &data ) } } - TQString view = data.attribute( TQString::tqfromLatin1( "view" ), TQString::tqfromLatin1( "expanded" ) ); - d->expanded = ( view != TQString::tqfromLatin1( "collapsed" ) ); + TQString view = data.attribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); + d->expanded = ( view != TQString::fromLatin1( "collapsed" ) ); TQDomNode groupData = data.firstChild(); while ( !groupData.isNull() ) { TQDomElement groupElement = groupData.toElement(); - if ( groupElement.tagName() == TQString::tqfromLatin1( "display-name" ) ) + if ( groupElement.tagName() == TQString::fromLatin1( "display-name" ) ) { // Don't set display name for temporary or top-level items if ( d->type == Normal ) d->displayName = groupElement.text(); } - else if( groupElement.tagName() == TQString::tqfromLatin1( "custom-notifications" ) ) + else if( groupElement.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { Kopete::NotifyDataObject::notifyDataFromXML( groupElement ); } @@ -208,10 +208,10 @@ bool Group::fromXML( const TQDomElement &data ) switch ( d->type ) { case Temporary: - d->displayName = TQString::tqfromLatin1( "Temporary" ); + d->displayName = TQString::fromLatin1( "Temporary" ); break; case TopLevel: - d->displayName = TQString::tqfromLatin1( "Top-Level" ); + d->displayName = TQString::fromLatin1( "Top-Level" ); break; default: d->displayName = i18n( "(Unnamed Group)" ); diff --git a/kopete/libkopete/kopetemessage.cpp b/kopete/libkopete/kopetemessage.cpp index 0dfedd69..2070dd56 100644 --- a/kopete/libkopete/kopetemessage.cpp +++ b/kopete/libkopete/kopetemessage.cpp @@ -83,14 +83,14 @@ Message::Private::Private( const TQDateTime &timeStamp, const Contact *from, } Message::Message() -: d( new Private( TQDateTime::tqcurrentDateTime(), 0L, TQPtrList<Contact>(), TQString(), Internal, +: d( new Private( TQDateTime::currentDateTime(), 0L, TQPtrList<Contact>(), TQString(), Internal, TQString(), TypeNormal ) ) { } Message::Message( const Contact *fromKC, const TQPtrList<Contact> &toKC, const TQString &body, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) -: d( new Private( TQDateTime::tqcurrentDateTime(), fromKC, toKC, TQString(), direction, requestedPlugin, type ) ) +: d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, TQString(), direction, requestedPlugin, type ) ) { doSetBody( body, f ); } @@ -100,13 +100,13 @@ Message::Message( const Contact *fromKC, const Contact *toKC, const TQString &bo { TQPtrList<Contact> to; to.append(toKC); - d = new Private( TQDateTime::tqcurrentDateTime(), fromKC, to, TQString(), direction, requestedPlugin, type ); + d = new Private( TQDateTime::currentDateTime(), fromKC, to, TQString(), direction, requestedPlugin, type ); doSetBody( body, f ); } Message::Message( const Contact *fromKC, const TQPtrList<Contact> &toKC, const TQString &body, const TQString &subject, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) - : d( new Private( TQDateTime::tqcurrentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) + : d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } @@ -199,20 +199,20 @@ void Message::doSetBody( const TQString &_body, Message::MessageFormat f ) { //This is coming from the RichTextEditor component. //Strip off the containing HTML document - body.replace( TQRegExp( TQString::tqfromLatin1(".*<body[^>]*>(.*)</body>.*") ), TQString::tqfromLatin1("\\1") ); + body.replace( TQRegExp( TQString::fromLatin1(".*<body[^>]*>(.*)</body>.*") ), TQString::fromLatin1("\\1") ); //Strip <p> tags - body.replace( TQString::tqfromLatin1("<p>"), TQString() ); + body.replace( TQString::fromLatin1("<p>"), TQString() ); //Replace </p> with a <br/> - body.replace( TQString::tqfromLatin1("</p>"), TQString::tqfromLatin1("<br/>") ); + body.replace( TQString::fromLatin1("</p>"), TQString::fromLatin1("<br/>") ); //Remove trailing </br> - if ( body.endsWith( TQString::tqfromLatin1("<br/>") ) ) + if ( body.endsWith( TQString::fromLatin1("<br/>") ) ) body.truncate( body.length() - 5 ); - body.remove( TQString::tqfromLatin1("\n") ); - body.replace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( " " ) ); + body.remove( TQString::fromLatin1("\n") ); + body.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); } /* else if( f == ParsedHTML ) @@ -266,10 +266,10 @@ TQString Message::unescape( const TQString &xml ) TQString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace(); int elemEndPos = match.find( ' ' ); TQString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos ).lower() ); - if ( elem == TQString::tqfromLatin1( "img" ) ) + if ( elem == TQString::fromLatin1( "img" ) ) { // Replace smileys with their original text' - const TQString attrTitle = TQString::tqfromLatin1( "title=\"" ); + const TQString attrTitle = TQString::fromLatin1( "title=\"" ); int titlePos = match.find( attrTitle, elemEndPos ); int titleEndPos = match.find( '"', titlePos + attrTitle.length() ); if( titlePos == -1 || titleEndPos == -1 ) @@ -286,8 +286,8 @@ TQString Message::unescape( const TQString &xml ) pos += orig.length(); } } - else if ( elem == TQString::tqfromLatin1( "/p" ) || elem == TQString::tqfromLatin1( "/div" ) || - elem == TQString::tqfromLatin1( "br" ) ) + else if ( elem == TQString::fromLatin1( "/p" ) || elem == TQString::fromLatin1( "/div" ) || + elem == TQString::fromLatin1( "br" ) ) { // Replace paragraph, div and line breaks with a newline data.replace( pos, matchWidth, '\n' ); @@ -302,12 +302,12 @@ TQString Message::unescape( const TQString &xml ) } // Replace stuff starting with '&' - data.replace( TQString::tqfromLatin1( ">" ), TQString::tqfromLatin1( ">" ) ); - data.replace( TQString::tqfromLatin1( "<" ), TQString::tqfromLatin1( "<" ) ); - data.replace( TQString::tqfromLatin1( """ ), TQString::tqfromLatin1( "\"" ) ); - data.replace( TQString::tqfromLatin1( " " ), TQString::tqfromLatin1( " " ) ); - data.replace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&" ) ); - data.replace( TQString::tqfromLatin1( " " ), TQString::tqfromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; + data.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); + data.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); + data.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); + data.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; return data; } @@ -316,13 +316,13 @@ TQString Message::escape( const TQString &text ) { TQString html = TQStyleSheet::escape( text ); //Replace carriage returns inside the text - html.replace( TQString::tqfromLatin1( "\n" ), TQString::tqfromLatin1( "<br />" ) ); + html.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br />" ) ); //Replace a tab with 4 spaces - html.replace( TQString::tqfromLatin1( "\t" ), TQString::tqfromLatin1( " " ) ); + html.replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( " " ) ); //Replace multiple spaces with //do not replace every space so we break the linebreak - html.replace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( " " ) ); + html.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); return html; } @@ -373,11 +373,11 @@ TQString Message::parsedBody() const static TQString makeRegExp( const char *pattern ) { - const TQString urlChar = TQString::tqfromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const TQString boundaryStart = TQString::tqfromLatin1( "(^|[^%1])(" ).tqarg( urlChar ); - const TQString boundaryEnd = TQString::tqfromLatin1( ")([^%1]|$)" ).tqarg( urlChar ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString boundaryStart = TQString::fromLatin1( "(^|[^%1])(" ).tqarg( urlChar ); + const TQString boundaryEnd = TQString::fromLatin1( ")([^%1]|$)" ).tqarg( urlChar ); - return boundaryStart + TQString::tqfromLatin1(pattern) + boundaryEnd; + return boundaryStart + TQString::fromLatin1(pattern) + boundaryEnd; } TQString Message::parseLinks( const TQString &message, MessageFormat format ) @@ -411,38 +411,38 @@ TQString Message::parseLinks( const TQString &message, MessageFormat format ) TQString body = curr.mid( tagclose + 1 ); *it = tag + parseLinks( body, PlainText ); } - return entries.join(TQString::tqfromLatin1("<")); + return entries.join(TQString::fromLatin1("<")); } TQString result = message; // common subpatterns - may not contain matching parens! - const TQString name = TQString::tqfromLatin1( "[\\w\\+\\-=_\\.]+" ); - const TQString userAndPassword = TQString::tqfromLatin1( "(?:%1(?::%1)?\\@)" ).tqarg( name ); - const TQString urlChar = TQString::tqfromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const TQString urlSection = TQString::tqfromLatin1( "[%1]+" ).tqarg( urlChar ); - const TQString domain = TQString::tqfromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); + const TQString name = TQString::fromLatin1( "[\\w\\+\\-=_\\.]+" ); + const TQString userAndPassword = TQString::fromLatin1( "(?:%1(?::%1)?\\@)" ).tqarg( name ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString urlSection = TQString::fromLatin1( "[%1]+" ).tqarg( urlChar ); + const TQString domain = TQString::fromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); //Replace http/https/ftp links: // Replace (stuff)://[user:password@](linkstuff) with a link result.replace( TQRegExp( makeRegExp("\\w+://%1?\\w%2").tqarg( userAndPassword, urlSection ) ), - TQString::tqfromLatin1("\\1<a href=\"\\2\" title=\"\\2\">\\2</a>\\3" ) ); + TQString::fromLatin1("\\1<a href=\"\\2\" title=\"\\2\">\\2</a>\\3" ) ); // Replace www.X.Y(linkstuff) with a http: link result.replace( TQRegExp( makeRegExp("%1?www\\.%2%3").tqarg( userAndPassword, domain, urlSection ) ), - TQString::tqfromLatin1("\\1<a href=\"http://\\2\" title=\"http://\\2\">\\2</a>\\3" ) ); + TQString::fromLatin1("\\1<a href=\"http://\\2\" title=\"http://\\2\">\\2</a>\\3" ) ); //Replace Email Links // Replace user@domain with a mailto: link result.replace( TQRegExp( makeRegExp("%1@%2").tqarg( name, domain ) ), - TQString::tqfromLatin1("\\1<a href=\"mailto:\\2\" title=\"mailto:\\2\">\\2</a>\\3") ); + TQString::fromLatin1("\\1<a href=\"mailto:\\2\" title=\"mailto:\\2\">\\2</a>\\3") ); //Workaround for Bug 85061: Highlighted URLs adds a ' ' after the URL itself // the trailing is included in the url. - result.replace( TQRegExp( TQString::tqfromLatin1("(<a href=\"[^\"]+)( )(\")") ) , TQString::tqfromLatin1("\\1\\3") ); + result.replace( TQRegExp( TQString::fromLatin1("(<a href=\"[^\"]+)( )(\")") ) , TQString::fromLatin1("\\1\\3") ); return result; } @@ -486,8 +486,8 @@ TQColor Message::bg() const TQFont Message::font() const { - //TQDomElement bodyNode = d->xmlDoc.elementsByTagName( TQString::tqfromLatin1("body") ).item(0).toElement(); - //return TQFont( bodyNode.attribute( TQString::tqfromLatin1("font") ), bodyNode.attribute( TQString::tqfromLatin1("fontsize") ).toInt() ); + //TQDomElement bodyNode = d->xmlDoc.elementsByTagName( TQString::fromLatin1("body") ).item(0).toElement(); + //return TQFont( bodyNode.attribute( TQString::fromLatin1("font") ), bodyNode.attribute( TQString::fromLatin1("fontsize") ).toInt() ); return d->font; } @@ -543,15 +543,15 @@ TQString Message::getHtmlStyleAttribute() const { TQString fontstr; if(!d->font.family().isNull()) - fontstr+=TQString::tqfromLatin1("font-family: ")+d->font.family()+TQString::tqfromLatin1("; "); + fontstr+=TQString::fromLatin1("font-family: ")+d->font.family()+TQString::fromLatin1("; "); if(d->font.italic()) - fontstr+=TQString::tqfromLatin1("font-style: italic; "); + fontstr+=TQString::fromLatin1("font-style: italic; "); if(d->font.strikeOut()) - fontstr+=TQString::tqfromLatin1("text-decoration: line-through; "); + fontstr+=TQString::fromLatin1("text-decoration: line-through; "); if(d->font.underline()) - fontstr+=TQString::tqfromLatin1("text-decoration: underline; "); + fontstr+=TQString::fromLatin1("text-decoration: underline; "); if(d->font.bold()) - fontstr+=TQString::tqfromLatin1("font-weight: bold;"); + fontstr+=TQString::fromLatin1("font-weight: bold;"); styleAttribute += fontstr; } @@ -629,7 +629,7 @@ TQString Message::decodeString( const TQCString &message, const TQTextCodec *pro kdDebug(14000) << k_funcinfo << "Using latin1 and cleaning string" << endl; //No codec decoded. Just decode latin1, and clean out any junk. - TQString result = TQString::tqfromLatin1( message ); + TQString result = TQString::fromLatin1( message ); const uint length = message.length(); for( uint i = 0; i < length; ++i ) { diff --git a/kopete/libkopete/kopetemetacontact.cpp b/kopete/libkopete/kopetemetacontact.cpp index 9ec2704c..7bfd87e7 100644 --- a/kopete/libkopete/kopetemetacontact.cpp +++ b/kopete/libkopete/kopetemetacontact.cpp @@ -58,7 +58,7 @@ class MetaContact::Private Private() : photoSource(MetaContact::SourceCustom), displayNameSource(MetaContact::SourceCustom), displayNameSourceContact(0L), photoSourceContact(0L), temporary(false), - onlinetqStatus(Kopete::OnlineStatus::Offline), photoSyncedWithKABC(false) + onlineStatus(Kopete::OnlineStatus::Offline), photoSyncedWithKABC(false) {} ~Private() @@ -85,7 +85,7 @@ class MetaContact::Private TQMap<TQString, TQMap<TQString, TQString> > addressBook; bool temporary; - OnlineStatus::StatusType onlinetqStatus; + OnlineStatus::StatusType onlineStatus; bool photoSyncedWithKABC; // Used to set contact source at load. @@ -171,22 +171,22 @@ void MetaContact::addContact( Contact *c ) void MetaContact::updateOnlineStatus() { - Kopete::OnlineStatus::StatusType newtqStatus = Kopete::OnlineStatus::Unknown; - Kopete::OnlineStatus mostSignificanttqStatus; + Kopete::OnlineStatus::StatusType newStatus = Kopete::OnlineStatus::Unknown; + Kopete::OnlineStatus mostSignificantStatus; for ( TQPtrListIterator<Contact> it( d->contacts ); it.current(); ++it ) { // find most significant status - if ( it.current()->onlinetqStatus() > mostSignificanttqStatus ) - mostSignificanttqStatus = it.current()->onlinetqStatus(); + if ( it.current()->onlineStatus() > mostSignificantStatus ) + mostSignificantStatus = it.current()->onlineStatus(); } - newtqStatus = mostSignificanttqStatus.status(); + newStatus = mostSignificantStatus.status(); - if( newtqStatus != d->onlinetqStatus ) + if( newStatus != d->onlineStatus ) { - d->onlinetqStatus = newtqStatus; - emit onlineStatusChanged( this, d->onlinetqStatus ); + d->onlineStatus = newStatus; + emit onlineStatusChanged( this, d->onlineStatus ); } } @@ -415,14 +415,14 @@ Contact *MetaContact::preferredContact() continue; } - if( c->onlinetqStatus().status() > contact->onlinetqStatus().status() ) + if( c->onlineStatus().status() > contact->onlineStatus().status() ) contact=c; //this contact has a better status - else if ( c->onlinetqStatus().status() == contact->onlinetqStatus().status() ) + else if ( c->onlineStatus().status() == contact->onlineStatus().status() ) { if( c->account()->priority() > contact->account()->priority() ) contact=c; else if( c->account()->priority() == contact->account()->priority() - && c->onlinetqStatus().weight() > contact->onlinetqStatus().weight() ) + && c->onlineStatus().weight() > contact->onlineStatus().weight() ) contact = c; //the weight is not supposed to follow the same scale for each protocol } } @@ -513,7 +513,7 @@ TQString MetaContact::statusString() const OnlineStatus::StatusType MetaContact::status() const { - return d->onlinetqStatus; + return d->onlineStatus; } bool MetaContact::isOnline() const @@ -566,7 +566,7 @@ void MetaContact::sendFile( const KURL &sourceURL, const TQString &altFileName, Contact *contact = d->contacts.first(); for( TQPtrListIterator<Contact> it( d->contacts ) ; it.current(); ++it ) { - if( ( *it )->onlinetqStatus() > contact->onlinetqStatus() && ( *it )->canAcceptFiles() ) + if( ( *it )->onlineStatus() > contact->onlineStatus() && ( *it )->canAcceptFiles() ) contact = *it; } @@ -1360,7 +1360,7 @@ void MetaContact::setMetaContactId( const TQString& newMetaContactId ) // other programs may have written that data and depend on it d->metaContactId = newMetaContactId; KABCPersistence::self()->write( this ); - emit onlineStatusChanged( this, d->onlinetqStatus ); + emit onlineStatusChanged( this, d->onlineStatus ); emit persistentDataChanged(); } diff --git a/kopete/libkopete/kopetemetacontact.h b/kopete/libkopete/kopetemetacontact.h index 168fbaa2..60c8f6a2 100644 --- a/kopete/libkopete/kopetemetacontact.h +++ b/kopete/libkopete/kopetemetacontact.h @@ -559,7 +559,7 @@ private slots: /** * One of the child contact's online status changed */ - void slotContactStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus ); + void slotContactStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus ); /** * One of the child contact's property changed diff --git a/kopete/libkopete/kopetemimesourcefactory.cpp b/kopete/libkopete/kopetemimesourcefactory.cpp index 962bc8ff..f21d875a 100644 --- a/kopete/libkopete/kopetemimesourcefactory.cpp +++ b/kopete/libkopete/kopetemimesourcefactory.cpp @@ -61,7 +61,7 @@ const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const *it = KURL::decode_string( *it ); TQPixmap img; - if ( parts[0] == TQString::tqfromLatin1("kopete-contact-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-contact-icon") ) { if ( parts.size() >= 4 ) { @@ -71,7 +71,7 @@ const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const Contact *contact = account->contacts()[ parts[3] ]; if ( contact ) { - img = contact->onlinetqStatus().iconFor( contact ); + img = contact->onlineStatus().iconFor( contact ); completed = true; } else @@ -84,14 +84,14 @@ const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-contact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == TQString::tqfromLatin1("kopete-account-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-account-icon") ) { if ( parts.size() >= 3 ) { Account *account = AccountManager::self()->findAccount( parts[1], parts[2] ); if ( account ) { - img = account->myself()->onlinetqStatus().iconFor( account->myself() ); + img = account->myself()->onlineStatus().iconFor( account->myself() ); completed = true; } else @@ -101,7 +101,7 @@ const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-account-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == TQString::tqfromLatin1("kopete-metacontact-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-icon") ) { if ( parts.size() >= 2 ) { @@ -116,7 +116,7 @@ const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == TQString::tqfromLatin1("kopete-metacontact-photo") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-photo") ) { if ( parts.size() >= 2 ) { @@ -133,7 +133,7 @@ const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-photo: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == TQString::tqfromLatin1("kopete-onlinestatus-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-onlinestatus-icon") ) { if ( parts.size() >= 2 ) { @@ -152,7 +152,7 @@ const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const Account *account = AccountManager::self()->accounts().getFirst(); if ( account ) { - img = account->myself()->onlinetqStatus().iconFor( parts[1] ); + img = account->myself()->onlineStatus().iconFor( parts[1] ); completed = true; } else diff --git a/kopete/libkopete/kopetemimetypehandler.cpp b/kopete/libkopete/kopetemimetypehandler.cpp index 89282b62..d4b53925 100644 --- a/kopete/libkopete/kopetemimetypehandler.cpp +++ b/kopete/libkopete/kopetemimetypehandler.cpp @@ -200,9 +200,9 @@ void MimeTypeHandler::handleURL( const TQString &mimeType, const KURL &url ) con EmoticonMimeTypeHandler::EmoticonMimeTypeHandler() : MimeTypeHandler( false ) { - registerAsMimeHandler( TQString::tqfromLatin1("application/x-kopete-emoticons") ); - registerAsMimeHandler( TQString::tqfromLatin1("application/x-tgz") ); - registerAsMimeHandler( TQString::tqfromLatin1("application/x-tbz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-kopete-emoticons") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tgz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tbz") ); } void EmoticonMimeTypeHandler::handleURL( const TQString &, const KURL &url ) const diff --git a/kopete/libkopete/kopetenotifydataobject.cpp b/kopete/libkopete/kopetenotifydataobject.cpp index 16ec1889..68f2a0b9 100644 --- a/kopete/libkopete/kopetenotifydataobject.cpp +++ b/kopete/libkopete/kopetenotifydataobject.cpp @@ -60,14 +60,14 @@ TQDomElement Kopete::NotifyDataObject::notifyDataToXML() if ( !d->events.isEmpty() ) { //<custom-notifications> - notifications = notify.createElement( TQString::tqfromLatin1( "custom-notifications" ) ); + notifications = notify.createElement( TQString::fromLatin1( "custom-notifications" ) ); TQDictIterator<Kopete::NotifyEvent> it( d->events ); for ( ; it.current(); ++it ) { //<event name="..." suppress-common="true|false"> - TQDomElement event = notify.createElement( TQString::tqfromLatin1( "event" ) ); - event.setAttribute( TQString::tqfromLatin1( "name" ), it.currentKey() ); - event.setAttribute( TQString::tqfromLatin1( "suppress-common" ), TQString::tqfromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); + TQDomElement event = notify.createElement( TQString::fromLatin1( "event" ) ); + event.setAttribute( TQString::fromLatin1( "name" ), it.currentKey() ); + event.setAttribute( TQString::fromLatin1( "suppress-common" ), TQString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); TQValueList<TQDomElement> presentations = it.current()->toXML(); //<sound-notification enabled="true|false" src="..." single-shot=""> for ( TQValueList<TQDomElement>::Iterator it = presentations.begin(); it != presentations.end(); ++it ) @@ -80,57 +80,57 @@ TQDomElement Kopete::NotifyDataObject::notifyDataToXML() bool Kopete::NotifyDataObject::notifyDataFromXML( const TQDomElement& element ) { - if ( element.tagName() == TQString::tqfromLatin1( "custom-notifications" ) ) + if ( element.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { TQDomNode field = element.firstChild(); while( !field.isNull() ) { //read an event TQDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == TQString::tqfromLatin1( "event" ) ) + if ( fieldElement.tagName() == TQString::fromLatin1( "event" ) ) { // get its attributes - TQString name = fieldElement.attribute( TQString::tqfromLatin1( "name" ), TQString() ); - TQString suppress = fieldElement.attribute( TQString::tqfromLatin1( "suppress-common" ), TQString() ); - Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == TQString::tqfromLatin1( "true" ) ); + TQString name = fieldElement.attribute( TQString::fromLatin1( "name" ), TQString() ); + TQString suppress = fieldElement.attribute( TQString::fromLatin1( "suppress-common" ), TQString() ); + Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == TQString::fromLatin1( "true" ) ); // get its tqchildren TQDomNode child = fieldElement.firstChild(); while( !child.isNull() ) { TQDomElement childElement = child.toElement(); - if ( childElement.tagName() == TQString::tqfromLatin1( "sound-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "sound-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: sound" << endl; - TQString src = childElement.attribute( TQString::tqfromLatin1( "src" ) ); - TQString enabled = childElement.attribute( TQString::tqfromLatin1( "enabled" ) ); - TQString singleShot = childElement.attribute( TQString::tqfromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Sound, src, - ( singleShot == TQString::tqfromLatin1( "true" ) ), - ( enabled == TQString::tqfromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Sound, pres ); // kdDebug(14010) << k_funcinfo << "after sound: " << evt->toString() << endl; } - if ( childElement.tagName() == TQString::tqfromLatin1( "message-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "message-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: msg" << endl; - TQString src = childElement.attribute( TQString::tqfromLatin1( "src" ) ); - TQString enabled = childElement.attribute( TQString::tqfromLatin1( "enabled" ) ); - TQString singleShot = childElement.attribute( TQString::tqfromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Message, src, - ( singleShot == TQString::tqfromLatin1( "true" ) ), - ( enabled == TQString::tqfromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Message, pres ); // kdDebug(14010) << k_funcinfo << "after message: " << evt->toString() << endl; } - if ( childElement.tagName() == TQString::tqfromLatin1( "chat-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "chat-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: chat" << endl; - TQString enabled = childElement.attribute( TQString::tqfromLatin1( "enabled" ) ); - TQString singleShot = childElement.attribute( TQString::tqfromLatin1( "single-shot" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, TQString(), - ( singleShot == TQString::tqfromLatin1( "true" ) ), - ( enabled == TQString::tqfromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Chat, pres ); // kdDebug(14010) << k_funcinfo << "after chat: " << evt->toString() << endl; } diff --git a/kopete/libkopete/kopetenotifyevent.cpp b/kopete/libkopete/kopetenotifyevent.cpp index b233774b..544c3e45 100644 --- a/kopete/libkopete/kopetenotifyevent.cpp +++ b/kopete/libkopete/kopetenotifyevent.cpp @@ -144,25 +144,25 @@ const TQValueList<TQDomElement> Kopete::NotifyEvent::toXML() const TQValueList<TQDomElement> eventNodes; if ( m_sound && !m_sound->content().isEmpty() ) { - TQDomElement soundElmt = eventData.createElement( TQString::tqfromLatin1( "sound-presentation" ) ); - soundElmt.setAttribute( TQString::tqfromLatin1( "enabled" ), TQString::tqfromLatin1( m_sound->enabled() ? "true" : "false" ) ); - soundElmt.setAttribute( TQString::tqfromLatin1( "single-shot" ), TQString::tqfromLatin1( m_sound->singleShot() ? "true" : "false" ) ); - soundElmt.setAttribute( TQString::tqfromLatin1( "src" ), m_sound->content() ); + TQDomElement soundElmt = eventData.createElement( TQString::fromLatin1( "sound-presentation" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_sound->enabled() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_sound->singleShot() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "src" ), m_sound->content() ); eventNodes.append( soundElmt ); } if ( m_message && !m_message->content().isEmpty() ) { - TQDomElement msgElmt = eventData.createElement( TQString::tqfromLatin1( "message-presentation" ) ); - msgElmt.setAttribute( TQString::tqfromLatin1( "enabled" ), TQString::tqfromLatin1( m_message->enabled() ? "true" : "false" ) ); - msgElmt.setAttribute( TQString::tqfromLatin1( "single-shot" ), TQString::tqfromLatin1( m_message->singleShot() ? "true" : "false" ) ); - msgElmt.setAttribute( TQString::tqfromLatin1( "src" ), m_message->content() ); + TQDomElement msgElmt = eventData.createElement( TQString::fromLatin1( "message-presentation" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_message->enabled() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_message->singleShot() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "src" ), m_message->content() ); eventNodes.append( msgElmt ); } if ( m_chat && m_chat->enabled() ) { - TQDomElement chatElmt = eventData.createElement( TQString::tqfromLatin1( "chat-presentation" ) ); - chatElmt.setAttribute( TQString::tqfromLatin1( "enabled" ), TQString::tqfromLatin1( "true" ) ); - chatElmt.setAttribute( TQString::tqfromLatin1( "single-shot" ), TQString::tqfromLatin1( m_chat->singleShot() ? "true" : "false" ) ); + TQDomElement chatElmt = eventData.createElement( TQString::fromLatin1( "chat-presentation" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( "true" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_chat->singleShot() ? "true" : "false" ) ); eventNodes.append( chatElmt ); } return eventNodes; @@ -170,7 +170,7 @@ const TQValueList<TQDomElement> Kopete::NotifyEvent::toXML() const TQString Kopete::NotifyEvent::toString() { - TQString stringRep = TQString::tqfromLatin1("Event; Suppress common=%1").tqarg( TQString::tqfromLatin1( suppressCommon() ? "true" : "false" ) ); + TQString stringRep = TQString::fromLatin1("Event; Suppress common=%1").tqarg( TQString::fromLatin1( suppressCommon() ? "true" : "false" ) ); if ( m_sound) stringRep += m_sound->toString(); if ( m_message) diff --git a/kopete/libkopete/kopeteonlinestatus.cpp b/kopete/libkopete/kopeteonlinestatus.cpp index b888c246..da9bb5d5 100644 --- a/kopete/libkopete/kopeteonlinestatus.cpp +++ b/kopete/libkopete/kopeteonlinestatus.cpp @@ -1,5 +1,5 @@ /* - kopeteonlinestatus.cpp - Kopete Online tqStatus + kopeteonlinestatus.cpp - Kopete Online Status Copyright (c) 2003 by Martijn Klingens <klingens@kde.org> Copyright (c) 2003 by Duncan Mac-Vicar Prett <duncan@kde.org> @@ -49,7 +49,7 @@ public: TQString protocolIcon() const { - return protocol ? protocol->pluginIcon() : TQString::tqfromLatin1( "unknown" ); + return protocol ? protocol->pluginIcon() : TQString::fromLatin1( "unknown" ); } }; @@ -124,7 +124,7 @@ OnlineStatus::OnlineStatus( StatusType status ) case Unknown: default: d->description = i18n( "Unknown" ); - d->overlayIcons = TQString::tqfromLatin1("status_unknown"); + d->overlayIcons = TQString::fromLatin1("status_unknown"); break; } @@ -137,7 +137,7 @@ OnlineStatus::OnlineStatus() d->internalStatus = 0; d->weight = 0; d->protocol = 0L; - d->overlayIcons = TQString::tqfromLatin1( "status_unknown" ); + d->overlayIcons = TQString::fromLatin1( "status_unknown" ); } OnlineStatus::OnlineStatus( const OnlineStatus &other ) @@ -283,9 +283,9 @@ TQString OnlineStatus::statusTypeToString(OnlineStatus::StatusType statusType) for (int i=0; i< size; i++) if (statusNames[i].status == statusType) - return TQString::tqfromLatin1(statusNames[i].name); + return TQString::fromLatin1(statusNames[i].name); - return TQString::tqfromLatin1(statusNames[0].name); // Unknown + return TQString::fromLatin1(statusNames[0].name); // Unknown } OnlineStatus::StatusType OnlineStatus::statusStringToType(TQString& string) @@ -293,7 +293,7 @@ OnlineStatus::StatusType OnlineStatus::statusStringToType(TQString& string) int size = sizeof(statusNames) / sizeof(statusNames[0]); for (int i=0; i< size; i++) - if (TQString::tqfromLatin1(statusNames[i].name) == string) + if (TQString::fromLatin1(statusNames[i].name) == string) return statusNames[i].status; return OnlineStatus::Unknown; diff --git a/kopete/libkopete/kopeteonlinestatus.h b/kopete/libkopete/kopeteonlinestatus.h index 34f0bc9c..5349677d 100644 --- a/kopete/libkopete/kopeteonlinestatus.h +++ b/kopete/libkopete/kopeteonlinestatus.h @@ -1,5 +1,5 @@ /* - kopeteonlinestatus.h - Kopete Online tqStatus + kopeteonlinestatus.h - Kopete Online Status Copyright (c) 2003 by Martijn Klingens <klingens@kde.org> Copyright (c) 2003 by Duncan Mac-Vicar Prett <duncan@kde.org> @@ -128,7 +128,7 @@ public: * Any internal status value > 0x80000000 is reserved for internal * libkopete use. This enumeration lists the currently known values. */ - enum ReservedInternaltqStatus + enum ReservedInternalStatus { /** * The account this contact belongs to is offline. Used with @@ -202,7 +202,7 @@ public: * This status is usually a lot more fine-grained than the status as used * by libkopete and should be unique per protocol. * @param overlayIcon is a string returning the name of the status icon to be - * used by the KDE icon loader. (tqStatus whiwh doesn't have icon to overlay like + * used by the KDE icon loader. (Status whiwh doesn't have icon to overlay like * Online and Offline should use TQString() as icon string) * @param description is a description in e.g. tooltips. * @param caption is the text of the action in the menu diff --git a/kopete/libkopete/kopeteonlinestatusmanager.cpp b/kopete/libkopete/kopeteonlinestatusmanager.cpp index 9415a428..a814ed36 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.cpp +++ b/kopete/libkopete/kopeteonlinestatusmanager.cpp @@ -49,7 +49,7 @@ class OnlineStatusManager::Private typedef TQMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ; TQPixmap *nullPixmap; - TQMap<Protocol* , ProtocolMap > registeredtqStatus; + TQMap<Protocol* , ProtocolMap > registeredStatus; TQDict< TQPixmap > iconCache; }; @@ -89,10 +89,10 @@ void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, cons s.caption=caption; s.categories=categories; s.options=options; - d->registeredtqStatus[status.protocol()].insert(status, s ); + d->registeredStatus[status.protocol()].insert(status, s ); } -OnlineStatus OnlineStatusManager::onlinetqStatus(Protocol * protocol, Categories category) const +OnlineStatus OnlineStatusManager::onlineStatus(Protocol * protocol, Categories category) const { /* Each category has a number which is a power of two, so it is possible to have several categories per online status * the logaritm in base two if this number, which represent the bit which is equal to 1 in the number is chosen to be in a tree @@ -106,7 +106,7 @@ OnlineStatus OnlineStatusManager::onlinetqStatus(Protocol * protocol, Categories * To get the parent of a key, one just divide per two the number */ - Private::ProtocolMap protocolMap=d->registeredtqStatus[protocol]; + Private::ProtocolMap protocolMap=d->registeredStatus[protocol]; int categ_nb=-1; //the logaritm of category uint category_=category; @@ -137,11 +137,11 @@ TQString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const { // create a 'fingerprint' to use as a hash key // fingerprint consists of description/icon name/color/overlay name/size/idle state - return TQString::tqfromLatin1("%1/%2/%3/%4/%5/%6") + return TQString::fromLatin1("%1/%2/%3/%4/%5/%6") .tqarg( statusFor.description() ) .tqarg( icon ) .tqarg( color.name() ) - .tqarg( statusFor.overlayIcons().join( TQString::tqfromLatin1( "," ) ) ) + .tqarg( statusFor.overlayIcons().join( TQString::fromLatin1( "," ) ) ) .tqarg( size ) .tqarg( idle ? 'i' : 'a' ); } @@ -340,7 +340,7 @@ TQPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const TQImage basisImage = basis->convertToImage(); TQImage overlayImage = overlay.convertToImage(); TQPoint offset; - if ( (*it).endsWith( TQString::tqfromLatin1( "_overlay" ) ) ) + if ( (*it).endsWith( TQString::fromLatin1( "_overlay" ) ) ) { // it is possible to have more than one overlay icon // to avoid overlapping we place them in different corners @@ -370,7 +370,7 @@ TQPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const void OnlineStatusManager::createAccountStatusActions( Account *account , KActionMenu *parent) { - Private::ProtocolMap protocolMap=d->registeredtqStatus[account->protocol()]; + Private::ProtocolMap protocolMap=d->registeredStatus[account->protocol()]; Private::ProtocolMap::Iterator it; for ( it = --protocolMap.end(); it != protocolMap.end(); --it ) { diff --git a/kopete/libkopete/kopeteonlinestatusmanager.h b/kopete/libkopete/kopeteonlinestatusmanager.h index e286dafc..8edd8861 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.h +++ b/kopete/libkopete/kopeteonlinestatusmanager.h @@ -54,9 +54,9 @@ public: * * Idle is the status used for auto-away * - * tqStatus number are organised so that make a tree. + * Status number are organised so that make a tree. */ - //please be carrefull when modifying values of status. read comment in onlinetqStatus() + //please be carrefull when modifying values of status. read comment in onlineStatus() enum Categories { Idle=1<<8, ExtendedAway=1<<9 , Invisible=1<<10, @@ -122,7 +122,7 @@ public: * * If no status has been registered in this category, return the one in the category which is the most similair */ - OnlineStatus onlinetqStatus(Protocol *protocol, Categories category) const; + OnlineStatus onlineStatus(Protocol *protocol, Categories category) const; private: friend class OnlineStatus; diff --git a/kopete/libkopete/kopetepassword.cpp b/kopete/libkopete/kopetepassword.cpp index ebdcde8b..af23b51c 100644 --- a/kopete/libkopete/kopetepassword.cpp +++ b/kopete/libkopete/kopetepassword.cpp @@ -293,8 +293,8 @@ public: i18n( "<qt>Kopete is unable to save your password securely in your wallet;<br>" "do you want to save the password in the <b>unsafe</b> configuration file instead?</qt>" ), i18n( "Unable to Store Secure Password" ), - KGuiItem( i18n( "Store &Unsafe" ), TQString::tqfromLatin1( "unlock" ) ), - TQString::tqfromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) + KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ) ), + TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) { return false; } diff --git a/kopete/libkopete/kopetepasswordedaccount.cpp b/kopete/libkopete/kopetepasswordedaccount.cpp index 68dd7917..899275c5 100644 --- a/kopete/libkopete/kopetepasswordedaccount.cpp +++ b/kopete/libkopete/kopetepasswordedaccount.cpp @@ -28,17 +28,17 @@ struct Kopete::PasswordedAccount::Private Private( const TQString &group, uint maxLen, bool allowBlankPassword ) : password( group, maxLen, allowBlankPassword, "mPassword" ) {} Kopete::Password password; - Kopete::OnlineStatus initialtqStatus; + Kopete::OnlineStatus initialStatus; }; Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( TQString::tqfromLatin1("Account_")+ parent->pluginId() + TQString::tqfromLatin1("_") + acctId , maxLen, false ) ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, false ) ) { } Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, bool allowBlankPassword, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( TQString::tqfromLatin1("Account_")+ parent->pluginId() + TQString::tqfromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) { } @@ -58,12 +58,12 @@ void Kopete::PasswordedAccount::connect( ) connect( s ); } -void Kopete::PasswordedAccount::connect( const Kopete::OnlineStatus& initialtqStatus ) +void Kopete::PasswordedAccount::connect( const Kopete::OnlineStatus& initialStatus ) { // check that the networkstatus is up // warn user somewhere - d->initialtqStatus = initialtqStatus; + d->initialStatus = initialStatus; TQString cached = password().cachedValue(); if( !cached.isNull() || d->password.allowBlankPassword() ) { @@ -85,9 +85,9 @@ TQString Kopete::PasswordedAccount::passwordPrompt() return i18n( "Please enter your password for %1 account <b>%2</b>" ).tqarg( protocol()->displayName(), accountId() ); } -Kopete::OnlineStatus Kopete::PasswordedAccount::initialtqStatus() +Kopete::OnlineStatus Kopete::PasswordedAccount::initialStatus() { - return d->initialtqStatus; + return d->initialStatus; } bool Kopete::PasswordedAccount::removeAccount() diff --git a/kopete/libkopete/kopetepasswordedaccount.h b/kopete/libkopete/kopetepasswordedaccount.h index 4be22016..210adbd4 100644 --- a/kopete/libkopete/kopetepasswordedaccount.h +++ b/kopete/libkopete/kopetepasswordedaccount.h @@ -74,15 +74,15 @@ public: /** * @brief Go online for this service. * - * @param initialtqStatus is the status to connect with. If it is an invalid status for this + * @param initialStatus is the status to connect with. If it is an invalid status for this * account, the default online for the account should be used. */ - void connect( const OnlineStatus& initialtqStatus ); + void connect( const OnlineStatus& initialStatus ); /** * \brief Get the initial status */ - OnlineStatus initialtqStatus(); + OnlineStatus initialStatus(); /** * @brief Remove the account from the server. diff --git a/kopete/libkopete/kopeteplugin.cpp b/kopete/libkopete/kopeteplugin.cpp index 2a4542f6..9b6a7dc1 100644 --- a/kopete/libkopete/kopeteplugin.cpp +++ b/kopete/libkopete/kopeteplugin.cpp @@ -46,7 +46,7 @@ Plugin::~Plugin() TQString Plugin::pluginId() const { - return TQString::tqfromLatin1( className() ); + return TQString::fromLatin1( className() ); } diff --git a/kopete/libkopete/kopetepluginmanager.cpp b/kopete/libkopete/kopetepluginmanager.cpp index 8595cb94..dae70b34 100644 --- a/kopete/libkopete/kopetepluginmanager.cpp +++ b/kopete/libkopete/kopetepluginmanager.cpp @@ -91,8 +91,8 @@ PluginManager* PluginManager::self() PluginManager::PluginManager() : TQObject( tqApp ), d( new Private ) { - d->plugins = KPluginInfo::fromServices( KTrader::self()->query( TQString::tqfromLatin1( "Kopete/Plugin" ), - TQString::tqfromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); + d->plugins = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); // We want to add a reference to the application's event loop so we // can remain in control when all windows are removed. @@ -239,7 +239,7 @@ void PluginManager::slotShutdownTimeout() remaining.append( it.data()->pluginId() ); kdWarning( 14010 ) << k_funcinfo << "Some plugins didn't shutdown in time!" << endl - << "Remaining plugins: " << remaining.join( TQString::tqfromLatin1( ", " ) ) << endl + << "Remaining plugins: " << remaining.join( TQString::fromLatin1( ", " ) ) << endl << "Forcing Kopete shutdown now." << endl; slotShutdownDone(); @@ -259,17 +259,17 @@ void PluginManager::loadAllPlugins() // FIXME: We need session management here - Martijn KConfig *config = KGlobal::config(); - if ( config->hasGroup( TQString::tqfromLatin1( "Plugins" ) ) ) + if ( config->hasGroup( TQString::fromLatin1( "Plugins" ) ) ) { TQMap<TQString, bool> pluginsMap; - TQMap<TQString, TQString> entries = config->entryMap( TQString::tqfromLatin1( "Plugins" ) ); + TQMap<TQString, TQString> entries = config->entryMap( TQString::fromLatin1( "Plugins" ) ); TQMap<TQString, TQString>::Iterator it; for ( it = entries.begin(); it != entries.end(); ++it ) { TQString key = it.key(); - if ( key.endsWith( TQString::tqfromLatin1( "Enabled" ) ) ) - pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == TQString::tqfromLatin1( "true" )) ); + if ( key.endsWith( TQString::fromLatin1( "Enabled" ) ) ) + pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == TQString::fromLatin1( "true" )) ); } TQValueList<KPluginInfo *> plugins = availablePlugins( TQString() ); @@ -278,7 +278,7 @@ void PluginManager::loadAllPlugins() for ( ; it2 != end; ++it2 ) { // Protocols are loaded automatically so they aren't always in Plugins group. (fixes bug 167113) - if ( (*it2)->category() == TQString::tqfromLatin1( "Protocols" ) ) + if ( (*it2)->category() == TQString::fromLatin1( "Protocols" ) ) continue; TQString pluginName = (*it2)->pluginName(); @@ -343,10 +343,10 @@ Plugin * PluginManager::loadPlugin( const TQString &_pluginId, PluginLoadMode mo // Try to find legacy code // FIXME: Find any cases causing this, remove them, and remove this too - Richard - if ( pluginId.endsWith( TQString::tqfromLatin1( ".desktop" ) ) ) + if ( pluginId.endsWith( TQString::fromLatin1( ".desktop" ) ) ) { kdWarning( 14010 ) << "Trying to use old-style API!" << endl << kdBacktrace() << endl; - pluginId = pluginId.remove( TQRegExp( TQString::tqfromLatin1( ".desktop$" ) ) ); + pluginId = pluginId.remove( TQRegExp( TQString::fromLatin1( ".desktop$" ) ) ); } if ( mode == LoadSync ) @@ -376,8 +376,8 @@ Plugin *PluginManager::loadPluginInternal( const TQString &pluginId ) return d->loadedPlugins[ info ]; int error = 0; - Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Plugin>( TQString::tqfromLatin1( "Kopete/Plugin" ), - TQString::tqfromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).tqarg( pluginId ), this, 0, TQStringList(), &error ); + Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery<Plugin>( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).tqarg( pluginId ), this, 0, TQStringList(), &error ); if ( plugin ) { @@ -471,8 +471,8 @@ Plugin* PluginManager::plugin( const TQString &_pluginId ) const // FIXME: In the future we'll need to change this nevertheless to unify // the handling - Martijn TQString pluginId = _pluginId; - if ( pluginId.endsWith( TQString::tqfromLatin1( "Protocol" ) ) ) - pluginId = TQString::tqfromLatin1( "kopete_" ) + _pluginId.lower().remove( TQString::tqfromLatin1( "protocol" ) ); + if ( pluginId.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + pluginId = TQString::fromLatin1( "kopete_" ) + _pluginId.lower().remove( TQString::fromLatin1( "protocol" ) ); // End hack KPluginInfo *info = infoForPluginId( pluginId ); @@ -506,13 +506,13 @@ bool PluginManager::setPluginEnabled( const TQString &_pluginId, bool enabled /* config->setGroup( "Plugins" ); // FIXME: What is this for? This sort of thing is kconf_update's job - Richard - if ( !pluginId.startsWith( TQString::tqfromLatin1( "kopete_" ) ) ) - pluginId.prepend( TQString::tqfromLatin1( "kopete_" ) ); + if ( !pluginId.startsWith( TQString::fromLatin1( "kopete_" ) ) ) + pluginId.prepend( TQString::fromLatin1( "kopete_" ) ); if ( !infoForPluginId( pluginId ) ) return false; - config->writeEntry( pluginId + TQString::tqfromLatin1( "Enabled" ), enabled ); + config->writeEntry( pluginId + TQString::fromLatin1( "Enabled" ), enabled ); config->sync(); return true; diff --git a/kopete/libkopete/kopeteprefs.cpp b/kopete/libkopete/kopeteprefs.cpp index 644ded69..58ca4b60 100644 --- a/kopete/libkopete/kopeteprefs.cpp +++ b/kopete/libkopete/kopeteprefs.cpp @@ -90,7 +90,7 @@ void KopetePrefs::load() mBgOverride = config->readBoolEntry("ChatView Override Background", false); mFgOverride = config->readBoolEntry("ChatView Override Foreground", false); mRtfOverride = config->readBoolEntry("ChatView Override RTF", false); - mInterfacePreference = config->readEntry("View Plugin", TQString::tqfromLatin1("kopete_chatwindow") ); + mInterfacePreference = config->readEntry("View Plugin", TQString::fromLatin1("kopete_chatwindow") ); tmpColor = KGlobalSettings::textColor(); mTextColor = config->readColorEntry("Text Color", &tmpColor ); tmpColor = KGlobalSettings::baseColor(); @@ -112,29 +112,29 @@ void KopetePrefs::load() if(mToolTipContents.empty()) { mToolTipContents - << TQString::tqfromLatin1("FormattedName") - << TQString::tqfromLatin1("userInfo") - << TQString::tqfromLatin1("server") - << TQString::tqfromLatin1("channels") - << TQString::tqfromLatin1("FormattedIdleTime") - << TQString::tqfromLatin1("channelMembers") - << TQString::tqfromLatin1("channelTopic") - << TQString::tqfromLatin1("emailAddress") - << TQString::tqfromLatin1("homePage") - << TQString::tqfromLatin1("onlineSince") - << TQString::tqfromLatin1("lastOnline") - << TQString::tqfromLatin1("awayMessage"); + << TQString::fromLatin1("FormattedName") + << TQString::fromLatin1("userInfo") + << TQString::fromLatin1("server") + << TQString::fromLatin1("channels") + << TQString::fromLatin1("FormattedIdleTime") + << TQString::fromLatin1("channelMembers") + << TQString::fromLatin1("channelTopic") + << TQString::fromLatin1("emailAddress") + << TQString::fromLatin1("homePage") + << TQString::fromLatin1("onlineSince") + << TQString::fromLatin1("lastOnline") + << TQString::fromLatin1("awayMessage"); } config->setGroup("ContactList"); setThemeURL(config->readEntry("ThemeURL")); - int n = tqmetaObject()->findProperty( "contactListDisplayMode" ); - TQString value = config->readEntry("DisplayMode",TQString::tqfromLatin1("Default")); - mContactListDisplayMode = (ContactDisplayMode)tqmetaObject()->property( n )->keyToValue( value.latin1() ); - n = tqmetaObject()->findProperty( "contactListIconMode" ); + int n = metaObject()->findProperty( "contactListDisplayMode" ); + TQString value = config->readEntry("DisplayMode",TQString::fromLatin1("Default")); + mContactListDisplayMode = (ContactDisplayMode)metaObject()->property( n )->keyToValue( value.latin1() ); + n = metaObject()->findProperty( "contactListIconMode" ); value = config->readEntry("IconMode", - TQString::tqfromLatin1("IconDefault")); - mContactListIconMode = (IconDisplayMode) tqmetaObject()->property( n )->keyToValue( value.latin1() ); + TQString::fromLatin1("IconDefault")); + mContactListIconMode = (IconDisplayMode) metaObject()->property( n )->keyToValue( value.latin1() ); mContactListIndentContacts = config->readBoolEntry("IndentContacts", false); mContactListUseCustomFonts = config->readBoolEntry("UseCustomFonts", false); TQFont font = KGlobalSettings::generalFont(); @@ -229,10 +229,10 @@ void KopetePrefs::save() config->setGroup("ContactList"); config->writeEntry("ThemeURL", mThemeURL); - int n = tqmetaObject()->findProperty( "contactListDisplayMode" ); - config->writeEntry("DisplayMode", tqmetaObject()->property( n )->valueToKey( mContactListDisplayMode )); - n = tqmetaObject()->findProperty( "contactListIconMode" ); - config->writeEntry("IconMode", tqmetaObject()->property( n )->valueToKey( mContactListIconMode )); + int n = metaObject()->findProperty( "contactListDisplayMode" ); + config->writeEntry("DisplayMode", metaObject()->property( n )->valueToKey( mContactListDisplayMode )); + n = metaObject()->findProperty( "contactListIconMode" ); + config->writeEntry("IconMode", metaObject()->property( n )->valueToKey( mContactListIconMode )); config->writeEntry("IndentContacts", mContactListIndentContacts); config->writeEntry("UseCustomFonts", mContactListUseCustomFonts); config->writeEntry("GroupFont", mContactListGroupFont); @@ -439,7 +439,7 @@ void KopetePrefs::_setStylePath(const TQString &stylePath) if( !TQFile::exists(stylePath) || stylePath.isEmpty() ) { TQString fallback; - fallback = TQString(TQString::tqfromLatin1("styles/%1/")).tqarg(TQString::tqfromLatin1(KOPETE_DEFAULT_CHATSTYLE)); + fallback = TQString(TQString::fromLatin1("styles/%1/")).tqarg(TQString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); mStylePath = locate("appdata", fallback); } } diff --git a/kopete/libkopete/kopeteprefs.h b/kopete/libkopete/kopeteprefs.h index e27eff55..5d1c1700 100644 --- a/kopete/libkopete/kopeteprefs.h +++ b/kopete/libkopete/kopeteprefs.h @@ -101,7 +101,7 @@ public: int chatWindowPolicy() const { return mChatWindowPolicy; } //Styles - TQString defaultTheme() const { return TQString::tqfromLatin1("Default"); } + TQString defaultTheme() const { return TQString::fromLatin1("Default"); } //for Adium (xhtml+css) TQString stylePath() const { return mStylePath; } TQString styleVariant() const { return mStyleVariant; } diff --git a/kopete/libkopete/kopeteprotocol.cpp b/kopete/libkopete/kopeteprotocol.cpp index d6910ebd..89b4f919 100644 --- a/kopete/libkopete/kopeteprotocol.cpp +++ b/kopete/libkopete/kopeteprotocol.cpp @@ -47,7 +47,7 @@ public: ContactPropertyTmpl mStickLastSeen; ContactPropertyTmpl mStickFullName; - Kopete::OnlineStatus accountNotConnectedtqStatus; + Kopete::OnlineStatus accountNotConnectedStatus; }; Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) @@ -58,7 +58,7 @@ Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) d->mStickFullName = Global::Properties::self()->fullName(); d->unloading = false; d->capabilities = 0; - d->accountNotConnectedtqStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, TQString::tqfromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); + d->accountNotConnectedStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, TQString::fromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); } Protocol::~Protocol() @@ -87,9 +87,9 @@ void Protocol::setCapabilities( unsigned int capabilities ) } -Kopete::OnlineStatus Protocol::accountOfflinetqStatus() const +Kopete::OnlineStatus Protocol::accountOfflineStatus() const { - return d->accountNotConnectedtqStatus; + return d->accountNotConnectedStatus; } void Protocol::slotAccountOnlineStatusChanged( Contact *self ) @@ -174,11 +174,11 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // Preset the contactId and displayName, if the plugin doesn't want to save // them, or use its own format, it can call clear() on the provided list - sd[ TQString::tqfromLatin1( "contactId" ) ] = c->contactId(); + sd[ TQString::fromLatin1( "contactId" ) ] = c->contactId(); //TODO(nick) remove - sd[ TQString::tqfromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); + sd[ TQString::fromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); if(c->account()) - sd[ TQString::tqfromLatin1( "accountId" ) ] = c->account()->accountId(); + sd[ TQString::fromLatin1( "accountId" ) ] = c->account()->accountId(); // If there's an index field preset it too TQString index = c->protocol()->addressBookIndexField(); @@ -226,13 +226,13 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // we can devise a better API, but with the constantly changing // requirements every time I learn more about kabc I'd better no touch // the API yet - Martijn - if( it.key().startsWith( TQString::tqfromLatin1( "messaging/" ) ) ) + if( it.key().startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - metaContact->setAddressBookField( this, it.key(), TQString::tqfromLatin1( "All" ), it.data() ); + metaContact->setAddressBookField( this, it.key(), TQString::fromLatin1( "All" ), it.data() ); // kdDebug(14010) << k_funcinfo << "metaContact->setAddressBookField( " << this << ", " << it.key() << ", \"All\", " << it.data() << " );" << endl; } else - metaContact->setAddressBookField( this, TQString::tqfromLatin1( "kopete" ), it.key(), it.data() ); + metaContact->setAddressBookField( this, TQString::fromLatin1( "kopete" ), it.key(), it.data() ); } } @@ -250,7 +250,7 @@ void Protocol::deserialize( MetaContact *metaContact, const TQMap<TQString, TQSt serializedDataIterators[ it.key() ] = serializedData[ it.key() ].begin(); } - uint count = serializedData[TQString::tqfromLatin1("contactId")].count(); + uint count = serializedData[TQString::fromLatin1("contactId")].count(); // Prepare the independent entries to pass to the plugin's implementation for( uint i = 0; i < count ; i++ ) @@ -263,11 +263,11 @@ void Protocol::deserialize( MetaContact *metaContact, const TQMap<TQString, TQSt ++( serializedDataIt.data() ); } - const TQString& accountId=sd[ TQString::tqfromLatin1( "accountId" ) ]; + const TQString& accountId=sd[ TQString::fromLatin1( "accountId" ) ]; // myself was allowed in the contactlist in old version of kopete. // But if one keep it on the contactlist now, it may conflict witht he myself metacontact. // So ignore it - if(accountId == sd[ TQString::tqfromLatin1( "contactId" ) ] ) + if(accountId == sd[ TQString::fromLatin1( "contactId" ) ] ) { kdDebug( 14010 ) << k_funcinfo << "Myself contact was on the contactlist.xml for account " << accountId << ". Ignore it" << endl; continue; @@ -290,10 +290,10 @@ void Protocol::deserialize( MetaContact *metaContact, const TQMap<TQString, TQSt // hack in the serialize code. // Once this code is actually capable of talking to kabc this hack // should be removed ASAP! - Martijn - if( ( *fieldIt ).startsWith( TQString::tqfromLatin1( "messaging/" ) ) ) - ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, TQString::tqfromLatin1( "All" ) ); + if( ( *fieldIt ).startsWith( TQString::fromLatin1( "messaging/" ) ) ) + ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, TQString::fromLatin1( "All" ) ); else - ad[ *fieldIt ] = metaContact->addressBookField( this, TQString::tqfromLatin1( "kopete" ), *fieldIt ); + ad[ *fieldIt ] = metaContact->addressBookField( this, TQString::fromLatin1( "kopete" ), *fieldIt ); } // Check if we have an account id. If not we're deserializing a Kopete 0.6 contact @@ -305,7 +305,7 @@ void Protocol::deserialize( MetaContact *metaContact, const TQMap<TQString, TQSt TQDict<Account> accounts = AccountManager::self()->accounts( this ); if ( accounts.count() > 0 ) { - sd[ TQString::tqfromLatin1( "accountId" ) ] = TQDictIterator<Account>( accounts ).currentKey(); + sd[ TQString::fromLatin1( "accountId" ) ] = TQDictIterator<Account>( accounts ).currentKey(); } else { diff --git a/kopete/libkopete/kopeteprotocol.h b/kopete/libkopete/kopeteprotocol.h index 6160650a..e2e3f16a 100644 --- a/kopete/libkopete/kopeteprotocol.h +++ b/kopete/libkopete/kopeteprotocol.h @@ -153,7 +153,7 @@ public: /** * @brief Returns the status used for contacts when accounts of this protocol are offline */ - Kopete::OnlineStatus accountOfflinetqStatus() const; + Kopete::OnlineStatus accountOfflineStatus() const; protected: diff --git a/kopete/libkopete/kopetetransfermanager.cpp b/kopete/libkopete/kopetetransfermanager.cpp index 9357118f..3f7a9358 100644 --- a/kopete/libkopete/kopetetransfermanager.cpp +++ b/kopete/libkopete/kopetetransfermanager.cpp @@ -84,11 +84,11 @@ Kopete::Transfer::~Transfer() KURL Kopete::Transfer::displayURL( const Kopete::Contact *contact, const TQString &file ) { KURL url; - url.setProtocol( TQString::tqfromLatin1("kopete") ); + url.setProtocol( TQString::fromLatin1("kopete") ); TQString host; if( !contact ) - host = TQString::tqfromLatin1("unknown origin"); + host = TQString::fromLatin1("unknown origin"); else if( contact->metaContact() ) host = contact->metaContact()->displayName(); else @@ -234,7 +234,7 @@ void Kopete::TransferManager::sendFile( const KURL &file, const TQString &fname, //If the file location is null, then get it from a file open dialog if( !url.isValid() ) - url = KFileDialog::getOpenURL( TQString(), TQString::tqfromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); + url = KFileDialog::getOpenURL( TQString(), TQString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); else { filename = fname; diff --git a/kopete/libkopete/kopeteutils.cpp b/kopete/libkopete/kopeteutils.cpp index b06082ee..6fe46529 100644 --- a/kopete/libkopete/kopeteutils.cpp +++ b/kopete/libkopete/kopeteutils.cpp @@ -69,7 +69,7 @@ void notifyConnectionLost( const Account *account, const TQString &caption, cons if (!account) return; - notify( account->accountIcon(32), TQString::tqfromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); } bool isHostReachable(const TQString &host) @@ -98,7 +98,7 @@ void notifyCannotConnect( const Account *account, const TQString &explanation, c if (!account) return; - notify( account->accountIcon(), TQString::tqfromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); + notify( account->accountIcon(), TQString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); } void notifyConnectionError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) @@ -107,7 +107,7 @@ void notifyConnectionError( const Account *account, const TQString &caption, con return; // TODO: Display a specific default connection error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), TQString::tqfromLatin1("connection_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); } void notifyServerError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) @@ -116,7 +116,7 @@ void notifyServerError( const Account *account, const TQString &caption, const T return; // TODO: Display a specific default server error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), TQString::tqfromLatin1("server_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("server_error"), caption, message, explanation, debugInfo); } } // end ns ErrorNotifier diff --git a/kopete/libkopete/kopetewalletmanager.cpp b/kopete/libkopete/kopetewalletmanager.cpp index b7796abc..f17c73b8 100644 --- a/kopete/libkopete/kopetewalletmanager.cpp +++ b/kopete/libkopete/kopetewalletmanager.cpp @@ -87,7 +87,7 @@ void Kopete::WalletManager::openWalletInner() // do we already have a wallet? if ( d->wallet ) { - // if the wallet isn't open yet, we're pending a slotWalletChangedtqStatus + // if the wallet isn't open yet, we're pending a slotWalletChangedStatus // anyway, so we don't set up a single shot. if ( d->wallet->isOpen() ) { @@ -107,19 +107,19 @@ void Kopete::WalletManager::openWalletInner() d->wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), mainWindowID(), KWallet::Wallet::Asynchronous ); - connect( d->wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( slotWalletChangedtqStatus() ) ); + connect( d->wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( slotWalletChangedStatus() ) ); } -void Kopete::WalletManager::slotWalletChangedtqStatus() +void Kopete::WalletManager::slotWalletChangedStatus() { kdDebug(14010) << k_funcinfo << " isOpen: " << d->wallet->isOpen() << endl; if( d->wallet->isOpen() ) { - if ( !d->wallet->hasFolder( TQString::tqfromLatin1( "Kopete" ) ) ) - d->wallet->createFolder( TQString::tqfromLatin1( "Kopete" ) ); + if ( !d->wallet->hasFolder( TQString::fromLatin1( "Kopete" ) ) ) + d->wallet->createFolder( TQString::fromLatin1( "Kopete" ) ); - if ( d->wallet->setFolder( TQString::tqfromLatin1( "Kopete" ) ) ) + if ( d->wallet->setFolder( TQString::fromLatin1( "Kopete" ) ) ) { // success! TQObject::connect( d->wallet, TQT_SIGNAL( walletClosed() ), this, TQT_SLOT( closeWallet() ) ); diff --git a/kopete/libkopete/kopetewalletmanager.h b/kopete/libkopete/kopetewalletmanager.h index 05680b17..83fcefc8 100644 --- a/kopete/libkopete/kopetewalletmanager.h +++ b/kopete/libkopete/kopetewalletmanager.h @@ -80,7 +80,7 @@ private slots: * * Causes walletOpened to be emitted. */ - void slotWalletChangedtqStatus(); + void slotWalletChangedStatus(); /** * Called by a singleShot timer in the event that we are asked for a diff --git a/kopete/libkopete/managedconnectionaccount.cpp b/kopete/libkopete/managedconnectionaccount.cpp index c7ca976e..7d2d02f6 100644 --- a/kopete/libkopete/managedconnectionaccount.cpp +++ b/kopete/libkopete/managedconnectionaccount.cpp @@ -27,45 +27,45 @@ namespace Kopete ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength, const char *name ) : PasswordedAccount( parent, acctId, maxPasswordLength, name ), m_waitingForConnection( false ) { - TQObject::connect( ConnectionManager::self(), TQT_SIGNAL(statusChanged(const TQString&, NetworktqStatus::EnumtqStatus ) ), - TQT_SLOT(slotConnectionStatusChanged(const TQString&, NetworktqStatus::EnumtqStatus ) ) ); + TQObject::connect( ConnectionManager::self(), TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus ) ), + TQT_SLOT(slotConnectionStatusChanged(const TQString&, NetworkStatus::EnumStatus ) ) ); } void ManagedConnectionAccount::connectWithPassword( const TQString &password ) { m_password = password; - NetworktqStatus::EnumtqStatus status = ConnectionManager::self()->status( TQString() ); - if ( status == NetworktqStatus::NoNetworks ) + NetworkStatus::EnumStatus status = ConnectionManager::self()->status( TQString() ); + if ( status == NetworkStatus::NoNetworks ) performConnectWithPassword( password ); else { m_waitingForConnection = true; // need to adapt libkopete so we know the hostname in this class and whether the connection was user initiated // for now, these are the default parameters to always bring up a connection to "the internet". - NetworktqStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), TQString(), true ); - if ( response == NetworktqStatus::Connected ) + NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), TQString(), true ); + if ( response == NetworkStatus::Connected ) { m_waitingForConnection = false; performConnectWithPassword( password ); } - else if ( response == NetworktqStatus::UserRefused || response == NetworktqStatus::Unavailable ) + else if ( response == NetworkStatus::UserRefused || response == NetworkStatus::Unavailable ) disconnect(); } } -void ManagedConnectionAccount::slotConnectionStatusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status ) +void ManagedConnectionAccount::slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ) { Q_UNUSED(host); // as above, we didn't register a hostname, so treat any connection as our own. - if ( m_waitingForConnection && ( status == NetworktqStatus::Online || status == NetworktqStatus::NoNetworks ) ) + if ( m_waitingForConnection && ( status == NetworkStatus::Online || status == NetworkStatus::NoNetworks ) ) { m_waitingForConnection = false; performConnectWithPassword( m_password ); } - else if ( isConnected() && ( status == NetworktqStatus::Offline - || status == NetworktqStatus::ShuttingDown - || status == NetworktqStatus::OfflineDisconnected - || status == NetworktqStatus::OfflineFailed ) ) + else if ( isConnected() && ( status == NetworkStatus::Offline + || status == NetworkStatus::ShuttingDown + || status == NetworkStatus::OfflineDisconnected + || status == NetworkStatus::OfflineFailed ) ) disconnect(); } diff --git a/kopete/libkopete/managedconnectionaccount.h b/kopete/libkopete/managedconnectionaccount.h index a27bd7cd..755fbf71 100644 --- a/kopete/libkopete/managedconnectionaccount.h +++ b/kopete/libkopete/managedconnectionaccount.h @@ -27,7 +27,7 @@ namespace Kopete class Protocol; /** - * A ManagedConnectionAccount queries the NetworktqStatus KDED Module before trying to connect using + * A ManagedConnectionAccount queries the NetworkStatus KDED Module before trying to connect using * connectwithPassword, starting a network connection if needed. If the network is not available, * it delays calling performConnectWithPassword until it receives notification from the daemon * that the network is up. The account receiveds notifications from the daemon of network failures @@ -69,7 +69,7 @@ class KOPETE_EXPORT ManagedConnectionAccount : public PasswordedAccount * @param host For future expansion. * @param status the new status of the network */ - virtual void slotConnectionStatusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status ); + virtual void slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ); private: TQString m_password; bool m_waitingForConnection; diff --git a/kopete/libkopete/networkstatuscommon.cpp b/kopete/libkopete/networkstatuscommon.cpp index ef6d488e..87c18a14 100644 --- a/kopete/libkopete/networkstatuscommon.cpp +++ b/kopete/libkopete/networkstatuscommon.cpp @@ -1,7 +1,7 @@ #include "networkstatuscommon.h" #include <kdebug.h> -TQDataStream & operator<< ( TQDataStream & s, const NetworktqStatus::Properties p ) +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ) { kdDebug() << k_funcinfo << "status is: " << (int)p.status << endl; s << (int)p.status; @@ -12,14 +12,14 @@ TQDataStream & operator<< ( TQDataStream & s, const NetworktqStatus::Properties return s; } -TQDataStream & operator>> ( TQDataStream & s, NetworktqStatus::Properties &p ) +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ) { int status, onDemandPolicy, internet; s >> status; kdDebug() << k_funcinfo << "status is: " << status << endl; - p.status = ( NetworktqStatus::EnumtqStatus )status; + p.status = ( NetworkStatus::EnumStatus )status; s >> onDemandPolicy; - p.onDemandPolicy = ( NetworktqStatus::EnumOnDemandPolicy )onDemandPolicy; + p.onDemandPolicy = ( NetworkStatus::EnumOnDemandPolicy )onDemandPolicy; s >> p.service; s >> internet; if ( internet ) diff --git a/kopete/libkopete/networkstatuscommon.h b/kopete/libkopete/networkstatuscommon.h index 1d36b5c0..a243be43 100644 --- a/kopete/libkopete/networkstatuscommon.h +++ b/kopete/libkopete/networkstatuscommon.h @@ -3,16 +3,16 @@ #include <tqstringlist.h> -namespace NetworktqStatus +namespace NetworkStatus { - enum EnumtqStatus { NoNetworks = 1, Unreachable, OfflineDisconnected, OfflineFailed, ShuttingDown, Offline, Establishing, Online }; + enum EnumStatus { NoNetworks = 1, Unreachable, OfflineDisconnected, OfflineFailed, ShuttingDown, Offline, Establishing, Online }; enum EnumRequestResult { RequestAccepted = 1, Connected, UserRefused, Unavailable }; enum EnumOnDemandPolicy { All, User, None, Permanent }; struct Properties { TQString name; // status of the network - EnumtqStatus status; + EnumStatus status; // policy for on-demand usage as defined by the service EnumOnDemandPolicy onDemandPolicy; // identifier for the service @@ -23,11 +23,11 @@ namespace NetworktqStatus TQStringList netmasks; // for future expansion consider // EnumChargingModel - FlatRate, TimeCharge, VolumeCharged - // EnumLinktqStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT + // EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT }; } -TQDataStream & operator>> ( TQDataStream & s, NetworktqStatus::Properties &p ); -TQDataStream & operator<< ( TQDataStream & s, const NetworktqStatus::Properties p ); +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ); +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ); #endif diff --git a/kopete/libkopete/private/kopetecommand.cpp b/kopete/libkopete/private/kopetecommand.cpp index f9ae7365..08575fdc 100644 --- a/kopete/libkopete/private/kopetecommand.cpp +++ b/kopete/libkopete/private/kopetecommand.cpp @@ -29,7 +29,7 @@ Kopete::Command::Command( TQObject *parent, const TQString &command, const char* const TQString &help, Kopete::CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) : KAction( command[0].upper() + command.right( command.length() - 1).lower(), pix, cut, parent, - ( command.lower() + TQString::tqfromLatin1("_command") ).latin1() ) + ( command.lower() + TQString::fromLatin1("_command") ).latin1() ) { init( command, handlerSlot, help, type, formatString, minArgs, maxArgs ); } @@ -102,8 +102,8 @@ void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession // Translate %s to the whole string and %n to current nickname - formatString.replace( TQString::tqfromLatin1("%n"), manager->myself()->nickName() ); - formatString.replace( TQString::tqfromLatin1("%s"), args ); + formatString.replace( TQString::fromLatin1("%n"), manager->myself()->nickName() ); + formatString.replace( TQString::fromLatin1("%s"), args ); // Translate %1..%N to word1..wordN @@ -115,7 +115,7 @@ void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession kdDebug(14010) << "New Command after processing alias: " << formatString << endl; - Kopete::CommandHandler::commandHandler()->processMessage( TQString::tqfromLatin1("/") + formatString, manager ); + Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/") + formatString, manager ); } else { diff --git a/kopete/libkopete/private/kopeteemoticons.cpp b/kopete/libkopete/private/kopeteemoticons.cpp index 502504f2..f7fbb373 100644 --- a/kopete/libkopete/private/kopeteemoticons.cpp +++ b/kopete/libkopete/private/kopeteemoticons.cpp @@ -300,14 +300,14 @@ void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList TQString pic; //maybe an extension was given, so try to find the exact file - pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt ); if( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".mng" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".mng" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".png" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".png" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/" ) + filenameNoExt + TQString::tqfromLatin1( ".gif" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".gif" ) ); if( !pic.isNull() ) // only add if we found one file { @@ -328,15 +328,15 @@ void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList // Unless we do so, ChatMessagePart::slotScrollView does not work properly and causing // HTMLPart not to be scrolled to the very last message. p.load( e.picPath ); - result = TQString::tqfromLatin1( "<img align=\"center\" src=\"" ) + + result = TQString::fromLatin1( "<img align=\"center\" src=\"" ) + e.picPath + - TQString::tqfromLatin1( "\" title=\"" ) + + TQString::fromLatin1( "\" title=\"" ) + matchEscaped + - TQString::tqfromLatin1( "\" width=\"" ) + + TQString::fromLatin1( "\" width=\"" ) + TQString::number( p.width() ) + - TQString::tqfromLatin1( "\" height=\"" ) + + TQString::fromLatin1( "\" height=\"" ) + TQString::number( p.height() ) + - TQString::tqfromLatin1( "\" />" ); + TQString::fromLatin1( "\" />" ); e.picHTMLCode = result; e.matchTextEscaped = matchEscaped; @@ -365,10 +365,10 @@ void Emoticons::initEmoticons( const TQString &theme ) d->emoticonAndPicList.clear(); d->emoticonMap.clear(); - TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/emoticons.xml" ) ); + TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/emoticons.xml" ) ); if(!filename.isEmpty()) return initEmoticon_emoticonsxml( filename ); - filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::tqfromLatin1( "/icondef.xml" ) ); + filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/icondef.xml" ) ); if(!filename.isEmpty()) return initEmoticon_JEP0038( filename ); kdWarning(14010) << k_funcinfo << "emotiucon XML theme description not found" <<endl; @@ -376,7 +376,7 @@ void Emoticons::initEmoticons( const TQString &theme ) void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) { - TQDomDocument emoticonMap( TQString::tqfromLatin1( "messaging-emoticon-map" ) ); + TQDomDocument emoticonMap( TQString::fromLatin1( "messaging-emoticon-map" ) ); TQFile mapFile( filename ); mapFile.open( IO_ReadOnly ); @@ -389,10 +389,10 @@ void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) TQDomElement element = node.toElement(); if( !element.isNull() ) { - if( element.tagName() == TQString::tqfromLatin1( "emoticon" ) ) + if( element.tagName() == TQString::fromLatin1( "emoticon" ) ) { TQString emoticon_file = element.attribute( - TQString::tqfromLatin1( "file" ), TQString() ); + TQString::fromLatin1( "file" ), TQString() ); TQStringList items; TQDomNode emoticonNode = node.firstChild(); @@ -401,7 +401,7 @@ void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) TQDomElement emoticonElement = emoticonNode.toElement(); if( !emoticonElement.isNull() ) { - if( emoticonElement.tagName() == TQString::tqfromLatin1( "string" ) ) + if( emoticonElement.tagName() == TQString::fromLatin1( "string" ) ) { items << emoticonElement.text(); } @@ -432,7 +432,7 @@ void Emoticons::initEmoticon_emoticonsxml( const TQString & filename) void Emoticons::initEmoticon_JEP0038( const TQString & filename) { - TQDomDocument emoticonMap( TQString::tqfromLatin1( "icondef" ) ); + TQDomDocument emoticonMap( TQString::fromLatin1( "icondef" ) ); TQFile mapFile( filename ); mapFile.open( IO_ReadOnly ); @@ -445,7 +445,7 @@ void Emoticons::initEmoticon_JEP0038( const TQString & filename) TQDomElement element = node.toElement(); if( !element.isNull() ) { - if( element.tagName() == TQString::tqfromLatin1( "icon" ) ) + if( element.tagName() == TQString::fromLatin1( "icon" ) ) { TQStringList items; TQString emoticon_file; @@ -456,16 +456,16 @@ void Emoticons::initEmoticon_JEP0038( const TQString & filename) TQDomElement emoticonElement = emoticonNode.toElement(); if( !emoticonElement.isNull() ) { - if( emoticonElement.tagName() == TQString::tqfromLatin1( "text" ) ) + if( emoticonElement.tagName() == TQString::fromLatin1( "text" ) ) { //TODO xml:lang items << emoticonElement.text(); } - else if( emoticonElement.tagName() == TQString::tqfromLatin1( "object" ) && emoticon_file.isEmpty() ) + else if( emoticonElement.tagName() == TQString::fromLatin1( "object" ) && emoticon_file.isEmpty() ) { TQString mime= emoticonElement.attribute( - TQString::tqfromLatin1( "mime" ), TQString::tqfromLatin1("image/*") ); - if(mime.startsWith(TQString::tqfromLatin1("image/")) && !mime.endsWith(TQString::tqfromLatin1("/svg+xml"))) + TQString::fromLatin1( "mime" ), TQString::fromLatin1("image/*") ); + if(mime.startsWith(TQString::fromLatin1("image/")) && !mime.endsWith(TQString::fromLatin1("/svg+xml"))) { emoticon_file = emoticonElement.text(); } diff --git a/kopete/libkopete/private/kopeteviewmanager.cpp b/kopete/libkopete/private/kopeteviewmanager.cpp index 7023729c..386106ef 100644 --- a/kopete/libkopete/private/kopeteviewmanager.cpp +++ b/kopete/libkopete/private/kopeteviewmanager.cpp @@ -132,7 +132,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const TQStrin } if( !viewPlugin ) - viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::tqfromLatin1("kopete_chatwindow") ); + viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::fromLatin1("kopete_chatwindow") ); if( viewPlugin ) { @@ -175,7 +175,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi // append msg event to queue if chat window is active but not the chat view in it... appendMessageEvent = appendMessageEvent && !(w->isActiveWindow() && manager->view() == d->activeView); // ...and chat window is on another desktop - appendMessageEvent = appendMessageEvent && (!d->queueOnlyMessagesOnAnotherDesktop || !KWin::windowInfo( w->tqtopLevelWidget()->winId(), NET::WMDesktop ).isOnCurrentDesktop()); + appendMessageEvent = appendMessageEvent && (!d->queueOnlyMessagesOnAnotherDesktop || !KWin::windowInfo( w->topLevelWidget()->winId(), NET::WMDesktop ).isOnCurrentDesktop()); } else { @@ -219,7 +219,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi TQString msgText = msg.plainBody(); if( msgText.length() > 90 ) - msgText = msgText.left(88) + TQString::tqfromLatin1("..."); + msgText = msgText.left(88) + TQString::fromLatin1("..."); TQString event; TQString body =i18n( "<qt>Incoming message from %1<br>\"%2\"</qt>" ); @@ -227,14 +227,14 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi switch( msg.importance() ) { case Kopete::Message::Low: - event = TQString::tqfromLatin1( "kopete_contact_lowpriority" ); + event = TQString::fromLatin1( "kopete_contact_lowpriority" ); break; case Kopete::Message::Highlight: - event = TQString::tqfromLatin1( "kopete_contact_highlight" ); + event = TQString::fromLatin1( "kopete_contact_highlight" ); body = i18n( "<qt>A highlighted message arrived from %1<br>\"%2\"</qt>" ); break; default: - event = TQString::tqfromLatin1( "kopete_contact_incoming" ); + event = TQString::fromLatin1( "kopete_contact_incoming" ); } KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.tqarg( TQStyleSheet::escape(msgFrom), TQStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ w , i18n("View") ); diff --git a/kopete/libkopete/tests/kopetecontactlist_test.cpp b/kopete/libkopete/tests/kopetecontactlist_test.cpp index 3ac1b34a..5e43126d 100644 --- a/kopete/libkopete/tests/kopetecontactlist_test.cpp +++ b/kopete/libkopete/tests/kopetecontactlist_test.cpp @@ -36,7 +36,7 @@ void KopeteContactList_Test::testSomething() // change user data dir to avoid messing with user's .kde dir setenv( "TDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); - TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( ! filename.isEmpty() ) { // previous test run, delete the previous contact list diff --git a/kopete/libkopete/tests/kopeteemoticontest.cpp b/kopete/libkopete/tests/kopeteemoticontest.cpp index 1f3fd436..50c023d9 100644 --- a/kopete/libkopete/tests/kopeteemoticontest.cpp +++ b/kopete/libkopete/tests/kopeteemoticontest.cpp @@ -62,7 +62,7 @@ void KopeteEmoticonTest::allTests() void KopeteEmoticonTest::testEmoticonParser() { Kopete::Emoticons emo("Default"); - TQString basePath = TQString::tqfromLatin1( SRCDIR ) + TQString::tqfromLatin1("/emoticon-parser-testcases"); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/emoticon-parser-testcases"); TQDir testCasesDir(basePath); TQStringList inputFileNames = testCasesDir.entryList("*.input"); @@ -73,8 +73,8 @@ void KopeteEmoticonTest::testEmoticonParser() TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - TQFile inputFile(basePath + TQString::tqfromLatin1("/") + fileName); - TQFile expectedFile(basePath + TQString::tqfromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -102,11 +102,11 @@ void KopeteEmoticonTest::testEmoticonParser() // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + TQString::tqfromLatin1(": ") + result; - expectedData = fileName + TQString::tqfromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == TQString::tqfromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetemessage_test.cpp b/kopete/libkopete/tests/kopetemessage_test.cpp index 293da6b9..90216979 100644 --- a/kopete/libkopete/tests/kopetemessage_test.cpp +++ b/kopete/libkopete/tests/kopetemessage_test.cpp @@ -57,8 +57,8 @@ KopeteMessage_Test::KopeteMessage_Test() m_account = new Kopete::Test::Mock::Account(m_protocol, "testaccount"); m_metaContactMyself = new Kopete::Test::Mock::MetaContact(); m_metaContactOther = new Kopete::Test::Mock::MetaContact(); - m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::tqfromLatin1("test-myself"), m_metaContactMyself, TQString()); - m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::tqfromLatin1("test-dest"), m_metaContactOther, TQString()); + m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-myself"), m_metaContactMyself, TQString()); + m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-dest"), m_metaContactOther, TQString()); m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString(), Kopete::Message::Outbound, Kopete::Message::PlainText); } @@ -251,7 +251,7 @@ void KopeteMessage_Test::setup() void KopeteMessage_Test::testLinkParser() { - TQString basePath = TQString::tqfromLatin1( SRCDIR ) + TQString::tqfromLatin1("/link-parser-testcases"); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/link-parser-testcases"); TQDir testCasesDir(basePath); TQStringList inputFileNames = testCasesDir.entryList("*.input"); @@ -261,8 +261,8 @@ void KopeteMessage_Test::testLinkParser() TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - TQFile inputFile(basePath + TQString::tqfromLatin1("/") + fileName); - TQFile expectedFile(basePath + TQString::tqfromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -288,7 +288,7 @@ void KopeteMessage_Test::testLinkParser() // set message format for parsing according to textcase filename convention Kopete::Message::MessageFormat format; - if ( fileName.section("-", 1, 1) == TQString::tqfromLatin1("plaintext") ) + if ( fileName.section("-", 1, 1) == TQString::fromLatin1("plaintext") ) format = Kopete::Message::PlainText; else format = Kopete::Message::RichText; @@ -298,11 +298,11 @@ void KopeteMessage_Test::testLinkParser() // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + TQString::tqfromLatin1(": ") + result; - expectedData = fileName + TQString::tqfromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == TQString::tqfromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { //kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetepropertiestest.cpp b/kopete/libkopete/tests/kopetepropertiestest.cpp index 736bd2f8..76b8ae79 100644 --- a/kopete/libkopete/tests/kopetepropertiestest.cpp +++ b/kopete/libkopete/tests/kopetepropertiestest.cpp @@ -51,8 +51,8 @@ void KopetePropertiesTest::allTests() { PropertyHost myPropertyHost; CHECK( myPropertyHost.property(fooProperty).isNull(), true); - myPropertyHost.setProperty( fooProperty, TQString::tqfromLatin1("Foo!") ); - CHECK( myPropertyHost.property(fooProperty), TQString::tqfromLatin1("Foo!") ); + myPropertyHost.setProperty( fooProperty, TQString::fromLatin1("Foo!") ); + CHECK( myPropertyHost.property(fooProperty), TQString::fromLatin1("Foo!") ); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.cpp b/kopete/libkopete/tests/kopetewallettest_program.cpp index b6eaf635..84a7d252 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.cpp +++ b/kopete/libkopete/tests/kopetewallettest_program.cpp @@ -76,9 +76,9 @@ int main( int argc, char *argv[] ) { TQString arg = args->arg( i ); _out << "Processing " << arg << endl; - if( arg == TQString::tqfromLatin1( "open" ) ) openWalletAsync(); - if( arg == TQString::tqfromLatin1( "close" ) ) closeWallet(); - if( arg == TQString::tqfromLatin1( "delay" ) ) delay(); + if( arg == TQString::fromLatin1( "open" ) ) openWalletAsync(); + if( arg == TQString::fromLatin1( "close" ) ) closeWallet(); + if( arg == TQString::fromLatin1( "delay" ) ) delay(); _out << "Done." << endl; } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp index d6268628..8beb6e81 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp @@ -41,7 +41,7 @@ bool Account::createContact( const TQString &contactId, Kopete::MetaContact *par return true; } -void Account::connect( const Kopete::OnlineStatus& initialtqStatus) +void Account::connect( const Kopete::OnlineStatus& initialStatus) { // do nothing } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.h b/kopete/libkopete/tests/mock/kopeteaccount_mock.h index 43686ef2..be4f281e 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.h +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.h @@ -40,7 +40,7 @@ public: ~Account(); // pure virtual functions implementation virtual bool createContact( const TQString &contactId, MetaContact *parentContact ); - virtual void connect( const Kopete::OnlineStatus& initialtqStatus = OnlineStatus() ); + virtual void connect( const Kopete::OnlineStatus& initialStatus = OnlineStatus() ); virtual void disconnect(); virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString() ); }; diff --git a/kopete/libkopete/ui/accountselector.cpp b/kopete/libkopete/ui/accountselector.cpp index 3a9b94ff..345e9ab4 100644 --- a/kopete/libkopete/ui/accountselector.cpp +++ b/kopete/libkopete/ui/accountselector.cpp @@ -95,7 +95,7 @@ void AccountSelector::initUI() (new TQVBoxLayout(this))->setAutoAdd(true); d->lv = new KListView(this); d->lv->setFullWidth(true); - d->lv->addColumn(TQString::tqfromLatin1("")); + d->lv->addColumn(TQString::fromLatin1("")); d->lv->header()->hide(); if(d->proto != 0) diff --git a/kopete/libkopete/ui/addressbooklinkwidget.cpp b/kopete/libkopete/ui/addressbooklinkwidget.cpp index f12e7116..5de3a023 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.cpp +++ b/kopete/libkopete/ui/addressbooklinkwidget.cpp @@ -40,7 +40,7 @@ namespace UI { AddressBookLinkWidget::AddressBookLinkWidget( TQWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) { - btnClear->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? TQString::tqfromLatin1( "locationbar_erase" ) : TQString::tqfromLatin1( "clear_left") ) ); + btnClear->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? TQString::fromLatin1( "locationbar_erase" ) : TQString::fromLatin1( "clear_left") ) ); connect( btnClear, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearAddressee() ) ); connect( btnSelectAddressee, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddressee() ) ); } diff --git a/kopete/libkopete/ui/addressbookselectorwidget.cpp b/kopete/libkopete/ui/addressbookselectorwidget.cpp index 710d56f1..7b6fc27f 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.cpp +++ b/kopete/libkopete/ui/addressbookselectorwidget.cpp @@ -74,7 +74,7 @@ AddressBookSelectorWidget::AddressBookSelectorWidget( TQWidget *parent, const ch //We should add a clear KAction here. But we can't really do that with a designer file :\ this sucks - addresseeListView->setColumnText(2, SmallIconSet(TQString::tqfromLatin1("email")), i18n("Email")); + addresseeListView->setColumnText(2, SmallIconSet(TQString::fromLatin1("email")), i18n("Email")); kListViewSearchLine->setListView(addresseeListView); slotLoadAddressees(); diff --git a/kopete/libkopete/ui/addressbookselectorwidget_base.ui b/kopete/libkopete/ui/addressbookselectorwidget_base.ui index 276620be..4c3993e0 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget_base.ui +++ b/kopete/libkopete/ui/addressbookselectorwidget_base.ui @@ -40,7 +40,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>405</width> <height>20</height> diff --git a/kopete/libkopete/ui/addresseeitem.cpp b/kopete/libkopete/ui/addresseeitem.cpp index 55b58068..9fa9f023 100644 --- a/kopete/libkopete/ui/addresseeitem.cpp +++ b/kopete/libkopete/ui/addresseeitem.cpp @@ -49,7 +49,7 @@ TQString AddresseeItem::key( int column, bool ) const { if (column == Email) { TQString value = text(Email); - TQRegExp emailRe(TQString::tqfromLatin1("<\\S*>")); + TQRegExp emailRe(TQString::fromLatin1("<\\S*>")); int match = emailRe.search(value); if (match > -1) value = value.mid(match + 1, emailRe.matchedLength() - 2); diff --git a/kopete/libkopete/ui/contactaddednotifydialog.cpp b/kopete/libkopete/ui/contactaddednotifydialog.cpp index e5fd81b4..018baf7a 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.cpp +++ b/kopete/libkopete/ui/contactaddednotifydialog.cpp @@ -71,9 +71,9 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const TQString& contactId, d->account=account; d->contactId=contactId; d->widget->m_label->setText(i18n("<qt><img src=\"kopete-account-icon:%1\" /> The contact <b>%2</b> has added you to his/her contactlist. (Account %3)</qt>") - .tqarg( KURL::encode_string( account->protocol()->pluginId() ) + TQString::tqfromLatin1(":") + .tqarg( KURL::encode_string( account->protocol()->pluginId() ) + TQString::fromLatin1(":") + KURL::encode_string( account->accountId() ) , - contactNick.isEmpty() ? contactId : contactNick + TQString::tqfromLatin1(" < ") + contactId + TQString::tqfromLatin1(" >") , + contactNick.isEmpty() ? contactId : contactNick + TQString::fromLatin1(" < ") + contactId + TQString::fromLatin1(" >") , account->accountLabel() ) ); if( hide & InfoButton) d->widget->m_infoButton->hide() ; diff --git a/kopete/libkopete/ui/contactaddednotifywidget.ui b/kopete/libkopete/ui/contactaddednotifywidget.ui index 100e6eca..80390486 100644 --- a/kopete/libkopete/ui/contactaddednotifywidget.ui +++ b/kopete/libkopete/ui/contactaddednotifywidget.ui @@ -46,7 +46,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>151</width> <height>20</height> @@ -199,7 +199,7 @@ Leave it empty if you want to see the contact nickname as display name.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>51</width> <height>20</height> @@ -225,7 +225,7 @@ Leave it empty if you want to see the contact nickname as display name.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>21</width> <height>40</height> diff --git a/kopete/libkopete/ui/fileconfirmbase.ui b/kopete/libkopete/ui/fileconfirmbase.ui index cd91863d..490d2a7f 100644 --- a/kopete/libkopete/ui/fileconfirmbase.ui +++ b/kopete/libkopete/ui/fileconfirmbase.ui @@ -99,7 +99,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/kopete/libkopete/ui/kopeteawaydialogbase.ui b/kopete/libkopete/ui/kopeteawaydialogbase.ui index be81b276..45b34aa2 100644 --- a/kopete/libkopete/ui/kopeteawaydialogbase.ui +++ b/kopete/libkopete/ui/kopeteawaydialogbase.ui @@ -44,7 +44,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>300</width> <height>0</height> @@ -72,7 +72,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>40</height> diff --git a/kopete/libkopete/ui/kopetecontactaction.cpp b/kopete/libkopete/ui/kopetecontactaction.cpp index 6492d1c0..cc6754d2 100644 --- a/kopete/libkopete/ui/kopetecontactaction.cpp +++ b/kopete/libkopete/ui/kopetecontactaction.cpp @@ -23,7 +23,7 @@ KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const TQObject *receiver, const char *slot, KAction *parent ) -: KAction( contact->metaContact()->displayName(), TQIconSet( contact->onlinetqStatus().iconFor( contact ) ), KShortcut(), +: KAction( contact->metaContact()->displayName(), TQIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), parent, contact->contactId().latin1() ) { m_contact = contact; diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp index fc9310fa..33b54c4d 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp @@ -40,15 +40,15 @@ KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo m_emited=false; m_view=new FileConfirmBase(this, "FileConfirmView"); - m_view->m_from->setText( info.contact()->metaContact()->displayName() + TQString::tqfromLatin1( " <" ) + - info.contact()->contactId() + TQString::tqfromLatin1( "> " ) ); + m_view->m_from->setText( info.contact()->metaContact()->displayName() + TQString::fromLatin1( " <" ) + + info.contact()->contactId() + TQString::fromLatin1( "> " ) ); m_view->m_size->setText( KGlobal::locale()->formatNumber( long( info.size() ), 0 ) ); m_view->m_description->setText( description ); m_view->m_filename->setText( info.file() ); KGlobal::config()->setGroup("File Transfer"); const TQString defaultPath=KGlobal::config()->readEntry("defaultPath" , TQDir::homeDirPath() ); - m_view->m_saveto->setText(defaultPath + TQString::tqfromLatin1( "/" ) + info.file() ); + m_view->m_saveto->setText(defaultPath + TQString::fromLatin1( "/" ) + info.file() ); setMainWidget(m_view); @@ -61,7 +61,7 @@ KopeteFileConfirmDialog::~KopeteFileConfirmDialog() void KopeteFileConfirmDialog::slotBrowsePressed() { - TQString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), TQString::tqfromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); + TQString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), TQString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); if ( !saveFileName.isNull()) { m_view->m_saveto->setText(saveFileName); diff --git a/kopete/libkopete/ui/kopetelistview.cpp b/kopete/libkopete/ui/kopetelistview.cpp index cf1fae01..42c01981 100644 --- a/kopete/libkopete/ui/kopetelistview.cpp +++ b/kopete/libkopete/ui/kopetelistview.cpp @@ -73,14 +73,14 @@ void ToolTip::maybeTip( const TQPoint &pos ) if( Item *item = dynamic_cast<Item*>( m_listView->itemAt( pos ) ) ) { - TQRect tqitemRect = m_listView->tqitemRect( item ); + TQRect itemRect = m_listView->itemRect( item ); uint leftMargin = m_listView->treeStepSize() * ( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) + m_listView->itemMargin(); - uint xAdjust = tqitemRect.left() + leftMargin; - uint yAdjust = tqitemRect.top(); + uint xAdjust = itemRect.left() + leftMargin; + uint yAdjust = itemRect.top(); TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); std::pair<TQString,TQRect> toolTip = item->toolTip( relativePos ); @@ -88,7 +88,7 @@ void ToolTip::maybeTip( const TQPoint &pos ) return; toolTip.second.moveBy( xAdjust, yAdjust ); -// kdDebug( 14000 ) << k_funcinfo << "Adding tooltip: tqitemRect: " +// kdDebug( 14000 ) << k_funcinfo << "Adding tooltip: itemRect: " // << toolTip.second << ", tooltip: " << toolTip.first << endl; tip( toolTip.second, toolTip.first ); } @@ -193,7 +193,7 @@ void ListView::keyPressEvent( TQKeyEvent *e ) else if ( (e->key() == TQt::Key_Enter || e->key() == TQt::Key_Return) && item && item->isVisible() ) { // must provide a point within the item; emitExecute checks for this - TQPoint p = viewport()->mapToGlobal(tqitemRect(item).center()); + TQPoint p = viewport()->mapToGlobal(itemRect(item).center()); emitExecute( currentItem(), p, 0 ); } else diff --git a/kopete/libkopete/ui/kopetelistviewitem.cpp b/kopete/libkopete/ui/kopetelistviewitem.cpp index 6156b6aa..777d35ae 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.cpp +++ b/kopete/libkopete/ui/kopetelistviewitem.cpp @@ -1145,7 +1145,7 @@ ContactComponent::~ContactComponent() void ContactComponent::updatePixmap() { - setPixmap( contact()->onlinetqStatus().iconFor( contact(), d->iconSize ) ); + setPixmap( contact()->onlineStatus().iconFor( contact(), d->iconSize ) ); } Kopete::Contact *ContactComponent::contact() { @@ -1489,7 +1489,7 @@ void Item::setHeight( int ) int Item::width( const TQFontMetrics &, const TQListView *lv, int c ) const { - // TQt computes the tqitemRect from this. we want the whole item to be + // TQt computes the itemRect from this. we want the whole item to be // clickable, so we return the widest we could possibly be. return lv->header()->sectionSize( c ); } @@ -1528,7 +1528,7 @@ void Item::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int widt const BackgroundMode bgmode = lv->viewport()->backgroundMode(); const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - if ( _cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) ) + if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), _cg.brush( crole ) ); else { @@ -1540,8 +1540,8 @@ void Item::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int widt if ( lv->isEnabled() ) how |= TQStyle::Style_Enabled; - lv->tqstyle().tqdrawComplexControl( TQStyle::CC_ListView, - p, lv, TQRect( 0, 0, width, height() ), lv->tqcolorGroup(), + lv->tqstyle().drawComplexControl( TQStyle::CC_ListView, + p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(), how, TQStyle::SC_ListView, TQStyle::SC_None, opt ); } @@ -1565,7 +1565,7 @@ void Item::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int widt textheight++; if ( textheight < height() ) { int w = lv->treeStepSize() / 2; - lv->tqstyle().tqdrawComplexControl( TQStyle::CC_ListView, p, lv, + lv->tqstyle().drawComplexControl( TQStyle::CC_ListView, p, lv, TQRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, lv->isEnabled() ? TQStyle::Style_Enabled : TQStyle::Style_Default, TQStyle::SC_ListViewExpand, diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.cpp b/kopete/libkopete/ui/kopetelistviewsearchline.cpp index af626858..edb63ffc 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.cpp +++ b/kopete/libkopete/ui/kopetelistviewsearchline.cpp @@ -67,7 +67,7 @@ void SearchLine::updateSearch( const TQString &s ) for( TQListViewItemIterator it(listView(), TQListViewItemIterator::Selected | TQListViewItemIterator::Visible); it.current() && !currentItem; ++it ) { - if( listView()->tqitemRect( it.current() ).isValid() ) + if( listView()->itemRect( it.current() ).isValid() ) currentItem = it.current(); } } diff --git a/kopete/libkopete/ui/kopetepassworddialog.ui b/kopete/libkopete/ui/kopetepassworddialog.ui index 6007a139..8a5663b6 100644 --- a/kopete/libkopete/ui/kopetepassworddialog.ui +++ b/kopete/libkopete/ui/kopetepassworddialog.ui @@ -92,7 +92,7 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>0</height> diff --git a/kopete/libkopete/ui/kopetepasswordwidgetbase.ui b/kopete/libkopete/ui/kopetepasswordwidgetbase.ui index 468efd56..6919064b 100644 --- a/kopete/libkopete/ui/kopetepasswordwidgetbase.ui +++ b/kopete/libkopete/ui/kopetepasswordwidgetbase.ui @@ -49,7 +49,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> diff --git a/kopete/libkopete/ui/kopetestdaction.cpp b/kopete/libkopete/ui/kopetestdaction.cpp index e09cdeb4..f69adcfc 100644 --- a/kopete/libkopete/ui/kopetestdaction.cpp +++ b/kopete/libkopete/ui/kopetestdaction.cpp @@ -41,7 +41,7 @@ KopetePreferencesAction::KopetePreferencesAction( KActionCollection *parent, con : KAction( KStdGuiItem::configure(), 0, 0, 0, parent, name ) #else : KAction( KGuiItem( i18n( "&Configure Kopete..." ), - TQString::tqfromLatin1( "configure" ) ), 0, 0, 0, parent, name ) + TQString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) #endif { connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotShowPreferences() ) ); @@ -70,57 +70,57 @@ KAction * KopeteStdAction::preferences( KActionCollection *parent, const char *n KAction * KopeteStdAction::chat( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Start &Chat..." ), TQString::tqfromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Start &Chat..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::sendMessage( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Send Single Message..." ), TQString::tqfromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Send Single Message..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::contactInfo( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "User &Info" ), TQString::tqfromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "User &Info" ), TQString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::sendFile( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Send &File..." ), TQString::tqfromLatin1( "attach" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Send &File..." ), TQString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::viewHistory( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "View &History..." ), TQString::tqfromLatin1( "history" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "View &History..." ), TQString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::addGroup( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Create Group..." ), TQString::tqfromLatin1( "folder" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Create Group..." ), TQString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::changeMetaContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Cha&nge Meta Contact..." ), TQString::tqfromLatin1( "move" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Cha&nge Meta Contact..." ), TQString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::deleteContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Delete Contact" ), TQString::tqfromLatin1( "delete_user" ), TQt::Key_Delete, recvr, slot, parent, name ); + return new KAction( i18n( "&Delete Contact" ), TQString::fromLatin1( "delete_user" ), TQt::Key_Delete, recvr, slot, parent, name ); } KAction * KopeteStdAction::changeAlias( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Change A&lias..." ), TQString::tqfromLatin1( "signature" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Change A&lias..." ), TQString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::blockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "&Block Contact" ), TQString::tqfromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Block Contact" ), TQString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); } KAction * KopeteStdAction::unblockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "Un&block Contact" ), TQString::tqfromLatin1( "player_play" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Un&block Contact" ), TQString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); } #include "kopetestdaction.moc" diff --git a/kopete/libkopete/ui/kopetewidgets.cpp b/kopete/libkopete/ui/kopetewidgets.cpp index 4b03f729..a1d7d1e1 100644 --- a/kopete/libkopete/ui/kopetewidgets.cpp +++ b/kopete/libkopete/ui/kopetewidgets.cpp @@ -36,7 +36,7 @@ public: TQPixmap pix(m_widgets[key].iconSet); #else TQPixmap pix(locate( "data", - TQString::tqfromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); + TQString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); #endif return TQIconSet(pix); } @@ -71,41 +71,41 @@ KopeteWidgets::KopeteWidgets() { WidgetInfo widget; - widget.group = TQString::tqfromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES widget.iconSet = TQPixmap(kopete__ui__addressbooklinkwidget_xpm); #else - widget.iconSet = TQString::tqfromLatin1("kopete__ui__addressbooklinkwidget.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); #endif - widget.includeFile = TQString::tqfromLatin1("addressbooklinkwidget.h"); - widget.toolTip = TQString::tqfromLatin1("Address Book Link Widget (Kopete)"); - widget.whatsThis = TQString::tqfromLatin1("KABC::Addressee display/selector"); + widget.includeFile = TQString::fromLatin1("addressbooklinkwidget.h"); + widget.toolTip = TQString::fromLatin1("Address Book Link Widget (Kopete)"); + widget.whatsThis = TQString::fromLatin1("KABC::Addressee display/selector"); widget.isContainer = false; - m_widgets.insert(TQString::tqfromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); - widget.group = TQString::tqfromLatin1("Views (Kopete)"); + widget.group = TQString::fromLatin1("Views (Kopete)"); #ifdef EMBED_IMAGES widget.iconSet = TQPixmap(kopete__ui__listview__listview_xpm); #else - widget.iconSet = TQString::tqfromLatin1("kopete__ui__listview__listview.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__listview.png"); #endif - widget.includeFile = TQString::tqfromLatin1("kopetelistview.h"); - widget.toolTip = TQString::tqfromLatin1("List View (Kopete)"); - widget.whatsThis = TQString::tqfromLatin1("A component capable list view widget."); + widget.includeFile = TQString::fromLatin1("kopetelistview.h"); + widget.toolTip = TQString::fromLatin1("List View (Kopete)"); + widget.whatsThis = TQString::fromLatin1("A component capable list view widget."); widget.isContainer = false; - m_widgets.insert(TQString::tqfromLatin1("Kopete::UI::ListView::ListView"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::ListView"), widget); - widget.group = TQString::tqfromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES widget.iconSet = TQPixmap(kopete__ui__listview__searchline_xpm); #else - widget.iconSet = TQString::tqfromLatin1("kopete__ui__listview__searchline.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__searchline.png"); #endif - widget.includeFile = TQString::tqfromLatin1("kopetelistviewsearchline.h"); - widget.toolTip = TQString::tqfromLatin1("List View Search Line (Kopete)"); - widget.whatsThis = TQString::tqfromLatin1("Search line able to use Kopete custom list View."); + widget.includeFile = TQString::fromLatin1("kopetelistviewsearchline.h"); + widget.toolTip = TQString::fromLatin1("List View Search Line (Kopete)"); + widget.whatsThis = TQString::fromLatin1("Search line able to use Kopete custom list View."); widget.isContainer = false; - m_widgets.insert(TQString::tqfromLatin1("Kopete::UI::ListView::SearchLine"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); new KInstance("kopetewidgets"); } @@ -116,13 +116,13 @@ KopeteWidgets::~KopeteWidgets() TQWidget *KopeteWidgets::create(const TQString &key, TQWidget *parent, const char *name) { - if (key == TQString::tqfromLatin1("Kopete::UI::AddressBookLinkWidget")) + if (key == TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) return new Kopete::UI::AddressBookLinkWidget(parent, name); - if (key == TQString::tqfromLatin1("Kopete::UI::ListView::ListView")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::ListView")) return new Kopete::UI::ListView::ListView(parent, name); - if (key == TQString::tqfromLatin1("Kopete::UI::ListView::SearchLine")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::SearchLine")) return new Kopete::UI::ListView::SearchLine(parent, 0, name); return 0; diff --git a/kopete/libkopete/ui/userinfodialog.cpp b/kopete/libkopete/ui/userinfodialog.cpp index 40ac3de9..35149e66 100644 --- a/kopete/libkopete/ui/userinfodialog.cpp +++ b/kopete/libkopete/ui/userinfodialog.cpp @@ -93,7 +93,7 @@ void UserInfoDialog::setAwayMessage( const TQString& msg ) d->awayMessage = msg; } -void UserInfoDialog::settqStatus( const TQString& status ) +void UserInfoDialog::setStatus( const TQString& status ) { d->status = status; } @@ -138,7 +138,7 @@ TQHBox* UserInfoDialog::addLabelEdit( const TQString& label, const TQString& tex TQHBox *box = new TQHBox( d->page ); new TQLabel( label, box ); edit = new KLineEdit( box ); - edit->tqsetAlignment( TQt::AlignHCenter ); + edit->setAlignment( TQt::AlignHCenter ); edit->setText( text ); edit->setReadOnly( true ); return box; diff --git a/kopete/libkopete/ui/userinfodialog.h b/kopete/libkopete/ui/userinfodialog.h index 5926ab5a..ce2dcc90 100644 --- a/kopete/libkopete/ui/userinfodialog.h +++ b/kopete/libkopete/ui/userinfodialog.h @@ -50,7 +50,7 @@ namespace Kopete { void setName( const TQString& name ); void setId( const TQString& id ); void setAwayMessage( const TQString& msg ); - void settqStatus( const TQString& status ); + void setStatus( const TQString& status ); void setWarningLevel(const TQString& level ); void setOnlineSince( const TQString& since ); void setInfo( const TQString& info ); |