Rename KLock and KTrader to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 087f8d4521
commit 0117fbed93

@ -39,13 +39,13 @@ EditWithMenu::EditWithMenu(const KURL& url, TQWidget* parent)
return; return;
} }
m_offers = KTrader::self()->query(type->name(), "Type == 'Application'"); m_offers = TDETrader::self()->query(type->name(), "Type == 'Application'");
if( !m_offers.isEmpty() ) if( !m_offers.isEmpty() )
{ {
m_menu = new TQPopupMenu(); m_menu = new TQPopupMenu();
KTrader::OfferList::ConstIterator it = m_offers.begin(); TDETrader::OfferList::ConstIterator it = m_offers.begin();
for( int i = 0 ; it != m_offers.end(); ++it, ++i ) for( int i = 0 ; it != m_offers.end(); ++it, ++i )
{ {
int id = m_menu->insertItem(SmallIcon((*it)->icon()), int id = m_menu->insertItem(SmallIcon((*it)->icon()),

@ -43,7 +43,7 @@ private slots:
void itemActivated(int); void itemActivated(int);
private: private:
KTrader::OfferList m_offers; TDETrader::OfferList m_offers;
TQPopupMenu* m_menu; TQPopupMenu* m_menu;
KURL m_url; KURL m_url;
}; };

@ -33,12 +33,12 @@ ${APP_NAME}View::${APP_NAME}View(TQWidget *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.
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);

@ -91,7 +91,7 @@ Changes 1.2beta1:
- It is not possible to edit raw header anymore (Stanislav Visnovsky) - It is not possible to edit raw header anymore (Stanislav Visnovsky)
- Character selection tool (Stanislav Visnovsky) - Character selection tool (Stanislav Visnovsky)
- CVS support in Catalog Manager (Marco Wegner) - CVS support in Catalog Manager (Marco Wegner)
- KBabelDict module lookup using standard KDE KTrader - KBabelDict module lookup using standard KDE TDETrader
- Autosave feature (Marco Wegner) - Autosave feature (Marco Wegner)
- DataTool to check for translations with only whitespace (Dwayne Bailey) - DataTool to check for translations with only whitespace (Dwayne Bailey)
- DataTool for translations that are not translated (Dwayne Bailey) - DataTool for translations that are not translated (Dwayne Bailey)

@ -60,7 +60,7 @@ MarkPatternDialog::MarkPatternDialog(TQWidget * parent, const char * name)
comboCompletion = mainWidget->combo->completionObject( ); comboCompletion = mainWidget->combo->completionObject( );
regexpEditDialog = 0; regexpEditDialog = 0;
if (!KTrader::self( )->query("KRegExpEditor/KRegExpEditor").isEmpty( )) { if (!TDETrader::self( )->query("KRegExpEditor/KRegExpEditor").isEmpty( )) {
connect(mainWidget->regexpButton, TQT_SIGNAL(clicked( )), this, TQT_SLOT(slotRegexpButtonClicked( ))); connect(mainWidget->regexpButton, TQT_SIGNAL(clicked( )), this, TQT_SLOT(slotRegexpButtonClicked( )));
} else { } else {
disconnect(mainWidget->useRegExp, 0, mainWidget->regexpButton, 0); disconnect(mainWidget->useRegExp, 0, mainWidget->regexpButton, 0);

@ -900,14 +900,14 @@ ConversionStatus Catalog::openURL(const KURL& url, const TQString& package)
// gimme plugin for this MIME type // gimme plugin for this MIME type
KMimeType::Ptr mime = KMimeType::findByURL( url, 0, true ); KMimeType::Ptr mime = KMimeType::findByURL( url, 0, true );
kdDebug() << "Found mimetype: " << mime->name() << endl; kdDebug() << "Found mimetype: " << mime->name() << endl;
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "('"+mime->name()+"' in [X-TDE-Import])"); TDETrader::OfferList offers = TDETrader::self()->query("KBabelFilter", "('"+mime->name()+"' in [X-TDE-Import])");
KService::Ptr ptr = offers.first(); KService::Ptr ptr = offers.first();
// we have no offer for this MIME type // we have no offer for this MIME type
if( !ptr ) if( !ptr )
{ {
kdDebug(KBABEL) << "No plugin for this type, will try PO" << endl; kdDebug(KBABEL) << "No plugin for this type, will try PO" << endl;
offers = KTrader::self()->query("KBabelFilter", "('application/x-gettext' in [X-TDE-Import])"); offers = TDETrader::self()->query("KBabelFilter", "('application/x-gettext' in [X-TDE-Import])");
ptr = offers.first(); ptr = offers.first();
if( !ptr ) if( !ptr )
{ {
@ -1003,7 +1003,7 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons
// gimme plugin for this MIME type // gimme plugin for this MIME type
KMimeType::Ptr mime = KMimeType::findByURL( openUrl, 0, true ); KMimeType::Ptr mime = KMimeType::findByURL( openUrl, 0, true );
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "('"+mime->name()+"' in [X-TDE-Import])"); TDETrader::OfferList offers = TDETrader::self()->query("KBabelFilter", "('"+mime->name()+"' in [X-TDE-Import])");
KService::Ptr ptr = offers.first(); KService::Ptr ptr = offers.first();
// we have no offer for this MIME type // we have no offer for this MIME type
@ -2071,7 +2071,7 @@ ConversionStatus Catalog::writeFile(TQString localFile , bool overwrite)
// gimme plugin for this MIME type // gimme plugin for this MIME type
KMimeType::Ptr mime = KMimeType::findByURL( KURL::fromPathOrURL( localFile ) ); KMimeType::Ptr mime = KMimeType::findByURL( KURL::fromPathOrURL( localFile ) );
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "('"+mime->name()+"' in [X-TDE-Export])"); TDETrader::OfferList offers = TDETrader::self()->query("KBabelFilter", "('"+mime->name()+"' in [X-TDE-Export])");
KService::Ptr ptr = offers.first(); KService::Ptr ptr = offers.first();
// we have no offer for this MIME type // we have no offer for this MIME type

@ -60,9 +60,9 @@ TQStringList CatalogExportPlugin::availableExportMimeTypes()
{ {
TQStringList result; TQStringList result;
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-TDE-Export]"); TDETrader::OfferList offers = TDETrader::self()->query("KBabelFilter", "exist [X-TDE-Export]");
for( KTrader::OfferListIterator ptr = offers.begin(); ptr!=offers.end() ; ++ptr ) for( TDETrader::OfferListIterator ptr = offers.begin(); ptr!=offers.end() ; ++ptr )
{ {
result += (*ptr)->property("X-TDE-Export").toStringList(); result += (*ptr)->property("X-TDE-Export").toStringList();
} }

@ -171,9 +171,9 @@ TQStringList CatalogImportPlugin::availableImportMimeTypes()
{ {
TQStringList result; TQStringList result;
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-TDE-Import]"); TDETrader::OfferList offers = TDETrader::self()->query("KBabelFilter", "exist [X-TDE-Import]");
for( KTrader::OfferListIterator ptr = offers.begin(); ptr!=offers.end() ; ++ptr ) for( TDETrader::OfferListIterator ptr = offers.begin(); ptr!=offers.end() ; ++ptr )
{ {
result += (*ptr)->property("X-TDE-Import").toStringList(); result += (*ptr)->property("X-TDE-Import").toStringList();
} }

@ -259,7 +259,7 @@ TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir,
bool SourceContext::loadPart() bool SourceContext::loadPart()
{ {
KTrader::OfferList offers = KTrader::self()->query( "KTextEditor/Document" ); TDETrader::OfferList offers = TDETrader::self()->query( "KTextEditor/Document" );
if( offers.count() < 1 ) if( offers.count() < 1 )
{ {
KMessageBox::error(this,i18n("KBabel cannot start a text editor component.\n" KMessageBox::error(this,i18n("KBabel cannot start a text editor component.\n"

@ -133,7 +133,7 @@ FindDialog::FindDialog(bool forReplace, TQWidget* parent)
_isRegExp = new TQCheckBox(i18n("Use regu&lar expression"),regexp); _isRegExp = new TQCheckBox(i18n("Use regu&lar expression"),regexp);
_regExpButton = 0; _regExpButton = 0;
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) if( !TDETrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{ {
_regExpButton = new TQPushButton( i18n("&Edit..."), regexp ); _regExpButton = new TQPushButton( i18n("&Edit..."), regexp );
connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked())); connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked()));

@ -703,7 +703,7 @@ MiscPreferences::MiscPreferences(TQWidget *parent)
TQWhatsThis::add(label,msg); TQWhatsThis::add(label,msg);
TQWhatsThis::add(contextInfoEdit,msg); TQWhatsThis::add(contextInfoEdit,msg);
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) if( !TDETrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{ {
_regExpButton = new TQPushButton( i18n("&Edit..."), hbox ); _regExpButton = new TQPushButton( i18n("&Edit..."), hbox );
connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked())); connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked()));

@ -409,11 +409,11 @@ KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
kdDebug(KBABEL_SEARCH) << "Now using trader for " << TDEGlobal::instance()->instanceName() << endl; kdDebug(KBABEL_SEARCH) << "Now using trader for " << TDEGlobal::instance()->instanceName() << endl;
// try to find installed modules by KTrader // try to find installed modules by TDETrader
KTrader::OfferList offers = KTrader::self()->query("KBabelDictModule", TDETrader::OfferList offers = TDETrader::self()->query("KBabelDictModule",
"('"+TDEGlobal::instance()->instanceName()+"' in [Applications])"); "('"+TDEGlobal::instance()->instanceName()+"' in [Applications])");
for(KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it ) for(TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it )
{ {
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().local8Bit() ); KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().local8Bit() );
@ -438,10 +438,10 @@ KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
kdDebug(KBABEL_SEARCH) << "Now for any application" << endl; kdDebug(KBABEL_SEARCH) << "Now for any application" << endl;
offers = KTrader::self()->query("KBabelDictModule", offers = TDETrader::self()->query("KBabelDictModule",
"not ( exist Applications)"); "not ( exist Applications)");
for(KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it ) for(TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it )
{ {
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().local8Bit() ); KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().local8Bit() );

@ -60,7 +60,7 @@ KompareShell::KompareShell()
setupActions(); setupActions();
setupStatusBar(); setupStatusBar();
KTrader::OfferList offers = KTrader::self()->query( "text/x-diff", TDETrader::OfferList offers = TDETrader::self()->query( "text/x-diff",
"Kompare/ViewPart", TQString(), TQString() ); "Kompare/ViewPart", TQString(), TQString() );
#ifdef NDEBUG #ifdef NDEBUG
for( int i = 0; i < offers.count(); i++ ) for( int i = 0; i < offers.count(); i++ )
@ -108,7 +108,7 @@ KompareShell::KompareShell()
} }
offers.clear(); offers.clear();
offers = KTrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", TQString() ); offers = TDETrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", TQString() );
if ( offers.count() == 0 ) if ( offers.count() == 0 )
{ {
KMessageBox::error(this, i18n( "Could not find our KompareNavigationPart." ) ); KMessageBox::error(this, i18n( "Could not find our KompareNavigationPart." ) );

@ -288,7 +288,7 @@ void DiffPage::addOptionsTab()
TQToolTip::add( m_ignoreRegExpEdit, i18n( "Add the regular expression here that you want to use\nto ignore lines that match it." ) ); TQToolTip::add( m_ignoreRegExpEdit, i18n( "Add the regular expression here that you want to use\nto ignore lines that match it." ) );
groupLayout->addWidget( m_ignoreRegExpEdit ); groupLayout->addWidget( m_ignoreRegExpEdit );
if ( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) if ( !TDETrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{ {
// Ok editor is available, use it // Ok editor is available, use it
TQButton* ignoreRegExpEditButton = new TQPushButton( i18n( "&Edit..." ), page, "regexp_editor_button" ); TQButton* ignoreRegExpEditButton = new TQPushButton( i18n( "&Edit..." ), page, "regexp_editor_button" );

Loading…
Cancel
Save