summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
Commit message (Collapse)AuthorAgeFilesLines
* Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-073-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* qpa: Fix rendering issue in blitter engine (negative scaling factors)Julien Brianceau2012-11-071-0/+35
| | | | | | | | | | | | A 180° rotation results in a TxScale QTransform with negative scaling factors (x=-1.0 y=-1.0). This is not properly handled by blitter paint engine yet, so use software rendering fallback in this case. This rendering issue can be seen when using "-webkit-transform" CSS property in WebKit with DirectFB QPA platform. Change-Id: Iee496b6bf0c90ffe36c4235ceaa2c80f296b2ca4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Introduced QWindow properties {min/max}imum{Width/Height}Samuel Rødal2012-11-021-0/+53
| | | | | | | These are useful when QWindow is exposed to QML. Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Strip trailing whitespace in itemviews.Stephen Kelly2012-11-011-22/+22
| | | | | | | | | | | Using git ls-files -z | xargs -0 sed -i 's/ \+$//' in the relevant directories. Change-Id: I861ef9952fb32ed2db9ec8b67864ec7d0d61f0f2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Send leave to most recently entered window when modal dialog is shown.Miikka Heikkinen2012-10-301-4/+65
| | | | | | | | | | | | | | | If a modal dialog was shown as a response to button click, the button retained its hover highlight, because it didn't get leave event. Fixed by tracking the most recently entered window and sending a leave to it when modal dialog is shown that blocks it. Also modified tst_QGuiApplication::modalWindow() autotest to check for enters and leaves. Task-number: QTBUG-27644 Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* test: Remove QSKIP from ↵Sergio Ahumada2012-10-301-3/+5
| | | | | | | tst_QPainter::drawText_subPixelPositionsInRaster_qtbug5053() Change-Id: I1aa329323767a3e849beca8fe41e39dbe98de4ee Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QFontEngineMulti: Fix possible crash in stringToCMap()Konstantin Ritt2012-10-292-1/+35
| | | | | | | | | in case when the layout is partially initialized. We shouldn't access any data except of indices if GlyphIndicesOnly flag has been passed in. Change-Id: I264689b498e0f9de8b5c040d47dbae4f6ef391c4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* test: Remove dead code from tst_QPixmapSergio Ahumada2012-10-271-6/+1
| | | | | | Change-Id: I1945a0f431364f47a43cf7f600ad38fdba5f4a08 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* test: Remove tst_QPixmap::grabWindow() functionSergio Ahumada2012-10-251-31/+0
| | | | | | | | | QPixmap::grabWindow() was deprecated by 41914453d38d01b9b69e16ccee69444d1a304bf7 Task-number: QTBUG-20863 Change-Id: I7e675c124cd96cf1815b65e57f3fba19e5065066 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* test: Remove QSKIP from tst_QClipboard::copy_exit_paste()Sergio Ahumada2012-10-241-5/+7
| | | | | Change-Id: Ib64680dbd966940c56ab089ff1b7727b237fdaee Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix QRegExpValidator::validate docs about the pos parameterGiuseppe D'Angelo2012-10-221-2/+9
| | | | | | | | | | | | | | | | | | | 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-223-4/+5
| | | | | | | | | | | 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>
* normalise signal/slot signatures [QtGui tests]Marc Mutz2012-10-224-50/+50
| | | | | Change-Id: I42e11de9ef1d8a04b2a8e200afb84f2245f3361a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QFont: Don't invalidate engine unless request has been changedKonstantin Ritt2012-10-192-0/+44
| | | | | | | | | | 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>
* Fixed inconsistent QPainter fill rules for aliased painting.Samuel Rødal2012-10-191-4/+9
| | | | | | | | | | | | | | | | | | | | | | 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-0/+19
| | | | | | | | | 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>
* Test: remove QSKIP and remove whole test cases instead.Caroline Chao2012-10-171-9/+8
| | | | | Change-Id: I8b625d20a2cf9215cbfdb96cd252bf1c81bba522 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QRawFont: improve performance and safety of glyphIndexesForString()Konstantin Ritt2012-10-151-0/+45
| | | | | | | | | | | 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>
* Do not skip tst_QClipboard::copy_exit_paste on QNXRafael Roquetto2012-10-131-1/+1
| | | | | | | This test is valid on QNX platforms. Change-Id: Ic9657c2b92628a649ab52367135dcb3a77450913 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Make QValidator tests do not require a QApplicationGiuseppe D'Angelo2012-10-132-2/+2
| | | | | | | | Change-Id: I9aae997e33672203470b0429cc061a1adf88dfe9 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Auto tests: revise cursor dependant testsJ-P Nurmi2012-10-132-2/+13
| | | | | | | | | | | | | | | | | | Cursor dependant auto tests are currently skipped in various ways. Some are checking PlatformQuirks::haveMouseCursor() that tries to detect if the desktop environment is MeeGo, using obsolete Q_WS_X11. Some are skipped if QT_NO_CURSOR or Q_OS_WINCE is defined and some are actually missing the approriate guards. => unify by defining QTEST_NO_CURSOR in qtest-config.h when appropriate ie. for platforms that have no regular mouse cursor support or when QT_NO_CURSOR is defined. Task-number: QTBUG-22551 Change-Id: I9a1e0e3156617945ae46226c79268955454c8a9a Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QGlyphRun: Fix isEmpty() and boundingRect() didn't work after setRawData()Konstantin Ritt2012-10-131-0/+46
| | | | | Change-Id: I44a347ef24961493d6b8353abbb215c713ccce52 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fixed cosmetic line drawing where begin and end points are equal.Samuel Rødal2012-10-111-0/+21
| | | | | | | | | 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>
* Revert "Handle additional format ranges when itemizing."Pierre Rossi2012-10-101-108/+0
| | | | | | | | | | | 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>
* Move QValidator tests to QtGuiGiuseppe D'Angelo2012-10-1010-2/+852
| | | | | | | | Q*Validator classes are not in QtWidgets, so move them where they should stay. Change-Id: Ie6ea45a026e640fad131002bc9762c575235f3f4 Reviewed-by: David Faure <david.faure@kdab.com>
* Remove handleSynchronous* functions.Morten Johan Sorvig2012-10-101-3/+3
| | | | | | | | | | | | | | | | | | | | 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-102-0/+170
| | | | | | | | | | 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>
* Delete the QVariant ctors taking global Qt enum values.Stephen Kelly2012-10-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They have unexpected results in Qt 5 (the Qt::GlobalColor one works as expected in Qt 4, but was removed in Qt 5): QVariant v = QVariant(Qt::red); qDebug() << v; // QVariant(int, 7) v = Qt::red; qDebug() << v; // QVariant(int, 7) The correct way is to use: QVariant v = QVariant::fromValue(QColor(Qt::red)); The deleted constructors are the ones for which there is a class with an implicit constructor taking the enum, and that class is a built-in metatype. QLocale::Language and QKeySequence::StandardKey would also fit the description, but I can't include the header for QKeySequence as it is in QtGui, and I don't want to include the qlocale header in qvariant.h. Putting a QLocale::Language is probably very uncommon anyway. The QTextFormat test is doing the wrong thing, but the result isn't being tested. Added new tests which fail before the patch. Change-Id: Ia38a0784990f4d40ff7457a86daf58aabd4964eb Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Scale icons returned by QIcon::fromTheme.David Sansome2012-10-101-0/+6
| | | | | | | | | | | | | | | | | 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-0/+108
| | | | | | | | | | | | | | 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>
* Test: Enable tst_QWMatrix::operator_star_qwmatrixCaroline Chao2012-09-271-7/+2
| | | | | | | | | | Expecting results were not correct. The test is passing. Task-number: QTBUG-22362 Change-Id: Ie41c262019f76aace9062d7897d7934dc7437c3a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Revise QClipboard auto testsJ-P Nurmi2012-09-273-24/+33
| | | | | | | | Use PlatformClipboard::isAvailable() and fix build when QT_NO_CLIPBOARD is defined. Change-Id: I18c3af42fe39cf7618c2530723149848a10db985 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Fix QScreen::orientation() not always being updated after changing the ↵Simon Hausmann2012-09-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | update orientation mask The back-end might report screen orientation changes at any point and we record it in screen.d->orientation. However QScreen::orientation() returns the orientation filtered according to the mask. Changing the mask sends a notification to the back-end, which might send another update as a result of a possible subscription to system services (accelerometer). However on platforms where no subscription is required, where the platform plugin ignores the mask and always sends the latest orientation, we should "simulate" the update by updating the filtered orientation according to the new mask. The function is cheap to call as it won't emit any signals unless the orientation actually changes. This patch also adds missing flush() calls after handleScreenOrientationChange calls in the tests to ensure that the (synthetic) window system events are actually delivered to QScreen/QGuiApplication. Change-Id: Iebdd050f947e658ff5bc388629aa4cb31ab497fe Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Fix events being processed on application startSimon Hausmann2012-09-262-1/+74
| | | | | | | | | | | | | | | | | | | | | | | Commit ef2efafcc6b28791df6258fa1c5d565090a9577a introduced a call to QWindowSystemInterface::sendWindowSystemEvents() in QGuiApplicationPrivate::init(), which in its implementation ends up calling sendPostedEvents() before flushing and processing any pending (internal) window system events. This patch changes the call in init() to use QWindowSystemInterface::flushWindowSystemEvents() instead, which is more gentle in that regard. The provided unit test verifies that no posted events are processed during the execution of the QGuiApplication constructor while at the same time verifying what the original changed tried to do: Allow a generic plugin to provide window system specific defaults that are implemented using the event queue of QWindowSystemInterface. Task-number: QTBUG-26886 Change-Id: I129a907c00d947df60fe1a02efc67857580fce24 Reviewed-by: David Faure <faure@kde.org>
* test:Remove QSKIP from tst_QPainterSergey Hambardzumyan2012-09-261-2/+0
| | | | | | | | Removed QSKIP ("currently broken... ") from tst_qpainter.cpp. Change-Id: I2a5af009198d26015779ca368ef82188ddf1b060 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2278-1874/+1874
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* A step out from Harfbuzz (reduce dependency)Konstantin Ritt2012-09-221-14/+14
| | | | | | | | | | | | | | | | | Introduce QCharAttributes and use it instead of HB_CharAttributes everywhere in Qt (in Harfbuzz, the HB_CharAttributes is only used in the text segmentation algorithm which has been moved from HB to Qt (well, most of it)). Rename some members to better reflect their meaning, remember to keep HB_CharAttributes in sync with QCharAttributes. Also replace HB_ScriptItem with a (temporary) QUnicodeTools::ScriptItem struct that will be replaced with a more efficient/friendly solution a bit later. The soft hyphen and the mandatory break detection has been factored out of the default text breaking algorithm to a higher level in order to refactor the QCharAttributes bitfields and to optimize the implementation for the common case. Change-Id: Ieb365623ae954430f1c8b2dfcd65c82973143eec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed multiple modal windows from all blocking each other.Samuel Rødal2012-09-211-0/+40
| | | | | | | | | | | | A modal window in front in the modal window list should never be blocked by a modal window further back in the list. This was taken care of in QGuiApplicationPrivate::isWindowBlocked(), we just need to make sure it gets called when a new modal window gets shown so that its blocked status is up to date. Task-number: QTBUG-27206 Change-Id: I590f1715e66067edb178081352636f34fe54a885 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Fixed inconsistent rounding of square cap pens.Samuel Rødal2012-09-201-0/+29
| | | | | | | | | | | A horizontal line should round up at the same time as a vertical line with square cap, when rendering at subpixel coordinates. Thus, the special casing in the cosmetic stroker of offsetting by half a pixel should be for flat caps instead of for square caps. Task-number: QTBUG-26013 Change-Id: Ic09249337f814c7de95a17976ec9e651561a744b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Autotests: Use qInstallMessageHandlerKai Koehne2012-09-141-3/+3
| | | | | | | | qInstallMsgHandler got deprecated in Qt 5. Change-Id: Ib36983e66b3a8090b99f14e3fd4e210602a3f018 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests: Don't omit the body of a test function with QT_BUILD_INTERNALSergio Ahumada2012-09-143-6/+14
| | | | | | | | | | Changing it outside of the test function definition to avoid running empty/inapplicable test functions. Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
* Fix regression in QTextDocument::toHtml() with font pixel sizeEskil Abrahamsen Blomfeldt2012-09-121-0/+14
| | | | | | | | | | | | Introduced by 2e0003eda4783f69a40fb4b31e7084c761d9640d. We were missing a attributesEmitted=true which caused the output from toHtml() to sometimes be invalid when using pixel sizes to specify the font size. Task-number: QTBUG-25778 Change-Id: Ied61fcaef425a590d71c0b52292ac676cb88ba52 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
* Remove deprecated inputItem and inputWindow from QInputMethodPekka Vuorela2012-09-111-21/+7
| | | | | | | | Interfaces introduced and deprecated during Qt5 development. Change-Id: I804a02df8c4a03ed6558f4a86375f97d09513d5c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make gui/math3d classes use float rather than qrealSean Harmer2012-09-073-1769/+1745
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects the mismatch between using floats for internal storage and qreal in the API of QVector*D which leads to lots of implicit casts between double and float. This change also stops users from being surprised by the loss of precision when using these classes on desktop platforms and removes the need for the private constructors taking a dummy int as the final argument. The QMatrix4x4 and QQuaternion classes have been changed to use float for their internal storage since these are meant to be used in conjunction with the QVector*D classes. This is to prevent unexpected loss of precision and to improve performance. The on-disk format has also been changed from double to float thereby reducing the storage required when streaming vectors and matrices. This is potentially a large saving when working with complex 3D meshes etc. This also has a significant performance improvement when passing matrices to QOpenGLShaderProgram (and QGLShaderProgram) as we no longer have to iterate and convert the data to floats. This is an operation that could easily be needed many times per frame. This change also opens the door for further optimisations of these classes to be implemented by using SIMD intrinsics. This needs to be applied in conjunction with https://codereview.qt-project.org/#change,33548 Task-number: QTBUG-21035 Task-number: QTBUG-20661 Change-Id: I9321b06040ffb93ae1cbd72fd2013267ac901b2e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Made QImage::fill(uint pixel) for RGB888 accept QRgb values.Samuel Rødal2012-08-292-3/+20
| | | | | | | | | | | | Previously QImage::fill() for Format_RGB888 expected a BGR value instead of the RGB order defined by QRgb, making it counter intuitive to use related to the 32-bit formats. Fixed the QPixelLayout data for RGB888 and changed the byte order of quint24 based on what the optimized image conversion routines expect. Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Make letter spacing APIs in QTextFormat more consistentEskil Abrahamsen Blomfeldt2012-08-271-8/+12
| | | | | | | | | | | | Change d060b6f04f956ab3a6358f826dc6928b3353f5f7 introduced some new properties to QTextFormat which were unfinished and did not match the documentation in the same change. I've updated the API and docs to use the regular QFont enum for letter spacing type instead of introducing bools (which inhibits expansions later) or mutually exclusive properties in the text format. Change-Id: Ife44993b6746c413e421fdaf92ebaaab6ba95977 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Do not consider sign in qIsNull.Mitch Curtis2012-08-222-0/+25
| | | | | | | | | | | | | | | The current implementation of qIsNull only returns true if the value is positive zero. This behaviour is not useful for use cases like QPointF::isNull, where QPointF(-0, -0).isNull() will return false. There doesn't seem to be a reason why the function exhibits this behaviour (-0.0 is not accounted for in the unit tests), and for the case of QSizeF::scale it causes a bug: qIsNull is used to check for division by 0.0 before it proceeds, which fails in the case of -0.0. Task-number: QTBUG-7303 Change-Id: I767e5280bd26614e8e78ae62b274eb9bc4ade385 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix freetype font rendering for Windows CEAndreas Holzammer2012-08-202-0/+16
| | | | | | | | | | Windows CE does not have support for GetGlyphOutline. So addGlyphToPath will not work. QML uses it for their distance field rendering. One option to bypass this issue is to use freetype as rendering backend. Change-Id: I965254344945cbdad771a5d505fb61c1cc2087df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Auto test for passing QTextEdit as QSyntaxHighlighter parentJ-P Nurmi2012-08-182-1/+20
| | | | | | Change-Id: Ia225723de5b0b2085a72a2af26e2a563b65955d8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove some dead code wrapped in Q_WS_QWS.Stephen Kelly2012-08-033-9/+2
| | | | | Change-Id: Ie1ee8c4af603b924abe40145041357981d174445 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>