Rename KLock and KTrader to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent ddde3d2db1
commit 5538de896d

@ -2239,7 +2239,7 @@ sub jniToReturnValue($$$)
$returnCall .= "\treturn (jobject) KDESupport::arrayWith$1(env, (DOM::$1 *) " . ($2 eq "\*" ? "" : "&") . "_qlist);\n";
} elsif ( $cplusplusType =~ /(QCStringList|KFileItemList|KFileViewItemList)\s*([\*\&])?\s*$/ ) {
$returnCall .= "\treturn (jobject) KDESupport::arrayWith$1(env, ($1*) " . ($2 eq "\*" ? "" : "&") . "_qlist);\n";
} elsif ( $cplusplusType =~ /(KTrader::OfferList)\s*([\*\&])?\s*$/ ) {
} elsif ( $cplusplusType =~ /(TDETrader::OfferList)\s*([\*\&])?\s*$/ ) {
$returnCall .= "\treturn (jobject) KDESupport::arrayWithOfferList(env, ($1*) " . ($2 eq "\*" ? "" : "&") . "_qlist);\n";
} elsif ( $cplusplusType =~ /(KURL::List)\s*([\*\&])?\s*$/ ) {
$returnCall .= "\treturn (jobject) KDESupport::arrayWithKURLList(env, ($1*) " . ($2 eq "\*" ? "" : "&") . "_qlist);\n";
@ -5460,7 +5460,7 @@ sub printJavadocComment($$$$)
} else {
$line =~ s/(const )?QC?StringList(\s*&)?/ArrayList/g;
}
$line =~ s/NodeList|KTrader::OfferList/ArrayList/g;
$line =~ s/NodeList|TDETrader::OfferList/ArrayList/g;
$line =~ s/(const )?TQDate(Time)?(\s*&)?/Calendar/g;
$line =~ s/(const )?TQTime([^r])/Date$1/g;
$line =~ s/TQString::null/null/g;

@ -3299,7 +3299,7 @@ sub printJavadocComment($$$$)
} else {
$line =~ s/(const )?QC?StringList(\s*&)?/ArrayList/g;
}
$line =~ s/NodeList|KTrader::OfferList/ArrayList/g;
$line =~ s/NodeList|TDETrader::OfferList/ArrayList/g;
$line =~ s/(const )?TQDate(Time)?(\s*&)?/Calendar/g;
$line =~ s/(const )?TQTime([^r])/Date$1/g;
$line =~ s/TQString::null/null/g;

@ -3493,7 +3493,7 @@ sub printCSharpdocComment($$$$)
} else {
$line =~ s/(const )?QC?StringList(\s*&)?/ArrayList/g;
}
$line =~ s/NodeList|KTrader::OfferList/ArrayList/g;
$line =~ s/NodeList|TDETrader::OfferList/ArrayList/g;
$line =~ s/(const )?TQDate(Time)?(\s*&)?/DateTime/g;
$line =~ s/(const )?TQTime([^r])/DateTime$1/g;
$line =~ s/TQString::null/null/g;

@ -1204,7 +1204,7 @@ BEGIN
'KToolBarRadioGroup*' => 'kde_KToolBarRadioGroup*',
'KToolBarSeparator*' => 'kde_KToolBarSeparator*',
'KToolButtonType' => 'int' ,
'KTrader*' => 'kde_KTrader*' ,
'TDETrader*' => 'kde_TDETrader*' ,
'KTypeList*' => 'kde_KTypeList*',
'KURIFilter*' => 'kde_KURIFilter*' ,
'KURIFilterData&' => 'kde_KURIFilterData*' ,
@ -1374,7 +1374,7 @@ BEGIN
'Object_stub*' => 'kde_Object_stub*',
'Observer*' => 'kde_Observer*',
'OfferList' => 'kde_OfferList*' ,
'KTrader::OfferList' => 'kde_OfferList*' ,
'TDETrader::OfferList' => 'kde_OfferList*' ,
'Offset' => 'int',
'OnewayDispatchFunction' => 'kde_OnewayDispatchFunction*',
'OnewayInvocation&' => 'kde_OnewayInvocation*',
@ -2867,7 +2867,7 @@ sub addNamespace
if ( $className =~ /^(OfferList)/ )
{
return "KTrader::".$className;
return "TDETrader::".$className;
}
if ( $className =~ /^(BlockSelectionInterface|ClipboardInterface|CodeCompletionInterface|CompletionEntry|ConfigInterface|Cursor|CursorInterface|Document|EditInterface|Editor|HighlightingInterface|Mark|MarkInterface|PopupMenuInterface|PrintInterface|SearchInterface|SelectionInterface|UndoInterface|View|ViewCursorInterface)/ )

File diff suppressed because one or more lines are too long

@ -237,7 +237,7 @@ KDESupport::arrayWithQCStringList(JNIEnv * env, QCStringList * qcstringList)
}
jobject
KDESupport::arrayWithOfferList(JNIEnv * env, KTrader::OfferList * offerList)
KDESupport::arrayWithOfferList(JNIEnv * env, TDETrader::OfferList * offerList)
{
jobject objectArray;
jclass cls;
@ -259,7 +259,7 @@ KDESupport::arrayWithOfferList(JNIEnv * env, KTrader::OfferList * offerList)
return NULL;
}
KTrader::OfferList::Iterator it;
TDETrader::OfferList::Iterator it;
for (it = offerList->begin(); it != offerList->end(); ++it) {
KService::Ptr ptr = *it;

@ -58,7 +58,7 @@ public:
/** Returns a Java ArrayList for the various types of KDE List */
static jobject arrayWithQCStringList(JNIEnv * env, QCStringList * qcstringList);
static jobject arrayWithOfferList(JNIEnv * env, KTrader::OfferList * offerList);
static jobject arrayWithOfferList(JNIEnv * env, TDETrader::OfferList * offerList);
static jobject arrayWithKMainWindowList(JNIEnv * env, TQPtrList<KMainWindow>* memberList);
static jobject arrayWithKFileItemList(JNIEnv * env, KFileItemList * itemList);
static jobject arrayWithKURLList(JNIEnv * env, KURL::List * kurlList);

@ -4,13 +4,13 @@
#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/KTrader.h>
#include <kdejava/TDETrader.h>
class KTraderJBridge : public KTrader
class TDETraderJBridge : public TDETrader
{
public:
KTraderJBridge() : KTrader() {};
~KTraderJBridge() {QtSupport::qtKeyDeleted(this);}
TDETraderJBridge() : TDETrader() {};
~TDETraderJBridge() {QtSupport::qtKeyDeleted(this);}
void removeChild(TQObject* arg1) {
if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.TQObject")) {
TQObject::removeChild(arg1);
@ -42,7 +42,7 @@ public:
return;
}
bool eventFilter(TQObject* object,TQEvent* event) {
if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.KTrader",object,event)) {
if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.TDETrader",object,event)) {
return TQObject::eventFilter(object,event);
} else {
return TRUE;
@ -51,100 +51,100 @@ public:
};
JNIEXPORT jstring JNICALL
Java_org_kde_koala_KTrader_className(JNIEnv* env, jobject obj)
Java_org_kde_koala_TDETrader_className(JNIEnv* env, jobject obj)
{
const char* _qstring;
_qstring = ((KTrader*) QtSupport::getQt(env, obj))->className();
_qstring = ((TDETrader*) QtSupport::getQt(env, obj))->className();
return QtSupport::fromCharString(env, (char *) _qstring);
}
JNIEXPORT void JNICALL
Java_org_kde_koala_KTrader_dispose(JNIEnv* env, jobject obj)
Java_org_kde_koala_TDETrader_dispose(JNIEnv* env, jobject obj)
{
Java_org_kde_koala_KTrader_finalize(env, obj);
Java_org_kde_koala_TDETrader_finalize(env, obj);
return;
}
JNIEXPORT void JNICALL
Java_org_kde_koala_KTrader_finalize(JNIEnv* env, jobject obj)
Java_org_kde_koala_TDETrader_finalize(JNIEnv* env, jobject obj)
{
if (QtSupport::allocatedInJavaWorld(env, obj) && ((KTrader*)QtSupport::getQt(env, obj))->parent() == 0) {
delete (KTrader*)QtSupport::getQt(env, obj);
if (QtSupport::allocatedInJavaWorld(env, obj) && ((TDETrader*)QtSupport::getQt(env, obj))->parent() == 0) {
delete (TDETrader*)QtSupport::getQt(env, obj);
QtSupport::setQt(env, obj, 0);
}
return;
}
JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTrader_isDisposed(JNIEnv* env, jobject obj)
Java_org_kde_koala_TDETrader_isDisposed(JNIEnv* env, jobject obj)
{
return (QtSupport::getQt(env, obj) == 0);
}
JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTrader_metaObject(JNIEnv* env, jobject obj)
Java_org_kde_koala_TDETrader_metaObject(JNIEnv* env, jobject obj)
{
jobject xret = QtSupport::objectForQtKey(env, (void*)((KTrader*) QtSupport::getQt(env, obj))->metaObject(), "org.kde.qt.TQMetaObject");
jobject xret = QtSupport::objectForQtKey(env, (void*)((TDETrader*) QtSupport::getQt(env, obj))->metaObject(), "org.kde.qt.TQMetaObject");
return xret;
}
JNIEXPORT void JNICALL
Java_org_kde_koala_KTrader_newKTrader(JNIEnv* env, jobject obj)
Java_org_kde_koala_TDETrader_newTDETrader(JNIEnv* env, jobject obj)
{
if (QtSupport::getQt(env, obj) == 0) {
QtSupport::setQt(env, obj, new KTraderJBridge());
QtSupport::setQt(env, obj, new TDETraderJBridge());
QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
}
return;
}
JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTrader_query__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype)
Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype)
{
KTrader::OfferList _qlist;
TDETrader::OfferList _qlist;
static TQString* _qstring_servicetype = 0;
_qlist = ((KTrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype));
return (jobject) KDESupport::arrayWithOfferList(env, (KTrader::OfferList*) &_qlist);
_qlist = ((TDETrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype));
return (jobject) KDESupport::arrayWithOfferList(env, (TDETrader::OfferList*) &_qlist);
}
JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTrader_query__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype, jstring constraint)
Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype, jstring constraint)
{
KTrader::OfferList _qlist;
TDETrader::OfferList _qlist;
static TQString* _qstring_servicetype = 0;
static TQString* _qstring_constraint = 0;
_qlist = ((KTrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype), (const TQString&)*(TQString*) QtSupport::toTQString(env, constraint, &_qstring_constraint));
return (jobject) KDESupport::arrayWithOfferList(env, (KTrader::OfferList*) &_qlist);
_qlist = ((TDETrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype), (const TQString&)*(TQString*) QtSupport::toTQString(env, constraint, &_qstring_constraint));
return (jobject) KDESupport::arrayWithOfferList(env, (TDETrader::OfferList*) &_qlist);
}
JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype, jstring constraint, jstring preferences)
Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype, jstring constraint, jstring preferences)
{
KTrader::OfferList _qlist;
TDETrader::OfferList _qlist;
static TQString* _qstring_servicetype = 0;
static TQString* _qstring_constraint = 0;
static TQString* _qstring_preferences = 0;
_qlist = ((KTrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype), (const TQString&)*(TQString*) QtSupport::toTQString(env, constraint, &_qstring_constraint), (const TQString&)*(TQString*) QtSupport::toTQString(env, preferences, &_qstring_preferences));
return (jobject) KDESupport::arrayWithOfferList(env, (KTrader::OfferList*) &_qlist);
_qlist = ((TDETrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype), (const TQString&)*(TQString*) QtSupport::toTQString(env, constraint, &_qstring_constraint), (const TQString&)*(TQString*) QtSupport::toTQString(env, preferences, &_qstring_preferences));
return (jobject) KDESupport::arrayWithOfferList(env, (TDETrader::OfferList*) &_qlist);
}
JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype, jstring genericServiceType, jstring constraint, jstring preferences)
Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring servicetype, jstring genericServiceType, jstring constraint, jstring preferences)
{
KTrader::OfferList _qlist;
TDETrader::OfferList _qlist;
static TQString* _qstring_servicetype = 0;
static TQString* _qstring_genericServiceType = 0;
static TQString* _qstring_constraint = 0;
static TQString* _qstring_preferences = 0;
_qlist = ((KTrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype), (const TQString&)*(TQString*) QtSupport::toTQString(env, genericServiceType, &_qstring_genericServiceType), (const TQString&)*(TQString*) QtSupport::toTQString(env, constraint, &_qstring_constraint), (const TQString&)*(TQString*) QtSupport::toTQString(env, preferences, &_qstring_preferences));
return (jobject) KDESupport::arrayWithOfferList(env, (KTrader::OfferList*) &_qlist);
_qlist = ((TDETrader*) QtSupport::getQt(env, obj))->query((const TQString&)*(TQString*) QtSupport::toTQString(env, servicetype, &_qstring_servicetype), (const TQString&)*(TQString*) QtSupport::toTQString(env, genericServiceType, &_qstring_genericServiceType), (const TQString&)*(TQString*) QtSupport::toTQString(env, constraint, &_qstring_constraint), (const TQString&)*(TQString*) QtSupport::toTQString(env, preferences, &_qstring_preferences));
return (jobject) KDESupport::arrayWithOfferList(env, (TDETrader::OfferList*) &_qlist);
}
JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTrader_self(JNIEnv* env, jclass cls)
Java_org_kde_koala_TDETrader_self(JNIEnv* env, jclass cls)
{
(void) cls;
jobject xret = QtSupport::objectForQtKey(env, (void*)KTraderJBridge::self(), "org.kde.koala.KTrader");
jobject xret = QtSupport::objectForQtKey(env, (void*)TDETraderJBridge::self(), "org.kde.koala.TDETrader");
return xret;
}

@ -1,7 +1,7 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#ifndef __org_kde_koala_KTrader__
#define __org_kde_koala_KTrader__
#ifndef __org_kde_koala_TDETrader__
#define __org_kde_koala_TDETrader__
#include <jni.h>
@ -10,20 +10,20 @@ extern "C"
{
#endif
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_KTrader_metaObject (JNIEnv *env, jobject);
extern JNIEXPORT jstring JNICALL Java_org_kde_koala_KTrader_className (JNIEnv *env, jobject);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_KTrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_KTrader_query__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_KTrader_query__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_KTrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring, jstring, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_KTrader_self (JNIEnv *env, jclass);
extern JNIEXPORT void JNICALL Java_org_kde_koala_KTrader_newKTrader (JNIEnv *env, jobject);
extern JNIEXPORT void JNICALL Java_org_kde_koala_KTrader_finalize (JNIEnv *env, jobject);
extern JNIEXPORT void JNICALL Java_org_kde_koala_KTrader_dispose (JNIEnv *env, jobject);
extern JNIEXPORT jboolean JNICALL Java_org_kde_koala_KTrader_isDisposed (JNIEnv *env, jobject);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_TDETrader_metaObject (JNIEnv *env, jobject);
extern JNIEXPORT jstring JNICALL Java_org_kde_koala_TDETrader_className (JNIEnv *env, jobject);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_TDETrader_query__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring, jstring, jstring);
extern JNIEXPORT jobject JNICALL Java_org_kde_koala_TDETrader_self (JNIEnv *env, jclass);
extern JNIEXPORT void JNICALL Java_org_kde_koala_TDETrader_newTDETrader (JNIEnv *env, jobject);
extern JNIEXPORT void JNICALL Java_org_kde_koala_TDETrader_finalize (JNIEnv *env, jobject);
extern JNIEXPORT void JNICALL Java_org_kde_koala_TDETrader_dispose (JNIEnv *env, jobject);
extern JNIEXPORT jboolean JNICALL Java_org_kde_koala_TDETrader_isDisposed (JNIEnv *env, jobject);
#ifdef __cplusplus
}
#endif
#endif /* __org_kde_koala_KTrader__ */
#endif /* __org_kde_koala_TDETrader__ */

File diff suppressed because one or more lines are too long

@ -6,12 +6,12 @@ import org.kde.qt.QtSupport;
/**
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>
@short A generic DCOP service starter, using KTrader.
@short A generic DCOP service starter, using TDETrader.
*/
public class KDCOPServiceStarter implements QtSupport {
@ -26,8 +26,8 @@ public class KDCOPServiceStarter implements QtSupport {
Then the DCOP server is checked. If the service is not available,
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, <code>error</code> contains a description of the error
that occurred. If the pointer is 0, the argument will be
ignored
@ -48,13 +48,13 @@ public class KDCOPServiceStarter implements QtSupport {
/**
Find an implementation of the given <code>serviceType</code>,
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, <code>error</code> contains a description of the error
that occurred. If the pointer is 0, the argument will be
ignored

@ -141,14 +141,14 @@ public class KDataToolInfo implements QtSupport {
*/
public native boolean isValid();
/**
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. String)
@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,
and also used if the tool wants to read its configuration in the app's config file).
@return the list of results
@short Queries the KTrader about installed KDataTool implementations.
@short Queries the TDETrader about installed KDataTool implementations.
*/
// TQValueList<KDataToolInfo> query(const TQString& arg1,const TQString& arg2,TDEInstance* arg3); >>>> NOT CONVERTED
/** Deletes the wrapped C++ instance */

@ -12,7 +12,7 @@ import org.kde.qt.QtSupport;
instance of the editor, but only a little bit more complicated.
To check if kregexpeditor in tdeutils is installed and available use this line:
<pre>
boolean installed=!KTrader.self().query("KRegExpEditor/KRegExpEditor").isEmpty();
boolean installed=!TDETrader.self().query("KRegExpEditor/KRegExpEditor").isEmpty();
</pre>
The following is a template for what you need to do to create an instance of the
regular expression dialog:

@ -195,7 +195,7 @@ public class KServiceType extends KSycocaEntry {
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

@ -10,13 +10,13 @@ import org.kde.qt.QtSupport;
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.
@short Represents the user's preferences for services of a service type.
@see KService
@see KServiceType
@see KServiceOffer
@see KTrader
@see TDETrader
*/
public class KServiceTypeProfile implements QtSupport {
@ -57,11 +57,11 @@ public class KServiceTypeProfile implements QtSupport {
public static native KServiceTypeProfile serviceTypeProfile(String servicetype);
/**
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 <code>genericServiceType</code> 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.

@ -30,7 +30,7 @@ import org.kde.qt.TQObject;
then will use KRun.run() to invoke the application. In "trader-speak",
this looks like so:
<pre>
ArrayList offers = KTrader.self().query("text/html", "Type == 'Application'");
ArrayList offers = TDETrader.self().query("text/html", "Type == 'Application'");
KService.Ptr ptr = offers.first();
KURL.List lst;
lst.append("http://www.kde.org/index.html");
@ -50,7 +50,7 @@ import org.kde.qt.TQObject;
actually do something with our query, then. Our code would look
like so:
<pre>
ArrayList offers = KTrader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes");
ArrayList offers = TDETrader.self().query("text/html", "'KParts/ReadOnlyPart' in ServiceTypes");
KService.Ptr ptr = offers.first();
KLibFactory factory = KLibLoader.self().factory( ptr.library() );
if (factory)
@ -72,12 +72,12 @@ import org.kde.qt.TQObject;
@short Provides a way to query the KDE infrastructure for specific applications or components.
*/
public class KTrader extends TQObject {
protected KTrader(Class dummy){super((Class) null);}
public class TDETrader extends TQObject {
protected TDETrader(Class dummy){super((Class) null);}
public native TQMetaObject metaObject();
public native String className();
/**
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
type. This is something like 'text/plain' or 'text/html'. The
@ -99,7 +99,7 @@ public class KTrader extends TQObject {
a number
@return A list of services that satisfy the query
@short The main function in the KTrader class.
@short The main function in the TDETrader class.
@see #http://developer#kde#org/documentation/library/kdeqt/tradersyntax#html
*/
public native ArrayList query(String servicetype, String constraint, String preferences);
@ -129,23 +129,23 @@ public class KTrader extends TQObject {
*/
public native ArrayList query(String servicetype, String genericServiceType, String constraint, String preferences);
/**
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
@short This is a static pointer to a KTrader instance.
@short This is a static pointer to a TDETrader instance.
*/
public static native KTrader self();
public static native TDETrader self();
/**
@short
*/
public KTrader() {
public TDETrader() {
super((Class) null);
newKTrader();
newTDETrader();
}
private native void newKTrader();
private native void newTDETrader();
/** Deletes the wrapped C++ instance */
protected native void finalize() throws InternalError;
/** Delete the wrapped C++ instance ahead of finalize() */

File diff suppressed because one or more lines are too long

@ -172,8 +172,8 @@ public class TDEConfig extends TDEConfigBase {
Otherwise there is a risk of deadlock.
@short Returns a lock file object for the configuration file or 0 if the backend does not support locking.
*/
// KLockFile::Ptr lockFile(bool arg1); >>>> NOT CONVERTED
// KLockFile::Ptr lockFile(); >>>> NOT CONVERTED
// TDELockFile::Ptr lockFile(bool arg1); >>>> NOT CONVERTED
// TDELockFile::Ptr lockFile(); >>>> NOT CONVERTED
/**
Returns true if the specified group is known.
@param group The group to search for.

@ -115,6 +115,6 @@ public class TDEConfigBackEnd implements QtSupport {
@param bGlobal If true, returns a lock file object for kdeglobals
@short Returns a lock file object for the configuration file
*/
// KLockFile::Ptr lockFile(bool arg1); >>>> NOT CONVERTED
// KLockFile::Ptr lockFile(); >>>> NOT CONVERTED
// TDELockFile::Ptr lockFile(bool arg1); >>>> NOT CONVERTED
// TDELockFile::Ptr lockFile(); >>>> NOT CONVERTED
}

@ -196,7 +196,7 @@
to KJSEmbed when they embed the interpreter into their applications.
To add a binding you create the binding as binding plugin, but instead
of using the KTrader to register the plugin, you call
of using the TDETrader to register the plugin, you call
JSFactory::registerOpaqueType("Name", new TypeFactory(parent,"name");
Now KJS can create your type and manipulate it. This currently supports
@ -3299,7 +3299,7 @@
2003-08-16 Saturday 14:41 rich
- Added support for a 4 argument for of createROPart() to allow you to
specify custom constraints for the KTrader query.
specify custom constraints for the TDETrader query.
2003-08-16 Saturday 13:48 zrusin

@ -168,11 +168,11 @@ namespace KJSEmbed {
#ifndef QT_ONLY
// Get list of valid plugin types
KTrader::OfferList offers = KTrader::self() ->query( "JSBindingPlugin/Binding" );
TDETrader::OfferList offers = TDETrader::self() ->query( "JSBindingPlugin/Binding" );
if ( !offers.count() )
return ;
KTrader::OfferListIterator itr = offers.begin();
TDETrader::OfferListIterator itr = offers.begin();
while ( itr != offers.end() ) {
TQString classname = ( *itr ) ->name();
JSFactoryImp *cons = new JSFactoryImp( exec, this, JSFactoryImp::NewInstance, classname );
@ -710,7 +710,7 @@ namespace KJSEmbed {
<< " parent " << ( long ) parent
<< " args: " << args << endl;
KTrader::OfferList offers = KTrader::self() ->query( svc, con );
TDETrader::OfferList offers = TDETrader::self() ->query( svc, con );
if ( !offers.count() )
return 0;
@ -757,7 +757,7 @@ namespace KJSEmbed {
<< " parent " << ( long ) parent
<< " args: " << args << endl;
KTrader::OfferList offers = KTrader::self() ->query( svc, con );
TDETrader::OfferList offers = TDETrader::self() ->query( svc, con );
if ( !offers.count() )
return 0;

@ -205,7 +205,7 @@ public:
TQWidget *loadUI( const TQString &uiFile, TQObject *connector=0, TQWidget *parent=0, const char *name=0 );
/**
* Queries KTrader for a plugin that provides the asked for object binding.
* Queries TDETrader for a plugin that provides the asked for object binding.
*If the binding was added the object is returned, otherwise a KJS::Null is.
*/
TQStringList listBindingPlugins( KJS::ExecState *exec, KJS::Object &self);

@ -581,7 +581,7 @@ CCMAIL: kde-bindings@kde.org
2004-03-10 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
* Added marshaller for KTrader::OfferList to ruby array
* Added marshaller for TDETrader::OfferList to ruby array
* Used DOM::Node rtti to instantiate a ruby value with the correct subclass
2004-03-03 Richard Dale <Richard_Dale@tipitina.demon.co.uk>

@ -89,7 +89,7 @@ class OfferListTab < TQt::Widget
trader = KDE::Trader.self()
slist = trader.query("image/jpeg", "Type == 'Application'")
# print "KTrader returned:" + slist
# print "TDETrader returned:" + slist
slist.each do |s|
lvi = TQt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
end

@ -770,7 +770,7 @@ void marshall_KActionPtrList(Marshall *m) {
}
}
void marshall_KTraderOfferList(Marshall *m) {
void marshall_TDETraderOfferList(Marshall *m) {
switch(m->action()) {
case Marshall::FromVALUE:
{
@ -778,7 +778,7 @@ void marshall_KTraderOfferList(Marshall *m) {
break;
case Marshall::ToVALUE:
{
KTrader::OfferList *offerList = (KTrader::OfferList*)m->item().s_voidp;
TDETrader::OfferList *offerList = (TDETrader::OfferList*)m->item().s_voidp;
if(!offerList) {
*(m->var()) = Qnil;
break;
@ -786,7 +786,7 @@ void marshall_KTraderOfferList(Marshall *m) {
VALUE av = rb_ary_new();
for(KTrader::OfferList::Iterator it = offerList->begin();
for(TDETrader::OfferList::Iterator it = offerList->begin();
it != offerList->end();
++it) {
TDESharedPtr<KService> *ptr = new TDESharedPtr<KService>(*it);
@ -1405,7 +1405,7 @@ TypeHandler KDE_handlers[] = {
{ "TQValueList<TDEConfigSkeleton::ItemEnum::Choice>&", marshall_ChoicesList },
#endif
{ "KServiceType::List", marshall_KServiceTypeList },
{ "KTrader::OfferList", marshall_KTraderOfferList },
{ "TDETrader::OfferList", marshall_TDETraderOfferList },
{ "KURL::List", marshall_KURLList },
{ "KURL::List&", marshall_KURLList },
{ "KFileItemList", marshall_KFileItemList },

@ -4589,11 +4589,11 @@
</class>
<class>
<package>org.kde.koala</package>
<name>KTrader</name>
<name>TDETrader</name>
</class>
<class>
<package>org.kde.koala</package>
<name>KTraderSignals</name>
<name>TDETraderSignals</name>
</class>
<class>
<package>org.kde.koala</package>

@ -58,7 +58,7 @@ Single
4 0 0 100 0 16 12 0.0000 4 180 945 2475 1800 Application\001
4 0 0 100 0 16 12 0.0000 4 180 1155 5400 2025 query service\001
4 0 0 100 0 0 12 0.0000 4 180 750 7650 3600 KSyCoCa\001
4 0 0 100 0 16 12 0.0000 4 135 660 6525 3600 KTrader\001
4 0 0 100 0 16 12 0.0000 4 135 660 6525 3600 TDETrader\001
4 0 0 100 0 16 12 0.0000 4 135 315 7200 2925 KIO\001
4 0 0 100 0 0 12 0.0000 4 105 480 1575 3375 create\001
4 0 0 100 0 16 12 0.0000 4 135 450 1575 4725 KPart\001

Loading…
Cancel
Save