summaryrefslogtreecommitdiffstats
path: root/src/kvilib/core/kvi_qstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/core/kvi_qstring.h')
-rw-r--r--src/kvilib/core/kvi_qstring.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/kvilib/core/kvi_qstring.h b/src/kvilib/core/kvi_qstring.h
index 7f9f7e73..8d70ba5f 100644
--- a/src/kvilib/core/kvi_qstring.h
+++ b/src/kvilib/core/kvi_qstring.h
@@ -136,115 +136,66 @@ namespace KviTQString
extern KVILIB_API const TQString empty;
///
- /// A portability wrapper which with TQt3 and TQt4.
/// Returns a lowcase version of the parameter string.
///
inline TQString toLower(const TQString &s)
{
-#ifdef COMPILE_USE_QT4
- return s.toLower();
-#else
return s.lower();
-#endif
}
inline int find(const TQString &s,TQChar c,int index = 0,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.find(c,index,cs);
-#endif
}
inline int find(const TQString &s,char c,int index = 0,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.find(c,index,cs);
-#endif
}
inline int find(const TQString &s,const TQString & str,int index = 0,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.find(str,index,cs);
-#endif
}
inline int find(const TQString &s,const TQRegExp & rx,int index = 0)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(rx,index);
-#else
return s.find(rx,index);
-#endif
}
inline int find(const TQString &s,const char * str,int index = 0)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(TQString(str),index);
-#else
return s.find(str,index);
-#endif
}
inline int findRev(const TQString &s,TQChar c,int index = -1,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.findRev(c,index,cs);
-#endif
}
inline int findRev(const TQString &s,char c,int index = -1,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.findRev(c,index,cs);
-#endif
}
inline int findRev(const TQString &s,const TQString & str,int index = -1,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.findRev(str,index,cs);
-#endif
}
inline int findRev(const TQString &s,const TQRegExp & rx,int index = -1)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(rx,index);
-#else
return s.findRev(rx,index);
-#endif
}
inline int findRev(const TQString &s,const char * str,int index = -1)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(TQString(str),index);
-#else
return s.findRev(str,index);
-#endif
}
inline TQString trimmed(const TQString &s)
{
-#ifdef COMPILE_USE_QT4
- return s.trimmed();
-#else
return s.stripWhiteSpace();
-#endif
}
// WARNING: DO NOT USE CONSTRUCTS LIKE char * c = KviTQString::toUtf8(something).data();
@@ -258,11 +209,7 @@ namespace KviTQString
// transit to qt 4.x more or less cleanly...
inline KviTQCString toUtf8(const TQString &s)
{
-#ifdef COMPILE_USE_QT4
- return s.toUtf8();
-#else
return s.utf8();
-#endif
}
inline KviTQCString toLocal8Bit(const TQString &s)
@@ -289,6 +236,4 @@ namespace KviTQString
}
};
-// QT4SUX: Because TQString() is gone. TQString() is SLOWER than TQString() since it invokes a constructor and destructor.
-
#endif //!_KVI_TQSTRING_H_