diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /lskat/lskatproc | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lskat/lskatproc')
-rw-r--r-- | lskat/lskatproc/KChildConnect.cpp | 6 | ||||
-rw-r--r-- | lskat/lskatproc/KChildConnect.h | 5 | ||||
-rw-r--r-- | lskat/lskatproc/KEMessage.cpp | 28 | ||||
-rw-r--r-- | lskat/lskatproc/KInputChildProcess.cpp | 2 | ||||
-rw-r--r-- | lskat/lskatproc/KInputChildProcess.h | 3 |
5 files changed, 23 insertions, 21 deletions
diff --git a/lskat/lskatproc/KChildConnect.cpp b/lskat/lskatproc/KChildConnect.cpp index 6ea4b973..a504018d 100644 --- a/lskat/lskatproc/KChildConnect.cpp +++ b/lskat/lskatproc/KChildConnect.cpp @@ -30,7 +30,7 @@ KChildConnect::~KChildConnect() { } -KR_STATUS KChildConnect::QueryStatus() +KR_STATUS KChildConnect::QuerytqStatus() { return KR_OK; } @@ -57,7 +57,7 @@ bool KChildConnect::SendMsg(KEMessage *msg) return Send(sendstring); } -// Send string to parent +// Send string to tqparent bool KChildConnect::Send(TQString str) { if (!str || str.length()<1) return true; // no need to send crap @@ -75,7 +75,7 @@ void KChildConnect::Receive(TQString input) // Call us recursive until there are no CR left len=KEMESSAGE_CR.length(); - pos=input.find(KEMESSAGE_CR); + pos=input.tqfind(KEMESSAGE_CR); if (pos>0) { tmp=input.left(pos); diff --git a/lskat/lskatproc/KChildConnect.h b/lskat/lskatproc/KChildConnect.h index 37339218..36e9e9a5 100644 --- a/lskat/lskatproc/KChildConnect.h +++ b/lskat/lskatproc/KChildConnect.h @@ -14,9 +14,10 @@ #include "KEMessage.h" -class KChildConnect: public QObject +class KChildConnect: public TQObject { Q_OBJECT + TQ_OBJECT protected: TQStrList inputcache; @@ -33,7 +34,7 @@ class KChildConnect: public QObject virtual bool SendMsg(KEMessage *msg); virtual bool Send(TQString str); - virtual KR_STATUS QueryStatus(); + virtual KR_STATUS QuerytqStatus(); public slots: diff --git a/lskat/lskatproc/KEMessage.cpp b/lskat/lskatproc/KEMessage.cpp index ce8985f3..96c33797 100644 --- a/lskat/lskatproc/KEMessage.cpp +++ b/lskat/lskatproc/KEMessage.cpp @@ -61,7 +61,7 @@ void KEMessage::AddData(TQString key,const char *data,int size) KGM_TYPE KEMessage::QueryType(TQString key) { KMessageEntry *entry; - entry=dict.find(key); + entry=dict.tqfind(key); if (!entry) return (KGM_TYPE)0; return entry->QueryType(); } @@ -69,7 +69,7 @@ KGM_TYPE KEMessage::QueryType(TQString key) bool KEMessage::HasKey(TQString key) { KMessageEntry *entry; - entry=dict.find(key); + entry=dict.tqfind(key); if (!entry) return false; return true; } @@ -78,7 +78,7 @@ bool KEMessage::GetData(TQString key,short &s) { short *result; KMessageEntry *entry; - entry=dict.find(key); + entry=dict.tqfind(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_SHORT) return false; // printf("GetShortData: %p for %s\n",entry->QueryData(),(char *)key); @@ -91,7 +91,7 @@ bool KEMessage::GetData(TQString key,long &l) { long *result; KMessageEntry *entry; - entry=dict.find(key); + entry=dict.tqfind(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_LONG) return false; result=(long *)entry->QueryData(); @@ -103,7 +103,7 @@ bool KEMessage::GetData(TQString key,float &f) { float *result; KMessageEntry *entry; - entry=dict.find(key); + entry=dict.tqfind(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_FLOAT) return false; // printf("GetFloatData: %p for %s\n",entry->QueryData(),(char *)key); @@ -115,7 +115,7 @@ bool KEMessage::GetData(TQString key,float &f) bool KEMessage::GetData(TQString key,char * &c,int &size) { KMessageEntry *entry; - entry=dict.find(key); + entry=dict.tqfind(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_DATA) return false; c=entry->QueryData(); @@ -179,19 +179,19 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry) len=KEMESSAGE_SEP.length(); if (!entry) return TQString(); - pos=str.find(KEMESSAGE_SEP,0); + pos=str.tqfind(KEMESSAGE_SEP,0); if (pos<0) return TQString(); // wrong format key=str.left(pos); oldpos=pos; - pos=str.find(KEMESSAGE_SEP,oldpos+len); + pos=str.tqfind(KEMESSAGE_SEP,oldpos+len); if (pos<0) return TQString(); // wrong format size=str.mid(oldpos+len,pos-oldpos-len); oldpos=pos; - pos=str.find(KEMESSAGE_SEP,oldpos+len); + pos=str.tqfind(KEMESSAGE_SEP,oldpos+len); if (pos<0) return TQString(); // wrong format type=str.mid(oldpos+len,pos-oldpos-len); @@ -202,7 +202,7 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry) cnt=size.toInt(); entry->SetType((KGM_TYPE)type.toInt()); - // I hope this works with unicode strings as well + // I hope this works with tqunicode strings as well p=data.latin1(); q=(char *)calloc(data.length()/2,sizeof(char)); if (!q) return TQString(); @@ -226,7 +226,7 @@ TQString KEMessage::ToString() s=KEMESSAGE_HEAD+KEMESSAGE_CR; for (it=keys.first();it!=0;it=keys.next()) { - entry=dict.find(TQCString(it)); + entry=dict.tqfind(TQCString(it)); s+=EntryToString(it,entry); } s+=KEMESSAGE_TAIL+KEMESSAGE_CR; @@ -251,14 +251,14 @@ bool KEMessage::AddStringMsg(TQString str) len=KEMESSAGE_CR.length(); - pos=str.find(KEMESSAGE_CR); + pos=str.tqfind(KEMESSAGE_CR); if (pos<0) return false; // wrong format if (str.left(pos)!=(KEMESSAGE_HEAD)) return false; // wrong message do { oldpos=pos; - pos=str.find(KEMESSAGE_CR,oldpos+len); + pos=str.tqfind(KEMESSAGE_CR,oldpos+len); if (pos<0) return false; // wrong format data=str.mid(oldpos+len,pos-oldpos-len); if (data!=(KEMESSAGE_TAIL)) @@ -315,7 +315,7 @@ KEMessage &KEMessage::operator=(KEMessage &msg) // printf("Assigning = KEMessage from %p to %p\n",&msg,this); for (it=msg.keys.first();it!=0;it=msg.keys.next()) { - entry=msg.dict.find(TQCString(it)); + entry=msg.dict.tqfind(TQCString(it)); newentry=new KMessageEntry; *newentry=*entry; AddEntry(TQCString(it),newentry); diff --git a/lskat/lskatproc/KInputChildProcess.cpp b/lskat/lskatproc/KInputChildProcess.cpp index 13e00b93..c06f42e5 100644 --- a/lskat/lskatproc/KInputChildProcess.cpp +++ b/lskat/lskatproc/KInputChildProcess.cpp @@ -55,7 +55,7 @@ bool KInputChildProcess::exec() s=inputbuffer+s; // printf("ChildABC '%s'\n",(const char *)s); // fflush(stdout); - pos=s.findRev(KEMESSAGE_CR); + pos=s.tqfindRev(KEMESSAGE_CR); if (pos<0) { inputbuffer=s; diff --git a/lskat/lskatproc/KInputChildProcess.h b/lskat/lskatproc/KInputChildProcess.h index 2f964e71..14201922 100644 --- a/lskat/lskatproc/KInputChildProcess.h +++ b/lskat/lskatproc/KInputChildProcess.h @@ -22,9 +22,10 @@ #include "KChildConnect.h" -class KInputChildProcess : public QObject +class KInputChildProcess : public TQObject { Q_OBJECT + TQ_OBJECT private: char *buffer; |