From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/testbed/testbedaccount.cpp | 26 +++++++++---------- kopete/protocols/testbed/testbedaccount.h | 11 ++++---- .../protocols/testbed/testbedaccountpreferences.ui | 30 +++++++++++----------- kopete/protocols/testbed/testbedaddcontactpage.cpp | 6 ++--- kopete/protocols/testbed/testbedaddcontactpage.h | 3 ++- kopete/protocols/testbed/testbedaddui.ui | 18 ++++++------- kopete/protocols/testbed/testbedcontact.cpp | 4 +-- kopete/protocols/testbed/testbedcontact.h | 3 ++- .../protocols/testbed/testbededitaccountwidget.cpp | 4 +-- .../protocols/testbed/testbededitaccountwidget.h | 3 ++- kopete/protocols/testbed/testbedfakeserver.cpp | 4 +-- kopete/protocols/testbed/testbedfakeserver.h | 3 ++- kopete/protocols/testbed/testbedincomingmessage.h | 3 ++- kopete/protocols/testbed/testbedprotocol.cpp | 20 +++++++-------- kopete/protocols/testbed/testbedprotocol.h | 7 ++--- .../protocols/testbed/ui/testbedwebcamdialog.cpp | 6 ++--- kopete/protocols/testbed/ui/testbedwebcamdialog.h | 3 ++- 17 files changed, 81 insertions(+), 73 deletions(-) (limited to 'kopete/protocols/testbed') diff --git a/kopete/protocols/testbed/testbedaccount.cpp b/kopete/protocols/testbed/testbedaccount.cpp index cc906447..e722bed2 100644 --- a/kopete/protocols/testbed/testbedaccount.cpp +++ b/kopete/protocols/testbed/testbedaccount.cpp @@ -29,8 +29,8 @@ #include "testbedprotocol.h" -TestbedAccount::TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name ) -: Kopete::Account ( parent, accountID , name ) +TestbedAccount::TestbedAccount( TestbedProtocol *tqparent, const TQString& accountID, const char *name ) +: Kopete::Account ( tqparent, accountID , name ) { // Init the myself contact setMyself( new TestbedContact( this, accountId(), TestbedContact::Null, accountId(), Kopete::ContactList::self()->myself() ) ); @@ -58,9 +58,9 @@ KActionMenu* TestbedAccount::actionMenu() return mActionMenu; } -bool TestbedAccount::createContact(const TQString& contactId, Kopete::MetaContact* parentContact) +bool TestbedAccount::createContact(const TQString& contactId, Kopete::MetaContact* tqparentContact) { - TestbedContact* newContact = new TestbedContact( this, contactId, TestbedContact::Echo, parentContact->displayName(), parentContact ); + TestbedContact* newContact = new TestbedContact( this, contactId, TestbedContact::Echo, tqparentContact->displayName(), tqparentContact ); return newContact != 0L; } @@ -75,10 +75,10 @@ void TestbedAccount::setAway( bool away, const TQString & /* reason */ ) void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const TQString &reason ) { if ( status.status() == Kopete::OnlineStatus::Online && - myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) + myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Offline ) slotGoOnline(); else if (status.status() == Kopete::OnlineStatus::Online && - myself()->onlineStatus().status() == Kopete::OnlineStatus::Away ) + myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Away ) setAway( false, reason ); else if ( status.status() == Kopete::OnlineStatus::Offline ) slotGoOffline(); @@ -86,7 +86,7 @@ void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const T slotGoAway( /* reason */ ); } -void TestbedAccount::connect( const Kopete::OnlineStatus& /* initialStatus */ ) +void TestbedAccount::connect( const Kopete::OnlineStatus& /* initialtqStatus */ ) { kdDebug ( 14210 ) << k_funcinfo << endl; myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOnline ); @@ -114,7 +114,7 @@ void TestbedAccount::slotGoOnline () connect (); else myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOnline ); - updateContactStatus(); + updateContacttqStatus(); } void TestbedAccount::slotGoAway () @@ -125,7 +125,7 @@ void TestbedAccount::slotGoAway () connect(); myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedAway ); - updateContactStatus(); + updateContacttqStatus(); } @@ -135,7 +135,7 @@ void TestbedAccount::slotGoOffline () if (isConnected ()) disconnect (); - updateContactStatus(); + updateContacttqStatus(); } void TestbedAccount::slotShowVideo () @@ -144,7 +144,7 @@ void TestbedAccount::slotShowVideo () if (isConnected ()) TestbedWebcamDialog *testbedWebcamDialog = new TestbedWebcamDialog(0, 0, "Testbed video window"); - updateContactStatus(); + updateContacttqStatus(); } void TestbedAccount::receivedMessage( const TQString &message ) @@ -165,11 +165,11 @@ void TestbedAccount::receivedMessage( const TQString &message ) kdWarning(14210) << k_funcinfo << "unable to look up contact for delivery" << endl; } -void TestbedAccount::updateContactStatus() +void TestbedAccount::updateContacttqStatus() { TQDictIterator itr( contacts() ); for ( ; itr.current(); ++itr ) - itr.current()->setOnlineStatus( myself()->onlineStatus() ); + itr.current()->setOnlineStatus( myself()->onlinetqStatus() ); } diff --git a/kopete/protocols/testbed/testbedaccount.h b/kopete/protocols/testbed/testbedaccount.h index b58249c6..76e2790a 100644 --- a/kopete/protocols/testbed/testbedaccount.h +++ b/kopete/protocols/testbed/testbedaccount.h @@ -35,8 +35,9 @@ class TestbedFakeServer; class TestbedAccount : public Kopete::Account { Q_OBJECT + TQ_OBJECT public: - TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name = 0 ); + TestbedAccount( TestbedProtocol *tqparent, const TQString& accountID, const char *name = 0 ); ~TestbedAccount(); /** * Construct the context menu used for the status bar icon @@ -47,7 +48,7 @@ public: * Creates a protocol specific Kopete::Contact subclass and adds it to the supplie * Kopete::MetaContact */ - virtual bool createContact(const TQString& contactId, Kopete::MetaContact* parentContact); + virtual bool createContact(const TQString& contactId, Kopete::MetaContact* tqparentContact); /** * Called when Kopete is set globally away */ @@ -55,11 +56,11 @@ public: /** * Called when Kopete status is changed globally */ - virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); + virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const TQString &reason = TQString()); /** * 'Connect' to the testbed server. Only sets myself() online. */ - virtual void connect( const Kopete::OnlineStatus& initialStatus = Kopete::OnlineStatus() ); + virtual void connect( const Kopete::OnlineStatus& initialtqStatus = Kopete::OnlineStatus() ); /** * Disconnect from the server. Only sets myself() offline. */ @@ -79,7 +80,7 @@ protected: /** * This simulates contacts going on and offline in sync with the account's status changes */ - void updateContactStatus(); + void updateContacttqStatus(); TestbedFakeServer* m_server; protected slots: diff --git a/kopete/protocols/testbed/testbedaccountpreferences.ui b/kopete/protocols/testbed/testbedaccountpreferences.ui index e1c75ca6..7437db6a 100644 --- a/kopete/protocols/testbed/testbedaccountpreferences.ui +++ b/kopete/protocols/testbed/testbedaccountpreferences.ui @@ -1,6 +1,6 @@ TestbedAccountPreferences - + TestbedAccountPreferences @@ -25,11 +25,11 @@ 0 - + tabWidget11 - + tab @@ -40,7 +40,7 @@ unnamed - + groupBox55_2 @@ -51,15 +51,15 @@ unnamed - + - layout1_2 + tqlayout1_2 unnamed - + accountLabel @@ -76,7 +76,7 @@ The account name of your account. - + m_acctName @@ -91,7 +91,7 @@ - + groupBox22 @@ -102,7 +102,7 @@ unnamed - + textLabel12 @@ -117,7 +117,7 @@ To use the testbed protocol, just make up an account name. This protocol has no real networking capability. - + WordBreak|AlignTop @@ -133,7 +133,7 @@ Expanding - + 20 131 @@ -143,18 +143,18 @@ - + labelStatusMessage - + AlignCenter - + diff --git a/kopete/protocols/testbed/testbedaddcontactpage.cpp b/kopete/protocols/testbed/testbedaddcontactpage.cpp index bb016453..1ee83466 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.cpp +++ b/kopete/protocols/testbed/testbedaddcontactpage.cpp @@ -26,8 +26,8 @@ #include "testbedaddui.h" -TestbedAddContactPage::TestbedAddContactPage( TQWidget* parent, const char* name ) - : AddContactPage(parent, name) +TestbedAddContactPage::TestbedAddContactPage( TQWidget* tqparent, const char* name ) + : AddContactPage(tqparent, name) { kdDebug(14210) << k_funcinfo << endl; ( new TQVBoxLayout( this ) )->setAutoAdd( true ); @@ -48,7 +48,7 @@ bool TestbedAddContactPage::apply( Kopete::Account* a, Kopete::MetaContact* m ) if ( m_testbedAddUI->m_rbEcho->isOn() ) { type = m_testbedAddUI->m_uniqueName->text(); - name = TQString::fromLatin1( "Echo Contact" ); + name = TQString::tqfromLatin1( "Echo Contact" ); ok = true; } if ( ok ) diff --git a/kopete/protocols/testbed/testbedaddcontactpage.h b/kopete/protocols/testbed/testbedaddcontactpage.h index f430f559..3189a635 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.h +++ b/kopete/protocols/testbed/testbedaddcontactpage.h @@ -30,8 +30,9 @@ class TestbedAddUI; class TestbedAddContactPage : public AddContactPage { Q_OBJECT + TQ_OBJECT public: - TestbedAddContactPage( TQWidget* parent = 0, const char* name = 0 ); + TestbedAddContactPage( TQWidget* tqparent = 0, const char* name = 0 ); ~TestbedAddContactPage(); /** diff --git a/kopete/protocols/testbed/testbedaddui.ui b/kopete/protocols/testbed/testbedaddui.ui index c81a4d2f..429b20b1 100644 --- a/kopete/protocols/testbed/testbedaddui.ui +++ b/kopete/protocols/testbed/testbedaddui.ui @@ -1,6 +1,6 @@ TestbedAddUI - + TestbedAddUI @@ -16,15 +16,15 @@ unnamed - + - layout2 + tqlayout2 unnamed - + textLabel1 @@ -41,7 +41,7 @@ The account name of the account you would like to add. - + m_uniqueName @@ -54,7 +54,7 @@ - + buttonGroup1 @@ -65,7 +65,7 @@ unnamed - + m_rbEcho @@ -94,7 +94,7 @@ Expanding - + 20 252 @@ -103,5 +103,5 @@ - + diff --git a/kopete/protocols/testbed/testbedcontact.cpp b/kopete/protocols/testbed/testbedcontact.cpp index bf110872..ee816474 100644 --- a/kopete/protocols/testbed/testbedcontact.cpp +++ b/kopete/protocols/testbed/testbedcontact.cpp @@ -29,8 +29,8 @@ #include "testbedprotocol.h" TestbedContact::TestbedContact( Kopete::Account* _account, const TQString &uniqueName, - const TestbedContactType type, const TQString &displayName, Kopete::MetaContact *parent ) -: Kopete::Contact( _account, uniqueName, parent ) + const TestbedContactType type, const TQString &displayName, Kopete::MetaContact *tqparent ) +: Kopete::Contact( _account, uniqueName, tqparent ) { kdDebug( 14210 ) << k_funcinfo << " uniqueName: " << uniqueName << ", displayName: " << displayName << endl; m_type = type; diff --git a/kopete/protocols/testbed/testbedcontact.h b/kopete/protocols/testbed/testbedcontact.h index f6efa7ee..f5ac9ed6 100644 --- a/kopete/protocols/testbed/testbedcontact.h +++ b/kopete/protocols/testbed/testbedcontact.h @@ -33,6 +33,7 @@ namespace Kopete { class MetaContact; } class TestbedContact : public Kopete::Contact { Q_OBJECT + TQ_OBJECT public: /** * The range of possible contact types @@ -41,7 +42,7 @@ public: TestbedContact( Kopete::Account* _account, const TQString &uniqueName, const TestbedContact::TestbedContactType type, const TQString &displayName, - Kopete::MetaContact *parent ); + Kopete::MetaContact *tqparent ); ~TestbedContact(); diff --git a/kopete/protocols/testbed/testbededitaccountwidget.cpp b/kopete/protocols/testbed/testbededitaccountwidget.cpp index 98a52dfc..888a05f9 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.cpp +++ b/kopete/protocols/testbed/testbededitaccountwidget.cpp @@ -24,8 +24,8 @@ #include "testbedaccount.h" #include "testbedprotocol.h" -TestbedEditAccountWidget::TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account) -: TQWidget( parent ), KopeteEditAccountWidget( account ) +TestbedEditAccountWidget::TestbedEditAccountWidget( TQWidget* tqparent, Kopete::Account* account) +: TQWidget( tqparent ), KopeteEditAccountWidget( account ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); kdDebug(14210) << k_funcinfo << endl; diff --git a/kopete/protocols/testbed/testbededitaccountwidget.h b/kopete/protocols/testbed/testbededitaccountwidget.h index 5c56560d..4c9d20e4 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.h +++ b/kopete/protocols/testbed/testbededitaccountwidget.h @@ -31,8 +31,9 @@ class TestbedAccountPreferences; class TestbedEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT + TQ_OBJECT public: - TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account); + TestbedEditAccountWidget( TQWidget* tqparent, Kopete::Account* account); ~TestbedEditAccountWidget(); diff --git a/kopete/protocols/testbed/testbedfakeserver.cpp b/kopete/protocols/testbed/testbedfakeserver.cpp index 9a4116ca..7740b858 100644 --- a/kopete/protocols/testbed/testbedfakeserver.cpp +++ b/kopete/protocols/testbed/testbedfakeserver.cpp @@ -36,8 +36,8 @@ void TestbedFakeServer::sendMessage( TQString contactId, TQString message ) kdDebug( 14210 ) << k_funcinfo << "Message for: " << contactId << ", is: " << message << endl; kdDebug( 14210 ) << "recipient is echo, coming back at you." << endl; // put the message in a map and start a timer to tell it to deliver itself. - //emit messageReceived( TQString::fromLatin1( "echo: " ) + message ); - TQString messageId = contactId + TQString::fromLatin1(": "); + //emit messageReceived( TQString::tqfromLatin1( "echo: " ) + message ); + TQString messageId = contactId + TQString::tqfromLatin1(": "); TestbedIncomingMessage* msg = new TestbedIncomingMessage( this, messageId + message ); m_incomingMessages.append( msg ); TQTimer::singleShot( 1000, msg, TQT_SLOT( deliver() ) ); diff --git a/kopete/protocols/testbed/testbedfakeserver.h b/kopete/protocols/testbed/testbedfakeserver.h index 1e58031a..1fff7104 100644 --- a/kopete/protocols/testbed/testbedfakeserver.h +++ b/kopete/protocols/testbed/testbedfakeserver.h @@ -26,9 +26,10 @@ class TestbedIncomingMessage; * This is a interface to a dummy IM server * @author Will Stephenson */ -class TestbedFakeServer : public QObject +class TestbedFakeServer : public TQObject { Q_OBJECT + TQ_OBJECT public: TestbedFakeServer(); ~TestbedFakeServer(); diff --git a/kopete/protocols/testbed/testbedincomingmessage.h b/kopete/protocols/testbed/testbedincomingmessage.h index 3f27510a..cacace11 100644 --- a/kopete/protocols/testbed/testbedincomingmessage.h +++ b/kopete/protocols/testbed/testbedincomingmessage.h @@ -25,9 +25,10 @@ * Kopete side 'client' of the simulated IM system. * @author Will Stephenson */ -class TestbedIncomingMessage : public QObject +class TestbedIncomingMessage : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Create a new incoming message diff --git a/kopete/protocols/testbed/testbedprotocol.cpp b/kopete/protocols/testbed/testbedprotocol.cpp index 97ecaf02..e8c564e2 100644 --- a/kopete/protocols/testbed/testbedprotocol.cpp +++ b/kopete/protocols/testbed/testbedprotocol.cpp @@ -29,11 +29,11 @@ K_EXPORT_COMPONENT_FACTORY( kopete_testbed, TestbedProtocolFactory( "kopete_test TestbedProtocol *TestbedProtocol::s_protocol = 0L; -TestbedProtocol::TestbedProtocol( TQObject* parent, const char *name, const TQStringList &/*args*/ ) - : Kopete::Protocol( TestbedProtocolFactory::instance(), parent, name ), - testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "O&nline" ) ), +TestbedProtocol::TestbedProtocol( TQObject* tqparent, const char *name, const TQStringList &/*args*/ ) + : Kopete::Protocol( TestbedProtocolFactory::instance(), tqparent, name ), + testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString(), i18n( "Online" ), i18n( "O&nline" ) ), testbedAway( Kopete::OnlineStatus::Away, 25, this, 1, "msn_away", i18n( "Away" ), i18n( "&Away" ) ), - testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, TQString::null, i18n( "Offline" ), i18n( "O&ffline" ) ) + testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, TQString(), i18n( "Offline" ), i18n( "O&ffline" ) ) { kdDebug( 14210 ) << k_funcinfo << endl; @@ -55,9 +55,9 @@ Kopete::Contact *TestbedProtocol::deserializeContact( TQString type = serializedData[ "contactType" ]; TestbedContact::TestbedContactType tbcType; - if ( type == TQString::fromLatin1( "echo" ) ) + if ( type == TQString::tqfromLatin1( "echo" ) ) tbcType = TestbedContact::Echo; - if ( type == TQString::fromLatin1( "null" ) ) + if ( type == TQString::tqfromLatin1( "null" ) ) tbcType = TestbedContact::Null; else tbcType = TestbedContact::Null; @@ -74,16 +74,16 @@ Kopete::Contact *TestbedProtocol::deserializeContact( return new TestbedContact(account, contactId, tbcType, displayName, metaContact); } -AddContactPage * TestbedProtocol::createAddContactWidget( TQWidget *parent, Kopete::Account * /* account */ ) +AddContactPage * TestbedProtocol::createAddContactWidget( TQWidget *tqparent, Kopete::Account * /* account */ ) { kdDebug( 14210 ) << "Creating Add Contact Page" << endl; - return new TestbedAddContactPage( parent ); + return new TestbedAddContactPage( tqparent ); } -KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) +KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *tqparent ) { kdDebug(14210) << "Creating Edit Account Page" << endl; - return new TestbedEditAccountWidget( parent, account ); + return new TestbedEditAccountWidget( tqparent, account ); } Kopete::Account *TestbedProtocol::createNewAccount( const TQString &accountId ) diff --git a/kopete/protocols/testbed/testbedprotocol.h b/kopete/protocols/testbed/testbedprotocol.h index d688e130..44a6ba2a 100644 --- a/kopete/protocols/testbed/testbedprotocol.h +++ b/kopete/protocols/testbed/testbedprotocol.h @@ -27,8 +27,9 @@ class TestbedProtocol : public Kopete::Protocol { Q_OBJECT + TQ_OBJECT public: - TestbedProtocol(TQObject *parent, const char *name, const TQStringList &args); + TestbedProtocol(TQObject *tqparent, const char *name, const TQStringList &args); ~TestbedProtocol(); /** * Convert the serialised data back into a TestbedContact and add this @@ -42,11 +43,11 @@ public: /** * Generate the widget needed to add TestbedContacts */ - virtual AddContactPage * createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + virtual AddContactPage * createAddContactWidget( TQWidget *tqparent, Kopete::Account *account ); /** * Generate the widget needed to add/edit accounts for this protocol */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *tqparent ); /** * Generate a TestbedAccount */ diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp index b6a5a3b6..fd6f6743 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp @@ -27,8 +27,8 @@ #include #include -TestbedWebcamDialog::TestbedWebcamDialog( const TQString &contactId, TQWidget * parent, const char * name ) -: KDialogBase( KDialogBase::Plain, Qt::WDestructiveClose, parent, name, false, i18n( "Webcam for %1" ).arg( contactId ), +TestbedWebcamDialog::TestbedWebcamDialog( const TQString &contactId, TQWidget * tqparent, const char * name ) +: KDialogBase( KDialogBase::Plain, TQt::WDestructiveClose, tqparent, name, false, i18n( "Webcam for %1" ).tqarg( contactId ), KDialogBase::Close, KDialogBase::Close, true /*seperator*/ ) { setInitialSize( TQSize(320,290), false ); @@ -43,7 +43,7 @@ TestbedWebcamDialog::TestbedWebcamDialog( const TQString &contactId, TQWidget * mImageContainer = new Kopete::WebcamWidget( page ); mImageContainer->setMinimumSize(320,240); mImageContainer->setText( i18n( "No webcam image received" ) ); - mImageContainer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + mImageContainer->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); topLayout->add( mImageContainer ); show(); diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.h b/kopete/protocols/testbed/ui/testbedwebcamdialog.h index 1ae898b3..93223866 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.h +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.h @@ -40,8 +40,9 @@ namespace Kopete { class TestbedWebcamDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TestbedWebcamDialog( const TQString &, TQWidget* parent = 0, const char* name = 0 ); + TestbedWebcamDialog( const TQString &, TQWidget* tqparent = 0, const char* name = 0 ); ~TestbedWebcamDialog(); public slots: -- cgit v1.2.1