Rename KLock and KTrader to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 054f5901ab
commit da1941ccad

@ -372,7 +372,7 @@
* Added optional automatic reload on external file modification. This is only available with katepart. * Added optional automatic reload on external file modification. This is only available with katepart.
* Added CopyTo plugin. A small utility to do network transparent file copying using KIO. * Added CopyTo plugin. A small utility to do network transparent file copying using KIO.
* Disabled VCS repository creation in the appwizard (doesn't work and the implementation broke the * Disabled VCS repository creation in the appwizard (doesn't work and the implementation broke the
plugin handling) and import (to be reimplemented using KTrader). plugin handling) and import (to be reimplemented using TDETrader).
* Added the simple basics of Plugin Profiles. Will finish this the coming days. * Added the simple basics of Plugin Profiles. Will finish this the coming days.
2004-06-14 Alexander Dymo <adymo@mksat.net> 2004-06-14 Alexander Dymo <adymo@mksat.net>

@ -37,7 +37,7 @@ AdaGlobalOptionsDlg::AdaGlobalOptionsDlg(AdaProjectPart *part, TQWidget* parent,
delete mainSourceUrl; delete mainSourceUrl;
delete defaultopts_button; delete defaultopts_button;
offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'");
ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs); ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs);

@ -35,7 +35,7 @@ protected slots:
private: private:
AdaProjectPart *m_part; AdaProjectPart *m_part;
KTrader::OfferList offers; TDETrader::OfferList offers;
TQString currentCompiler; TQString currentCompiler;
TQStringList service_names; TQStringList service_names;
TQStringList service_execs; TQStringList service_execs;

@ -389,7 +389,7 @@ void AdaProjectPart::loadProjectConfig( )
if (m_compilerExec.isEmpty()) if (m_compilerExec.isEmpty())
{ {
KTrader::OfferList offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'"); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'");
TQValueList<KService::Ptr>::ConstIterator it; TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) { for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-TDevelop-Default").toBool()) { if ((*it)->property("X-TDevelop-Default").toBool()) {

@ -29,7 +29,7 @@ AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* paren
{ {
config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this))); config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this)));
offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'");
ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs); ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs);
@ -106,7 +106,7 @@ void AdaProjectOptionsDlg::readConfig( TQString config )
if (compiler.isEmpty()) if (compiler.isEmpty())
{ {
offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'");
TQValueList<KService::Ptr>::ConstIterator it; TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) { for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-TDevelop-Default").toBool()) { if ((*it)->property("X-TDevelop-Default").toBool()) {

@ -43,7 +43,7 @@ private:
TQString currentConfig; TQString currentConfig;
bool dirty; bool dirty;
KTrader::OfferList offers; TDETrader::OfferList offers;
TQStringList service_names; TQStringList service_names;
TQStringList service_execs; TQStringList service_execs;

@ -64,7 +64,7 @@ int ServiceComboBox::itemForText(const TQString &str, const TQStringList &names)
TQString ServiceComboBox::defaultCompiler() TQString ServiceComboBox::defaultCompiler()
{ {
KTrader::OfferList offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'"); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Ada'");
TQValueList<KService::Ptr>::ConstIterator it; TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) { for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-TDevelop-Default").toBool()) { if ((*it)->property("X-TDevelop-Default").toBool()) {

@ -79,9 +79,9 @@ ConfigureOptionsWidget::ConfigureOptionsWidget(AutoProjectPart *part, TQWidget *
TQDomDocument &dom = *part->projectDom(); TQDomDocument &dom = *part->projectDom();
m_environmentVariablesWidget = new EnvironmentVariablesWidget(dom, "/kdevautoproject/general/envvars", env_groupBox); m_environmentVariablesWidget = new EnvironmentVariablesWidget(dom, "/kdevautoproject/general/envvars", env_groupBox);
coffers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'C'"); coffers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'C'");
cxxoffers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'C++'"); cxxoffers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'C++'");
f77offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Fortran'"); f77offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Fortran'");
ServiceComboBox::insertStringList(cservice_combo, coffers, &cservice_names, &cservice_execs); ServiceComboBox::insertStringList(cservice_combo, coffers, &cservice_names, &cservice_execs);
ServiceComboBox::insertStringList(cxxservice_combo, cxxoffers, &cxxservice_names, &cxxservice_execs); ServiceComboBox::insertStringList(cxxservice_combo, cxxoffers, &cxxservice_names, &cxxservice_execs);

@ -54,7 +54,7 @@ private:
void saveSettings( const TQString &config ); void saveSettings( const TQString &config );
KDevCompilerOptions *createCompilerOptions( const TQString &lang ); KDevCompilerOptions *createCompilerOptions( const TQString &lang );
KTrader::OfferList coffers, cxxoffers, f77offers; TDETrader::OfferList coffers, cxxoffers, f77offers;
TQStringList cservice_names, cservice_execs; TQStringList cservice_names, cservice_execs;
TQStringList cxxservice_names, cxxservice_execs; TQStringList cxxservice_names, cxxservice_execs;
TQStringList f77service_names, f77service_execs; TQStringList f77service_names, f77service_execs;

@ -40,7 +40,7 @@ PascalGlobalOptionsDlg::PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget
delete defaultopts_button; delete defaultopts_button;
offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'");
ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs); ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs);

@ -37,7 +37,7 @@ protected slots:
private: private:
PascalProjectPart *m_part; PascalProjectPart *m_part;
KTrader::OfferList offers; TDETrader::OfferList offers;
TQString currentCompiler; TQString currentCompiler;
TQStringList service_names; TQStringList service_names;
TQStringList service_execs; TQStringList service_execs;

@ -417,7 +417,7 @@ void PascalProjectPart::loadProjectConfig( )
if (m_compilerExec.isEmpty()) if (m_compilerExec.isEmpty())
{ {
KTrader::OfferList offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'"); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'");
TQValueList<KService::Ptr>::ConstIterator it; TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) { for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-TDevelop-Default").toBool()) { if ((*it)->property("X-TDevelop-Default").toBool()) {

@ -31,7 +31,7 @@ PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidg
{ {
config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this))); config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), TQT_TQOBJECT(this)));
offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'");
ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs); ServiceComboBox::insertStringList(compiler_box, offers, &service_names, &service_execs);
@ -108,7 +108,7 @@ void PascalProjectOptionsDlg::readConfig( TQString config )
if (compiler.isEmpty()) if (compiler.isEmpty())
{ {
offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'"); offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'");
TQValueList<KService::Ptr>::ConstIterator it; TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) { for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-TDevelop-Default").toBool()) { if ((*it)->property("X-TDevelop-Default").toBool()) {

@ -45,7 +45,7 @@ private:
TQString currentConfig; TQString currentConfig;
bool dirty; bool dirty;
KTrader::OfferList offers; TDETrader::OfferList offers;
TQStringList service_names; TQStringList service_names;
TQStringList service_execs; TQStringList service_execs;

@ -66,7 +66,7 @@ int ServiceComboBox::itemForText(const TQString &str, const TQStringList &names)
TQString ServiceComboBox::defaultCompiler() TQString ServiceComboBox::defaultCompiler()
{ {
KTrader::OfferList offers = KTrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'"); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/CompilerOptions", "[X-TDevelop-Language] == 'Pascal'");
TQValueList<KService::Ptr>::ConstIterator it; TQValueList<KService::Ptr>::ConstIterator it;
for (it = offers.begin(); it != offers.end(); ++it) { for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->property("X-TDevelop-Default").toBool()) { if ((*it)->property("X-TDevelop-Default").toBool()) {

@ -648,7 +648,7 @@ User preferences for MIME type mappings.
</para> </para>
</formalpara></listitem> </formalpara></listitem>
<listitem><formalpara><title><ulink url="kdeapi:tdeio/KServiceTypeProfile">KTrader</ulink></title> <listitem><formalpara><title><ulink url="kdeapi:tdeio/KServiceTypeProfile">TDETrader</ulink></title>
<para> <para>
Querying for services. Querying for services.
</para> </para>
@ -2481,7 +2481,7 @@ else
<para> <para>
For even more complex queries, there is a full-blown CORBA-like For even more complex queries, there is a full-blown CORBA-like
<ulink url="kdeapi:tdeio/KTrader.html">trader</ulink>. <ulink url="kdeapi:tdeio/TDETrader.html">trader</ulink>.
</para> </para>
<para> <para>

@ -118,7 +118,7 @@ it is because the plugin authors made them this way.</para>
<para>This plugin provides additional "open" alternatives for various context menus in KDevelop.</para></formalpara></listitem> <para>This plugin provides additional "open" alternatives for various context menus in KDevelop.</para></formalpara></listitem>
<listitem><formalpara id="KDevPartExplorer"> <listitem><formalpara id="KDevPartExplorer">
<title>Part Explorer Tool</title> <title>Part Explorer Tool</title>
<para>A Graphical tool for performing KTrader-like queries about registered services</para></formalpara></listitem> <para>A Graphical tool for performing TDETrader-like queries about registered services</para></formalpara></listitem>
<listitem><formalpara id="KDevRegexpTest"> <listitem><formalpara id="KDevRegexpTest">
<title>Regular Expression Tester</title> <title>Regular Expression Tester</title>
<para>Tool to design and test regular expressions against common regexp syntaxes.</para></formalpara></listitem> <para>Tool to design and test regular expressions against common regexp syntaxes.</para></formalpara></listitem>

@ -16,10 +16,10 @@ EditorChooserWidget::EditorChooserWidget(TQWidget *parent, const char *name)
: EditChooser(parent, name) : EditChooser(parent, name)
{ {
// ask the trader which editors he has to offer // ask the trader which editors he has to offer
m_offers = KTrader::self()->query("text/plain", "'KTextEditor/Document' in ServiceTypes"); m_offers = TDETrader::self()->query("text/plain", "'KTextEditor/Document' in ServiceTypes");
// remove the vim-part, it's known to crash // remove the vim-part, it's known to crash
KTrader::OfferList::Iterator it = m_offers.begin(); TDETrader::OfferList::Iterator it = m_offers.begin();
while( it != m_offers.end() ) while( it != m_offers.end() )
{ {
if ( ((*it)->desktopEntryName() == "vimpart") if ( ((*it)->desktopEntryName() == "vimpart")
@ -46,7 +46,7 @@ void EditorChooserWidget::load()
TQString editor = config->readPathEntry("EmbeddedKTextEditor"); TQString editor = config->readPathEntry("EmbeddedKTextEditor");
// add the entries to the listview // add the entries to the listview
KTrader::OfferList::Iterator it; TDETrader::OfferList::Iterator it;
int index=-1, current=0; int index=-1, current=0;
for (it = m_offers.begin(); it != m_offers.end(); ++it) for (it = m_offers.begin(); it != m_offers.end(); ++it)
{ {
@ -81,7 +81,7 @@ void EditorChooserWidget::save()
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
config->setGroup("Editor"); config->setGroup("Editor");
KTrader::OfferList::Iterator it; TDETrader::OfferList::Iterator it;
for (it = m_offers.begin(); it != m_offers.end(); ++it) for (it = m_offers.begin(); it != m_offers.end(); ++it)
if ( EditorPart->currentText() == (*it)->name() ) if ( EditorPart->currentText() == (*it)->name() )
{ {
@ -112,7 +112,7 @@ void EditorChooserWidget::accept()
void EditorChooserWidget::slotEditPartChanged( const TQString & ) void EditorChooserWidget::slotEditPartChanged( const TQString & )
{ {
KTrader::OfferList::Iterator it; TDETrader::OfferList::Iterator it;
for (it = m_offers.begin(); it != m_offers.end(); ++it) for (it = m_offers.begin(); it != m_offers.end(); ++it)
{ {
if ( EditorPart->currentText() == (*it)->name() ) if ( EditorPart->currentText() == (*it)->name() )

@ -28,7 +28,7 @@ private slots:
void accept(); void accept();
private: private:
KTrader::OfferList m_offers; TDETrader::OfferList m_offers;
}; };

@ -34,12 +34,12 @@
// string 'KParts/ReadOnlyPart' must be found in the ServiceTypes // string 'KParts/ReadOnlyPart' must be found in the ServiceTypes
// field. with this, only components of the type we want will be // field. with this, only components of the type we want will be
// returned. // returned.
KTrader::OfferList offers = KTrader::self()->query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes"); TDETrader::OfferList offers = TDETrader::self()->query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes");
KLibFactory *factory = 0; KLibFactory *factory = 0;
// in theory, we only care about the first one.. but let's try all // in theory, we only care about the first one.. but let's try all
// offers just in case the first can't be loaded for some reason // offers just in case the first can't be loaded for some reason
KTrader::OfferList::Iterator it(offers.begin()); TDETrader::OfferList::Iterator it(offers.begin());
for( ; it != offers.end(); ++it) for( ; it != offers.end(); ++it)
{ {
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);

@ -204,10 +204,10 @@ CreatePCSDialog::CreatePCSDialog( CppSupportPart* part, TQWidget* parent, const
m_settings = 0; m_settings = 0;
importerListView->header() ->hide(); importerListView->header() ->hide();
KTrader::OfferList lst = KTrader::self() ->query( "TDevelop/PCSImporter" ); TDETrader::OfferList lst = TDETrader::self() ->query( "TDevelop/PCSImporter" );
kdDebug( 9007 ) << "====================> found " << lst.size() << " importers" << endl; kdDebug( 9007 ) << "====================> found " << lst.size() << " importers" << endl;
for ( KTrader::OfferList::Iterator it = lst.begin(); it != lst.end(); ++it ) for ( TDETrader::OfferList::Iterator it = lst.begin(); it != lst.end(); ++it )
{ {
KService::Ptr ptr = *it; KService::Ptr ptr = *it;

@ -42,7 +42,7 @@ public %{APPNAME}View(QWidget parent)
// string 'KParts/ReadOnlyPart' must be found in the ServiceTypes // string 'KParts/ReadOnlyPart' must be found in the ServiceTypes
// field. with this, only components of the type we want will be // field. with this, only components of the type we want will be
// returned. // returned.
ArrayList offers = KTrader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes"); ArrayList offers = TDETrader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes");
KLibFactory factory = null; KLibFactory factory = null;
// in theory, we only care about the first one.. but let's try all // in theory, we only care about the first one.. but let's try all

@ -69,7 +69,7 @@ X-TDevelop-Properties=
X-TDevelop-Args= X-TDevelop-Args=
@endcode @endcode
<b>Description of parameters in .desktop file:</b> <b>Description of parameters in .desktop file:</b>
- <i>Name</i> is a non-translatable name of a plugin, it is used in KTrader queries - <i>Name</i> is a non-translatable name of a plugin, it is used in TDETrader queries
to search for a plugin (required); to search for a plugin (required);
- <i>GenericName</i> is a translatable name of a plugin, it is used to show - <i>GenericName</i> is a translatable name of a plugin, it is used to show
plugin names in GUI (required); plugin names in GUI (required);
@ -165,7 +165,7 @@ public:
is usually derived from a certain base class and not directly from KDevPlugin. is usually derived from a certain base class and not directly from KDevPlugin.
@param serviceType The service type of an extension (like "TDevelop/SourceFormatter"). @param serviceType The service type of an extension (like "TDevelop/SourceFormatter").
@param constraint The constraint which is applied when quering for the service. This @param constraint The constraint which is applied when quering for the service. This
constraint is a usual KTrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'").
@return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/
template <class Extension> template <class Extension>
Extension *extension(const TQString &serviceType, const TQString &constraint = "") Extension *extension(const TQString &serviceType, const TQString &constraint = "")

@ -24,14 +24,14 @@ KDevPluginController::KDevPluginController()
{ {
} }
KTrader::OfferList KDevPluginController::query(const TQString &serviceType, TDETrader::OfferList KDevPluginController::query(const TQString &serviceType,
const TQString &constraint) const TQString &constraint)
{ {
return KTrader::self()->query(serviceType, return TDETrader::self()->query(serviceType,
TQString("%1 and [X-TDevelop-Version] == %2").arg(constraint).arg(TDEVELOP_PLUGIN_VERSION)); TQString("%1 and [X-TDevelop-Version] == %2").arg(constraint).arg(TDEVELOP_PLUGIN_VERSION));
} }
KTrader::OfferList KDevPluginController::queryPlugins(const TQString &constraint) TDETrader::OfferList KDevPluginController::queryPlugins(const TQString &constraint)
{ {
return query("TDevelop/Plugin", constraint); return query("TDevelop/Plugin", constraint);
} }

@ -68,7 +68,7 @@ public:
required in .desktop file for that plugin. required in .desktop file for that plugin.
@param serviceType The service type of an extension (like "TDevelop/SourceFormatter") @param serviceType The service type of an extension (like "TDevelop/SourceFormatter")
@param constraint The constraint which is applied when quering for the service. This @param constraint The constraint which is applied when quering for the service. This
constraint is a usual KTrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'").
@return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/
virtual KDevPlugin *extension(const TQString &serviceType, const TQString &constraint = "") = 0; virtual KDevPlugin *extension(const TQString &serviceType, const TQString &constraint = "") = 0;
@ -79,14 +79,14 @@ public:
@param constraint A constraint for the service. Do not include plugin version number - it @param constraint A constraint for the service. Do not include plugin version number - it
is done automatically. is done automatically.
@return The list of plugin offers.*/ @return The list of plugin offers.*/
static KTrader::OfferList query(const TQString &serviceType, const TQString &constraint); static TDETrader::OfferList query(const TQString &serviceType, const TQString &constraint);
/**Queries TDevelop plugins. Works like /**Queries TDevelop plugins. Works like
KDevPluginController::query with serviceType set to "TDevelop/Plugin". KDevPluginController::query with serviceType set to "TDevelop/Plugin".
@param constraint A constraint for the service. Do not include plugin version number - it @param constraint A constraint for the service. Do not include plugin version number - it
is done automatically. is done automatically.
@return The list of plugin offers.*/ @return The list of plugin offers.*/
static KTrader::OfferList queryPlugins(const TQString &constraint); static TDETrader::OfferList queryPlugins(const TQString &constraint);
/**Reimplement this function only if your shell supports plugin profiles. /**Reimplement this function only if your shell supports plugin profiles.
@return The list of URLs to the profile resources (files) with given @p extension. @return The list of URLs to the profile resources (files) with given @p extension.

@ -149,7 +149,7 @@ TQString KDevPluginInfo::bugsEmailAddress() const
TQVariant KDevPluginInfo::property(const TQString &name) const TQVariant KDevPluginInfo::property(const TQString &name) const
{ {
KTrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); TDETrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName));
if (offers.count() == 1) if (offers.count() == 1)
return offers.first()->property(name); return offers.first()->property(name);
return TQVariant(); return TQVariant();
@ -162,7 +162,7 @@ TQVariant KDevPluginInfo::operator [](const TQString &name) const
TQStringList KDevPluginInfo::propertyNames( ) const TQStringList KDevPluginInfo::propertyNames( ) const
{ {
KTrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); TDETrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName));
if (offers.count() == 1) if (offers.count() == 1)
return offers.first()->propertyNames(); return offers.first()->propertyNames();
return TQStringList(); return TQStringList();

@ -49,7 +49,7 @@ KScriptAction::KScriptAction( const TQString &scriptDesktopFile, TQObject *inter
m_scriptName = desktop.readName(); m_scriptName = desktop.readName();
m_scriptType = desktop.readType(); m_scriptType = desktop.readType();
TQString scriptTypeQuery = "([X-TDE-Script-Runner] == '" + m_scriptType + "')"; TQString scriptTypeQuery = "([X-TDE-Script-Runner] == '" + m_scriptType + "')";
KTrader::OfferList offers = KTrader::self()->query( "KScriptRunner/KScriptRunner", scriptTypeQuery ); TDETrader::OfferList offers = TDETrader::self()->query( "KScriptRunner/KScriptRunner", scriptTypeQuery );
if ( !offers.isEmpty() ) if ( !offers.isEmpty() )
{ {
m_action = new KAction(m_scriptName, KShortcut(), this, TQT_SLOT(activate()), ac, "script"); m_action = new KAction(m_scriptName, KShortcut(), this, TQT_SLOT(activate()), ac, "script");

@ -339,8 +339,8 @@ void AppWizardDialog::loadVcs()
m_vcsForm->stack->addWidget( 0, i++ ); m_vcsForm->stack->addWidget( 0, i++ );
// We query for all vcs integrators for KDevelop // We query for all vcs integrators for KDevelop
KTrader::OfferList offers = KTrader::self()->query("TDevelop/VCSIntegrator", ""); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/VCSIntegrator", "");
KTrader::OfferList::const_iterator serviceIt = offers.begin(); TDETrader::OfferList::const_iterator serviceIt = offers.begin();
for (; serviceIt != offers.end(); ++serviceIt) for (; serviceIt != offers.end(); ++serviceIt)
{ {
KService::Ptr service = *serviceIt; KService::Ptr service = *serviceIt;
@ -1023,7 +1023,7 @@ void AppWizardDialog::openAfterGeneration()
DomUtil::writeMapEntry( projectDOM, "substmap", m_pCurrentAppInfo->subMap ); DomUtil::writeMapEntry( projectDOM, "substmap", m_pCurrentAppInfo->subMap );
//save the selected vcs //save the selected vcs
KTrader::OfferList offers = KTrader::self()->query("TDevelop/VCSIntegrator", TQString("[X-TDevelop-VCS]=='%1'").arg(m_vcsForm->combo->currentText())); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/VCSIntegrator", TQString("[X-TDevelop-VCS]=='%1'").arg(m_vcsForm->combo->currentText()));
if (offers.count() == 1) if (offers.count() == 1)
{ {
KService::Ptr service = offers.first(); KService::Ptr service = offers.first();

@ -502,8 +502,8 @@ void ImportDialog::scanAvailableVCS()
{ {
// vcsCombo->insertStringList( m_part->registeredVersionControls() ); // vcsCombo->insertStringList( m_part->registeredVersionControls() );
int i = 0; int i = 0;
KTrader::OfferList offers = KTrader::self()->query("TDevelop/VersionControl"); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/VersionControl");
KTrader::OfferList::const_iterator it = offers.begin(); TDETrader::OfferList::const_iterator it = offers.begin();
while( it != offers.end() ) while( it != offers.end() )
{ {
vcsCombo->insertItem( (*it)->genericName(), i++ ); vcsCombo->insertItem( (*it)->genericName(), i++ );

@ -161,8 +161,8 @@ void KDiffTextEdit::searchExtParts()
init = true; init = true;
// search all parts that can handle text/x-diff // search all parts that can handle text/x-diff
KTrader::OfferList offers = KTrader::self()->query("text/x-diff", "('KParts/ReadOnlyPart' in ServiceTypes) and ('text/x-diff' in ServiceTypes) and (DesktopEntryName != 'katepart')"); TDETrader::OfferList offers = TDETrader::self()->query("text/x-diff", "('KParts/ReadOnlyPart' in ServiceTypes) and ('text/x-diff' in ServiceTypes) and (DesktopEntryName != 'katepart')");
KTrader::OfferList::const_iterator it; TDETrader::OfferList::const_iterator it;
for ( it = offers.begin(); it != offers.end(); ++it ) { for ( it = offers.begin(); it != offers.end(); ++it ) {
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);
extPartsTranslated << ptr->name(); extPartsTranslated << ptr->name();

@ -124,11 +124,11 @@ DocumentationPart::~DocumentationPart()
void DocumentationPart::loadDocumentationPlugins() void DocumentationPart::loadDocumentationPlugins()
{ {
KTrader::OfferList docPluginOffers = TDETrader::OfferList docPluginOffers =
KTrader::self()->query(TQString::fromLatin1("TDevelop/DocumentationPlugins"), TDETrader::self()->query(TQString::fromLatin1("TDevelop/DocumentationPlugins"),
TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION)); TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION));
KTrader::OfferList::ConstIterator serviceIt = docPluginOffers.begin(); TDETrader::OfferList::ConstIterator serviceIt = docPluginOffers.begin();
for ( ; serviceIt != docPluginOffers.end(); ++serviceIt ) for ( ; serviceIt != docPluginOffers.end(); ++serviceIt )
{ {
KService::Ptr docPluginService; KService::Ptr docPluginService;

@ -67,10 +67,10 @@ void OpenWithPart::fillContextMenu(TQPopupMenu *popup, const Context *context)
// hmmm.. what to do here? open every different mimetype seperately? Just go with the first for now.. // hmmm.. what to do here? open every different mimetype seperately? Just go with the first for now..
TQString mimeType = KMimeType::findByURL(m_urls.first(), 0, true, true)->name(); TQString mimeType = KMimeType::findByURL(m_urls.first(), 0, true, true)->name();
KTrader::OfferList offers = KTrader::self()->query(mimeType, "Type == 'Application'"); TDETrader::OfferList offers = TDETrader::self()->query(mimeType, "Type == 'Application'");
if (offers.count() > 0) if (offers.count() > 0)
{ {
KTrader::OfferList::Iterator it; TDETrader::OfferList::Iterator it;
for (it = offers.begin(); it != offers.end(); ++it) for (it = offers.begin(); it != offers.end(); ++it)
{ {
KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, TQFile::encodeName( (*it)->desktopEntryPath() ).data()); KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, TQFile::encodeName( (*it)->desktopEntryPath() ).data());

@ -1,7 +1,7 @@
/** \class PartExplorerPlugin /** \class PartExplorerPlugin
A Graphical tool for performing KTrader-like queries about registered services A Graphical tool for performing TDETrader-like queries about registered services
PartExplorer is a frontend to KTrader class (http://developer.kde.org/documentation/library/3.1-api/tdeio/html/classKTrader.html) PartExplorer is a frontend to TDETrader class (http://developer.kde.org/documentation/library/3.1-api/tdeio/html/classTDETrader.html)
and uses its syntax, no more no less: so before saying "it really sucks", give a look at and uses its syntax, no more no less: so before saying "it really sucks", give a look at
http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html. http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html.
@ -17,7 +17,7 @@ Last updated on 28.07.2003 by Mario Scalas
\maintainer <a href="mailto:mario.scalas AT libero.it">Mario Scalas</a> \maintainer <a href="mailto:mario.scalas AT libero.it">Mario Scalas</a>
\feature Performs KTrader-like queries about registered services \feature Performs TDETrader-like queries about registered services
\bug bugs in <a href="http://bugs.kde.org/buglist.cgi?product=tdevelop&component=partexplorer&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=Bug+Number">partexplorer component at Bugzilla database</a> \bug bugs in <a href="http://bugs.kde.org/buglist.cgi?product=tdevelop&component=partexplorer&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=Bug+Number">partexplorer component at Bugzilla database</a>

@ -1,37 +1,37 @@
[Desktop Entry] [Desktop Entry]
Type=Service Type=Service
Exec=blubb Exec=blubb
Comment=A Graphical tool for performing KTrader-like queries about registered services Comment=A Graphical tool for performing TDETrader-like queries about registered services
Comment[ca]=Una eina gràfica per a realitzar consultes del tipus KTrader sobre els serveis registrats Comment[ca]=Una eina gràfica per a realitzar consultes del tipus TDETrader sobre els serveis registrats
Comment[da]=Et grafisk værktøj til at udføre KTrader-lignende forespørgsler om registrerede tjenester Comment[da]=Et grafisk værktøj til at udføre TDETrader-lignende forespørgsler om registrerede tjenester
Comment[de]=Ein grafisches Werkzeug, mit dem Abfragen nach im System verfügbaren Komponten durchgeführt werden können Comment[de]=Ein grafisches Werkzeug, mit dem Abfragen nach im System verfügbaren Komponten durchgeführt werden können
Comment[el]=Ένα γραφικό εργαλείο για την εκτέλεση ερωτήσεων όπως το KTrader σχετικά με καταχωρημένες υπηρεσίες Comment[el]=Ένα γραφικό εργαλείο για την εκτέλεση ερωτήσεων όπως το TDETrader σχετικά με καταχωρημένες υπηρεσίες
Comment[es]=Una herramienta gráfica para realizar consultas del tipo KTrader sobre los servicios registrados Comment[es]=Una herramienta gráfica para realizar consultas del tipo TDETrader sobre los servicios registrados
Comment[et]=Graafiline vahend KTraderi-laadsete päringute sooritamiseks registreeritud teenuste kohta Comment[et]=Graafiline vahend TDETraderi-laadsete päringute sooritamiseks registreeritud teenuste kohta
Comment[eu]=Erregistratutako zerbitzuei buruzko kontsultak egiteko, KTrader-en antzeko tresna grafikoa Comment[eu]=Erregistratutako zerbitzuei buruzko kontsultak egiteko, TDETrader-en antzeko tresna grafikoa
Comment[fa]=یک ابزار نگاره‌ای برای انجام KTrader- مثل پرس‌وجوهایی در مورد خدمات ثبت‌شده Comment[fa]=یک ابزار نگاره‌ای برای انجام TDETrader- مثل پرس‌وجوهایی در مورد خدمات ثبت‌شده
Comment[fr]=Un outil graphique pour effectuer des requêtes de type KTrader sur les services enregistrés Comment[fr]=Un outil graphique pour effectuer des requêtes de type TDETrader sur les services enregistrés
Comment[gl]=Unha ferramente gráfica para realizar peticións tipo KTrader dos servizos rexistrados Comment[gl]=Unha ferramente gráfica para realizar peticións tipo TDETrader dos servizos rexistrados
Comment[hu]=Grafikus felületű program a regisztrált szolgáltatások KTrader-szerű lekérdezéséhez Comment[hu]=Grafikus felületű program a regisztrált szolgáltatások TDETrader-szerű lekérdezéséhez
Comment[it]=Uno strumento grafico per eseguire interrogazioni tipo KTrader sui servizi registrati Comment[it]=Uno strumento grafico per eseguire interrogazioni tipo TDETrader sui servizi registrati
Comment[ja]=登録されたサービスに関する KTrader のような質問を実行するための視覚化されたツール Comment[ja]=登録されたサービスに関する TDETrader のような質問を実行するための視覚化されたツール
Comment[ms]=Alatan bergrafik untuk melaksanakan pertanyaan seperti-KTrader mengenai servis berdaftar Comment[ms]=Alatan bergrafik untuk melaksanakan pertanyaan seperti-TDETrader mengenai servis berdaftar
Comment[nds]=En graafsch Warktüüch för KTrader-liek Anfragen över indragen Deensten. Comment[nds]=En graafsch Warktüüch för TDETrader-liek Anfragen över indragen Deensten.
Comment[ne]=दर्ता गरेको सेवाका बारेमा क्वेरीहरू जस्तै-KTrader कार्यसम्पादन गर्नका लागि एउटा ग्राफिकल उपकरण Comment[ne]=दर्ता गरेको सेवाका बारेमा क्वेरीहरू जस्तै-TDETrader कार्यसम्पादन गर्नका लागि एउटा ग्राफिकल उपकरण
Comment[nl]=Een grafische tool om naar geregistreerde diensten te zoeken Comment[nl]=Een grafische tool om naar geregistreerde diensten te zoeken
Comment[pl]=Narzędzie graficzne do wykonywania zapytań na temat zarejestrowanych usług (jak KTrader) Comment[pl]=Narzędzie graficzne do wykonywania zapytań na temat zarejestrowanych usług (jak TDETrader)
Comment[pt]=Uma ferramenta gráfica para efectuar pesquisas do tipo KTrader sobre os serviços registados Comment[pt]=Uma ferramenta gráfica para efectuar pesquisas do tipo TDETrader sobre os serviços registados
Comment[pt_BR]=Uma ferramenta Gráfica para realizar consultas como KTrader sobre serviços registrados Comment[pt_BR]=Uma ferramenta Gráfica para realizar consultas como TDETrader sobre serviços registrados
Comment[ru]=Графическое средство для выполнения запросов KTrader о зарегистрированных сервисах. Comment[ru]=Графическое средство для выполнения запросов TDETrader о зарегистрированных сервисах.
Comment[sk]=Grafický nástroj pre vyhľadávanie KTraderregistrovaných služieb Comment[sk]=Grafický nástroj pre vyhľadávanie TDETraderregistrovaných služieb
Comment[sr]=Графички алат за обављање упита налик KTrader-овим о регистрованим сервисима Comment[sr]=Графички алат за обављање упита налик TDETrader-овим о регистрованим сервисима
Comment[sr@Latn]=Grafički alat za obavljanje upita nalik KTrader-ovim o registrovanim servisima Comment[sr@Latn]=Grafički alat za obavljanje upita nalik TDETrader-ovim o registrovanim servisima
Comment[sv]=Ett grafiskt verktyg för att utföra KTrader-liknande förfrågningar om registrerade tjänster. Comment[sv]=Ett grafiskt verktyg för att utföra TDETrader-liknande förfrågningar om registrerade tjänster.
Comment[ta]=வரைகலை கருவி மூலம் பதிப்பு சேவையில் இருந்து Kட்ரேடர் கேள்விகளை செயலாக்கலாம். Comment[ta]=வரைகலை கருவி மூலம் பதிப்பு சேவையில் இருந்து Kட்ரேடர் கேள்விகளை செயலாக்கலாம்.
Comment[tg]=Воситаи графикӣ барои иҷро намудани дархостҳои KTrader дар бораи қайдкунии муҳаррирҳо Comment[tg]=Воситаи графикӣ барои иҷро намудани дархостҳои TDETrader дар бораи қайдкунии муҳаррирҳо
Comment[tr]=Kayıtlı servisler için KTrader-benzeri sorgular yapmayı sağlayan bir grafiksel araç Comment[tr]=Kayıtlı servisler için TDETrader-benzeri sorgular yapmayı sağlayan bir grafiksel araç
Comment[zh_CN]=调用KTrader的图形工具就像查询已经注册的服务。 Comment[zh_CN]=调用TDETrader的图形工具就像查询已经注册的服务。
Comment[zh_TW]=執行類似 KTrader 查詢註冊服務的圖形化工具 Comment[zh_TW]=執行類似 TDETrader 查詢註冊服務的圖形化工具
Name=KDevPartExplorer Name=KDevPartExplorer
Name[da]=TDevelop Part-søger Name[da]=TDevelop Part-søger
Name[nds]=TDevelop-Komponentkieker Name[nds]=TDevelop-Komponentkieker

@ -42,8 +42,8 @@ PartExplorerPlugin::PartExplorerPlugin( TQObject *parent, const char *name, con
KAction *action = new KAction( i18n("&Part Explorer"), 0, this, TQT_SLOT(slotShowForm()), KAction *action = new KAction( i18n("&Part Explorer"), 0, this, TQT_SLOT(slotShowForm()),
actionCollection(), "show_partexplorerform" ); actionCollection(), "show_partexplorerform" );
action->setToolTip(i18n("KTrader query execution")); action->setToolTip(i18n("TDETrader query execution"));
action->setWhatsThis(i18n("<b>Part explorer</b><p>Shows a dialog for KTrader query execution. Search your TDE documentation for more information about TDE services and KTrader.")); action->setWhatsThis(i18n("<b>Part explorer</b><p>Shows a dialog for TDETrader query execution. Search your TDE documentation for more information about TDE services and TDETrader."));
} }
PartExplorerPlugin::~PartExplorerPlugin() PartExplorerPlugin::~PartExplorerPlugin()

@ -168,7 +168,7 @@ void PartExplorerForm::slotSearchRequested()
" serviceType = " << serviceType << ", constraints = " << constraints << endl; " serviceType = " << serviceType << ", constraints = " << constraints << endl;
// Query for requested services // Query for requested services
KTrader::OfferList foundServices = KTrader::self()->query( serviceType, constraints ); TDETrader::OfferList foundServices = TDETrader::self()->query( serviceType, constraints );
fillServiceList( foundServices ); fillServiceList( foundServices );
} }
@ -185,7 +185,7 @@ void PartExplorerForm::slotDisplayError( TQString errorMessage )
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void PartExplorerForm::fillServiceList( const KTrader::OfferList &services ) void PartExplorerForm::fillServiceList( const TDETrader::OfferList &services )
{ {
this->m_resultsList->clear(); this->m_resultsList->clear();
@ -199,7 +199,7 @@ void PartExplorerForm::fillServiceList( const KTrader::OfferList &services )
KListViewItem *rootItem = 0; KListViewItem *rootItem = 0;
KTrader::OfferList::ConstIterator it = services.begin(); TDETrader::OfferList::ConstIterator it = services.begin();
for ( ; it != services.end(); ++it ) for ( ; it != services.end(); ++it )
{ {
KService::Ptr service = (*it); KService::Ptr service = (*it);

@ -34,7 +34,7 @@ public:
/** /**
* Fills the widget with data gathered for system's query. * Fills the widget with data gathered for system's query.
*/ */
void fillServiceList( const KTrader::OfferList &services ); void fillServiceList( const TDETrader::OfferList &services );
public slots: public slots:
void slotDisplayError( TQString ); void slotDisplayError( TQString );

@ -24,7 +24,7 @@
<string>PartExplorer</string> <string>PartExplorer</string>
</property> </property>
<property name="toolTip" stdset="0"> <property name="toolTip" stdset="0">
<string>This is a front-end to KDE's KTrader: search your KDE documentation for more information about KDE services and KTrader</string> <string>This is a front-end to KDE's TDETrader: search your KDE documentation for more information about KDE services and TDETrader</string>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">

@ -50,7 +50,7 @@ ReplaceDlgImpl::ReplaceDlgImpl(TQWidget* parent, const char* name, bool modal, W
connect( strings_regexp_radio, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleExpression( bool ) ) ); connect( strings_regexp_radio, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleExpression( bool ) ) );
// disable the editor button if the regexp editor isn't installed // disable the editor button if the regexp editor isn't installed
if ( KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) if ( TDETrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{ {
strings_regexp_radio->disconnect( regexp_button ); strings_regexp_radio->disconnect( regexp_button );
} }

@ -111,14 +111,14 @@ void SnippetPart::slotConfigWidget( KDialogBase *dlg )
TQStringList SnippetPart::getAllLanguages() TQStringList SnippetPart::getAllLanguages()
{ {
KTrader::OfferList languageSupportOffers = TDETrader::OfferList languageSupportOffers =
KTrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"), TDETrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"),
TQString::fromLatin1("[X-TDevelop-Version] == %1" TQString::fromLatin1("[X-TDevelop-Version] == %1"
).arg( TDEVELOP_PLUGIN_VERSION )); ).arg( TDEVELOP_PLUGIN_VERSION ));
TQStringList languages; TQStringList languages;
for (KTrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it) for (TDETrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it)
{ {
TQString language = (*it)->property("X-TDevelop-Language").toString(); TQString language = (*it)->property("X-TDevelop-Language").toString();
languages.append(language); languages.append(language);

@ -52,8 +52,8 @@ void VCSManagerProjectConfig::setup( )
int current = 0; int current = 0;
TQString constraint = TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION); TQString constraint = TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION);
KTrader::OfferList offers = KTrader::self()->query("TDevelop/VersionControl", constraint ); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/VersionControl", constraint );
KTrader::OfferList::const_iterator it = offers.begin(); TDETrader::OfferList::const_iterator it = offers.begin();
for ( int i = 1; it != offers.end(); ++it, ++i ) for ( int i = 1; it != offers.end(); ++it, ++i )
{ {
vcsCombo->insertItem( (*it)->genericName(), i ); vcsCombo->insertItem( (*it)->genericName(), i );

@ -105,8 +105,8 @@ LanguageSelectWidget::~LanguageSelectWidget()
void LanguageSelectWidget::readProjectConfig() void LanguageSelectWidget::readProjectConfig()
{ {
KTrader::OfferList languageSupportOffers = TDETrader::OfferList languageSupportOffers =
KTrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"), TDETrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"),
TQString::fromLatin1("[X-TDevelop-Version] == %1" TQString::fromLatin1("[X-TDevelop-Version] == %1"
).arg( TDEVELOP_PLUGIN_VERSION )); ).arg( TDEVELOP_PLUGIN_VERSION ));
@ -114,7 +114,7 @@ void LanguageSelectWidget::readProjectConfig()
TQString language = DomUtil::readEntry(m_projectDom, "/general/primarylanguage"); TQString language = DomUtil::readEntry(m_projectDom, "/general/primarylanguage");
_currentLanguage->setText(i18n("Primary language is '%1'. Please select additional languages the project might contain.").arg(language)); _currentLanguage->setText(i18n("Primary language is '%1'. Please select additional languages the project might contain.").arg(language));
for (KTrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it) for (TDETrader::OfferList::ConstIterator it = languageSupportOffers.begin(); it != languageSupportOffers.end(); ++it)
{ {
TQString la = (*it)->property("X-TDevelop-Language").toString(); TQString la = (*it)->property("X-TDevelop-Language").toString();
if (la == language) if (la == language)

@ -593,14 +593,14 @@ void PartController::showDocument(const KURL &url, bool newWin)
KParts::Factory *PartController::findPartFactory(const TQString &mimeType, const TQString &partType, const TQString &preferredName) KParts::Factory *PartController::findPartFactory(const TQString &mimeType, const TQString &partType, const TQString &preferredName)
{ {
KTrader::OfferList offers = KTrader::self()->query(mimeType, TQString("'%1' in ServiceTypes").arg(partType)); TDETrader::OfferList offers = TDETrader::self()->query(mimeType, TQString("'%1' in ServiceTypes").arg(partType));
if (offers.count() > 0) if (offers.count() > 0)
{ {
KService::Ptr ptr = 0; KService::Ptr ptr = 0;
// if there is a preferred plugin we'll take it // if there is a preferred plugin we'll take it
if ( !preferredName.isEmpty() ) { if ( !preferredName.isEmpty() ) {
KTrader::OfferList::Iterator it; TDETrader::OfferList::Iterator it;
for (it = offers.begin(); it != offers.end(); ++it) { for (it = offers.begin(); it != offers.end(); ++it) {
if ((*it)->desktopEntryName() == preferredName) { if ((*it)->desktopEntryName() == preferredName) {
ptr = (*it); ptr = (*it);

@ -49,8 +49,8 @@ namespace
template <class ComponentType> template <class ComponentType>
ComponentType *loadDefaultPart( const TQString &serviceType ) ComponentType *loadDefaultPart( const TQString &serviceType )
{ {
KTrader::OfferList offers = KTrader::self()->query(serviceType, TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION)); TDETrader::OfferList offers = TDETrader::self()->query(serviceType, TQString("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION));
KTrader::OfferList::ConstIterator serviceIt = offers.begin(); TDETrader::OfferList::ConstIterator serviceIt = offers.begin();
for ( ; serviceIt != offers.end(); ++serviceIt ) { for ( ; serviceIt != offers.end(); ++serviceIt ) {
KService::Ptr service = *serviceIt; KService::Ptr service = *serviceIt;
@ -119,27 +119,27 @@ PluginController::~PluginController()
void PluginController::loadCorePlugins() void PluginController::loadCorePlugins()
{ {
KTrader::OfferList coreOffers = m_engine.offers(m_profile, ProfileEngine::Core); TDETrader::OfferList coreOffers = m_engine.offers(m_profile, ProfileEngine::Core);
loadPlugins( coreOffers ); loadPlugins( coreOffers );
} }
void PluginController::loadGlobalPlugins( const TQStringList & ignorePlugins ) void PluginController::loadGlobalPlugins( const TQStringList & ignorePlugins )
{ {
KTrader::OfferList globalOffers = m_engine.offers(m_profile, ProfileEngine::Global); TDETrader::OfferList globalOffers = m_engine.offers(m_profile, ProfileEngine::Global);
loadPlugins( globalOffers, ignorePlugins ); loadPlugins( globalOffers, ignorePlugins );
} }
void PluginController::loadProjectPlugins( const TQStringList & ignorePlugins ) void PluginController::loadProjectPlugins( const TQStringList & ignorePlugins )
{ {
KTrader::OfferList projectOffers = m_engine.offers(m_profile, ProfileEngine::Project); TDETrader::OfferList projectOffers = m_engine.offers(m_profile, ProfileEngine::Project);
loadPlugins( projectOffers, ignorePlugins ); loadPlugins( projectOffers, ignorePlugins );
} }
void PluginController::loadPlugins( KTrader::OfferList offers, const TQStringList & ignorePlugins ) void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringList & ignorePlugins )
{ {
TopLevel::getInstance()->main()->setFocus(); TopLevel::getInstance()->main()->setFocus();
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) for (TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{ {
TQString name = (*it)->desktopEntryName(); TQString name = (*it)->desktopEntryName();
@ -173,10 +173,10 @@ void PluginController::unloadProjectPlugins( )
{ {
// this is nasty, but we need to unload the version control plugin too, and the // this is nasty, but we need to unload the version control plugin too, and the
// right moment to do this is here // right moment to do this is here
KTrader::OfferList offers = KTrader::self()->query("TDevelop/VersionControl", ""); TDETrader::OfferList offers = TDETrader::self()->query("TDevelop/VersionControl", "");
offers += m_engine.offers(m_profile, ProfileEngine::Project); offers += m_engine.offers(m_profile, ProfileEngine::Project);
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) for (TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{ {
TQString name = (*it)->desktopEntryName(); TQString name = (*it)->desktopEntryName();
@ -281,8 +281,8 @@ const TQValueList<KDevPlugin*> PluginController::loadedPlugins()
KDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) KDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint )
{ {
KTrader::OfferList offers = KDevPluginController::query(serviceType, constraint); TDETrader::OfferList offers = KDevPluginController::query(serviceType, constraint);
for (KTrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it) for (TDETrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it)
{ {
KDevPlugin *ext = m_parts[(*it)->desktopEntryName()]; KDevPlugin *ext = m_parts[(*it)->desktopEntryName()];
if (ext) return ext; if (ext) return ext;
@ -292,10 +292,10 @@ KDevPlugin * PluginController::extension( const TQString & serviceType, const TQ
KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint )
{ {
KTrader::OfferList offers = KDevPluginController::query( serviceType, constraint ); TDETrader::OfferList offers = KDevPluginController::query( serviceType, constraint );
if ( !offers.size() == 1 ) return 0; if ( !offers.size() == 1 ) return 0;
KTrader::OfferList::const_iterator it = offers.constBegin(); TDETrader::OfferList::const_iterator it = offers.constBegin();
TQString name = (*it)->desktopEntryName(); TQString name = (*it)->desktopEntryName();
KDevPlugin * plugin = 0; KDevPlugin * plugin = 0;
@ -334,8 +334,8 @@ TQString PluginController::changeProfile(const TQString &newProfile)
{ {
kdDebug() << "CHANGING PROFILE: from " << currentProfile() << " to " << newProfile << endl; kdDebug() << "CHANGING PROFILE: from " << currentProfile() << " to " << newProfile << endl;
TQStringList unload; TQStringList unload;
KTrader::OfferList coreLoad; TDETrader::OfferList coreLoad;
KTrader::OfferList globalLoad; TDETrader::OfferList globalLoad;
m_engine.diffProfiles(ProfileEngine::Core, currentProfile(), newProfile, unload, coreLoad); m_engine.diffProfiles(ProfileEngine::Core, currentProfile(), newProfile, unload, coreLoad);
m_engine.diffProfiles(ProfileEngine::Global, currentProfile(), newProfile, unload, globalLoad); m_engine.diffProfiles(ProfileEngine::Global, currentProfile(), newProfile, unload, globalLoad);

@ -78,7 +78,7 @@ protected:
private slots: private slots:
// void slotConfigWidget( KDialogBase* ); // void slotConfigWidget( KDialogBase* );
void loadCorePlugins(); void loadCorePlugins();
void loadPlugins( KTrader::OfferList offers, const TQStringList & ignorePlugins = TQStringList() ); void loadPlugins( TDETrader::OfferList offers, const TQStringList & ignorePlugins = TQStringList() );
void unloadPlugins(); void unloadPlugins();
private: private:

@ -120,18 +120,18 @@ void PluginSelectDialog::init( )
kdDebug(9000) << " *** loadedPluginDesktopNames: " << loadedPluginDesktopNames << endl; kdDebug(9000) << " *** loadedPluginDesktopNames: " << loadedPluginDesktopNames << endl;
KTrader::OfferList localOffers; TDETrader::OfferList localOffers;
if ( ProjectManager::getInstance()->projectLoaded() ) if ( ProjectManager::getInstance()->projectLoaded() )
{ {
localOffers = PluginController::getInstance()->engine().offers( localOffers = PluginController::getInstance()->engine().offers(
PluginController::getInstance()->currentProfile(), ProfileEngine::Project ); PluginController::getInstance()->currentProfile(), ProfileEngine::Project );
} }
KTrader::OfferList globalOffers = PluginController::getInstance()->engine().offers( TDETrader::OfferList globalOffers = PluginController::getInstance()->engine().offers(
PluginController::getInstance()->currentProfile(), ProfileEngine::Global); PluginController::getInstance()->currentProfile(), ProfileEngine::Global);
KTrader::OfferList offers = localOffers + globalOffers; TDETrader::OfferList offers = localOffers + globalOffers;
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) for (TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{ {
// parse out any existing url to make it clickable // parse out any existing url to make it clickable
TQString Comment = (*it)->comment(); TQString Comment = (*it)->comment();

@ -115,9 +115,9 @@ void ProfileEditor::refresh()
void ProfileEditor::refreshPropertyCombo() void ProfileEditor::refreshPropertyCombo()
{ {
KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin")); TDETrader::OfferList list = TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"));
TQStringList props; TQStringList props;
for (KTrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it) for (TDETrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)
{ {
TQStringList currProps = (*it)->property("X-TDevelop-Properties").toStringList(); TQStringList currProps = (*it)->property("X-TDevelop-Properties").toStringList();
for (TQStringList::const_iterator p = currProps.constBegin(); for (TQStringList::const_iterator p = currProps.constBegin();
@ -141,14 +141,14 @@ void ProfileEditor::refreshAvailableList()
allProject = new KListViewItem(allList, i18n("Project")); allProject = new KListViewItem(allList, i18n("Project"));
allProject->setOpen(true); allProject->setOpen(true);
KTrader::OfferList olist = engine.allOffers(ProfileEngine::Core); TDETrader::OfferList olist = engine.allOffers(ProfileEngine::Core);
for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it) for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
new KListViewItem(allCore, (*it)->desktopEntryName(), (*it)->genericName()); new KListViewItem(allCore, (*it)->desktopEntryName(), (*it)->genericName());
olist = engine.allOffers(ProfileEngine::Global); olist = engine.allOffers(ProfileEngine::Global);
for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it) for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
new KListViewItem(allGlobal, (*it)->desktopEntryName(), (*it)->genericName()); new KListViewItem(allGlobal, (*it)->desktopEntryName(), (*it)->genericName());
olist = engine.allOffers(ProfileEngine::Project); olist = engine.allOffers(ProfileEngine::Project);
for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it) for (TDETrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
new KListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName()); new KListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName());
} }
@ -205,20 +205,20 @@ void ProfileEditor::fillPluginsList(Profile *profile)
KListViewItem *project = new KListViewItem(pluginsView, i18n("Project Plugins")); KListViewItem *project = new KListViewItem(pluginsView, i18n("Project Plugins"));
project->setOpen(true); project->setOpen(true);
KTrader::OfferList coreOffers = engine.offers(profile->name(), ProfileEngine::Core); TDETrader::OfferList coreOffers = engine.offers(profile->name(), ProfileEngine::Core);
for (KTrader::OfferList::const_iterator it = coreOffers.constBegin(); for (TDETrader::OfferList::const_iterator it = coreOffers.constBegin();
it != coreOffers.constEnd(); ++it) it != coreOffers.constEnd(); ++it)
new KListViewItem(core, (*it)->desktopEntryName(), (*it)->genericName(), new KListViewItem(core, (*it)->desktopEntryName(), (*it)->genericName(),
(*it)->property("X-TDevelop-Properties").toStringList().join(", ")); (*it)->property("X-TDevelop-Properties").toStringList().join(", "));
KTrader::OfferList globalOffers = engine.offers(profile->name(), ProfileEngine::Global); TDETrader::OfferList globalOffers = engine.offers(profile->name(), ProfileEngine::Global);
for (KTrader::OfferList::const_iterator it = globalOffers.constBegin(); for (TDETrader::OfferList::const_iterator it = globalOffers.constBegin();
it != globalOffers.constEnd(); ++it) it != globalOffers.constEnd(); ++it)
new KListViewItem(global, (*it)->desktopEntryName(), (*it)->genericName(), new KListViewItem(global, (*it)->desktopEntryName(), (*it)->genericName(),
(*it)->property("X-TDevelop-Properties").toStringList().join(", ")); (*it)->property("X-TDevelop-Properties").toStringList().join(", "));
KTrader::OfferList projectOffers = engine.offers(profile->name(), ProfileEngine::Project); TDETrader::OfferList projectOffers = engine.offers(profile->name(), ProfileEngine::Project);
for (KTrader::OfferList::const_iterator it = projectOffers.constBegin(); for (TDETrader::OfferList::const_iterator it = projectOffers.constBegin();
it != projectOffers.constEnd(); ++it) it != projectOffers.constEnd(); ++it)
new KListViewItem(project, (*it)->desktopEntryName(), (*it)->genericName(), new KListViewItem(project, (*it)->desktopEntryName(), (*it)->genericName(),
(*it)->property("X-TDevelop-Properties").toStringList().join(", ")); (*it)->property("X-TDevelop-Properties").toStringList().join(", "));

@ -69,14 +69,14 @@ void ProfileEngine::processDir(const TQString &dir, const TQString &currPath, TQ
} }
} }
KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType offerType) TDETrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType offerType)
{ {
ProfileListing listing; ProfileListing listing;
Profile *profile = 0; Profile *profile = 0;
getProfileWithListing(listing, &profile, profileName); getProfileWithListing(listing, &profile, profileName);
if (!profile) if (!profile)
return KTrader::OfferList(); return TDETrader::OfferList();
TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION); TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION);
switch (offerType) { switch (offerType) {
@ -106,12 +106,12 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
<< " " << constraint << endl << endl << endl;*/ << " " << constraint << endl << endl << endl;*/
//END debug //END debug
KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint); TDETrader::OfferList list = TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
TQStringList names; TQStringList names;
/* Wrong, this is not what we want to do. /* Wrong, this is not what we want to do.
Profile::EntryList disableList = profile->list(Profile::ExplicitDisable); Profile::EntryList disableList = profile->list(Profile::ExplicitDisable);
KTrader::OfferList::iterator it = list.begin(); TDETrader::OfferList::iterator it = list.begin();
while (it != list.end()) while (it != list.end())
{ {
TQString name = (*it)->desktopEntryName(); TQString name = (*it)->desktopEntryName();
@ -131,7 +131,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
continue; continue;
TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION); TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION);
constraint += TQString::fromLatin1("and [Name] == '%1'").arg((*it).name); constraint += TQString::fromLatin1("and [Name] == '%1'").arg((*it).name);
KTrader::OfferList enable = KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint); TDETrader::OfferList enable = TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
list += enable; list += enable;
} }
@ -139,7 +139,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
kdDebug() << "=============" << endl kdDebug() << "=============" << endl
<< " =============" << endl << " =============" << endl
<< " ============= Plugins for Profile:" << endl; << " ============= Plugins for Profile:" << endl;
for (KTrader::OfferList::const_iterator it = list.begin(); it != list.end(); ++it) for (TDETrader::OfferList::const_iterator it = list.begin(); it != list.end(); ++it)
kdDebug() << " " << (*it)->name() << endl; kdDebug() << " " << (*it)->name() << endl;
kdDebug() << endl << endl; kdDebug() << endl << endl;
//END debug*/ //END debug*/
@ -147,7 +147,7 @@ KTrader::OfferList ProfileEngine::offers(const TQString &profileName, OfferType
return list; return list;
} }
KTrader::OfferList ProfileEngine::allOffers(OfferType offerType) TDETrader::OfferList ProfileEngine::allOffers(OfferType offerType)
{ {
TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION); TQString constraint = TQString::fromLatin1("[X-TDevelop-Version] == %1").arg(TDEVELOP_PLUGIN_VERSION);
switch (offerType) { switch (offerType) {
@ -161,7 +161,7 @@ KTrader::OfferList ProfileEngine::allOffers(OfferType offerType)
constraint += TQString::fromLatin1(" and [X-TDevelop-Scope] == 'Core'"); constraint += TQString::fromLatin1(" and [X-TDevelop-Scope] == 'Core'");
break; break;
} }
return KTrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint); return TDETrader::self()->query(TQString::fromLatin1("TDevelop/Plugin"), constraint);
} }
void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **profile, void ProfileEngine::getProfileWithListing(ProfileListing &listing, Profile **profile,
@ -208,17 +208,17 @@ KURL::List ProfileEngine::resourcesRecursive(const TQString &profileName, const
} }
void ProfileEngine::diffProfiles(OfferType offerType, const TQString &profile1, void ProfileEngine::diffProfiles(OfferType offerType, const TQString &profile1,
const TQString &profile2, TQStringList &unload, KTrader::OfferList &load) const TQString &profile2, TQStringList &unload, TDETrader::OfferList &load)
{ {
KTrader::OfferList offers1 = offers(profile1, offerType); TDETrader::OfferList offers1 = offers(profile1, offerType);
KTrader::OfferList offers2 = offers(profile2, offerType); TDETrader::OfferList offers2 = offers(profile2, offerType);
TQStringList offers1List; TQStringList offers1List;
for (KTrader::OfferList::const_iterator it = offers1.constBegin(); for (TDETrader::OfferList::const_iterator it = offers1.constBegin();
it != offers1.constEnd(); ++it) it != offers1.constEnd(); ++it)
offers1List.append((*it)->desktopEntryName()); offers1List.append((*it)->desktopEntryName());
TQMap<TQString, KService::Ptr> offers2List; TQMap<TQString, KService::Ptr> offers2List;
for (KTrader::OfferList::const_iterator it = offers2.constBegin(); for (TDETrader::OfferList::const_iterator it = offers2.constBegin();
it != offers2.constEnd(); ++it) it != offers2.constEnd(); ++it)
offers2List[(*it)->desktopEntryName()] = *it; offers2List[(*it)->desktopEntryName()] = *it;

@ -100,9 +100,9 @@ public:
}; };
/**@return The list of plugin offers for given profile and type.*/ /**@return The list of plugin offers for given profile and type.*/
KTrader::OfferList offers(const TQString &profileName, OfferType offerType); TDETrader::OfferList offers(const TQString &profileName, OfferType offerType);
/**@return The list of all plugin offers for given type.*/ /**@return The list of all plugin offers for given type.*/
KTrader::OfferList allOffers(OfferType offerType); TDETrader::OfferList allOffers(OfferType offerType);
/**@return The list of URLs to the resources (files) with given @p extension. /**@return The list of URLs to the resources (files) with given @p extension.
@param profileName A name of a profile to find resources in. @param profileName A name of a profile to find resources in.
@ -135,7 +135,7 @@ public:
@note Resulting lists are not cleared. Pass only clean lists in the @note Resulting lists are not cleared. Pass only clean lists in the
common case.*/ common case.*/
void diffProfiles(OfferType offerType, const TQString &profile1, const TQString &profile2, void diffProfiles(OfferType offerType, const TQString &profile1, const TQString &profile2,
TQStringList &unload, KTrader::OfferList &load); TQStringList &unload, TDETrader::OfferList &load);
/**@return The root profile. Root profile is always named "KDevelop" and it /**@return The root profile. Root profile is always named "KDevelop" and it
defines an empty list of plugins. Applications built on KDevelop platform defines an empty list of plugins. Applications built on KDevelop platform

@ -535,8 +535,8 @@ bool ProjectManager::loadLanguageSupport(const TQString& lang)
return true; return true;
} }
KTrader::OfferList languageSupportOffers = TDETrader::OfferList languageSupportOffers =
KTrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"), TDETrader::self()->query(TQString::fromLatin1("TDevelop/LanguageSupport"),
TQString::fromLatin1("[X-TDevelop-Language] == '%1' and [X-TDevelop-Version] == %2").arg(lang).arg(TDEVELOP_PLUGIN_VERSION)); TQString::fromLatin1("[X-TDevelop-Language] == '%1' and [X-TDevelop-Version] == %2").arg(lang).arg(TDEVELOP_PLUGIN_VERSION));
if (languageSupportOffers.isEmpty()) { if (languageSupportOffers.isEmpty()) {

@ -155,8 +155,8 @@ void KDiffTextEdit::searchExtParts()
init = true; init = true;
// search all parts that can handle text/x-diff // search all parts that can handle text/x-diff
KTrader::OfferList offers = KTrader::self()->query("text/x-diff", "('KParts/ReadOnlyPart' in ServiceTypes) and ('text/x-diff' in ServiceTypes)"); TDETrader::OfferList offers = TDETrader::self()->query("text/x-diff", "('KParts/ReadOnlyPart' in ServiceTypes) and ('text/x-diff' in ServiceTypes)");
KTrader::OfferList::const_iterator it; TDETrader::OfferList::const_iterator it;
for ( it = offers.begin(); it != offers.end(); ++it ) { for ( it = offers.begin(); it != offers.end(); ++it ) {
KService::Ptr ptr = (*it); KService::Ptr ptr = (*it);
extPartsTranslated << ptr->name(); extPartsTranslated << ptr->name();

Loading…
Cancel
Save