From 0a80cfd57d271dd44221467efb426675fa470356 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 18:31:12 +0000 Subject: TQt4 port kvirc This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/kvilib/core/kvi_string.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/kvilib/core/kvi_string.h') diff --git a/src/kvilib/core/kvi_string.h b/src/kvilib/core/kvi_string.h index 602173cd..4a7991bb 100644 --- a/src/kvilib/core/kvi_string.h +++ b/src/kvilib/core/kvi_string.h @@ -34,8 +34,8 @@ #include // useless ? #endif -#include -#include +#include +#include #include "kvi_qcstring.h" @@ -58,7 +58,7 @@ #endif -__KVI_EXTERN KVILIB_API bool kvi_qstringEqualCI(const QString &s1,const QString &s2); +__KVI_EXTERN KVILIB_API bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2); // Include inlined assembly implementations if required @@ -146,18 +146,18 @@ public: // Compat with QT...
// WARNING : With QT2.x it WILL loose UNICODE data.
- // Safe even if the QString is null. - KviStr(const QString &str); + // Safe even if the TQString is null. + KviStr(const TQString &str); - KviStr(const KviQCString &str); + KviStr(const KviTQCString &str); // Fill sonstructor. // Creates a string long fillLen characters filled with character c.
KviStr(char c,int fillLen = 1); - KviStr(const kvi_wchar_t * unicode); + KviStr(const kvi_wchar_t * tqunicode); - KviStr(const kvi_wchar_t * unicode,int len); + KviStr(const kvi_wchar_t * tqunicode,int len); // just free(m_ptr) ~KviStr(); @@ -233,7 +233,7 @@ public: // append functions void append(const KviStr &str); - void append(const QString &str); + void append(const TQString &str); void append(char c); void append(const char *str); // str CAN be 0 void append(const char *str,int len); // str CAN NOT be 0, and MUST be at least len chars long @@ -257,14 +257,14 @@ public: KviStr & operator=(const KviStr &str); // deep copy KviStr & operator=(const char *str); // str can be NULL here KviStr & operator=(char c); // 2 bytes allocated ,m_len = 1 - KviStr & operator=(const QString &str); - KviStr & operator=(const KviQCString &str); + KviStr & operator=(const TQString &str); + KviStr & operator=(const KviTQCString &str); // Append operators KviStr & operator+=(const KviStr &str) { append(str); return (*this); }; KviStr & operator+=(const char *str) { append(str); return (*this); }; KviStr & operator+=(char c) { append(c); return (*this); }; - KviStr & operator+=(const QString &str) { append(str); return (*this); }; + KviStr & operator+=(const TQString &str) { append(str); return (*this); }; // Comparison bool equalsCI(const KviStr &other) const { if(m_len != other.m_len)return false; return kvi_strEqualCI(m_ptr,other.m_ptr); }; @@ -376,9 +376,9 @@ public: //============================================================================= // Returns true if at least one occurence of str is found - bool contains(const char *str,bool caseS=true) const; + bool tqcontains(const char *str,bool caseS=true) const; // Returns true if at least one occurence of character c is found in this string - bool contains(char c,bool caseS=true) const; + bool tqcontains(char c,bool caseS=true) const; // Returns the number of occurences of string str in this string.
// Overlapped matches are counted. int occurences(const char *str,bool caseS=true) const; @@ -405,9 +405,9 @@ public: // str can NOT be 0 here. int findLastIdx(const char *str,bool caseS = true) const; - int find(char c,int startIdx) const; - int find(const char * str,int startIdx,bool caseS = true) const; - int findRev(const char * str,int startIdx,bool caseS = true) const; + int tqfind(char c,int startIdx) const; + int tqfind(const char * str,int startIdx,bool caseS = true) const; + int tqfindRev(const char * str,int startIdx,bool caseS = true) const; //============================================================================= // Numbers @@ -462,7 +462,7 @@ public: //============================================================================= // FIXME: Should it be KviStrExt::contains namespace ? - static bool ext_contains(register const char * data,const char * item,bool caseS = true); + static bool ext_tqcontains(register const char * data,const char * item,bool caseS = true); }; // FIXME: the functions below should end in the KviStr namespace ??? -- cgit v1.2.1