Rename KLock and KTrader to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 0dda6e85e1
commit 786304c621

@ -62,7 +62,7 @@ KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(TQStringList profileF
*/ */
// Load all colorspace modules // Load all colorspace modules
KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("Chalk/ColorSpace"), TDETrader::OfferList offers = TDETrader::self()->query(TQString::fromLatin1("Chalk/ColorSpace"),
TQString::fromLatin1("(Type == 'Service') and " TQString::fromLatin1("(Type == 'Service') and "
"([X-Chalk-Version] == 2)")); "([X-Chalk-Version] == 2)"));
@ -71,7 +71,7 @@ KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(TQStringList profileF
abort(); abort();
} }
KTrader::OfferList::ConstIterator iter; TDETrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++iter) for(iter = offers.begin(); iter != offers.end(); ++iter)
{ {
KService::Ptr service = *iter; KService::Ptr service = *iter;

@ -40,11 +40,11 @@ KisFilterRegistry::KisFilterRegistry()
Q_ASSERT(KisFilterRegistry::m_singleton == 0); Q_ASSERT(KisFilterRegistry::m_singleton == 0);
KisFilterRegistry::m_singleton = this; KisFilterRegistry::m_singleton = this;
KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("Chalk/Filter"), TDETrader::OfferList offers = TDETrader::self()->query(TQString::fromLatin1("Chalk/Filter"),
TQString::fromLatin1("(Type == 'Service') and " TQString::fromLatin1("(Type == 'Service') and "
"([X-Chalk-Version] == 2)")); "([X-Chalk-Version] == 2)"));
KTrader::OfferList::ConstIterator iter; TDETrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++iter) for(iter = offers.begin(); iter != offers.end(); ++iter)
{ {

@ -43,11 +43,11 @@ KisPaintOpRegistry::KisPaintOpRegistry()
Q_ASSERT(KisPaintOpRegistry::m_singleton == 0); Q_ASSERT(KisPaintOpRegistry::m_singleton == 0);
KisPaintOpRegistry::m_singleton = this; KisPaintOpRegistry::m_singleton = this;
KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("Chalk/Paintop"), TDETrader::OfferList offers = TDETrader::self()->query(TQString::fromLatin1("Chalk/Paintop"),
TQString::fromLatin1("(Type == 'Service') and " TQString::fromLatin1("(Type == 'Service') and "
"([X-Chalk-Version] == 2)")); "([X-Chalk-Version] == 2)"));
KTrader::OfferList::ConstIterator iter; TDETrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++iter) for(iter = offers.begin(); iter != offers.end(); ++iter)
{ {

@ -37,11 +37,11 @@ KisToolRegistry *KisToolRegistry::m_singleton = 0;
KisToolRegistry::KisToolRegistry() KisToolRegistry::KisToolRegistry()
{ {
// Load all modules: color models, paintops, filters // Load all modules: color models, paintops, filters
KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("Chalk/Tool"), TDETrader::OfferList offers = TDETrader::self()->query(TQString::fromLatin1("Chalk/Tool"),
TQString::fromLatin1("(Type == 'Service') and " TQString::fromLatin1("(Type == 'Service') and "
"([X-Chalk-Version] == 2)")); "([X-Chalk-Version] == 2)"));
KTrader::OfferList::ConstIterator iter; TDETrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++iter) for(iter = offers.begin(); iter != offers.end(); ++iter)
{ {

@ -313,10 +313,10 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *parent, const c
m_brushesAndStuffToolBar = new KisControlFrame(mainWindow(), this); m_brushesAndStuffToolBar = new KisControlFrame(mainWindow(), this);
// Load all plugins // Load all plugins
KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("Chalk/ViewPlugin"), TDETrader::OfferList offers = TDETrader::self()->query(TQString::fromLatin1("Chalk/ViewPlugin"),
TQString::fromLatin1("(Type == 'Service') and " TQString::fromLatin1("(Type == 'Service') and "
"([X-Chalk-Version] == 2)")); "([X-Chalk-Version] == 2)"));
KTrader::OfferList::ConstIterator iter; TDETrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++iter) for(iter = offers.begin(); iter != offers.end(); ++iter)
{ {
KService::Ptr service = *iter; KService::Ptr service = *iter;

@ -45,13 +45,13 @@ KoFilter::ConversionStatus GenericFilter::convert( const TQCString &from, const
{ {
//find the right script to use //find the right script to use
KTrader::OfferList offers = KTrader::self()->query("KOfficeGenericFilter", TDETrader::OfferList offers = TDETrader::self()->query("KOfficeGenericFilter",
"(Type == 'Service') and ('KOfficeGenericFilter' in ServiceTypes) and (exist Exec)"); "(Type == 'Service') and ('KOfficeGenericFilter' in ServiceTypes) and (exist Exec)");
if (offers.isEmpty()) if (offers.isEmpty())
return KoFilter::NotImplemented; return KoFilter::NotImplemented;
KTrader::OfferList::ConstIterator it; TDETrader::OfferList::ConstIterator it;
for (it=offers.begin(); it!=offers.end(); ++it) for (it=offers.begin(); it!=offers.end(); ++it)
{ {
kdDebug() << "Got a filter script, exec: " << (*it)->exec() << kdDebug() << "Got a filter script, exec: " << (*it)->exec() <<

@ -49,10 +49,10 @@ KarbonFactory::KarbonFactory( TQObject* parent, const char* name )
KarbonToolRegistry::instance(); KarbonToolRegistry::instance();
// Load plugins // Load plugins
KTrader::OfferList offers = KTrader::self() -> query(TQString::fromLatin1("Karbon/CoreModule"), TDETrader::OfferList offers = TDETrader::self() -> query(TQString::fromLatin1("Karbon/CoreModule"),
TQString::fromLatin1("Type == 'Service'")); TQString::fromLatin1("Type == 'Service'"));
KTrader::OfferList::ConstIterator iter; TDETrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++iter) for(iter = offers.begin(); iter != offers.end(); ++iter)
{ {

@ -55,7 +55,7 @@ Manager::lookup()
m_partlist.clear(); m_partlist.clear();
m_partsByMime.clear(); m_partsByMime.clear();
m_parts.clear(); m_parts.clear();
KTrader::OfferList tlist = KTrader::self()->query("Kexi/Handler", TDETrader::OfferList tlist = TDETrader::self()->query("Kexi/Handler",
"[X-Kexi-PartVersion] == " + TQString::number(KEXI_PART_VERSION)); "[X-Kexi-PartVersion] == " + TQString::number(KEXI_PART_VERSION));
TDEConfig conf("kexirc", true); TDEConfig conf("kexirc", true);
@ -66,7 +66,7 @@ Manager::lookup()
int offset = size; //we will insert not described parts from #offset int offset = size; //we will insert not described parts from #offset
//compute order //compute order
for(KTrader::OfferList::ConstIterator it(tlist.constBegin()); it != tlist.constEnd(); ++it) for(TDETrader::OfferList::ConstIterator it(tlist.constBegin()); it != tlist.constEnd(); ++it)
{ {
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);
TQCString mime = ptr->property("X-Kexi-TypeMime").toCString(); TQCString mime = ptr->property("X-Kexi-TypeMime").toCString();

@ -5673,7 +5673,7 @@ TODO: move this submenu after 'Error report' Entry (requires changes to koffice_
- kexirc added - kexirc added
- added option for KexiBrowserItem to be sorted in FIFO order (top level items - by default, - added option for KexiBrowserItem to be sorted in FIFO order (top level items - by default,
others are sorted in alpha order). Visible Parts' order is now specified (by library name) others are sorted in alpha order). Visible Parts' order is now specified (by library name)
in the Kexi's main config file "kexirc" ([Parts]/Order), because KTrader sorts parts in the Kexi's main config file "kexirc" ([Parts]/Order), because TDETrader sorts parts
by name in aplha order. Unspecified Parts are appended at the end of list. by name in aplha order. Unspecified Parts are appended at the end of list.
This order setting is loaded and used on parts loading (KexiProject::loadHandlers()). This order setting is loaded and used on parts loading (KexiProject::loadHandlers()).

@ -195,8 +195,8 @@ WidgetLibrary::loadFactoryWidgets(WidgetFactory *f)
void void
WidgetLibrary::lookupFactories() WidgetLibrary::lookupFactories()
{ {
KTrader::OfferList tlist = KTrader::self()->query("KFormDesigner/WidgetFactory"); TDETrader::OfferList tlist = TDETrader::self()->query("KFormDesigner/WidgetFactory");
KTrader::OfferList::ConstIterator it, end( tlist.constEnd() ); TDETrader::OfferList::ConstIterator it, end( tlist.constEnd() );
for( it = tlist.constBegin(); it != end; ++it) for( it = tlist.constBegin(); it != end; ++it)
{ {
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);

@ -55,7 +55,7 @@ class DriverPrivate;
where: where:
- CLASS_NAME is actual driver's class name, e.g. MySqlDriver - CLASS_NAME is actual driver's class name, e.g. MySqlDriver
- INTERNAL_NAME is driver name's most significant part (without quotation marks), e.g. mysql - INTERNAL_NAME is driver name's most significant part (without quotation marks), e.g. mysql
Above information uses K_EXPORT_COMPONENT_FACTORY macro for KTrader to find the module's entry point. Above information uses K_EXPORT_COMPONENT_FACTORY macro for TDETrader to find the module's entry point.
For example, this line declares kexidb_mysqldriver.so module's entry point: For example, this line declares kexidb_mysqldriver.so module's entry point:
\code \code
KEXIDB_DRIVER_INFO( MySqlDriver, mysql ); KEXIDB_DRIVER_INFO( MySqlDriver, mysql );

@ -97,8 +97,8 @@ bool DriverManagerInternal::lookupDrivers()
lookupDriversNeeded = false; lookupDriversNeeded = false;
clearError(); clearError();
KTrader::OfferList tlist = KTrader::self()->query("Kexi/DBDriver"); TDETrader::OfferList tlist = TDETrader::self()->query("Kexi/DBDriver");
KTrader::OfferList::ConstIterator it(tlist.constBegin()); TDETrader::OfferList::ConstIterator it(tlist.constBegin());
for(; it != tlist.constEnd(); ++it) for(; it != tlist.constEnd(); ++it)
{ {
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);

@ -100,8 +100,8 @@ bool MigrateManagerInternal::lookupDrivers()
lookupDriversNeeded = false; lookupDriversNeeded = false;
clearError(); clearError();
KTrader::OfferList tlist = KTrader::self()->query("Kexi/MigrationDriver"); TDETrader::OfferList tlist = TDETrader::self()->query("Kexi/MigrationDriver");
KTrader::OfferList::ConstIterator it(tlist.constBegin()); TDETrader::OfferList::ConstIterator it(tlist.constBegin());
for(; it != tlist.constEnd(); ++it) for(; it != tlist.constEnd(); ++it)
{ {
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);

@ -1,7 +1,7 @@
KexiDB: DriverManagerInternal::incRefCount(): 1 KexiDB: DriverManagerInternal::incRefCount(): 1
tdeio (KTrader): KServiceTypeProfile::offers( Kexi/DBDriver, ) tdeio (TDETrader): KServiceTypeProfile::offers( Kexi/DBDriver, )
tdeio (KSycoca): Trying to open tdesycoca from /var/tmp/tdecache-jowenn/tdesycoca tdeio (KSycoca): Trying to open tdesycoca from /var/tmp/tdecache-jowenn/tdesycoca
tdeio (KTrader): Returning 2 offers tdeio (TDETrader): Returning 2 offers
KexiDB: KexiDB::DriverManager::lookupDrivers(): registered driver: mySQL(kexidb_mysqldriver) KexiDB: KexiDB::DriverManager::lookupDrivers(): registered driver: mySQL(kexidb_mysqldriver)
KexiDB: KexiDB::DriverManager::lookupDrivers(): registered driver: SQLite(kexidb_sqlitedriver) KexiDB: KexiDB::DriverManager::lookupDrivers(): registered driver: SQLite(kexidb_sqlitedriver)
newapi: DRIVERS: newapi: DRIVERS:

@ -60,8 +60,8 @@ KWMailMergeDataBase::KWMailMergeDataBase( KWDocument *doc_ )
TQStringList KWMailMergeDataBase::availablePlugins() TQStringList KWMailMergeDataBase::availablePlugins()
{ {
TQStringList tmp; TQStringList tmp;
KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),TQString()); TDETrader::OfferList pluginOffers=TDETrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),TQString());
for (KTrader::OfferList::Iterator it=pluginOffers.begin();*it;++it) for (TDETrader::OfferList::Iterator it=pluginOffers.begin();*it;++it)
{ {
tmp.append((*it)->property("X-TDE-InternalName").toString()); tmp.append((*it)->property("X-TDE-InternalName").toString());
kdDebug()<<"Found mail merge plugin: "<< (*it)->name()<<endl; kdDebug()<<"Found mail merge plugin: "<< (*it)->name()<<endl;
@ -79,7 +79,7 @@ bool KWMailMergeDataBase::loadPlugin(const TQString &name,const TQString &comman
if (rejectdcopcall)return false; if (rejectdcopcall)return false;
TQString constrain=TQString("[X-TDE-InternalName] =='"+name+"'"); TQString constrain=TQString("[X-TDE-InternalName] =='"+name+"'");
kdDebug()<<constrain<<endl; kdDebug()<<constrain<<endl;
KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),constrain); TDETrader::OfferList pluginOffers=TDETrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),constrain);
KService::Ptr it=pluginOffers.first(); KService::Ptr it=pluginOffers.first();
TQVariant verProp=it->property("X-TDE-PluginVersion"); TQVariant verProp=it->property("X-TDE-PluginVersion");
@ -118,10 +118,10 @@ KWMailMergeDataSource *KWMailMergeDataBase::openPluginFor(int type,int &version)
KWMailMergeDataSource *ret=0; KWMailMergeDataSource *ret=0;
TQString constrain=TQString("'%1' in [X-TDE-Capabilities]").arg(((type==KWSLCreate)?KWSLCreate_text:KWSLOpen_text)); TQString constrain=TQString("'%1' in [X-TDE-Capabilities]").arg(((type==KWSLCreate)?KWSLCreate_text:KWSLOpen_text));
kdDebug()<<constrain<<endl; kdDebug()<<constrain<<endl;
KTrader::OfferList pluginOffers=KTrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),constrain); TDETrader::OfferList pluginOffers=TDETrader::self()->query(TQString::fromLatin1("KWord/MailMergePlugin"),constrain);
//Only for debugging //Only for debugging
for (KTrader::OfferList::Iterator it=pluginOffers.begin();*it;++it) for (TDETrader::OfferList::Iterator it=pluginOffers.begin();*it;++it)
{ {
kdDebug()<<"Found mail merge plugin: "<< (*it)->name()<<endl; kdDebug()<<"Found mail merge plugin: "<< (*it)->name()<<endl;
} }
@ -324,7 +324,7 @@ int KWMailMergeDataBase::version() {
* *
******************************************************************/ ******************************************************************/
KWMailMergeChoosePluginDialog::KWMailMergeChoosePluginDialog( KTrader::OfferList offers ) KWMailMergeChoosePluginDialog::KWMailMergeChoosePluginDialog( TDETrader::OfferList offers )
: KDialogBase( Plain, i18n( "Mail Merge Setup" ), Ok | Cancel, Ok, : KDialogBase( Plain, i18n( "Mail Merge Setup" ), Ok | Cancel, Ok,
/*parent*/ 0, "", true ), pluginOffers( offers ) /*parent*/ 0, "", true ), pluginOffers( offers )
{ {
@ -341,7 +341,7 @@ KWMailMergeChoosePluginDialog::KWMailMergeChoosePluginDialog( KTrader::OfferList
descriptionLabel->setFrameShadow( TQFrame::Sunken ); descriptionLabel->setFrameShadow( TQFrame::Sunken );
TQSize old_sizeHint; TQSize old_sizeHint;
for ( KTrader::OfferList::Iterator it = pluginOffers.begin(); *it; ++it ) for ( TDETrader::OfferList::Iterator it = pluginOffers.begin(); *it; ++it )
{ {
chooser->insertItem( (*it)->name() ); chooser->insertItem( (*it)->name() );
old_sizeHint = descriptionLabel->sizeHint(); old_sizeHint = descriptionLabel->sizeHint();

@ -100,7 +100,7 @@ class KWMailMergeChoosePluginDialog : public KDialogBase
public: public:
KWMailMergeChoosePluginDialog( KTrader::OfferList ); KWMailMergeChoosePluginDialog( TDETrader::OfferList );
~KWMailMergeChoosePluginDialog(); ~KWMailMergeChoosePluginDialog();
int currentPlugin() const; int currentPlugin() const;
@ -111,7 +111,7 @@ class KWMailMergeChoosePluginDialog : public KDialogBase
private: private:
class TQComboBox *chooser; class TQComboBox *chooser;
class TQLabel *descriptionLabel; class TQLabel *descriptionLabel;
KTrader::OfferList pluginOffers; TDETrader::OfferList pluginOffers;
}; };
class KWMailMergeConfigDialog : public KDialogBase class KWMailMergeConfigDialog : public KDialogBase

@ -31,7 +31,7 @@
#include <limits.h> // UINT_MAX #include <limits.h> // UINT_MAX
/** /**
* Port from KOffice Trader to KTrader/KActivator (kded) by Simon Hausmann * Port from KOffice Trader to TDETrader/KActivator (kded) by Simon Hausmann
* (c) 1999 Simon Hausmann <hausmann@kde.org> * (c) 1999 Simon Hausmann <hausmann@kde.org>
* Port to KService and simplifications by David Faure <faure@kde.org> * Port to KService and simplifications by David Faure <faure@kde.org>
*/ */
@ -123,9 +123,9 @@ TQValueList<KoDocumentEntry> KoDocumentEntry::query( bool _onlyDocEmb, const TQS
constr += " exist Library"; constr += " exist Library";
// Query the trader // Query the trader
KTrader::OfferList offers = KTrader::self()->query( "KOfficePart", constr ); TDETrader::OfferList offers = TDETrader::self()->query( "KOfficePart", constr );
KTrader::OfferList::ConstIterator it = offers.begin(); TDETrader::OfferList::ConstIterator it = offers.begin();
unsigned int max = offers.count(); unsigned int max = offers.count();
for( unsigned int i = 0; i < max; i++, ++it ) for( unsigned int i = 0; i < max; i++, ++it )
{ {
@ -174,9 +174,9 @@ TQValueList<KoFilterEntry::Ptr> KoFilterEntry::query( const TQString & _constr )
kdDebug(30500) << "KoFilterEntry::query( " << _constr << " )" << endl; kdDebug(30500) << "KoFilterEntry::query( " << _constr << " )" << endl;
TQValueList<KoFilterEntry::Ptr> lst; TQValueList<KoFilterEntry::Ptr> lst;
KTrader::OfferList offers = KTrader::self()->query( "KOfficeFilter", _constr ); TDETrader::OfferList offers = TDETrader::self()->query( "KOfficeFilter", _constr );
KTrader::OfferList::ConstIterator it = offers.begin(); TDETrader::OfferList::ConstIterator it = offers.begin();
unsigned int max = offers.count(); unsigned int max = offers.count();
//kdDebug(30500) << "Query returned " << max << " offers" << endl; //kdDebug(30500) << "Query returned " << max << " offers" << endl;
for( unsigned int i = 0; i < max; i++ ) for( unsigned int i = 0; i < max; i++ )

@ -76,7 +76,7 @@ public:
* This function will query tdesycoca to find all available components. * This function will query tdesycoca to find all available components.
* The result will only contain parts, which are embeddable into a document * The result will only contain parts, which are embeddable into a document
* *
* @param _constr is a constraint expression as used by KTrader. * @param _constr is a constraint expression as used by TDETrader.
* You can use it to set additional restrictions on the available * You can use it to set additional restrictions on the available
* components. * components.
*/ */

@ -475,7 +475,7 @@ bool KoSpeaker::sayWidget(const TQString& msg)
/*static*/ bool KoSpeaker::isKttsdInstalled() /*static*/ bool KoSpeaker::isKttsdInstalled()
{ {
KTrader::OfferList offers = KTrader::self()->query("DCOP/Text-to-Speech", "Name == 'KTTSD'"); TDETrader::OfferList offers = TDETrader::self()->query("DCOP/Text-to-Speech", "Name == 'KTTSD'");
return (offers.count() > 0); return (offers.count() > 0);
} }

Loading…
Cancel
Save