From 5f52974860a9fc62ec5e7c56853156fed01b3aed Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Sun, 12 Jan 2014 17:58:56 +0100 Subject: Retain compiler warning state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added push and pop pragma warning statements. Suppression of warnings should not propagate to user code. Therefore, suppression of warnings is restricted to the file where it is used. Change-Id: Ib7973cbc0205ebbe75e002d035e44fd9b447460f Reviewed-by: Jędrzej Nowacki --- src/corelib/tools/qvector.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 505e1a32e4..075e8e83e8 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -254,7 +254,10 @@ private: }; #ifdef Q_CC_MSVC -# pragma warning ( disable : 4345 ) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized +// behavior change: an object of POD type constructed with an initializer of the form () +// will be default-initialized +# pragma warning ( push ) +# pragma warning ( disable : 4345 ) #endif template @@ -270,7 +273,7 @@ void QVector::defaultConstruct(T *from, T *to) } #ifdef Q_CC_MSVC -# pragma warning ( default: 4345 ) +# pragma warning ( pop ) #endif template -- cgit v1.2.3 From 9eba69d7f914e4823e94699c5653df5ad279eb46 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 21 Jan 2014 08:42:05 +0100 Subject: Fix a bug in some QString comparison operators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some comparison operators comparing to const char * where not implemented correctly. Task-number: QTBUG-34024 Change-Id: Idbdc64c8ed93e88d9f2b2f55213bc785b33cb543 Reviewed-by: Jędrzej Nowacki --- src/corelib/tools/qstring.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 0a0a609728..9778d42c1d 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -1029,13 +1029,13 @@ inline QT_ASCII_CAST_WARN bool operator==(const char *s1, const QString &s2) inline QT_ASCII_CAST_WARN bool operator!=(const char *s1, const QString &s2) { return QString::compare_helper(s2.constData(), s2.size(), s1, -1) != 0; } inline QT_ASCII_CAST_WARN bool operator<(const char *s1, const QString &s2) -{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; } -inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2) { return QString::compare_helper(s2.constData(), s2.size(), s1, -1) > 0; } +inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2) +{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; } inline QT_ASCII_CAST_WARN bool operator<=(const char *s1, const QString &s2) -{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; } -inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2) { return QString::compare_helper(s2.constData(), s2.size(), s1, -1) >= 0; } +inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2) +{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; } inline QT_ASCII_CAST_WARN bool operator==(const char *s1, QLatin1String s2) { return QString::fromUtf8(s1) == s2; } -- cgit v1.2.3 From 4fab72a5eb19d34eb9b96a192fd901ddf7db2c92 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 12 Dec 2013 10:22:34 +0100 Subject: Doc: corrected broken links Links fixed: Extra Filters Basic Tools blockingfortuneclient Thread Support Drag and drop examples qBinaryFind qmake common project types imagegestures Task-number: QTBUG-34749 Change-Id: Ib93dda00716dc596db327fee5b97e110a9f27fa7 Reviewed-by: Martin Smith --- src/corelib/tools/qalgorithms.qdoc | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index 40eb2ed41d..8feb180248 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -662,9 +662,6 @@ This function requires the item type (in the example above, QString) to implement \c operator<(). - See the \l{#binaryFind example}{detailed - description} for an example usage. - \sa qLowerBound(), qUpperBound(), {random access iterators} */ -- cgit v1.2.3 From a8f1bd6b659d9ece7b5655f739ad6c1b6d834045 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 18 Jan 2014 13:56:06 -0800 Subject: Fix typo in the function argument of QRect::moveTo: t -> y Task-number: QTBUG-36259 Change-Id: If6f8da7f36d9a2bc171f2f50d36b37af8f13d8d0 Reviewed-by: Robin Burchell Reviewed-by: Konstantin Ritt --- src/corelib/tools/qrect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qrect.h b/src/corelib/tools/qrect.h index 62ebdd10cd..22696f9edf 100644 --- a/src/corelib/tools/qrect.h +++ b/src/corelib/tools/qrect.h @@ -512,7 +512,7 @@ public: Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) const; Q_DECL_CONSTEXPR inline QRectF translated(const QPointF &p) const; - inline void moveTo(qreal x, qreal t); + inline void moveTo(qreal x, qreal y); inline void moveTo(const QPointF &p); inline void setRect(qreal x, qreal y, qreal w, qreal h); -- cgit v1.2.3 From 1090ee664ba14a16036eb4d539006c4f8c7a545a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 13 Jan 2014 09:24:32 +0100 Subject: Remove duplicate move assignment operator doc Keep the "since 5.2". Change-Id: I8cfaf81e0b10f67c084e923f846ce0c722eac7fe Reviewed-by: Geir Vattekar --- src/corelib/tools/qbitarray.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp index f583444d3c..02cc321262 100644 --- a/src/corelib/tools/qbitarray.cpp +++ b/src/corelib/tools/qbitarray.cpp @@ -119,14 +119,6 @@ QT_BEGIN_NAMESPACE \since 5.2 */ -/*! - \fn QBitArray &QBitArray::operator=(QBitArray &&other) - - Move-assigns \a other to this QBitArray instance. - - \since 5.2 -*/ - /*! \fn QBitArray::QBitArray() Constructs an empty bit array. @@ -464,6 +456,7 @@ void QBitArray::fill(bool value, int begin, int end) */ /*! \fn QBitArray &QBitArray::operator=(QBitArray &&other) + \since 5.2 Moves \a other to this bit array and returns a reference to this bit array. -- cgit v1.2.3 From cc8e0d85e26f699ffa1e5eec3db9897a8bd417ff Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 29 Jan 2014 09:31:18 +0100 Subject: Doc: argument(s) was renamed to value(s), adjust QCommandLineOption docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-36264 Change-Id: I132270f35b93b2b1c5230459f48bf9d047f42ab9 Reviewed-by: Topi Reiniö --- src/corelib/tools/qcommandlineoption.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qcommandlineoption.cpp b/src/corelib/tools/qcommandlineoption.cpp index 86f087674b..ccf9211b52 100644 --- a/src/corelib/tools/qcommandlineoption.cpp +++ b/src/corelib/tools/qcommandlineoption.cpp @@ -79,7 +79,7 @@ public: This class is used to describe an option on the command line. It allows different ways of defining the same option with multiple aliases possible. It is also used to describe how the option is used - it may be a flag (e.g. \c{-v}) - or take an argument (e.g. \c{-o file}). + or take a value (e.g. \c{-o file}). Examples: \snippet code/src_corelib_tools_qcommandlineoption.cpp 0 @@ -232,8 +232,8 @@ void QCommandLineOptionPrivate::setNames(const QStringList &nameList) for the documentation of the option in the help output. An option with names \c{o} and \c{output}, and a value name of \c{file} will appear as \c{-o, --output }. - Call QCommandLineParser::argument() if you expect the option to be present - only once, and QCommandLineParser::arguments() if you expect that option + Call QCommandLineParser::value() if you expect the option to be present + only once, and QCommandLineParser::values() if you expect that option to be present multiple times. \sa valueName() -- cgit v1.2.3 From e5fd2417701c1ecf35a3c771c647d931cef3f375 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 31 Jan 2014 10:36:04 +0100 Subject: Fix QByteArray documentation w.r.t. QString-related methods There's no loss of data when converting a Unicode string to UTF-8, so don't state that in the docs. Change-Id: If26914ec674a994d9c59136448e8e4292d0412e8 Reviewed-by: Thiago Macieira --- src/corelib/tools/qbytearray.cpp | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 03b10903ab..3e3bae9a94 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1303,12 +1303,10 @@ void QByteArray::chop(int n) returns a reference to this byte array. The Unicode data is converted into 8-bit characters using QString::toUtf8(). - If the QString contains non-ASCII Unicode characters, using this - operator can lead to loss of information. You can disable this - operator by defining \c QT_NO_CAST_TO_ASCII when you compile your - applications. You then need to call QString::toUtf8() (or - QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit()) - explicitly if you want to convert the data to \c{const char *}. + You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you + compile your applications. You then need to call QString::toUtf8() (or + QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to + convert the data to \c{const char *}. */ /*! \fn QByteArray &QByteArray::operator+=(const char *str) @@ -1667,12 +1665,10 @@ QByteArray &QByteArray::append(const QByteArray &ba) Appends the string \a str to this byte array. The Unicode data is converted into 8-bit characters using QString::toUtf8(). - If the QString contains non-ASCII Unicode characters, using this - function can lead to loss of information. You can disable this - function by defining \c QT_NO_CAST_TO_ASCII when you compile your - applications. You then need to call QString::toUtf8() (or - QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit()) - explicitly if you want to convert the data to \c{const char *}. + You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you + compile your applications. You then need to call QString::toUtf8() (or + QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to + convert the data to \c{const char *}. */ /*! @@ -2148,12 +2144,10 @@ QByteArray &QByteArray::replace(char before, const QByteArray &after) string \a after. The Unicode data is converted into 8-bit characters using QString::toUtf8(). - If the QString contains non-ASCII Unicode characters, using this - function can lead to loss of information. You can disable this - function by defining \c QT_NO_CAST_TO_ASCII when you compile your - applications. You then need to call QString::toUtf8() (or - QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit()) - explicitly if you want to convert the data to \c{const char *}. + You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you + compile your applications. You then need to call QString::toUtf8() (or + QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to + convert the data to \c{const char *}. */ /*! \fn QByteArray &QByteArray::replace(char before, const char *after) -- cgit v1.2.3 From 8bb5dba0cba4d953794124d7f1b33887d1b5bd8d Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sat, 1 Feb 2014 23:30:08 +0800 Subject: Doc: Fix broken links Change-Id: Ic275dfbf0b332fc34ea0fac1c31c4935ad961527 Reviewed-by: Frederik Gladhorn --- src/corelib/tools/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d682207314..2c505ef033 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -7691,7 +7691,7 @@ QString &QString::setRawData(const QChar *unicode, int size) \snippet code/src_corelib_tools_qstring.cpp 6 - \sa QString, QLatin1Char, QStringLiteral + \sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral} */ /*! \fn QLatin1String::QLatin1String(const char *str) -- cgit v1.2.3