| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
Conflicts:
src/s60installs/s60installs.pro
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts 518c2a58ed6fdfd7449cb4476aa8ea0d32ad16e3 which caused a
regression.
When writing systems are mixed and an underline is set on the font,
QPainter will set a pen with the current color and a new width on
itself before drawing the decoration. This would cause the recorder
in QStaticText to mark the pen as dirty, saving the current pen
color in all subsequent text items. The effect was e.g. that in QML
the cached color would override the current one, making it impossible
to change the color on the text without forcing a relayout somehow.
The right fix is to only mark the pen as dirty when its color actually
changes.
Task-number: QTBUG-20159
Reviewed-by: Jiang Jiang
|
| |
| |
| |
| |
| |
| |
| | |
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| | |
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.
Reviewed-by: Trust Me
|
|/
|
|
| |
Reviewed-by: Samuel Rødal
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
The document layou will call setPen() with the PaintContext's text
color. If this is different from the current painter settings, the pen
will be passed on to the paint engine. The result was that, on X11 using
the raster (or opengl) engine, QStaticText would record the pen as
changed even when it hadn't explicitly been changed by the document.
Task-number: QTBUG-13740
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
|
| |
The assumption that the output glyph array and input glyph array is
of equal size is wrong when unprintable characters are used (and
discarded in getGlyphPositions())
Task-number: QTBUG-12614
Reviewed-by: Jiang Jiang
|
|
|
|
|
|
|
|
|
| |
The text option property of QStaticText was not copied in the copy
constructor, so when the text was detached, the property would be
reset to the default.
Task-number: QTBUG-13368
Reviewed-by: Gunnar
|
|
|
|
|
|
|
|
|
| |
There has been some confusion concerning what HTML tags can be used
when using the rich text format with QStaticText. This patch attempts
to make it clearer in the documentation that the tags have to be text
related.
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
|
|
| |
Qt has a run-time assert for implementing drawPolygon() in any subclass
of QPaintEngine, which will be hit if set font decorations on the font
used by QStaticText. Since we don't care about line decorations or any
other shapes drawn in the QTextLayout, we simply leave the
implementation empty.
Reviewed-by: Gunnar
|
|
|
|
|
|
|
|
| |
QTextBlock::layoutDirection() doesn't exist, and the QStaticText
constructor no longer takes a size argument.
Task-number: QTBUG-12072
Reviewed-by: Fabien Freling
|
|
|
|
|
|
|
|
| |
This is (supposedly) more efficient as the compiler can optimise it to a
builtin, per Thiago.
Merge-request: 2430
Reviewed-by: Andreas Kling <andreas.kling@nokia.com>
|
|
|
|
| |
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
To allow more control over the layout process for a QStaticText,
introduce a QTextOption API. This will allow you to, e.g., set an
alignment for the text layout. Patch also contains a couple of bug fixes
to make right alignment work correctly when you set a text width on
the QStaticText.
Task-number: QTBUG-9031
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
qMemCopy is faster than memmove, and there's no chance of overlapping
source and destination memory in these cases.
Reviewed-by: Samuel
|
|
|
|
|
|
|
|
|
|
| |
Since QStaticText would be created once and used often, not much thought
was put into optimizing its initialization. For simplicity, the code
would do two drawText() passes. Since this was an unnecessary overhead,
the extra pass has been removed and replaced by memmoves instead.
Initialization is now twice as fast.
Reviewed-by: Samuel
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (71 commits)
Autotest: increase wait time to 3s on Windows to bypass 2s-granularity limitation
Autotest: update to the new values for the locale
do not expand variables in read()'s file name
remove ability to use break() a block outside any loop
don't add -unix to the qmake command line
Increase the timeout for the QNAM getter test to 30 seconds
Remove unstable hosts from the list
qdoc: Output TOC for more class ref pages.
Other fixes to the remote network stresstester
Fix SSL connection problem.
Make sure we don't try URLs that aren't HTTP or HTTPS
Fix menu bar visibility.
Add SSL remote host tests
Split the remote and the local tests in two, in preparation for SSL tests
Add tests for remote hosts
Change the way we calculate the average transfer rates.
Finish renaming
Move these tests to tests/manual.
Add a QNetworkAccessManager stresstest
Add a non-blocking native function too
...
|
| |
| |
| |
| |
| |
| |
| |
| | |
The bearer management code, which this bug is for, was fixed by MR 517
previously.
Task-number: QTBUG-9493
Reviewed-by: alex
|
|/
|
|
|
|
|
| |
More corrections to declarations to ensure symbol visibility is correct
Task-number: QTBUG-9998
Reviewed-by: TrustMe
|
|
|
|
|
|
| |
Synchronize order of initialization with order of declaration.
Reviewed-by: TrustMe
|
|\
| |
| |
| |
| | |
Conflicts:
src/gui/text/qstatictext.cpp
|
| |
| |
| |
| |
| | |
Merge-request: 528
Reviewed-by: Zeno Albisser
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using rich text, QStaticText should still respect the painter's
pen color as the default. Since QTextDocument does not respect the pen
set on the painter, we need to set its default style sheet to include
the pen color as well.
Reviewed-by: Olivier
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
| |
Drawing a string as plain text and rich text should have identical
results unless special formatting information is added in the html.
This means we should not have any implicit margin on the QTextDocument
used to paint the text, and we should make up for the fact that
the drawStaticText() call currently takes the position of the baseline
and QTextDocument::drawContents() takes the top-left corner.
Reviewed-by: Gunnar
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As a left over from when the d pointer was a plain pointer and not
a QExplicitlySharedPointer, we were setting the reference count to 1 on
construction. Since QExplicitlySharedPointer handles the ref count,
a newly constructed QStaticText would have a ref count of 2, and thus
would always detach upon modification.
Reviewed-by: Gunnar
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
Gcc warns if declaration and initialization order are different.
Reviewed-by: Samuel
|
|/
|
|
|
|
|
|
| |
When the QStaticText is detached, we would previously reset the
value of useBackendOptimizations rather than copy it into the new
data.
Reviewed-by: Gunnar
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Make the API more general and more readable by using a PerformanceHint
enum instead of an on/off-trigger for the OpenGL-specific caching.
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
QStaticText was previously made private API to support inclusion in
Qt 4.6.x. This change turns it back into public API for Qt 4.7.0.
|
|
|
|
|
|
|
|
|
|
|
| |
We can't add new symbols to QPainter for Qt 4.6.x, as we would not be
able to remove them again if we regretted the API. Hence, I've made
removable symbols instead, a private global function and a
drawStaticText() in QPainterPrivate. In order to tie things together,
I needed a static private-getter in QPainterPrivate, and hence it
had to be a friend of QPainter.
Reviewed-by: Trond
|
|
|
|
|
|
|
|
| |
Turns QStaticText into private API in preparation for Qt 4.6.x. The
related functions in QPainter are marked as internal in the docs. There
are already internal functions in QPainter, so this seemed like a
reasonable solution. Since the functions require QStaticText they will
not be accessible to anyone who does not include private API.
|
|
|
|
| |
Remove unsafe comparison since true is defined as non-zero only.
|
|
|
|
|
| |
QStaticText will be added as public API in Qt 4.7, and as private API
in Qt 4.6.
|
|
|
|
|
|
|
|
| |
There's a big improvement to be seen in the OpenGL engine by caching
the vertex data for the QStaticText in VBOs. In order to have the
buffers properly disposed, I've implemented a userdata concept for
QStaticTextItem. By default, the optimizations will be turned off, and
can be turned on by using the useBackendOptimizations flag.
|
|
|
|
| |
The copy constructor for QStaticTextPrivate was never called.
|
|
|
|
| |
Avoid crash when copying a QStaticTextPrivate object
|