Rename QRegularExpression-related feature defs to QT_NO_REGULAREXPRESSION

QRegExp and QRegularExpression are totally independent, therefore
using two different defines is the right thing to do.

Also, document the new define in qfeatures.{txt,h}.

Change-Id: Ice4826ea543f4b22f1cc27bf31ed6e043d0c43b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This commit is contained in:
Giuseppe D'Angelo 2012-10-14 16:29:39 +01:00 committed by The Qt Project
parent 79f0a29abf
commit 59eb393cf5
15 changed files with 76 additions and 57 deletions

View File

@ -154,6 +154,9 @@
// Properties // Properties
//#define QT_NO_PROPERTIES //#define QT_NO_PROPERTIES
// QRegularExpression
//#define QT_NO_REGULAREXPRESSION
// Resize Handler // Resize Handler
//#define QT_NO_RESIZEHANDLER //#define QT_NO_RESIZEHANDLER

View File

@ -28,6 +28,13 @@ Requires:
Name: CssParser Name: CssParser
SeeAlso: ??? SeeAlso: ???
Feature: REGULAREXPRESSION
Description: Perl-compatible regular expression APIs
Section: Kernel
Requires:
Name: QRegularExpression
SeeAlso: ???
Feature: CONCURRENT Feature: CONCURRENT
Description: Provides a high-level multi-threaded APIs Description: Provides a high-level multi-threaded APIs
Section: Kernel Section: Kernel

View File

@ -943,11 +943,11 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
break; break;
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
case QMetaType::QRegularExpression: case QMetaType::QRegularExpression:
stream << *static_cast<const NS(QRegularExpression)*>(data); stream << *static_cast<const NS(QRegularExpression)*>(data);
break; break;
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
case QMetaType::QEasingCurve: case QMetaType::QEasingCurve:
stream << *static_cast<const NS(QEasingCurve)*>(data); stream << *static_cast<const NS(QEasingCurve)*>(data);
break; break;
@ -1166,11 +1166,11 @@ bool QMetaType::load(QDataStream &stream, int type, void *data)
break; break;
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
case QMetaType::QRegularExpression: case QMetaType::QRegularExpression:
stream >> *static_cast< NS(QRegularExpression)*>(data); stream >> *static_cast< NS(QRegularExpression)*>(data);
break; break;
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
case QMetaType::QEasingCurve: case QMetaType::QEasingCurve:
stream >> *static_cast< NS(QEasingCurve)*>(data); stream >> *static_cast< NS(QEasingCurve)*>(data);
break; break;

View File

@ -221,7 +221,7 @@ template<> struct TypeDefinition<QPointF> { static const bool IsAvailable = fals
#ifdef QT_NO_REGEXP #ifdef QT_NO_REGEXP
template<> struct TypeDefinition<QRegExp> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QRegExp> { static const bool IsAvailable = false; };
#endif #endif
#if defined(QT_BOOTSTRAPPED) || defined(QT_NO_REGEXP) #if defined(QT_BOOTSTRAPPED) || defined(QT_NO_REGULAREXPRESSION)
template<> struct TypeDefinition<QRegularExpression> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QRegularExpression> { static const bool IsAvailable = false; };
#endif #endif
#ifdef QT_NO_SHORTCUT #ifdef QT_NO_SHORTCUT

View File

@ -1690,7 +1690,7 @@ void qt_qFindChildren_helper(const QObject *parent, const QRegExp &re,
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGEXP
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
/*! /*!
\internal \internal
*/ */
@ -1712,7 +1712,7 @@ void qt_qFindChildren_helper(const QObject *parent, const QRegularExpression &re
qt_qFindChildren_helper(obj, re, mo, list, options); qt_qFindChildren_helper(obj, re, mo, list, options);
} }
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
/*! /*!
\internal \internal

View File

@ -73,7 +73,7 @@ class QWidget;
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGEXP
class QRegExp; class QRegExp;
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
class QRegularExpression; class QRegularExpression;
#endif #endif
#ifndef QT_NO_USERDATA #ifndef QT_NO_USERDATA
@ -187,7 +187,7 @@ public:
} }
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
template<typename T> template<typename T>
inline QList<T> findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const inline QList<T> findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{ {

View File

@ -1529,10 +1529,13 @@ QVariant::QVariant(const QLocale &l)
QVariant::QVariant(const QRegExp &regExp) QVariant::QVariant(const QRegExp &regExp)
: d(RegExp) : d(RegExp)
{ v_construct<QRegExp>(&d, regExp); } { v_construct<QRegExp>(&d, regExp); }
#endif // QT_NO_REGEXP
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGULAREXPRESSION
QVariant::QVariant(const QRegularExpression &re) QVariant::QVariant(const QRegularExpression &re)
: d(RegularExpression) : d(RegularExpression)
{ v_construct<QRegularExpression>(&d, re); } { v_construct<QRegularExpression>(&d, re); }
#endif
QVariant::QVariant(const QUuid &uuid) QVariant::QVariant(const QUuid &uuid)
: d(Uuid) : d(Uuid)
{ v_construct<QUuid>(&d, uuid); } { v_construct<QUuid>(&d, uuid); }
@ -1552,7 +1555,6 @@ QVariant::QVariant(const QJsonDocument &jsonDocument)
: d(QMetaType::QJsonDocument) : d(QMetaType::QJsonDocument)
{ v_construct<QJsonDocument>(&d, jsonDocument); } { v_construct<QJsonDocument>(&d, jsonDocument); }
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
#endif // QT_NO_REGEXP
/*! /*!
Returns the storage type of the value stored in the variant. Returns the storage type of the value stored in the variant.
@ -2214,6 +2216,7 @@ QRegExp QVariant::toRegExp() const
} }
#endif #endif
#ifndef QT_BOOTSTRAPPED
/*! /*!
\fn QRegularExpression QVariant::toRegularExpression() const \fn QRegularExpression QVariant::toRegularExpression() const
\since 5.0 \since 5.0
@ -2223,13 +2226,12 @@ QRegExp QVariant::toRegExp() const
\sa canConvert(), convert() \sa canConvert(), convert()
*/ */
#ifndef QT_BOOTSTRAPPED #ifndef QT_NO_REGULAREXPRESSION
#ifndef QT_NO_REGEXP
QRegularExpression QVariant::toRegularExpression() const QRegularExpression QVariant::toRegularExpression() const
{ {
return qVariantToHelper<QRegularExpression>(d, handlerManager); return qVariantToHelper<QRegularExpression>(d, handlerManager);
} }
#endif #endif // QT_NO_REGULAREXPRESSION
/*! /*!
\since 5.0 \since 5.0

View File

@ -76,8 +76,10 @@ class QRect;
class QRectF; class QRectF;
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGEXP
class QRegExp; class QRegExp;
class QRegularExpression;
#endif // QT_NO_REGEXP #endif // QT_NO_REGEXP
#ifndef QT_NO_REGULAREXPRESSION
class QRegularExpression;
#endif // QT_NO_REGULAREXPRESSION
class QTextFormat; class QTextFormat;
class QTextLength; class QTextLength;
class QUrl; class QUrl;
@ -240,11 +242,11 @@ class Q_CORE_EXPORT QVariant
QVariant(const QLocale &locale); QVariant(const QLocale &locale);
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGEXP
QVariant(const QRegExp &regExp); QVariant(const QRegExp &regExp);
#ifndef QT_BOOTSRAPPED
QVariant(const QRegularExpression &re);
#endif // QT_BOOTSTRAPPED
#endif // QT_NO_REGEXP #endif // QT_NO_REGEXP
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGULAREXPRESSION
QVariant(const QRegularExpression &re);
#endif // QT_NO_REGULAREXPRESSION
QVariant(const QUrl &url); QVariant(const QUrl &url);
QVariant(const QEasingCurve &easing); QVariant(const QEasingCurve &easing);
QVariant(const QUuid &uuid); QVariant(const QUuid &uuid);
@ -253,7 +255,7 @@ class Q_CORE_EXPORT QVariant
QVariant(const QJsonObject &jsonObject); QVariant(const QJsonObject &jsonObject);
QVariant(const QJsonArray &jsonArray); QVariant(const QJsonArray &jsonArray);
QVariant(const QJsonDocument &jsonDocument); QVariant(const QJsonDocument &jsonDocument);
#endif #endif // QT_BOOTSTRAPPED
QVariant& operator=(const QVariant &other); QVariant& operator=(const QVariant &other);
#ifdef Q_COMPILER_RVALUE_REFS #ifdef Q_COMPILER_RVALUE_REFS
@ -313,11 +315,11 @@ class Q_CORE_EXPORT QVariant
QLocale toLocale() const; QLocale toLocale() const;
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGEXP
QRegExp toRegExp() const; QRegExp toRegExp() const;
#ifndef QT_BOOTSTRAPPED
QRegularExpression toRegularExpression() const;
#endif // QT_BOOTSTRAPPED
#endif // QT_NO_REGEXP #endif // QT_NO_REGEXP
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGULAREXPRESSION
QRegularExpression toRegularExpression() const;
#endif // QT_NO_REGULAREXPRESSION
QUrl toUrl() const; QUrl toUrl() const;
QEasingCurve toEasingCurve() const; QEasingCurve toEasingCurve() const;
QUuid toUuid() const; QUuid toUuid() const;
@ -326,7 +328,7 @@ class Q_CORE_EXPORT QVariant
QJsonObject toJsonObject() const; QJsonObject toJsonObject() const;
QJsonArray toJsonArray() const; QJsonArray toJsonArray() const;
QJsonDocument toJsonDocument() const; QJsonDocument toJsonDocument() const;
#endif #endif // QT_BOOTSTRAPPED
#ifndef QT_NO_DATASTREAM #ifndef QT_NO_DATASTREAM
void load(QDataStream &ds); void load(QDataStream &ds);

View File

@ -42,7 +42,7 @@
#ifndef QREGULAREXPRESSION_H #ifndef QREGULAREXPRESSION_H
#define QREGULAREXPRESSION_H #define QREGULAREXPRESSION_H
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
#include <QtCore/qstring.h> #include <QtCore/qstring.h>
#include <QtCore/qshareddata.h> #include <QtCore/qshareddata.h>
@ -241,6 +241,6 @@ QT_END_NAMESPACE
QT_END_HEADER QT_END_HEADER
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QREGULAREXPRESSION_H #endif // QREGULAREXPRESSION_H

View File

@ -2762,13 +2762,17 @@ int QString::lastIndexOf(const QStringRef &str, int from, Qt::CaseSensitivity cs
str.size(), cs); str.size(), cs);
} }
#ifndef QT_NO_REGEXP
#if !(defined(QT_NO_REGEXP) && defined(QT_NO_REGULAREXPRESSION))
struct QStringCapture struct QStringCapture
{ {
int pos; int pos;
int len; int len;
int no; int no;
}; };
#endif
#ifndef QT_NO_REGEXP
/*! /*!
\overload replace() \overload replace()
@ -2925,7 +2929,7 @@ QString& QString::replace(const QRegExp &rx, const QString &after)
} }
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
/*! /*!
\overload replace() \overload replace()
@ -3055,7 +3059,7 @@ QString &QString::replace(const QRegularExpression &re, const QString &after)
return *this; return *this;
} }
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
/*! /*!
Returns the number of (potentially overlapping) occurrences of Returns the number of (potentially overlapping) occurrences of
@ -3256,7 +3260,7 @@ int QString::count(const QRegExp& rx) const
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGEXP
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
/*! /*!
\overload indexOf() \overload indexOf()
@ -3366,7 +3370,7 @@ int QString::count(const QRegularExpression &re) const
return count; return count;
} }
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
/*! \fn int QString::count() const /*! \fn int QString::count() const
@ -3487,7 +3491,7 @@ QString QString::section(const QString &sep, int start, int end, SectionFlags fl
return ret; return ret;
} }
#ifndef QT_NO_REGEXP #if !(defined(QT_NO_REGEXP) && defined(QT_NO_REGULAREXPRESSION))
class qt_section_chunk { class qt_section_chunk {
public: public:
qt_section_chunk(int l, QString s) { length = l; string = s; } qt_section_chunk(int l, QString s) { length = l; string = s; }
@ -3537,7 +3541,9 @@ static QString extractSections(const QList<qt_section_chunk> &sections,
return ret; return ret;
} }
#endif
#ifndef QT_NO_REGEXP
/*! /*!
\overload section() \overload section()
@ -3575,7 +3581,7 @@ QString QString::section(const QRegExp &reg, int start, int end, SectionFlags fl
} }
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
/*! /*!
\overload section() \overload section()
@ -3621,7 +3627,7 @@ QString QString::section(const QRegularExpression &re, int start, int end, Secti
return extractSections(sections, start, end, flags); return extractSections(sections, start, end, flags);
} }
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
/*! /*!
Returns a substring that contains the \a n leftmost characters Returns a substring that contains the \a n leftmost characters
@ -6416,7 +6422,7 @@ QStringList QString::split(const QRegExp &rx, SplitBehavior behavior) const
} }
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
/*! /*!
\overload \overload
@ -6470,7 +6476,7 @@ QStringList QString::split(const QRegularExpression &re, SplitBehavior behavior)
return list; return list;
} }
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
/*! /*!
\enum QString::NormalizationForm \enum QString::NormalizationForm

View File

@ -335,7 +335,7 @@ public:
inline bool contains(QRegExp &rx) const { return indexOf(rx) != -1; } inline bool contains(QRegExp &rx) const { return indexOf(rx) != -1; }
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
int indexOf(const QRegularExpression &re, int from = 0) const; int indexOf(const QRegularExpression &re, int from = 0) const;
int lastIndexOf(const QRegularExpression &re, int from = -1) const; int lastIndexOf(const QRegularExpression &re, int from = -1) const;
bool contains(const QRegularExpression &re) const; bool contains(const QRegularExpression &re) const;
@ -356,7 +356,7 @@ public:
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGEXP
QString section(const QRegExp &reg, int start, int end = -1, SectionFlags flags = SectionDefault) const; QString section(const QRegExp &reg, int start, int end = -1, SectionFlags flags = SectionDefault) const;
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
QString section(const QRegularExpression &re, int start, int end = -1, SectionFlags flags = SectionDefault) const; QString section(const QRegularExpression &re, int start, int end = -1, SectionFlags flags = SectionDefault) const;
#endif #endif
QString left(int n) const Q_REQUIRED_RESULT; QString left(int n) const Q_REQUIRED_RESULT;
@ -432,7 +432,7 @@ public:
inline QString &remove(const QRegExp &rx) inline QString &remove(const QRegExp &rx)
{ return replace(rx, QString()); } { return replace(rx, QString()); }
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
QString &replace(const QRegularExpression &re, const QString &after); QString &replace(const QRegularExpression &re, const QString &after);
inline QString &remove(const QRegularExpression &re) inline QString &remove(const QRegularExpression &re)
{ return replace(re, QString()); } { return replace(re, QString()); }
@ -447,7 +447,7 @@ public:
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGEXP
QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT; QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT;
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
QStringList split(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT; QStringList split(const QRegularExpression &sep, SplitBehavior behavior = KeepEmptyParts) const Q_REQUIRED_RESULT;
#endif #endif
enum NormalizationForm { enum NormalizationForm {

View File

@ -320,7 +320,7 @@ QStringList QtPrivate::QStringList_filter(const QStringList *that, const QRegExp
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
/*! /*!
\fn QStringList QStringList::filter(const QRegularExpression &re) const \fn QStringList QStringList::filter(const QRegularExpression &re) const
\overload \overload
@ -338,7 +338,7 @@ QStringList QtPrivate::QStringList_filter(const QStringList *that, const QRegula
} }
return res; return res;
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
/*! /*!
@ -395,7 +395,7 @@ void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegExp &r
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
/*! /*!
\fn QStringList &QStringList::replaceInStrings(const QRegularExpression &re, const QString &after) \fn QStringList &QStringList::replaceInStrings(const QRegularExpression &re, const QString &after)
\overload \overload
@ -424,7 +424,7 @@ void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegularEx
for (int i = 0; i < that->size(); ++i) for (int i = 0; i < that->size(); ++i)
(*that)[i].replace(re, after); (*that)[i].replace(re, after);
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
/*! /*!
@ -619,7 +619,7 @@ int QtPrivate::QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
/*! /*!
\fn int QStringList::indexOf(const QRegularExpression &re, int from) const \fn int QStringList::indexOf(const QRegularExpression &re, int from) const
\overload \overload
@ -676,7 +676,7 @@ int QtPrivate::QStringList_lastIndexOf(const QStringList *that, const QRegularEx
} }
return -1; return -1;
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
/*! /*!

View File

@ -99,12 +99,12 @@ public:
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
inline QStringList filter(const QRegularExpression &re) const; inline QStringList filter(const QRegularExpression &re) const;
inline QStringList &replaceInStrings(const QRegularExpression &re, const QString &after); inline QStringList &replaceInStrings(const QRegularExpression &re, const QString &after);
inline int indexOf(const QRegularExpression &re, int from = 0) const; inline int indexOf(const QRegularExpression &re, int from = 0) const;
inline int lastIndexOf(const QRegularExpression &re, int from = -1) const; inline int lastIndexOf(const QRegularExpression &re, int from = -1) const;
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
#if !defined(Q_NO_USING_KEYWORD) #if !defined(Q_NO_USING_KEYWORD)
@ -141,12 +141,12 @@ namespace QtPrivate {
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
void Q_CORE_EXPORT QStringList_replaceInStrings(QStringList *that, const QRegularExpression &rx, const QString &after); void Q_CORE_EXPORT QStringList_replaceInStrings(QStringList *that, const QRegularExpression &rx, const QString &after);
QStringList Q_CORE_EXPORT QStringList_filter(const QStringList *that, const QRegularExpression &re); QStringList Q_CORE_EXPORT QStringList_filter(const QStringList *that, const QRegularExpression &re);
int Q_CORE_EXPORT QStringList_indexOf(const QStringList *that, const QRegularExpression &re, int from); int Q_CORE_EXPORT QStringList_indexOf(const QStringList *that, const QRegularExpression &re, int from);
int Q_CORE_EXPORT QStringList_lastIndexOf(const QStringList *that, const QRegularExpression &re, int from); int Q_CORE_EXPORT QStringList_lastIndexOf(const QStringList *that, const QRegularExpression &re, int from);
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
} }
@ -220,7 +220,7 @@ inline int QStringList::lastIndexOf(QRegExp &rx, int from) const
#endif #endif
#ifndef QT_BOOTSTRAPPED #ifndef QT_BOOTSTRAPPED
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
inline QStringList &QStringList::replaceInStrings(const QRegularExpression &rx, const QString &after) inline QStringList &QStringList::replaceInStrings(const QRegularExpression &rx, const QString &after)
{ {
QtPrivate::QStringList_replaceInStrings(this, rx, after); QtPrivate::QStringList_replaceInStrings(this, rx, after);
@ -241,7 +241,7 @@ inline int QStringList::lastIndexOf(const QRegularExpression &rx, int from) cons
{ {
return QtPrivate::QStringList_lastIndexOf(this, rx, from); return QtPrivate::QStringList_lastIndexOf(this, rx, from);
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QT_BOOTSTRAPPED #endif // QT_BOOTSTRAPPED
#ifndef QT_NO_DATASTREAM #ifndef QT_NO_DATASTREAM

View File

@ -502,9 +502,6 @@ void QIntValidator::setTop(int top)
setRange(bottom(), top); setRange(bottom(), top);
} }
#ifndef QT_NO_REGEXP
/*! /*!
\internal \internal
*/ */
@ -521,6 +518,8 @@ QValidator::QValidator(QValidatorPrivate &d, QObject *parent)
{ {
} }
#ifndef QT_NO_REGEXP
class QDoubleValidatorPrivate : public QValidatorPrivate class QDoubleValidatorPrivate : public QValidatorPrivate
{ {
Q_DECLARE_PUBLIC(QDoubleValidator) Q_DECLARE_PUBLIC(QDoubleValidator)
@ -907,7 +906,7 @@ void QRegExpValidator::setRegExp(const QRegExp& rx)
#endif #endif
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
/*! /*!
\class QRegularExpressionValidator \class QRegularExpressionValidator
@ -1058,7 +1057,7 @@ void QRegularExpressionValidatorPrivate::setRegularExpression(const QRegularExpr
} }
} }
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -197,7 +197,7 @@ private:
#endif // QT_NO_REGEXP #endif // QT_NO_REGEXP
#ifndef QT_NO_REGEXP #ifndef QT_NO_REGULAREXPRESSION
class QRegularExpressionValidatorPrivate; class QRegularExpressionValidatorPrivate;
@ -226,7 +226,7 @@ private:
Q_DECLARE_PRIVATE(QRegularExpressionValidator) Q_DECLARE_PRIVATE(QRegularExpressionValidator)
}; };
#endif // QT_NO_REGEXP #endif // QT_NO_REGULAREXPRESSION
#endif // QT_NO_VALIDATOR #endif // QT_NO_VALIDATOR