summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-05-07 19:37:33 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-05-07 19:37:33 (GMT)
commita3b06c4fd310fdeda48a4730139cee09b5302072 (patch)
tree58636054e8f52c5851109b908053cc4da26b060a /qtools
parent368c93a05bf38e440dba3f033f6e2e1cbeb2f379 (diff)
downloadDoxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.zip
Doxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.tar.gz
Doxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.tar.bz2
Release-1.6.3-20100507
Diffstat (limited to 'qtools')
-rw-r--r--qtools/Doxyfile13
-rw-r--r--qtools/qcstring.cpp5
-rw-r--r--qtools/qcstring.h1
-rw-r--r--qtools/qdir.cpp4
-rw-r--r--qtools/qdir_win32.cpp2
-rw-r--r--qtools/qgstring.cpp35
-rw-r--r--qtools/qgstring.h2
-rw-r--r--qtools/qregexp.cpp105
-rw-r--r--qtools/qregexp.h18
-rw-r--r--qtools/qstring.cpp22
-rw-r--r--qtools/qstringlist.cpp9
-rw-r--r--qtools/qstringlist.h5
-rw-r--r--qtools/scstring.cpp5
13 files changed, 143 insertions, 83 deletions
diff --git a/qtools/Doxyfile b/qtools/Doxyfile
index 2ca19ff..61f9093 100644
--- a/qtools/Doxyfile
+++ b/qtools/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.6.1
+# Doxyfile 1.6.3
#---------------------------------------------------------------------------
# Project related configuration options
@@ -130,12 +130,17 @@ HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
+HTML_COLORSTYLE_HUE = 220
+HTML_COLORSTYLE_SAT = 70
+HTML_COLORSTYLE_GAMMA = 60
HTML_TIMESTAMP = NO
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = YES
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
@@ -238,7 +243,7 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
+HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
DOT_FONTPATH =
@@ -248,7 +253,7 @@ GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = NO
+INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
@@ -261,4 +266,4 @@ MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = YES
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
+DOT_CLEANUP = NO
diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp
index c3aad40..4038d55 100644
--- a/qtools/qcstring.cpp
+++ b/qtools/qcstring.cpp
@@ -198,6 +198,11 @@ int QCString::find( const char *str, int index, bool cs ) const
return d ? (int)(d - m_data) : -1;
}
+int QCString::find( const QCString &str,int index,bool cs) const
+{
+ return find(str.data(),index,cs);
+}
+
int QCString::find( const QRegExp &rx, int index ) const
{
QString d = QString::fromLatin1( m_data );
diff --git a/qtools/qcstring.h b/qtools/qcstring.h
index ef1189a..032d731 100644
--- a/qtools/qcstring.h
+++ b/qtools/qcstring.h
@@ -205,6 +205,7 @@ public:
int find( char c, int index=0, bool cs=TRUE ) const;
int find( const char *str, int index=0, bool cs=TRUE ) const;
+ int find( const QCString &str, int index=0, bool cs=TRUE ) const;
int find( const QRegExp &, int index=0 ) const;
int findRev( char c, int index=-1, bool cs=TRUE) const;
int findRev( const char *str, int index=-1, bool cs=TRUE) const;
diff --git a/qtools/qdir.cpp b/qtools/qdir.cpp
index ed7ed99..d0c1233 100644
--- a/qtools/qdir.cpp
+++ b/qtools/qdir.cpp
@@ -1038,8 +1038,8 @@ bool QDir::match( const QStringList &filters, const QString &fileName )
QStringList::ConstIterator sit = filters.begin();
bool matched = FALSE;
for ( ; sit != filters.end(); ++sit ) {
- QRegExp regexp( *sit, FALSE, TRUE );
- if ( regexp.match( fileName ) != -1 ) {
+ QRegExp regexp( (*sit).data(), FALSE, TRUE );
+ if ( regexp.match( fileName.data() ) != -1 ) {
matched = TRUE;
break;
}
diff --git a/qtools/qdir_win32.cpp b/qtools/qdir_win32.cpp
index b1eee66..33c8cec 100644
--- a/qtools/qdir_win32.cpp
+++ b/qtools/qdir_win32.cpp
@@ -243,7 +243,7 @@ bool QDir::readDirEntries( const QString &nameFilter,
bool doModified = (filterSpec & Modified) != 0;
bool doSystem = (filterSpec & System) != 0;
- QRegExp wc( nameFilter, FALSE, TRUE ); // wild card, case insensitive
+ QRegExp wc( nameFilter.data(), FALSE, TRUE ); // wild card, case insensitive
bool first = TRUE;
QString p = dPath.copy();
int plen = p.length();
diff --git a/qtools/qgstring.cpp b/qtools/qgstring.cpp
index f43cd6b..f42eede 100644
--- a/qtools/qgstring.cpp
+++ b/qtools/qgstring.cpp
@@ -22,6 +22,7 @@
#define ROUND_SIZE(x) ((x)+BLOCK_SIZE-1)&~(BLOCK_SIZE-1)
#define DBG_STR(x) do { } while(0)
+//#define DBG_STR(x) printf x
QGString::QGString() // make null string
: m_data(0), m_len(0), m_memSize(0)
@@ -123,6 +124,40 @@ bool QGString::resize( uint newlen )
return TRUE;
}
+bool QGString::enlarge( uint newlen )
+{
+ if (newlen==0)
+ {
+ if (m_data) { free(m_data); m_data=0; }
+ m_memSize=0;
+ m_len=0;
+ return TRUE;
+ }
+ uint newMemSize = ROUND_SIZE(newlen+1);
+ if (newMemSize==m_memSize) return TRUE;
+ m_memSize = newMemSize;
+ if (m_data==0)
+ {
+ m_data = (char *)malloc(m_memSize);
+ }
+ else
+ {
+ m_data = (char *)realloc(m_data,m_memSize);
+ }
+ if (m_data==0)
+ {
+ return FALSE;
+ }
+ m_data[newlen-1]='\0';
+ if (m_len>newlen) m_len=newlen;
+ return TRUE;
+}
+
+void QGString::setLen( uint newlen )
+{
+ m_len = newlen<=m_memSize ? newlen : m_memSize;
+}
+
QGString &QGString::operator=( const QGString &s )
{
if (m_data) free(m_data);
diff --git a/qtools/qgstring.h b/qtools/qgstring.h
index d3b997f..6934c93 100644
--- a/qtools/qgstring.h
+++ b/qtools/qgstring.h
@@ -26,6 +26,8 @@ class QGString
~QGString() ;
bool resize( uint newlen );
+ bool enlarge( uint newlen );
+ void setLen( uint newlen );
QGString &operator=( const QGString &s );
QGString &operator=( const char *str );
diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp
index 671867e..b151558 100644
--- a/qtools/qregexp.cpp
+++ b/qtools/qregexp.cpp
@@ -192,7 +192,7 @@ QRegExp::QRegExp()
\sa setWildcard()
*/
-QRegExp::QRegExp( const QString &pattern, bool caseSensitive, bool wildcard )
+QRegExp::QRegExp( const QCString &pattern, bool caseSensitive, bool wildcard )
{
rxstring = pattern;
rxdata = 0;
@@ -247,7 +247,7 @@ QRegExp &QRegExp::operator=( const QRegExp &r )
The case sensitivity or wildcard options do not change.
*/
-QRegExp &QRegExp::operator=( const QString &pattern )
+QRegExp &QRegExp::operator=( const QCString &pattern )
{
rxstring = pattern;
compile();
@@ -342,13 +342,13 @@ void QRegExp::setCaseSensitive( bool enable )
/*!
- \fn QString QRegExp::pattern() const
+ \fn QCString QRegExp::pattern() const
Returns the pattern string of the regexp.
*/
/*!
- \fn void QRegExp::setPattern(const QString & pattern)
+ \fn void QRegExp::setPattern(const QCString & pattern)
Sets the pattern string to \a pattern and returns a reference to this regexp.
The case sensitivity or wildcard options do not change.
*/
@@ -364,7 +364,7 @@ static inline bool iswordchar( int x )
Match character class
*/
-static bool matchcharclass( uint *rxd, QChar c )
+static bool matchcharclass( uint *rxd, char c )
{
uint *d = rxd;
uint clcode = *d & MCD;
@@ -372,15 +372,15 @@ static bool matchcharclass( uint *rxd, QChar c )
if ( clcode != CCL && clcode != CCN)
qWarning("QRegExp: Internal error, please report to qt-bugs@trolltech.com");
uint numFields = *d & MVL;
- uint cval = (((uint)(c.row())) << 8) | ((uint)c.cell());
+ uint cval = (uint)c; //(((uint)(c.row())) << 8) | ((uint)c.cell());
bool found = FALSE;
for ( int i = 0; i < (int)numFields; i++ ) {
d++;
- if ( *d == PWS && c.isSpace() ) {
+ if ( *d == PWS && isspace(c) ) {
found = TRUE;
break;
}
- if ( *d == PDG && c.isDigit() ) {
+ if ( *d == PDG && isdigit(c) ) {
found = TRUE;
break;
}
@@ -402,11 +402,11 @@ static bool matchcharclass( uint *rxd, QChar c )
Internal: Recursively match string.
*/
-static int matchstring( uint *rxd, const QChar *str, uint strlength,
- const QChar *bol, bool cs )
+static int matchstring( uint *rxd, const char *str, uint strlength,
+ const char *bol, bool cs )
{
- const QChar *p = str;
- const QChar *start = p;
+ const char *p = str;
+ const char *start = p;
uint pl = strlength;
uint *d = rxd;
@@ -415,9 +415,9 @@ static int matchstring( uint *rxd, const QChar *str, uint strlength,
if ( *d & CHR ) { // match char
if ( !pl )
return -1;
- QChar c( *d );
- if ( !cs && !c.row() ) { // case insensitive, #Only 8bit
- if ( p->row() || tolower(p->cell()) != c.cell() )
+ char c = *d;
+ if ( !cs /*&& !c.row()*/ ) { // case insensitive, #Only 8bit
+ if ( tolower(*p) != c )
return -1;
p++;
pl--;
@@ -440,13 +440,13 @@ static int matchstring( uint *rxd, const QChar *str, uint strlength,
}
else switch ( *d++ ) {
case PWS: // match whitespace
- if ( !pl || !p->isSpace() )
+ if ( !pl || !isspace(*p) )
return -1;
p++;
pl--;
break;
case PDG: // match digits
- if ( !pl || !p->isDigit() )
+ if ( !pl || !isdigit(*p) )
return -1;
p++;
pl--;
@@ -475,11 +475,11 @@ static int matchstring( uint *rxd, const QChar *str, uint strlength,
break;
case CLO: // Kleene closure
{
- const QChar *first_p = p;
+ const char *first_p = p;
if ( *d & CHR ) { // match char
- QChar c( *d );
- if ( !cs && !c.row() ) { // case insensitive, #only 8bit
- while ( pl && !p->row() && tolower(p->cell())==c.cell() ) {
+ char c = *d;
+ if ( !cs /*&& !c.row()*/ ) { // case insensitive, #only 8bit
+ while ( pl /*&& !p->row()*/ && tolower(*p)==c ) {
p++;
pl--;
}
@@ -500,14 +500,14 @@ static int matchstring( uint *rxd, const QChar *str, uint strlength,
d += (*d & MVL) + 1;
}
else if ( *d == PWS ) {
- while ( pl && p->isSpace() ) {
+ while ( pl && isspace(*p) ) {
p++;
pl--;
}
d++;
}
else if ( *d == PDG ) {
- while ( pl && p->isDigit() ) {
+ while ( pl && isdigit(*p) ) {
p++;
pl--;
}
@@ -535,11 +535,11 @@ static int matchstring( uint *rxd, const QChar *str, uint strlength,
return -1;
case OPT: // optional closure
{
- const QChar *first_p = p;
+ const char *first_p = p;
if ( *d & CHR ) { // match char
- QChar c( *d );
- if ( !cs && !c.row() ) { // case insensitive, #only 8bit
- if ( pl && !p->row() && tolower(p->cell()) == c.cell() ) {
+ char c = *d;
+ if ( !cs /*&& !c.row()*/ ) { // case insensitive, #only 8bit
+ if ( pl && /*!p->row() &&*/ tolower(*p) == c ) {
p++;
pl--;
}
@@ -560,14 +560,14 @@ static int matchstring( uint *rxd, const QChar *str, uint strlength,
d += (*d & MVL) + 1;
}
else if ( *d == PWS ) {
- if ( pl && p->isSpace() ) {
+ if ( pl && isspace(*p) ) {
p++;
pl--;
}
d++;
}
else if ( *d == PDG ) {
- if ( pl && p->isDigit() ) {
+ if ( pl && isdigit(*p) ) {
p++;
pl--;
}
@@ -614,8 +614,8 @@ static int matchstring( uint *rxd, const QChar *str, uint strlength,
// class derived from QRegExp and calls this directly.
// Qt 3.0: Remove this?
-
-const QChar *QRegExp::matchstr( uint *rxd, const QChar *str, uint strlength,
+#if 0
+const char *QRegExp::matchstr( uint *rxd, const QChar *str, uint strlength,
const QChar *bol ) const
{
int len = matchstring( rxd, str, strlength, bol, cs );
@@ -623,6 +623,7 @@ const QChar *QRegExp::matchstr( uint *rxd, const QChar *str, uint strlength,
return 0;
return str + len;
}
+#endif
/*!
Attempts to match in \e str, starting from position \e index.
@@ -645,15 +646,15 @@ const QChar *QRegExp::matchstr( uint *rxd, const QChar *str, uint strlength,
\note In Qt 3.0, this function will be replaced by find().
*/
-int QRegExp::match( const QString &str, int index, int *len,
+int QRegExp::match( const QCString &str, int index, int *len,
bool indexIsStart ) const
{
if ( !isValid() || isEmpty() )
return -1;
if ( str.length() < (uint)index )
return -1;
- const QChar *start = str.unicode();
- const QChar *p = start + index;
+ const char *start = str.data();
+ const char *p = start + index;
uint pl = str.length() - index;
uint *d = rxdata;
int ep = -1;
@@ -662,9 +663,9 @@ int QRegExp::match( const QString &str, int index, int *len,
ep = matchstring( d, p, pl, indexIsStart ? p : start, cs );
} else {
if ( *d & CHR ) {
- QChar c( *d );
- if ( !cs && !c.row() ) { // case sensitive, # only 8bit
- while ( pl && ( p->row() || tolower(p->cell()) != c.cell() ) ) {
+ char c = *d;
+ if ( !cs /*&& !c.row()*/ ) { // case sensitive, # only 8bit
+ while ( pl && ( /*p->row() ||*/ tolower(*p) != c ) ) {
p++;
pl--;
}
@@ -690,7 +691,7 @@ int QRegExp::match( const QString &str, int index, int *len,
return ep >= 0 ? (int)(p - start) : -1; // return index;
}
-/*! \fn int QRegExp::find( const QString& str, int index )
+/*! \fn int QRegExp::find( const QCString& str, int index )
Attempts to match in \e str, starting from position \e index.
Returns the position of the match, or -1 if there was no match.
@@ -703,12 +704,12 @@ int QRegExp::match( const QString &str, int index, int *len,
// Ex: *.cpp ==> ^.*\.cpp$
//
-static QString wc2rx( const QString &pattern )
+static QCString wc2rx( const QCString &pattern )
{
int patlen = (int)pattern.length();
- QString wcpattern = QString::fromLatin1("^");
+ QCString wcpattern("^");
- QChar c;
+ char c;
for( int i = 0; i < patlen; i++ ) {
c = pattern[i];
switch ( (char)c ) {
@@ -745,9 +746,9 @@ static QString wc2rx( const QString &pattern )
// Internal: Get char value and increment pointer.
//
-static uint char_val( const QChar **str, uint *strlength ) // get char value
+static uint char_val( const char **str, uint *strlength ) // get char value
{
- const QChar *p = *str;
+ const char *p = *str;
uint pl = *strlength;
uint len = 1;
uint v = 0;
@@ -812,12 +813,12 @@ static uint char_val( const QChar **str, uint *strlength ) // get char value
}
}
else { // not an octal number
- v = (((uint)(p->row())) << 8) | ((uint)p->cell());
+ v = (uint)*p; //(((uint)(p->row())) << 8) | ((uint)p->cell());
}
}
}
} else {
- v = (((uint)(p->row())) << 8) | ((uint)p->cell());
+ v = (uint)*p; //(((uint)(p->row())) << 8) | ((uint)p->cell());
}
*str += len;
*strlength -= len;
@@ -830,9 +831,9 @@ static uint *dump( uint *p )
{
while ( *p != END ) {
if ( *p & CHR ) {
- QChar uc = (QChar)*p;
+ uchar uc = (uchar)*p;
char c = (char)uc;
- uint u = (((uint)(uc.row())) << 8) | ((uint)uc.cell());
+ uint u = (uint)uc; //(((uint)(uc.row())) << 8) | ((uint)uc.cell());
qDebug( "\tCHR\tU%04x (%c)", u, (c ? c : ' '));
p++;
}
@@ -854,8 +855,8 @@ static uint *dump( uint *p )
else {
uint from = ( *p & MCD ) >> 16;
uint to = *p & MVL;
- char fc = (char)QChar(from);
- char tc = (char)QChar(to);
+ char fc = (char)from;
+ char tc = (char)to;
qDebug( "\t\tU%04x (%c) - U%04x (%c)", from,
(fc ? fc : ' '), to, (tc ? tc : ' ') );
}
@@ -923,13 +924,13 @@ void QRegExp::compile()
error = PatOk; // assume pattern is ok
- QString pattern;
+ QCString pattern;
if ( wc )
pattern = wc2rx(rxstring);
else
pattern = rxstring;
- const QChar *start = pattern.unicode(); // pattern pointer
- const QChar *p = start; // pattern pointer
+ const char *start = pattern.data(); // pattern pointer
+ const char *p = start; // pattern pointer
uint pl = pattern.length();
uint *d = rxarray; // data pointer
uint *prev_d = 0;
diff --git a/qtools/qregexp.h b/qtools/qregexp.h
index 25868ce..4bb0230 100644
--- a/qtools/qregexp.h
+++ b/qtools/qregexp.h
@@ -39,7 +39,7 @@
#define QREGEXP_H
#ifndef QT_H
-#include "qstring.h"
+#include "qcstring.h"
#endif // QT_H
@@ -47,11 +47,11 @@ class Q_EXPORT QRegExp
{
public:
QRegExp();
- QRegExp( const QString &, bool caseSensitive=TRUE, bool wildcard=FALSE );
+ QRegExp( const QCString &, bool caseSensitive=TRUE, bool wildcard=FALSE );
QRegExp( const QRegExp & );
~QRegExp();
QRegExp &operator=( const QRegExp & );
- QRegExp &operator=( const QString &pattern );
+ QRegExp &operator=( const QCString &pattern );
bool operator==( const QRegExp & ) const;
bool operator!=( const QRegExp &r ) const
@@ -66,22 +66,22 @@ public:
bool wildcard() const { return wc; }
void setWildcard( bool );
- QString pattern() const { return rxstring; }
+ QCString pattern() const { return rxstring; }
// ### in Qt 3.0, provide a real implementation
- void setPattern( const QString& pattern )
+ void setPattern( const QCString& pattern )
{ operator=( pattern ); }
- int match( const QString &str, int index=0, int *len=0,
+ int match( const QCString &str, int index=0, int *len=0,
bool indexIsStart = TRUE ) const;
- int find( const QString& str, int index )
+ int find( const QCString& str, int index )
{ return match( str, index ); }
protected:
void compile();
- const QChar *matchstr( uint *, const QChar *, uint, const QChar * ) const;
+ const char *matchstr( uint *, const char *, uint, const char * ) const;
private:
- QString rxstring; // regular expression pattern
+ QCString rxstring; // regular expression pattern
uint *rxdata; // compiled regexp pattern
int error; // error status
bool cs; // case sensitive
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
index e073168..b582445 100644
--- a/qtools/qstring.cpp
+++ b/qtools/qstring.cpp
@@ -12657,7 +12657,7 @@ QString &QString::sprintf( const char* cformat, ... )
int len = 0;
int pos;
while ( 1 ) {
- pos = escape->match( format, last, &len );
+ pos = escape->match( cformat, last, &len );
// Non-escaped text
if ( pos > (int)last )
result += format.mid(last,pos-last);
@@ -12695,15 +12695,15 @@ QString &QString::sprintf( const char* cformat, ... )
// Yes, %-5s really means left adjust in sprintf
if ( wpos < 0 ) {
- QRegExp num( QString::fromLatin1("[0-9]+") );
- QRegExp dot( QString::fromLatin1("\\.") );
+ QRegExp num( "[0-9]+" );
+ QRegExp dot( "\\." );
int nlen;
- int p = num.match( f, 0, &nlen );
- int q = dot.match( f, 0 );
+ int p = num.match( f.data(), 0, &nlen );
+ int q = dot.match( f.data(), 0 );
if ( q < 0 || (p < q && p >= 0) )
width = f.mid( p, nlen ).toInt();
if ( q >= 0 ) {
- p = num.match( f, q );
+ p = num.match( f.data(), q );
// "decimals" is used to specify string truncation
if ( p >= 0 )
decimals = f.mid( p, nlen ).toInt();
@@ -13633,7 +13633,7 @@ int QString::find( const QRegExp &rx, int index ) const
{
if ( index < 0 )
index += length();
- return rx.match( *this, index );
+ return rx.match( data(), index );
}
/*!
@@ -13655,7 +13655,7 @@ int QString::findRev( const QRegExp &rx, int index ) const
if ( (uint)index > length() ) // bad index
return -1;
while( index >= 0 ) {
- if ( rx.match( *this, index ) == index )
+ if ( rx.match( data(), index ) == index )
return index;
index--;
}
@@ -13678,12 +13678,12 @@ int QString::findRev( const QRegExp &rx, int index ) const
int QString::contains( const QRegExp &rx ) const
{
if ( isEmpty() )
- return rx.match( *this ) < 0 ? 0 : 1;
+ return rx.match( data() ) < 0 ? 0 : 1;
int count = 0;
int index = -1;
int len = length();
while ( index < len-1 ) { // count overlapping matches
- index = rx.match( *this, index+1 );
+ index = rx.match( data(), index+1 );
if ( index < 0 )
break;
count++;
@@ -13719,7 +13719,7 @@ QString &QString::replace( const QRegExp &rx, const QString &str )
int slen = str.length();
int len;
while ( index < (int)length() ) {
- index = rx.match( *this, index, &len, FALSE );
+ index = rx.match( data(), index, &len, FALSE );
if ( index >= 0 ) {
replace( index, len, str );
index += slen;
diff --git a/qtools/qstringlist.cpp b/qtools/qstringlist.cpp
index ff4f33e..7696340 100644
--- a/qtools/qstringlist.cpp
+++ b/qtools/qstringlist.cpp
@@ -184,6 +184,11 @@ QStringList QStringList::split( const QString &sep, const QString &str, bool all
return lst;
}
+QStringList QStringList::split( const QCString &sep, const QCString &str, bool allowEmptyEntries )
+{
+ return split(QString(sep.data()),QString(str.data()),allowEmptyEntries);
+}
+
/*!
Splits the string \a str using the regular expression \a sep as separator. Returns the
list of strings. If \a allowEmptyEntries is TRUE, also empty
@@ -204,7 +209,7 @@ QStringList QStringList::split( const QRegExp &sep, const QString &str, bool all
int j = 0;
int len = 0;
- int i = sep.match( str, j, &len );
+ int i = sep.match( str.data(), j, &len );
while ( i != -1 ) {
if ( str.mid( j, i - j ).length() > 0 )
@@ -212,7 +217,7 @@ QStringList QStringList::split( const QRegExp &sep, const QString &str, bool all
else if ( allowEmptyEntries )
lst << QString::null;
j = i + len;
- i = sep.match( str, j, &len );
+ i = sep.match( str.data(), j, &len );
}
int l = str.length() - 1;
diff --git a/qtools/qstringlist.h b/qtools/qstringlist.h
index 03342c5..3f9fbb2 100644
--- a/qtools/qstringlist.h
+++ b/qtools/qstringlist.h
@@ -64,8 +64,9 @@ public:
void sort();
static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE );
- static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE );
- static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE );
+ static QStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE );
+ static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE );
+ static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE );
QString join( const QString &sep ) const;
QStringList grep( const QString &str, bool cs = TRUE ) const;
diff --git a/qtools/scstring.cpp b/qtools/scstring.cpp
index 4a02320..698e036 100644
--- a/qtools/scstring.cpp
+++ b/qtools/scstring.cpp
@@ -208,6 +208,11 @@ int SCString::find( const char *str, int index, bool cs ) const
return d ? (int)(d - m_data) : -1;
}
+int SCString::find( const QCString &str, int index, bool cs ) const
+{
+ return find(str.data(),index,cs);
+}
+
int SCString::find( const QRegExp &rx, int index ) const
{
QString d = QString::fromLatin1( m_data );