diff options
51 files changed, 307 insertions, 307 deletions
diff --git a/interfaces/kregexpeditor/kregexpeditorinterface.h b/interfaces/kregexpeditor/kregexpeditorinterface.h index 3c96d8d93..4124849d6 100644 --- a/interfaces/kregexpeditor/kregexpeditorinterface.h +++ b/interfaces/kregexpeditor/kregexpeditorinterface.h @@ -15,7 +15,7 @@ * To check if kregexpeditor in tdeutils is installed and available use this line: * * \code - * bool installed=!KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty(); + * bool installed=!TDETrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty(); * \endcode * * The following is a template for what you need to do to create an instance of the diff --git a/interfaces/kspeech/kspeech.h b/interfaces/kspeech/kspeech.h index d24683517..4fe3e7c9a 100644 --- a/interfaces/kspeech/kspeech.h +++ b/interfaces/kspeech/kspeech.h @@ -227,7 +227,7 @@ * If you want to detect if KTTSD is installed without starting it, use this code. * @verbatim - 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) { // KTTSD is installed. diff --git a/interfaces/tdetexteditor/editorchooser.cpp b/interfaces/tdetexteditor/editorchooser.cpp index ce493018d..331e64bbb 100644 --- a/interfaces/tdetexteditor/editorchooser.cpp +++ b/interfaces/tdetexteditor/editorchooser.cpp @@ -46,14 +46,14 @@ EditorChooser::EditorChooser(TQWidget *parent,const char *name) : grid->addWidget( d->chooser, 0, 0); - KTrader::OfferList offers = KTrader::self()->query("text/plain", "'KTextEditor/Document' in ServiceTypes"); + TDETrader::OfferList offers = TDETrader::self()->query("text/plain", "'KTextEditor/Document' in ServiceTypes"); TDEConfig *config=new TDEConfig("default_components"); config->setGroup("KTextEditor"); TQString editor = config->readPathEntry("embeddedEditor"); if (editor.isEmpty()) editor="katepart"; - for (KTrader::OfferList::Iterator it = offers.begin(); it != offers.end(); ++it) + for (TDETrader::OfferList::Iterator it = offers.begin(); it != offers.end(); ++it) { if ((*it)->desktopEntryName().contains(editor)) { @@ -62,7 +62,7 @@ EditorChooser::EditorChooser(TQWidget *parent,const char *name) : } } - for (KTrader::OfferList::Iterator it = offers.begin(); it != offers.end(); ++it) + for (TDETrader::OfferList::Iterator it = offers.begin(); it != offers.end(); ++it) { d->chooser->editorCombo->insertItem((*it)->name()); d->elements.append((*it)->desktopEntryName()); @@ -1 +1 @@ -Factor out KLockFile. +Factor out TDELockFile. diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp index aa4c43658..eb760aaff 100644 --- a/kate/part/katefactory.cpp +++ b/kate/part/katefactory.cpp @@ -71,7 +71,7 @@ KateFactory::KateFactory () I18N_NOOP( "Embeddable editor component" ), TDEAboutData::License_LGPL_V2, I18N_NOOP( "(c) 2000-2004 The Kate Authors" ), 0, "http://kate.kde.org") , m_instance (&m_aboutData) - , m_plugins (KTrader::self()->query("KTextEditor/Plugin")) + , m_plugins (TDETrader::self()->query("KTextEditor/Plugin")) , m_jscript (0) { // set s_self diff --git a/kate/part/katefactory.h b/kate/part/katefactory.h index a01e3a32c..bca0fe8a9 100644 --- a/kate/part/katefactory.h +++ b/kate/part/katefactory.h @@ -150,7 +150,7 @@ class KateFactory * on start detected plugins * @return list of all at launch detected tdetexteditor::plugins */ - inline const KTrader::OfferList &plugins () { return m_plugins; }; + inline const TDETrader::OfferList &plugins () { return m_plugins; }; /** * global dirwatch @@ -261,7 +261,7 @@ class KateFactory /** * at start found plugins */ - KTrader::OfferList m_plugins; + TDETrader::OfferList m_plugins; /** * fallback document config diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index eb56b0f87..b55f0743b 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -1443,8 +1443,8 @@ void TDEApplication::startKdeinit() { #ifndef Q_WS_WIN //TODO TDEInstance inst( "starttdeinitlock" ); - KLockFile lock( locateLocal( "tmp", "starttdeinitlock", &inst )); - if( lock.lock( KLockFile::LockNoBlock ) != KLockFile::LockOK ) { + TDELockFile lock( locateLocal( "tmp", "starttdeinitlock", &inst )); + if( lock.lock( TDELockFile::LockNoBlock ) != TDELockFile::LockOK ) { lock.lock(); DCOPClient cl; if( cl.attach()) diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas index 67a027c88..9998163e2 100644 --- a/tdecore/kdebug.areas +++ b/tdecore/kdebug.areas @@ -234,7 +234,7 @@ 7011 kio (KSycoca) 7012 kio (KService*) 7013 kio (KPing) -7014 kio (KTrader) +7014 kio (TDETrader) 7015 kio (KAutoMount) 7016 kio (KLauncher) 7017 kio (KIOConnection) diff --git a/tdecore/klockfile.cpp b/tdecore/klockfile.cpp index 56f4ecd82..8b4a991ce 100644 --- a/tdecore/klockfile.cpp +++ b/tdecore/klockfile.cpp @@ -45,7 +45,7 @@ // TODO: http://www.spinnaker.de/linux/nfs-locking.html // TODO: Make regression test -class KLockFile::KLockFilePrivate { +class TDELockFile::TDELockFilePrivate { public: TQString file; int staleTime; @@ -62,9 +62,9 @@ public: // 30 seconds -KLockFile::KLockFile(const TQString &file) +TDELockFile::TDELockFile(const TQString &file) { - d = new KLockFilePrivate(); + d = new TDELockFilePrivate(); d->file = file; d->staleTime = 30; d->isLocked = false; @@ -72,21 +72,21 @@ KLockFile::KLockFile(const TQString &file) d->linkCountSupport = true; } -KLockFile::~KLockFile() +TDELockFile::~TDELockFile() { unlock(); delete d; } int -KLockFile::staleTime() const +TDELockFile::staleTime() const { return d->staleTime; } void -KLockFile::setStaleTime(int _staleTime) +TDELockFile::setStaleTime(int _staleTime) { d->staleTime = _staleTime; } @@ -109,17 +109,17 @@ static bool testLinkCountSupport(const TQCString &fileName) return ((result == 0) && (st_buf.st_nlink == 2)); } -static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport) +static TDELockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport) { TQCString lockFileName = TQFile::encodeName( lockFile ); int result = KDE_lstat( lockFileName, &st_buf ); if (result == 0) - return KLockFile::LockFail; + return TDELockFile::LockFail; KTempFile uniqueFile(lockFile, TQString::null, 0644); uniqueFile.setAutoDelete(true); if (uniqueFile.status() != 0) - return KLockFile::LockError; + return TDELockFile::LockError; char hostname[256]; hostname[0] = 0; @@ -138,23 +138,23 @@ static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat // Create lock file result = ::link( uniqueName, lockFileName ); if (result != 0) - return KLockFile::LockError; + return TDELockFile::LockError; if (!linkCountSupport) - return KLockFile::LockOK; + return TDELockFile::LockOK; #else //TODO for win32 - return KLockFile::LockOK; + return TDELockFile::LockOK; #endif KDE_struct_stat st_buf2; result = KDE_lstat( uniqueName, &st_buf2 ); if (result != 0) - return KLockFile::LockError; + return TDELockFile::LockError; result = KDE_lstat( lockFileName, &st_buf ); if (result != 0) - return KLockFile::LockError; + return TDELockFile::LockError; if (!statResultIsEqual(st_buf, st_buf2) || S_ISLNK(st_buf.st_mode) || S_ISLNK(st_buf2.st_mode)) { @@ -163,15 +163,15 @@ static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat { linkCountSupport = testLinkCountSupport(uniqueName); if (!linkCountSupport) - return KLockFile::LockOK; // Link count support is missing... assume everything is OK. + return TDELockFile::LockOK; // Link count support is missing... assume everything is OK. } - return KLockFile::LockFail; + return TDELockFile::LockFail; } - return KLockFile::LockOK; + return TDELockFile::LockOK; } -static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport) +static TDELockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport) { // This is dangerous, we could be deleting a new lock instead of // the old stale one, let's be very careful @@ -179,7 +179,7 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc // Create temp file KTempFile ktmpFile(lockFile); if (ktmpFile.status() != 0) - return KLockFile::LockError; + return TDELockFile::LockError; TQCString lckFile = TQFile::encodeName(lockFile); TQCString tmpFile = TQFile::encodeName(ktmpFile.name()); @@ -189,10 +189,10 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc #ifdef Q_OS_UNIX // link to lock file if (::link(lckFile, tmpFile) != 0) - return KLockFile::LockFail; // Try again later + return TDELockFile::LockFail; // Try again later #else //TODO for win32 - return KLockFile::LockOK; + return TDELockFile::LockOK; #endif // check if link count increased with exactly one @@ -209,7 +209,7 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc tqWarning("WARNING: deleting stale lockfile %s", lckFile.data()); ::unlink(lckFile); ::unlink(tmpFile); - return KLockFile::LockOK; + return TDELockFile::LockOK; } } @@ -227,34 +227,34 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc tqWarning("WARNING: deleting stale lockfile %s", lckFile.data()); ::unlink(lckFile); ::unlink(tmpFile); - return KLockFile::LockOK; + return TDELockFile::LockOK; } // Failed to delete stale lock file tqWarning("WARNING: Problem deleting stale lockfile %s", lckFile.data()); ::unlink(tmpFile); - return KLockFile::LockFail; + return TDELockFile::LockFail; } -KLockFile::LockResult KLockFile::lock(int options) +TDELockFile::LockResult TDELockFile::lock(int options) { if (d->isLocked) - return KLockFile::LockOK; + return TDELockFile::LockOK; - KLockFile::LockResult result; + TDELockFile::LockResult result; int hardErrors = 5; int n = 5; while(true) { KDE_struct_stat st_buf; result = lockFile(d->file, st_buf, d->linkCountSupport); - if (result == KLockFile::LockOK) + if (result == TDELockFile::LockOK) { d->staleTimer = TQTime(); break; } - else if (result == KLockFile::LockError) + else if (result == TDELockFile::LockError) { d->staleTimer = TQTime(); if (--hardErrors == 0) @@ -262,7 +262,7 @@ KLockFile::LockResult KLockFile::lock(int options) break; } } - else // KLockFile::Fail + else // TDELockFile::Fail { if (!d->staleTimer.isNull() && !statResultIsEqual(d->statBuf, st_buf)) d->staleTimer = TQTime(); @@ -292,17 +292,17 @@ KLockFile::LockResult KLockFile::lock(int options) if (isStale) { if ((options & LockForce) == 0) - return KLockFile::LockStale; + return TDELockFile::LockStale; result = deleteStaleLock(d->file, d->statBuf, d->linkCountSupport); - if (result == KLockFile::LockOK) + if (result == TDELockFile::LockOK) { // Lock deletion successful d->staleTimer = TQTime(); continue; // Now try to get the new lock } - else if (result != KLockFile::LockFail) + else if (result != TDELockFile::LockFail) { return result; } @@ -351,12 +351,12 @@ KLockFile::LockResult KLockFile::lock(int options) return result; } -bool KLockFile::isLocked() const +bool TDELockFile::isLocked() const { return d->isLocked; } -void KLockFile::unlock() +void TDELockFile::unlock() { if (d->isLocked) { @@ -365,7 +365,7 @@ void KLockFile::unlock() } } -bool KLockFile::getLockInfo(int &pid, TQString &hostname, TQString &appname) +bool TDELockFile::getLockInfo(int &pid, TQString &hostname, TQString &appname) { if (d->pid == -1) return false; diff --git a/tdecore/klockfile.h b/tdecore/klockfile.h index f3bf0b0bc..be347ab56 100644 --- a/tdecore/klockfile.h +++ b/tdecore/klockfile.h @@ -25,22 +25,22 @@ #include <ksharedptr.h> /** - * The KLockFile class provides NFS safe lockfiles. + * The TDELockFile class provides NFS safe lockfiles. * * @author Waldo Bastian <bastian@kde.org> * @since 3.3 */ -class TDECORE_EXPORT KLockFile : public TDEShared +class TDECORE_EXPORT TDELockFile : public TDEShared { public: - typedef TDESharedPtr<KLockFile> Ptr; + typedef TDESharedPtr<TDELockFile> Ptr; - KLockFile(const TQString &file); + TDELockFile(const TQString &file); /** * Destroys the object, releasing the lock if held **/ - ~KLockFile(); + ~TDELockFile(); /** * Possible return values of the lock function. @@ -116,8 +116,8 @@ public: bool getLockInfo(int &pid, TQString &hostname, TQString &appname); private: - class KLockFilePrivate; - KLockFilePrivate *d; + class TDELockFilePrivate; + TDELockFilePrivate *d; }; #endif diff --git a/tdecore/tdeconfig.cpp b/tdecore/tdeconfig.cpp index 28f25e61a..1e75be6f1 100644 --- a/tdecore/tdeconfig.cpp +++ b/tdecore/tdeconfig.cpp @@ -277,7 +277,7 @@ void TDEConfig::setFileWriteMode(int mode) backEnd->setFileWriteMode(mode); } -KLockFile::Ptr TDEConfig::lockFile(bool bGlobal) +TDELockFile::Ptr TDEConfig::lockFile(bool bGlobal) { TDEConfigINIBackEnd *aBackEnd = dynamic_cast<TDEConfigINIBackEnd*>(backEnd); if (!aBackEnd) return 0; diff --git a/tdecore/tdeconfig.h b/tdecore/tdeconfig.h index 19cd3bdf5..c2da06446 100644 --- a/tdecore/tdeconfig.h +++ b/tdecore/tdeconfig.h @@ -176,7 +176,7 @@ public: * Otherwise there is a risk of deadlock. * @since 3.3 */ - KLockFile::Ptr lockFile( bool bGlobal=false ); + TDELockFile::Ptr lockFile( bool bGlobal=false ); protected: diff --git a/tdecore/tdeconfigbackend.cpp b/tdecore/tdeconfigbackend.cpp index 77260e326..4ad70b4a8 100644 --- a/tdecore/tdeconfigbackend.cpp +++ b/tdecore/tdeconfigbackend.cpp @@ -236,8 +236,8 @@ class TDEConfigBackEnd::TDEConfigBackEndPrivate public: TQDateTime localLastModified; uint localLastSize; - KLockFile::Ptr localLockFile; - KLockFile::Ptr globalLockFile; + TDELockFile::Ptr localLockFile; + TDELockFile::Ptr globalLockFile; }; void TDEConfigBackEnd::changeFileName(const TQString &_fileName, @@ -270,7 +270,7 @@ void TDEConfigBackEnd::changeFileName(const TQString &_fileName, d->globalLockFile = 0; } -KLockFile::Ptr TDEConfigBackEnd::lockFile(bool bGlobal) +TDELockFile::Ptr TDEConfigBackEnd::lockFile(bool bGlobal) { if (bGlobal) { @@ -279,7 +279,7 @@ KLockFile::Ptr TDEConfigBackEnd::lockFile(bool bGlobal) if (!mGlobalFileName.isEmpty()) { - d->globalLockFile = new KLockFile(mGlobalFileName+".lock"); + d->globalLockFile = new TDELockFile(mGlobalFileName+".lock"); return d->globalLockFile; } } @@ -290,7 +290,7 @@ KLockFile::Ptr TDEConfigBackEnd::lockFile(bool bGlobal) if (!mLocalFileName.isEmpty()) { - d->localLockFile = new KLockFile(mLocalFileName+".lock"); + d->localLockFile = new TDELockFile(mLocalFileName+".lock"); return d->localLockFile; } } @@ -815,7 +815,7 @@ void TDEConfigINIBackEnd::sync(bool bMerge) // it wasn't SUID. if (checkAccess(mLocalFileName, W_OK)) { // File is writable - KLockFile::Ptr lf; + TDELockFile::Ptr lf; bool mergeLocalFile = bMerge; // Check if the file has been updated since. @@ -827,7 +827,7 @@ void TDEConfigINIBackEnd::sync(bool bMerge) if (lf) { - lf->lock( KLockFile::LockForce ); + lf->lock( TDELockFile::LockForce ); // But what if the locking failed? Ignore it for now... } @@ -873,13 +873,13 @@ void TDEConfigINIBackEnd::sync(bool bMerge) // can we allow the write? (see above) if (checkAccess ( mGlobalFileName, W_OK )) { - KLockFile::Ptr lf = lockFile(true); // Lock file for global file + TDELockFile::Ptr lf = lockFile(true); // Lock file for global file if (lf && lf->isLocked()) lf = 0; // Already locked, we don't need to lock/unlock again if (lf) { - lf->lock( KLockFile::LockForce ); + lf->lock( TDELockFile::LockForce ); // But what if the locking failed? Ignore it for now... } writeConfigFile( mGlobalFileName, true, bMerge ); // Always merge diff --git a/tdecore/tdeconfigbackend.h b/tdecore/tdeconfigbackend.h index 05884cb7f..71ba15288 100644 --- a/tdecore/tdeconfigbackend.h +++ b/tdecore/tdeconfigbackend.h @@ -151,7 +151,7 @@ public: * @param bGlobal If true, returns a lock file object for kdeglobals * @since 3.3 */ - KLockFile::Ptr lockFile( bool bGlobal = false ); + TDELockFile::Ptr lockFile( bool bGlobal = false ); #ifdef KDE_NO_COMPAT private: diff --git a/tdehtml/ecma/kjs_navigator.cpp b/tdehtml/ecma/kjs_navigator.cpp index 5934afd3e..03bc22987 100644 --- a/tdehtml/ecma/kjs_navigator.cpp +++ b/tdehtml/ecma/kjs_navigator.cpp @@ -291,9 +291,9 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo) plugins->setAutoDelete( true ); mimes->setAutoDelete( true ); - // read in using KTrader - KTrader::OfferList offers = KTrader::self()->query("Browser/View"); - KTrader::OfferList::iterator it; + // read in using TDETrader + TDETrader::OfferList offers = TDETrader::self()->query("Browser/View"); + TDETrader::OfferList::iterator it; for ( it = offers.begin(); it != offers.end(); ++it ) { TQVariant pluginsinfo = (**it).property( "X-TDE-BrowserView-PluginsInfo" ); diff --git a/tdehtml/rendering/render_frames.cpp b/tdehtml/rendering/render_frames.cpp index 66e2fda75..64bef11dc 100644 --- a/tdehtml/rendering/render_frames.cpp +++ b/tdehtml/rendering/render_frames.cpp @@ -812,7 +812,7 @@ void RenderPartObject::updateWidget() // It is ActiveX, but the nsplugin system handling // should also work, that's why we don't override the // serviceType with application/x-activex-handler - // but let the KTrader in tdehtmlpart::createPart() detect + // but let the TDETrader in tdehtmlpart::createPart() detect // the user's preference: launch with activex viewer or // with nspluginviewer (Niko) serviceType = "application/x-shockwave-flash"; diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp index b74984aaf..059763c6a 100644 --- a/tdehtml/tdehtml_part.cpp +++ b/tdehtml/tdehtml_part.cpp @@ -4652,20 +4652,20 @@ KParts::ReadOnlyPart *TDEHTMLPart::createPart( TQWidget *parentWidget, const cha if ( !serviceName.isEmpty() ) constr.append( TQString::fromLatin1( "Name == '%1'" ).arg( serviceName ) ); - KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString() ); + TDETrader::OfferList offers = TDETrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString() ); if ( offers.isEmpty() ) { int pos = mimetype.find( "-plugin" ); if (pos < 0) return 0L; TQString stripped_mime = mimetype.left( pos ); - offers = KTrader::self()->query( stripped_mime, "KParts/ReadOnlyPart", constr, TQString() ); + offers = TDETrader::self()->query( stripped_mime, "KParts/ReadOnlyPart", constr, TQString() ); if ( offers.isEmpty() ) return 0L; } - KTrader::OfferList::ConstIterator it = offers.begin(); - const KTrader::OfferList::ConstIterator itEnd = offers.end(); + TDETrader::OfferList::ConstIterator it = offers.begin(); + const TDETrader::OfferList::ConstIterator itEnd = offers.end(); for ( ; it != itEnd; ++it ) { KService::Ptr service = (*it); diff --git a/tdeio/Mainpage.dox b/tdeio/Mainpage.dox index 7545c29ef..2de4b3157 100644 --- a/tdeio/Mainpage.dox +++ b/tdeio/Mainpage.dox @@ -28,7 +28,7 @@ * KServiceTypeProfile: * Stores the user's preferences for services bound to mimetypes/servicetypes. * - * KTrader: + * TDETrader: * Use it to query for which services implement a given mimetype/servicetype. * Has its own language, in order to allow complex queries. * diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp index bc2f649b9..0e9f125a6 100644 --- a/tdeio/tdefile/kpropertiesdialog.cpp +++ b/tdeio/tdefile/kpropertiesdialog.cpp @@ -522,9 +522,9 @@ void KPropertiesDialog::insertPages() " ([X-TDE-Protocol] == '%1' ) )" ).arg(item->url().protocol()); kdDebug( 250 ) << "trader query: " << query << endl; - KTrader::OfferList offers = KTrader::self()->query( mimetype, query ); - KTrader::OfferList::ConstIterator it = offers.begin(); - KTrader::OfferList::ConstIterator end = offers.end(); + TDETrader::OfferList offers = TDETrader::self()->query( mimetype, query ); + TDETrader::OfferList::ConstIterator it = offers.begin(); + TDETrader::OfferList::ConstIterator end = offers.end(); for (; it != end; ++it ) { KPropsDlgPlugin *plugin = KParts::ComponentFactory diff --git a/tdeio/tdeio/kdatatool.cpp b/tdeio/tdeio/kdatatool.cpp index 08630d110..3f4f0a865 100644 --- a/tdeio/tdeio/kdatatool.cpp +++ b/tdeio/tdeio/kdatatool.cpp @@ -177,7 +177,7 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const else constr = constr + " and " + tmp; } -/* Bug in KTrader ? Test with HEAD-tdelibs! +/* Bug in TDETrader ? Test with HEAD-tdelibs! if ( instance ) { TQString tmp = TQString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() ); @@ -189,9 +189,9 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const // Query the trader //kdDebug() << "KDataToolInfo::query " << constr << endl; - KTrader::OfferList offers = KTrader::self()->query( "KDataTool", constr ); + TDETrader::OfferList offers = TDETrader::self()->query( "KDataTool", constr ); - KTrader::OfferList::ConstIterator it = offers.begin(); + TDETrader::OfferList::ConstIterator it = offers.begin(); for( ; it != offers.end(); ++it ) { // Temporary replacement for the non-working trader query above diff --git a/tdeio/tdeio/kdatatool.h b/tdeio/tdeio/kdatatool.h index 1258767fc..6cb9353a8 100644 --- a/tdeio/tdeio/kdatatool.h +++ b/tdeio/tdeio/kdatatool.h @@ -164,7 +164,7 @@ public: bool isValid() const; /** - * Queries the KTrader about installed KDataTool implementations. + * Queries the TDETrader about installed KDataTool implementations. * @param datatype a type that the application can 'export' to the tools (e.g. TQString) * @param mimetype the mimetype of the data (e.g. text/plain) * @param instance the application (or the part)'s instance (to check if a tool is excluded from this part, diff --git a/tdeio/tdeio/kdcopservicestarter.cpp b/tdeio/tdeio/kdcopservicestarter.cpp index 3c9b55501..a6e39815f 100644 --- a/tdeio/tdeio/kdcopservicestarter.cpp +++ b/tdeio/tdeio/kdcopservicestarter.cpp @@ -58,7 +58,7 @@ int KDCOPServiceStarter::findServiceFor( const TQString& serviceType, if ( !constraint.isEmpty() ) constraint += " and "; constraint += "exist [X-DCOP-ServiceName]"; - KTrader::OfferList offers = KTrader::self()->query(serviceType, "Application", constraint, preferences); + TDETrader::OfferList offers = TDETrader::self()->query(serviceType, "Application", constraint, preferences); if ( offers.isEmpty() ) { if ( error ) *error = i18n("No service implementing %1").arg( serviceType ); @@ -88,7 +88,7 @@ int KDCOPServiceStarter::startServiceFor( const TQString& serviceType, const TQString& preferences, TQString *error, TQCString* dcopService, int /*flags*/ ) { - KTrader::OfferList offers = KTrader::self()->query(serviceType, "Application", constraint, preferences); + TDETrader::OfferList offers = TDETrader::self()->query(serviceType, "Application", constraint, preferences); if ( offers.isEmpty() ) return -1; KService::Ptr ptr = offers.first(); diff --git a/tdeio/tdeio/kdcopservicestarter.h b/tdeio/tdeio/kdcopservicestarter.h index f70f0173e..04f8d7ee2 100644 --- a/tdeio/tdeio/kdcopservicestarter.h +++ b/tdeio/tdeio/kdcopservicestarter.h @@ -26,7 +26,7 @@ class KDCOPServiceStarter; class TQCString; /** - * A generic DCOP service starter, using KTrader. + * A generic DCOP service starter, using TDETrader. * The default implementation starts new processes, but this interface can * also be reimplemented by specific applications to provide dlopened in-process DCOP objects. * @author David Faure <faure@kde.org> @@ -46,8 +46,8 @@ public: * this method will call startServiceFor to start it. * * @param serviceType the type of service we're looking for - * @param constraint see KTrader - * @param preferences see KTrader + * @param constraint see TDETrader + * @param preferences see TDETrader * @param error On failure, @p error contains a description of the error * that occurred. If the pointer is 0, the argument will be * ignored @@ -67,15 +67,15 @@ public: /** * Find an implementation of the given @p serviceType, * and start it, to use its DCOP interface. - * The default implementation uses KTrader to find the preferred Application, + * The default implementation uses TDETrader to find the preferred Application, * and then starts it using kapp->startService... * * However applications (like kontact) can reimplement this method, to provide * an in-process way of loading the implementation for this service type. * * @param serviceType the type of service we're looking for - * @param constraint see KTrader - * @param preferences see KTrader + * @param constraint see TDETrader + * @param preferences see TDETrader * @param error On failure, @p error contains a description of the error * that occurred. If the pointer is 0, the argument will be * ignored diff --git a/tdeio/tdeio/kfilterbase.cpp b/tdeio/tdeio/kfilterbase.cpp index f9250cfe9..eeb8e6a34 100644 --- a/tdeio/tdeio/kfilterbase.cpp +++ b/tdeio/tdeio/kfilterbase.cpp @@ -48,10 +48,10 @@ KFilterBase * KFilterBase::findFilterByFileName( const TQString & fileName ) KFilterBase * KFilterBase::findFilterByMimeType( const TQString & mimeType ) { - KTrader::OfferList offers = KTrader::self()->query( "TDECompressionFilter", + TDETrader::OfferList offers = TDETrader::self()->query( "TDECompressionFilter", TQString("'") + mimeType + "' in ServiceTypes" ); - KTrader::OfferList::ConstIterator it = offers.begin(); - KTrader::OfferList::ConstIterator end = offers.end(); + TDETrader::OfferList::ConstIterator it = offers.begin(); + TDETrader::OfferList::ConstIterator end = offers.end(); kdDebug(7005) << "KFilterBase::findFilterByMimeType(" << mimeType << ") got " << offers.count() << " offers" << endl; for (; it != end; ++it ) diff --git a/tdeio/tdeio/kscan.cpp b/tdeio/tdeio/kscan.cpp index 49ae7c5ab..7b00f08a9 100644 --- a/tdeio/tdeio/kscan.cpp +++ b/tdeio/tdeio/kscan.cpp @@ -28,7 +28,7 @@ KScanDialog * KScanDialog::getScanDialog( TQWidget *parent, const char *name, bool modal ) { - KTrader::OfferList offers = KTrader::self()->query("KScan/KScanDialog"); + TDETrader::OfferList offers = TDETrader::self()->query("KScan/KScanDialog"); if ( offers.isEmpty() ) return 0L; @@ -71,7 +71,7 @@ bool KScanDialog::setup() KOCRDialog * KOCRDialog::getOCRDialog( TQWidget *parent, const char *name, bool modal ) { - KTrader::OfferList offers = KTrader::self()->query("KScan/KOCRDialog"); + TDETrader::OfferList offers = TDETrader::self()->query("KScan/KOCRDialog"); if ( offers.isEmpty() ) return 0L; diff --git a/tdeio/tdeio/kservicetype.h b/tdeio/tdeio/kservicetype.h index 1e4bcaace..9b59b39b4 100644 --- a/tdeio/tdeio/kservicetype.h +++ b/tdeio/tdeio/kservicetype.h @@ -210,7 +210,7 @@ public: * Returns all services supporting the given servicetype name. * This doesn't take care of the user profile. * In fact it is used by KServiceTypeProfile, - * which is used by KTrader, and that's the one you should use. + * which is used by TDETrader, and that's the one you should use. * @param _servicetype the name of the service type to search * @return the list of all services of the given type */ diff --git a/tdeio/tdeio/ktrader.cpp b/tdeio/tdeio/ktrader.cpp index 585c6a499..7ef39638e 100644 --- a/tdeio/tdeio/ktrader.cpp +++ b/tdeio/tdeio/ktrader.cpp @@ -27,18 +27,18 @@ #include <kstaticdeleter.h> #include <kdebug.h> -template class KStaticDeleter<KTrader>; +template class KStaticDeleter<TDETrader>; using namespace TDEIO; -class KTraderSorter +class TDETraderSorter { public: - KTraderSorter() { m_pService = 0; }; - KTraderSorter( const KTraderSorter& s ) : m_userPreference( s.m_userPreference ), + TDETraderSorter() { m_pService = 0; }; + TDETraderSorter( const TDETraderSorter& s ) : m_userPreference( s.m_userPreference ), m_bAllowAsDefault( s.m_bAllowAsDefault ), m_traderPreference( s.m_traderPreference ), m_pService( s.m_pService ) { } - KTraderSorter( const KService::Ptr &_service, double _pref1, int _pref2, bool _default ) + TDETraderSorter( const KService::Ptr &_service, double _pref1, int _pref2, bool _default ) { m_pService = _service; m_userPreference = _pref2; m_traderPreference = _pref1; @@ -47,7 +47,7 @@ public: KService::Ptr service() const { return m_pService; } - bool operator< ( const KTraderSorter& ) const; + bool operator< ( const TDETraderSorter& ) const; private: /** @@ -69,7 +69,7 @@ private: KService::Ptr m_pService; }; -bool KTraderSorter::operator< ( const KTraderSorter& _o ) const +bool TDETraderSorter::operator< ( const TDETraderSorter& _o ) const { if ( _o.m_bAllowAsDefault && !m_bAllowAsDefault ) return true; @@ -84,32 +84,32 @@ bool KTraderSorter::operator< ( const KTraderSorter& _o ) const // -------------------------------------------------- -KTrader* KTrader::s_self = 0; -static KStaticDeleter<KTrader> ktradersd; +TDETrader* TDETrader::s_self = 0; +static KStaticDeleter<TDETrader> ktradersd; -KTrader* KTrader::self() +TDETrader* TDETrader::self() { if ( !s_self ) - ktradersd.setObject( s_self, new KTrader ); + ktradersd.setObject( s_self, new TDETrader ); return s_self; } -KTrader::KTrader() +TDETrader::TDETrader() { } -KTrader::~KTrader() +TDETrader::~TDETrader() { } -KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& _constraint, +TDETrader::OfferList TDETrader::query( const TQString& _servicetype, const TQString& _constraint, const TQString& _preferences ) const { return query( _servicetype, TQString::null, _constraint, _preferences ); } -KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& _genericServiceType, +TDETrader::OfferList TDETrader::query( const TQString& _servicetype, const TQString& _genericServiceType, const TQString& _constraint, const TQString& _preferences ) const { @@ -124,7 +124,7 @@ KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& prefs = TDEIO::parsePreferences( _preferences ); KServiceTypeProfile::OfferList lst; - KTrader::OfferList ret; + TDETrader::OfferList ret; // Get all services of this service type. lst = KServiceTypeProfile::offers( _servicetype, _genericServiceType ); @@ -147,17 +147,17 @@ KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& if ( !!prefs ) { - TQValueList<KTraderSorter> sorter; + TQValueList<TDETraderSorter> sorter; KServiceTypeProfile::OfferList::Iterator it = lst.begin(); for( ; it != lst.end(); ++it ) { PreferencesReturn p = matchPreferences( prefs, (*it).service(), lst ); if ( p.type == PreferencesReturn::PRT_DOUBLE ) - sorter.append( KTraderSorter( (*it).service(), p.f, (*it).preference(), (*it).allowAsDefault() ) ); + sorter.append( TDETraderSorter( (*it).service(), p.f, (*it).preference(), (*it).allowAsDefault() ) ); } qBubbleSort( sorter ); - TQValueList<KTraderSorter>::Iterator it2 = sorter.begin(); + TQValueList<TDETraderSorter>::Iterator it2 = sorter.begin(); for( ; it2 != sorter.end(); ++it2 ) ret.prepend( (*it2).service() ); } @@ -180,7 +180,7 @@ KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& return ret; } -void KTrader::virtual_hook( int, void* ) +void TDETrader::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } #include "ktrader.moc" diff --git a/tdeio/tdeio/ktrader.h b/tdeio/tdeio/ktrader.h index c96a64a21..6b7e804fb 100644 --- a/tdeio/tdeio/ktrader.h +++ b/tdeio/tdeio/ktrader.h @@ -48,7 +48,7 @@ * then will use KRun::run() to invoke the application. In "trader-speak", * this looks like this: * \code - * KTrader::OfferList offers = KTrader::self()->query("text/html", "Type == 'Application'"); + * TDETrader::OfferList offers = TDETrader::self()->query("text/html", "Type == 'Application'"); * KService::Ptr ptr = offers.first(); * KURL::List lst; * lst.append("http://www.kde.org/index.html"); @@ -57,7 +57,7 @@ * * Now, say that you want to list all KParts component that can handle HTML. * \code - * KTrader::OfferList offers = KTrader::self()->query("text/html", "KParts/ReadOnlyPart"); + * TDETrader::OfferList offers = TDETrader::self()->query("text/html", "KParts/ReadOnlyPart"); * \endcode * * If you want to get the preferred KParts component for text/html you could use @@ -82,7 +82,7 @@ * applications or components. * @author Torben Weis <weis@kde.org> */ -class TDEIO_EXPORT KTrader : public TQObject +class TDEIO_EXPORT TDETrader : public TQObject { Q_OBJECT public: @@ -95,10 +95,10 @@ public: /** * Standard destructor */ - virtual ~KTrader(); + virtual ~TDETrader(); /** - * The main function in the KTrader class. + * The main function in the TDETrader class. * * It will return a list of services that match your * specifications. The only required parameter is the service @@ -158,24 +158,24 @@ public: const TQString& preferences /*= TQString::null*/) const; /** - * This is a static pointer to a KTrader instance. + * This is a static pointer to a TDETrader instance. * * You will need - * to use this to access the KTrader functionality since the + * to use this to access the TDETrader functionality since the * constuctors are protected. * - * @return Static KTrader instance + * @return Static TDETrader instance */ - static KTrader* self(); + static TDETrader* self(); protected: /** * @internal */ - KTrader(); + TDETrader(); private: - static KTrader* s_self; + static TDETrader* s_self; protected: virtual void virtual_hook( int id, void* data ); }; @@ -185,7 +185,7 @@ protected: * * @section Literals * - * As elementary atoms of the constraint language, KTrader supports + * As elementary atoms of the constraint language, TDETrader supports * booleans, integers, floats and strings. Boolean literals are * @a TRUE and @a FALSE . Integers can be positive or negative, * i.e. @a 42 and @a -10 are legal values. Floating point @@ -277,7 +277,7 @@ protected: * * The following examples show filters for .desktop files. * <tt>Type</tt>, <tt>ServiceTypes</tt> and <tt>MimeType</tt> are - * properties in .desktop files. Be aware that within KTrader MimeType + * properties in .desktop files. Be aware that within TDETrader MimeType * properties are understood as ServiceTypes ones. * * diff --git a/tdeio/tdeio/ktraderparse.cpp b/tdeio/tdeio/ktraderparse.cpp index 627791c00..242bd1762 100644 --- a/tdeio/tdeio/ktraderparse.cpp +++ b/tdeio/tdeio/ktraderparse.cpp @@ -39,7 +39,7 @@ ParseTreeBase::Ptr TDEIO::parseConstraints( const TQString& _constr ) { TQCString str = _constr.utf8(); sCode = str.data(); - KTraderParse_mainParse( sCode ); + TDETraderParse_mainParse( sCode ); sCode = 0; assert( pTree ); return *pTree; @@ -49,13 +49,13 @@ ParseTreeBase::Ptr TDEIO::parsePreferences( const TQString& _prefs ) { TQCString str = _prefs.utf8(); sCode = str.data(); - KTraderParse_mainParse( sCode ); + TDETraderParse_mainParse( sCode ); sCode = 0; assert( pTree ); return *pTree; } -void KTraderParse_setParseTree( void *_ptr1 ) +void TDETraderParse_setParseTree( void *_ptr1 ) { if ( !pTree ) pTree = new ParseTreeBase::Ptr; // ### leak; should use KStaticDeleter @@ -63,95 +63,95 @@ void KTraderParse_setParseTree( void *_ptr1 ) } -void KTraderParse_error( const char* err ) +void TDETraderParse_error( const char* err ) { kdWarning(7014) << "Parsing '" << sCode << "' gave " << err << endl; } -void* KTraderParse_newOR( void *_ptr1, void *_ptr2 ) +void* TDETraderParse_newOR( void *_ptr1, void *_ptr2 ) { return new ParseTreeOR( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); } -void* KTraderParse_newAND( void *_ptr1, void *_ptr2 ) +void* TDETraderParse_newAND( void *_ptr1, void *_ptr2 ) { return new ParseTreeAND( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); } -void* KTraderParse_newCMP( void *_ptr1, void *_ptr2, int _i ) +void* TDETraderParse_newCMP( void *_ptr1, void *_ptr2, int _i ) { return new ParseTreeCMP( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2, _i ); } -void* KTraderParse_newIN( void *_ptr1, void *_ptr2 ) +void* TDETraderParse_newIN( void *_ptr1, void *_ptr2 ) { return new ParseTreeIN( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); } -void* KTraderParse_newMATCH( void *_ptr1, void *_ptr2 ) +void* TDETraderParse_newMATCH( void *_ptr1, void *_ptr2 ) { return new ParseTreeMATCH( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2 ); } -void* KTraderParse_newCALC( void *_ptr1, void *_ptr2, int _i ) +void* TDETraderParse_newCALC( void *_ptr1, void *_ptr2, int _i ) { return new ParseTreeCALC( (ParseTreeBase*)_ptr1, (ParseTreeBase*)_ptr2, _i ); } -void* KTraderParse_newBRACKETS( void *_ptr1 ) +void* TDETraderParse_newBRACKETS( void *_ptr1 ) { return new ParseTreeBRACKETS( (ParseTreeBase*)_ptr1 ); } -void* KTraderParse_newNOT( void *_ptr1 ) +void* TDETraderParse_newNOT( void *_ptr1 ) { return new ParseTreeNOT( (ParseTreeBase*)_ptr1 ); } -void* KTraderParse_newEXIST( char *_ptr1 ) +void* TDETraderParse_newEXIST( char *_ptr1 ) { ParseTreeEXIST *t = new ParseTreeEXIST( _ptr1 ); free(_ptr1); return t; } -void* KTraderParse_newID( char *_ptr1 ) +void* TDETraderParse_newID( char *_ptr1 ) { ParseTreeID *t = new ParseTreeID( _ptr1 ); free(_ptr1); return t; } -void* KTraderParse_newSTRING( char *_ptr1 ) +void* TDETraderParse_newSTRING( char *_ptr1 ) { ParseTreeSTRING *t = new ParseTreeSTRING( _ptr1 ); free(_ptr1); return t; } -void* KTraderParse_newNUM( int _i ) +void* TDETraderParse_newNUM( int _i ) { return new ParseTreeNUM( _i ); } -void* KTraderParse_newFLOAT( float _f ) +void* TDETraderParse_newFLOAT( float _f ) { return new ParseTreeDOUBLE( _f ); } -void* KTraderParse_newBOOL( char _b ) +void* TDETraderParse_newBOOL( char _b ) { return new ParseTreeBOOL( (bool)_b ); } -void* KTraderParse_newMAX2( char *_id ) +void* TDETraderParse_newMAX2( char *_id ) { ParseTreeMAX2 *t = new ParseTreeMAX2( _id ); free(_id); return t; } -void* KTraderParse_newMIN2( char *_id ) +void* TDETraderParse_newMIN2( char *_id ) { ParseTreeMIN2 *t = new ParseTreeMIN2( _id ); free(_id); diff --git a/tdeio/tdeio/ktraderparse.h b/tdeio/tdeio/ktraderparse.h index bfeb15fe0..63743d3f3 100644 --- a/tdeio/tdeio/ktraderparse.h +++ b/tdeio/tdeio/ktraderparse.h @@ -23,30 +23,30 @@ /* * Functions definition for yacc */ -void KTraderParse_mainParse( const char *_code ); -void KTraderParse_setParseTree( void *_ptr1 ); -void KTraderParse_error( const char* err ); -void* KTraderParse_newOR( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newAND( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newCMP( void *_ptr1, void *_ptr2, int _i ); -void* KTraderParse_newIN( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newMATCH( void *_ptr1, void *_ptr2 ); -void* KTraderParse_newCALC( void *_ptr1, void *_ptr2, int _i ); -void* KTraderParse_newBRACKETS( void *_ptr1 ); -void* KTraderParse_newNOT( void *_ptr1 ); -void* KTraderParse_newEXIST( char *_ptr1 ); -void* KTraderParse_newID( char *_ptr1 ); -void* KTraderParse_newSTRING( char *_ptr1 ); -void* KTraderParse_newNUM( int _i ); -void* KTraderParse_newFLOAT( float _f ); -void* KTraderParse_newBOOL( char _b ); +void TDETraderParse_mainParse( const char *_code ); +void TDETraderParse_setParseTree( void *_ptr1 ); +void TDETraderParse_error( const char* err ); +void* TDETraderParse_newOR( void *_ptr1, void *_ptr2 ); +void* TDETraderParse_newAND( void *_ptr1, void *_ptr2 ); +void* TDETraderParse_newCMP( void *_ptr1, void *_ptr2, int _i ); +void* TDETraderParse_newIN( void *_ptr1, void *_ptr2 ); +void* TDETraderParse_newMATCH( void *_ptr1, void *_ptr2 ); +void* TDETraderParse_newCALC( void *_ptr1, void *_ptr2, int _i ); +void* TDETraderParse_newBRACKETS( void *_ptr1 ); +void* TDETraderParse_newNOT( void *_ptr1 ); +void* TDETraderParse_newEXIST( char *_ptr1 ); +void* TDETraderParse_newID( char *_ptr1 ); +void* TDETraderParse_newSTRING( char *_ptr1 ); +void* TDETraderParse_newNUM( int _i ); +void* TDETraderParse_newFLOAT( float _f ); +void* TDETraderParse_newBOOL( char _b ); -void* KTraderParse_newWITH( void *_ptr1 ); -void* KTraderParse_newMAX( void *_ptr1 ); -void* KTraderParse_newMIN( void *_ptr1 ); -void* KTraderParse_newMAX2( char *_id ); -void* KTraderParse_newMIN2( char *_id ); -void* KTraderParse_newFIRST(); -void* KTraderParse_newRANDOM(); +void* TDETraderParse_newWITH( void *_ptr1 ); +void* TDETraderParse_newMAX( void *_ptr1 ); +void* TDETraderParse_newMIN( void *_ptr1 ); +void* TDETraderParse_newMAX2( char *_id ); +void* TDETraderParse_newMIN2( char *_id ); +void* TDETraderParse_newFIRST(); +void* TDETraderParse_newRANDOM(); #endif diff --git a/tdeio/tdeio/kurifilter.cpp b/tdeio/tdeio/kurifilter.cpp index 5c50f4fa9..49953e5b7 100644 --- a/tdeio/tdeio/kurifilter.cpp +++ b/tdeio/tdeio/kurifilter.cpp @@ -426,10 +426,10 @@ TQStringList KURIFilter::pluginNames() const void KURIFilter::loadPlugins() { - KTrader::OfferList offers = KTrader::self()->query( "KURIFilter/Plugin" ); + TDETrader::OfferList offers = TDETrader::self()->query( "KURIFilter/Plugin" ); - KTrader::OfferList::ConstIterator it = offers.begin(); - KTrader::OfferList::ConstIterator end = offers.end(); + TDETrader::OfferList::ConstIterator it = offers.begin(); + TDETrader::OfferList::ConstIterator end = offers.end(); for (; it != end; ++it ) { diff --git a/tdeio/tdeio/kuserprofile.h b/tdeio/tdeio/kuserprofile.h index 45b58fe6a..4c0c6929c 100644 --- a/tdeio/tdeio/kuserprofile.h +++ b/tdeio/tdeio/kuserprofile.h @@ -105,13 +105,13 @@ private: * of a service type. * It consists of a list of services (service offers) for the service type * that is sorted by the user's preference. - * KTrader uses KServiceTypeProfile to sort its results, so usually - * you can just use KTrader to find the user's preferred service. + * TDETrader uses KServiceTypeProfile to sort its results, so usually + * you can just use TDETrader to find the user's preferred service. * * @see KService * @see KServiceType * @see KServiceOffer - * @see KTrader + * @see TDETrader * @short Represents the user's preferences for services of a service type */ class TDEIO_EXPORT KServiceTypeProfile @@ -168,12 +168,12 @@ public: /** * Returns the offers associated with a given servicetype, sorted by preference. - * This is what KTrader uses to get the list of offers, before applying the + * This is what TDETrader uses to get the list of offers, before applying the * constraints and preferences. * * If @p genericServiceType is specified, a list is returned with * the offers associated with the combination of the two service types. - * This is almost like an "foo in ServiceTypes" constraint in the KTrader, + * This is almost like an "foo in ServiceTypes" constraint in the TDETrader, * but the difference is that to order the offers, we will look at entries * specifically for those two service types. Typically, this is used for * getting the list of embeddable components that can handle a given mimetype. diff --git a/tdeio/tdeio/lex.c b/tdeio/tdeio/lex.c index 99848a2f3..8e4ea0ea9 100644 --- a/tdeio/tdeio/lex.c +++ b/tdeio/tdeio/lex.c @@ -436,12 +436,12 @@ char *yytext; #include <stdlib.h> #define YY_NO_UNPUT -char* KTraderParse_putSymbol( char *_name ); -char *KTraderParse_putSymbolInBrackets( char *_name ); -char* KTraderParse_putString( char *_name ); +char* TDETraderParse_putSymbol( char *_name ); +char *TDETraderParse_putSymbolInBrackets( char *_name ); +char* TDETraderParse_putString( char *_name ); int yywrap(); int kiotraderlex(void); -void KTraderParse_initFlex( const char *_code ); +void TDETraderParse_initFlex( const char *_code ); #line 447 "lex.c" @@ -763,7 +763,7 @@ YY_RULE_SETUP case 17: YY_RULE_SETUP #line 42 "lex.l" -{ yylval.name = KTraderParse_putString( yytext ); return VAL_STRING; } +{ yylval.name = TDETraderParse_putString( yytext ); return VAL_STRING; } YY_BREAK case 18: YY_RULE_SETUP @@ -783,12 +783,12 @@ YY_RULE_SETUP case 21: YY_RULE_SETUP #line 49 "lex.l" -{ yylval.name = KTraderParse_putSymbolInBrackets( yytext ); return VAL_ID; } +{ yylval.name = TDETraderParse_putSymbolInBrackets( yytext ); return VAL_ID; } YY_BREAK case 22: YY_RULE_SETUP #line 51 "lex.l" -{ yylval.name = KTraderParse_putSymbol( yytext ); return VAL_ID; } +{ yylval.name = TDETraderParse_putSymbol( yytext ); return VAL_ID; } YY_BREAK case 23: YY_RULE_SETUP @@ -1689,7 +1689,7 @@ int main() #line 57 "lex.l" -char* KTraderParse_putSymbolInBrackets( char *_name ) +char* TDETraderParse_putSymbolInBrackets( char *_name ) { int l = strlen( _name )-1; char *p = (char *)malloc( l ); @@ -1702,7 +1702,7 @@ char* KTraderParse_putSymbolInBrackets( char *_name ) return p; } -char *KTraderParse_putSymbol( char *_name ) +char *TDETraderParse_putSymbol( char *_name ) { char *p = (char*)malloc( strlen( _name ) + 1 ); if (p != NULL) @@ -1712,7 +1712,7 @@ char *KTraderParse_putSymbol( char *_name ) return p; } -char* KTraderParse_putString( char *_str ) +char* TDETraderParse_putString( char *_str ) { int l = strlen( _str ); char *p = (char*)malloc( l ); @@ -1747,7 +1747,7 @@ char* KTraderParse_putString( char *_str ) return p; } -void KTraderParse_initFlex( const char *_code ) +void TDETraderParse_initFlex( const char *_code ) { yy_switch_to_buffer( yy_scan_string( _code ) ); } diff --git a/tdeio/tdeio/lex.l b/tdeio/tdeio/lex.l index 073a34965..f479d821f 100644 --- a/tdeio/tdeio/lex.l +++ b/tdeio/tdeio/lex.l @@ -7,12 +7,12 @@ #include <stdlib.h> #define YY_NO_UNPUT -char* KTraderParse_putSymbol( char *_name ); -char *KTraderParse_putSymbolInBrackets( char *_name ); -char* KTraderParse_putString( char *_name ); +char* TDETraderParse_putSymbol( char *_name ); +char *TDETraderParse_putSymbolInBrackets( char *_name ); +char* TDETraderParse_putString( char *_name ); int yywrap(); int kiotraderlex(void); -void KTraderParse_initFlex( const char *_code ); +void TDETraderParse_initFlex( const char *_code ); %} @@ -39,16 +39,16 @@ DIGIT [0-9] "TRUE" { yylval.valb = 1; return VAL_BOOL; } "FALSE" { yylval.valb = 0; return VAL_BOOL; } -"'"[^']*"'" { yylval.name = KTraderParse_putString( yytext ); return VAL_STRING; } +"'"[^']*"'" { yylval.name = TDETraderParse_putString( yytext ); return VAL_STRING; } "-"{DIGIT}+ { yylval.vali = atoi( yytext ); return VAL_NUM; } {DIGIT}+ { yylval.vali = atoi( yytext ); return VAL_NUM; } {DIGIT}*"\."{DIGIT}+ { yylval.vald = atof( yytext ); return VAL_FLOAT; } -\[[a-zA-Z][a-zA-Z0-9\-]*\] { yylval.name = KTraderParse_putSymbolInBrackets( yytext ); return VAL_ID; } +\[[a-zA-Z][a-zA-Z0-9\-]*\] { yylval.name = TDETraderParse_putSymbolInBrackets( yytext ); return VAL_ID; } -[a-zA-Z][a-zA-Z0-9]* { yylval.name = KTraderParse_putSymbol( yytext ); return VAL_ID; } +[a-zA-Z][a-zA-Z0-9]* { yylval.name = TDETraderParse_putSymbol( yytext ); return VAL_ID; } [ \t\n]+ /* eat up whitespace */ @@ -56,7 +56,7 @@ DIGIT [0-9] %% -char* KTraderParse_putSymbolInBrackets( char *_name ) +char* TDETraderParse_putSymbolInBrackets( char *_name ) { int l = strlen( _name )-1; char *p = (char *)malloc( l ); @@ -69,7 +69,7 @@ char* KTraderParse_putSymbolInBrackets( char *_name ) return p; } -char *KTraderParse_putSymbol( char *_name ) +char *TDETraderParse_putSymbol( char *_name ) { char *p = (char*)malloc( strlen( _name ) + 1 ); if (p != NULL) @@ -79,7 +79,7 @@ char *KTraderParse_putSymbol( char *_name ) return p; } -char* KTraderParse_putString( char *_str ) +char* TDETraderParse_putString( char *_str ) { int l = strlen( _str ); char *p = (char*)malloc( l ); @@ -114,7 +114,7 @@ char* KTraderParse_putString( char *_str ) return p; } -void KTraderParse_initFlex( const char *_code ) +void TDETraderParse_initFlex( const char *_code ) { yy_switch_to_buffer( yy_scan_string( _code ) ); } diff --git a/tdeio/tdeio/metainfojob.cpp b/tdeio/tdeio/metainfojob.cpp index d9a31ab0e..002c76b2a 100644 --- a/tdeio/tdeio/metainfojob.cpp +++ b/tdeio/tdeio/metainfojob.cpp @@ -154,8 +154,8 @@ void MetaInfoJob::slotMetaInfo(TDEIO::Job*, const TQByteArray &data) TQStringList MetaInfoJob::availablePlugins() { TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) + TDETrader::OfferList plugins = TDETrader::self()->query("KFilePlugin"); + for (TDETrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) result.append((*it)->desktopEntryName()); return result; } @@ -163,8 +163,8 @@ TQStringList MetaInfoJob::availablePlugins() TQStringList MetaInfoJob::supportedMimeTypes() { TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) + TDETrader::OfferList plugins = TDETrader::self()->query("KFilePlugin"); + for (TDETrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) result += (*it)->property("MimeTypes").toStringList(); return result; } diff --git a/tdeio/tdeio/previewjob.cpp b/tdeio/tdeio/previewjob.cpp index b5a428eee..2279aef40 100644 --- a/tdeio/tdeio/previewjob.cpp +++ b/tdeio/tdeio/previewjob.cpp @@ -159,10 +159,10 @@ PreviewJob::~PreviewJob() void PreviewJob::startPreview() { // Load the list of plugins to determine which mimetypes are supported - KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); + TDETrader::OfferList plugins = TDETrader::self()->query("ThumbCreator"); TQMap<TQString, KService::Ptr> mimeMap; - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) + for (TDETrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) if (!d->enabledPlugins || d->enabledPlugins->contains((*it)->desktopEntryName())) { TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList(); @@ -551,8 +551,8 @@ void PreviewJob::emitFailed(const KFileItem *item) TQStringList PreviewJob::availablePlugins() { TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) + TDETrader::OfferList plugins = TDETrader::self()->query("ThumbCreator"); + for (TDETrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) if (!result.contains((*it)->desktopEntryName())) result.append((*it)->desktopEntryName()); return result; @@ -561,8 +561,8 @@ TQStringList PreviewJob::availablePlugins() TQStringList PreviewJob::supportedMimeTypes() { TQStringList result; - KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); - for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) + TDETrader::OfferList plugins = TDETrader::self()->query("ThumbCreator"); + for (TDETrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) result += (*it)->property("MimeTypes").toStringList(); return result; } diff --git a/tdeio/tdeio/renamedlg.cpp b/tdeio/tdeio/renamedlg.cpp index d66130993..f5c2d32dd 100644 --- a/tdeio/tdeio/renamedlg.cpp +++ b/tdeio/tdeio/renamedlg.cpp @@ -168,17 +168,17 @@ RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption, // Figure out the mimetype and load one plugin // (This is the only mode that is handled by plugins) pluginHandling(); - KTrader::OfferList plugin_offers; + TDETrader::OfferList plugin_offers; if( d->mimeSrc != KMimeType::defaultMimeType() ){ - plugin_offers = KTrader::self()->query(d->mimeSrc, "'RenameDlg/Plugin' in ServiceTypes"); + plugin_offers = TDETrader::self()->query(d->mimeSrc, "'RenameDlg/Plugin' in ServiceTypes"); }else if(d->mimeDest != KMimeType::defaultMimeType() ) { - plugin_offers = KTrader::self()->query(d->mimeDest, "'RenameDlg/Plugin' in ServiceTypes"); + plugin_offers = TDETrader::self()->query(d->mimeDest, "'RenameDlg/Plugin' in ServiceTypes"); } if(!plugin_offers.isEmpty() ){ kdDebug(7024) << "Offers" << endl; - KTrader::OfferList::ConstIterator it = plugin_offers.begin(); - KTrader::OfferList::ConstIterator end = plugin_offers.end(); + TDETrader::OfferList::ConstIterator it = plugin_offers.begin(); + TDETrader::OfferList::ConstIterator end = plugin_offers.end(); for( ; it != end; ++it ){ TQString libName = (*it)->library(); if( libName.isEmpty() ){ diff --git a/tdeio/tdeio/tdefilemetainfo.cpp b/tdeio/tdeio/tdefilemetainfo.cpp index 4943dea93..796a48305 100644 --- a/tdeio/tdeio/tdefilemetainfo.cpp +++ b/tdeio/tdeio/tdefilemetainfo.cpp @@ -942,7 +942,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const queryMimeType = "KFilePlugin"; // hopefully using KFilePlugin as genericMimeType too isn't a problem } - const KTrader::OfferList offers = KTrader::self()->query( queryMimeType, "KFilePlugin", query, TQString::null ); + const TDETrader::OfferList offers = TDETrader::self()->query( queryMimeType, "KFilePlugin", query, TQString::null ); if ( offers.isEmpty() ) return 0; KService::Ptr service = *(offers.begin()); @@ -1122,8 +1122,8 @@ TQStringList KFileMetaInfoProvider::supportedMimeTypes() const TQStringList allMimeTypes; TQString tdefilePlugin = "KFilePlugin"; - KTrader::OfferList offers = KTrader::self()->query( "KFilePlugin" ); - KTrader::OfferListIterator it = offers.begin(); + TDETrader::OfferList offers = TDETrader::self()->query( "KFilePlugin" ); + TDETrader::OfferListIterator it = offers.begin(); for ( ; it != offers.end(); ++it ) { const TQStringList mimeTypes = (*it)->serviceTypes(); diff --git a/tdeio/tdeio/yacc.c b/tdeio/tdeio/yacc.c index a6fa63428..f69aa9810 100644 --- a/tdeio/tdeio/yacc.c +++ b/tdeio/tdeio/yacc.c @@ -113,7 +113,7 @@ void yyerror(const char *s); int yylex(); -void KTraderParse_initFlex( const char *s ); +void TDETraderParse_initFlex( const char *s ); @@ -1101,12 +1101,12 @@ yyreduce: { case 2: #line 56 "yacc.y" - { KTraderParse_setParseTree( 0L ); ;} + { TDETraderParse_setParseTree( 0L ); ;} break; case 3: #line 57 "yacc.y" - { KTraderParse_setParseTree( (yyvsp[0].ptr) ); ;} + { TDETraderParse_setParseTree( (yyvsp[0].ptr) ); ;} break; case 4: @@ -1116,7 +1116,7 @@ yyreduce: case 5: #line 63 "yacc.y" - { (yyval.ptr) = KTraderParse_newOR( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} + { (yyval.ptr) = TDETraderParse_newOR( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} break; case 6: @@ -1126,7 +1126,7 @@ yyreduce: case 7: #line 67 "yacc.y" - { (yyval.ptr) = KTraderParse_newAND( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} + { (yyval.ptr) = TDETraderParse_newAND( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} break; case 8: @@ -1136,32 +1136,32 @@ yyreduce: case 9: #line 71 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 1 ); ;} + { (yyval.ptr) = TDETraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 1 ); ;} break; case 10: #line 72 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 2 ); ;} + { (yyval.ptr) = TDETraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 2 ); ;} break; case 11: #line 73 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 3 ); ;} + { (yyval.ptr) = TDETraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 3 ); ;} break; case 12: #line 74 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 4 ); ;} + { (yyval.ptr) = TDETraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 4 ); ;} break; case 13: #line 75 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 5 ); ;} + { (yyval.ptr) = TDETraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 5 ); ;} break; case 14: #line 76 "yacc.y" - { (yyval.ptr) = KTraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 6 ); ;} + { (yyval.ptr) = TDETraderParse_newCMP( (yyvsp[-2].ptr), (yyvsp[0].ptr), 6 ); ;} break; case 15: @@ -1171,7 +1171,7 @@ yyreduce: case 16: #line 80 "yacc.y" - { (yyval.ptr) = KTraderParse_newIN( (yyvsp[-2].ptr), KTraderParse_newID( (yyvsp[0].name) ) ); ;} + { (yyval.ptr) = TDETraderParse_newIN( (yyvsp[-2].ptr), TDETraderParse_newID( (yyvsp[0].name) ) ); ;} break; case 17: @@ -1181,7 +1181,7 @@ yyreduce: case 18: #line 84 "yacc.y" - { (yyval.ptr) = KTraderParse_newMATCH( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} + { (yyval.ptr) = TDETraderParse_newMATCH( (yyvsp[-2].ptr), (yyvsp[0].ptr) ); ;} break; case 19: @@ -1191,12 +1191,12 @@ yyreduce: case 20: #line 88 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 1 ); ;} + { (yyval.ptr) = TDETraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 1 ); ;} break; case 21: #line 89 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 2 ); ;} + { (yyval.ptr) = TDETraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 2 ); ;} break; case 22: @@ -1206,12 +1206,12 @@ yyreduce: case 23: #line 93 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 3 ); ;} + { (yyval.ptr) = TDETraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 3 ); ;} break; case 24: #line 94 "yacc.y" - { (yyval.ptr) = KTraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 4 ); ;} + { (yyval.ptr) = TDETraderParse_newCALC( (yyvsp[-2].ptr), (yyvsp[0].ptr), 4 ); ;} break; case 25: @@ -1221,7 +1221,7 @@ yyreduce: case 26: #line 98 "yacc.y" - { (yyval.ptr) = KTraderParse_newNOT( (yyvsp[0].ptr) ); ;} + { (yyval.ptr) = TDETraderParse_newNOT( (yyvsp[0].ptr) ); ;} break; case 27: @@ -1231,47 +1231,47 @@ yyreduce: case 28: #line 102 "yacc.y" - { (yyval.ptr) = KTraderParse_newBRACKETS( (yyvsp[-1].ptr) ); ;} + { (yyval.ptr) = TDETraderParse_newBRACKETS( (yyvsp[-1].ptr) ); ;} break; case 29: #line 103 "yacc.y" - { (yyval.ptr) = KTraderParse_newEXIST( (yyvsp[0].name) ); ;} + { (yyval.ptr) = TDETraderParse_newEXIST( (yyvsp[0].name) ); ;} break; case 30: #line 104 "yacc.y" - { (yyval.ptr) = KTraderParse_newID( (yyvsp[0].name) ); ;} + { (yyval.ptr) = TDETraderParse_newID( (yyvsp[0].name) ); ;} break; case 31: #line 105 "yacc.y" - { (yyval.ptr) = KTraderParse_newNUM( (yyvsp[0].vali) ); ;} + { (yyval.ptr) = TDETraderParse_newNUM( (yyvsp[0].vali) ); ;} break; case 32: #line 106 "yacc.y" - { (yyval.ptr) = KTraderParse_newFLOAT( (yyvsp[0].vald) ); ;} + { (yyval.ptr) = TDETraderParse_newFLOAT( (yyvsp[0].vald) ); ;} break; case 33: #line 107 "yacc.y" - { (yyval.ptr) = KTraderParse_newSTRING( (yyvsp[0].name) ); ;} + { (yyval.ptr) = TDETraderParse_newSTRING( (yyvsp[0].name) ); ;} break; case 34: #line 108 "yacc.y" - { (yyval.ptr) = KTraderParse_newBOOL( (yyvsp[0].valb) ); ;} + { (yyval.ptr) = TDETraderParse_newBOOL( (yyvsp[0].valb) ); ;} break; case 35: #line 109 "yacc.y" - { (yyval.ptr) = KTraderParse_newMAX2( (yyvsp[0].name) ); ;} + { (yyval.ptr) = TDETraderParse_newMAX2( (yyvsp[0].name) ); ;} break; case 36: #line 110 "yacc.y" - { (yyval.ptr) = KTraderParse_newMIN2( (yyvsp[0].name) ); ;} + { (yyval.ptr) = TDETraderParse_newMIN2( (yyvsp[0].name) ); ;} break; @@ -1511,12 +1511,12 @@ yyreturn: void yyerror ( const char *s ) /* Called by yyparse on error */ { - KTraderParse_error( s ); + TDETraderParse_error( s ); } -void KTraderParse_mainParse( const char *_code ) +void TDETraderParse_mainParse( const char *_code ) { - KTraderParse_initFlex( _code ); + TDETraderParse_initFlex( _code ); yyparse(); } diff --git a/tdeio/tdeio/yacc.y b/tdeio/tdeio/yacc.y index 1b86f4737..4c5c619e5 100644 --- a/tdeio/tdeio/yacc.y +++ b/tdeio/tdeio/yacc.y @@ -5,7 +5,7 @@ void yyerror(const char *s); int yylex(); -void KTraderParse_initFlex( const char *s ); +void TDETraderParse_initFlex( const char *s ); %} @@ -53,61 +53,61 @@ void KTraderParse_initFlex( const char *s ); %% -constraint: /* empty */ { KTraderParse_setParseTree( 0L ); } - | bool { KTraderParse_setParseTree( $<ptr>1 ); } +constraint: /* empty */ { TDETraderParse_setParseTree( 0L ); } + | bool { TDETraderParse_setParseTree( $<ptr>1 ); } ; bool: bool_or { $$ = $<ptr>1; } ; -bool_or: bool_and OR bool_or { $$ = KTraderParse_newOR( $<ptr>1, $<ptr>3 ); } +bool_or: bool_and OR bool_or { $$ = TDETraderParse_newOR( $<ptr>1, $<ptr>3 ); } | bool_and { $$ = $<ptr>1; } ; -bool_and: bool_compare AND bool_and { $$ = KTraderParse_newAND( $<ptr>1, $<ptr>3 ); } +bool_and: bool_compare AND bool_and { $$ = TDETraderParse_newAND( $<ptr>1, $<ptr>3 ); } | bool_compare { $$ = $<ptr>1; } ; -bool_compare: expr_in EQ expr_in { $$ = KTraderParse_newCMP( $<ptr>1, $<ptr>3, 1 ); } - | expr_in NEQ expr_in { $$ = KTraderParse_newCMP( $<ptr>1, $<ptr>3, 2 ); } - | expr_in GEQ expr_in { $$ = KTraderParse_newCMP( $<ptr>1, $<ptr>3, 3 ); } - | expr_in LEQ expr_in { $$ = KTraderParse_newCMP( $<ptr>1, $<ptr>3, 4 ); } - | expr_in LE expr_in { $$ = KTraderParse_newCMP( $<ptr>1, $<ptr>3, 5 ); } - | expr_in GR expr_in { $$ = KTraderParse_newCMP( $<ptr>1, $<ptr>3, 6 ); } +bool_compare: expr_in EQ expr_in { $$ = TDETraderParse_newCMP( $<ptr>1, $<ptr>3, 1 ); } + | expr_in NEQ expr_in { $$ = TDETraderParse_newCMP( $<ptr>1, $<ptr>3, 2 ); } + | expr_in GEQ expr_in { $$ = TDETraderParse_newCMP( $<ptr>1, $<ptr>3, 3 ); } + | expr_in LEQ expr_in { $$ = TDETraderParse_newCMP( $<ptr>1, $<ptr>3, 4 ); } + | expr_in LE expr_in { $$ = TDETraderParse_newCMP( $<ptr>1, $<ptr>3, 5 ); } + | expr_in GR expr_in { $$ = TDETraderParse_newCMP( $<ptr>1, $<ptr>3, 6 ); } | expr_in { $$ = $<ptr>1; } ; -expr_in: expr_twiddle TOKEN_IN VAL_ID { $$ = KTraderParse_newIN( $<ptr>1, KTraderParse_newID( $<name>3 ) ); } +expr_in: expr_twiddle TOKEN_IN VAL_ID { $$ = TDETraderParse_newIN( $<ptr>1, TDETraderParse_newID( $<name>3 ) ); } | expr_twiddle { $$ = $<ptr>1; } ; -expr_twiddle: expr '~' expr { $$ = KTraderParse_newMATCH( $<ptr>1, $<ptr>3 ); } +expr_twiddle: expr '~' expr { $$ = TDETraderParse_newMATCH( $<ptr>1, $<ptr>3 ); } | expr { $$ = $<ptr>1; } ; -expr: expr '+' term { $$ = KTraderParse_newCALC( $<ptr>1, $<ptr>3, 1 ); } - | expr '-' term { $$ = KTraderParse_newCALC( $<ptr>1, $<ptr>3, 2 ); } +expr: expr '+' term { $$ = TDETraderParse_newCALC( $<ptr>1, $<ptr>3, 1 ); } + | expr '-' term { $$ = TDETraderParse_newCALC( $<ptr>1, $<ptr>3, 2 ); } | term { $$ = $<ptr>1; } ; -term: term '*' factor_non { $$ = KTraderParse_newCALC( $<ptr>1, $<ptr>3, 3 ); } - | term '/' factor_non { $$ = KTraderParse_newCALC( $<ptr>1, $<ptr>3, 4 ); } +term: term '*' factor_non { $$ = TDETraderParse_newCALC( $<ptr>1, $<ptr>3, 3 ); } + | term '/' factor_non { $$ = TDETraderParse_newCALC( $<ptr>1, $<ptr>3, 4 ); } | factor_non { $$ = $<ptr>1; } ; -factor_non: NOT factor { $$ = KTraderParse_newNOT( $<ptr>2 ); } +factor_non: NOT factor { $$ = TDETraderParse_newNOT( $<ptr>2 ); } | factor { $$ = $<ptr>1; } ; -factor: '(' bool_or ')' { $$ = KTraderParse_newBRACKETS( $<ptr>2 ); } - | EXIST VAL_ID { $$ = KTraderParse_newEXIST( $<name>2 ); } - | VAL_ID { $$ = KTraderParse_newID( $<name>1 ); } - | VAL_NUM { $$ = KTraderParse_newNUM( $<vali>1 ); } - | VAL_FLOAT { $$ = KTraderParse_newFLOAT( $<vald>1 ); } - | VAL_STRING { $$ = KTraderParse_newSTRING( $<name>1 ); } - | VAL_BOOL { $$ = KTraderParse_newBOOL( $<valb>1 ); } - | MAX VAL_ID { $$ = KTraderParse_newMAX2( $<name>2 ); } - | MIN VAL_ID { $$ = KTraderParse_newMIN2( $<name>2 ); } +factor: '(' bool_or ')' { $$ = TDETraderParse_newBRACKETS( $<ptr>2 ); } + | EXIST VAL_ID { $$ = TDETraderParse_newEXIST( $<name>2 ); } + | VAL_ID { $$ = TDETraderParse_newID( $<name>1 ); } + | VAL_NUM { $$ = TDETraderParse_newNUM( $<vali>1 ); } + | VAL_FLOAT { $$ = TDETraderParse_newFLOAT( $<vald>1 ); } + | VAL_STRING { $$ = TDETraderParse_newSTRING( $<name>1 ); } + | VAL_BOOL { $$ = TDETraderParse_newBOOL( $<valb>1 ); } + | MAX VAL_ID { $$ = TDETraderParse_newMAX2( $<name>2 ); } + | MIN VAL_ID { $$ = TDETraderParse_newMIN2( $<name>2 ); } ; /* End of grammar */ @@ -116,11 +116,11 @@ factor: '(' bool_or ')' { $$ = KTraderParse_newBRACKETS( $<ptr>2 ); } void yyerror ( const char *s ) /* Called by yyparse on error */ { - KTraderParse_error( s ); + TDETraderParse_error( s ); } -void KTraderParse_mainParse( const char *_code ) +void TDETraderParse_mainParse( const char *_code ) { - KTraderParse_initFlex( _code ); + TDETraderParse_initFlex( _code ); yyparse(); } diff --git a/tdeio/tests/tdesycocatest.cpp b/tdeio/tests/tdesycocatest.cpp index 7166f3e35..5990d1225 100644 --- a/tdeio/tests/tdesycocatest.cpp +++ b/tdeio/tests/tdesycocatest.cpp @@ -182,9 +182,9 @@ int main(int argc, char *argv[]) } debug("Querying trader for Konqueror/Plugin"); - KTrader::OfferList traderoffers = KTrader::self()->query("Konqueror/Plugin"); + TDETrader::OfferList traderoffers = TDETrader::self()->query("Konqueror/Plugin"); debug(TQString("got %1 offers").arg(traderoffers.count())); - KTrader::OfferList::Iterator trit = traderoffers.begin(); + TDETrader::OfferList::Iterator trit = traderoffers.begin(); for ( ; trit != traderoffers.end() ; trit++ ) { debug((*trit)->name()); diff --git a/tdeio/tests/tdetradertest.cpp b/tdeio/tests/tdetradertest.cpp index c0092f76d..9ce82c49f 100644 --- a/tdeio/tests/tdetradertest.cpp +++ b/tdeio/tests/tdetradertest.cpp @@ -33,7 +33,7 @@ static KCmdLineOptions options[] = int main( int argc, char **argv ) { - TDECmdLineArgs::init( argc, argv, "tdetradertest", "KTradertest", "A KTrader testing tool", "0.0" ); + TDECmdLineArgs::init( argc, argv, "tdetradertest", "TDETradertest", "A TDETrader testing tool", "0.0" ); TDECmdLineArgs::addCmdLineOptions( options ); @@ -62,13 +62,13 @@ int main( int argc, char **argv ) printf( "constraint is : %s\n", constraint.local8Bit().data() ); printf( "preference is : %s\n", preference.local8Bit().data() ); - KTrader::OfferList offers = KTrader::self()->query( query, genericServiceType, constraint, preference ); + TDETrader::OfferList offers = TDETrader::self()->query( query, genericServiceType, constraint, preference ); printf("got %d offers.\n", offers.count()); int i = 0; - KTrader::OfferList::ConstIterator it = offers.begin(); - KTrader::OfferList::ConstIterator end = offers.end(); + TDETrader::OfferList::ConstIterator it = offers.begin(); + TDETrader::OfferList::ConstIterator end = offers.end(); for (; it != end; ++it, ++i ) { printf("---- Offer %d ----\n", i); diff --git a/tdeparts/componentfactory.h b/tdeparts/componentfactory.h index 6d1b7876b..20b3ebee8 100644 --- a/tdeparts/componentfactory.h +++ b/tdeparts/componentfactory.h @@ -307,7 +307,7 @@ namespace KParts * \endcode * * @param serviceType the type of service for which to find a plugin - * @param constraint an optional constraint to pass to the trader (see TDEIO::KTrader) + * @param constraint an optional constraint to pass to the trader (see TDEIO::TDETrader) * @param parent the parent object for the part itself * @param name the name that will be given to the part * @param args A list of string arguments, passed to the factory and possibly @@ -325,7 +325,7 @@ namespace KParts const TQStringList &args = TQStringList(), int *error = 0 ) { - KTrader::OfferList offers = KTrader::self()->query( serviceType, constraint ); + TDETrader::OfferList offers = TDETrader::self()->query( serviceType, constraint ); if ( offers.isEmpty() ) { if ( error ) @@ -354,7 +354,7 @@ namespace KParts * \endcode * * @param serviceType the type of service for which to find a part, e.g. a mimetype - * @param constraint an optional constraint to pass to the trader (see KTrader) + * @param constraint an optional constraint to pass to the trader (see TDETrader) * @param parentWidget the parent widget, will be set as the parent of the part's widget * @param widgetName the name that will be given to the part's widget * @param parent the parent object for the part itself @@ -376,7 +376,7 @@ namespace KParts const TQStringList &args = TQStringList(), int *error = 0 ) { - KTrader::OfferList offers = KTrader::self()->query( serviceType, TQString::fromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); + TDETrader::OfferList offers = TDETrader::self()->query( serviceType, TQString::fromLatin1("KParts/ReadOnlyPart"), constraint, TQString::null ); if ( offers.isEmpty() ) { if ( error ) diff --git a/tdeparts/tests/ghostview.cpp b/tdeparts/tests/ghostview.cpp index d63002d53..c94823aaf 100644 --- a/tdeparts/tests/ghostview.cpp +++ b/tdeparts/tests/ghostview.cpp @@ -26,11 +26,11 @@ Shell::Shell() KAction * paQuit = new KAction( "&Quit" , "exit", 0, this, TQT_SLOT( close() ), actionCollection(), "file_quit" ); // Try to find a postscript component first - KTrader::OfferList offers = KTrader::self()->query("application/postscript", "('KParts/ReadOnlyPart' in ServiceTypes) or ('Browser/View' in ServiceTypes)"); + TDETrader::OfferList offers = TDETrader::self()->query("application/postscript", "('KParts/ReadOnlyPart' in ServiceTypes) or ('Browser/View' in ServiceTypes)"); KLibFactory *factory = 0; m_gvpart = 0; - KTrader::OfferList::Iterator it(offers.begin()); + TDETrader::OfferList::Iterator it(offers.begin()); for( ; it != offers.end(); ++it) { KService::Ptr ptr = (*it); diff --git a/tdeprint/kprintpreview.cpp b/tdeprint/kprintpreview.cpp index 0d7b7913c..fe105379c 100644 --- a/tdeprint/kprintpreview.cpp +++ b/tdeprint/kprintpreview.cpp @@ -111,8 +111,8 @@ static KLibFactory* componentFactory() factory = KLibLoader::self()->factory("libkghostviewpart"); if( factory ) return factory; - KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null); - for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) + TDETrader::OfferList offers = TDETrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null); + for (TDETrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it) { KService::Ptr service = *it; factory = KLibLoader::self()->factory(TQFile::encodeName(service->library())); diff --git a/tderesources/configpage.cpp b/tderesources/configpage.cpp index 5844dd97c..0660710db 100644 --- a/tderesources/configpage.cpp +++ b/tderesources/configpage.cpp @@ -174,17 +174,17 @@ void ConfigPage::load() // KDE-3.3 compatibility code: get families from the plugins TQStringList compatFamilyNames; - const KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin" ); - KTrader::OfferList::ConstIterator it = plugins.begin(); - KTrader::OfferList::ConstIterator end = plugins.end(); + const TDETrader::OfferList plugins = TDETrader::self()->query( "KResources/Plugin" ); + TDETrader::OfferList::ConstIterator it = plugins.begin(); + TDETrader::OfferList::ConstIterator end = plugins.end(); for ( ; it != end; ++it ) { const TQString family = (*it)->property( "X-TDE-ResourceFamily" ).toString(); if ( compatFamilyNames.find( family ) == compatFamilyNames.end() ) compatFamilyNames.append( family ); } - const KTrader::OfferList managers = KTrader::self()->query( "KResources/Manager" ); - KTrader::OfferList::ConstIterator m_it; + const TDETrader::OfferList managers = TDETrader::self()->query( "KResources/Manager" ); + TDETrader::OfferList::ConstIterator m_it; for( m_it = managers.begin(); m_it != managers.end(); ++m_it ) { TQString displayName = (*m_it)->property( "Name" ).toString(); familyDisplayNames.append( displayName ); diff --git a/tderesources/factory.cpp b/tderesources/factory.cpp index ea19e3b8a..09140e7b7 100644 --- a/tderesources/factory.cpp +++ b/tderesources/factory.cpp @@ -58,9 +58,9 @@ Factory *Factory::self( const TQString& resourceFamily ) Factory::Factory( const TQString& resourceFamily ) : mResourceFamily( resourceFamily ) { - KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", TQString( "[X-TDE-ResourceFamily] == '%1'" ) + TDETrader::OfferList plugins = TDETrader::self()->query( "KResources/Plugin", TQString( "[X-TDE-ResourceFamily] == '%1'" ) .arg( resourceFamily ) ); - KTrader::OfferList::ConstIterator it; + TDETrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { TQVariant type = (*it)->property( "X-TDE-ResourceType" ); if ( !type.toString().isEmpty() ) diff --git a/tdespell2/broker.cpp b/tdespell2/broker.cpp index 5e03c377b..ef8c07dac 100644 --- a/tdespell2/broker.cpp +++ b/tdespell2/broker.cpp @@ -174,7 +174,7 @@ Settings* Broker::settings() const void Broker::loadPlugins() { d->plugins = KPluginInfo::fromServices( - KTrader::self()->query( "KSpell/Client" ) ); + TDETrader::self()->query( "KSpell/Client" ) ); for ( KPluginInfo::List::Iterator itr = d->plugins.begin(); itr != d->plugins.end(); ++itr ) { diff --git a/tdeutils/Makefile.am b/tdeutils/Makefile.am index 9bc3e2e49..b8ae57de2 100644 --- a/tdeutils/Makefile.am +++ b/tdeutils/Makefile.am @@ -3,7 +3,7 @@ INCLUDES = -I$(top_srcdir)/interfaces/kregexpeditor $(all_includes) lib_LTLIBRARIES = libtdeutils.la libtdeutils_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 3:0:2 -# Needs KTrader +# Needs TDETrader libtdeutils_la_LIBADD = ../tdeio/libtdeio.la ksettings/libksettings.la $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_X11) libtdeutils_la_SOURCES = kfind.cpp kfinddialog.cpp kreplace.cpp \ diff --git a/tdeutils/kplugininfo.cpp b/tdeutils/kplugininfo.cpp index 2b4079bb8..cb93b2600 100644 --- a/tdeutils/kplugininfo.cpp +++ b/tdeutils/kplugininfo.cpp @@ -276,7 +276,7 @@ const TQValueList<KService::Ptr> & KPluginInfo::kcmServices() const { if ( !d->kcmservicesCached ) { - d->kcmservices = KTrader::self()->query( "TDECModule", "'" + d->pluginName + + d->kcmservices = TDETrader::self()->query( "TDECModule", "'" + d->pluginName + "' in [X-TDE-ParentComponents]" ); kdDebug( 703 ) << "found " << d->kcmservices.count() << " offers for " << d->pluginName << endl; diff --git a/tdeutils/ksettings/dialog.cpp b/tdeutils/ksettings/dialog.cpp index e3bfa579f..77e05e245 100644 --- a/tdeutils/ksettings/dialog.cpp +++ b/tdeutils/ksettings/dialog.cpp @@ -467,7 +467,7 @@ TQValueList<KService::Ptr> Dialog::parentComponentsServices( constraint = "('" + constraint + "' in [X-TDE-ParentComponents])"; kdDebug( 700 ) << "constraint = " << constraint << endl; - return KTrader::self()->query( "TDECModule", constraint ); + return TDETrader::self()->query( "TDECModule", constraint ); } bool Dialog::isPluginForKCMEnabled( TDECModuleInfo * moduleinfo ) const |