| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QStaticTextItem held an uncounted reference to QFontEngine. The
pointer would dangle in some cases where there was no font object
referencing the engine and the cache was cleaned out (e.g. when a
new application font is added.) Properly count the reference, and also
add reference counting to userData to make it harder to shoot yourself
in the foot, since the QStaticTextItem class is now being used in
different places,
Task-number: QTBUG-14446
Reviewed-by: Martin Jones
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits)
Stabilize tst_QGraphicsWidget::QT_BUG_13865_doublePaintWhenAddingASubItem
Fixed accessing freed memory in raster engine.
Build fix for -qtnamespace.
Fixed parsing of SVGs with absolute font sizes.
Moving QPdf::stripSpecialCharacter to fontengine
Revert "Fix (implement!) hfw/wfh in QGridLayoutEngine"
Fixed a layout issue where you could get NaN as dimensions
QTextCodec: Fix valgrind warning when using QTextCodec in destructions functions
Fix double painting when adding an item into a linear layout
Fixed antialiased rasterization bug in raster engine.
Fixed potential crash when loading corrupt GIFs.
Work around an ATI driver problem with mutli-sampled pbuffers.
tst_qstatemachine.cpp: fix compilation with Sun Studio
Fixed regression in clipping.qps autotest on 64-bit.
Fixed crash when using Qt::WA_DeleteOnClose on a QPrintDialog on Mac.
Fixed performance regression in curve stroking.
Don't disable texture_from_pixmap on GLX/X11 by default.
Avoid creating copy of an image in memory when storing as png
Doc update for the support of MSVC 2010 64-bit
fix documentation of drawText(int, int, int, int, ...
...
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change 4c515ceb fixed Intersect and Unite-clipping after doing
setClipping(false), but also introduced a performance problem.
If there was no pre-existing clip we'd convert IntersectClips to
ReplaceClips, which is unnecessary since the paint engines already
handle this correctly.
IntersectClips can be handled much more efficiently in the OpenGL 2
paint engine for example. We only need to convert to ReplaceClip when
someone has used setClipEnabled(false) which is anyways expensive and
not recommended.
Reviewed-by: Trond
|
|\ |
|
| |
| |
| |
| |
| | |
Task-number: QTBUG-13331
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Like OpenGL2 and OpenVG, the OpenGL1 paint engine also transforms text
coordinates itself and does not require QStaticText to use device
coordinates.
Task-number: QTBUG-13228
Reviewed-by: Samuel
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Tasks: QTBUG-13271, QTBUG-13212, QTBUG-12321
Reviewer: David Boddie
|
|/
|
|
|
|
|
|
| |
There are explicit tests in qdatastream for this. IMO it's wrong,
wrong, wrong, but it's currently abused in the SVG module so we can't
change it.
Reviewed-by: Gunnar
|
|
|
|
|
|
|
|
|
|
|
| |
The OpenVG paint engine, like the OpenGL2 paint engine, supports
caching the untransformed glyphs and transforming them as they are
drawn. Since we would pretransform the positions of the glyphs, the
transformation would be applied twice, thus making the glyphs appear
in the wrong location when the painter had a transform set.
Task-number: QTBUG-13049
Reviewed-by: Gunnar
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original code path of QStaticText does not include decoration
drawing, this patch generalized the drawTextItemDecoration()
function to draw decoration for drawText(), then use that to draw
decoration for QStaticText. A helper function called
drawDecorationForGlyphs() is made to allow easier extension for
direct glyphs drawing support.
Task-number: QTBUG-12121
Reviewed-by: Eskil
|
|
|
|
|
|
|
|
|
|
| |
When drawPixmapFragments() is called with fragments that has invalid
source rects in it, then usually it causes the pixmap drawn on screen
to appear corrupted. However it has been reported that a crash can
occur (not reproducable locally) so by adding a warning in debug mode
only means that this can hopefully be caught at development time.
Reviewed-by: Trond
|
|
|
|
|
|
| |
The QPaintBuffer gets the text from the text item in order to stream it.
Reviewed-by: Jocelyn Turcotte
|
|
|
|
|
|
|
|
| |
Avoid marking the composition mode as dirty and calling into the
extended engine if the composition mode that the application wants to
set is the same that's currently used.
Reviewed-by: Gunnar
|
|
|
|
|
|
|
| |
The behavior should be the same as for arcs and rects.
Task-number: QTBUG-2743
Reviewed-by: Eskil
|
|
|
|
|
|
|
|
|
| |
Don't retrieve the layout direction from QWidget or
QApplication anymore. Respect if somebody explicitly sets the
direction with setLayoutDirection().
Task-number: Part of QT-3292
Reviewed-by: Simon Hausmann
|
|
|
|
| |
Reviewed-by: ogoffart
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Some optimizations for QImage::load()
fix setRawData()
Fix QML crashes on the N900
doc: Added DITA XML generator
Fix build failure on Symbian 3.1.
Add the Qt::TextBypassShaping flag.
QTextEngine: skip an unnecessary call to GetDeviceCaps on Windows.
Add my 4.7.0 changes
qdoc: Added DITA XML generator
doc: Fixed confusing ownership issue.
update Russian translations for Qt tools
update Russian translation for Qt libraries
QXmlSchema documentation correction
doc: Changed last breadcrumb to not be a link.
doc: Fixed reference to setSize(), which is in QRectF.
QNetworkCookie: do not accept cookies with non-alNum domain
QtDeclarative: Remove trailing commas in enums
Doc: MonotonicClock is obviously monotonic
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows quick layouting especially with Windows fonts which
contain heavy OpenType logic.
On regular latin text the visual compromize is the loss of kerning,
justification, capitalization, word spacing and letter spacing support.
Reviewed-by: Simon Hausmann
Reviewed-by: Eskil
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the OpenGL2 paint engine supports transforming the prerendered
glyphs rather than rasterizing the glyphs with the transformation
applied, we don't need to recalculate the QStaticText layout whenever
the transformation changes. This means that we can do fast animated
transforms for QStaticText on this paint engine. A quick test yields
something like 100x speed-up on Windows. This also give visually
better results, as we previously would animate the hinting of the
glyphs, thus causing jittering.
The autotest has been updated to reflect the fact that drawText() and
drawStaticText() now go through identical paths on GL, also when
transforms are set on the painter. However, the scale was changed in
one test, because it was so great that drawText() would fall back to
paths. With QStaticText the idea is speed, so you'll get a poor, but
fast result instead, which is better than tricking people.
Reviewed-by: Samuel
|
|\
| |
| |
| |
| | |
Conflicts:
src/corelib/tools/qlocale_symbian.cpp
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
demos/demos.pro
mkspecs/features/resources.prf
mkspecs/features/uic.prf
src/corelib/io/qurl.cpp
src/corelib/tools/qlocale_symbian.cpp
src/gui/graphicsview/qgraphicsscene.cpp
src/gui/graphicsview/qgraphicswidget_p.cpp
src/gui/graphicsview/qgraphicswidget_p.h
src/gui/util/qsystemtrayicon_win.cpp
src/multimedia/audio/qaudioinput.cpp
tests/auto/qhostinfo/qhostinfo.pro
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When going through the special WebKit code path for text drawing and
forcing justification for text, we would set the justification in the
text engine, but never actually update the widths of the script items.
Since the width of the script item is used to position the text, the
text would be drawn with the correct justification, but the position
would be set based on the non-justified text width. The result was
overlapping text whenever the script of the text changed. The fix goes
through the justified glyphs and sets the width and position based on the
new effective advance.
Task-number: QTBUG-10421
Reviewed-by: Simon Hausmann
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
When using the fallback in QStaticText we have to update its font
to the current painter's font, otherwise we will override the painter's
font with the one cached in the QStaticText object.
Reviewed-by: Olivier
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use qt_draw_glyphs() to implement a QPaintBuffer::drawStaticText() which
will actually replay via drawStaticTextItem() on engines that support
it.
Task-number: QTBUG-9064
Reviewed-by: Gunnar
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To avoid the unnecessary overhead of doing the text layout every time
a part of the QStaticText object is changed, we mark it as invalid
instead and do the layout when we have to. This means an overhead on
the first paint event for most users. The overhead can be avoided by
using the QStaticText::prepare() function and will probably not be
noticable anyway, since it's a one-time thing.
Task-number: QTBUG-9030
Reviewed-by: Gunnar
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To avoid having to precalculate the height of the laid out text, we
now only supply a maximum text width to QStaticText. The only usage of
the maximum height would be to clip the results, and clipping should be
set separately from the QStaticText call, since this has no impact on
the layout of the glyphs. The tests have been updated to reflect the
change in logic.
We also need a consistent way of specifying the position of the text.
Before, the position meant "baseline position" for unbroken text and
"top left position" for text with a specified layout width. We want
to be consistent, and since baseline position makes no sense for
multiline text, we standardize on top left position.
Task-number: QTBUG-9029
Reviewed-by: Gunnar
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QStaticText needs to support changing the pen on the painter to support
rich text, but it should not override the pen unless it has been
explicitly set in the rich text. We do this by marking the pen as dirty
in updateState() when we record the text items.
Task-number: QTBUG-8908
Reviewed-by: Gunnar
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a function to QTextLine which returns the accumulated advance of
the glyphs in the text. Previously QTextLine::naturalTextWidth() was
used for both this purpose and for calculating the pixel width of the
text. Since these two metrics are not the same, either of the two
usages would be wrong. QTextLine::naturalTextWidth() has been changed
to do what its documentation claims it does, and horizontalAdvance()
should now be used for laying out text horizontally.
Reviewed-by: Simon Hausmann
|
| |
| |
| |
| |
| |
| |
| | |
Copy the sub-pixmap so that we don't need to convert the entire pixmap
to a QImage each time.
Reviewed-by: Gunnar Sletta
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4.7-integration
* '4.7-cutoff' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (82 commits)
Revert 12b6987031be9faee3886d7623888feb4e1762af
Changed TEST_COMPILER from CC to CXX in configure script.
doc: Fixed several qdoc errors.
Carbon: Native filedialog does not apply filters on app-bundles
Cocoa: Native filedialog does not apply filters on app-bundles
Improve performance of QTimer::singleShot
Add a benchmark comparing single shot timer with invokeMethod
use Qt's private mac functions, reduce code redundancy
Assistant: Fix compile warning for empty header.
Doc: mark QEasingCurve support functions as new in 4.7.
Modify the XML test suite not to use non-characters.
Autotest: Fix failing QTextCodec tests
Doc: mark methods as internal (as they were in previous releases)
Doc: add image for Qt Quick to "What's New" page.
qdoc: Clear a static multimap after each qdocconf file.
qdoc: Added some debug output to track down a crash
Fixed mouse wheel handling in scrollareas.
Added two missing keys for X11
Carbon: usage of menu bars can cause exceptions to be thrown
Mac: compile fix
...
|
| | | |
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | | |
Reviewed-by: Kim
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the 4.7 port of d04f5336f769d9e5d2f9105e1da4a7d23ea91795.
Task-number: related to QTBUG-8455
Reviewed-by: Kim
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In change 5364fd96a72c89b281f0540da909fe64d0575ccf and some related
changes, we made sure that the natural text width used for calculating
bounding rects and line breaks in the text, takes the right bearing
of the last glyph into consideration.
As a side-effect, this broke alignment of text, as we want to align
based on the accumulated advance of the glyphs, not based on the actual
width. This is in particular important when aligning monospaced text,
since the text can become misaligned if the glyphs extend beyond their
advance. The bug was visible e.g. in line numbers ending with 2 in
Qt Creator on X11, which would be shifted one pixel to the left compared
to other line numbers.
Task-number: QTBUG-8864
Reviewed-by: Thorbjørn
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
configure
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/network/access/qnetworkaccessmanager.cpp
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/s60installs/s60installs.pro
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
configure
src/gui/painting/qpainter.cpp
src/s60installs/s60installs.pro
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In some use cases where you use an external font engine and want to
use Qt's font engine for painting, you might need a function which will
give you direct access to the underlying font. A generic API for this
requires a lot of API changes, so in the meantime, we implement an
internal, specialized API to support the use cases where it is
required. The API is considered internal and experimental, and not
guaranteed to be stable or even exist across releases.
This is API which provides several fun ways to shoot yourself in the
foot, but if used properly, it will allow you to paint glyph ids at
precalculated positions.
Task-number: QTBUG-7844
Reviewed-by: Trond
|
| |_|_|/ /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
QPainter has now gotten a drawPixmapFragments() function together
with a Fragment class that describes how each pixmap fragment is
supposed to be drawn.
Reviewed-by: Gunnar
Reviewed-by: Samuel
|
|\ \ \ \ \
| |_|_|_|/
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
configure.exe
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/qgl.cpp
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When the paint engine does not support QStaticText, we fall back to
regular drawText() calls. This fallback would previously paint all
text to (0, 0). This fixes the qstatictext autotest on Linux.
Reviewed-by: Olivier
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Make some smaller modifications, fixes and additions. Remove \internal
because the API is public now, and add documentation for
QPainter::drawStaticText() since this was missing.
Reviewed-by: TrustMe
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
isEmpty() function in QStaticText
To make the return value of text() more intuitively clearer, and to make
the API more readable, I've separated out the text format into a
separate property. The isEmpty() function seemed out-of-place in the
API, as suggested by reviews, so it has been removed.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Required for several use cases, support for some html tags to change
font, color and do advanced text layouts, as well as getting the
bounds of the text when drawn.
|