summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Proper fix for previous deallocation problemJiang Jiang2011-06-211-4/+2
| | | | | | | The match FcPattern should be managed by QFontDatabase instead of QFontEngineX11FT since the latter only used it once. Reviewed-by: Samuel
* No need to destroy match pattern againJiang Jiang2011-06-201-1/+0
| | | | | | It is already freed in QFontEngineX11FT constructor. Reviewed-by: Eskil
* Fix fontconfig usage in X11 font databaseJiang Jiang2011-06-202-48/+30
| | | | | | | | | | | | | | | | | | | | | | | | | We should do FcConfigSubstitute(0, pattern, FcMatchFont) on a FcPattern for query because the family list in it will contain almost all the families after FcConfigSubstitute(0, pattern, FcMatchPattern), then the test in <match target="font"> will almost always succeed. In general, FcMatchFont substitute should only be done on the FcPattern that we got after FcFontMatch() or FcFontRenderPrepare(). Based on the suggestion of fontconfig author Behdad Esfahbod, this patch reorganized the tryPatternLoad logic so that it only does the QFontEngine creation part, FcPattern *match is retrieved outside of that function. In this way, the match pattern we got can be either from FcFontMatch() or after FcFontRenderPrepare() on one of the fonts we got from qt_fontSetForPattern(). Then we don't need to duplicate the pattern and add all criterias back with qt_addPatternProps(). It not only simplified the code a lot but also fix the way we apply FcMatchFont substitution. This substitution will either be done by FcFontMatch() or FcFontRenderPrepare, both implicitly. Task-number: QTBUG-2148, QTBUG-19947 Reviewed-by: Eskil
* Fix empty lines in Qt HTML when displayed in external browsers (again)Eskil Abrahamsen Blomfeldt2011-06-203-4/+11
| | | | | | | | | | | This redoes f541c78e1bc5b293466b40e6f10496199a4a5d73 in a way which should be more compliant with different browsers. In particular, Outlook didn't support the CSS trick in the last fix, so we need the somewhat larger patch which adds an extra line break node to the tree and then ignores it when re-importing the document. Task-number: QTBUG-3669 Reviewed-by: Simon Hausmann
* Make it possible to set color of QStaticText with pixel size >= 64Eskil Abrahamsen Blomfeldt2011-06-201-1/+1
| | | | | | | | | | | | Adding the fallback to QPainterPath for large QStaticTexts created a regression where all text would be painted in black regardless of the color you set on it. The color in QStaticTextItem is sometimes invalid, in which case the current painter color should be used. In either case, the color is already set on the current pen when entering drawStaticTextItem() so we can just use that. Task-number: QTBUG-19950 Reviewed-by: Jiang Jiang
* Make it possible to compile in a screen plugin name in QWSIan2011-06-201-0/+5
| | | | Reviewed-by: Jørgen Lind
* Don't redefine EGL definesIan2011-06-201-1/+9
| | | | Reviewed-by: Jørgen Lind
* reset certain global variables on deletionLars Knoll2011-06-201-0/+2
| | | | | | | qt_button_down needs to be reset to 0 if it points to the widget being deleted. Reviewed-by: Samuel
* Made tst_QWidget::repaintWhenChildDeleted() pass.Samuel Rødal2011-06-201-0/+8
| | | | | Implement some missing functionality in QWidget::destroy(). (cherry picked from commit 0273bc5d22cd1fa08854b023f9b6c318fc75f3fa)
* Allow selecting fonts with irregular style namesJiang Jiang2011-06-1011-96/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fonts like "Helvetica Neue UltraLight" or "Skia Regular Black Condensed" can't be selected in Qt because either they don't report correct numeric values for weight/stretch/etc. or these values are not mapped from QFont enums in a linear way. Thus we provide a shortcut to select these fonts with PostScript name or full name without resorting to family name matching in QFontDatabase (these fonts are not registered in font database anyway). After this, we can simply use: QFont font("Helvetica Neue"); font.setStyleName("UltraLight"); to select these fonts. QCoreTextFontEngineMulti matched like this can be created directly from the CTFontRef instance instead of creating from the font name, making this process faster. The commit also cleaned up the font loading process in Mac font database a bit, moving the code for family matching into a separate function. Add QFontInfo::styleName() and QRawFont::styleName() to access the resolved style name for a font. Task-number: QTBUG-19366 Change-Id: Iad07768c02ed06cc8d6b7395dec554384f410506 Reviewed-on: http://codereview.qt.nokia.com/333 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> (cherry picked from commit 97391be5ebddc62545ddb88f92fc2045bfa10711)
* Fix missing empty lines in Qt HTML when displayed in compliant browsersEskil Abrahamsen Blomfeldt2011-06-101-1/+1
| | | | | | | | | | | | | | | When QTextDocument exports HTML, it makes an effort to be compatible with its own importer, hence it has to be compatible with the dialect of HTML which Qt has developed over the years. One incorrect interpretation in Qt is that an empty paragraph is interpreted as an empty line. So if you use a QTextDocument to produce HTML for text where an empty line has been added, this empty line will not be visible when the document is viewed in a compliant browser. The fix is to set the height of the empty paragraph to 1em, so that it will match the current pixel size of the font, thus look the same as a <p><br /></p> but without altering the structure of the document. Reviewed-by: Gunnar
* Merge remote branch 'qt-mainline/4.8'aavit2011-06-0932-574/+394
|\
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-06-088-174/+109
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (32 commits) Fix autotest on Windows Compile on Mac OS X Ammend last commit Implemented QAccessibleTextEdit::attributes() Changing cursor position in all boundaries code clean-up for QSystemSemaphore simplify QSharedMemoryPrivate::cleanHandle() minor improvements for QSharedMemory fix potential keyfile leaking refactoring of the QWSSharedMemory class allow the user to averride QT_QWS_TEMP_DIR in qplatformdefs.h minor typo fix minor code simplification minor code simplification avoid the QT_NO_ASCII warning remove an unused headers nano optimization don't reallocate memory if the old buffer has sufficient capacity fix potential memory leaking don't delete the lock if it was not created by this surface ...
| | * refactoring of the QWSSharedMemory classRitt Konstantin2011-06-062-107/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drop old/unused API and obsolete code; improve attach() for comon case; cache the shm size at the first call; fix the includes; better debug strings; minor code clean-ups Merge-request: 1247 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * allow the user to averride QT_QWS_TEMP_DIR in qplatformdefs.hRitt Konstantin2011-06-061-1/+1
| | | | | | | | | | | | | | | Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * minor typo fixRitt Konstantin2011-06-061-1/+1
| | | | | | | | | | | | | | | Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * minor code simplificationRitt Konstantin2011-06-061-5/+3
| | | | | | | | | | | | | | | | | | | | | there is no need in non-const object as we don't change it anyways Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * minor code simplificationRitt Konstantin2011-06-062-21/+14
| | | | | | | | | | | | | | | | | | | | | `ascii` wasn't used Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * avoid the QT_NO_ASCII warningRitt Konstantin2011-06-061-1/+1
| | | | | | | | | | | | | | | Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * remove an unused headersRitt Konstantin2011-06-061-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | these headers weren't used anymore since QLock, QWSLock and QWSSharedMemory classes had been introduced Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * nano optimizationRitt Konstantin2011-06-061-9/+5
| | | | | | | | | | | | | | | | | | | | | allocate uninitialized QByteArray as it will be initialized few lines later Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * don't reallocate memory if the old buffer has sufficient capacityRitt Konstantin2011-06-061-8/+11
| | | | | | | | | | | | | | | Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * fix potential memory leakingRitt Konstantin2011-06-061-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the `memsize` member was never set with anything but 0; so, the memory newer was freed neither in destructor, neither in releaseSurface(). for the first one it was non-critical because of the memory was freed indirectly - by hiding widget before closing (which is why the issue wasn't catched-up until now) Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * don't delete the lock if it was not created by this surfaceRitt Konstantin2011-06-061-2/+6
| | | | | | | | | | | | | | | | | | | | | and don't forget about it otherwise Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * QSessionManager: fix build on QWSRitt Konstantin2011-06-061-0/+3
| | | | | | | | | | | | | | | Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| * | Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2011-06-0816-47/+129
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into master-integration * 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (54 commits) Update internal state before emitting configurationChanged() signals. Fixed qmlshadersplugin manual test shaders on SGX family GPU:s. Fixed qmlshadersplugin on windows VC2008 toolchain. Reset input context in Symbian when another window is opened. KERN-EXEC 3 panic in QCoeFepInputContext::translateInputWidget() Close context menus during orientation change. Have -small-screen enabled in certain examples on Symbian always. Update Japanese translations. Revert some of "Make QMLViewer startup animation stop after a while" Fix for winscw QtGui.def Add private method for flushing the pixmap cache. QDeclarative: Fix QPerformanceTimer on Symbian Fix QTreeWidget autotest cases on Symbian/VGA Increase SSL readbuffer 1 -> 16 kB Fix pixel metrics for Symbian VGA devices Revert "Fix QNetworkConfigurationManager usage outside main thread first" Avoid buffer overrun in QMacPixmapData resizing Fix glyph metrics with QStaticText/Freetype/raster and light/no hinting Fix tst_QGraphicsItem::sorting() test case for Symbian Fix QHeaderView test case for VGA Symbian devices. ...
| | * \ Merge remote branch 'upstream/4.8' into qt-4.8-from-4.7Toby Tomkins2011-06-0811-356/+159
| | |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/styles/qs60style.cpp
| | * \ \ Merge remote branch 'upstream/4.7' into qt-4.8-from-4.7Toby Tomkins2011-06-081-0/+5
| | |\ \ \
| | | * \ \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-06-071-0/+5
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Reset input context in Symbian when another window is opened.
| | | | * | | Reset input context in Symbian when another window is opened.Miikka Heikkinen2011-06-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When symbol menu is opened, input context needs to be reset or preedit string duplication may occur after symbol menu is closed. Task-number: QTBUG-19528 Reviewed-by: Sami Merila
| | * | | | | Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-06-072-0/+9
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-06-071-0/+2
| | | |\ \ \ \ | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: KERN-EXEC 3 panic in QCoeFepInputContext::translateInputWidget()
| | | | * | | KERN-EXEC 3 panic in QCoeFepInputContext::translateInputWidget()Sami Merila2011-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no check if graphics view pointer is null in the SLOT function translateInputWidget(). Task-number: QTBUG-19734 Reviewed-by: Miikka Heikkinen
| | | * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-06-061-0/+7
| | | |\ \ \ \ | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Close context menus during orientation change. Have -small-screen enabled in certain examples on Symbian always.
| | | | * | | Close context menus during orientation change.Laszlo Agocs2011-06-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make non-native QMenus, i.e. context menus, work like in Avkon. Reviewed-by: Miikka Heikkinen Reviewed-by: Sami Merila Task-number: QTBUG-19656
| | * | | | | Merge branch '4.7' into qt-4.8-from-4.7Liang Qi2011-06-064-8/+21
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontengine_ft.cpp src/s60installs/bwins/QtGuiu.def
| | | * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-06-015-8/+30
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Avoid buffer overrun in QMacPixmapData resizing Fix glyph metrics with QStaticText/Freetype/raster and light/no hinting Missing glyphs transforming QStaticText on X11/raster with subpixel AA Fixed clipping errors for non-extended paint engines.
| | | | * | | | Avoid buffer overrun in QMacPixmapData resizingJiang Jiang2011-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shouldn't use size bigger than the original (source) pixels buffer or the new one (just allocated). Task-number: QTBUG-18547 Reviewed-by: aavit
| | | | * | | | Fix glyph metrics with QStaticText/Freetype/raster and light/no hintingEskil Abrahamsen Blomfeldt2011-05-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a back-port of part of cad70d64d0bbada. In the raster engine's drawCachedGlyphs(), which is used by QStaticText, we would use the wrong metrics to lay out the glyphs, because loadGlyphMetrics() would assume full hinting. A visible effect of this was that the baseline of rotated text became wavy. Task-number: QTBUG-18185 Reviewed-by: Jiang Jiang
| | | | * | | | Missing glyphs transforming QStaticText on X11/raster with subpixel AAEskil Abrahamsen Blomfeldt2011-05-302-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Static text took an untested and broken code path for the combo of subpixel AA, X11, raster engine and transformation. This would cause missing glyphs. The reason was that QStaticText took an unused code path which turned out not to work. The workaround is to use gray AA on transformed text, like we already do for the GL engine. In Qt 4.8, the static text code path has been rewritten to use the Freetype cache instead of the image glyph cache, so the bug will be fixed more properly there. Reviewed-by: Samuel
| | | | * | | | Fixed clipping errors for non-extended paint engines.Samuel Rødal2011-05-301-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partially revert change a33ef62469fd71bec for the non-extended paint engine path. Task-number: QTBUG-19525 Reviewed-by: Andy Shaw
| | * | | | | | Merge remote-tracking branch 'origin/4.8' into qt-4.8-from-4.7Liang Qi2011-06-068-234/+192
| | |\ \ \ \ \ \ | | | | |_|_|_|/ | | | |/| | | |
| | * | | | | | Merge remote branch 'origin/4.7' into 4.8-from-4.7Rohan McGovern2011-06-011-3/+3
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/declarative/declarative.pro tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
| | | * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-06-011-3/+3
| | | |\ \ \ \ \ | | | | | |_|/ / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Increase SSL readbuffer 1 -> 16 kB Fix pixel metrics for Symbian VGA devices Revert "Fix QNetworkConfigurationManager usage outside main thread first" Fix tst_QGraphicsItem::sorting() test case for Symbian
| | | | * | | | Fix pixel metrics for Symbian VGA devicesSami Merila2011-05-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pixel metrics for focus frame (PM_FocusFrameVMargin and PM_FocusFrameHMargin) had invalid values for VGA screens. Additionally these same pixel metrics were adjusted for nHD. Now, all but one QTreeView test cases pass for either screensize. Task-number: QT-5056 Reviewed-by: Tomi Vihria
| | * | | | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Olivier Goffart2011-05-3112-39/+98
| | |\ \ \ \ \ \ | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp src/gui/text/qtextengine_p.h src/gui/text/qtextlayout.cpp src/plugins/phonon/mmf/mmf.pro src/plugins/s60/5_0/5_0.pro tests/auto/qtextlayout/tst_qtextlayout.cpp
| | | * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-05-303-26/+38
| | | |\ \ \ \ \ | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix QHeaderView test case for VGA Symbian devices. Fix for BCM2727 chip detection on Symbian Fix QMenuBar autotest failures for Symbian
| | | | * | | | Fix for BCM2727 chip detection on SymbianJani Hautakangas2011-05-303-25/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSymbianGraphcisSystemEx::hasBCM2727() uses bool QApplicationPrivate::useTranslucentEGLSurfaces to decide if Symbian is running on BCM2727 chip which is not entirely correct. bool QApplicationPrivate::useTranslucentEGLSurfaces should be assigned according to QSymbianGraphcisSystemEx::hasBCM2727() and QSymbianGraphcisSystemEx::hasBCM2727() should be also static function. Task-number: QTBUG-19578 Reviewed-by: Laszlo Agocs
| | | | * | | | Fix QMenuBar autotest failures for SymbianSami Merila2011-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Effectively three fixes to reach same autotest results as on other Symbian devices and to make the case not crash (itself, or Qt). a) Fix null pointer usage in QWidget. This is mostly theoretic case, since it requires that previous focus widget has widget, yet it doesn't have internal winId. Still test case manages to make this happen, so lets prevent the null pointer use. b) Skip activatedCount_noQt3() test case, since it would require shortcut support and leads to test crash. Qt for Symbian should have shortcut support as a result of task http://bugreports.qt.nokia.com/browse/QTBUG-5730 c) Ensure that menu has at least 360 width in tests that send keypresses to the menu. Otherwise, menuitems might get set into menu extension, which makes highlight tests fail (since item is not visible). Task-number: QT-5053 Reviewed-by: Tomi Vihria
| | | * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-05-287-11/+50
| | | |\ \ \ \ \ | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: QToolButton autotest trigger() fails in E6 Documented Symbian peculiarity about QDesktopWidget::availableGeometry Fix non-Symbian builds broken by previous commit. Fix SYMBIAN_VERSION_* ifdeffing Predictive text is not committed when writing in a QLineEdit