diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
commit | aa0726b20f398264f0a2abc60215be044b106f9c (patch) | |
tree | 070fdbc19a1106cfdd7f651a8ce76bb1b89a513d /kontact_plugin | |
parent | d3cf5b3e75aadc3b02d0b56f030d4c3f8c2c749d (diff) | |
download | basket-aa0726b20f398264f0a2abc60215be044b106f9c.tar.gz basket-aa0726b20f398264f0a2abc60215be044b106f9c.zip |
TQt4 port basket
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1232416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact_plugin')
-rw-r--r-- | kontact_plugin/basket_plugin.cpp | 8 | ||||
-rw-r--r-- | kontact_plugin/basket_plugin.h | 5 | ||||
-rw-r--r-- | kontact_plugin/basketdcopiface_stub.cpp | 18 | ||||
-rw-r--r-- | kontact_plugin/uniqueapphandler.cpp | 24 | ||||
-rw-r--r-- | kontact_plugin/uniqueapphandler.h | 11 |
5 files changed, 34 insertions, 32 deletions
diff --git a/kontact_plugin/basket_plugin.cpp b/kontact_plugin/basket_plugin.cpp index ea92b33..e6cfb9f 100644 --- a/kontact_plugin/basket_plugin.cpp +++ b/kontact_plugin/basket_plugin.cpp @@ -33,12 +33,12 @@ typedef KGenericFactory<BasketPlugin, Kontact::Core> BasketPluginFactory; K_EXPORT_COMPONENT_FACTORY( libkontact_basket, BasketPluginFactory( "kontact_basketplugin" ) ) -BasketPlugin::BasketPlugin( Kontact::Core *core, const char *, const QStringList& ) +BasketPlugin::BasketPlugin( Kontact::Core *core, const char *, const TQStringList& ) : Kontact::Plugin( core, core, "basket" ) { setInstance( BasketPluginFactory::instance() ); insertNewAction(new KAction( i18n("&New Basket..."), "basket", CTRL+SHIFT+Key_B, - this, SLOT(newBasket()), actionCollection(), "basket_new" )); + this, TQT_SLOT(newBasket()), actionCollection(), "basket_new" )); m_uniqueAppWatcher = new Kontact::UniqueAppWatcher( new Kontact::UniqueAppHandlerFactory<BasketUniqueAppHandler>(), this); @@ -55,7 +55,7 @@ KParts::ReadOnlyPart* BasketPlugin::createPart() return 0; m_stub = new BasketDcopInterface_stub(dcopClient(), "basket", "BasketIface"); - connect(part, SIGNAL(showPart()), this, SLOT(showPart())); + connect(part, TQT_SIGNAL(showPart()), this, TQT_SLOT(showPart())); return part; } @@ -75,7 +75,7 @@ void BasketPlugin::showPart() } #if 0 -bool BasketPlugin::createDCOPInterface( const QString& serviceType ) +bool BasketPlugin::createDCOPInterface( const TQString& serviceType ) { kdDebug() << k_funcinfo << serviceType << endl; return false; diff --git a/kontact_plugin/basket_plugin.h b/kontact_plugin/basket_plugin.h index f49cef1..a11026a 100644 --- a/kontact_plugin/basket_plugin.h +++ b/kontact_plugin/basket_plugin.h @@ -40,15 +40,16 @@ class BasketUniqueAppHandler : public Kontact::UniqueAppHandler class BasketPlugin : public Kontact::Plugin { Q_OBJECT + TQ_OBJECT public: BasketPlugin( Kontact::Core *core, const char *name, - const QStringList & ); + const TQStringList & ); ~BasketPlugin(); int weight() const { return 700; } virtual bool isRunningStandalone(); - //virtual bool createDCOPInterface( const QString& serviceType ); + //virtual bool createDCOPInterface( const TQString& serviceType ); public slots: void newBasket(); diff --git a/kontact_plugin/basketdcopiface_stub.cpp b/kontact_plugin/basketdcopiface_stub.cpp index eff3122..a170b62 100644 --- a/kontact_plugin/basketdcopiface_stub.cpp +++ b/kontact_plugin/basketdcopiface_stub.cpp @@ -12,12 +12,12 @@ #include <kdatastream.h> -BasketDcopInterface_stub::BasketDcopInterface_stub( const QCString& app, const QCString& obj ) +BasketDcopInterface_stub::BasketDcopInterface_stub( const TQCString& app, const TQCString& obj ) : DCOPStub( app, obj ) { } -BasketDcopInterface_stub::BasketDcopInterface_stub( DCOPClient* client, const QCString& app, const QCString& obj ) +BasketDcopInterface_stub::BasketDcopInterface_stub( DCOPClient* client, const TQCString& app, const TQCString& obj ) : DCOPStub( client, app, obj ) { } @@ -30,24 +30,24 @@ BasketDcopInterface_stub::BasketDcopInterface_stub( const DCOPRef& ref ) void BasketDcopInterface_stub::newBasket() { if ( !dcopClient() ) { - setStatus( CallFailed ); + settqStatus( CallFailed ); return; } - QByteArray data; + TQByteArray data; dcopClient()->send( app(), obj(), "newBasket()", data ); - setStatus( CallSucceeded ); + settqStatus( CallSucceeded ); } void BasketDcopInterface_stub::handleCommandLine() { if ( !dcopClient() ) { - setStatus( CallFailed ); + settqStatus( CallFailed ); return; } - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if ( dcopClient()->call( app(), obj(), "handleCommandLine()", data, replyType, replyData ) ) { - setStatus( CallSucceeded ); + settqStatus( CallSucceeded ); } else { callFailed(); } diff --git a/kontact_plugin/uniqueapphandler.cpp b/kontact_plugin/uniqueapphandler.cpp index 29dc888..2f80a86 100644 --- a/kontact_plugin/uniqueapphandler.cpp +++ b/kontact_plugin/uniqueapphandler.cpp @@ -82,8 +82,8 @@ int UniqueAppHandler::newInstance() return 0; } -bool UniqueAppHandler::process( const QCString &fun, const QByteArray &data, - QCString& replyType, QByteArray &replyData ) +bool UniqueAppHandler::process( const TQCString &fun, const TQByteArray &data, + TQCString& replyType, TQByteArray &replyData ) { if ( fun == "newInstance()" ) { replyType = "int"; @@ -92,21 +92,21 @@ bool UniqueAppHandler::process( const QCString &fun, const QByteArray &data, loadCommandLineOptions(); // This bit is duplicated from KUniqueApplication::processDelayed() - QDataStream ds( data, IO_ReadOnly ); + TQDataStream ds( data, IO_ReadOnly ); KCmdLineArgs::loadAppArgs( ds ); if ( !ds.atEnd() ) { // backwards compatibility - QCString asn_id; + TQCString asn_id; ds >> asn_id; kapp->setStartupId( asn_id ); } - QDataStream _replyStream( replyData, IO_WriteOnly ); + TQDataStream _replyStream( replyData, IO_WriteOnly ); _replyStream << newInstance( ); } else if ( fun == "load()" ) { replyType = "bool"; (void)mPlugin->part(); // load the part without bringing it to front - QDataStream _replyStream( replyData, IO_WriteOnly ); + TQDataStream _replyStream( replyData, IO_WriteOnly ); _replyStream << true; } else { return DCOPObject::process( fun, data, replyType, replyData ); @@ -130,7 +130,7 @@ QCStringList UniqueAppHandler::functions() } UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin* plugin ) - : QObject( plugin ), mFactory( factory ), mPlugin( plugin ) + : TQObject( plugin ), mFactory( factory ), mPlugin( plugin ) { // The app is running standalone if 1) that name is known to DCOP mRunningStandalone = kapp->dcopClient()->isApplicationRegistered( plugin->name() ); @@ -141,8 +141,8 @@ UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin if ( mRunningStandalone ) { kapp->dcopClient()->setNotifications( true ); - connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ), - this, SLOT( unregisteredFromDCOP( const QCString& ) ) ); + connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ), + this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); } else { mFactory->createHandler( mPlugin ); } @@ -156,11 +156,11 @@ UniqueAppWatcher::~UniqueAppWatcher() delete mFactory; } -void UniqueAppWatcher::unregisteredFromDCOP( const QCString& appId ) +void UniqueAppWatcher::unregisteredFromDCOP( const TQCString& appId ) { if ( appId == mPlugin->name() && mRunningStandalone ) { - disconnect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ), - this, SLOT( unregisteredFromDCOP( const QCString& ) ) ); + disconnect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ), + this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); kdDebug(5601) << k_funcinfo << appId << endl; mFactory->createHandler( mPlugin ); kapp->dcopClient()->setNotifications( false ); diff --git a/kontact_plugin/uniqueapphandler.h b/kontact_plugin/uniqueapphandler.h index e954eb7..a39aa04 100644 --- a/kontact_plugin/uniqueapphandler.h +++ b/kontact_plugin/uniqueapphandler.h @@ -19,8 +19,8 @@ Boston, MA 02110-1301, USA. */ -#ifndef KONTACT_UNIQUEAPPHANDLER_H -#define KONTACT_UNIQUEAPPHANDLER_H +#ifndef KONTACT_UNITQUEAPPHANDLER_H +#define KONTACT_UNITQUEAPPHANDLER_H #include <dcopobject.h> #include <kontact/plugin.h> @@ -86,9 +86,10 @@ template <class T> class UniqueAppHandlerFactory : public UniqueAppHandlerFactor * Kontact takes over from there. * */ -class KDE_EXPORT UniqueAppWatcher : public QObject +class KDE_EXPORT UniqueAppWatcher : public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -107,7 +108,7 @@ class KDE_EXPORT UniqueAppWatcher : public QObject bool isRunningStandalone() const { return mRunningStandalone; } protected slots: - void unregisteredFromDCOP( const QCString& appId ); + void unregisteredFromDCOP( const TQCString& appId ); private: bool mRunningStandalone; @@ -117,4 +118,4 @@ class KDE_EXPORT UniqueAppWatcher : public QObject } // namespace -#endif /* KONTACT_UNIQUEAPPHANDLER_H */ +#endif /* KONTACT_UNITQUEAPPHANDLER_H */ |