summaryrefslogtreecommitdiff
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-0793-93/+93
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Update copyright year to 2010Jason McDonald2010-01-0793-93/+93
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-01-061-3/+10
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (42 commits) QBoxLayout::setGeometry would not respect the widget min/max width Revert "QStyleSheetStyle: Fixed some text croped when having padding with native border." Use QFile:rename when moving items in QFileystemModel. Revert "Add GLfloat[2][2] & GLfloat[3][3] uniform setters to QGLShaderProgram" Fix default filter selection when using HideNameFilterDetails option. Don't write out fo:word-spacing if its the default value. Improved initial startup time for a QGLWidget ontop of EGL/X11. Document the QGraphicsView::IndirectPainting flag Display broken symlinks in the filesystem model. Fix typo in autotest testcase name. Fixed a bug with distribution of spans. Make unit test more robust Compile with QT_NO_DOCKWIDGET Removed temporary QGLWidget created during QGLWidget/X11 initialization. Fix test: The bug is now fixed Fix auto-test failure on Windows QScript: Lookup the native setter from the prototype Implement QScript::QObjectDelegate::getOwnPropertyDescriptor fix compilation in GL2 paint engine for Windows Move QGLTextureGlyphCache into it's own file ...
| * Don't write out fo:word-spacing if its the default value.Thomas Zander2010-01-061-2/+2
| | | | | | | | | | | | | | | | | | the property fo:word-spacing is still not in an official ODF spec so a strict schema check will fail in any doc that uses it. Lets make sure we limit the writing of that property to only those usecases where the property was really set by the user. Task-number: QTBUG-5725
| * Fix background brush for character format when writing to ODF document.Pierre Rossi2009-12-301-1/+8
| | | | | | | | | | Task-number: QTBUG-7047 Reviewed-by: Benjamin Poulain
* | doc: Fixed references to currsor position().Martin Smith2010-01-061-26/+29
|/ | | | Task-number: QTBUG-6763
* Edit focus should not be lost unless by explicit actionSami Merila2009-12-211-1/+5
| | | | | | | | | | | | Currently non-touch devices lose edit focus if window switch happens. I.e. in cases when screensaver activates, an incoming call occurs, a global notification is shown... With this fix, edit focus remain active, until user removes the focus explicitly. Task-number: 4792 Reviewed-by: axis
* Merge remote branch 'staging/4.6' into 4.6Simon Hausmann2009-12-171-7/+7
|\
| * Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6David Boddie2009-12-141-2/+10
| |\
| * | Doc: Fixed references to "old" 2.x and "new" 3.x font name conventions.David Boddie2009-12-071-7/+7
| | | | | | | | | | | | | | | Reviewed-by: Trust Me As-reported-by: Eskil
* | | Fix vertical text centering on Mac OS XEskil Abrahamsen Blomfeldt2009-12-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 04d18b38 fixed the windows and ft font engines so that the height reported in QFontMetrics is now correct, but this make vertical text centering one off as the platform defaults is to round down rather than up when the vertical position of the text is in the middle of a pixel. When this was fixed in change 1de8a5b, the vertical centering broke on Mac, since it still reported a too great font height. This patch applies the same hack to the mac font engines to report the correct font height. Task-number: QTBUG-6770 Reviewed-by: joerg
* | | Clean up the QFontEngine glyphcaching code to not crash and be more tidyGunnar Sletta2009-12-102-114/+28
| | | | | | | | | | | | Reviewed-by: Eskil
* | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-12-092-2/+13
|\ \ \ | | |/ | |/|
| * | Merge remote branch 'staging/4.6' into 4.6Oswald Buddenhagen2009-12-071-2/+10
| |\ \ | | |/ | |/|
| | * Fix cursor positiong after block undo and redomae2009-12-041-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block changes in different selections happens quite frequently with Qt Creator, e.g. when renaming local variables. The desired behaviour which the tst_QTextCursor::cursorPositionWIthBLockUndoAndRedo() tests, is like this: after an undo, the cursor should be where it was when the block operation started. After a redo, the cursor should be where it was after the block operation ended. Reviewed-by: Simon Hausmann
| * | Update include path for Symbian^3Iain2009-12-031-0/+3
| |/ | | | | | | | | | | | | | | In Symbian^3, public and platform headers have been split. Since we're using a platform header, we need to include the new header file on Symbian versions where the new header structure is in use Reviewed-by: TrustMe
* | Fix crash when rotating cleartype text under gl engine.Gunnar Sletta2009-12-093-8/+13
|/ | | | Reviewed-by: Eskil
* X11: Avoid loading all fonts in system for text with line breaksEskil Abrahamsen Blomfeldt2009-11-301-1/+1
| | | | | | | | | | | | | The line separator code point has no glyph in any font, something we would detect by running through a complete font merging loop and trying all fonts in the system on X11. This would cause the memory consumption to sky rocket the first time you added text with line breaks to an application, and it was an unnecessary performance hit. Now we special case the line separator and do no attempt to search for it in the fonts. Task-number: QTBUG-4537 Reviewed-by: Simon Hausmann
* Merge commit 'upstream/4.6' into oslo-staging-2/4.6Olivier Goffart2009-11-271-5/+4
|\
| * Merge commit oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-272-0/+4
| |\
| * \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6David Boddie2009-11-253-44/+69
| |\ \
| * | | Incorrect background while composing Japanese text(e.g 'shi' + <space>).Prasanth Ullattil2009-11-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happens only when there is a single japanese character entered & the suggested text is same as the one already displayed. In this case, black background was not drawn correctly. Reviewed-by: Simon Hausmann Reviewed-by: axis
| * | | Softkeys: Text disappears from textbox when predictive text is active.Samuel Nevala2009-11-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two QInputMethodEvent("preedittext", attributes) or more are send in a row, textedit is drawn empty. Event creates lines based on isGettingInput flag and clears line every time there is preedit text. On 2nd event lines are cleared but not created since e->preeditString() != cursor.block().layout()->preeditAreaText() set isGettingInput to zero. When draw begins line count is checked. If no lines return. Moved layout->setPreeditArea() under if (isGettingInput) so pre-edit text is set only when text really changes. http://bugreports.qt.nokia.com/browse/QTBUG-4696 Task-number:QTBUG-4696 Reviewed-by:Markku Luukkainen Merge-request: 2132 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | | | Correctly export the horizontal part of a mixed alignment in text.Thomas Zander2009-11-271-6/+7
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-5542 Reviewed-by: Trust-me We should not assume that the alignment only has a horizontal part so the export should take care to fish out the relevant bits from the flags only.
* | | Fix compilation on Windows CEEskil Abrahamsen Blomfeldt2009-11-272-0/+4
| |/ |/| | | | | | | | | | | Commit 6ef5b4485b9fe5a9d25d2d9b5e67f110fb728a8b broke compilation on Windows CE by moving code out from a #ifndef Q_WS_WINCE block. Reviewed-by: Rohan McGovern
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Eskil Abrahamsen Blomfeldt2009-11-231-0/+6
|\ \
| * | Fixed endless loop when printing a QTextDocument.Trond Kjernåsen2009-11-231-0/+6
| |/ | | | | | | | | | | | | | | | | If the user enters a valid page range, which lies outside of the actual number of printable pages, we can't detect that until the document has been paginated. Task-number: QTBUG-6051 Reviewed-by: Kim
* | Fix positioning of diacritics in .otf fonts on WindowsEskil Abrahamsen Blomfeldt2009-11-232-44/+63
|/ | | | | | | | | | | | | | | | | | | | | Since .otf fonts are not considered truetype fonts, they take the code paths intended for non-outline fonts. When calculating the bounding box of a glyph, this would mean we'd find the largest possible bounding rect of any glyph in the font, while the other metrics, such as the GPOS tables used to position diacritics in relation to base glyphs, are positioning the actual outline of the glyph. The result was that certain diacritics that depended on the opentype positioning would not be shown on Windows at all, as they would be positioned based on the wrong left bearing and height when drawn into the glyph cache. The fix is to find the tight bounding rect of the outline whenever possible and fall back to the old code when this fails. I've also added the left bearing of the glyph to the bounding box in the fallback case, as we did not respect this before and would misplace glyphs that has a bearing. Task-number: QTBUG-5860 Reviewed-by: Trond
* Fixed Multi-length strings not implemented for float functionsOlivier Goffart2009-11-191-3/+19
| | | | | | Task-number: QTBUG-5963 Reviewed-by: Oswald Buddenhagen Reviewed-by: Eskil
* Fix regression in emitting of QTextDocument::undoCommandAdded()Thomas Zander2009-11-161-1/+3
| | | | | | | | | | The test I wrote was not testing if calling undo/redo had any effect on emitting undoCommandAdded(), added these test cases and fixed the QTextDocumentPrivate::endEditBlock so we now again emit only when an undo command is added, not also on calling undo or redo. Reviewed-by: mae Reviewed-by: Samuel Rødal
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-11-133-22/+62
|\
| * Speed up QTextFormatCollection::indexForFormatJos van den Oever2009-11-132-21/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextFormatCollection currently has two problems: - looking for the index of a QTextFormat is linear, this can take 25% cpu when loading large documents in kword - the hash function for QTextFormat is inadequate. Not all values are treated specially. E.g. each QBrush instance has the same hash value at the moment. These patches speed up loading of a large text document in KWord from 9 to 7 seconds. This fixes this by using QMultiHash to group the QTextFormat instances by hash and only loop through that list when looking up values. It also improves the hash function for QTextFormat. Merge-request: 1623 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| * Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-131-1/+3
| |\
| | * Merge commit 'widget/4.6' into oslo-staging-2/4.6Olivier Goffart2009-11-111-1/+3
| | |\ | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qbrush.cpp
| | | * Small caps font variant wouldn't be used when defined through style sheetsGabriel de Dietrich2009-11-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The font comparison (operator==) didn't check the capital attribute, which is the one responsible for this variant. Now it does. Auto-test updated. Reviewed-by: Samuel Reviewed-by: Olivier
* | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-138-23/+55
|\ \ \ \ | |/ / / | | | | | | | | | | | | Conflicts: dist/changes-4.6.0
| * | | Fix typo in license headerAlessandro Portale2009-11-124-4/+4
| |/ / | | | | | | | | | | | | | | | The word 'module' was missing. Reviewed-By: TrustMe
| * | Qt covers BC break in SymbianAlessandro Portale2009-11-101-2/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workaround: fntstore.h has an inlined function 'COpenFont* CBitmapFont::OpenFont()' that returns a private data member. The header will change between minor SDK versions, thus break BC. But Qt has to build on any SDK version and run on other versions of Symbian OS. Also Qt does not want to deliver that BC to Qt based apps. This hack performs the needed pointer arithmetic to get the right COpenFont* pointer, no matter if the 'Flexible Memory Model' is already supported or not. The author is not proud of this commit. Task-number: QT-2250 Reviewed-by: Iain Reviewed-by: Shane Kearns modified: src/gui/text/qfontdatabase_s60.cpp
| * Merge branch '4.6-api-review' into 4.6Marius Storm-Olsen2009-11-091-2/+2
| |\
| | * API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
| * | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-066-62/+92
| |\ \
| | * \ Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-063-48/+71
| | |\ \ | | | |/ | | | | | | | | | | | | Conflicts: dist/changes-4.6.0
| | * | Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-051-1/+2
| | |\ \
| | * | | Fix textControl so that it ignores mouse press events when neededThierry Bastian2009-11-052-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the issue in the itemviews that the selection would not change when clicking on rich text labels. Task-number: QTBUG-4516 Reviewed-by: ogoffart
| | * | | Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-046-39/+71
| | |\ \ \
| | * | | | QCSSParser: Fixes the way spaces are handled in font family.Olivier Goffart2009-11-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot simplify spaces because a font may have several spaces in its name. If we only add spaces when needed when merging tokens, we don't need to simplyfy the string later The CSS tokenizer will already make sure that spaces are removed if there is no quotes (btw, the CSS specification says that there must be quotes if there is spaces, but we tollerate if there is no quotes) Reviewed-by: Jocelyn Turcotte Task-number: QTBUG-4344 Task-number: 258586
| * | | | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-043-40/+38
| |\ \ \ \ \ | | | |_|/ / | | |/| | |
| * | | | | QPlainTextEdit redraw issue in QTextControlmae2009-11-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an optimization in QTextControl, that it only requests updates for single blocks if only a single block was changed. This update was requested with the block's bounding rectangle. In the case of disabled line wrapping in combination with a very long line, a block change can result in a narrower block bounding rectangle. This then resulted in pixel on the screen not being redrawn properly. The fix enlarges the requested update rectangle horizontally. The bug was discovered during inhouse Qt Creator testing. Reviewed-by: Oswald Buddenhagen
* | | | | | Add option to ingore unused navigation events in QTextControlEskil Abrahamsen Blomfeldt2009-11-113-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFxTextEdit, as well as systems with keypad navigation, needs the text control to ignore navigation events that have no effect (like hitting the right navigation key at the end of the text.) Previously, we would only support this for keypad navigation. This patch introduces a flag that you can set to tell the QTextControl to ignore these events. If the flag is not explicitly set, behavior should remain as before. The if-test has been refactored to make it more readable. Done-with: Alan Alpert Reviewed-by: Samuel
* | | | | | Printing QTextDocument doesn't include custom objects.Samuel Rødal2009-11-113-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to copy the abstract text layout's custom object handlers as well when we temporarily use a different QTextDocument. Task-number: QTBUG-5397 Reviewed-by: Simon Hausmann