Rename KLock and KTrader to avoid conflicts with KDE4

pull/21/head
Timothy Pearson 12 years ago
parent 6dea944252
commit b440a9c608

@ -238,9 +238,9 @@ Part::Part( TQWidget *parentWidget, const char * /*widgetName*/,
void Part::loadPlugins()
{
// "[X-TDE-akregator-plugintype] == 'storage'"
KTrader::OfferList offers = PluginManager::query();
TDETrader::OfferList offers = PluginManager::query();
for( KTrader::OfferList::ConstIterator it = offers.begin(), end = offers.end(); it != end; ++it )
for( TDETrader::OfferList::ConstIterator it = offers.begin(), end = offers.end(); it != end; ++it )
{
Akregator::Plugin* plugin = PluginManager::createFromService(*it);
if (plugin)

@ -69,7 +69,7 @@ Type=TQStringList
[PropertyDef::X-TDE-akregator-email]
Type=TQStringList
# Priority of the plugin. When KTrader returns multiple offers, the one with the highest rank is chosen.
# Priority of the plugin. When TDETrader returns multiple offers, the one with the highest rank is chosen.
# Range: 0 (disabled) - 255 (highest)
[PropertyDef::X-TDE-akregator-rank]
Type=int

@ -39,7 +39,7 @@ PluginManager::m_store;
// PUBLIC INTERFACE
/////////////////////////////////////////////////////////////////////////////////////
KTrader::OfferList
TDETrader::OfferList
PluginManager::query( const TQString& constraint )
{
// Add versioning constraint
@ -53,14 +53,14 @@ PluginManager::query( const TQString& constraint )
kdDebug() << "Plugin trader constraint: " << str << endl;
return KTrader::self()->query( "Akregator/Plugin", str );
return TDETrader::self()->query( "Akregator/Plugin", str );
}
Plugin*
PluginManager::createFromQuery( const TQString &constraint )
{
KTrader::OfferList offers = query( constraint );
TDETrader::OfferList offers = query( constraint );
if ( offers.isEmpty() ) {
kdWarning() << k_funcinfo << "No matching plugin found.\n";
@ -156,7 +156,7 @@ PluginManager::getService( const Plugin* plugin )
void
PluginManager::showAbout( const TQString &constraint )
{
KTrader::OfferList offers = query( constraint );
TDETrader::OfferList offers = query( constraint );
if ( offers.isEmpty() )
return;

@ -55,7 +55,7 @@ class PluginManager
* @return A list of services that satisfy the query
* @see http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html
*/
static KTrader::OfferList query( const TQString& constraint = TQString() );
static TDETrader::OfferList query( const TQString& constraint = TQString() );
/**
* Load and instantiate plugin from query

@ -153,7 +153,7 @@ bool SpeechClient::isTextToSpeechInstalled() const
void SpeechClient::setupSpeechSystem()
{
KTrader::OfferList offers = KTrader::self()->query("DCOP/Text-to-Speech", "Name == 'KTTSD'");
TDETrader::OfferList offers = TDETrader::self()->query("DCOP/Text-to-Speech", "Name == 'KTTSD'");
if (offers.count() == 0)
{
kdDebug() << "KTTSD not installed, disable support" << endl;

@ -75,10 +75,10 @@ void ContactEditorWidgetManager::reload()
{
mFactories.clear();
kdDebug(5720) << "ContactEditorWidgetManager::reload()" << endl;
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/ContactEditorWidget",
const TDETrader::OfferList plugins = TDETrader::self()->query( "KAddressBook/ContactEditorWidget",
TQString( "[X-TDE-KAddressBook-CEWPluginVersion] == %1" ).arg( KAB_CEW_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() );
if ( !factory ) {

@ -167,7 +167,7 @@ IMEditorWidget::IMEditorWidget( TQWidget *parent, const TQString &preferredIM, c
//mWidget->btnDown->setEnabled( false );
mPreferred = preferredIM;
mPreferred = mPreferred.replace( " on ", TQString( TQChar( 0xE120 ) ), true );
mProtocols = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "KABC/IMProtocol" ) ) );
mProtocols = KPluginInfo::fromServices( TDETrader::self()->query( TQString::fromLatin1( "KABC/IMProtocol" ) ) );
// order the protocols by putting them in a qmap, then sorting the set of keys and recreating the list
TQMap<TQString, KPluginInfo *> protocolMap;

@ -216,10 +216,10 @@ void ExtensionManager::createExtensionWidgets()
}
// load the other extensions
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/Extension",
const TDETrader::OfferList plugins = TDETrader::self()->query( "KAddressBook/Extension",
TQString( "[X-TDE-KAddressBook-ExtensionPluginVersion] == %1" ).arg( KAB_EXTENSIONWIDGET_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() );
if ( !factory ) {

@ -386,9 +386,9 @@ void ViewManager::scrollDown()
void ViewManager::createViewFactories()
{
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/View",
const TDETrader::OfferList plugins = TDETrader::self()->query( "KAddressBook/View",
TQString( "[X-TDE-KAddressBook-ViewPluginVersion] == %1" ).arg( KAB_VIEW_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( !(*it)->hasServiceType( "KAddressBook/View" ) )
continue;

@ -120,9 +120,9 @@ void XXPortManager::loadPlugins()
{
mXXPortObjects.clear();
const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort",
const TDETrader::OfferList plugins = TDETrader::self()->query( "KAddressBook/XXPort",
TQString( "[X-TDE-KAddressBook-XXPortPluginVersion] == %1" ).arg( KAB_XXPORT_PLUGIN_VERSION ) );
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) )
continue;

@ -135,7 +135,7 @@ KAlarmApp::KAlarmApp()
}
// Check if the speech synthesis daemon is installed
mSpeechEnabled = (KTrader::self()->query("DCOP/Text-to-Speech", "Name == 'KTTSD'").count() > 0);
mSpeechEnabled = (TDETrader::self()->query("DCOP/Text-to-Speech", "Name == 'KTTSD'").count() > 0);
if (!mSpeechEnabled)
kdDebug(5950) << "KAlarmApp::KAlarmApp(): speech synthesis disabled (KTTSD not found)" << endl;
// Check if KOrganizer is installed

@ -79,7 +79,7 @@ namespace KMail {
connect( mLineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
this, TQT_SIGNAL( textChanged( const TQString & ) ) );
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) {
if( !TDETrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) {
mRegExpEditButton = new TQPushButton( i18n("Edit..."), this,
"mRegExpEditButton" );
mRegExpEditButton->setSizePolicy( TQSizePolicy::Minimum,

@ -267,8 +267,8 @@ void KMobile::addDevice()
dialog->selectButton->connect( dialog->selectButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(accept()) );
dialog->cancelButton->connect( dialog->cancelButton, TQT_SIGNAL(clicked()), dialog, TQT_SLOT(reject()) );
KTrader::OfferList list = KMobileItem::getMobileDevicesList();
KTrader::OfferListIterator it;
TDETrader::OfferList list = KMobileItem::getMobileDevicesList();
TDETrader::OfferListIterator it;
KService::Ptr ptr;
for ( it = list.begin(); it != list.end(); ++it ) {
ptr = *it;

@ -144,17 +144,17 @@ void KMobileItem::writeKonquMimeFile() const
/*
* get a list of all services providing a libkmobile device driver
*/
KTrader::OfferList KMobileItem::getMobileDevicesList()
TDETrader::OfferList KMobileItem::getMobileDevicesList()
{
KTrader::OfferList offers = KTrader::self()->query(KMOBILE_MIMETYPE_DEVICE);
TDETrader::OfferList offers = TDETrader::self()->query(KMOBILE_MIMETYPE_DEVICE);
return offers;
}
KService::Ptr KMobileItem::getServicePtr() const
{
KTrader::OfferList list = getMobileDevicesList();
KTrader::OfferListIterator it;
TDETrader::OfferList list = getMobileDevicesList();
TDETrader::OfferListIterator it;
KService::Ptr ptr;
for ( it = list.begin(); it != list.end(); ++it ) {
KService::Ptr ptr = *it;

@ -26,7 +26,7 @@ public:
TQString config_SectionName( int idx = -1 ) const;
TQPixmap getIcon() const;
static KTrader::OfferList getMobileDevicesList();
static TDETrader::OfferList getMobileDevicesList();
protected:
TQString getKonquMimeType() const;

@ -5,7 +5,7 @@ UNTIL KDE 3.2
* Unified Identity handling (Name, Mail address, SMTP, use KMIdentity TDEPIM wide?)
Currently this is dublicated in at least KMail, KNode and KOrganizer
* Molularize KOrganizer and KMail Settings and turn them into kcm's
* Think about extending the kcm idea and add a framework to locate kcm's for apps via KTrader
* Think about extending the kcm idea and add a framework to locate kcm's for apps via TDETrader
- same for unified credits
- find a solution for a setup wizard
- replace Splash class with QSplashScreen (done)

@ -172,7 +172,7 @@ MiB: And don't forget KNotesIface loadKNotes() :-)
h: That doesn't sound extendable ;)
h: So if I would like to add a 'New ShortMessage' part we would have to extend
h: that library... better use KTrader and some sort of a common framework
h: that library... better use TDETrader and some sort of a common framework
h: and Mib's comments shows that problem!
d: That's what KDCOPServiceStarter is for :)

@ -118,7 +118,7 @@ KCMKontactSummary::KCMKontactSummary( TQWidget *parent, const char *name )
void KCMKontactSummary::load()
{
KTrader::OfferList offers = KTrader::self()->query(
TDETrader::OfferList offers = TDETrader::self()->query(
TQString::fromLatin1( "Kontact/Plugin" ),
TQString( "[X-TDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );

@ -113,7 +113,7 @@ PluginSelection::~PluginSelection()
void PluginSelection::readConfig()
{
const KTrader::OfferList offers = KTrader::self()->query(
const TDETrader::OfferList offers = TDETrader::self()->query(
TQString::fromLatin1( "Kontact/Plugin" ),
TQString( "[X-TDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );

@ -75,7 +75,7 @@ class KontactApp : public KUniqueApplication {
static void listPlugins()
{
TDEInstance instance( "kontact" ); // Can't use KontactApp since it's too late for adding cmdline options
KTrader::OfferList offers = KTrader::self()->query(
TDETrader::OfferList offers = TDETrader::self()->query(
TQString::fromLatin1( "Kontact/Plugin" ),
TQString( "[X-TDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
for ( KService::List::Iterator it = offers.begin(); it != offers.end(); ++it ) {

@ -123,7 +123,7 @@ void MainWindow::initGUI()
connect( helpMenu, TQT_SIGNAL( showAboutApplication() ),
TQT_SLOT( showAboutDialog() ) );
KTrader::OfferList offers = KTrader::self()->query(
TDETrader::OfferList offers = TDETrader::self()->query(
TQString::fromLatin1( "Kontact/Plugin" ),
TQString( "[X-TDE-KontactPluginVersion] == %1" ).arg( KONTACT_PLUGIN_VERSION ) );
mPluginInfos = KPluginInfo::fromServices( offers, Prefs::self()->config(), "Plugins" );

@ -62,7 +62,7 @@ KOCore::~KOCore()
mSelf = 0;
}
KTrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
TDETrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
{
TQString constraint;
if ( version >= 0 ) {
@ -70,28 +70,28 @@ KTrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
.arg( TQString::number( version ) );
}
return KTrader::self()->query( type, constraint );
return TDETrader::self()->query( type, constraint );
}
KTrader::OfferList KOCore::availablePlugins()
TDETrader::OfferList KOCore::availablePlugins()
{
return availablePlugins( KOrg::Plugin::serviceType(),
KOrg::Plugin::interfaceVersion() );
}
KTrader::OfferList KOCore::availableCalendarDecorations()
TDETrader::OfferList KOCore::availableCalendarDecorations()
{
return availablePlugins( KOrg::CalendarDecoration::serviceType(),
KOrg::CalendarDecoration::interfaceVersion() );
}
KTrader::OfferList KOCore::availableParts()
TDETrader::OfferList KOCore::availableParts()
{
return availablePlugins( KOrg::Part::serviceType(),
KOrg::Part::interfaceVersion() );
}
KTrader::OfferList KOCore::availablePrintPlugins()
TDETrader::OfferList KOCore::availablePrintPlugins()
{
return availablePlugins( KOrg::PrintPlugin::serviceType(),
KOrg::PrintPlugin::interfaceVersion() );
@ -126,8 +126,8 @@ KOrg::Plugin *KOCore::loadPlugin( KService::Ptr service )
KOrg::Plugin *KOCore::loadPlugin( const TQString &name )
{
KTrader::OfferList list = availablePlugins();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList list = availablePlugins();
TDETrader::OfferList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it ) {
if ( (*it)->desktopEntryName() == name ) {
return loadPlugin( *it );
@ -160,8 +160,8 @@ KOrg::CalendarDecoration *KOCore::loadCalendarDecoration(KService::Ptr service)
KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const TQString &name )
{
KTrader::OfferList list = availableCalendarDecorations();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList list = availableCalendarDecorations();
TDETrader::OfferList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it ) {
if ( (*it)->desktopEntryName() == name ) {
return loadCalendarDecoration( *it );
@ -246,8 +246,8 @@ KXMLGUIClient* KOCore::xmlguiClient( TQWidget *wdg ) const
KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
{
KTrader::OfferList list = availableParts();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList list = availableParts();
TDETrader::OfferList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it ) {
if ( (*it)->desktopEntryName() == name ) {
return loadPart( *it, parent );
@ -258,8 +258,8 @@ KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
KOrg::PrintPlugin *KOCore::loadPrintPlugin( const TQString &name )
{
KTrader::OfferList list = availablePrintPlugins();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList list = availablePrintPlugins();
TDETrader::OfferList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it ) {
if ( (*it)->desktopEntryName() == name ) {
return loadPrintPlugin( *it );
@ -274,8 +274,8 @@ KOrg::CalendarDecoration::List KOCore::calendarDecorations()
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
mCalendarDecorations.clear();
KTrader::OfferList plugins = availableCalendarDecorations();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList plugins = availableCalendarDecorations();
TDETrader::OfferList::ConstIterator it;
for( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( (*it)->hasServiceType("Calendar/Decoration") ) {
TQString name = (*it)->desktopEntryName();
@ -297,8 +297,8 @@ KOrg::Part::List KOCore::loadParts( KOrg::MainWindow *parent )
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
KTrader::OfferList plugins = availableParts();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList plugins = availableParts();
TDETrader::OfferList::ConstIterator it;
for( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=
selectedPlugins.end() ) {
@ -323,8 +323,8 @@ KOrg::PrintPlugin::List KOCore::loadPrintPlugins()
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
KTrader::OfferList plugins = availablePrintPlugins();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList plugins = availablePrintPlugins();
TDETrader::OfferList::ConstIterator it;
for( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=
selectedPlugins.end() ) {

@ -41,10 +41,10 @@ class KDE_EXPORT KOCore
static KOCore *self();
KTrader::OfferList availablePlugins();
KTrader::OfferList availableCalendarDecorations();
KTrader::OfferList availableParts();
KTrader::OfferList availablePrintPlugins();
TDETrader::OfferList availablePlugins();
TDETrader::OfferList availableCalendarDecorations();
TDETrader::OfferList availableParts();
TDETrader::OfferList availablePrintPlugins();
KOrg::Plugin *loadPlugin( KService::Ptr service );
KOrg::Plugin *loadPlugin( const TQString & );
@ -87,7 +87,7 @@ class KDE_EXPORT KOCore
protected:
KOCore();
KTrader::OfferList availablePlugins( const TQString &type,
TDETrader::OfferList availablePlugins( const TQString &type,
int pluginInterfaceVersion = -1 );
private:

@ -1142,12 +1142,12 @@ KOPrefsDialogPlugins::KOPrefsDialogPlugins( TQWidget *parent, const char* name )
void KOPrefsDialogPlugins::usrReadConfig()
{
mListView->clear();
KTrader::OfferList plugins = KOCore::self()->availablePlugins();
TDETrader::OfferList plugins = KOCore::self()->availablePlugins();
plugins += KOCore::self()->availableParts();
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList::ConstIterator it;
for( it = plugins.begin(); it != plugins.end(); ++it ) {
TQCheckListItem *item = new PluginItem( mListView, *it );
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=

@ -553,8 +553,8 @@ void AlarmDialog::wakeUp()
void AlarmDialog::slotSave()
{
TDEConfig *config = kapp->config();
KLockFile::Ptr lock = config->lockFile();
if ( lock.data()->lock() != KLockFile::LockOK )
TDELockFile::Ptr lock = config->lockFile();
if ( lock.data()->lock() != TDELockFile::LockOK )
return;
config->setGroup( "General" );

@ -39,8 +39,8 @@ int main(int argc,char **argv)
TDEApplication app;
KTrader::OfferList plugins = KOCore::self()->availablePlugins();
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList plugins = KOCore::self()->availablePlugins();
TDETrader::OfferList::ConstIterator it;
for(it = plugins.begin(); it != plugins.end(); ++it) {
kdDebug(5850) << "Plugin: " << (*it)->desktopEntryName() << " ("
<< (*it)->name() << ")" << endl;

@ -82,7 +82,7 @@ PluginManager::PluginManager( TQObject *parent )
this, TQT_SLOT( loadAllPlugins() ) );
d->plugins = KPluginInfo::fromServices(
KTrader::self()->query( TQString::fromLatin1( "Komposer/Plugin" ),
TDETrader::self()->query( TQString::fromLatin1( "Komposer/Plugin" ),
TQString::fromLatin1( "[X-Komposer-Version] == 1" ) ) );
}

@ -100,9 +100,9 @@ EditorSelection::readConfig()
{
m_editorsCombo->clear();
KTrader::OfferList editors = KTrader::self()->query(
TDETrader::OfferList editors = TDETrader::self()->query(
TQString::fromLatin1( "Komposer/Editor" ) );
KTrader::OfferList::ConstIterator it;
TDETrader::OfferList::ConstIterator it;
int i = 0;
for ( it = editors.begin(); it != editors.end(); ++it, ++i ) {
if ( !(*it)->hasServiceType( TQString::fromLatin1( "Komposer/Editor" ) ) )

@ -129,7 +129,7 @@ void SingleConditionWidget::toggleRegExpButton( int selected )
{
bool isRegExp = (KScoringExpression::MATCH == selected ||
KScoringExpression::MATCHCS == selected) &&
!KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty();
!TDETrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty();
regExpButton->setEnabled( isRegExp );
}

Loading…
Cancel
Save