summaryrefslogtreecommitdiffstats
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
parenta59cd278932b11820dde87e764052622aa38980b (diff)
downloadDoxygen-cfdea8320f089c0f25fe72ecfb7ede76e39110d8.zip
Doxygen-cfdea8320f089c0f25fe72ecfb7ede76e39110d8.tar.gz
Doxygen-cfdea8320f089c0f25fe72ecfb7ede76e39110d8.tar.bz2
Disable qregex.h and fix some warnings and issues
-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
-rw-r--r--src/classdef.cpp4
-rw-r--r--src/definition.cpp2
-rw-r--r--src/docparser.cpp1
-rw-r--r--src/doctokenizer.l1
-rw-r--r--src/doxygen.cpp2
-rw-r--r--src/htmlgen.cpp3
-rw-r--r--src/index.cpp1
-rw-r--r--src/layout.h1
-rw-r--r--src/mangen.cpp1
-rw-r--r--src/memberdef.cpp24
-rw-r--r--src/memberdef.h1
-rw-r--r--src/memberlist.cpp2
-rw-r--r--src/pagedef.cpp2
-rw-r--r--src/rtfgen.cpp2
-rw-r--r--src/util.cpp38
-rw-r--r--src/util.h2
-rw-r--r--src/vhdldocgen.cpp4
31 files changed, 91 insertions, 92 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>
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 9636d97..3e602b0 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1627,7 +1627,7 @@ void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
if (!m_impl->inherits.empty())
{
- auto replaceFunc = [this](OutputList &ol,size_t entryIndex)
+ auto replaceFunc = [this,&ol](size_t entryIndex)
{
BaseClassDef &bcd=m_impl->inherits[entryIndex];
ClassDef *cd=bcd.classDef;
@@ -1662,7 +1662,7 @@ void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
if (!m_impl->inheritedBy.empty())
{
- auto replaceFunc = [this](OutputList &ol,size_t entryIndex)
+ auto replaceFunc = [this,&ol](size_t entryIndex)
{
BaseClassDef &bcd=m_impl->inheritedBy[entryIndex];
ClassDef *cd=bcd.classDef;
diff --git a/src/definition.cpp b/src/definition.cpp
index 7ee2314..6a5b6e3 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1208,7 +1208,7 @@ void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
{
auto members = refMapToVector(membersMap);
- auto replaceFunc = [this,&members,scopeName](OutputList &ol,size_t entryIndex)
+ auto replaceFunc = [this,&members,scopeName,&ol](size_t entryIndex)
{
const MemberDef *md=members[entryIndex];
if (md)
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 725cee0..9fbfef1 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -21,7 +21,6 @@
#include <qfile.h>
#include <qfileinfo.h>
#include <qcstring.h>
-#include <qregexp.h>
#include <ctype.h>
#include <qcstringlist.h>
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index d2ba897..ad6ac11 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -31,7 +31,6 @@
#include <qfile.h>
#include <qstring.h>
-#include <qregexp.h>
#include "doctokenizer.h"
#include "cmdmapper.h"
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index f7849a3..3fd1069 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2220,7 +2220,7 @@ static MemberDef *addVariableToFile(
{
ttype.stripPrefix("struct ");
ttype.stripPrefix("union ");
- static std::regex re("[:alpha:]_][:alnum:]_]*");
+ static std::regex re("[[:alpha:]_][[:alnum:]_]*");
std::smatch match;
std::string typ = ttype.str();
if (std::regex_search(typ,match,re))
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index c9f7bf2..3f335e5 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -21,7 +21,6 @@
#include <mutex>
#include <qdir.h>
-#include <qregexp.h>
#include "message.h"
#include "htmlgen.h"
#include "config.h"
@@ -1075,7 +1074,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
}
m_lastFile = fileName;
- t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),m_relPath);
+ t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title?title:"")),m_relPath);
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
<< getDoxygenVersion() << " -->" << endl;
diff --git a/src/index.cpp b/src/index.cpp
index 1e35b30..0984ac2 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -26,7 +26,6 @@
#include <assert.h>
#include <qtextstream.h>
#include <qdir.h>
-#include <qregexp.h>
#include "message.h"
#include "index.h"
diff --git a/src/layout.h b/src/layout.h
index 4dce583..851af22 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -26,7 +26,6 @@
class LayoutParser;
struct LayoutNavEntry;
class MemberList;
-class QTextStream;
/** @brief Base class representing a piece of a documentation page */
struct LayoutDocEntry
diff --git a/src/mangen.cpp b/src/mangen.cpp
index e58aa6e..9139aa8 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -445,7 +445,6 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
{
FTextStream linkstream;
linkstream.setDevice(&linkfile);
- //linkstream.setEncoding(QTextStream::UnicodeUTF8);
linkstream << ".so " << getSubdir() << "/" << buildFileName( manName ) << endl;
}
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 0a64659..b3415ff 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -2109,14 +2109,14 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
bool endAnonScopeNeeded=FALSE;
if (std::regex_search(stype,match,r)) // member has an anonymous type
{
- size_t i = match.position();
- size_t l = match.length();
+ int i = (int)match.position();
+ int l = (int)match.length();
//printf("annoClassDef=%p annMemb=%p scopeName='%s' anonymous='%s'\n",
// annoClassDef,annMemb,cname.data(),ltype.mid(i,l).data());
if (annoClassDef) // type is an anonymous compound
{
- size_t ir=i+l;
+ int ir=i+l;
//printf("<<<<<<<<<<<<<<\n");
ol.startAnonTypeScope(s_indentLevel++);
annoClassDef->writeDeclaration(ol,m_impl->annMemb,inGroup,inheritedFrom,inheritId);
@@ -2778,9 +2778,9 @@ void MemberDefImpl::_writeReimplementedBy(OutputList &ol) const
}
if (count>0)
{
- auto replaceFunc = [&bml](OutputList &ol,size_t entryIndex)
+ auto replaceFunc = [&bml,&ol](size_t entryIndex)
{
- size_t count=0;
+ size_t cnt=0;
auto it = bml.begin();
// find the entryIndex-th documented entry in the inheritance list.
const MemberDef *bmd = 0;
@@ -2791,8 +2791,8 @@ void MemberDefImpl::_writeReimplementedBy(OutputList &ol) const
bcd = bmd->getClassDef();
if ( bmd->isLinkable() && bcd->isLinkable())
{
- if (count==entryIndex) break;
- count++;
+ if (cnt==entryIndex) break;
+ cnt++;
}
++it;
}
@@ -2814,11 +2814,11 @@ void MemberDefImpl::_writeReimplementedBy(OutputList &ol) const
QCString reimplInLine;
if (m_impl->virt==Pure || (getClassDef() && getClassDef()->compoundType()==ClassDef::Interface))
{
- reimplInLine = theTranslator->trImplementedInList(count);
+ reimplInLine = theTranslator->trImplementedInList((int)count);
}
else
{
- reimplInLine = theTranslator->trReimplementedInList(count);
+ reimplInLine = theTranslator->trReimplementedInList((int)count);
}
// write the list of classes that overwrite this member
@@ -3184,8 +3184,6 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
{
title += "()";
}
- int i=0,l;
-
if (lang == SrcLangExt_Slice)
{
// Remove the container scope from the member name.
@@ -3210,8 +3208,6 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
std::string sdef = ldef.str();
if ((isVariable() || isTypedef()) && std::regex_search(sdef,match,r))
{
- i = (int)match.position();
- l = (int)match.length();
// find enum type and insert it in the definition
bool found=false;
for (const auto &vmd : *ml)
@@ -3343,7 +3339,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
}
int dl=ldef.length();
//printf("start >%s<\n",ldef.data());
- i=dl-1;
+ int i=dl-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
while (i>=0 && isspace((uchar)ldef.at(i))) i--;
if (i>0)
diff --git a/src/memberdef.h b/src/memberdef.h
index 7b27cff..abaf3ff 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -36,7 +36,6 @@ class MemberGroup;
class ExampleList;
class OutputList;
class GroupDef;
-class QTextStream;
class QStrList;
struct TagInfo;
class MemberDefMutable;
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 9181e3f..8d07ae4 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -15,8 +15,6 @@
*
*/
-#include <qregexp.h>
-
#include "memberlist.h"
#include "classdef.h"
#include "message.h"
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index 0c34f08..9a18fda 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -13,8 +13,6 @@
*
*/
-#include <qregexp.h>
-
#include "pagedef.h"
#include "groupdef.h"
#include "docparser.h"
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 65a5258..debda5c 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -22,8 +22,6 @@
#include <stdlib.h>
#include <qdir.h>
-#include <qregexp.h>
-#include <qtextstream.h>
#include "rtfgen.h"
#include "config.h"
diff --git a/src/util.cpp b/src/util.cpp
index c9455d9..168fdf0 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -180,7 +180,7 @@ QCString removeAnonymousScopes(const char *str)
// helper to check if the found delimiter ends with a colon
auto endsWithColon = [](const std::string &del)
{
- for (size_t i=del.size()-1;i>=0;i--)
+ for (int i=(int)del.size()-1;i>=0;i--)
{
if (del[i]=='@') return false;
else if (del[i]==':') return true;
@@ -1094,7 +1094,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
}
void writeMarkerList(OutputList &ol,const std::string &markerText,size_t numMarkers,
- std::function<void(OutputList &ol,size_t index)> replaceFunc)
+ std::function<void(size_t)> replaceFunc)
{
static std::regex marker("@([[:digit:]]+)");
std::sregex_iterator it(markerText.begin(),markerText.end(),marker);
@@ -1110,7 +1110,7 @@ void writeMarkerList(OutputList &ol,const std::string &markerText,size_t numMark
unsigned long entryIndex = std::stoul(match[1]);
if (entryIndex<(unsigned long)numMarkers)
{
- replaceFunc(ol,entryIndex);
+ replaceFunc(entryIndex);
}
index=newIndex+matchLen;
}
@@ -1119,7 +1119,7 @@ void writeMarkerList(OutputList &ol,const std::string &markerText,size_t numMark
void writeExamples(OutputList &ol,const ExampleList &list)
{
- auto replaceFunc = [&list](OutputList &ol,size_t entryIndex)
+ auto replaceFunc = [&list,&ol](size_t entryIndex)
{
const auto &e = list[entryIndex];
ol.pushGeneratorState();
@@ -1306,8 +1306,8 @@ static bool isMatchingWildcard(const StringType &input,size_t input_pos,
auto pattern_char = pattern[pattern_pos];
if (!caseSensitive)
{
- input_char = std::tolower(input_char);
- pattern_char = std::tolower(pattern_char);
+ input_char = (typename StringType::value_type)std::tolower(input_char);
+ pattern_char = (typename StringType::value_type)std::tolower(pattern_char);
}
// if current character matches against '?' pattern or literally
if (pattern[pattern_pos]=='?' || input_char==pattern_char)
@@ -4489,7 +4489,7 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
name.resize(0);
templSpec.resize(0);
if (type==0) return -1;
- size_t typeLen=qstrlen(type);
+ int typeLen=qstrlen(type);
if (typeLen>0)
{
if (lang == SrcLangExt_Fortran)
@@ -4500,18 +4500,18 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
re = re_fortran;
}
}
- std::string part = type + pos;
- std::sregex_iterator it(part.begin(),part.end(),re);
+ std::string s = type;
+ std::sregex_iterator it(s.begin()+pos,s.end(),re);
std::sregex_iterator end;
if (it!=end)
{
const auto &match = *it;
- size_t i = pos + match.position();
- size_t l = match.length();
- size_t ts = i+l;
- size_t te = ts;
- size_t tl = 0;
+ int i = pos+(int)match.position();
+ int l = (int)match.length();
+ int ts = i+l;
+ int te = ts;
+ int tl = 0;
while (ts<typeLen && type[ts]==' ') ts++,tl++; // skip any whitespace
if (ts<typeLen && type[ts]=='<') // assume template instance
@@ -4544,13 +4544,13 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
pos=i+l;
}
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=TRUE i=%d\n",
- // type.data(),pos,name.data(),templSpec.data(),i);
+ // type,pos,name.data(),templSpec.data(),i);
return i;
}
}
pos = typeLen;
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=FALSE\n",
- // type.data(),pos,name.data(),templSpec.data());
+ // type,pos,name.data(),templSpec.data());
return -1;
}
@@ -6069,15 +6069,15 @@ static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::s
std::regex re("[\\\\@]([[:alpha:]_][[:alnum:]_]*)");
std::sregex_iterator re_it(s.begin(),s.end(),re);
std::sregex_iterator end;
- size_t p = 0;
+ int p = 0;
//QCString value=s;
//int i,p=0,l;
//while ((i=cmdPat.match(value,p,&l))!=-1)
for ( ; re_it!=end ; ++re_it)
{
const auto &match = *re_it;
- size_t i = match.position();
- size_t l = match.length();
+ int i = (int)match.position();
+ int l = (int)match.length();
if (i>p) result+=s.substr(p,i-p);
QCString args = extractAliasArgs(s,i+l);
bool hasArgs = !args.isEmpty(); // found directly after command
diff --git a/src/util.h b/src/util.h
index d978c87..02767f8 100644
--- a/src/util.h
+++ b/src/util.h
@@ -398,7 +398,7 @@ int nextUtf8CharPosition(const QCString &utf8Str,uint len,uint startPos);
const char *writeUtf8Char(FTextStream &t,const char *s);
void writeMarkerList(OutputList &ol,const std::string &markerText,size_t numMarkers,
- std::function<void(OutputList &ol,size_t index)> replaceFunc);
+ std::function<void(size_t)> replaceFunc);
/** Data associated with a HSV colored image. */
struct ColoredImgDataItem
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 539caae..cc12006 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -2406,7 +2406,7 @@ QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch)
QCString label;
if (!entity.contains(":")) return "";
- static std::regex exp("[:()[:space:]]");
+ static std::regex exp("[:()[[:space:]]");
auto ql=split(entity.str(),exp);
if (ql.size()<2)
{
@@ -2436,7 +2436,7 @@ QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch)
QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch)
{
- static std::regex exp("[()[:space:]]");
+ static std::regex exp("[()[[:space:]]");
auto ql = split(entity.str(),exp);