diff options
author | Morten Sørvig <msorvig@trolltech.com> | 2009-07-27 12:19:55 (GMT) |
---|---|---|
committer | Morten Sørvig <msorvig@trolltech.com> | 2009-07-27 12:19:55 (GMT) |
commit | 4b696ce11ffed279ed92c63bb85cbcdaab818033 (patch) | |
tree | 1c803fe730b7e90679b253bbf599e5ec092059c6 /src | |
parent | ed00fff3cb3f3f1ec01f5d69168222c3ce8d51b2 (diff) | |
parent | 29031b406f0266b0b47ef7e8113ec861a90f201e (diff) | |
download | Qt-4b696ce11ffed279ed92c63bb85cbcdaab818033.zip Qt-4b696ce11ffed279ed92c63bb85cbcdaab818033.tar.gz Qt-4b696ce11ffed279ed92c63bb85cbcdaab818033.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebview.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_unix.cpp | 71 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_unix_p.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 97 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix_p.h | 4 | ||||
-rw-r--r-- | src/gui/image/qbitmap.cpp | 3 | ||||
-rw-r--r-- | src/gui/painting/qmatrix.cpp | 1 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 90 | ||||
-rw-r--r-- | src/gui/styles/qstyleoption.cpp | 4 | ||||
-rw-r--r-- | src/gui/styles/qwindowsvistastyle.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontmetrics.cpp | 12 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 6 | ||||
-rw-r--r-- | src/script/qscriptengine.cpp | 2 | ||||
-rw-r--r-- | src/script/qscriptvalue.cpp | 2 |
15 files changed, 130 insertions, 170 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 34da644..6c5860c 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -617,6 +617,8 @@ qreal QWebView::textSizeMultiplier() const These hints are used to initialize QPainter before painting the web page. QPainter::TextAntialiasing is enabled by default. + + \sa QPainter::renderHints() */ QPainter::RenderHints QWebView::renderHints() const { diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h index 5c2c7a0..0dab925 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.h @@ -106,7 +106,7 @@ public: QPainter::RenderHints renderHints() const; void setRenderHints(QPainter::RenderHints hints); - void setRenderHint(QPainter::RenderHint hint, bool enabled); + void setRenderHint(QPainter::RenderHint hint, bool enabled = true); bool findText(const QString &subString, QWebPage::FindFlags options = 0); diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp index c5b0fc7..d0a4d8f 100644 --- a/src/corelib/kernel/qcore_unix.cpp +++ b/src/corelib/kernel/qcore_unix.cpp @@ -55,37 +55,72 @@ QT_BEGIN_NAMESPACE -static inline timeval gettime() +bool qt_gettime_is_monotonic() { - timeval tv; -#ifndef QT_NO_CLOCK_MONOTONIC - // use the monotonic clock - static volatile bool monotonicClockDisabled = false; - struct timespec ts; - if (!monotonicClockDisabled) { - if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1) { - monotonicClockDisabled = true; - } else { - tv.tv_sec = ts.tv_sec; - tv.tv_usec = ts.tv_nsec / 1000; - return tv; - } +#if (_POSIX_MONOTONIC_CLOCK-0 > 0) || defined(Q_OS_MAC) + return true; +#else + static int returnValue = 0; + + if (returnValue == 0) { +# if (_POSIX_MONOTONIC_CLOCK-0 < 0) + returnValue = -1; +# elif (_POSIX_MONOTONIC_CLOCK == 0) + // detect if the system support monotonic timers + long x = sysconf(_SC_MONOTONIC_CLOCK); + returnValue = (x >= 200112L) ? 1 : -1; +# endif } + + return returnValue != -1; #endif +} + +timeval qt_gettime() +{ + timeval tv; +#if defined(Q_OS_MAC) + static mach_timebase_info_data_t info = {0,0}; + if (info.denom == 0) + mach_timebase_info(&info); + + uint64_t cpu_time = mach_absolute_time(); + uint64_t nsecs = cpu_time * (info.numer / info.denom); + tv.tv_sec = nsecs / 1000000000ull; + tv.tv_usec = (nsecs / 1000) - (t.tv_sec * 1000000); + return tv; +#elif (_POSIX_MONOTONIC_CLOCK-0 > 0) + timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + tv.tv_sec = ts.tv_sec; + tv.tv_usec = ts.tv_nsec / 1000; + return tv; +#else +# if !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED) + if (qt_gettime_is_monotonic()) { + timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + tv.tv_sec = ts.tv_sec; + tv.tv_usec = ts.tv_nsec / 1000; + return tv; + } +# endif // use gettimeofday ::gettimeofday(&tv, 0); return tv; +#endif } static inline bool time_update(struct timeval *tv, const struct timeval &start, const struct timeval &timeout) { - struct timeval now = gettime(); - if (now < start) { - // clock reset, give up + if (!qt_gettime_is_monotonic()) { + // we cannot recalculate the timeout without a monotonic clock as the time may have changed return false; } + // clock source is monotonic, so we can recalculate how much timeout is left + struct timeval now = qt_gettime(); *tv = timeout + start - now; return true; } @@ -100,7 +135,7 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept, return ret; } - timeval start = gettime(); + timeval start = qt_gettime(); timeval timeout = *orig_timeout; // loop and recalculate the timeout as needed diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h index dd97841..bffd670 100644 --- a/src/corelib/kernel/qcore_unix_p.h +++ b/src/corelib/kernel/qcore_unix_p.h @@ -267,6 +267,8 @@ static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options) return ret; } +bool qt_gettime_is_monotonic(); +timeval qt_gettime(); Q_CORE_EXPORT int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept, const struct timeval *tv); diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 2139545..6f1256b 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -67,25 +67,6 @@ QT_BEGIN_NAMESPACE Q_CORE_EXPORT bool qt_disable_lowpriority_timers=false; -// check for _POSIX_MONOTONIC_CLOCK support -static bool supportsMonotonicClock() -{ - bool returnValue; - -#if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) - returnValue = false; -# if (_POSIX_MONOTONIC_CLOCK == 0) - // detect if the system support monotonic timers - long x = sysconf(_SC_MONOTONIC_CLOCK); - returnValue = x >= 200112L; -# endif -#else - returnValue = true; -#endif - - return returnValue; -} - /***************************************************************************** UNIX signal handling *****************************************************************************/ @@ -281,12 +262,11 @@ int QEventDispatcherUNIXPrivate::doSelect(QEventLoop::ProcessEventsFlags flags, */ QTimerInfoList::QTimerInfoList() - : useMonotonicTimers(supportsMonotonicClock()) { - getTime(currentTime); + currentTime = qt_gettime(); #if (_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC) - if (!useMonotonicTimers) { + if (!qt_gettime_is_monotonic()) { // not using monotonic timers, initialize the timeChanged() machinery previousTime = currentTime; @@ -309,8 +289,7 @@ QTimerInfoList::QTimerInfoList() timeval QTimerInfoList::updateCurrentTime() { - getTime(currentTime); - return currentTime; + return (currentTime = qt_gettime()); } #if ((_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(Q_OS_MAC)) || defined(QT_BOOTSTRAPPED) @@ -364,38 +343,9 @@ bool QTimerInfoList::timeChanged(timeval *delta) return elapsedTimeTicks < ((qAbs(*delta) - tickGranularity) * 10); } -void QTimerInfoList::getTime(timeval &t) -{ -#if !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED) - if (useMonotonicTimers) { - timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - t.tv_sec = ts.tv_sec; - t.tv_usec = ts.tv_nsec / 1000; - return; - } -#endif - - gettimeofday(&t, 0); - // NTP-related fix - while (t.tv_usec >= 1000000l) { - t.tv_usec -= 1000000l; - ++t.tv_sec; - } - while (t.tv_usec < 0l) { - if (t.tv_sec > 0l) { - t.tv_usec += 1000000l; - --t.tv_sec; - } else { - t.tv_usec = 0l; - break; - } - } -} - void QTimerInfoList::repairTimersIfNeeded() { - if (useMonotonicTimers) + if (qt_gettime_is_monotonic()) return; timeval delta; if (timeChanged(&delta)) @@ -404,25 +354,6 @@ void QTimerInfoList::repairTimersIfNeeded() #else // !(_POSIX_MONOTONIC_CLOCK-0 <= 0) && !defined(QT_BOOTSTRAPPED) -void QTimerInfoList::getTime(timeval &t) -{ -#if defined(Q_OS_MAC) - static mach_timebase_info_data_t info = {0,0}; - if (info.denom == 0) - mach_timebase_info(&info); - - uint64_t cpu_time = mach_absolute_time(); - uint64_t nsecs = cpu_time * (info.numer / info.denom); - t.tv_sec = nsecs * 1e-9; - t.tv_usec = nsecs * 1e-3 - (t.tv_sec * 1e6); -#else - timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - t.tv_sec = ts.tv_sec; - t.tv_usec = ts.tv_nsec / 1000; -#endif -} - void QTimerInfoList::repairTimersIfNeeded() { } @@ -648,25 +579,7 @@ QEventDispatcherUNIX::~QEventDispatcherUNIX() int QEventDispatcherUNIX::select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, timeval *timeout) { - Q_D(QEventDispatcherUNIX); - if (timeout && d->timerList.useMonotonicTimers) { - // handle the case where select returns with a timeout, too - // soon. - timeval tvStart = d->timerList.currentTime; - timeval tvCurrent = tvStart; - timeval originalTimeout = *timeout; - - int nsel; - do { - timeval tvRest = originalTimeout + tvStart - tvCurrent; - nsel = ::select(nfds, readfds, writefds, exceptfds, &tvRest); - d->timerList.getTime(tvCurrent); - } while (nsel == 0 && (tvCurrent - tvStart) < originalTimeout); - - return nsel; - } - - return ::select(nfds, readfds, writefds, exceptfds, timeout); + return ::qt_safe_select(nfds, readfds, writefds, exceptfds, timeout); } /*! diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h index 28e7f9b..61d94c9 100644 --- a/src/corelib/kernel/qeventdispatcher_unix_p.h +++ b/src/corelib/kernel/qeventdispatcher_unix_p.h @@ -141,10 +141,6 @@ class QTimerInfoList : public QList<QTimerInfo*> public: QTimerInfoList(); - const bool useMonotonicTimers; - - void getTime(timeval &t); - timeval currentTime; timeval updateCurrentTime(); diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp index 6bca504..78c3396 100644 --- a/src/gui/image/qbitmap.cpp +++ b/src/gui/image/qbitmap.cpp @@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE 0 for black and 1 for white. The QBitmap class provides the transformed() function returning a - transformed copy of the bitmap; use the QMatrix argument to + transformed copy of the bitmap; use the QTransform argument to translate, scale, shear, and rotate the bitmap. In addition, QBitmap provides the static fromData() function which returns a bitmap constructed from the given \c uchar data, and the static @@ -318,6 +318,7 @@ QBitmap QBitmap::transformed(const QTransform &matrix) const /*! \overload + \obsolete This convenience function converts the \a matrix to a QTransform and calls the overloaded function. diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp index bc08235..39f4d95 100644 --- a/src/gui/painting/qmatrix.cpp +++ b/src/gui/painting/qmatrix.cpp @@ -55,6 +55,7 @@ QT_BEGIN_NAMESPACE \class QMatrix \brief The QMatrix class specifies 2D transformations of a coordinate system. + \obsolete \ingroup multimedia diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 4c10a5a..4ebfc50 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1005,7 +1005,7 @@ void QPainterPrivate::updateState(QPainterState *newState) \o brushOrigin() defines the origin of the tiled brushes, normally the origin of widget's background. - \o viewport(), window(), worldMatrix() make up the painter's coordinate + \o viewport(), window(), worldTransform() make up the painter's coordinate transformation system. For more information, see the \l {Coordinate Transformations} section and the \l {The Coordinate System} documentation. @@ -1212,15 +1212,15 @@ void QPainterPrivate::updateState(QPainterState *newState) \endtable All the tranformation operations operate on the transformation - worldMatrix(). A matrix transforms a point in the plane to another + worldTransform(). A matrix transforms a point in the plane to another point. For more information about the transformation matrix, see - the \l {The Coordinate System} and QMatrix documentation. + the \l {The Coordinate System} and QTransform documentation. - The setWorldMatrix() function can replace or add to the currently - set worldMatrix(). The resetMatrix() function resets any + The setWorldTransform() function can replace or add to the currently + set worldTransform(). The resetTransform() function resets any transformations that were made using translate(), scale(), - shear(), rotate(), setWorldMatrix(), setViewport() and setWindow() - functions. The deviceMatrix() returns the matrix that transforms + shear(), rotate(), setWorldTransform(), setViewport() and setWindow() + functions. The deviceTransform() returns the matrix that transforms from logical coordinates to device coordinates of the platform dependent paint device. The latter function is only needed when using platform painting commands on the platform dependent handle, @@ -1229,11 +1229,11 @@ void QPainterPrivate::updateState(QPainterState *newState) When drawing with QPainter, we specify points using logical coordinates which then are converted into the physical coordinates of the paint device. The mapping of the logical coordinates to the - physical coordinates are handled by QPainter's combinedMatrix(), a - combination of viewport() and window() and worldMatrix(). The + physical coordinates are handled by QPainter's combinedTransform(), a + combination of viewport() and window() and worldTransform(). The viewport() represents the physical coordinates specifying an arbitrary rectangle, the window() describes the same rectangle in - logical coordinates, and the worldMatrix() is identical with the + logical coordinates, and the worldTransform() is identical with the transformation matrix. See also \l {The Coordinate System} documentation. @@ -2677,6 +2677,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op) /*! \since 4.2 + \obsolete Sets the transformation matrix to \a matrix and enables transformations. @@ -2715,7 +2716,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op) and window-viewport conversion, see \l {The Coordinate System} documentation. - \sa worldMatrixEnabled(), QMatrix + \sa setWorldTransform(), QTransform */ void QPainter::setWorldMatrix(const QMatrix &matrix, bool combine) @@ -2725,6 +2726,7 @@ void QPainter::setWorldMatrix(const QMatrix &matrix, bool combine) /*! \since 4.2 + \obsolete Returns the world transformation matrix. @@ -2774,6 +2776,7 @@ const QMatrix &QPainter::matrix() const /*! \since 4.2 + \obsolete Returns the transformation matrix combining the current window/viewport and world transformation. @@ -2781,7 +2784,7 @@ const QMatrix &QPainter::matrix() const It is advisable to use combinedTransform() instead of this function to preserve the properties of perspective transformations. - \sa setWorldMatrix(), setWindow(), setViewport() + \sa setWorldTransform(), setWindow(), setViewport() */ QMatrix QPainter::combinedMatrix() const { @@ -2790,6 +2793,8 @@ QMatrix QPainter::combinedMatrix() const /*! + \obsolete + Returns the matrix that transforms from logical coordinates to device coordinates of the platform dependent paint device. @@ -2817,6 +2822,8 @@ const QMatrix &QPainter::deviceMatrix() const } /*! + \obsolete + Resets any transformations that were made using translate(), scale(), shear(), rotate(), setWorldMatrix(), setViewport() and setWindow(). @@ -2841,7 +2848,7 @@ void QPainter::resetMatrix() transformations if \a enable is false. The world transformation matrix is not changed. - \sa worldMatrixEnabled(), worldMatrix(), {QPainter#Coordinate + \sa worldMatrixEnabled(), worldTransform(), {QPainter#Coordinate Transformations}{Coordinate Transformations} */ @@ -2870,7 +2877,7 @@ void QPainter::setWorldMatrixEnabled(bool enable) Returns true if world transformation is enabled; otherwise returns false. - \sa setWorldMatrixEnabled(), worldMatrix(), {The Coordinate System} + \sa setWorldMatrixEnabled(), worldTransform(), {The Coordinate System} */ bool QPainter::worldMatrixEnabled() const @@ -2912,7 +2919,7 @@ bool QPainter::matrixEnabled() const /*! Scales the coordinate system by (\a{sx}, \a{sy}). - \sa setWorldMatrix() {QPainter#Coordinate Transformations}{Coordinate + \sa setWorldTransform() {QPainter#Coordinate Transformations}{Coordinate Transformations} */ @@ -2936,7 +2943,7 @@ void QPainter::scale(qreal sx, qreal sy) /*! Shears the coordinate system by (\a{sh}, \a{sv}). - \sa setWorldMatrix(), {QPainter#Coordinate Transformations}{Coordinate + \sa setWorldTransform(), {QPainter#Coordinate Transformations}{Coordinate Transformations} */ @@ -2962,7 +2969,7 @@ void QPainter::shear(qreal sh, qreal sv) Rotates the coordinate system the given \a angle clockwise. - \sa setWorldMatrix(), {QPainter#Coordinate Transformations}{Coordinate + \sa setWorldTransform(), {QPainter#Coordinate Transformations}{Coordinate Transformations} */ @@ -2987,7 +2994,7 @@ void QPainter::rotate(qreal a) Translates the coordinate system by the given \a offset; i.e. the given \a offset is added to points. - \sa setWorldMatrix(), {QPainter#Coordinate Transformations}{Coordinate + \sa setWorldTransform(), {QPainter#Coordinate Transformations}{Coordinate Transformations} */ void QPainter::translate(const QPointF &offset) @@ -6769,7 +6776,7 @@ QPainter::RenderHints QPainter::renderHints() const Returns true if view transformation is enabled; otherwise returns false. - \sa setViewTransformEnabled(), worldMatrix() + \sa setViewTransformEnabled(), worldTransform() */ bool QPainter::viewTransformEnabled() const @@ -6925,7 +6932,7 @@ QRect QPainter::viewport() const /*! \fn void QPainter::resetXForm() \compat - Use resetMatrix() instead. + Use resetTransform() instead. */ /*! \fn void QPainter::setViewXForm(bool enabled) @@ -6971,14 +6978,16 @@ void QPainter::setViewTransformEnabled(bool enable) #ifdef QT3_SUPPORT /*! - Use the worldMatrix() combined with QMatrix::dx() instead. + \obsolete + + Use the worldTransform() combined with QTransform::dx() instead. \oldcode QPainter painter(this); qreal x = painter.translationX(); \newcode QPainter painter(this); - qreal x = painter.worldMatrix().dx(); + qreal x = painter.worldTransform().dx(); \endcode */ qreal QPainter::translationX() const @@ -6992,14 +7001,16 @@ qreal QPainter::translationX() const } /*! - Use the worldMatrix() combined with QMatrix::dy() instead. + \obsolete + + Use the worldTransform() combined with QTransform::dy() instead. \oldcode QPainter painter(this); qreal y = painter.translationY(); \newcode QPainter painter(this); - qreal y = painter.worldMatrix().dy(); + qreal y = painter.worldTransform().dy(); \endcode */ qreal QPainter::translationY() const @@ -7097,7 +7108,7 @@ QPolygon QPainter::xForm(const QPolygon &a) const QPolygon transformed = painter.xForm(polygon, index, count) \newcode QPainter painter(this); - QPolygon transformed = polygon.mid(index, count) * painter.combinedMatrix(); + QPolygon transformed = polygon.mid(index, count) * painter.combinedTransform(); \endcode */ @@ -7112,15 +7123,16 @@ QPolygon QPainter::xForm(const QPolygon &av, int index, int npoints) const /*! \fn QPoint QPainter::xFormDev(const QPoint &point) const \overload + \obsolete - Use combinedTransform() combined with QMatrix::inverted() instead. + Use combinedTransform() combined with QTransform::inverted() instead. \oldcode QPainter painter(this); QPoint transformed = painter.xFormDev(point); \newcode QPainter painter(this); - QPoint transformed = point * painter.combinedMatrix().inverted(); + QPoint transformed = point * painter.combinedTransform().inverted(); \endcode */ @@ -7139,15 +7151,16 @@ QPoint QPainter::xFormDev(const QPoint &p) const /*! \fn QRect QPainter::xFormDev(const QRect &rectangle) const \overload + \obsolete - Use mapRect() combined with QMatrix::inverted() instead. + Use combinedTransform() combined with QTransform::inverted() instead. \oldcode QPainter painter(this); QRect transformed = painter.xFormDev(rectangle); \newcode QPainter painter(this); - QRect transformed = painter.combinedMatrix().inverted(rectangle); + QRect transformed = painter.combinedTransform().inverted(rectangle); \endcode */ @@ -7167,16 +7180,16 @@ QRect QPainter::xFormDev(const QRect &r) const \overload \fn QPoint QPainter::xFormDev(const QPolygon &polygon) const - \overload + \obsolete - Use combinedMatrix() combined with QMatrix::inverted() instead. + Use combinedTransform() combined with QTransform::inverted() instead. \oldcode QPainter painter(this); QPolygon transformed = painter.xFormDev(rectangle); \newcode QPainter painter(this); - QPolygon transformed = polygon * painter.combinedMatrix().inverted(); + QPolygon transformed = polygon * painter.combinedTransform().inverted(); \endcode */ @@ -7195,15 +7208,16 @@ QPolygon QPainter::xFormDev(const QPolygon &a) const /*! \fn QPolygon QPainter::xFormDev(const QPolygon &polygon, int index, int count) const \overload + \obsolete - Use combinedMatrix() combined with QPolygon::mid() and QMatrix::inverted() instead. + Use combinedTransform() combined with QPolygon::mid() and QTransform::inverted() instead. \oldcode QPainter painter(this); QPolygon transformed = painter.xFormDev(polygon, index, count); \newcode QPainter painter(this); - QPolygon transformed = polygon.mid(index, count) * painter.combinedMatrix().inverted(); + QPolygon transformed = polygon.mid(index, count) * painter.combinedTransform().inverted(); \endcode */ @@ -8107,7 +8121,7 @@ void bitBlt(QPaintDevice *dst, int dx, int dy, \row \o QPaintEngine::DirtyClipRegion \o clipRegion() \row \o QPaintEngine::DirtyCompositionMode \o compositionMode() \row \o QPaintEngine::DirtyFont \o font() - \row \o QPaintEngine::DirtyTransform \o matrix() + \row \o QPaintEngine::DirtyTransform \o transform() \row \o QPaintEngine::DirtyClipEnabled \o isClipEnabled() \row \o QPaintEngine::DirtyPen \o pen() \row \o QPaintEngine::DirtyHints \o renderHints() @@ -8226,10 +8240,14 @@ QFont QPaintEngineState::font() const /*! \since 4.2 + \obsolete Returns the matrix in the current paint engine state. + \note It is advisable to use transform() instead of this function to + preserve the properties of perspective transformations. + This variable should only be used when the state() returns a combination which includes the QPaintEngine::DirtyTransform flag. @@ -8534,7 +8552,7 @@ const QTransform & QPainter::worldTransform() const Returns the transformation matrix combining the current window/viewport and world transformation. - \sa setWorldMatrix(), setWindow(), setViewport() + \sa setWorldTransform(), setWindow(), setViewport() */ QTransform QPainter::combinedTransform() const diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp index 0ff1ccf..7547dda 100644 --- a/src/gui/styles/qstyleoption.cpp +++ b/src/gui/styles/qstyleoption.cpp @@ -657,7 +657,7 @@ QStyleOptionFrameV2 &QStyleOptionFrameV2::operator=(const QStyleOptionFrame &oth /*! \enum QStyleOptionFrameV2::FrameFeature - This enum describles the different types of features a frame can have. + This enum describes the different types of features a frame can have. \value None Indicates a normal frame. \value Flat Indicates a flat frame. @@ -899,7 +899,7 @@ QStyleOptionViewItemV2 &QStyleOptionViewItemV2::operator=(const QStyleOptionView /*! \enum QStyleOptionViewItemV2::ViewItemFeature - This enum describles the different types of features an item can have. + This enum describes the different types of features an item can have. \value None Indicates a normal item. \value WrapText Indicates an item with wrapped text. diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp index f3d0f04..298207d 100644 --- a/src/gui/styles/qwindowsvistastyle.cpp +++ b/src/gui/styles/qwindowsvistastyle.cpp @@ -2229,7 +2229,7 @@ QRect QWindowsVistaStyle::subControlRect(ComplexControl control, const QStyleOpt rect = cb->rect; break; case SC_ComboBoxArrow: - rect.setRect(cb->editable ? xpos : 0, y , wi - xpos, he); + rect.setRect(xpos, y , wi - xpos, he); break; case SC_ComboBoxEditField: rect.setRect(x + margin, y + margin, wi - 2 * margin - 16, he - 2 * margin); diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index abab91c..012c0f6 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -557,11 +557,10 @@ int QFontMetrics::width(const QString &text, int len) const \warning This function will produce incorrect results for Arabic characters or non-spacing marks in the middle of a string, as the glyph shaping and positioning of marks that happens when - processing strings cannot be taken into account. Use charWidth() - instead if you aren't looking for the width of isolated - characters. + processing strings cannot be taken into account. When implementing + an interactive text control, use QTextLayout instead. - \sa boundingRect(), charWidth() + \sa boundingRect() */ int QFontMetrics::width(QChar ch) const { @@ -1386,9 +1385,8 @@ qreal QFontMetricsF::width(const QString &text) const \warning This function will produce incorrect results for Arabic characters or non-spacing marks in the middle of a string, as the glyph shaping and positioning of marks that happens when - processing strings cannot be taken into account. Use charWidth() - instead if you aren't looking for the width of isolated - characters. + processing strings cannot be taken into account. When implementing + an interactive text control, use QTextLayout instead. \sa boundingRect() */ diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 3f0b244..66aeb22 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -571,9 +571,6 @@ bool QHttpNetworkConnectionPrivate::expand(QAbstractSocket *socket, QHttpNetwork // make sure that the reply is valid if (channels[i].reply != reply) return true; - // emit dataReadProgress signal (signal is currently not connected - // to the rest of QNAM) since readProgress of the - // QNonContiguousByteDevice is used emit reply->dataReadProgress(reply->d_func()->totalProgress, 0); // make sure that the reply is valid if (channels[i].reply != reply) @@ -700,9 +697,6 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN // make sure that the reply is valid if (channels[i].reply != reply) return; - // emit dataReadProgress signal (signal is currently not connected - // to the rest of QNAM) since readProgress of the - // QNonContiguousByteDevice is used emit reply->dataReadProgress(reply->d_func()->totalProgress, reply->d_func()->bodyLength); // make sure that the reply is valid if (channels[i].reply != reply) diff --git a/src/script/qscriptengine.cpp b/src/script/qscriptengine.cpp index de78403..911d714 100644 --- a/src/script/qscriptengine.cpp +++ b/src/script/qscriptengine.cpp @@ -935,7 +935,7 @@ QScriptSyntaxCheckResult QScriptEngine::checkSyntax(const QString &program) the file name is accessible through the "fileName" property if it's provided with this function. - \sa canEvaluate(), hasUncaughtException(), isEvaluating(), abortEvaluation() + \sa checkSyntax(), hasUncaughtException(), isEvaluating(), abortEvaluation() */ QScriptValue QScriptEngine::evaluate(const QString &program, const QString &fileName, int lineNumber) { diff --git a/src/script/qscriptvalue.cpp b/src/script/qscriptvalue.cpp index 48e1318..520e76f 100644 --- a/src/script/qscriptvalue.cpp +++ b/src/script/qscriptvalue.cpp @@ -1442,7 +1442,7 @@ bool QScriptValue::isUndefined() const Note that function values, variant values, and QObject values are objects, so this function returns true for such values. - \sa toObject(), QScriptEngine::newObject() + \sa QScriptEngine::toObject(), QScriptEngine::newObject() */ bool QScriptValue::isObject() const { |