summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fix syncing of visibility and enabled for menus on CocoaAndy Shaw2012-10-261-0/+1
| | | | | | | | | | | Fixed menu handling on Cocoa so if a menu is enabled/disabled or made visible or not then it will keep this in sync with the appropriate native menu entry. Change-Id: If269185fcf065fb1b2f60d6ef8c27c107eb4509f Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com> Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Remove unnecessary call to png_set_sBit when writing png filesSergey Borovkov2012-10-261-7/+0
| | | | | | | | | | | According to libpng documentation - PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If data is of another bit depth, it's possible to write an sBIT chunk into the file so that decoders can recover the original data if desired. Since we hardcode depth to 8 there is no need to call png_set_sBit Change-Id: I8e3941675019b920051775128ff4cf2bf1ca7c4a Reviewed-by: aavit <eirik.aavitsland@digia.com>
* QTextEngine: Support SMP code points when case changingKonstantin Ritt2012-10-251-4/+16
| | | | | | | Semi-related to QTBUG-17337 Change-Id: I6b42c0f7e588bbeab27bf410fcdfa1a6f80e4ac2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove stale QT_MODULE() usage casesKonstantin Ritt2012-10-255-10/+0
| | | | | | | As of Qt5, this macro is defined to be empty; simply get rid of these leftovers. Change-Id: I167ccb4c9e92ec9b5e4faeb02bf9c5ef5d982b50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert hacks in text rendering code pathEskil Abrahamsen Blomfeldt2012-10-255-35/+32
| | | | | | | | | | | | | | There are a lot of hacks here and there in Qt trying to align the text in a correct way which caused regressions to appear once the default coordinate system changed. We need to remove these hacks to get a more consistent and maintainable base. This also fixes the regression introduced by changing the aliased coordinate system. Task-number: QTBUG-27667 Change-Id: I620db2ca23b7ff6c912f3a51e86e7e36bbef81f0 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add ContextMenu event to QWindowSystemInterfaceMiikka Heikkinen2012-10-255-1/+56
| | | | | | | | | | | | | Context menu key wasn't working, as QPA had no handling for it. Added ContextMenu event to QWindowSystemInterface and proper handling to QGuiApplication and QWidgetWindow. Also provide Windows implementation. Task-number: QTBUG-27648 Change-Id: I7ce71ec4b5cdcc7be758e67f9faf6d863f7b19be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix valgrind warning in QTriangulatingStroker.Friedemann Kleint2012-10-241-1/+4
| | | | | | | | Initialize all member variables including m_invScale, which was uninitialized. Change-Id: Id581b1db9411b2f945281e17b7a0407c746761f8 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix QRegExpValidator::validate docs about the pos parameterGiuseppe D'Angelo2012-10-221-1/+2
| | | | | | | | | | | | | | | | | | | The code sets it to input.length() iff the regexp doesn't match the string, while the docs say it's *always* set. Therefore, make the docs match what the code does and add a simple test to enforce it. We're not changing the code to match the docs because 1) it's better to stay conservative (we don't want to break existing behaviour); 2) this behaviour mimics what the int/double validators do (they don't move pos at all). Change-Id: I958074558de6b0fc5944101c6535fc7e00442ae9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make QPen default to 1-width non-cosmetic.Samuel Rødal2012-10-2214-83/+79
| | | | | | | | | | | Use the Qt4CompatiblePainting render hint when painting with QPainter to treat default constructed QPens as cosmetic still. The NonCosmeticDefaultPen render hint gets documented as obsolete, since it was in any case not respected by the raster nor OpenGL paint engine. Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix crash due to memory access violationKonstantin Ritt2012-10-221-0/+1
| | | | | | | | The font engine has been re-used without increasing it's reference counter Task-number: QTBUG-27596 Change-Id: Icd4c3ca131446255ad4a27da8aa9a6c69177212e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed GCC 3.4 build with sse2 enabled.Samuel Rødal2012-10-191-1/+2
| | | | | | | | With minimal effort we can keep the GCC 3.4 build working. Task-number: QTBUG-19803 Change-Id: I31611a27b97d5ac426ea857d8f1b656dc6f5377a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFont: Don't invalidate engine unless request has been changedKonstantin Ritt2012-10-192-7/+29
| | | | | | | | | | This makes QFont do a "light" detach when the font attributes data has been changed. The new test clearly shows that the engine is now shared between two font instances after changing the kerning attribute. Change-Id: I59db822f459f02d111686dba7101b98e361fada9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Modularize drag and drop documentationGatis Paeglis2012-10-1934-7/+2554
| | | | | | | | - Move dnd docs and examples out of QtDoc module to gui library in QtBase - Remove info related to Motif dnd since Qt5 doesn't implement it Change-Id: Id7eb4eb422f4294a36dd92709ce3007903371f03 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* remove explicit load(qt_build_config)s from the librariesOswald Buddenhagen2012-10-191-2/+0
| | | | | | | .qmake.conf (and previously .qmake.cache) already does that for us. Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix excess enter/leave event generation for native widgetsMiikka Heikkinen2012-10-193-2/+54
| | | | | | | | | | | | | | | | | | | | | | Native widgets have a native window each, so QPA plugin sends enter and leave events for associated QWindow whenever mouse cursor moves from one widget to another. QWidgetWindow had no context to interpret these events as moves from one widget to another, since they were sent separately. This resulted in leaves and enters for each widget in parent chain, when only the bottom child should have gotten them. Fixed by peeking into window system message queue when handling leave in QWidgetWindow and retrieving the entered window from queued enter event. Also provided a convenience function that QPA plugin can use to ensure both leave and enter events are in the event queue when moving from one QWindow to another. Task-number: QTBUG-27550 Change-Id: I74fec0ac90f6848495c2392c5f7e41624ad8aea2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove Qt3 compat leftoversKonstantin Ritt2012-10-191-12/+2
| | | | | Change-Id: I91c3d26125168998d6279bddb0671cfb68eac2f4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed inconsistent QPainter fill rules for aliased painting.Samuel Rødal2012-10-199-28/+86
| | | | | | | | | | | | | | | | | | | | | | Qt 5 is the time to get rid of all the old inconsistencies in the raster paint engine caused by trying to preserve the old X11 based coordinate system where (0, 0) is in the center of the top-left pixel instead of the upper left corner of said pixel. However, this was only adhered for line drawing and path / rect filling, and not for image or pixmap drawing and not at all when doing antialiased painting. By defining the antialiased coordinate system as being the right one and letting the aliased fill rules follow from that we finally end up with some consistent behavior that doesn't lead to surprises and workarounds in application code. It is still possible for applications to get the old behavior by setting the QPainter::Qt4CompatiblePainting render hint. This should make porting easier for the few cases where an application relies on the aliased fill rules we used to have in Qt 4. Task-number: QTBUG-27500 Change-Id: If86b95e77d838ec83033d64af86632b9a73c74a9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use the right properties when checking the frame's marginsAndy Shaw2012-10-181-4/+4
| | | | | | | | | Changed it to check the Frame*Margin property instead of the Block*Margin property as this was incorrect for a QTextFrameFormat. Task-number: QTBUG-22173 Change-Id: I2c3066165fb592ed034874b1180593822859f933 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowStateRichard Moe Gustavsen2012-10-173-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set the window state if it can, and return the actual window state back. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowState would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window state upon creation). As such, the window state might be left unsynched with the platform window. This patch suggests removing the return value from QPlatformWindow::setWindowState. This will at least be consistent, so that setting/getting state would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported/actual window state. Change-Id: Ie43f56169656854a765ce88b47a808f8f3d51bb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add QDrag class to 'draganddrop' groupGatis Paeglis2012-10-171-0/+1
| | | | | | Change-Id: I0cb96f57486dbda7cb9ca19556515e1b2b4f6c3e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove unneded forward declaration.Frederik Gladhorn2012-10-161-2/+0
| | | | | Change-Id: I19157bde9a7b5ac3eb54830841baea08c8af8670 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix setting custom cursor for widgets and windows before showing themMiikka Heikkinen2012-10-162-15/+22
| | | | | | | | | | | | If custom cursor was set before the window was created, it didn't actually get set, and in some cases even caused a crash. Fixed by making sure the cursor is correct when showing widget/window. Task-number: QTBUG-27535 Change-Id: I3bc946a9c406c96af5b86869a3a54893f8980aba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QPA: Introducing QPlatformTheme standardPixmap(), fileIconPixmap()Gabriel de Dietrich2012-10-162-1/+102
| | | | | | | | | | | | | | | | | | | | The basic idea is that the platform theme is now responsible for providing the pixmaps for the given standard name, or any file or directory. Then, the QStyle implementation should query the platform theme for the pixmaps, and build the icons accordingly using ThemeHint::IconPixmapSizes. Same thing for QFileIconProvider. This also opens future support for getting platform dependent pixmaps in QtQuick components. Also includes the implementation for the Cocoa (QCocoaTheme) and Windows (QWindowsTheme) platform plugins. Task-number: QTBUG-27450 Change-Id: I4e8406585d970a9af481be10f6643cf0abbc38a3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QScreen's physicalSize can change. Ensure siblings are updated.Shawn Rutledge2012-10-162-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | I have found the following scenarios when the physical size can appear to change even though you can't actually stretch your monitor: 1) VNC allows setting the resolution. Physical size will then be a fraction of the physical size of the monitor on which you display the VNC window. 2) When you rotate your display, the width and height are reversed. 3) MacOS X simulates a change in physical size when you change the mode to one whose aspect ratio does not match your monitor, and also when you use simulated HiDPI mode on a non-HiDPI monitor. While this info is basically wrong, since we are now querying the OS for it, we might as well make sure it is propagated all the way through to the QScreen object's properties. Also, make sure that when geometry changes on one screen, all the siblings are informed of the change in virtual geometry. Also simplified the signals (don't need separate ones to inform of changes which are fundamentally related to each other and always change together). Change-Id: I6a98a1c203e24e8fbeef6e90999671e56dc0c655 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Get rid of unused memberKonstantin Ritt2012-10-161-2/+0
| | | | | | Change-Id: Ic6d207cacf02f2e6837f9f35020be7728ec60706 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QTextBlock: Handle surrogates in textDirection()Konstantin Ritt2012-10-161-2/+9
| | | | | | | just like QString does. Change-Id: I002827d9ec93fb19ef2c0198b5fcd4dae15c5c34 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QFont: Don't detach unless value has really changedKonstantin Ritt2012-10-161-6/+46
| | | | | | Change-Id: I496b0102853d04652322bf8751e5824aaa0725b7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Ensure QOPENGLF_APIENTRY and QGLF_APIENTRY are set correctly.Jason Barron2012-10-161-0/+2
| | | | | | | | | | | | gl2ext.h only defines GL_APIENTRY and not APIENTRY so we should use this macro if it is available. Without it, code that uses QOPENGLF_APIENTRY and QGLF_APIENTRY might experience compile errors due to the differing signatures. Task-number: QTBUG-27313 Change-Id: Id79d934825928d9913138edc6e8f1b00edc89a8d Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QRawFont: improve performance and safety of glyphIndexesForString()Konstantin Ritt2012-10-152-39/+41
| | | | | | | | | | | As of 98c1eb1750498cdff9d3b26658e5e5be9c026c92, partially initialized QGlyphLayout is ok for stringToCMap() if GlyphIndicesOnly flag is set, thus we can use the glyphIndexes buffer directly and avoid copying. Also add some checks to guarantee we're not falling into an undefined behavior for the empty text or NULL buffer. Change-Id: I662953703e4c65edbebabbe4b753972417d963f3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QKeySequence: remove duplicate QDataStream operatorsJ-P Nurmi2012-10-151-5/+0
| | | | | | | The operators are implemented in qkeysequence.cpp Change-Id: Id3078abe944673dd2076cc642e4474caa1472dcc Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowFlagsRichard Moe Gustavsen2012-10-153-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set as many of the flags it can, and return the same flags with the unsupported flags removed. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowFlags would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window flags upon creation). As such, the filtering would never be done. Looking at the current set of plugins, most of them also seems to ignore this protocol, returning the flags unfiltered. This patch suggests removing the return value from QPlatformWindow::setWindowFlags. This will at least be consistent, so that setting/getting flags would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported window flags. Change-Id: I9c759b5f9fab5ebed764a982f77fe19881118875 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Use constFind()/constEnd() for const_iterator-sKonstantin Ritt2012-10-133-7/+7
| | | | | | | to make the strict iterators happy. Change-Id: Ief4ec309b815f18dc4b2017d4f34c063db510c31 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix warnings from syncqt.Friedemann Kleint2012-10-134-2/+8
| | | | | | | | Stop processing in internal headers, use correct include syntax. Change-Id: I9dcf1f6f89907986b7b58658be514083f213a3e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix "open with" functionality on OSX (FileOpenEvent)Shawn Rutledge2012-10-131-0/+4
| | | | | | | | | | | | QGuiApplicationPrivate::processWindowSystemEvent needs to handle the FileOpen event type so that applications can receive the events from the Finder. This makes it possible to e.g. double-click a qml file and open it in QML Viewer. Task-number: QTBUG-26855 Change-Id: I1e14e478460e8823095e4a33cee1e0defbf76d8b Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Be able to obtain list of possible key combinations in platform integrationOliver Wolff2012-10-133-1/+22
| | | | | | | | | | | | As there is no way to obtain the list of possible keys for a shortcut in a platform independent way there needs to be a way to get that from the platform integration. Task-number: QTBUG-26902 Change-Id: I520add56ee09d5c3c58709fb29dad2fbfe4c9d0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QFont: Fix build with QFONTCACHE_DEBUGKonstantin Ritt2012-10-131-1/+1
| | | | | | Change-Id: Ifc89af71cdf6a5f9e4114266030cf265042db626 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QGlyphRun: Fix isEmpty() and boundingRect() didn't work after setRawData()Konstantin Ritt2012-10-131-5/+5
| | | | | Change-Id: I44a347ef24961493d6b8353abbb215c713ccce52 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix QTextBoundaryFinder usage cases in QAccessible2Konstantin Ritt2012-10-132-121/+175
| | | | | | | | | | | Make the implementation safer and closer to what http://www.linuxfoundation.org/collaborate/workgroups/accessibility/ia2/ia2_implementation_guide#boundaries requires us to do. Change-Id: I00af4697e52a9b6e7f5d7b3f403b29126fa1517b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Update/fix QTextBoundaryFinder simple usage cases in qtbaseKonstantin Ritt2012-10-131-10/+10
| | | | | | Change-Id: I4d3000558bce86e2de3c32247915868ba18fc8b7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed cosmetic line drawing where begin and end points are equal.Samuel Rødal2012-10-111-0/+5
| | | | | | | | | This case has typically required specific work-arounds in other rendering paths as well. Task-number: QTBUG-25153 Change-Id: I217e710a30222792ebca3bf297e438d944c32992 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Modularize documenation buildTor Arne Vestbø2012-10-102-6/+4
| | | | | | | | | | qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global includes, instead of using relative paths. Qt modules will automatically get a doc target that builds and installs into the right place (including supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module). Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Revert "Handle additional format ranges when itemizing."Pierre Rossi2012-10-101-40/+23
| | | | | | | | | | | This reverts commit 101d04681f4ceb7410681eae684534a206a9d90a. That change seems to have introduced a few regressions, and Creator hits an assertion that it introduced because it assumes the additionalFormats consists of well-formed ranges (QTCREATORBUG-7995). Change-Id: Ic4ae761e6e7f6df8a6b5ca565ceb250647420c15 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Remove handleSynchronous* functions.Morten Johan Sorvig2012-10-104-68/+57
| | | | | | | | | | | | | | | | | | | | There are now two different ways to implement synchronous event processing. The platform plugins can choose which one to use. 1) flushWindowSystemEvents() Use to flush the event queue at one point, making preceding calls synchronous. 2) setSynchronousWindowsSystemEvents(bool enable) Makes all handle* functions synchronous, bypassing the event queue completely. Change-Id: I020b80c731fd13f855a377d7c91d06a4e39b6a0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Invalidate old QImage data if load()/loadFromData() has failedKonstantin Ritt2012-10-103-43/+42
| | | | | | | | | | This guarantees one will never get `!img.isNull()` after load()/loadFromData() has failed, even if the image was not null before. Apply the same fix to QPixmap and QPicture. Change-Id: Ida1ad6a6f0fc830df8e75ada0c163fc2d3360dea Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Avoid warnings about an unreachable codeKonstantin Ritt2012-10-101-4/+1
| | | | | Change-Id: I57c2967db4c1bd2c39ecb3eac9b18eb7455c6a50 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Mac: Bring back "Text boxes and list only" tab navigationGabriel de Dietrich2012-10-102-1/+7
| | | | | | | | | | | | | Added ThemeHint::TabAllWidgets as a mean to access that platform specific bool. The default implementation returns always true when querying QPlatformTheme::themeHint(). Several auto-tests had to be updated to reflect for qt_tab_all_widgets' type change. One XFAIL removed from tst_QApplication::focusChanged(). Task-number: QTBUG-24372 Change-Id: Ie1f0486c19898fe54c53aa4a27e378485075e512 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Scale icons returned by QIcon::fromTheme.David Sansome2012-10-101-2/+8
| | | | | | | | | | | | | | | | | The icon engine behind icons that are loaded from QIcon::fromTheme does not scale any pixmaps that it returns. When using an icon theme with an incomplete set of icons (for example, only a "128x128" folder), QIcon::pixmap will always return 128x128 pixmaps even if you ask for one of size 22x22. This is contrary to the QIcon::pixmap documentation that says "The pixmap might be smaller than requested, but never larger." This patch uses the same code that is in the main QIcon class in the PixmapEntry QIconLoaderEngineEntry to scale pixmaps if they are too big. Change-Id: Ic25a3628ac82cfb899574245f658490a2dd49d54 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Handle additional format ranges when itemizing.Pierre Rossi2012-10-081-23/+40
| | | | | | | | | | | | | | This is useful when the additional formats are used on a text layout using a raw font. It can also come in handy for input methods operating on a QTextDocument. We now consider all format range edges to generate the associated items. The capitalization can be overridden via the additionnal formats mechanism. Adds an autotest that checks that this works with font capitalization. Change-Id: I782d2c48d05b0dfbad480a9ca77198465292b358 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* doc: Brush up QPaintEngine documentation for Qt 5Eskil Abrahamsen Blomfeldt2012-10-081-13/+10
| | | | | | | | The paint engine story has changed drastically in Qt 5, and we no longer need the reference to Qt 3. Change-Id: I66090582e5c66d2a3cd9de355c34b33a94b67dfe Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* doc: Update Q*PaintDevice docsEskil Abrahamsen Blomfeldt2012-10-082-7/+7
| | | | | | | | | | | | | | | | | | | | | Minor syntax typo in QPagedPaintDevice. Some Qt 5 updates in QPaintDevice (QGuiApplication) and a couple of other changes: 1. Usually, we say an object is "painted" or "drawn" when it is drawn on top of another object (like drawEllipse()) not when it is the destination of the draw commands. To be more consistent I updated the language here. 2. What's commonly called a 32-bit display has 24 bits of color information and eight bits of opacity information. This gives a color count which can be accurately represented by int. To avoid confusion, the exception in the docs for colorCount() has been generalized a little. Change-Id: Iabaaed1f3e4a80e7e14dfd8855da8c3cd8b3012f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>