diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-16 18:08:19 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-16 18:08:19 (GMT) |
commit | 82440843435b8bf02391fae1c9df6f081a945a65 (patch) | |
tree | 560873dbe432b3a55d1cc4ff8c47388e9498ff8d /src/gui | |
parent | 6ddda99db20203917229e399c4b8d333a119c3d6 (diff) | |
parent | 5b47a913473802d377ec303b425eb1ad0496f843 (diff) | |
download | Qt-82440843435b8bf02391fae1c9df6f081a945a65.zip Qt-82440843435b8bf02391fae1c9df6f081a945a65.tar.gz Qt-82440843435b8bf02391fae1c9df6f081a945a65.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Translate bughowto.qdoc into zh_CN.
diagramscene example: fix leak and crashes.
qdoc: Reorganized the QML elements table to be a dictionary...
qgrayraster: Speed up rendering of small cubic splines.
Fix compilation: QT_NO_LINEEDIT
Doc: Removed invalid entities in documentation.
Doc: Fixes to Qt Quick documentation.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qgrayraster.c | 36 | ||||
-rw-r--r-- | src/gui/util/qcompleter.cpp | 2 |
2 files changed, 18 insertions, 20 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index 5e7c67a..539a33c 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -956,53 +956,49 @@ const QT_FT_Vector* control2, const QT_FT_Vector* to ) { - TPos dx, dy, da, db; int top, level; int* levels; QT_FT_Vector* arc; + int mid_x = ( DOWNSCALE( ras.x ) + to->x + + 3 * (control1->x + control2->x ) ) / 8; + int mid_y = ( DOWNSCALE( ras.y ) + to->y + + 3 * (control1->y + control2->y ) ) / 8; + TPos dx = DOWNSCALE( ras.x ) + to->x - ( mid_x << 1 ); + TPos dy = DOWNSCALE( ras.y ) + to->y - ( mid_y << 1 ); - dx = DOWNSCALE( ras.x ) + to->x - ( control1->x << 1 ); if ( dx < 0 ) dx = -dx; - dy = DOWNSCALE( ras.y ) + to->y - ( control1->y << 1 ); if ( dy < 0 ) dy = -dy; if ( dx < dy ) dx = dy; - da = dx; - - dx = DOWNSCALE( ras.x ) + to->x - 3 * ( control1->x + control2->x ); - if ( dx < 0 ) - dx = -dx; - dy = DOWNSCALE( ras.y ) + to->y - 3 * ( control1->x + control2->y ); - if ( dy < 0 ) - dy = -dy; - if ( dx < dy ) - dx = dy; - db = dx; level = 1; - da = da / ras.cubic_level; - db = db / ras.conic_level; - while ( da > 0 || db > 0 ) + dx /= ras.cubic_level; + while ( dx > 0 ) { - da >>= 2; - db >>= 3; + dx >>= 2; level++; } if ( level <= 1 ) { - TPos to_x, to_y, mid_x, mid_y; + TPos to_x, to_y; to_x = UPSCALE( to->x ); to_y = UPSCALE( to->y ); + + /* Recalculation of midpoint is needed only if */ + /* UPSCALE and DOWNSCALE have any effect. */ + +#if ( PIXEL_BITS != 6 ) mid_x = ( ras.x + to_x + 3 * UPSCALE( control1->x + control2->x ) ) / 8; mid_y = ( ras.y + to_y + 3 * UPSCALE( control1->y + control2->y ) ) / 8; +#endif gray_render_line( RAS_VAR_ mid_x, mid_y ); gray_render_line( RAS_VAR_ to_x, to_y ); diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp index 04d6de9..e718212 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -921,10 +921,12 @@ void QCompleterPrivate::showPopup(const QRect& rect) void QCompleterPrivate::_q_fileSystemModelDirectoryLoaded(const QString &path) { Q_Q(QCompleter); +#ifndef QT_NO_LINEEDIT QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget); //the path given by QFileSystemModel does not end with / if (lineEdit && !lineEdit->text().isEmpty() && !q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/')) q->complete(); +#endif } /*! |