summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-02-20 17:50:41 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-02-20 19:17:52 (GMT)
commitcfdea8320f089c0f25fe72ecfb7ede76e39110d8 (patch)
tree11ba92461fb70accabfdc6b89163f0bccb1a69bc /qtools
parenta59cd278932b11820dde87e764052622aa38980b (diff)
downloadDoxygen-cfdea8320f089c0f25fe72ecfb7ede76e39110d8.zip
Doxygen-cfdea8320f089c0f25fe72ecfb7ede76e39110d8.tar.gz
Doxygen-cfdea8320f089c0f25fe72ecfb7ede76e39110d8.tar.bz2
Disable qregex.h and fix some warnings and issues
Diffstat (limited to 'qtools')
-rw-r--r--qtools/qcstring.cpp10
-rw-r--r--qtools/qcstring.h10
-rw-r--r--qtools/qcstringlist.cpp4
-rw-r--r--qtools/qcstringlist.h6
-rw-r--r--qtools/qdir.cpp2
-rw-r--r--qtools/qdir_unix.cpp2
-rw-r--r--qtools/qdir_win32.cpp26
-rw-r--r--qtools/qregexp.cpp2
-rw-r--r--qtools/qregexp_p.h (renamed from qtools/qregexp.h)0
-rw-r--r--qtools/qstring.cpp5
-rw-r--r--qtools/qstring.h10
-rw-r--r--qtools/qstringlist.cpp6
-rw-r--r--qtools/qstringlist.h6
-rw-r--r--qtools/qtextstream.cpp3
14 files changed, 54 insertions, 38 deletions
diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp
index da7a46f..7e496fd 100644
--- a/qtools/qcstring.cpp
+++ b/qtools/qcstring.cpp
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
-#include <qregexp.h>
+//#include <qregexp.h>
#include <qdatastream.h>
QCString &QCString::sprintf( const char *format, ... )
@@ -87,12 +87,14 @@ int QCString::find( const QCString &str, int index, bool cs ) const
return find(str.data(),index,cs);
}
+#if 0
int QCString::find( const QRegExp &rx, int index ) const
{
if ( index < 0 )
index += length();
return rx.match( data(), index );
}
+#endif
int QCString::findRev( char c, int index, bool cs) const
{
@@ -146,6 +148,7 @@ int QCString::findRev( const char *str, int index, bool cs) const
return -1;
}
+#if 0
int QCString::findRev( const QRegExp &rx, int index ) const
{
if ( index < 0 ) // neg index ==> start from end
@@ -159,6 +162,7 @@ int QCString::findRev( const QRegExp &rx, int index ) const
}
return -1;
}
+#endif
int QCString::contains( char c, bool cs ) const
{
@@ -202,6 +206,7 @@ int QCString::contains( const char *str, bool cs ) const
return count;
}
+#if 0
int QCString::contains( const QRegExp &rx ) const
{
if ( isEmpty() )
@@ -217,6 +222,7 @@ int QCString::contains( const QRegExp &rx ) const
}
return count;
}
+#endif
QCString QCString::simplifyWhiteSpace() const
@@ -253,6 +259,7 @@ QCString &QCString::replace( uint index, uint len, const char *s)
return *this;
}
+#if 0
QCString &QCString::replace( const QRegExp &rx, const char *str )
{
if ( isEmpty() )
@@ -273,6 +280,7 @@ QCString &QCString::replace( const QRegExp &rx, const char *str )
}
return *this;
}
+#endif
static bool ok_in_base( char c, int base )
{
diff --git a/qtools/qcstring.h b/qtools/qcstring.h
index a70f8f4..bdd99f0 100644
--- a/qtools/qcstring.h
+++ b/qtools/qcstring.h
@@ -94,7 +94,7 @@ QDataStream &operator<<( QDataStream &, const QByteArray & );
QDataStream &operator>>( QDataStream &, QByteArray & );
#endif
-class QRegExp;
+//class QRegExp;
/** This is an alternative implementation of QCString. It provides basically
* the same functions but uses std::string as the underlying string type
@@ -181,15 +181,15 @@ class QCString
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 &rx, int index=0 ) const;
+ //int find( const QRegExp &rx, 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;
- int findRev( const QRegExp &rx, int index=-1 ) const;
+ //int findRev( const QRegExp &rx, int index=-1 ) const;
int contains( char c, bool cs=TRUE ) const;
int contains( const char *str, bool cs=TRUE ) const;
- int contains( const QRegExp &rx ) const;
+ //int contains( const QRegExp &rx ) const;
bool stripPrefix(const char *prefix)
{
@@ -295,7 +295,7 @@ class QCString
}
QCString &replace( uint index, uint len, const char *s);
- QCString &replace( const QRegExp &rx, const char *str );
+ //QCString &replace( const QRegExp &rx, const char *str );
short toShort( bool *ok=0, int base=10 ) const;
ushort toUShort( bool *ok=0, int base=10 ) const;
diff --git a/qtools/qcstringlist.cpp b/qtools/qcstringlist.cpp
index f1c4599..b8926ad 100644
--- a/qtools/qcstringlist.cpp
+++ b/qtools/qcstringlist.cpp
@@ -76,6 +76,7 @@ QCStringList QCStringList::split( const QCString &sep, const QCString &str, bool
return lst;
}
+#if 0
/*!
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
@@ -115,6 +116,7 @@ QCStringList QCStringList::split( const QRegExp &sep, const QCString &str, bool
return lst;
}
+#endif
/*!
Returns a list of all strings containing the substring \a str.
@@ -132,6 +134,7 @@ QCStringList QCStringList::grep( const QCString &str, bool cs ) const
return res;
}
+#if 0
/*!
Returns a list of all strings containing a substring that matches
the regular expression \a expr.
@@ -146,6 +149,7 @@ QCStringList QCStringList::grep( const QRegExp &expr ) const
return res;
}
+#endif
/*!
Joins the stringlist into a single string with each element
diff --git a/qtools/qcstringlist.h b/qtools/qcstringlist.h
index a7d79b0..6f390b0 100644
--- a/qtools/qcstringlist.h
+++ b/qtools/qcstringlist.h
@@ -16,7 +16,7 @@
#include "qvaluelist_p.h"
#include "qcstring.h"
-#include "qregexp.h"
+//#include "qregexp.h"
class QStrList;
class QDataStream;
@@ -38,11 +38,11 @@ public:
static QCStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE );
static QCStringList split( char sep, const QCString &str, bool allowEmptyEntries = FALSE );
- static QCStringList split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries = FALSE );
+ //static QCStringList split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries = FALSE );
QCString join( const QCString &sep ) const;
QCStringList grep( const QCString &str, bool cs = TRUE ) const;
- QCStringList grep( const QRegExp &expr ) const;
+ //QCStringList grep( const QRegExp &expr ) const;
};
extern Q_EXPORT QDataStream &operator>>( QDataStream &, QCStringList& );
diff --git a/qtools/qdir.cpp b/qtools/qdir.cpp
index fc84cbc..016313f 100644
--- a/qtools/qdir.cpp
+++ b/qtools/qdir.cpp
@@ -42,7 +42,7 @@
#ifndef QT_NO_DIR
#include "qfileinfo.h"
#include "qfiledefs_p.h"
-#include "qregexp.h"
+#include "qregexp_p.h"
#include "qstringlist.h"
#include <stdlib.h>
#include <ctype.h>
diff --git a/qtools/qdir_unix.cpp b/qtools/qdir_unix.cpp
index 520af79..fa3c42e 100644
--- a/qtools/qdir_unix.cpp
+++ b/qtools/qdir_unix.cpp
@@ -42,7 +42,7 @@
#include "qfileinfo.h"
#include "qfiledefs_p.h"
-#include "qregexp.h"
+//#include "qregexp.h"
#include "qstringlist.h"
#include <stdlib.h>
#include <ctype.h>
diff --git a/qtools/qdir_win32.cpp b/qtools/qdir_win32.cpp
index 324ff24..f7f2982 100644
--- a/qtools/qdir_win32.cpp
+++ b/qtools/qdir_win32.cpp
@@ -1,19 +1,19 @@
/******************************************************************************
*
- *
+ *
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
- * Based on qdir_unix.cpp
+ * Based on qdir_unix.cpp
*
* Copyright (C) 1992-2000 Trolltech AS.
*/
@@ -27,7 +27,7 @@
#include "qfileinfo.h"
#include "qfiledefs_p.h"
-#include "qregexp.h"
+#include "qregexp_p.h"
#include "qstringlist.h"
#include <stdlib.h>
#include <ctype.h>
@@ -80,7 +80,7 @@ static QString p_getenv( QString name )
void QDir::slashify( QString& n )
{
- for ( int i=0; i<(int)n.length(); i++ )
+ for ( int i=0; i<(int)n.length(); i++ )
{
if ( n[i] == '\\' )
n[i] = '/';
@@ -175,7 +175,7 @@ bool QDir::rename( const QString &name, const QString &newName,
return ::rename( QFile::encodeName(fn1),
QFile::encodeName(fn2) ) == 0;
#else
- return MoveFileW( ( LPCWSTR ) fn1.ucs2(), ( LPCWSTR ) fn2.ucs2() ) != 0;
+ return MoveFileW( ( LPCWSTR ) fn1.ucs2(), ( LPCWSTR ) fn2.ucs2() ) != 0;
#endif
}
@@ -343,7 +343,7 @@ bool QDir::readDirEntries( const QString &nameFilter,
#else
ff = FindFirstFileW ( ( LPCWSTR ) p.ucs2(), &finfo );
#endif
- if ( ff == FF_ERROR )
+ if ( ff == FF_ERROR )
{
#if defined(DEBUG)
warning( "QDir::readDirEntries: Cannot read the directory: %s",
@@ -351,12 +351,12 @@ bool QDir::readDirEntries( const QString &nameFilter,
#endif
return FALSE;
}
-
- while ( TRUE )
+
+ while ( TRUE )
{
if ( first )
first = FALSE;
- else
+ else
{
#if defined(__CYGWIN32_)
if ( FF_GETNEXT(ff,&finfo) == -1 )
@@ -393,7 +393,7 @@ bool QDir::readDirEntries( const QString &nameFilter,
continue;
QString name = fname;
- if ( doExecable )
+ if ( doExecable )
{
QString ext = name.right(4).lower();
if ( ext == ".exe" || ext == ".com" || ext == ".bat" ||
@@ -401,7 +401,7 @@ bool QDir::readDirEntries( const QString &nameFilter,
isExecable = TRUE;
}
- if ( (doDirs && isDir) || (doFiles && isFile) )
+ if ( (doDirs && isDir) || (doFiles && isFile) )
{
if ( noSymLinks && isSymLink )
continue;
diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp
index 8709858..08138f5 100644
--- a/qtools/qregexp.cpp
+++ b/qtools/qregexp.cpp
@@ -35,7 +35,7 @@
**
**********************************************************************/
-#include "qregexp.h"
+#include "qregexp_p.h"
#include <ctype.h>
#include <stdlib.h>
diff --git a/qtools/qregexp.h b/qtools/qregexp_p.h
index 4bb0230..4bb0230 100644
--- a/qtools/qregexp.h
+++ b/qtools/qregexp_p.h
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
index a964aca..c03ca3a 100644
--- a/qtools/qstring.cpp
+++ b/qtools/qstring.cpp
@@ -42,7 +42,7 @@
#endif
#include "qstring.h"
-#include "qregexp.h"
+#include "qregexp_p.h"
#include "qdatastream.h"
#include "qtextcodec.h"
#include "qstack_p.h"
@@ -13750,7 +13750,7 @@ QString &QString::replace( uint index, uint len, const QChar* s, uint slen )
}
-
+#if 0
/*!
Finds the first occurrence of the regular expression \a rx, starting at
position \a index. If \a index is -1, the search starts at the last
@@ -13863,6 +13863,7 @@ QString &QString::replace( const QRegExp &rx, const QString &str )
}
return *this;
}
+#endif
static bool
ok_in_base( QChar c, int base )
diff --git a/qtools/qstring.h b/qtools/qstring.h
index ed56d7f..c35faf3 100644
--- a/qtools/qstring.h
+++ b/qtools/qstring.h
@@ -49,7 +49,7 @@
QString class
*****************************************************************************/
-class QRegExp;
+//class QRegExp;
class QString;
class QCharRef;
@@ -451,14 +451,14 @@ public:
int find( QChar c, int index=0, bool cs=TRUE ) const;
int find( char c, int index=0, bool cs=TRUE ) const;
int find( const QString &str, int index=0, bool cs=TRUE ) const;
- int find( const QRegExp &, int index=0 ) const;
+ //int find( const QRegExp &, int index=0 ) const;
#ifndef QT_NO_CAST_ASCII
int find( const char* str, int index=0 ) const;
#endif
int findRev( QChar c, int index=-1, bool cs=TRUE) const;
int findRev( char c, int index=-1, bool cs=TRUE) const;
int findRev( const QString &str, int index=-1, bool cs=TRUE) const;
- int findRev( const QRegExp &, int index=-1 ) const;
+ //int findRev( const QRegExp &, int index=-1 ) const;
#ifndef QT_NO_CAST_ASCII
int findRev( const char* str, int index=-1 ) const;
#endif
@@ -469,7 +469,7 @@ public:
int contains( const char* str, bool cs=TRUE ) const;
#endif
int contains( const QString &str, bool cs=TRUE ) const;
- int contains( const QRegExp & ) const;
+ //int contains( const QRegExp & ) const;
QString left( uint len ) const;
QString right( uint len ) const;
@@ -497,7 +497,7 @@ public:
QString &remove( uint index, uint len );
QString &replace( uint index, uint len, const QString & );
QString &replace( uint index, uint len, const QChar*, uint clen );
- QString &replace( const QRegExp &, const QString & );
+ //QString &replace( const QRegExp &, const QString & );
short toShort( bool *ok=0, int base=10 ) const;
ushort toUShort( bool *ok=0, int base=10 ) const;
diff --git a/qtools/qstringlist.cpp b/qtools/qstringlist.cpp
index aa7ac16..ef1a43e 100644
--- a/qtools/qstringlist.cpp
+++ b/qtools/qstringlist.cpp
@@ -1,5 +1,5 @@
/****************************************************************************
-**
+**
**
** Implementation of QStringList
**
@@ -189,6 +189,7 @@ QStringList QStringList::split( const QCString &sep, const QCString &str, bool a
return split(QString(sep.data()),QString(str.data()),allowEmptyEntries);
}
+#if 0
/*!
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
@@ -228,6 +229,7 @@ QStringList QStringList::split( const QRegExp &sep, const QString &str, bool all
return lst;
}
+#endif
/*!
Returns a list of all strings containing the substring \a str.
@@ -245,6 +247,7 @@ QStringList QStringList::grep( const QString &str, bool cs ) const
return res;
}
+#if 0
/*!
Returns a list of all strings containing a substring that matches
the regular expression \a expr.
@@ -259,6 +262,7 @@ QStringList QStringList::grep( const QRegExp &expr ) const
return res;
}
+#endif
/*!
Joins the stringlist into a single string with each element
diff --git a/qtools/qstringlist.h b/qtools/qstringlist.h
index 5e1e258..13703a1 100644
--- a/qtools/qstringlist.h
+++ b/qtools/qstringlist.h
@@ -41,7 +41,7 @@
#ifndef QT_H
#include "qvaluelist_p.h"
#include "qstring.h"
-#include "qregexp.h"
+//#include "qregexp.h"
#endif // QT_H
#ifndef QT_NO_STRINGLIST
@@ -66,11 +66,11 @@ public:
static QStringList split( const QString &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 );
+ //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;
- QStringList grep( const QRegExp &expr ) const;
+ //QStringList grep( const QRegExp &expr ) const;
};
#ifndef QT_NO_DATASTREAM
diff --git a/qtools/qtextstream.cpp b/qtools/qtextstream.cpp
index ffbdeba..a3abb53 100644
--- a/qtools/qtextstream.cpp
+++ b/qtools/qtextstream.cpp
@@ -1,5 +1,5 @@
/****************************************************************************
-**
+**
**
** Implementation of QTextStream class
**
@@ -39,7 +39,6 @@
#ifndef QT_NO_TEXTSTREAM
#include "qtextcodec.h"
-#include "qregexp.h"
#include "qbuffer.h"
#include "qfile.h"
#include <stdio.h>