From 0630a9067e5db373c6fd33bbe8145e29f18e9a54 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 6 Aug 2010 19:46:53 +0000 Subject: Additional Qt4 support... git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1160009 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- qtinterface/tqcstring.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'qtinterface/tqcstring.cpp') diff --git a/qtinterface/tqcstring.cpp b/qtinterface/tqcstring.cpp index 32b9609..0ab1487 100644 --- a/qtinterface/tqcstring.cpp +++ b/qtinterface/tqcstring.cpp @@ -27,4 +27,29 @@ Boston, MA 02110-1301, USA. QByteArray::operator QByteArray *() const { return (QByteArray*)(d->data); } +#ifndef QT_NO_REGEXP + +int Q3CString::contains( const QRegExp &rx ) const +{ + QString d = QString::fromAscii( data() ); + return d.count( rx ); +} + +Q3CString &Q3CString::replace( const QRegExp &rx, const char *str ) +{ + QString d = QString::fromAscii( data() ); + QString r = QString::fromAscii( str ); + d.replace( rx, r ); + setStr( d.ascii() ); + return *this; +} + +#endif //QT_NO_REGEXP + +QByteArray QByteArray::copy() const { + QByteArray copy(*this); + copy.detach(); + return copy; +} + #endif // USE_QT4 \ No newline at end of file -- cgit v1.2.1