Rename KLock and KTrader to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 113814579a
commit 9f77b51ba8

@ -68,7 +68,7 @@ Type=TQStringList
[PropertyDef::X-TDE-Amarok-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-Amarok-rank]
Type=int

@ -117,9 +117,9 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, TDEC
TQToolTip::add( aboutEngineButton, i18n("Click to get the plugin information.") );
/// Populate the engine selection combo box
KTrader::OfferList offers = PluginManager::query( "[X-TDE-Amarok-plugintype] == 'engine'" );
KTrader::OfferList::ConstIterator end( offers.end() );
for( KTrader::OfferList::ConstIterator it = offers.begin(); it != end; ++it ) {
TDETrader::OfferList offers = PluginManager::query( "[X-TDE-Amarok-plugintype] == 'engine'" );
TDETrader::OfferList::ConstIterator end( offers.end() );
for( TDETrader::OfferList::ConstIterator it = offers.begin(); it != end; ++it ) {
// Don't list the <no engine> (void engine) entry if it's not currently active,
// cause there's no point in choosing this engine (it's a dummy, after all).
if( (*it)->property( "X-TDE-Amarok-name" ).toString() == "void-engine"

@ -81,7 +81,7 @@ CollectionDB::CollectionDB()
// Load DBEngine plugin
TQString query = "[X-TDE-Amarok-plugintype] == 'dbengine' and [X-TDE-Amarok-name] != '%1'";
KTrader::OfferList offers = PluginManager::query( query.arg( "sqlite-dbengine" ) );
TDETrader::OfferList offers = PluginManager::query( query.arg( "sqlite-dbengine" ) );
m_dbEngine = (DBEngine*) PluginManager::createFromService( offers.first() );
//<OPEN DATABASE>

@ -143,7 +143,7 @@ EngineController::loadEngine( const TQString &engineName )
DEBUG_BLOCK
TQString query = "[X-TDE-Amarok-plugintype] == 'engine' and [X-TDE-Amarok-name] != '%1'";
KTrader::OfferList offers = PluginManager::query( query.arg( engineName ) );
TDETrader::OfferList offers = PluginManager::query( query.arg( engineName ) );
// sort by rank, TQValueList::operator[] is O(n), so this is quite inefficient
#define rank( x ) (x)->property( "X-TDE-Amarok-rank" ).toInt()
@ -157,7 +157,7 @@ EngineController::loadEngine( const TQString &engineName )
query = "[X-TDE-Amarok-plugintype] == 'engine' and [X-TDE-Amarok-name] == '%1'";
offers = PluginManager::query( query.arg( engineName ) ) + offers;
foreachType( KTrader::OfferList, offers ) {
foreachType( TDETrader::OfferList, offers ) {
Amarok::Plugin *plugin = PluginManager::createFromService( *it );
if( plugin ) {
@ -270,7 +270,7 @@ void EngineController::unplayableNotification() {
bool EngineController::installDistroCodec( const TQString& engine /*Filetype type*/)
{
KService::Ptr service = KTrader::self()->query( "Amarok/CodecInstall"
KService::Ptr service = TDETrader::self()->query( "Amarok/CodecInstall"
, TQString("[X-TDE-Amarok-codec] == 'mp3' and [X-TDE-Amarok-engine] == '%1'").arg(engine) ).first();
if( service )
{

@ -307,7 +307,7 @@ MediaBrowser::MediaBrowser( const char *name )
m_pluginAmarokName["ignore"] = i18n( "Do not handle" );
// query available device plugins
m_plugins = PluginManager::query( "[X-TDE-Amarok-plugintype] == 'mediadevice'" );
for( KTrader::OfferList::ConstIterator it = m_plugins.begin(); it != m_plugins.end(); ++it ) {
for( TDETrader::OfferList::ConstIterator it = m_plugins.begin(); it != m_plugins.end(); ++it ) {
// Save name properties in TQMap for lookup
m_pluginName[(*it)->name()] = (*it)->property( "X-TDE-Amarok-name" ).toString();
m_pluginAmarokName[(*it)->property( "X-TDE-Amarok-name" ).toString()] = (*it)->name();

@ -197,7 +197,7 @@ class MediaBrowser : public TQVBox
TQString getInternalPluginName ( const TQString string ) { return m_pluginName[string]; }
TQString getDisplayPluginName ( const TQString string ) { return m_pluginAmarokName[string]; }
const KTrader::OfferList &getPlugins() { return m_plugins; }
const TDETrader::OfferList &getPlugins() { return m_plugins; }
void transcodingFinished( const TQString &src, const TQString &dst );
bool isTranscoding() const { return m_waitForTranscode; }
void updateStats();
@ -272,7 +272,7 @@ class MediaBrowser : public TQVBox
typedef TQMap<TQString, MediaItem*> ItemMap;
mutable TQMutex m_itemMapMutex;
ItemMap m_itemMap;
KTrader::OfferList m_plugins;
TDETrader::OfferList m_plugins;
bool m_haveDevices;
bool m_quitting;
};

@ -270,7 +270,7 @@ ManualDeviceAdder::ManualDeviceAdder( MediumPluginManager* mpm )
new TQLabel( i18n( "Select the plugin to use with this device:"), vbox1 );
m_mdaCombo = new KComboBox( false, vbox1, "m_mdacombo" );
m_mdaCombo->insertItem( i18n( "Do not handle" ) );
for( KTrader::OfferList::ConstIterator it = MediaBrowser::instance()->getPlugins().begin();
for( TDETrader::OfferList::ConstIterator it = MediaBrowser::instance()->getPlugins().begin();
it != MediaBrowser::instance()->getPlugins().end();
++it )
m_mdaCombo->insertItem( (*it)->name() );
@ -427,7 +427,7 @@ MediaDeviceConfig::MediaDeviceConfig( Medium *medium, MediumPluginManager *mgr,
m_pluginCombo = new KComboBox( false, this );
m_pluginCombo->insertItem( i18n( "Do not handle" ) );
for( KTrader::OfferList::ConstIterator it = MediaBrowser::instance()->getPlugins().begin();
for( TDETrader::OfferList::ConstIterator it = MediaBrowser::instance()->getPlugins().begin();
it != MediaBrowser::instance()->getPlugins().end();
++it ){
m_pluginCombo->insertItem( (*it)->name() );

@ -98,9 +98,9 @@ void
MountPointManager::init()
{
DEBUG_BLOCK
KTrader::OfferList plugins = PluginManager::query( "[X-TDE-Amarok-plugintype] == 'device'" );
TDETrader::OfferList plugins = PluginManager::query( "[X-TDE-Amarok-plugintype] == 'device'" );
debug() << "Received [" << TQString::number( plugins.count() ) << "] device plugin offers" << endl;
foreachType( KTrader::OfferList, plugins )
foreachType( TDETrader::OfferList, plugins )
{
Amarok::Plugin *plugin = PluginManager::createFromService( *it );
if( plugin )

@ -2837,7 +2837,7 @@ PodcastEpisode::showContextMenu( const TQPoint &position )
mimetype = KMimeType::findByFileContent( localUrl().path(), &accuracy );
if( accuracy <= 0 )
mimetype = KMimeType::findByURL( url() );
KTrader::OfferList offers = KTrader::self()->query( mimetype->name(), "Type == 'Application'" );
TDETrader::OfferList offers = TDETrader::self()->query( mimetype->name(), "Type == 'Application'" );
if( offers.empty() || (offers.size()==1 && offers.first()->name()=="Amarok") )
{
menu.insertItem( SmallIconSet( Amarok::icon( "run" ) ), i18n( "&Open With..."), OPEN_WITH );
@ -2846,7 +2846,7 @@ PodcastEpisode::showContextMenu( const TQPoint &position )
{
int i = 1;
KPopupMenu *openMenu = new KPopupMenu;
for( KTrader::OfferList::iterator it = offers.begin();
for( TDETrader::OfferList::iterator it = offers.begin();
it != offers.end();
++it )
{
@ -2953,7 +2953,7 @@ PodcastEpisode::showContextMenu( const TQPoint &position )
default:
if( id >= OPEN_WITH+1 && id <= OPEN_WITH + offers.size() )
{
KTrader::OfferList::iterator it = offers.begin();
TDETrader::OfferList::iterator it = offers.begin();
for(uint i = OPEN_WITH+1; i < id && i < OPEN_WITH+offers.size(); ++i )
{
++it;

@ -40,7 +40,7 @@ PluginManager::m_store;
// PUBLIC INTERFACE
/////////////////////////////////////////////////////////////////////////////////////
KTrader::OfferList
TDETrader::OfferList
PluginManager::query( const TQString& constraint )
{
// Add versioning constraint
@ -54,7 +54,7 @@ PluginManager::query( const TQString& constraint )
debug() << "Plugin trader constraint: " << str << endl;
return KTrader::self()->query( "Amarok/Plugin", str );
return TDETrader::self()->query( "Amarok/Plugin", str );
}
@ -63,7 +63,7 @@ PluginManager::createFromQuery( const TQString &constraint )
{
Debug::Block block( __PRETTY_FUNCTION__ );
KTrader::OfferList offers = query( constraint );
TDETrader::OfferList offers = query( constraint );
if ( offers.isEmpty() ) {
warning() << k_funcinfo << "No matching plugin found.\n";
@ -163,7 +163,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;

@ -53,7 +53,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

Loading…
Cancel
Save