summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Support transformations in drawStaticText() and optimize for spaceEskil Abrahamsen Blomfeldt2010-01-148-60/+129
| | | | | | | | | | 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-149-109/+136
| | | | | | | | | | | 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-141117-1315/+1413
|\
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-146-20/+34
| |\ | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | * 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-1319-74/+94
| | | |\
| | | * | Doc: Describe QStackedWidget::removeWidget() more thoroughly.David Boddie2010-01-131-2/+5
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Pierre Rossi
| | * | | 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/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-131117-1227/+1261
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| | | | * | | 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>
| * | | | | | 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 remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-121117-1260/+1269
| |\ \ \ \ \ | | | |_|/ / | | |/| | | | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | * | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-121117-1227/+1261
| | |\ \ \ \ | | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (73 commits) doc: update snippets for QtScript function expressions Prevent a crash when creating an inputContext from the QApplication dtor. QNAM HTTP Code: Cache socket state inside ensureConnection() tst_qhttpnetworkconnection: Test also HEAD in some tests tst_qhttpnetworkconnection: Relax condition in getMultipleWithPriorities QNAM HTTP Code: When starting new request, prefer connected sockets. typo fix Added the 'framecapture' WebKit example to the default build. Fix code example fix typo in qreadwritelock's documentation QNAM HTTP: Don't call d_func() so often QNAM HTTP: Fix readBuffer maximum size. QNAM HTTP: Optimize eatWhitespace() QNAM HTTP: Check if socket already tries to connect. network internals: fix build on S60 [syncqt] Make -separate-module work with WebKit's directory structure doc: Corrected explanation of when append() does nothing. doc: Added clarification about allocating space for the 0 terminator. Add a way to access the normalised URL in QUrl. [syncqt] Make it possible to synchronize headers for a separate module ...
| | | * | | Prevent a crash when creating an inputContext from the QApplication dtor.Simon Hausmann2010-01-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complete the fix in f72165460d27860cabd51691f4d935fd74b50f80 by applying the same fix to Symbian and QWS. Task-number: QTBUG-7105 Reviewed-by: Alexis Reviewed-by: Jason McDonald
| | | * | | typo fixRitt Konstantin2010-01-111-1/+1
| | | | |/ | | | |/| | | | | | | | | | | | | | | | Merge-request: 2077 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| | | * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-091117-1224/+1258
| | | |\ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (49 commits) Reverted two commits that were pushed to the wrong branch. Use the new QTextCodec api in the QXmlStreamWriter. Added new functions to QTextCodec that accept ConversionFlags. Fix passing of arguments to syncqt doc: Fixed typos. Fixes: Fix spinbox with NoButton style in QGtkStyle doc: Explained parameter value defaults where appropriate. Cocoa: Fix painting errors on QGLWidget resizing. Fix broken QGLWidget::renderPixmap on Mac/Carbon Fixes: Setting any style sheet breaks checkbox positioning Fixes: MenuItem size fixes and missing separator with Gtk+ Autotest: add a test for QNAM's HTTP cache handling code QNAM HTTP: just use the expirationDate in the code that validates the cache QNAM HTTP: change the caching semantics to match documentation QNAM HTTP: fix the caching algorithm from RFC 2616 Avoid repeatedly calling LookupAccountSid in QFSFileEngine::owner improve readability a bit more fix styling; improve readability make it possible to retrieve name of the user who owns the file Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 99ccc1c3e4db5354246720f9b9aa3d282e64497d ) ...
| | | | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-091117-1224/+1258
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (49 commits) Reverted two commits that were pushed to the wrong branch. Use the new QTextCodec api in the QXmlStreamWriter. Added new functions to QTextCodec that accept ConversionFlags. Fix passing of arguments to syncqt doc: Fixed typos. Fixes: Fix spinbox with NoButton style in QGtkStyle doc: Explained parameter value defaults where appropriate. Cocoa: Fix painting errors on QGLWidget resizing. Fix broken QGLWidget::renderPixmap on Mac/Carbon Fixes: Setting any style sheet breaks checkbox positioning Fixes: MenuItem size fixes and missing separator with Gtk+ Autotest: add a test for QNAM's HTTP cache handling code QNAM HTTP: just use the expirationDate in the code that validates the cache QNAM HTTP: change the caching semantics to match documentation QNAM HTTP: fix the caching algorithm from RFC 2616 Avoid repeatedly calling LookupAccountSid in QFSFileEngine::owner improve readability a bit more fix styling; improve readability make it possible to retrieve name of the user who owns the file Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 99ccc1c3e4db5354246720f9b9aa3d282e64497d ) ...
| | | | | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-081117-1224/+1258
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (49 commits) Reverted two commits that were pushed to the wrong branch. Use the new QTextCodec api in the QXmlStreamWriter. Added new functions to QTextCodec that accept ConversionFlags. Fix passing of arguments to syncqt doc: Fixed typos. Fixes: Fix spinbox with NoButton style in QGtkStyle doc: Explained parameter value defaults where appropriate. Cocoa: Fix painting errors on QGLWidget resizing. Fix broken QGLWidget::renderPixmap on Mac/Carbon Fixes: Setting any style sheet breaks checkbox positioning Fixes: MenuItem size fixes and missing separator with Gtk+ Autotest: add a test for QNAM's HTTP cache handling code QNAM HTTP: just use the expirationDate in the code that validates the cache QNAM HTTP: change the caching semantics to match documentation QNAM HTTP: fix the caching algorithm from RFC 2616 Avoid repeatedly calling LookupAccountSid in QFSFileEngine::owner improve readability a bit more fix styling; improve readability make it possible to retrieve name of the user who owns the file Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 99ccc1c3e4db5354246720f9b9aa3d282e64497d ) ...
| | | | | | * Fixes: Fix spinbox with NoButton style in QGtkStyleJens Bache-Wiig2010-01-081-44/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task: QTBUG-6952 RevBy: ogoffart Details: We simply need to handle this case explicitly to draw like a GtkEntry.
| | | | | | * Cocoa: Fix painting errors on QGLWidget resizing.Morten Johan Sørvig2010-01-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revby: Trond We need to update the GL context syncronously during the resize to prevent flicker. Use the existing MacGLWindowChange machinery to do that.
| | | | | | * Fixes: Setting any style sheet breaks checkbox positioningJens Bache-Wiig2010-01-081-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task: QTBUG-7198 RevBy: ogoffart Details: It was impossible to override the checkbox positioning in a custom style if any style sheet was set on the application of widget. This was because the style sheet never passed control to the base style. We now fix it by checking if the style sheet has the appropriate style rules.
| | | | | | * Fixes: MenuItem size fixes and missing separator with Gtk+Jens Bache-Wiig2010-01-083-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task: QTBUG-6522 RevBy: thorbjorn Details: This fixes missing separator line in the Dust theme. The patch also significantly improves the accuracy of menu item size metrics by making use of gtk_widget_size_request to query things like default heights. - More accurate offset and size of separators - Fixed item height of menu items using size_request - Fixed vertical offset of label and check boxes - Fixed clipping issue on last menu item
| | | | | | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-084-15/+21
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/multimedia/audio/qaudioformat.cpp
| | | | | | * | Fixes a crash when destroying and creating QApplication.Denis Dzyubenko2010-01-075-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved the gestureManager pointer to a QApplicationPrivate to make sure if QApplication object is destroyed, QGestureManager pointer is set to zero. Task-number: QTBUG-7029 Reviewed-by: Thiago
| | | | | | * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-071117-1128/+1137
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.