From b11317a64339f5a4bcffc8234ecaf15c7fb416f2 Mon Sep 17 00:00:00 2001 From: Axel Waggershauser Date: Fri, 15 Mar 2013 00:42:15 +0100 Subject: Whitespace cleanup: remove trailing whitespace Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qalgorithms.qdoc | 20 +++++++++---------- src/corelib/tools/qbitarray.cpp | 6 +++--- src/corelib/tools/qbytearray.cpp | 32 +++++++++++++++---------------- src/corelib/tools/qcontiguouscache.cpp | 4 ++-- src/corelib/tools/qcryptographichash.cpp | 4 ++-- src/corelib/tools/qhash.cpp | 2 +- src/corelib/tools/qiterator.qdoc | 24 +++++++++++------------ src/corelib/tools/qline.cpp | 6 +++--- src/corelib/tools/qmargins.cpp | 2 +- src/corelib/tools/qpair.qdoc | 2 +- src/corelib/tools/qregexp.cpp | 2 +- src/corelib/tools/qringbuffer_p.h | 2 +- src/corelib/tools/qset.qdoc | 20 +++++++++---------- src/corelib/tools/qshareddata.cpp | 6 +++--- src/corelib/tools/qtextboundaryfinder.cpp | 2 +- src/corelib/tools/qvector.cpp | 2 +- 16 files changed, 68 insertions(+), 68 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index b4558722cb..cc544af868 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -70,7 +70,7 @@ \snippet code/doc_src_qalgorithms.cpp 1 Different algorithms can have different requirements for the - iterators they accept. For example, qFill() accepts two + iterators they accept. For example, qFill() accepts two \l {forward iterators}. The iterator types required are specified for each algorithm. If an iterator of the wrong type is passed (for example, if QList::ConstIterator is passed as an \l {output @@ -369,7 +369,7 @@ of \a value in the variable passed as a reference in argument \a n. This is the same as qSort(\a{container}.begin(), \a{container}.end()); */ -/*! +/*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end) \relates @@ -393,7 +393,7 @@ of \a value in the variable passed as a reference in argument \a n. \sa qSort(), {random access iterators} */ -/*! +/*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan) \relates @@ -406,7 +406,7 @@ of \a value in the variable passed as a reference in argument \a n. in case-insensitive alphabetical order: \snippet code/doc_src_qalgorithms.cpp 16 - + Note that earlier versions of Qt allowed using a lessThan function that took its arguments by non-const reference. From 4.3 and on this is no longer possible, the arguments has to be passed by const reference or value. @@ -423,7 +423,7 @@ of \a value in the variable passed as a reference in argument \a n. property is often useful when sorting user-visible data. */ -/*! +/*! \fn void qStableSort(Container &container) \relates @@ -470,7 +470,7 @@ of \a value in the variable passed as a reference in argument \a n. specified by the \a lessThan object. */ -/*! +/*! \fn void qLowerBound(const Container &container, const T &value) \relates @@ -520,7 +520,7 @@ of \a value in the variable passed as a reference in argument \a n. specified by the \a lessThan object. */ -/*! +/*! \fn void qUpperBound(const Container &container, const T &value) \relates @@ -568,7 +568,7 @@ of \a value in the variable passed as a reference in argument \a n. specified by the \a lessThan object. */ -/*! +/*! \fn void qBinaryFind(const Container &container, const T &value) \relates @@ -578,7 +578,7 @@ of \a value in the variable passed as a reference in argument \a n. */ -/*! +/*! \fn void qDeleteAll(ForwardIterator begin, ForwardIterator end) \relates @@ -601,7 +601,7 @@ of \a value in the variable passed as a reference in argument \a n. \sa {forward iterators} */ -/*! +/*! \fn void qDeleteAll(const Container &c) \relates diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp index 66ae7d21c2..2b459b2b1b 100644 --- a/src/corelib/tools/qbitarray.cpp +++ b/src/corelib/tools/qbitarray.cpp @@ -173,7 +173,7 @@ int QBitArray::count(bool on) const while (len >= 24) { quint32 v = quint32(bits[0]) | (quint32(bits[1]) << 8) | (quint32(bits[2]) << 16); quint32 c = ((v & 0xfff) * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f; - c += (((v & 0xfff000) >> 12) * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f; + c += (((v & 0xfff000) >> 12) * Q_UINT64_C(0x1001001001001) & Q_UINT64_C(0x84210842108421)) % 0x1f; len -= 24; bits += 3; numBits += int(c); @@ -467,7 +467,7 @@ QBitArray &QBitArray::operator&=(const QBitArray &other) resize(qMax(size(), other.size())); uchar *a1 = reinterpret_cast(d.data()) + 1; const uchar *a2 = reinterpret_cast(other.d.constData()) + 1; - int n = other.d.size() -1 ; + int n = other.d.size() -1 ; int p = d.size() - 1 - n; while (n-- > 0) *a1++ &= *a2++; @@ -496,7 +496,7 @@ QBitArray &QBitArray::operator|=(const QBitArray &other) resize(qMax(size(), other.size())); uchar *a1 = reinterpret_cast(d.data()) + 1; const uchar *a2 = reinterpret_cast(other.d.constData()) + 1; - int n = other.d.size() - 1; + int n = other.d.size() - 1; while (n-- > 0) *a1++ |= *a2++; return *this; diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 950d291986..dc3f5f3be9 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -397,7 +397,7 @@ static const quint16 crc_tbl[16] = { 0xc60c, 0xd68d, 0xe70e, 0xf78f }; -/*! +/*! \relates QByteArray Returns the CRC-16 checksum of the first \a len bytes of \a data. @@ -422,7 +422,7 @@ quint16 qChecksum(const char *data, uint len) return ~crc & 0xffff; } -/*! +/*! \fn QByteArray qCompress(const QByteArray& data, int compressionLevel) \relates QByteArray @@ -1370,7 +1370,7 @@ QByteArray::QByteArray(int size, char ch) } /*! - \internal + \internal Constructs a byte array of size \a size with uninitialized contents. */ @@ -1904,7 +1904,7 @@ QByteArray &QByteArray::replace(const QByteArray &before, const QByteArray &afte QByteArray aft = after; if (after.d == d) aft.detach(); - + return replace(before.constData(), before.size(), aft.constData(), aft.size()); } @@ -1921,7 +1921,7 @@ QByteArray &QByteArray::replace(const char *c, const QByteArray &after) QByteArray aft = after; if (after.d == d) aft.detach(); - + return replace(c, qstrlen(c), aft.constData(), aft.size()); } @@ -1954,7 +1954,7 @@ QByteArray &QByteArray::replace(const char *before, int bsize, const char *after memcpy(copy, before, bsize); b = copy; } - + QByteArrayMatcher matcher(before, bsize); int index = 0; int len = d->size; @@ -2044,8 +2044,8 @@ QByteArray &QByteArray::replace(const char *before, int bsize, const char *after ::free((char *)a); if (b != before) ::free((char *)b); - - + + return *this; } @@ -2274,7 +2274,7 @@ int QByteArray::indexOf(const char *c, int from) const const int ol = qstrlen(c); if (ol == 1) return indexOf(*c, from); - + const int l = d->size; if (from > d->size || ol + from > l) return -1; @@ -3580,7 +3580,7 @@ QByteArray QByteArray::toBase64() const return tmp; } -/*! +/*! \fn QByteArray &QByteArray::setNum(int n, int base) Sets the byte array to the printed value of \a n in base \a base (10 @@ -3597,21 +3597,21 @@ QByteArray QByteArray::toBase64() const \sa number(), toInt() */ -/*! +/*! \fn QByteArray &QByteArray::setNum(uint n, int base) \overload \sa toUInt() */ -/*! +/*! \fn QByteArray &QByteArray::setNum(short n, int base) \overload \sa toShort() */ -/*! +/*! \fn QByteArray &QByteArray::setNum(ushort n, int base) \overload @@ -3677,7 +3677,7 @@ QByteArray &QByteArray::setNum(qulonglong n, int base) return *this; } -/*! +/*! \overload Sets the byte array to the printed value of \a n, formatted in format @@ -3736,7 +3736,7 @@ QByteArray &QByteArray::setNum(double n, char f, int prec) return *this; } -/*! +/*! \fn QByteArray &QByteArray::setNum(float n, char f, int prec) \overload @@ -3806,7 +3806,7 @@ QByteArray QByteArray::number(qulonglong n, int base) return s; } -/*! +/*! \overload Returns a byte array that contains the printed value of \a n, diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp index bfef234ae4..b92c4d3fe9 100644 --- a/src/corelib/tools/qcontiguouscache.cpp +++ b/src/corelib/tools/qcontiguouscache.cpp @@ -313,8 +313,8 @@ MyRecord record(int row) const In most cases it is better to use either at() or insert(). - \note This non-const overload of operator[] requires QContiguousCache - to make a deep copy. Use at() for read-only access to a non-const + \note This non-const overload of operator[] requires QContiguousCache + to make a deep copy. Use at() for read-only access to a non-const QContiguousCache. \sa insert(), at() diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index fdf2d1a620..32f5f0b33a 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -308,7 +308,7 @@ void QCryptographicHash::addData(const char *data, int length) sha3Update(&d->sha3Context, reinterpret_cast(data), length*8); break; #endif - } + } d->result.clear(); } @@ -350,7 +350,7 @@ bool QCryptographicHash::addData(QIODevice* device) */ QByteArray QCryptographicHash::result() const { - if (!d->result.isEmpty()) + if (!d->result.isEmpty()) return d->result; switch (d->method) { diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index b8cd076cb6..ed756cbeb6 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -574,7 +574,7 @@ void QHashData::checkSanity() \fn uint qHash(const QPair &key, uint seed = 0) \since 5.0 \relates QHash - + Returns the hash value for the \a key, using \a seed to seed the calculation. Types \c T1 and \c T2 must be supported by qHash(). diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc index 798d25e050..25914967a9 100644 --- a/src/corelib/tools/qiterator.qdoc +++ b/src/corelib/tools/qiterator.qdoc @@ -25,7 +25,7 @@ ** ****************************************************************************/ -/*! +/*! \class QListIterator \inmodule QtCore @@ -78,7 +78,7 @@ \sa QMutableListIterator, QList::const_iterator */ -/*! +/*! \class QLinkedListIterator \inmodule QtCore @@ -126,7 +126,7 @@ \sa QMutableLinkedListIterator, QLinkedList::const_iterator */ -/*! +/*! \class QVectorIterator \inmodule QtCore \brief The QVectorIterator class provides a Java-style const iterator for QVector and QStack. @@ -178,7 +178,7 @@ \sa QMutableVectorIterator, QVector::const_iterator */ -/*! +/*! \class QSetIterator \inmodule QtCore \brief The QSetIterator class provides a Java-style const iterator for QSet. @@ -225,7 +225,7 @@ \sa QMutableSetIterator, QSet::const_iterator */ -/*! +/*! \class QMutableListIterator \inmodule QtCore @@ -291,7 +291,7 @@ \sa QListIterator, QList::iterator */ -/*! +/*! \class QMutableLinkedListIterator \inmodule QtCore @@ -352,7 +352,7 @@ \sa QLinkedListIterator, QLinkedList::iterator */ -/*! +/*! \class QMutableVectorIterator \inmodule QtCore @@ -418,7 +418,7 @@ \sa QVectorIterator, QVector::iterator */ -/*! +/*! \class QMutableSetIterator \inmodule QtCore \since 4.2 @@ -869,7 +869,7 @@ \sa remove(), setValue() */ -/*! +/*! \class QMapIterator \inmodule QtCore @@ -921,7 +921,7 @@ \sa QMutableMapIterator, QMap::const_iterator */ -/*! +/*! \class QHashIterator \inmodule QtCore @@ -973,7 +973,7 @@ \sa QMutableHashIterator, QHash::const_iterator */ -/*! +/*! \class QMutableMapIterator \inmodule QtCore @@ -1038,7 +1038,7 @@ \sa QMapIterator, QMap::iterator */ -/*! +/*! \class QMutableHashIterator \inmodule QtCore diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index 5d8368e930..3fb958fae6 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -374,7 +374,7 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) \value UnboundedIntersection The two lines intersect, but not within the range defined by their lengths. This will be the case - if the lines are not parallel. + if the lines are not parallel. intersect() will also return this value if the intersect point is within the start and end point of only one of the lines. @@ -499,9 +499,9 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) Sets the length of the line to the given \a length. QLineF will move the end point - p2() - of the line to give the line its new length. - + If the line is a null line, the length will remain zero regardless - of the length specified. + of the length specified. \sa length(), isNull() */ diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp index 6e7b541110..2cdc3f3f03 100644 --- a/src/corelib/tools/qmargins.cpp +++ b/src/corelib/tools/qmargins.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE \ingroup painting \since 4.6 - \brief The QMargins class defines the four margins of a rectangle. + \brief The QMargins class defines the four margins of a rectangle. QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle. diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc index 55353dc258..b0caf1aaf0 100644 --- a/src/corelib/tools/qpair.qdoc +++ b/src/corelib/tools/qpair.qdoc @@ -31,7 +31,7 @@ \brief The QPair class is a template class that stores a pair of items. \ingroup tools - + QPair\ can be used in your application if the STL \c pair type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index cbb3580024..83e87ff637 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -298,7 +298,7 @@ int qFindString(const QChar *haystack, int haystackLen, int from, Square brackets mean match any character contained in the square brackets. The character set abbreviations described above can appear in a character set in square brackets. Except for the - character set abbreviations and the following two exceptions, + character set abbreviations and the following two exceptions, characters do not have special meanings in square brackets. \table diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h index 9c952fea21..b17c6d2f40 100644 --- a/src/corelib/tools/qringbuffer_p.h +++ b/src/corelib/tools/qringbuffer_p.h @@ -375,7 +375,7 @@ public: --tailBuffer; } bufferSize -= qba.length(); - return qba; + return qba; } // append a new buffer to the end diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc index cd90b4949b..c1351943e1 100644 --- a/src/corelib/tools/qset.qdoc +++ b/src/corelib/tools/qset.qdoc @@ -130,7 +130,7 @@ \fn QSet &QSet::operator=(const QSet &other) Assigns the \a other set to this set and returns a reference to - this set. + this set. */ /*! @@ -306,7 +306,7 @@ Returns a non-const iterator positioned at the item \a value in the set. If the set contains no item \a value, the function - returns end(). + returns end(). */ /*! \fn QSet::const_iterator QSet::constFind(const T &value) const @@ -351,7 +351,7 @@ \overload Returns a non-const \l{STL-style iterators}{STL-style iterator} positioned at the first - item in the set. + item in the set. */ /*! \fn QSet::const_iterator QSet::cbegin() const @@ -496,7 +496,7 @@ /*! \fn QSet &QSet::subtract(const QSet &other) - Removes all items from this set that are contained in the + Removes all items from this set that are contained in the \a other set. Returns a reference to this set. \sa operator-=(), unite(), intersect() @@ -506,7 +506,7 @@ \fn bool QSet::empty() const Returns true if the set is empty. This function is provided - for STL compatibility. It is equivalent to isEmpty(). + for STL compatibility. It is equivalent to isEmpty(). */ /*! @@ -529,7 +529,7 @@ /*! \fn QSet &QSet::operator-=(const T &value) - Removes the occurrence of item \a value from the set, if + Removes the occurrence of item \a value from the set, if it is found, and returns a reference to the set. If the \a value is not contained the set, nothing is removed. @@ -559,7 +559,7 @@ \overload Same as intersect(\e{other}), if we consider \e{other} to be a set - that contains the singleton \a value. + that contains the singleton \a value. */ @@ -575,7 +575,7 @@ \fn QSet QSet::operator|(const QSet &other) const \fn QSet QSet::operator+(const QSet &other) const - Returns a new QSet that is the union of this set and the + Returns a new QSet that is the union of this set and the \a other set. \sa unite(), operator|=(), operator&(), operator-() @@ -622,7 +622,7 @@ iterators are slightly faster, and can improve code readability. QSet\::iterator allows you to iterate over a QSet\ and - modify it as you go (using QSet::erase()). However, + modify it as you go (using QSet::erase()). However, The default QSet::iterator constructor creates an uninitialized iterator. You must initialize it using a function like @@ -701,7 +701,7 @@ \sa QSet::begin(), QSet::end() */ -/*! +/*! \fn QSet::iterator::iterator(typename Hash::iterator i) \fn QSet::const_iterator::const_iterator(typename Hash::const_iterator i) diff --git a/src/corelib/tools/qshareddata.cpp b/src/corelib/tools/qshareddata.cpp index 8205560781..cee0c1d450 100644 --- a/src/corelib/tools/qshareddata.cpp +++ b/src/corelib/tools/qshareddata.cpp @@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE -/*! +/*! \class QSharedData \inmodule QtCore \brief The QSharedData class is a base class for shared data objects. @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE \a other is ignored. */ -/*! +/*! \class QSharedDataPointer \inmodule QtCore \brief The QSharedDataPointer class represents a pointer to an implicitly shared object. @@ -395,7 +395,7 @@ QT_BEGIN_NAMESPACE return the proper polymorphic type. */ -/*! +/*! \class QExplicitlySharedDataPointer \inmodule QtCore \brief The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object. diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp index 5e8aed579d..eb861b7289 100644 --- a/src/corelib/tools/qtextboundaryfinder.cpp +++ b/src/corelib/tools/qtextboundaryfinder.cpp @@ -84,7 +84,7 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int QUnicodeTools::initCharAttributes(string, length, scriptItems.data(), scriptItems.count(), attributes, options); } -/*! +/*! \class QTextBoundaryFinder \inmodule QtCore diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp index e72c1964a2..725cf894c6 100644 --- a/src/corelib/tools/qvector.cpp +++ b/src/corelib/tools/qvector.cpp @@ -435,7 +435,7 @@ Same as at(\a i). */ -/*! +/*! \fn void QVector::append(const T &value) Inserts \a value at the end of the vector. -- cgit v1.2.3