summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Making Keypad Navigation more usableAlessandro Portale2009-09-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All changes of this commit are #ifdef'ed in QT_KEYPAD_NAVIGATION. Most desktop Qts won't notice any change. Navigating between QWidgets was not alwys a pleasure on keypad devices. This commit fixes the navigation behavior for some widgets, mostly itemviews. Furthermore, it adds a 'directional' navigation mode. Until now, the existing keypad navigation used the tab order do go back and forth between widgets. The new mode is supposed to provide a more intuitive navigation. It is the new default mode on Symbian. Screens (and their resolutions) become bigger, and also low resolution screens can be used in landscape mode. That's why the directional mode was requested. Another popular request was to put some more convenience into QSlider: If a (horizontal) slider has focus and the user presses left/right, the value of the slider may directing change without being selected (edit mode). This commit also adds the manual test 'keypadnavigation'. Reviewed-by: Shane Kearns
* Switch glyph cache from Qt to SymbianLiang QI2009-09-181-1/+2
| | | | | | | Use Symbian glyph cache directly in QRasterPaintEngine, do not need cache them in Qt if on Symbian Platform. Reviewed-by: Alessandro Portale Reviewed-by: Jason Barron
* Introduce native Symbian bitmap support to QPixmapJani Hautakangas2009-09-183-11/+23
| | | | | | | | | This is done to reduce heap consumption and to give a possibility to share bitmaps across process. QPixmap maps to Symbian CFbsBitmap which is stored in Symbian font and bitmap server. Reviewed-by: Jason Barron
* Fix glyph selection in symbol fonts that contain unicode cmap tableEskil Abrahamsen Blomfeldt2009-09-171-14/+63
| | | | | | | | | | | | | Some symbol fonts will contain a unicode cmap table in addition to the microsoft symbol cmap table that maps the symbol range (private range 0xf000 - 0xf100) into the correct glyphs. This is essentially a broken unicode table, and we should not prefer it if these conditions are true. In the strict cases where these conditions apply, we fall back to the symbol table instead. Task-number: QT-2354 Done-with: Lars Reviewed by: Lars
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Morten Sorvig2009-09-173-6/+12
|\
| * Fix to QSyntaxHighlighter not rehighlighting enoughmae2009-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | When entire blocks get deleted, the last block for rehighlighting would be the block _before_ the deleted blocks. This is wrong, since the deleted blocks could have contained characters which affect the state. The patch lets the highlighter check for one more character. Reviewed-by: thorbjorn
| * QFontMetrics::boundingRect(QString) returns incorrect width on Mac OS XPrasanth Ullattil2009-09-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | This bug appears only in Carbon port (ATSUI font engine). While finding the character stops, this font engine relys on the RTL flags. As an optimization, for this particular version of boundingRect(), BIDI is ignored. So for this font engine, we will always use the correct RTL flags. Task-number: 213109 Done-with: Eskil Reviewed-by: Simon Hausmann
| * Small optimisation in QFontMetrics multi-length-stringOlivier Goffart2009-09-161-4/+6
| | | | | | | | | | | | | | Change the len instead of copying the string. Idea from Warwick Reviewed-by: Warwick Allison
* | Improve font handling on Mac/Cocoa.Morten Sorvig2009-09-161-0/+31
|/ | | | | | | | | | | | | | | | | | The Mac/Cocoa font database currently relies on two APIs, ATSUI (old) and CoreText (new). These are interchangable and work on the same font database. Some differences do exist, in particular ATSFontFamilyGetName seems to return the same as ATSFontGetName for some fonts - the font name, not the family name. In any case, the old ATS code path is initializing QFontDatabase::familes() with the font name. This causes a naming mismatch with code that uses CoreText and gets the proper family name, in this case in initializeDb(). The fix is to make sure the correct family name is used by using the CoreText API to access it. RevBy: TrustMe
* If the font does not exist, then the right bearing becomes to bigJørgen Lind2009-09-143-2/+5
| | | | | | | | | In the QPF1 engine if the font does not exist, then the default constructor of glyph_metrics_t is used which sets the x and y values to the unlikely value of 100000. These glyph_metrics_t instances are not suppose to be used in the text layout calculations. Task-number: pending
* fix compile error debug outputGunnar Sletta2009-09-141-1/+1
|
* Clean up properly in the QPF1 font enginePaul Olav Tvete2009-09-111-0/+6
| | | | | | | We have to munmap() what we have mmap()ed Reviewed-by: Gunnar Reviewed-by: Jeremy
* S60 font db more tolerant of failuremread2009-09-101-1/+6
| | | | | | | This now loads the fonts it can and asserts that at least one is loaded, rather than requiring all fonts to load. Reviewed-by: Alessandro Portale
* QTextDocument::contentsChanged() was emitted twice for a singlemae2009-09-101-1/+1
| | | | | | | | insertion. This was caught by the QSyntaxHighlighter autotest. Reviewed-by: Paul
* Fix crash (assert) in QTextDocumentmae2009-09-091-0/+2
| | | | | | | | | | | When loading binary files as text, QTextCursor did not check for beginning and end of frame (QChar(0xfdd0) and QChar(0xfdd1)), while QTextDocument asserted that those characters were absent. The patch makes QTextCursor::insertText() treat frame bounderies like paragraph separators. Reviewed-by: ck
* Account for right bearing in QFontMetrics::boundingRect(string)Eskil Abrahamsen Blomfeldt2009-09-091-2/+7
| | | | | | | | | | | | | QFontMetrics::boundingRect() that takes a string needs to account for the right bearing of the last glyph, as it is documented to be the rectangle that contains the pixels of the text. I've added a test for this, and fixed tst_QFontMetrics::elidedText() to use boundingRect() to find the actual width of the text drawn (width() will return the advance of the text, which is larger than the actual width of the pixels.) I've also fixed a small typo in the "len" -> "ilen". Reviewed-by: Simon Hausmann
* Removed some superfluous semicolonsAlessandro Portale2009-09-091-2/+2
| | | | Reviewed-by: TrustMe
* Getting text widget OOM tests working in Symbianmread2009-09-091-1/+1
| | | | | | | | | | | | | | There is one actual bug fix, checking for null pointer return. The exception safety test code now initialises the fonts system. The S60 fonts system does not survive OOM testing without this. Otherwise some duplicate tests are removed and code tidied up. Reviewed-by: Liang Qi Reviewed-by: Harald Fernengel Reviewed-by: Alessandro Portale
* Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6Janne Anttila2009-09-0993-426/+473
|\
| * Update license headers again.Jason McDonald2009-09-0993-372/+372
| | | | | | | | Reviewed-by: Trust Me
| * Take right bearing of glyphs into account when doing text layoutEskil Abrahamsen Blomfeldt2009-09-081-54/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support correctly breaking text and calculating the bounding rect of text that has a right bearing (like italic text), we need to take the bearing into account when doing the layout. We add the bearing when checking whether we need to break the text, and we add it to the natural width of the text whenever we've finished a text line, so that we get the correct bounding rectangle. This patch only takes the last glyph's bearing into account. The theoretically correct approach would be to take all bearings into account and use the one which gives the longest text width. However, in practice the bearing of the glyph will not be great enough for it to span over several other glyphs. Also refactored a little to make the code simpler. Task-number: 176401 Reviewed-by: Simon Hausmann
* | Fixed 'use of function is deprecated' warnings reported by RVCTJanne Anttila2009-09-091-1/+1
|/ | | | | Task-number: 241223 Reviewed-by: Janne Koskinen
* Support setting font size in shorthand font propertiesEskil Abrahamsen Blomfeldt2009-09-071-1/+1
| | | | | | | | | | | | | | | The fontSizeAdjustment defaulted to 0 which means "medium" in internal semantics. This will override any font size you set in the short-hand. In other locations, fontSizeAdjustment defaults to -255 which has no meaning attached. To allow setting the font size in short-hand (as in "font: 20px Arial"), we can't default to a specific adjustment. Two tests are added: The first verifies the case that already worked, where you specify the font size using the "font-size" property. The other verifies the short-hand case and would previously fail. Task-number: 207189 Reviewed-by: Simon Hausmann
* Remove implicit margin on bulleted lists when exporting to HTMLEskil Abrahamsen Blomfeldt2009-09-041-3/+5
| | | | | | | | | | | | | | When we export a bulleted list to HTML, we add a meta-block around the list items to set the bullet style of the list (<ul> or <ol>.) This block will implicitly have a margin, even if the list itself does not in the internal document. The result is that exporting a list to HTML and then reloading it will give a different apperance, because the 0 margin of the original was not saved. The fix is to always set the meta-block's margin to 0, since it is only there to set the bullet style and should not affect the layout at all. Task-number: 201228 Reviewed-by: Simon Hausmann
* fix text eliding for arabic and syriacLars Knoll2009-09-041-0/+33
| | | | | | | | | | | | Arabic and Syriac are connected scripts where the letter shape changes depending on the context. Text eliding should not affect that letter shape if the truncation happens in the middle of a word. The patch ensures that by adding a Unicode ZWJ character between the text and the eliding in case the character would connect in the full string. Reviewed-by: Simon Hausmann
* QCSSScanner: really skip toLower() when tokenizing the input.Ariya Hidayat2009-09-031-1/+1
| | | | | | Missing from e3c62dc1def9270761ca63c73ae76fdca9d61582 is the actual change to the (generated) scanner, namely to skip lowercase conversion for each and every character.
* Removing a few superfluous semicolons.Alessandro Portale2009-09-031-1/+1
| | | | Reviewed-By: TrustMe
* Added trace graphics system for painting performance profiling.Samuel Rødal2009-09-031-0/+2
| | | | | | | | | | When running an application with graphics system trace everything that gets painted to the window surface is proxied through a QPaintBuffer, which is then both streamed to a trace file and replayed on a raster window surface. The trace file can then be replayed with tools/qttracereplay to measure pure painting performance. Reviewed-by: Gunnar Sletta
* CSS parser speed-up: skip the need to call toLower().Ariya Hidayat2009-09-031-42/+42
| | | | | | | | | | | | | Instead of taking the lowercase of each tokenized character, it is better to encode the logic in the automaton itself. During the parsing of tiger.svg (tests/benchmarks/qsvgrenderer), the time spent inside QCssScanner_Generated::lex() goes down from 0.53 millions instructions to just 0.23 millions (2x faster). Autotests for qcssparser, qtextdocumentfragment, qstylesheet still pass. Reviewed-by: Simon Hausmann
* CSS parsing speed-up: reserve CSS symbols prior to parsing.Ariya Hidayat2009-09-021-0/+1
| | | | | | | | Let us be optimistic here and reserve some space in the CSS symbols array before parsing starts. This gives 3% speed-up when loading tiger.svg (tests/benchmarks/qsvgrenderer). Reviewed-by: Olivier Goffart
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-314-52/+52
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-3189-1157/+1157
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-3189-1157/+1157
| | | | | | | | Reviewed-by: Trust Me
| * Make assorted constructors follow good coding practiceKeith Isdale2009-08-242-11/+2
| | | | | | | | | | | | | | Ensure that class members are initialized Moved some value assignment from constructor body into the the constructor's intializer list Reviewed-by: Jason McDonald
| * fix QTextFormat::doubleProperty where qreal is floatJoerg Bornemann2009-08-121-3/+4
| | | | | | | | | | | | | | | | This function was too strict. It returned 0 if the property wasn't of type QVariant::Double. Now it tests for QMetaType::Float too. Reviewed-by: kh1 Reviewed-by: mauricek
| * Qt's domain name is now qt.nokia.com.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-1189-89/+89
| | | | | | | | Reviewed-by: Trust Me
* | Deleting the CFontStore without a crashmread2009-08-283-5/+19
| | | | | | | | | | | | | | CFontStore deletion crashes if there are any open fonts in it. These are now all deleted before the store is deleted. Reviewed-by: aportale
* | Avoid undefined text metrics when GetTextMetrics() in QFontEngineWinEskil Abrahamsen Blomfeldt2009-08-261-1/+3
| | | | | | | | | | | | | | | | | | | | If GetTextMetrics() should fail, the results are undefined. When the undefined data are used, e.g. when painting text, this can cause a crash. To avoid the crash and make it clear that the metrics cannot be retrieved, we zero out the entire structure. Task-number: 251172 Reviewed-by: gunnar
* | Make QWS compile with namespacesPaul Olav Tvete2009-08-261-1/+2
| | | | | | | | Reviewed-by: hjk
* | Don't float objects into next page unless they can fit in itEskil Abrahamsen Blomfeldt2009-08-241-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you had a floating table which spanned over several pages, this would always float down to the next page, even when it was the only element in the document. The main reason why this mechanism was added to positionFloat() was to handle floating images, since they can't be broken down into more than one page. Tables, however, have logic to ensure they are broken into several pages if they are too large for the current page. There is however no reason to float an object into the next page if it is larger than that page. Since the size of tables are altered by their position as long as they span more than one page, we need to set the sizeDirty flag for floating tables when positioning and then relayout the frame to make sure the page breaks are set correctly. Task-number: 240086 Reviewed-by: Simon Hausmann
* | Warning fix: mask_format = unreferenced parameterAlessandro Portale2009-08-211-0/+1
| |
* | Fixed an MSVC 9.0 /2008 warningAlessandro Portale2009-08-211-5/+5
| | | | | | | | Reviewed-By: Harald Fernengel
* | Merge commit 'qt/master'Jason Barron2009-08-212-19/+27
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/examples.pro qmake/Makefile.unix qmake/Makefile.win32 qmake/Makefile.win32-g++ qmake/Makefile.win32-g++-sh qmake/qmake.pro src/script/api/qscriptable.h src/script/api/qscriptclasspropertyiterator.h src/script/api/qscriptcontext.h src/script/api/qscriptengineagent.cpp src/script/api/qscriptstring.cpp src/script/api/qscriptstring.h src/script/api/qscriptvalueiterator.cpp src/script/api/qscriptvalueiterator.h src/script/qscriptclass.cpp src/script/qscriptcontext.cpp src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptvalue.cpp src/script/qscriptvalue_p.h src/script/qscriptvalueimplfwd_p.h src/script/script.pro src/src.pro tests/auto/auto.pro tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp tools/configure/configureapp.cpp
| * | Fix undo/redo of single-command edit blocksmae2009-08-202-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (with QTextCursor::beginEditBlock() and QTextCursor::endEditBlock()) Previously QTextDocument would treat single command blocks as if there was no block, i.e. command compression would occur, causing tst_QTextDocument::testUndoBlocks() to fail. The patch completes the insufficient block-flag of QTextUndoCommand with an addition flag block_end. The block-flag itself is renamed to block_part. Reviewed-by: con
* | | Use QExplicitlySharedDataPointer wherever possibleHarald Fernengel2009-08-202-18/+10
| | | | | | | | | | | | Remove QScopedSharedPointer, this class will go soon.
* | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-08-191-1/+2
|\ \ \ | |/ / | | | | | | | | | Conflicts: tests/auto/auto.pro
| * | Fixed a possible crash in QTextCursorThierry Bastian2009-08-181-1/+2
| | |
* | | Changed names and URLs to reflect name change.axis2009-08-194-4/+4
| | | | | | | | | | | | RevBy: Trust me
* | | Merge commit 'qt/master'Jason Barron2009-08-1824-124/+105
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples.qdoc doc/src/plugins-howto.qdoc doc/src/topics.qdoc examples/phonon/musicplayer/mainwindow.cpp src/3rdparty/freetype/src/base/ftobjs.c src/corelib/global/qglobal.h src/corelib/tools/qalgorithms.h src/corelib/tools/qshareddata.cpp src/corelib/tools/qsharedpointer.cpp src/corelib/tools/tools.pri src/corelib/xml/qxmlstream.h src/gui/painting/painting.pri src/gui/widgets/qdatetimeedit.cpp tests/auto/qdesktopservices/qdesktopservices.pro tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qtextcodec/test/test.pro