summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-06-28 23:19:29 +0200
committerQt by Nokia <qt-info@nokia.com>2011-06-29 15:10:14 +0200
commit7b46ec16017d5b467b2b04e9d7e27ce1cee8659e (patch)
treea4a26bff1329deac642fcd8234d15ffea0519d8e /src
parent28cf5c5356e0591e3d9f31b5df1f69ce9f514ad3 (diff)
remove QT3_SUPPORT from corelib/tools
Change-Id: Ie224cf992be675c7d405d4be05e4acd4157e590e Reviewed-on: http://codereview.qt.nokia.com/863 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qbytearray.h47
-rw-r--r--src/corelib/tools/qcache.h9
-rw-r--r--src/corelib/tools/qchar.h27
-rw-r--r--src/corelib/tools/qdatetime.h48
-rw-r--r--src/corelib/tools/qlinkedlist.h15
-rw-r--r--src/corelib/tools/qlist.h14
-rw-r--r--src/corelib/tools/qmap.h36
-rw-r--r--src/corelib/tools/qrect.h30
-rw-r--r--src/corelib/tools/qregexp.h33
-rw-r--r--src/corelib/tools/qstringlist.cpp36
-rw-r--r--src/corelib/tools/qstringlist.h51
11 files changed, 0 insertions, 346 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index 2cb79c3f51..9f54f1a831 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -110,19 +110,6 @@ Q_CORE_EXPORT int qstrnicmp(const char *, const char *, uint len);
Q_CORE_EXPORT int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap);
Q_CORE_EXPORT int qsnprintf(char *str, size_t n, const char *fmt, ...);
-#ifdef QT3_SUPPORT
-inline QT3_SUPPORT void *qmemmove(void *dst, const void *src, uint len)
-{ return memmove(dst, src, len); }
-inline QT3_SUPPORT uint cstrlen(const char *str)
-{ return uint(strlen(str)); }
-inline QT3_SUPPORT char *cstrcpy(char *dst, const char *src)
-{ return qstrcpy(dst,src); }
-inline QT3_SUPPORT int cstrcmp(const char *str1, const char *str2)
-{ return strcmp(str1,str2); }
-inline QT3_SUPPORT int cstrncmp(const char *str1, const char *str2, uint len)
-{ return strncmp(str1,str2,len); }
-#endif
-
// qChecksum: Internet checksum
Q_CORE_EXPORT quint16 qChecksum(const char *s, uint len);
@@ -234,13 +221,6 @@ public:
QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const;
QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const;
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT QByteArray leftJustify(uint width, char aFill = ' ', bool aTruncate = false) const
- { return leftJustified(int(width), aFill, aTruncate); }
- inline QT3_SUPPORT QByteArray rightJustify(uint width, char aFill = ' ', bool aTruncate = false) const
- { return rightJustified(int(width), aFill, aTruncate); }
-#endif
-
QByteArray &prepend(char c);
QByteArray &prepend(const char *s);
QByteArray &prepend(const char *s, int len);
@@ -356,29 +336,6 @@ public:
int length() const { return d->size; }
bool isNull() const;
- // compatibility
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QByteArray(int size);
- inline QT3_SUPPORT QByteArray& duplicate(const QByteArray& a) { *this = a; return *this; }
- inline QT3_SUPPORT QByteArray& duplicate(const char *a, uint n)
- { *this = QByteArray(a, n); return *this; }
- inline QT3_SUPPORT void resetRawData(const char *, uint) { clear(); }
- inline QT3_SUPPORT QByteArray lower() const { return toLower(); }
- inline QT3_SUPPORT QByteArray upper() const { return toUpper(); }
- inline QT3_SUPPORT QByteArray stripWhiteSpace() const { return trimmed(); }
- inline QT3_SUPPORT QByteArray simplifyWhiteSpace() const { return simplified(); }
- inline QT3_SUPPORT int find(char c, int from = 0) const { return indexOf(c, from); }
- inline QT3_SUPPORT int find(const char *c, int from = 0) const { return indexOf(c, from); }
- inline QT3_SUPPORT int find(const QByteArray &ba, int from = 0) const { return indexOf(ba, from); }
- inline QT3_SUPPORT int findRev(char c, int from = -1) const { return lastIndexOf(c, from); }
- inline QT3_SUPPORT int findRev(const char *c, int from = -1) const { return lastIndexOf(c, from); }
- inline QT3_SUPPORT int findRev(const QByteArray &ba, int from = -1) const { return lastIndexOf(ba, from); }
-#ifndef QT_NO_CAST_TO_ASCII
- QT3_SUPPORT int find(const QString &s, int from = 0) const;
- QT3_SUPPORT int findRev(const QString &s, int from = -1) const;
-#endif
-#endif
-
private:
operator QNoImplicitBoolCast() const;
static Data shared_null;
@@ -438,10 +395,6 @@ inline bool QByteArray::isDetached() const
{ return d->ref == 1; }
inline QByteArray::QByteArray(const QByteArray &a) : d(a.d)
{ d->ref.ref(); }
-#ifdef QT3_SUPPORT
-inline QByteArray::QByteArray(int aSize) : d(&shared_null)
-{ d->ref.ref(); if (aSize > 0) fill('\0', aSize); }
-#endif
inline int QByteArray::capacity() const
{ return d->alloc; }
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index 16861c9869..c42a908f5c 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -96,10 +96,6 @@ class QCache
public:
inline explicit QCache(int maxCost = 100);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT_CONSTRUCTOR QCache(int maxCost, int /* dummy */)
- : f(0), l(0), mx(maxCost), total(0) {}
-#endif
inline ~QCache() { clear(); }
inline int maxCost() const { return mx; }
@@ -123,11 +119,6 @@ public:
private:
void trim(int m);
-
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT T *find(const Key &key) const { return object(key); }
-#endif
-
};
template <class Key, class T>
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h
index 3ec53bd18e..b7793403bd 100644
--- a/src/corelib/tools/qchar.h
+++ b/src/corelib/tools/qchar.h
@@ -89,13 +89,6 @@ public:
ObjectReplacementCharacter = 0xfffc,
ByteOrderMark = 0xfeff,
ByteOrderSwapped = 0xfffe,
-#ifdef QT3_SUPPORT
- null = Null,
- replacement = ReplacementCharacter,
- byteOrderMark = ByteOrderMark,
- byteOrderSwapped = ByteOrderSwapped,
- nbsp = Nbsp,
-#endif
ParagraphSeparator = 0x2029,
LineSeparator = 0x2028
};
@@ -173,10 +166,6 @@ public:
Square,
Compat,
Fraction
-
-#ifdef QT3_SUPPORT
- , Single = NoDecomposition
-#endif
};
enum Joining
@@ -338,22 +327,6 @@ public:
static QString QT_FASTCALL decomposition(uint ucs4);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT bool mirrored() const { return hasMirrored(); }
- inline QT3_SUPPORT QChar lower() const { return toLower(); }
- inline QT3_SUPPORT QChar upper() const { return toUpper(); }
- static inline QT3_SUPPORT bool networkOrdered() {
- return QSysInfo::ByteOrder == QSysInfo::BigEndian;
- }
-#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
- inline QT3_SUPPORT const char latin1() const { return toLatin1(); }
- inline QT3_SUPPORT const char ascii() const { return toAscii(); }
-#else
- inline QT3_SUPPORT char latin1() const { return toLatin1(); }
- inline QT3_SUPPORT char ascii() const { return toAscii(); }
-#endif
-#endif
-
private:
#ifdef QT_NO_CAST_FROM_ASCII
QChar(char c);
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index be14df7841..62bdcab7cc 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -76,10 +76,6 @@ public:
int weekNumber(int *yearNum = 0) const;
#ifndef QT_NO_TEXTDATE
-#ifdef QT3_SUPPORT
- static QT3_SUPPORT QString monthName(int month) { return shortMonthName(month); }
- static QT3_SUPPORT QString dayName(int weekday) { return shortDayName(weekday); }
-#endif
// ### Qt 5: merge these functions.
static QString shortMonthName(int month);
static QString shortMonthName(int month, MonthNameType type);
@@ -118,18 +114,11 @@ public:
#endif
static bool isValid(int y, int m, int d);
static bool isLeapYear(int year);
-#ifdef QT3_SUPPORT
- inline static QT3_SUPPORT bool leapYear(int year) { return isLeapYear(year); }
-#endif
// ### Qt 5: remove these two functions
static uint gregorianToJulian(int y, int m, int d);
static void julianToGregorian(uint jd, int &y, int &m, int &d);
-#ifdef QT3_SUPPORT
- static QT3_SUPPORT QDate currentDate(Qt::TimeSpec spec);
-#endif
-
static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; }
inline int toJulianDay() const { return jd; }
@@ -187,10 +176,6 @@ public:
#endif
static bool isValid(int h, int m, int s, int ms = 0);
-#ifdef QT3_SUPPORT
- static QT3_SUPPORT QTime currentTime(Qt::TimeSpec spec);
-#endif
-
void start();
int restart();
int elapsed() const;
@@ -273,21 +258,6 @@ public:
static QDateTime fromMSecsSinceEpoch(qint64 msecs);
static qint64 currentMSecsSinceEpoch();
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT void setTime_t(uint secsSince1Jan1970UTC, Qt::TimeSpec spec) {
- setTime_t(secsSince1Jan1970UTC);
- if (spec == Qt::UTC)
- *this = toUTC();
- }
- static inline QT3_SUPPORT QDateTime currentDateTime(Qt::TimeSpec spec) {
- if (spec == Qt::LocalTime)
- return currentDateTime();
- else
- return currentDateTime().toUTC();
- }
-
-#endif
-
private:
friend class QDateTimePrivate;
void detach();
@@ -300,24 +270,6 @@ private:
};
Q_DECLARE_TYPEINFO(QDateTime, Q_MOVABLE_TYPE);
-#ifdef QT3_SUPPORT
-inline QDate QDate::currentDate(Qt::TimeSpec spec)
-{
- if (spec == Qt::LocalTime)
- return currentDate();
- else
- return QDateTime::currentDateTime().toUTC().date();
-}
-
-inline QTime QTime::currentTime(Qt::TimeSpec spec)
-{
- if (spec == Qt::LocalTime)
- return currentTime();
- else
- return QDateTime::currentDateTime().toUTC().time();
-}
-#endif
-
#ifndef QT_NO_DATASTREAM
Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QDate &);
Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QDate &);
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index 18afb29e9e..9f2834a7d7 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -227,21 +227,6 @@ public:
{ std::list<T> tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; }
#endif
-#ifdef QT3_SUPPORT
- // compatibility
- inline QT3_SUPPORT iterator remove(iterator pos) { return erase(pos); }
- inline QT3_SUPPORT int findIndex(const T& t) const
- { int i=0; for (const_iterator it = begin(); it != end(); ++it, ++i) if(*it == t) return i; return -1;}
- inline QT3_SUPPORT iterator find(iterator from, const T& t)
- { while (from != end() && !(*from == t)) ++from; return from; }
- inline QT3_SUPPORT iterator find(const T& t)
- { return find(begin(), t); }
- inline QT3_SUPPORT const_iterator find(const_iterator from, const T& t) const
- { while (from != end() && !(*from == t)) ++from; return from; }
- inline QT3_SUPPORT const_iterator find(const T& t) const
- { return find(begin(), t); }
-#endif
-
// comfort
QLinkedList<T> &operator+=(const QLinkedList<T> &l);
QLinkedList<T> operator+(const QLinkedList<T> &l) const;
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 4eb05d63b6..f8f62cc8b2 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -310,20 +310,6 @@ public:
typedef const value_type &const_reference;
typedef qptrdiff difference_type;
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT iterator remove(iterator pos) { return erase(pos); }
- inline QT3_SUPPORT int remove(const T &t) { return removeAll(t); }
- inline QT3_SUPPORT int findIndex(const T& t) const { return indexOf(t); }
- inline QT3_SUPPORT iterator find(const T& t)
- { int i = indexOf(t); return (i == -1 ? end() : (begin()+i)); }
- inline QT3_SUPPORT const_iterator find (const T& t) const
- { int i = indexOf(t); return (i == -1 ? end() : (begin()+i)); }
- inline QT3_SUPPORT iterator find(iterator from, const T& t)
- { int i = indexOf(t, from - begin()); return i == -1 ? end() : begin()+i; }
- inline QT3_SUPPORT const_iterator find(const_iterator from, const T& t) const
- { int i = indexOf(t, from - begin()); return i == -1 ? end() : begin()+i; }
-#endif
-
// comfort
QList<T> &operator+=(const QList<T> &l);
inline QList<T> operator+(const QList<T> &l) const
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index 39b3eb8af1..36d8eefbdb 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -249,9 +249,6 @@ public:
inline const Key &key() const { return concrete(i)->key; }
inline T &value() const { return concrete(i)->value; }
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT T &data() const { return concrete(i)->value; }
-#endif
inline T &operator*() const { return concrete(i)->value; }
inline T *operator->() const { return &concrete(i)->value; }
inline bool operator==(const iterator &o) const { return i == o.i; }
@@ -323,9 +320,6 @@ public:
inline const Key &key() const { return concrete(i)->key; }
inline const T &value() const { return concrete(i)->value; }
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT const T &data() const { return concrete(i)->value; }
-#endif
inline const T &operator*() const { return concrete(i)->value; }
inline const T *operator->() const { return &concrete(i)->value; }
inline bool operator==(const const_iterator &o) const { return i == o.i; }
@@ -379,10 +373,6 @@ public:
inline const_iterator end() const { return const_iterator(e); }
inline const_iterator constEnd() const { return const_iterator(e); }
iterator erase(iterator it);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT iterator remove(iterator it) { return erase(it); }
- inline QT3_SUPPORT void erase(const Key &aKey) { remove(aKey); }
-#endif
// more Qt
typedef iterator Iterator;
@@ -396,13 +386,7 @@ public:
iterator upperBound(const Key &key);
const_iterator upperBound(const Key &key) const;
iterator insert(const Key &key, const T &value);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT iterator insert(const Key &key, const T &value, bool overwrite);
-#endif
iterator insertMulti(const Key &key, const T &value);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT iterator replace(const Key &aKey, const T &aValue) { return insert(aKey, aValue); }
-#endif
QMap<Key, T> &unite(const QMap<Key, T> &other);
// STL compatibility
@@ -571,26 +555,6 @@ Q_INLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::insert(const Key
return iterator(node);
}
-#ifdef QT3_SUPPORT
-template <class Key, class T>
-Q_INLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::insert(const Key &akey,
- const T &avalue,
- bool aoverwrite)
-{
- detach();
-
- QMapData::Node *update[QMapData::LastLevel + 1];
- QMapData::Node *node = mutableFindNode(update, akey);
- if (node == e) {
- node = node_create(d, update, akey, avalue);
- } else {
- if (aoverwrite)
- concrete(node)->value = avalue;
- }
- return iterator(node);
-}
-#endif
-
template <class Key, class T>
Q_INLINE_TEMPLATE typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const Key &akey,
const T &avalue)
diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h
index cbed04f628..5d6db9867e 100644
--- a/src/corelib/tools/qrect.h
+++ b/src/corelib/tools/qrect.h
@@ -73,15 +73,6 @@ public:
int bottom() const;
QRect normalized() const;
-#ifdef QT3_SUPPORT
- QT3_SUPPORT int &rLeft() { return x1; }
- QT3_SUPPORT int &rTop() { return y1; }
- QT3_SUPPORT int &rRight() { return x2; }
- QT3_SUPPORT int &rBottom() { return y2; }
-
- QT3_SUPPORT QRect normalize() const { return normalized(); }
-#endif
-
int x() const;
int y() const;
void setLeft(int pos);
@@ -120,18 +111,10 @@ public:
void moveTo(int x, int t);
void moveTo(const QPoint &p);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT void moveBy(int dx, int dy) { translate(dx, dy); }
- QT3_SUPPORT void moveBy(const QPoint &p) { translate(p); }
-#endif
-
void setRect(int x, int y, int w, int h);
inline void getRect(int *x, int *y, int *w, int *h) const;
void setCoords(int x1, int y1, int x2, int y2);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT void addCoords(int x1, int y1, int x2, int y2);
-#endif
inline void getCoords(int *x1, int *y1, int *x2, int *y2) const;
inline void adjust(int x1, int y1, int x2, int y2);
@@ -162,12 +145,6 @@ public:
friend Q_CORE_EXPORT_INLINE bool operator==(const QRect &, const QRect &);
friend Q_CORE_EXPORT_INLINE bool operator!=(const QRect &, const QRect &);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT void rect(int *x, int *y, int *w, int *h) const { getRect(x, y, w, h); }
- inline QT3_SUPPORT void coords(int *ax1, int *ay1, int *ax2, int *ay2) const
- { getCoords(ax1, ay1, ax2, ay2); }
-#endif
-
private:
#if defined(Q_WS_X11)
friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2);
@@ -421,13 +398,6 @@ inline void QRect::setCoords(int xp1, int yp1, int xp2, int yp2)
y2 = yp2;
}
-#ifdef QT3_SUPPORT
-inline void QRect::addCoords(int dx1, int dy1, int dx2, int dy2)
-{
- adjust(dx1, dy1, dx2, dy2);
-}
-#endif
-
inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const
{ return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); }
diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h
index 12e42a95b7..4ce2f6e0be 100644
--- a/src/corelib/tools/qregexp.h
+++ b/src/corelib/tools/qregexp.h
@@ -45,9 +45,6 @@
#ifndef QT_NO_REGEXP
#include <QtCore/qstring.h>
-#ifdef QT3_SUPPORT
-#include <new>
-#endif
QT_BEGIN_HEADER
@@ -91,37 +88,16 @@ public:
void setPattern(const QString &pattern);
Qt::CaseSensitivity caseSensitivity() const;
void setCaseSensitivity(Qt::CaseSensitivity cs);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT bool caseSensitive() const { return caseSensitivity() == Qt::CaseSensitive; }
- inline QT3_SUPPORT void setCaseSensitive(bool sensitive)
- { setCaseSensitivity(sensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); }
-#endif
PatternSyntax patternSyntax() const;
void setPatternSyntax(PatternSyntax syntax);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT bool wildcard() const { return patternSyntax() == Wildcard; }
- inline QT3_SUPPORT void setWildcard(bool aWildcard)
- { setPatternSyntax(aWildcard ? Wildcard : RegExp); }
-#endif
bool isMinimal() const;
void setMinimal(bool minimal);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT bool minimal() const { return isMinimal(); }
-#endif
bool exactMatch(const QString &str) const;
int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const;
int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const;
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT int search(const QString &str, int from = 0,
- CaretMode caretMode = CaretAtZero) const
- { return indexIn(str, from, caretMode); }
- inline QT3_SUPPORT int searchRev(const QString &str, int from = -1,
- CaretMode caretMode = CaretAtZero) const
- { return lastIndexIn(str, from, caretMode); }
-#endif
int matchedLength() const;
#ifndef QT_NO_REGEXP_CAPTURE
#ifdef QT_DEPRECATED
@@ -140,15 +116,6 @@ public:
static QString escape(const QString &str);
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT_CONSTRUCTOR QRegExp(const QString &aPattern, bool cs, bool aWildcard = false)
- {
- new (this)
- QRegExp(aPattern, cs ? Qt::CaseSensitive : Qt::CaseInsensitive,
- aWildcard ? Wildcard : RegExp);
- }
-#endif
-
private:
QRegExpPrivate *priv;
};
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index 8b47137fd8..44cc692b2f 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -234,42 +234,6 @@ void QtPrivate::QStringList_sort(QStringList *that)
}
-#ifdef QT3_SUPPORT
-/*!
- \fn QStringList QStringList::split(const QChar &sep, const QString &str, bool allowEmptyEntries)
-
- \overload
-
- This version of the function uses a QChar as separator.
-
- \sa join() QString::section()
-*/
-
-/*!
- \fn QStringList QStringList::split(const QString &sep, const QString &str, bool allowEmptyEntries)
-
- \overload
-
- This version of the function uses a QString as separator.
-
- \sa join() QString::section()
-*/
-#ifndef QT_NO_REGEXP
-/*!
- \fn QStringList QStringList::split(const QRegExp &sep, const QString &str, bool allowEmptyEntries)
-
- Use QString::split(\a sep, QString::SkipEmptyParts) or
- QString::split(\a sep, QString::KeepEmptyParts) instead.
-
- Be aware that the QString::split()'s return value is a
- QStringList that always contains at least one element, even if \a
- str is empty.
-
- \sa join() QString::section()
-*/
-#endif
-#endif // QT3_SUPPORT
-
/*!
\fn QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const
diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h
index 2159512b20..efb7f46c9b 100644
--- a/src/corelib/tools/qstringlist.h
+++ b/src/corelib/tools/qstringlist.h
@@ -48,9 +48,6 @@
#include <QtCore/qregexp.h>
#include <QtCore/qstring.h>
#include <QtCore/qstringmatcher.h>
-#ifdef QT_INCLUDE_COMPAT
-#include <Qt3Support/q3valuelist.h>
-#endif
QT_BEGIN_HEADER
@@ -108,24 +105,6 @@ public:
inline int lastIndexOf(const QString &str, int from = -1) const
{ return QList<QString>::lastIndexOf(str, from); }
#endif
-#ifdef QT3_SUPPORT
- static inline QT3_SUPPORT QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries = false);
- static inline QT3_SUPPORT QStringList split(const QChar &sep, const QString &str, bool allowEmptyEntries = false);
- inline QT3_SUPPORT QStringList grep(const QString &str, bool cs = true) const
- { return filter(str, cs ? Qt::CaseSensitive : Qt::CaseInsensitive); }
-
-#ifndef QT_NO_REGEXP
- static inline QT3_SUPPORT QStringList split(const QRegExp &sep, const QString &str, bool allowEmptyEntries = false);
- inline QT3_SUPPORT QStringList grep(const QRegExp &rx) const { return filter(rx); }
- inline QT3_SUPPORT QStringList &gres(const QRegExp &rx, const QString &after)
- { return replaceInStrings(rx, after); }
-#endif
- inline QT3_SUPPORT QStringList &gres(const QString &before, const QString &after, bool cs = true)
- { return replaceInStrings(before, after, cs ? Qt::CaseSensitive : Qt::CaseInsensitive); }
-
- inline Iterator QT3_SUPPORT fromLast() { return (isEmpty() ? end() : --end()); }
- inline ConstIterator QT3_SUPPORT fromLast() const { return (isEmpty() ? end() : --end()); }
-#endif
};
namespace QtPrivate {
@@ -214,36 +193,6 @@ inline int QStringList::lastIndexOf(QRegExp &rx, int from) const
#endif
-#ifdef QT3_SUPPORT
-inline QStringList QStringList::split(const QChar &sep, const QString &str, bool allowEmptyEntries)
-{
- if (str.isEmpty())
- return QStringList();
- return str.split(sep, allowEmptyEntries ? QString::KeepEmptyParts
- : QString::SkipEmptyParts);
-}
-
-inline QStringList QStringList::split(const QString &sep, const QString &str, bool allowEmptyEntries)
-{
- if (str.isEmpty())
- return QStringList();
- return str.split(sep, allowEmptyEntries ? QString::KeepEmptyParts
- : QString::SkipEmptyParts);
-}
-
-#ifndef QT_NO_REGEXP
-inline QStringList QStringList::split(const QRegExp &sep, const QString &str, bool allowEmptyEntries)
-{
- if (str.isEmpty())
- return QStringList();
- return str.split(sep, allowEmptyEntries ? QString::KeepEmptyParts
- : QString::SkipEmptyParts);
-}
-#endif // QT_NO_REGEXP
-
-#endif // QT3_SUPPORT
-
-
#ifndef QT_NO_DATASTREAM
inline QDataStream &operator>>(QDataStream &in, QStringList &list)
{