summaryrefslogtreecommitdiffstats
path: root/dcop
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-07-12 11:09:49 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-07-12 11:12:16 +0900
commit36c049e135b0cec7cf97b41888860186813df5f0 (patch)
treeb1f87aff496d5ca1d3ca648817088eefb77c7316 /dcop
parent7f7e5585b2aee3db125045d6af2aaed1f8c37af7 (diff)
downloadtdelibs-36c049e135b0cec7cf97b41888860186813df5f0.tar.gz
tdelibs-36c049e135b0cec7cf97b41888860186813df5f0.zip
Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the merging of tqtinterface with tqt3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'dcop')
-rw-r--r--dcop/client/marshall.cpp68
-rw-r--r--dcop/dcop_deadlock_test.cpp2
-rw-r--r--dcop/dcopref.h2
-rw-r--r--dcop/dcoptypes.h54
-rw-r--r--dcop/testdcop.cpp10
5 files changed, 68 insertions, 68 deletions
diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp
index 68e3e3f57..64c10857d 100644
--- a/dcop/client/marshall.cpp
+++ b/dcop/client/marshall.cpp
@@ -145,34 +145,34 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
bool b;
stream >> b;
result = b ? "true" : "false";
- } else if ( type == TQSTRING_OBJECT_NAME_STRING )
+ } else if ( type == "TQString" )
{
TQString s;
stream >> s;
result = s.local8Bit();
- } else if ( type == TQCSTRING_OBJECT_NAME_STRING )
+ } else if ( type == "TQCString" )
{
stream >> result;
} else if ( type == "QCStringList" )
{
- return demarshal( stream, TQVALUELIST_OBJECT_NAME_STRING "<" TQCSTRING_OBJECT_NAME_STRING ">" );
- } else if ( type == TQSTRINGLIST_OBJECT_NAME_STRING )
+ return demarshal( stream, "TQValueList" "<" "TQCString" ">" );
+ } else if ( type == "TQStringList" )
{
- return demarshal( stream, TQVALUELIST_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING ">" );
+ return demarshal( stream, "TQValueList" "<" "TQString" ">" );
} else if ( type == "TQStringVariantMap" )
{
- return demarshal(stream, TQMAP_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING "," TQVARIANT_OBJECT_NAME_STRING ">");
- } else if ( type == TQCOLOR_OBJECT_NAME_STRING )
+ return demarshal(stream, "TQMap" "<" "TQString" "," "TQVariant" ">");
+ } else if ( type == "TQColor" )
{
TQColor c;
stream >> c;
result = TQString(c.name()).local8Bit();
- } else if ( type == TQSIZE_OBJECT_NAME_STRING )
+ } else if ( type == "TQSize" )
{
TQSize s;
stream >> s;
result.sprintf( "%dx%d", s.width(), s.height() );
- } else if ( type == TQPIXMAP_OBJECT_NAME_STRING || type == TQIMAGE_OBJECT_NAME_STRING )
+ } else if ( type == "TQPixmap" || type == "TQImage" )
{
TQImage i;
stream >> i;
@@ -181,17 +181,17 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
buf.open( IO_WriteOnly );
i.save( &buf, "XPM" );
result = buf.buffer();
- } else if ( type == TQPOINT_OBJECT_NAME_STRING )
+ } else if ( type == "TQPoint" )
{
TQPoint p;
stream >> p;
result.sprintf( "+%d+%d", p.x(), p.y() );
- } else if ( type == TQRECT_OBJECT_NAME_STRING )
+ } else if ( type == "TQRect" )
{
TQRect r;
stream >> r;
result.sprintf( "%dx%d+%d+%d", r.width(), r.height(), r.x(), r.y() );
- } else if ( type == TQVARIANT_OBJECT_NAME_STRING )
+ } else if ( type == "TQVariant" )
{
TQ_INT32 type;
stream >> type;
@@ -206,7 +206,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
KURL r;
stream >> r;
result = r.url().local8Bit();
- } else if ( type.left( 12 ) == TQVALUELIST_OBJECT_NAME_STRING "<" )
+ } else if ( type.left( 12 ) == "TQValueList" "<" )
{
if ( (uint)type.find( '>', 12 ) != type.length() - 1 )
return result;
@@ -228,7 +228,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
if ( i < count - 1 )
result += '\n';
}
- } else if ( type.left( 6 ) == TQMAP_OBJECT_NAME_STRING "<" )
+ } else if ( type.left( 6 ) == "TQMap" "<" )
{
int commaPos = type.find( ',', 6 );
@@ -281,11 +281,11 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
}
TQString s = TQString::fromLocal8Bit( args[ i ] );
- if (type == TQSTRINGLIST_OBJECT_NAME_STRING) {
- type = TQVALUELIST_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING ">";
+ if (type == "TQStringList") {
+ type = "TQValueList" "<" "TQString" ">";
}
if (type == "QCStringList") {
- type = TQVALUELIST_OBJECT_NAME_STRING "<" TQSTRING_OBJECT_NAME_STRING ">";
+ type = "TQValueList" "<" "TQString" ">";
}
if ( type == "int" )
@@ -322,52 +322,52 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
arg << s.toDouble();
else if ( type == "bool" )
arg << mkBool( s );
- else if ( type == TQSTRING_OBJECT_NAME_STRING )
+ else if ( type == "TQString" )
arg << s;
- else if ( type == TQCSTRING_OBJECT_NAME_STRING )
+ else if ( type == "TQCString" )
arg << TQCString( args[ i ] );
- else if ( type == TQCOLOR_OBJECT_NAME_STRING )
+ else if ( type == "TQColor" )
arg << mkColor( s );
- else if ( type == TQPOINT_OBJECT_NAME_STRING )
+ else if ( type == "TQPoint" )
arg << mkPoint( s );
- else if ( type == TQSIZE_OBJECT_NAME_STRING )
+ else if ( type == "TQSize" )
arg << mkSize( s );
- else if ( type == TQRECT_OBJECT_NAME_STRING )
+ else if ( type == "TQRect" )
arg << mkRect( s );
else if ( type == "KURL" )
arg << KURL( s );
- else if ( type == TQVARIANT_OBJECT_NAME_STRING ) {
- int tqPointKeywordLength = strlen(TQPOINT_OBJECT_NAME_STRING);
- int tqSizeKeywordLength = strlen(TQSIZE_OBJECT_NAME_STRING);
- int tqRectKeywordLength = strlen(TQRECT_OBJECT_NAME_STRING);
- int tqColorKeywordLength = strlen(TQCOLOR_OBJECT_NAME_STRING);
+ else if ( type == "TQVariant" ) {
+ int tqPointKeywordLength = strlen("TQPoint");
+ int tqSizeKeywordLength = strlen("TQSize");
+ int tqRectKeywordLength = strlen("TQRect");
+ int tqColorKeywordLength = strlen("TQColor");
if ( s == "true" || s == "false" ) {
arg << TQVariant( mkBool( s ) );
}
else if ( s.left( 4 ) == "int(" ) {
arg << TQVariant( s.mid(4, s.length()-5).toInt() );
}
- else if ( s.left( (tqPointKeywordLength+1) ) == TQPOINT_OBJECT_NAME_STRING "(" ) {
+ else if ( s.left( (tqPointKeywordLength+1) ) == "TQPoint" "(" ) {
arg << TQVariant( mkPoint( s.mid((tqPointKeywordLength+1), s.length()-(tqPointKeywordLength+2)) ) );
}
- else if ( s.left( (tqSizeKeywordLength+1) ) == TQSIZE_OBJECT_NAME_STRING "(" ) {
+ else if ( s.left( (tqSizeKeywordLength+1) ) == "TQSize" "(" ) {
arg << TQVariant( mkSize( s.mid((tqSizeKeywordLength+1), s.length()-(tqSizeKeywordLength+2)) ) );
}
- else if ( s.left( (tqRectKeywordLength+1) ) == TQRECT_OBJECT_NAME_STRING "(" ) {
+ else if ( s.left( (tqRectKeywordLength+1) ) == "TQRect" "(" ) {
arg << TQVariant( mkRect( s.mid((tqRectKeywordLength+1), s.length()-(tqRectKeywordLength+2)) ) );
}
- else if ( s.left( (tqColorKeywordLength+1) ) == TQCOLOR_OBJECT_NAME_STRING "(" ) {
+ else if ( s.left( (tqColorKeywordLength+1) ) == "TQColor" "(" ) {
arg << TQVariant( mkColor( s.mid((tqColorKeywordLength+1), s.length()-(tqColorKeywordLength+2)) ) );
}
else {
arg << TQVariant( s );
}
- } else if ( type.startsWith(TQVALUELIST_OBJECT_NAME_STRING "<") || type == "KURL::List" ) {
+ } else if ( type.startsWith("TQValueList" "<") || type == "KURL::List" ) {
if ( type == "KURL::List" ) {
type = "KURL";
}
else {
- int tqValueListKeywordLength = strlen(TQVALUELIST_OBJECT_NAME_STRING);
+ int tqValueListKeywordLength = strlen("TQValueList");
type = type.mid((tqValueListKeywordLength+1), type.length() - (tqValueListKeywordLength+2));
}
TQStringList list;
diff --git a/dcop/dcop_deadlock_test.cpp b/dcop/dcop_deadlock_test.cpp
index 1ab43f730..6b32688ef 100644
--- a/dcop/dcop_deadlock_test.cpp
+++ b/dcop/dcop_deadlock_test.cpp
@@ -47,7 +47,7 @@ TQCString& replyType, TQByteArray &replyData)
gettimeofday(&tv, 0);
tqWarning("%s: function('%s') %d:%06d", name(), m_remoteName.data(), tv.tv_sec % 100, tv.tv_usec);
- replyType = TQSTRING_OBJECT_NAME_STRING;
+ replyType = "TQString";
TQDataStream reply( replyData, IO_WriteOnly );
reply << TQString("Hey");
m_timer.start(1000, true);
diff --git a/dcop/dcopref.h b/dcop/dcopref.h
index 6864bc4ad..c85654e0e 100644
--- a/dcop/dcopref.h
+++ b/dcop/dcopref.h
@@ -238,7 +238,7 @@ inline TQDataStream & operator << (TQDataStream & str, const DCOPArg& arg )
* dcopTypeName function, for example
*
* \code
- * inline const char* dcopTypeName( const TQString& ) { return TQSTRING_OBJECT_NAME_STRING; }
+ * inline const char* dcopTypeName( const TQString& ) { return "TQString"; }
* \endcode
*
* If you use custom data types that do support TQDataStream but have
diff --git a/dcop/dcoptypes.h b/dcop/dcoptypes.h
index 548483e97..d70f787f7 100644
--- a/dcop/dcoptypes.h
+++ b/dcop/dcoptypes.h
@@ -37,38 +37,38 @@ inline const char* dcopTypeName( long ) { return "long int"; }
inline const char* dcopTypeName( ulong ) { return "ulong"; }
inline const char* dcopTypeName( double ) { return "double"; }
inline const char* dcopTypeName( float ) { return "float"; }
-inline const char* dcopTypeName( const char* ) { return TQCSTRING_OBJECT_NAME_STRING; }
+inline const char* dcopTypeName( const char* ) { return "TQCString"; }
// dcop specialities
class DCOPRef; inline const char* dcopTypeName( const DCOPRef& ) { return "DCOPRef"; }
// Qt variant types
-class TQString; inline const char* dcopTypeName( const TQString& ) { return TQSTRING_OBJECT_NAME_STRING; }
-class TQCString; inline const char* dcopTypeName( const TQCString& ) { return TQCSTRING_OBJECT_NAME_STRING; }
-class TQFont; inline const char* dcopTypeName( const TQFont& ) { return TQFONT_OBJECT_NAME_STRING; }
-class TQPixmap; inline const char* dcopTypeName( const TQPixmap& ) { return TQPIXMAP_OBJECT_NAME_STRING; }
-class TQBrush; inline const char* dcopTypeName( const TQBrush& ) { return TQBRUSH_OBJECT_NAME_STRING; }
-class TQRect; inline const char* dcopTypeName( const TQRect& ) { return TQRECT_OBJECT_NAME_STRING; }
-class TQPoint; inline const char* dcopTypeName( const TQPoint& ) { return TQPOINT_OBJECT_NAME_STRING; }
-class TQImage; inline const char* dcopTypeName( const TQImage& ) { return TQIMAGE_OBJECT_NAME_STRING; }
-class TQSize; inline const char* dcopTypeName( const TQSize& ) { return TQSIZE_OBJECT_NAME_STRING; }
-class TQColor; inline const char* dcopTypeName( const TQColor& ) { return TQCOLOR_OBJECT_NAME_STRING; }
-class TQPalette; inline const char* dcopTypeName( const TQPalette& ) { return TQPALETTE_OBJECT_NAME_STRING; }
-class TQColorGroup; inline const char* dcopTypeName( const TQColorGroup& ) { return TQCOLORGROUP_OBJECT_NAME_STRING; }
-class TQIconSet; inline const char* dcopTypeName( const TQIconSet& ) { return TQICONSET_OBJECT_NAME_STRING; }
-class TQDataStream; inline const char* dcopTypeName( const TQDataStream& ) { return TQDATASTREAM_OBJECT_NAME_STRING; }
-class TQPointArray; inline const char* dcopTypeName( const TQPointArray& ) { return TQPOINTARRAY_OBJECT_NAME_STRING; }
-class TQRegion; inline const char* dcopTypeName( const TQRegion& ) { return TQREGION_OBJECT_NAME_STRING; }
-class TQBitmap; inline const char* dcopTypeName( const TQBitmap& ) { return TQBITMAP_OBJECT_NAME_STRING; }
-class TQCursor; inline const char* dcopTypeName( const TQCursor& ) { return TQCURSOR_OBJECT_NAME_STRING; }
-class TQStringList; inline const char* dcopTypeName( const TQStringList& ) { return TQSTRINGLIST_OBJECT_NAME_STRING; }
-class TQSizePolicy; inline const char* dcopTypeName( const TQSizePolicy& ) { return TQSIZEPOLICY_OBJECT_NAME_STRING; }
-class TQDate; inline const char* dcopTypeName( const TQDate& ) { return TQDATE_OBJECT_NAME_STRING; }
-class TQTime; inline const char* dcopTypeName( const TQTime& ) { return TQTIME_OBJECT_NAME_STRING; }
-class TQDateTime; inline const char* dcopTypeName( const TQDateTime& ) { return TQDATETIME_OBJECT_NAME_STRING; }
-class TQBitArray; inline const char* dcopTypeName( const TQBitArray& ) { return TQBITARRAY_OBJECT_NAME_STRING; }
-class TQKeySequence; inline const char* dcopTypeName( const TQKeySequence& ) { return TQKEYSEQUENCE_OBJECT_NAME_STRING; }
-class TQVariant; inline const char* dcopTypeName( const TQVariant& ) { return TQVARIANT_OBJECT_NAME_STRING; }
+class TQString; inline const char* dcopTypeName( const TQString& ) { return "TQString"; }
+class TQCString; inline const char* dcopTypeName( const TQCString& ) { return "TQCString"; }
+class TQFont; inline const char* dcopTypeName( const TQFont& ) { return "TQFont"; }
+class TQPixmap; inline const char* dcopTypeName( const TQPixmap& ) { return "TQPixmap"; }
+class TQBrush; inline const char* dcopTypeName( const TQBrush& ) { return "TQBrush"; }
+class TQRect; inline const char* dcopTypeName( const TQRect& ) { return "TQRect"; }
+class TQPoint; inline const char* dcopTypeName( const TQPoint& ) { return "TQPoint"; }
+class TQImage; inline const char* dcopTypeName( const TQImage& ) { return "TQImage"; }
+class TQSize; inline const char* dcopTypeName( const TQSize& ) { return "TQSize"; }
+class TQColor; inline const char* dcopTypeName( const TQColor& ) { return "TQColor"; }
+class TQPalette; inline const char* dcopTypeName( const TQPalette& ) { return "TQPalette"; }
+class TQColorGroup; inline const char* dcopTypeName( const TQColorGroup& ) { return "TQColorGroup"; }
+class TQIconSet; inline const char* dcopTypeName( const TQIconSet& ) { return "TQIconSet"; }
+class TQDataStream; inline const char* dcopTypeName( const TQDataStream& ) { return "TQDataStream"; }
+class TQPointArray; inline const char* dcopTypeName( const TQPointArray& ) { return "TQPointArray"; }
+class TQRegion; inline const char* dcopTypeName( const TQRegion& ) { return "TQRegion"; }
+class TQBitmap; inline const char* dcopTypeName( const TQBitmap& ) { return "TQBitmap"; }
+class TQCursor; inline const char* dcopTypeName( const TQCursor& ) { return "TQCursor"; }
+class TQStringList; inline const char* dcopTypeName( const TQStringList& ) { return "TQStringList"; }
+class TQSizePolicy; inline const char* dcopTypeName( const TQSizePolicy& ) { return "TQSizePolicy"; }
+class TQDate; inline const char* dcopTypeName( const TQDate& ) { return "TQDate"; }
+class TQTime; inline const char* dcopTypeName( const TQTime& ) { return "TQTime"; }
+class TQDateTime; inline const char* dcopTypeName( const TQDateTime& ) { return "TQDateTime"; }
+class TQBitArray; inline const char* dcopTypeName( const TQBitArray& ) { return "TQBitArray"; }
+class TQKeySequence; inline const char* dcopTypeName( const TQKeySequence& ) { return "TQKeySequence"; }
+class TQVariant; inline const char* dcopTypeName( const TQVariant& ) { return "TQVariant"; }
template<class Key, class T> class TQMap;
typedef TQMap<TQString, TQVariant> TQStringVariantMap;
diff --git a/dcop/testdcop.cpp b/dcop/testdcop.cpp
index 1e70171d2..1a18eaff3 100644
--- a/dcop/testdcop.cpp
+++ b/dcop/testdcop.cpp
@@ -57,7 +57,7 @@ bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
printf("Rect x = %d, y = %d, w = %d, h = %d\n", arg1.x(), arg1.y(), arg1.width(), arg1.height());
- replyType = TQRECT_OBJECT_NAME_STRING;
+ replyType = "TQRect";
TQDataStream reply( replyData, IO_WriteOnly );
TQRect r(10,20,100,200);
reply << r;
@@ -74,7 +74,7 @@ bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
tqDebug("countDown() countDownAction = %p", countDownAction);
if (countDownAction2)
{
- replyType = TQSTRING_OBJECT_NAME_STRING;
+ replyType = "TQString";
TQDataStream reply( replyData, IO_WriteOnly );
reply << TQString("Hey");
return true;
@@ -104,7 +104,7 @@ void MyDCOPObject::slotTimeout()
countDownCount--;
if (countDownCount == 0)
{
- TQCString replyType = TQSTRING_OBJECT_NAME_STRING;
+ TQCString replyType = "TQString";
TQByteArray replyData;
TQDataStream reply( replyData, IO_WriteOnly );
reply << TQString("Hello World");
@@ -123,7 +123,7 @@ void MyDCOPObject::slotTimeout2()
countDownCount2--;
if (countDownCount2 == 0)
{
- TQCString replyType = TQSTRING_OBJECT_NAME_STRING;
+ TQCString replyType = "TQString";
TQByteArray replyData;
TQDataStream reply( replyData, IO_WriteOnly );
reply << TQString("Hello World");
@@ -139,7 +139,7 @@ void MyDCOPObject::slotTimeout2()
QCStringList MyDCOPObject::functions()
{
QCStringList result = DCOPObject::functions();
- result << TQRECT_OBJECT_NAME_STRING " canLaunchRockets(" TQRECT_OBJECT_NAME_STRING ")";
+ result << "TQRect canLaunchRockets(TQRect)";
return result;
}