diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-06 16:19:14 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-06 16:50:03 +0200 |
commit | 1326cd15f7ba985551f0fddc717e3bfc01ddda85 (patch) | |
tree | 024eb871ed5f4e8c02e21412475e6e9929a2b030 /src/corelib/kernel | |
parent | fe70367fe06984d1ac84cc276ca3fd3edc4193c7 (diff) | |
parent | beb7258a56b6ec76531b73cc07ee30132a3f548f (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
mkspecs/qnx-x86-qcc/qplatformdefs.h
src/corelib/global/qglobal.h
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/qgl.cpp
src/opengl/qglpixelbuffer.cpp
src/opengl/qglshaderprogram.cpp
tests/auto/opengl/qglthreads/tst_qglthreads.cpp
Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qmath.cpp | 84 | ||||
-rw-r--r-- | src/corelib/kernel/qmath.qdoc | 95 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 17 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qtranslator.cpp | 6 |
5 files changed, 97 insertions, 107 deletions
diff --git a/src/corelib/kernel/qmath.cpp b/src/corelib/kernel/qmath.cpp index b1860fa24a..9f276b4ca9 100644 --- a/src/corelib/kernel/qmath.cpp +++ b/src/corelib/kernel/qmath.cpp @@ -303,88 +303,4 @@ const qreal qt_sine_table[QT_SINE_TABLE_SIZE] = { qreal(-0.024541228522912448) }; -/*! - \headerfile <QtMath> - \title Generic Math Declarations - \ingroup funclists - - \brief The <QtMath> header file includes generic math declarations. - - These functions are partly convenience definitions for basic - operations, for instance not available in the Standard Template Library et - al. -*/ - -/*! - \fn float qDegreesToRadians(float degrees) - \relates <QtMath> - \since 5.1 - - \brief The function converts the \a degrees in float to radians. - - The purpose of the function is to aid the conversion as such a convenient - function is not part of the Standard Template Library, i.e. in <cmath> or - elsewhere. - - Example: - - \snippet code/src_corelib_kernel_qmath.cpp 0 - - \sa qRadiansToDegrees() -*/ - -/*! - \fn double qDegreesToRadians(double degrees) - \relates <QtMath> - \since 5.1 - - \brief The function converts the \a degrees in double to radians. - - The purpose of the function is to aid the conversion as such a convenient - function is not part of the Standard Template Library, i.e. in <cmath> or - elsewhere. - - Example: - - \snippet code/src_corelib_kernel_qmath.cpp 1 - - \sa qRadiansToDegrees() -*/ - -/*! - \fn float qRadiansToDegrees(float radians) - \relates <QtMath> - \since 5.1 - - \brief The function converts the \a radians in float to degrees. - - The purpose of the function is to aid the conversion as such a convenient - function is not part of the Standard Template Library, i.e. in <cmath> or - elsewhere. - - Example: - - \snippet code/src_corelib_kernel_qmath.cpp 2 - - \sa qDegreesToRadians() -*/ - -/*! - \fn double qRadiansToDegrees(double radians) - \relates <QtMath> - \since 5.1 - - \brief The function converts the \a radians in double to degrees. - - The purpose of the function is to aid the conversion as such a convenient - function is not part of the Standard Template Library, i.e. in <cmath> or - elsewhere. - - Example: - - \snippet code/src_corelib_kernel_qmath.cpp 3 - - \sa qDegreesToRadians() -*/ - QT_END_NAMESPACE diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc index 06d8db9277..04dbbb0a3b 100644 --- a/src/corelib/kernel/qmath.qdoc +++ b/src/corelib/kernel/qmath.qdoc @@ -26,10 +26,15 @@ ****************************************************************************/ /*! - \headerfile <QtCore/qmath.h> - \title Math Functions + \headerfile <QtMath> + \title Generic Math Functions \ingroup funclists - \brief The <QtCore/qmath.h> header provides various math functions. + + \brief The <QtMath> header file provides various math functions. + + These functions are partly convenience definitions for basic math operations + not available in the C or Standard Template Libraries. + \pagekeywords math trigonometry qmath floor ceiling absolute sine cosine tangent inverse tan exponent power natural logarithm */ @@ -40,7 +45,7 @@ The ceiling is the smallest integer that is not less than \a v. For example, if \a v is 41.2, then the ceiling is 42. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qFloor() */ @@ -51,7 +56,7 @@ The floor is the largest integer that is not greater than \a v. For example, if \a v is 41.2, then the floor is 41. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qCeil() */ @@ -59,14 +64,14 @@ \fn qreal qFabs(qreal v) Returns the absolute value of \a v as a qreal. - \relates <QtCore/qmath.h> + \relates <QtMath> */ /*! \fn qreal qSin(qreal v) Returns the sine of the angle \a v in radians. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qCos(), qTan() */ @@ -74,7 +79,7 @@ \fn qreal qCos(qreal v) Returns the cosine of an angle \a v in radians. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qSin(), qTan() */ @@ -82,7 +87,7 @@ \fn qreal qTan(qreal v) Returns the tangent of an angle \a v in radians. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qSin(), qCos() */ @@ -91,7 +96,7 @@ Returns the arccosine of \a v as an angle in radians. Arccosine is the inverse operation of cosine. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qAtan(), qAsin(), qCos() */ @@ -100,7 +105,7 @@ Returns the arcsine of \a v as an angle in radians. Arcsine is the inverse operation of sine. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qSin(), qAtan(), qAcos() */ @@ -109,7 +114,7 @@ Returns the arctangent of \a v as an angle in radians. Arctangent is the inverse operation of tangent. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qTan(), qAcos(), qAsin() */ @@ -118,7 +123,7 @@ Returns the arctangent of a point specified by the coordinates \a y and \a x. This function will return the angle (argument) of that point. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qAtan() */ @@ -127,7 +132,7 @@ Returns the square root of \a v. This function returns a NaN if \a v is a negative number. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qPow() */ @@ -135,7 +140,7 @@ \fn qreal qLn(qreal v) Returns the natural logarithm of \a v. Natural logarithm uses base e. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qExp() */ @@ -143,7 +148,7 @@ \fn qreal qExp(qreal v) Returns the exponential function of \c e to the power of \a v. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qLn() */ @@ -152,6 +157,62 @@ Returns the value of \a x raised to the power of \a y. That is, \a x is the base and \a y is the exponent. - \relates <QtCore/qmath.h> + \relates <QtMath> \sa qSqrt() */ + +/*! + \fn float qDegreesToRadians(float degrees) + \relates <QtMath> + \since 5.1 + + This function converts the \a degrees in float to radians. + + Example: + + \snippet code/src_corelib_kernel_qmath.cpp 0 + + \sa qRadiansToDegrees() +*/ + +/*! + \fn double qDegreesToRadians(double degrees) + \relates <QtMath> + \since 5.1 + + This function converts the \a degrees in double to radians. + + Example: + + \snippet code/src_corelib_kernel_qmath.cpp 1 + + \sa qRadiansToDegrees() +*/ + +/*! + \fn float qRadiansToDegrees(float radians) + \relates <QtMath> + \since 5.1 + + This function converts the \a radians in float to degrees. + + Example: + + \snippet code/src_corelib_kernel_qmath.cpp 2 + + \sa qDegreesToRadians() +*/ + +/*! + \fn double qRadiansToDegrees(double radians) + \relates <QtMath> + \since 5.1 + + This function converts the \a radians in double to degrees. + + Example: + + \snippet code/src_corelib_kernel_qmath.cpp 3 + + \sa qDegreesToRadians() +*/ diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 0184e9a9e7..c0773882f3 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4071,18 +4071,21 @@ QDebug operator<<(QDebug dbg, const QObject *o) { \macro Q_CLASSINFO(Name, Value) \relates QObject - This macro associates extra information to the class, which is - available using QObject::metaObject(). Except for the ActiveQt - extension, Qt doesn't use this information. + This macro associates extra information to the class, which is available + using QObject::metaObject(). Qt makes only limited use of this feature, in + the \l{Active Qt}, \l{Qt D-Bus} and \l{Qt QML} modules. - The extra information takes the form of a \a Name string and a \a - Value literal string. + The extra information takes the form of a \a Name string and a \a Value + literal string. Example: \snippet code/src_corelib_kernel_qobject.cpp 35 \sa QMetaObject::classInfo() + \sa QAxFactory + \sa {Using Qt D-Bus Adaptors} + \sa {Extending QML - Default Property Example} */ /*! @@ -4441,6 +4444,8 @@ void qDeleteInEventHandler(QObject *o) \snippet code/src_corelib_kernel_qobject.cpp 46 The connection will automatically disconnect if the sender is destroyed. + However, you should take care that any objects used within the functor + are still alive when the signal is emitted. \note If the compiler does not support C++11 variadic templates, the number of arguments in the signal or slot are limited to 6, and the functor object @@ -4478,6 +4483,8 @@ void qDeleteInEventHandler(QObject *o) The connection will automatically disconnect if the sender or the context is destroyed. + However, you should take care that any objects used within the functor + are still alive when the signal is emitted. \note If the compiler does not support C++11 variadic templates, the number of arguments in the signal or slot are limited to 6, and the functor object diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index ee6ef23139..a54690606a 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -549,7 +549,7 @@ template <class T> inline const char * qobject_interface_iid() Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *); #endif -class Q_CORE_EXPORT QSignalBlocker +class QSignalBlocker { public: inline explicit QSignalBlocker(QObject *o); diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 843a6edce1..94c77302dd 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -465,6 +465,12 @@ QTranslator::~QTranslator() \li \c /opt/foolib/foo.qm \li \c /opt/foolib/foo \endlist + + Usually, it is better to use the QTranslator::load(const QLocale &, + const QString &, const QString &, const QString &, const QString &) + function instead, because it uses \l{QLocale::uiLanguages()} and not simply + the locale name, which refers to the formatting of dates and numbers and not + necessarily the UI language. */ bool QTranslator::load(const QString & filename, const QString & directory, |