Skip to content

Commit cfdea83

Browse files
committed
Disable qregex.h and fix some warnings and issues
1 parent a59cd27 commit cfdea83

31 files changed

+91
-92
lines changed

qtools/qcstring.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <stdio.h>
2323
#include <stdarg.h>
2424
#include <ctype.h>
25-
#include <qregexp.h>
25+
//#include <qregexp.h>
2626
#include <qdatastream.h>
2727

2828
QCString &QCString::sprintf( const char *format, ... )
@@ -87,12 +87,14 @@ int QCString::find( const QCString &str, int index, bool cs ) const
8787
return find(str.data(),index,cs);
8888
}
8989

90+
#if 0
9091
int QCString::find( const QRegExp &rx, int index ) const
9192
{
9293
if ( index < 0 )
9394
index += length();
9495
return rx.match( data(), index );
9596
}
97+
#endif
9698

9799
int QCString::findRev( char c, int index, bool cs) const
98100
{
@@ -146,6 +148,7 @@ int QCString::findRev( const char *str, int index, bool cs) const
146148
return -1;
147149
}
148150

151+
#if 0
149152
int QCString::findRev( const QRegExp &rx, int index ) const
150153
{
151154
if ( index < 0 ) // neg index ==> start from end
@@ -159,6 +162,7 @@ int QCString::findRev( const QRegExp &rx, int index ) const
159162
}
160163
return -1;
161164
}
165+
#endif
162166

163167
int QCString::contains( char c, bool cs ) const
164168
{
@@ -202,6 +206,7 @@ int QCString::contains( const char *str, bool cs ) const
202206
return count;
203207
}
204208

209+
#if 0
205210
int QCString::contains( const QRegExp &rx ) const
206211
{
207212
if ( isEmpty() )
@@ -217,6 +222,7 @@ int QCString::contains( const QRegExp &rx ) const
217222
}
218223
return count;
219224
}
225+
#endif
220226

221227

222228
QCString QCString::simplifyWhiteSpace() const
@@ -253,6 +259,7 @@ QCString &QCString::replace( uint index, uint len, const char *s)
253259
return *this;
254260
}
255261

262+
#if 0
256263
QCString &QCString::replace( const QRegExp &rx, const char *str )
257264
{
258265
if ( isEmpty() )
@@ -273,6 +280,7 @@ QCString &QCString::replace( const QRegExp &rx, const char *str )
273280
}
274281
return *this;
275282
}
283+
#endif
276284

277285
static bool ok_in_base( char c, int base )
278286
{

qtools/qcstring.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ QDataStream &operator<<( QDataStream &, const QByteArray & );
9494
QDataStream &operator>>( QDataStream &, QByteArray & );
9595
#endif
9696

97-
class QRegExp;
97+
//class QRegExp;
9898

9999
/** This is an alternative implementation of QCString. It provides basically
100100
* the same functions but uses std::string as the underlying string type
@@ -181,15 +181,15 @@ class QCString
181181
int find( char c, int index=0, bool cs=TRUE ) const;
182182
int find( const char *str, int index=0, bool cs=TRUE ) const;
183183
int find( const QCString &str, int index=0, bool cs=TRUE ) const;
184-
int find( const QRegExp &rx, int index=0 ) const;
184+
//int find( const QRegExp &rx, int index=0 ) const;
185185

186186
int findRev( char c, int index=-1, bool cs=TRUE) const;
187187
int findRev( const char *str, int index=-1, bool cs=TRUE) const;
188-
int findRev( const QRegExp &rx, int index=-1 ) const;
188+
//int findRev( const QRegExp &rx, int index=-1 ) const;
189189

190190
int contains( char c, bool cs=TRUE ) const;
191191
int contains( const char *str, bool cs=TRUE ) const;
192-
int contains( const QRegExp &rx ) const;
192+
//int contains( const QRegExp &rx ) const;
193193

194194
bool stripPrefix(const char *prefix)
195195
{
@@ -295,7 +295,7 @@ class QCString
295295
}
296296

297297
QCString &replace( uint index, uint len, const char *s);
298-
QCString &replace( const QRegExp &rx, const char *str );
298+
//QCString &replace( const QRegExp &rx, const char *str );
299299

300300
short toShort( bool *ok=0, int base=10 ) const;
301301
ushort toUShort( bool *ok=0, int base=10 ) const;

qtools/qcstringlist.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ QCStringList QCStringList::split( const QCString &sep, const QCString &str, bool
7676
return lst;
7777
}
7878

79+
#if 0
7980
/*!
8081
Splits the string \a str using the regular expression \a sep as separator. Returns the
8182
list of strings. If \a allowEmptyEntries is TRUE, also empty
@@ -115,6 +116,7 @@ QCStringList QCStringList::split( const QRegExp &sep, const QCString &str, bool
115116

116117
return lst;
117118
}
119+
#endif
118120

119121
/*!
120122
Returns a list of all strings containing the substring \a str.
@@ -132,6 +134,7 @@ QCStringList QCStringList::grep( const QCString &str, bool cs ) const
132134
return res;
133135
}
134136

137+
#if 0
135138
/*!
136139
Returns a list of all strings containing a substring that matches
137140
the regular expression \a expr.
@@ -146,6 +149,7 @@ QCStringList QCStringList::grep( const QRegExp &expr ) const
146149

147150
return res;
148151
}
152+
#endif
149153

150154
/*!
151155
Joins the stringlist into a single string with each element

qtools/qcstringlist.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "qvaluelist_p.h"
1818
#include "qcstring.h"
19-
#include "qregexp.h"
19+
//#include "qregexp.h"
2020

2121
class QStrList;
2222
class QDataStream;
@@ -38,11 +38,11 @@ class QCStringList : public QValueList<QCString>
3838

3939
static QCStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE );
4040
static QCStringList split( char sep, const QCString &str, bool allowEmptyEntries = FALSE );
41-
static QCStringList split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries = FALSE );
41+
//static QCStringList split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries = FALSE );
4242
QCString join( const QCString &sep ) const;
4343

4444
QCStringList grep( const QCString &str, bool cs = TRUE ) const;
45-
QCStringList grep( const QRegExp &expr ) const;
45+
//QCStringList grep( const QRegExp &expr ) const;
4646
};
4747

4848
extern Q_EXPORT QDataStream &operator>>( QDataStream &, QCStringList& );

qtools/qdir.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#ifndef QT_NO_DIR
4343
#include "qfileinfo.h"
4444
#include "qfiledefs_p.h"
45-
#include "qregexp.h"
45+
#include "qregexp_p.h"
4646
#include "qstringlist.h"
4747
#include <stdlib.h>
4848
#include <ctype.h>

qtools/qdir_unix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
#include "qfileinfo.h"
4444
#include "qfiledefs_p.h"
45-
#include "qregexp.h"
45+
//#include "qregexp.h"
4646
#include "qstringlist.h"
4747
#include <stdlib.h>
4848
#include <ctype.h>

qtools/qdir_win32.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/******************************************************************************
22
*
3-
*
3+
*
44
*
55
* Copyright (C) 1997-2001 by Dimitri van Heesch.
66
*
77
* Permission to use, copy, modify, and distribute this software and its
8-
* documentation under the terms of the GNU General Public License is hereby
9-
* granted. No representations are made about the suitability of this software
8+
* documentation under the terms of the GNU General Public License is hereby
9+
* granted. No representations are made about the suitability of this software
1010
* for any purpose. It is provided "as is" without express or implied warranty.
1111
* See the GNU General Public License for more details.
1212
*
1313
* Documents produced by Doxygen are derivative works derived from the
1414
* input used in their production; they are not affected by this license.
1515
*
16-
* Based on qdir_unix.cpp
16+
* Based on qdir_unix.cpp
1717
*
1818
* Copyright (C) 1992-2000 Trolltech AS.
1919
*/
@@ -27,7 +27,7 @@
2727

2828
#include "qfileinfo.h"
2929
#include "qfiledefs_p.h"
30-
#include "qregexp.h"
30+
#include "qregexp_p.h"
3131
#include "qstringlist.h"
3232
#include <stdlib.h>
3333
#include <ctype.h>
@@ -80,7 +80,7 @@ static QString p_getenv( QString name )
8080

8181
void QDir::slashify( QString& n )
8282
{
83-
for ( int i=0; i<(int)n.length(); i++ )
83+
for ( int i=0; i<(int)n.length(); i++ )
8484
{
8585
if ( n[i] == '\\' )
8686
n[i] = '/';
@@ -175,7 +175,7 @@ bool QDir::rename( const QString &name, const QString &newName,
175175
return ::rename( QFile::encodeName(fn1),
176176
QFile::encodeName(fn2) ) == 0;
177177
#else
178-
return MoveFileW( ( LPCWSTR ) fn1.ucs2(), ( LPCWSTR ) fn2.ucs2() ) != 0;
178+
return MoveFileW( ( LPCWSTR ) fn1.ucs2(), ( LPCWSTR ) fn2.ucs2() ) != 0;
179179
#endif
180180
}
181181

@@ -343,20 +343,20 @@ bool QDir::readDirEntries( const QString &nameFilter,
343343
#else
344344
ff = FindFirstFileW ( ( LPCWSTR ) p.ucs2(), &finfo );
345345
#endif
346-
if ( ff == FF_ERROR )
346+
if ( ff == FF_ERROR )
347347
{
348348
#if defined(DEBUG)
349349
warning( "QDir::readDirEntries: Cannot read the directory: %s",
350350
(const char *)dPath.utf8() );
351351
#endif
352352
return FALSE;
353353
}
354-
355-
while ( TRUE )
354+
355+
while ( TRUE )
356356
{
357357
if ( first )
358358
first = FALSE;
359-
else
359+
else
360360
{
361361
#if defined(__CYGWIN32_)
362362
if ( FF_GETNEXT(ff,&finfo) == -1 )
@@ -393,15 +393,15 @@ bool QDir::readDirEntries( const QString &nameFilter,
393393
continue;
394394

395395
QString name = fname;
396-
if ( doExecable )
396+
if ( doExecable )
397397
{
398398
QString ext = name.right(4).lower();
399399
if ( ext == ".exe" || ext == ".com" || ext == ".bat" ||
400400
ext == ".pif" || ext == ".cmd" )
401401
isExecable = TRUE;
402402
}
403403

404-
if ( (doDirs && isDir) || (doFiles && isFile) )
404+
if ( (doDirs && isDir) || (doFiles && isFile) )
405405
{
406406
if ( noSymLinks && isSymLink )
407407
continue;

qtools/qregexp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
**
3636
**********************************************************************/
3737

38-
#include "qregexp.h"
38+
#include "qregexp_p.h"
3939
#include <ctype.h>
4040
#include <stdlib.h>
4141

File renamed without changes.

qtools/qstring.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#endif
4343

4444
#include "qstring.h"
45-
#include "qregexp.h"
45+
#include "qregexp_p.h"
4646
#include "qdatastream.h"
4747
#include "qtextcodec.h"
4848
#include "qstack_p.h"
@@ -13750,7 +13750,7 @@ QString &QString::replace( uint index, uint len, const QChar* s, uint slen )
1375013750
}
1375113751

1375213752

13753-
13753+
#if 0
1375413754
/*!
1375513755
Finds the first occurrence of the regular expression \a rx, starting at
1375613756
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 )
1386313863
}
1386413864
return *this;
1386513865
}
13866+
#endif
1386613867

1386713868
static bool
1386813869
ok_in_base( QChar c, int base )

0 commit comments

Comments
 (0)