summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qs60style_s60.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix memory leak in S60StyleMiikka Heikkinen2011-11-081-1/+3
| | | | | | | The m_animations contents were never deleted. Task-number: QTBUG-22603 Reviewed-by: Sami Merila
* QS60StyleAnimation exception safetymread2011-10-181-7/+3
| | | | | | | | | | QS60StyleAnimation had a number of exception safety problems. - Exceptions from QS60StyleAnimation/V2 could panic a TRAP harness. - Pointers could be uninitialised on exception in constructor. Problems solved by switching to QScopedPointer and simplifying the code. Task-number: QTBUG-4871 incidental finding Reviewed-by: Sami Merila
* Fix Coverity findings from QS60StyleSami Merila2011-09-021-2/+2
| | | | | | | Fix issues found out by static analysis tool Coverity from QS60Style. Task-number: QT-4843 Reviewed-by: Miikka Heikkinen
* Remove whitespace from S60 style codes.Miikka Heikkinen2011-09-021-1/+1
| | | | Reviewed-by: TrustMe
* Improve robustness of QS60Style when creating native theme bitmapsSami Merila2011-08-311-2/+20
| | | | | | | | | | | | | Three robustness improvements: a) When doing a compatibility check for a style part, make check always pass if the part is supported by all platform versions. b) Re-attempt icon creation without a mask, if creation with mask fails. c) Paint theme background with white (instead of just giving up) in error cases. Task-number: QTBUG-21119 Reviewed-by: Miikka Heikkinen
* Merge branch 4.7 into qt-4.8-from-4.7Sergio Ahumada2011-08-261-5/+9
|\ | | | | | | | | | | Conflicts: doc/src/index.qdoc src/xmlpatterns/expr/qevaluationcache_p.h
| * Crash when creating scroll bar skin graphics on S60 (debug only)Sami Merila2011-08-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | When fetching bitmap graphics from native without fallback information, do not define fallback-mif file, since native side uses ASSERT_DEBUG to crash the client if file info exists, but bitmap ID is not defined. This started crashing when root theme removed default scrollbar graphics from its content for Belle release. Task-number: QTBUG-15993 Reviewed-by: Miikka Heikkinen
| * QS60Style omits drawing theme background in some Symbian SDKsSami Merila2011-08-251-2/+6
| | | | | | | | | | | | | | | | | | | | Latest internal RnD releases have upgraded Symbian version to 5.4. As QS60Style was not aware of this, all the textures that didn't define any version information (i.e. available in all versions) were not drawn at all. Task-number: QT-5176 Reviewed-by: Miikka Heikkinen
* | Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-07-051-0/+4
|\ \ | |/
| * QS60Style: QMessageBox theme background is incorrectSami Merila2011-07-051-0/+4
| | | | | | | | | | | | | | | | Use correct native theme graphic for dialog backgrounds. In the past, native menu background graphic was used for dialogs and menus. Task-number: QTBUG-9924 Reviewed-by: Tomi Vihria
* | Merge remote branch 'origin/4.7' into qt-4.8-from-4.7Jani Hautakangas2011-07-041-0/+100
|\ \ | |/ | | | | | | | | | | Conflicts: doc/src/external-resources.qdoc src/gui/text/qtextlayout.cpp src/opengl/qwindowsurface_gl.cpp
| * QS60Style: provide more standard iconsSami Merila2011-07-011-0/+100
| | | | | | | | | | | | | | | | Add custom standard icons for Symbian iconography. Additionally, map few existing standard icon enums to new icons. Task-number: QT-5116 Reviewed-by: Miikka Heikkinen
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-011-4/+19
|\ \ | |/ | | | | | | Conflicts: src/s60installs/s60installs.pro
| * Fix QWidget::palettePropagation2() autotest on Symbian (part 2)Sami Merila2011-06-291-0/+1
| | | | | | | | | | | | | | Add also include to QS60Style to avoid build failure. Task-number: QT-5011 Reviewed-by: Miikka Heikkinen
| * Fix QWidget::palettePropagation2() autotest on SymbianSami Merila2011-06-291-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autotest fails since calling QApplication::setPalette() clears away QPalette hash (class specific palette information). QS60Style tries to re-set theme-specific hash after updating application palette with real theme background, but does not take into account that application might have defined own custom palette hash data. As a fix, store the previously set palette hash information and restore it after calling QApplication::setPalette(). Additionally, remove the palette change event sending, since QApplication will post that event anyway when palette is updated. Task-number: QT-5011 Reviewed-by: Miikka Heikkinen
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-06-241-1/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpixmap_raster_symbian.cpp src/gui/image/qpixmapdatafactory.cpp src/gui/painting/qgraphicssystem.cpp src/gui/styles/qs60style.cpp src/network/bearer/qnetworkconfigmanager_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtOpenGLu.def src/s60installs/bwins/QtOpenVGu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
| * Proper naming for raster pixmap and paintengine on Symbian.Laszlo Agocs2011-06-161-1/+1
| | | | | | | | | | | | | | | | As QTBUG-19880 highlighted, the old S60 naming is not suitable for these classes anymore. Task-number: QTBUG-19913 Reviewed-by: Jani Hautakangas
| * QS60Style: QGroupBox is drawn as white box in upcoming Symbian releaseSami Merila2011-06-151-0/+8
| | | | | | | | | | | | | | | | | | | | New Symbian root theme defines KAknsIIDQsnFrSetOpt as empty. Drawing the frame through native API produces white box. Since the frame is no longer used on the native side, skip drawing it from style. Task-number: QTBUG-19782 Reviewed-by: Tomi Vihria
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | QS60Style: Remove 3.x specific code from styleSami Merila2011-05-231-41/+4
| | | | | | | | | | | | | | Remove S60 3.x support from QS60Style. Task-number: QTBUG-18615 Reviewed-by: Miikka Heikkinen
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-teamSami Merila2011-05-231-17/+17
|\ \
| * | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | | Fix Coverity issues found from QS60StyleSami Merila2011-05-231-6/+3
|/ / | | | | | | | | | | | | There are couple uninitialized variables in QS60Style. This also corrects compilation warnings for the class. Reviewed-by: Tomi Vihria
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Olivier Goffart2011-04-211-11/+0
|\ \ | |/ | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_ost/qostdevice.h
| * Build break fix for simulated QS60StyleSami Merila2011-04-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes in QS60Style (to support placeholder background texture) causes the simulated style not to build. The implementation for new method placeHolderTexture() is on the Symbian-specific sourcefile, which is omitted in the simulator builds. As a fix, move the implementation to the "generic" style source file qs60style.cpp, since the method does not contain any Symbian specific code. Task-number: QTBUG-18863 Reviewed-by: owolff
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-04-181-11/+22
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp src/corelib/global/qnamespace.h src/gui/text/qtextcontrol.cpp
| * Make QS60Style to support new Tab graphics in new Symbian releasesSami Merila2011-04-081-11/+22
| | | | | | | | | | | | | | | | | | | | | | In SR.11 there is a new theme graphics (with separate ID) for TabWidget tab shapes. Also, shapes are no longer set overlapped, but are side-by-side without any gaps. Earlier releases still use the existing graphics with overlapping. Task-number: QT-4762 Reviewed-by: Miikka Heikkinen
* | Remove workaround and fix properlySami Merila2011-04-071-10/+2
|/ | | | | | | | The workaround for 3.1 can now completely removed, since support for 3.x was dropped. Task-number: QTBUG-4565 Reviewed-by: Miikka Heikkinen
* QTabWidget tabs are resized in wrong way when device rotatesSami Merila2011-03-251-18/+0
| | | | | | | | | | | | | | | | This used to work so that, style would check from actual AVKON component (navipane) what its size is. Unfortunately, Qt was later changed so that screen furniture is only created on-demand and thus asking navipane's size started to fail. Which lead to situation that tab size would "grow" after navipane was created and tabbar was re-drawn. As a fix, correct the pixel metrics with correct values for nHD and remove size query from native component. The other pixel metrics for other layouts were correct. Task-number: QTBUG-16984 Reviewed-by: Tomi Vihria
* Add missing nullify for the s60 style's background pixmap pointer.Laszlo Agocs2011-03-231-0/+1
| | | | | | | Qt apps would crash during orientation change without setting m_background to null after deleting it. Reviewed-by: Sami Merila
* QS60Style: Update placeholder texture to real oneSami Merila2011-03-221-4/+19
| | | | | | | | | | | | | | Once the background texture has been created, update it to all widgets. This corrects most cases where texture is used outside of QS60Style. It is still possible to access the placeholder texture and draw it, if: a) QPalette::Window is accessed before drawing even one widget b) Painting the texture happens without using QS60Style Task-number: QTBUG-14910 Reviewed-by: Laszlo Agocs
* Changed s60 style not to rely on QPixmapData::toNativeType().Laszlo Agocs2011-03-211-5/+6
| | | | | | | | | Forcing VG (and GL) pixmapdata to support toNativeType() with type VolatileImage is unnecessary. It is cleaner to try doing a fromNativeType() with bitmap+mask and fall back if that results in a null pixmapdata. Reviewed-by: Jani Hautakangas
* QS60Style: use placeholder texture when polishing widgets and paletteSami Merila2011-03-151-2/+12
| | | | | | | | | | | | | | | | | Background texture is not created until it is actually painted. This allows skipping the whole background texture creation, if app overwrites the QPalette::Window with its own data (image or color). When widget is drawn and style notices that the widget is still using a placeholder (1*1 red QPixmap) texture, it creates the real texture and uses that for drawing. Note that accessing QPalette::Window will give the placeholder pixmap. Which is then again replaced with the real texture, if it is drawn through the qt_s60_fill_background(). Task-number: QTBUG-14910 Reviewed-by: Laszlo Agocs
* Regression: QS60Style: Theme background is incorrectSami Merila2011-03-151-0/+1
| | | | | | | | | | | | | | | | | Fix for QTBUG-16816 cause theme background to display incorrectly after a layout switch is done. Theme background is shown "tiled" instead of being whole screen size. This is because the setBackgroundTexture() call was removed to "save" QPixmap creation. Unfortunately, it really skips the background texture creation, but does not re-create a new one for the new layout, so portrait background is used again. This leads to tiling the image. Let's just return the call to the setBackgroundTexture() (this will eventually anyway be "optimized" with fix for QTBUG-14910). Task-number: QTBUG-17930 Reviewed-by: Laszlo Agocs
* QS60Style slows down layout switch by updating widgets unnecessarilySami Merila2011-03-141-1/+0
| | | | | | | | | | Remove refreshUi() method frmo QS60Style. It might have been necessary two years ago, when we didn't have proper polishing of QWidgets (when style changed), but it is no longer needed. It just slows down orientation switch. Task-number: QTBUG-17840 Reviewed-by: Tomi Vihria
* Changed QPixmap VG backend to use CFbsBitmap on Symbian.Laszlo Agocs2011-02-281-5/+21
| | | | | | | | | | | | | | Similarly to QS60PixmapData, that is used on raster, QVGPixmapData is also backed by a CFbsBitmap from now on (at least when it makes sense to do so). This allows copy-less bitmap handle duplication in from- and toSymbianCFbsBitmap() in case of certain image formats, reduces local heap usage and improves performance with the s60 style due to a reduced number of pixel data copies. Task-number: QT-2505 Reviewed-by: Jason Barron Reviewed-by: Jani Hautakangas
* Application background is incorrect if app locked to landscape.Sami Merila2011-01-261-4/+4
| | | | | | | | | | | | | | | If application orientation has been locked to landscape and application is started out while device orientation is portrait, QS60Style draws the QPalette::background like device would be in landscape. Style is incorrectly following device orientation, when it should follow application orientation. As a fix, style follows now application orientation. As a bonus, unnecessary fullscreen QPixmap creation is avoided when rotating the device. Task-number: QTBUG-16816 Reviewed-by: Jani Hautakangas
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Remove support for automatic tactile feedback from QS60StyleSami Merila2010-12-161-23/+1
| | | | | | | | | | | | | | | Currently QS60Style loads automatically a plugin to support tactile feedback for styled applications. However, there is no control over this, so applications cannot remove the automatic support, if they'd like to use Mobility APIs to control the feedback themselves. In order to avoid this, remove tactile feedback plugin from style. Lets see if we can later put this back with optional enable/disable flag. Task-number: QTBUG-16151 Reviewed-by: Miikka Heikkinen
* Removed some new warnigs.Alessandro Portale2010-11-291-3/+2
|
* QS60Style: Color calculation should be optimizedSami Merila2010-11-091-4/+4
| | | | | | | Addendum to the previous fix. Remove trailing white space as well. Task-number: QTBUG-14860 Reviewed-by: Jani Hautakangas
* QS60Style: Color calculation should be optimizedSami Merila2010-11-091-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, QS60Style calculates some palette colors (tooltip base and button). Since native side does not have a color for these, but a nine-part theme graphic, the style tries to estimate the color of the bitmap by taking a small sample of the QPixmap and calculate the RGB colors of 32*32 pixels. This is rather slow, it takes around 110 msecs for each QApplication, when the application is started. Note that color is cached to member variable of style, but it is very rarely asked again (as the color is polished to all widgets/apps) and the cache is not shared across processes. As a fix, style now calculates the button color (tooltip color is no longer calculated, as no other QStyle does that, and tooltips do not anyway work in the Qt/Symbian) and stores the calculated value to Global QSettings together with active theme ID. Now, when a second Qt application is launched, the stored theme ID value is matched with currently active theme. If it matches, then the stored Button color is used. Otherwise, color is again calculated and stored. If theme is unchanged, the application launch is ~95msecs faster. Task-number: QTBUG-14860 Reviewed-by: Jani Hautakangas
* Support tactile feeedback from QS60Style for QWidgetsSami Merila2010-10-291-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently tactile feedback is not given for QWidgets running on Symbian even if the native side supports this (Sym^3 and 5th Edition devices). This task adds support for QWidgets having QS60Style. The tactile feedback has been implemented as a plugin that the style loads when instantiating itself for touch devices. NOTE that the feedback is NOT supported by the emulated style, nor is the plugin interface public, so it cannot be used outside of style. The implementation is simplistic, since we only want to provide stop-gap solution until 4.8 when real Qt feedback implementation is ready. The implementation will only give feedback for touch-down events for visible, interactive and enabled widgets. Sliders and scrollbars will use sensitive feedback (slightly less aggressive) and all others will use basic feedback. Note that Sym^3 adds tens of different feedback categories, which this plugin ignores as we want to share the same implementation for Sym^3 and 5th ed. In distributed Qt package there is no tactile feedback for 5th edition, due to package creation limitations. Support can be added manually by re-compiling Qt on top of 5th Edition SDK. Task-number: QT-4037 Reviewed-by: Jani Hautakangas Reviewed-by: Janne Koskinen
* Plug memory leak from QS60StyleSami Merila2010-09-031-0/+6
| | | | | | | | | Currently style leaks an animation object (QS60StyleAnimation) when style is destroyed. To avoid this, animation object array is deleted in the style's destructor. Task-number: QTBUG-13145 Reviewed-by: mread
* Fixed additional case differences between Gnupoc and Symbian^3.axis2010-07-301-3/+3
| | | | RevBy: Trust me
* Change the files to camelcase as avkon now does thatThomas Zander2010-06-251-7/+7
| | | | | | | In older avkon solutions all headers were lowercase in newer they are CamelCase... Reviewed-by: Axis