diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/libkopete/managedconnectionaccount.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/managedconnectionaccount.cpp')
-rw-r--r-- | kopete/libkopete/managedconnectionaccount.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kopete/libkopete/managedconnectionaccount.cpp b/kopete/libkopete/managedconnectionaccount.cpp index cf14ed2f..05dbf9cf 100644 --- a/kopete/libkopete/managedconnectionaccount.cpp +++ b/kopete/libkopete/managedconnectionaccount.cpp @@ -24,48 +24,48 @@ namespace Kopete { -ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength, const char *name ) - : PasswordedAccount( parent, acctId, maxPasswordLength, name ), m_waitingForConnection( false ) +ManagedConnectionAccount::ManagedConnectionAccount( Protocol *tqparent, const TQString &acctId, uint maxPasswordLength, const char *name ) + : PasswordedAccount( tqparent, acctId, maxPasswordLength, name ), m_waitingForConnection( false ) { - TQObject::connect( ConnectionManager::self(), TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus ) ), - TQT_SLOT(slotConnectionStatusChanged(const TQString&, NetworkStatus::EnumStatus ) ) ); + TQObject::connect( ConnectionManager::self(), TQT_SIGNAL(statusChanged(const TQString&, NetworktqStatus::EnumtqStatus ) ), + TQT_SLOT(slotConnectionStatusChanged(const TQString&, NetworktqStatus::EnumtqStatus ) ) ); } void ManagedConnectionAccount::connectWithPassword( const TQString &password ) { m_password = password; - NetworkStatus::EnumStatus status = ConnectionManager::self()->status( TQString::null ); - if ( status == NetworkStatus::NoNetworks ) + NetworktqStatus::EnumtqStatus status = ConnectionManager::self()->status( TQString() ); + if ( status == NetworktqStatus::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". - NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), TQString::null, true ); - if ( response == NetworkStatus::Connected ) + NetworktqStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), TQString(), true ); + if ( response == NetworktqStatus::Connected ) { m_waitingForConnection = false; performConnectWithPassword( password ); } - else if ( response == NetworkStatus::UserRefused || response == NetworkStatus::Unavailable ) + else if ( response == NetworktqStatus::UserRefused || response == NetworktqStatus::Unavailable ) disconnect(); } } -void ManagedConnectionAccount::slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ) +void ManagedConnectionAccount::slotConnectionStatusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status ) { Q_UNUSED(host); // as above, we didn't register a hostname, so treat any connection as our own. - if ( m_waitingForConnection && ( status == NetworkStatus::Online || status == NetworkStatus::NoNetworks ) ) + if ( m_waitingForConnection && ( status == NetworktqStatus::Online || status == NetworktqStatus::NoNetworks ) ) { m_waitingForConnection = false; performConnectWithPassword( m_password ); } - else if ( isConnected() && ( status == NetworkStatus::Offline - || status == NetworkStatus::ShuttingDown - || status == NetworkStatus::OfflineDisconnected - || status == NetworkStatus::OfflineFailed ) ) + else if ( isConnected() && ( status == NetworktqStatus::Offline + || status == NetworktqStatus::ShuttingDown + || status == NetworktqStatus::OfflineDisconnected + || status == NetworktqStatus::OfflineFailed ) ) disconnect(); } |