summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Some documentation fixesEskil Abrahamsen Blomfeldt2010-01-141-4/+7
| | | | Clarify the use of transformations combined with static texts.
* Support transformations in drawStaticText() and optimize for spaceEskil Abrahamsen Blomfeldt2010-01-149-61/+130
| | | | | | | | | | 1. Support transformations on the painter in drawStaticText(). Transforming the painter will cause the text layout to be recalculated, except for translations, which are handled by shifting the position of the text items. 2. Make const length arrays of the internal data in QStaticTextItem in order to minimize the memory consumption.
* Optimize QStaticText for spaceEskil Abrahamsen Blomfeldt2010-01-1410-110/+137
| | | | | | | | | | | By caching the results of getGlyphPositions() we can make a code path in the critical paint engines which is optimal both in space and speed. The engines where speed is of less importance (pdf engine etc.) which may need more information, we choose the slower code path of drawText() which lays out the text again. We should have optimal paths in raster, vg and GL2 paint engines. The others are less important. Memory consumption of static text is now 14 bytes per glyph, 8 bytes per item and a static overhead of 40 bytes per QStaticText object.
* Remove const-specifier to make QTextItemInt::operator=() more beautifulEskil Abrahamsen Blomfeldt2010-01-142-2/+2
| | | | | | | The const-specifier on the char format was unecessary, and made the operator= implementation ugly, so it has been removed. Reviewed-by: Simon Hausmann
* Respect font settings of QStaticText and clip to maximum sizeEskil Abrahamsen Blomfeldt2010-01-142-1/+22
| | | | | | | drawText() that renders into a QRect will clip the text (unless otherwise set by the text flags passed to the function.) In drawStaticText() we should do the same for identical behavior. We also need to respect the font set on the QStaticText object.
* Support maximumSize for the layout of the text in a QStaticTextEskil Abrahamsen Blomfeldt2010-01-146-59/+279
| | | | | | | Put back maximumSize property in QStaticText to allow matching calls to drawText with a target rectangle. Implementation is done by having a dummy paint engine which records the calls to drawTextItem() and storing these, then replaying them later.
* Speed optimization for QStaticTextEskil Abrahamsen Blomfeldt2010-01-146-23/+40
| | | | | | | Don't use QVector to store the text items, but put them in a regular array for quick access. drawStaticText() is now about 2.7 times the speed of drawText().
* Fix drawing in QStaticTextEskil Abrahamsen Blomfeldt2010-01-141-0/+1
| | | | Also clone the offsets structure into the new QGlyphLayout.
* Space optimization in QStaticTextEskil Abrahamsen Blomfeldt2010-01-142-14/+9
| | | | | | | The engine.layoutData's glyph count is the number allocated, which may be larger than the actual number of glyphs. To minimize the space needed we base allocation on "used" which contains the number of glyphs actually used to represent the text.
* Optimize QStaticText for one line stringsEskil Abrahamsen Blomfeldt2010-01-146-85/+98
| | | | | | | QTextLayout takes a lot of memory. We can get a bigger speed-up and a more reasonable memory consumption by only supporting the single line static texts and caching the text items. We need to copy some structs from the text engine, since this is on the stack.
* Fix memory leakEskil Abrahamsen Blomfeldt2010-01-141-1/+3
|
* Compile on S60Eskil Abrahamsen Blomfeldt2010-01-141-0/+1
|
* CompileEskil Abrahamsen Blomfeldt2010-01-141-2/+2
| | | | Q_DECLARE_PRIVATE requires d_ptr to be a QFooPointer<>-object.
* Add operators and implicit sharing to QStaticTextEskil Abrahamsen Blomfeldt2010-01-143-26/+91
| | | | | Adds copy constructor, operator==, operator= and operator!= to QStaticText. Implemented using an implicitly shared private object.
* Remove ambiguous overload for QStaticText() constructorEskil Abrahamsen Blomfeldt2010-01-141-1/+0
| | | | | The QStaticText(QString) constructor has been replaced by a constructor with defaults for the additional arguments
* Add lazy initialization to QStaticTextEskil Abrahamsen Blomfeldt2010-01-143-12/+114
| | | | | | People should be able to initialize the QStaticText lazily, or change its data after instantiation. Each of the setters will recalculate the layout to make sure it's always in sync.
* doc: Add documentation for QStaticText and QPainter::drawStaticText()Eskil Abrahamsen Blomfeldt2010-01-142-3/+86
|
* Add convenience overloads to QPainter::drawStaticText()Eskil Abrahamsen Blomfeldt2010-01-141-0/+12
| | | | | Adds the integer based overloads as inline functions, same as for QPainter::drawText().
* Fix formatting/clipping rectangle in QPainter::drawStaticText()Eskil Abrahamsen Blomfeldt2010-01-144-9/+95
| | | | | The rectangle should clip the text vertically and break lines horizontally, to mirror behavior of QPainter::drawText().
* Start support for formatting text within a bounding rectEskil Abrahamsen Blomfeldt2010-01-143-7/+7
| | | | | Support to mirror drawText(QRectF, QString). Instead of a rect you give the text a static size and then paint it to an arbitrary point later on.
* WhitespaceEskil Abrahamsen Blomfeldt2010-01-141-3/+2
| | | | Trailing spaces and an extra line of whitespace.
* Fix position of QStaticText textEskil Abrahamsen Blomfeldt2010-01-141-1/+1
| | | | | To mirror the behavior of drawText() the y-position origin should be the baseline of the text.
* Simplify QStaticTextEskil Abrahamsen Blomfeldt2010-01-143-52/+21
| | | | | Not much to gain by going directly to the QTextEngine, and the code is a lot simpler if we just use the QTextLayout instead.
* Introduce QStaticText APIEskil Abrahamsen Blomfeldt2010-01-146-2/+222
| | | | | | | | | Much of the time in drawText() is used on text layouting, which is wasted time when the text is not updated every frame. QStaticText is meant to cache the relevant parts of this work. It currently uses a copy-paste of the layout code in QPainter::drawText() and 99% of the time in QPainter::drawStaticText() is spent in drawTextItem(). We can use QTextLayout here instead without losing much.
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Alan Alpert2010-01-143376-4814/+6597
|\
| * Fix QGLWidget::renderPixmap() on Windows.Trond Kjernaasen2010-01-141-6/+6
| | | | | | | | | | | | | | | | Using renderPixmap() with scenes that contained textures might not work due to the wrong texture format being used under certain circumstances. Task-number: QTBUG-7213 Reviewed-by: Gunnar
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-01-1422-448/+530
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix rules for recreating the Makefile in a subdir Disable some tests that require high floating point precision. Replace the truncate function with fuzzierCompare(). Rework how Qt handles GL extensions. More changelog additions for QtWebKit Make compile on symbian/Linux Removed pointless image comparison in raster colorize filter. Improved performance of translating device coordinate graphics effects.
| | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-1412-27/+62
| | |\ | | | | | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | * | Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-1315-428/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt used to store the GL extensions a particular implementation supported in a global cache, which was initialized once and never updated. This could cause problems because different types of context might support different kinds of extensions (e.g. the difference between sw and hw contexts). With this patch, the GL extensions are cached and updated within each QGLContext. It also makes the extension initialization lazy, which saves application initialization costs for embedded platforms. The patch introduces a internal cross platform QGLTemporaryContext class that is used to create a light-weight GL context without going via QGLWidget and friends (QWS and WinCE still have QGLWidget fallbacks for now). Reviewed-by: Kim Reviewed-by: Samuel
| | * | Make compile on symbian/LinuxThomas Zander2010-01-131-1/+1
| | | | | | | | | | | | | | | | symbian headers on Linux are lowercase and this should work on Windows too.
| | * | Removed pointless image comparison in raster colorize filter.Samuel Rødal2010-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test is meant to check whether the grayscale operation is done in-place or not. Task-number: QTBUG-6901 Reviewed-by: Bjørn Erik Nilsen
| | * | Improved performance of translating device coordinate graphics effects.Samuel Rødal2010-01-135-18/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't invalidate the cache if we're only translating and the effect rect is fully contained within the device rect of the painter. Task-number: QTBUG-6901 Reviewed-by: Bjørn Erik Nilsen
| * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team into ↵Qt Continuous Integration System2010-01-1416-130/+68
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team: Revert "Frequency to SampleRate and channels to channelCount." missed Revert "Frequency to SampleRate and channels to channelCount." Revert "Added setChannelCount() to QAudioFormat."
| | * | Revert "Frequency to SampleRate and channels to channelCount."Kurt Korbatits2010-01-1412-96/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 80d4a4945d3273a4b2ce91e34597533f661af320. Conflicts: examples/multimedia/audioinput/audioinput.cpp examples/multimedia/audiooutput/audiooutput.cpp src/multimedia/audio/qaudio_mac.cpp src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp src/multimedia/audio/qaudioformat.h src/multimedia/audio/qaudioinput.cpp src/multimedia/audio/qaudiooutput.cpp tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp tests/auto/qaudioformat/tst_qaudioformat.cpp tests/auto/qaudioinput/tst_qaudioinput.cpp tests/auto/qaudiooutput/tst_qaudiooutput.cpp
| | * | Revert "Added setChannelCount() to QAudioFormat."Kurt Korbatits2010-01-148-34/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f124538ef4840c3d24b4c7e9e7221adb52bdee2c. Conflicts: examples/multimedia/audioinput/audioinput.cpp examples/multimedia/audiooutput/audiooutput.cpp src/multimedia/audio/qaudio_mac.cpp src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp src/multimedia/audio/qaudioformat.h src/multimedia/audio/qaudioinput.cpp src/multimedia/audio/qaudiooutput.cpp tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp tests/auto/qaudioformat/tst_qaudioformat.cpp tests/auto/qaudioinput/tst_qaudioinput.cpp tests/auto/qaudiooutput/tst_qaudiooutput.cpp
| * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-131-2/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Doc: Describe QStackedWidget::removeWidget() more thoroughly. Doc: Resized the window and added a title. Doc: Added a missing example to the list of Graphics View examples. Doc: Clarified why a path matches in the example given.
| | * \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6David Boddie2010-01-1383-690/+2098
| | |\ \ \
| | * | | | Doc: Describe QStackedWidget::removeWidget() more thoroughly.David Boddie2010-01-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Pierre Rossi
| * | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-01-131-10/+11
| |\ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: Use a QTextBrowser instead of a read only QTextEdit
| | * | | | Use a QTextBrowser instead of a read only QTextEditHarald Fernengel2010-01-131-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to display the extra text content. This works well on Maemo and on S60, and has the added benefit that external URLs (like in aboutQt) are opened correctly. Reviewed-By: Jason Barron
| * | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-1322-334/+419
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | * | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-01-134-8/+18
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: (22 commits) really, *really* fix the test :} QFile cannot deal with crlf-translated stdio, so use binary mode remove trimming of (expected) output really fix the autotest support regexp-like quantifiers of expected output lines remove superfluous \r filtering print actual rather than expected output for matching text Do not set the font size unnecessarily in the simulated s60 style. Doc typos fixed Translations: Update German for 4.6.1 fix test under windows don't complain about unresolved base when the reference is absolute make the lupdate tests more verbose in case of failure don't use qmake for test setup move equivalent of output_ts test to good/ look for the .result file in the dir where the output is expected to go fix sametext and number heuristics fix number heuristics, part 1 no point in specifying -ts when a .pro file is specified clean up the lupdatecmd files ...
| | | * \ \ \ Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2010-01-133376-3895/+5604
| | | |\ \ \ \ | | | | | |/ / | | | | |/| | | | | | | | | | | | | | | | Conflicts: tests/auto/linguist/lupdate/testlupdate.cpp
| | | * | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-01-124-8/+18
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: (21 commits) QFile cannot deal with crlf-translated stdio, so use binary mode remove trimming of (expected) output really fix the autotest support regexp-like quantifiers of expected output lines remove superfluous \r filtering print actual rather than expected output for matching text Do not set the font size unnecessarily in the simulated s60 style. Doc typos fixed Translations: Update German for 4.6.1 fix test under windows don't complain about unresolved base when the reference is absolute make the lupdate tests more verbose in case of failure don't use qmake for test setup move equivalent of output_ts test to good/ look for the .result file in the dir where the output is expected to go fix sametext and number heuristics fix number heuristics, part 1 no point in specifying -ts when a .pro file is specified clean up the lupdatecmd files tidy up the test .pro files ...
| | | | * \ \ \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-01-114-8/+18
| | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: Do not set the font size unnecessarily in the simulated s60 style. Doc typos fixed Translations: Update German for 4.6.1 fix test under windows don't complain about unresolved base when the reference is absolute make the lupdate tests more verbose in case of failure don't use qmake for test setup move equivalent of output_ts test to good/ look for the .result file in the dir where the output is expected to go fix sametext and number heuristics fix number heuristics, part 1 no point in specifying -ts when a .pro file is specified clean up the lupdatecmd files tidy up the test .pro files remove dead code
| | | | | * | | | Do not set the font size unnecessarily in the simulated s60 style.Christian Kamm2010-01-114-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
| | * | | | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-01-1317-325/+400
| | |\ \ \ \ \ \ \ | | | |_|_|_|/ / / | | |/| | | | | / | | | | |_|_|_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (26 commits) Fixed tst_qgl multipleFBOInterleavedRendering. Update autotest database connection settings SQL 4.6.1 changelog My changes Significant digits were lost in QDoubleSpinBox range when changing precision My changelog for 4.6.1. Added my changes to the 4.6.1 change log. Put LinesHint into QVectorPath hints to enable further optimizations Update changes file for 4.6.1 Avoid coordinate limitations in the raster engine. Update changelog with my 4.6.1 changes. 4.6.1 changes Fixed bug where QGLPixmapData::toImage() returned too dark image. Update change log with Yoann Lopes work. Fix completion in QFileDialog. Fix point drawing on raster engine for flat and square caps Update changes file with Rhys Weatherley's work. warning fixes for platforms, where qreal == float fix release mode crash in qfont.cpp initFontSubst() on Windows mobile Fixed justify aligned text drawing with the GL1 engine. ...
| | | * | | | | Fixed tst_qgl multipleFBOInterleavedRendering.Samuel Rødal2010-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to clobber the vertex attribute pointers _before_ we call setState() to regenerate the clip, or we'll use invalid vertex pointers when writing the clip. Reviewed-by: Paul
| | | * | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-01-1317-325/+400
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (23 commits) My changes Significant digits were lost in QDoubleSpinBox range when changing precision My changelog for 4.6.1. Added my changes to the 4.6.1 change log. Put LinesHint into QVectorPath hints to enable further optimizations Update changes file for 4.6.1 Avoid coordinate limitations in the raster engine. Update changelog with my 4.6.1 changes. 4.6.1 changes Fixed bug where QGLPixmapData::toImage() returned too dark image. Update change log with Yoann Lopes work. Fix completion in QFileDialog. Fix point drawing on raster engine for flat and square caps Update changes file with Rhys Weatherley's work. warning fixes for platforms, where qreal == float fix release mode crash in qfont.cpp initFontSubst() on Windows mobile Fixed justify aligned text drawing with the GL1 engine. Add odf-writer benchmark. Fixed subpixel antialiased text drawing with the GL2 engine. Fixes warning in the QMacStyle ...
| | | | * \ \ \ \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-01-1217-325/+400
| | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (23 commits) My changes Significant digits were lost in QDoubleSpinBox range when changing precision My changelog for 4.6.1. Added my changes to the 4.6.1 change log. Put LinesHint into QVectorPath hints to enable further optimizations Update changes file for 4.6.1 Avoid coordinate limitations in the raster engine. Update changelog with my 4.6.1 changes. 4.6.1 changes Fixed bug where QGLPixmapData::toImage() returned too dark image. Update change log with Yoann Lopes work. Fix completion in QFileDialog. Fix point drawing on raster engine for flat and square caps Update changes file with Rhys Weatherley's work. warning fixes for platforms, where qreal == float fix release mode crash in qfont.cpp initFontSubst() on Windows mobile Fixed justify aligned text drawing with the GL1 engine. Add odf-writer benchmark. Fixed subpixel antialiased text drawing with the GL2 engine. Fixes warning in the QMacStyle ...