summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-194-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * Fix building with -qreal floatAllan Sandfeld Jensen2016-05-131-2/+2
| | | | | | | | | | | | | | | | | | Min and max expressions need matching types, which means we have to take care both values are qreal. Task-number: QTCREATORBUG-15851 Change-Id: I5f123e979fa896006ff6eafaac1f65b667db975d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Doc: Remove repository name from examplesinstallpathTopi Reinio2016-05-121-1/+1
| | | | | | | | | | | | | | | | Examples in binary packages now directly match the install path. Change-Id: Ic1487bc766cfd3b0a0a340cc4ae4ba49d953eaa6 Task-number: QTBUG-52953 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Remove wrong doc note for QPlatformBackingStore::flush()Gabriel de Dietrich2016-05-111-1/+2
| | | | | | | | | | | | | | This is no longer true on at least Cocoa, Windows and xcb. Change-Id: I214caae46a8707ab7c89138646219140079e919a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Avoid asserting when painting certain degenerate bezier pathsEirik Aavitsland2016-05-111-1/+1
| | | | | | | | | | | | | | | | | | It could happen that the stroker would attempt to join empty subpaths, resulting in an invalid path structure that would cause assert later. Task-number: QTBUG-43474 Change-Id: Ia369a31e60c40cdae3900d96f15f3e83c9e78b97 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QOpenGL: use new QJsonObject::value(QLatin1String)Marc Mutz2016-05-161-33/+17
| | | | | | | | | | | | | | | | Allows to get rid of some QStringLiterals, reducing QtGui text size by ~2Kib. Change-Id: Ic033fad5673aadc85930842dfccc24299df154f7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QFont::exactMatch() should return false for aliasesEskil Abrahamsen Blomfeldt2016-05-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 992f233c in Qt 4 repo. The rest of the change cannot be reverted, since it added public API, but that API might be useful anyway. The patch was wrong, basically. QFont::exactMatch() should not claim that you can get an exact match for a typeface alias. It also introduced some weird inconsistencies: For instance, if the first font the alias resolved to in FontConfig did not exist, then exactMatch() would return false, even if it then resolved to the next one which existed. This caused a test failure on OpenSuse, where the preferred font for "sans" is Arial, which doesn't exist, so Roboto will be used instead. [ChangeLog][QtGui][Important Behavior Changes] QFont::exactMatch() now returns false when the provided typeface is an alias. Task-number: QTBUG-46054 Change-Id: I7532d2879b492544620aa0d1d87dd493a4923af9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QImage::setPixelColor: warn about invalid colorsMitch Curtis2016-05-111-1/+7
| | | | | | | | | | | | Task-number: QTBUG-52142 Change-Id: I9f390bd332f8edabaece75a6b36830c691ff4b9e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QImageWriter: use new QJsonObject::value(QLatin1String)Marc Mutz2016-05-101-3/+3
| | | | | | | | | | | | | | | | Allows to get rid of some QStringLiterals, reducing QtGui text size by ~200b. Change-Id: I0f3a84c1c8ee6771d8e1f2c6284d314b3fc0c28a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-065-5/+26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * Fix segfault when exiting app running under eglfsElena Zaretskaya2016-05-041-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In function QWindow::destroy() the platformWindow is destroyed (QEglFSWindow in this case), but after that the QSurface destructor is called (qsurface.cpp:127), where access to the opengl context is performed (QOpenGLContext::currentContext()->doneCurrent()). Therefore the surface pointer is deleted earlier (gbm_surface_destroy) than the working with it (eglMakeCurrent) is finished. But the event QPlatformSurfaceEvent, that is sent before deleting platformWindow, isn't processed (qwindow.cpp:1665), though we can perform doneCurrent() in the handler of QPlatformSurfaceEvent. The full description with valgrind stacks on bugreports. Task-number: QTBUG-52399 Change-Id: I69035dfd8ba5b5eeec243bc0edd3f571dc9525f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * doc: Clarify how to remove a QTextFrameEskil Abrahamsen Blomfeldt2016-05-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | The documentation wrongfully recommended deleting QTextFrames directly. This would cause a crash, since the destructor didn't update the document's layout at all. The correct way is the same as when removing other aspects of the document. Task-number: QTBUG-53082 Change-Id: I64f0ad08f1d063626456fa51d03611871ce6aa45 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * QOpenGLCustomShaderStage - fix a memory leakTimur Pocheptsov2016-05-032-0/+4
| | | | | | | | | | | | | | | | Coverity found a memory leak - CID-10995. Fix a dtor + make copy constructor / assignment operator private (Q_DISABLE_COPY). Change-Id: I4f046d075b60fbfb69f350e4a4d8b07ea1643914 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix underline position on Liberation MonoAllan Sandfeld Jensen2016-05-021-3/+6
| | | | | | | | | | | | | | | | | | | | Ensure we don't round a underline position beyond the descent in our eagerness to avoid underlines too close to baseline. Task-number: QTCREATORBUG-15851 Change-Id: I9a29447bbcb938b7e9fb29d52fd392a1340d07c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Support color font rendering for freetype engineJian Liang2016-05-033-127/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch mainly do two things: 1) Support color bitmap font for freetype fontengine. This partially based on Corentin Jabot's patch 2) Support ARGB opengl glyph cache when workaround_brokenFBOReadBack is true (It is always true under Android). Some code refactor has been done in QOpenGLTextureGlyphCache. This patch also bump the minimal required freetype version to 2.2 [ChangeLog][General][Freetype] Support color font rendering Task-number: QTBUG-35156 Change-Id: I35aae5f98ba9a27b70a48db3f2647fc070c39c33 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Add QInputMethod::inputItemClipRectangle()Jan Arve Saether2016-05-022-0/+18
| | | | | | | | | | | | | | | | This property allows a convenient way of getting notified about changes in the input item clipped rectangle, similar to QIM::cursorRectangle(). Change-Id: I26bf97eeb1f5ef1b7d3aafb03565023091d6df3d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-295-13/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| * QPdf: Force miter limit into valid rangeKai Pastor2016-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | Miter limits below 1.0 are not valid in PDF and trigger an error in the Reader. This change enforces a minimum miter limit of 1.0, and it adds a manual test for producing a PDF file demonstrating this issue. Task-number: QTBUG-52641 Change-Id: I1c78b1c4a44579e95e1cddfb459926d304e60165 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Fix clipping of wave underline decoration on certain fontsAllan Sandfeld Jensen2016-04-271-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Limit the height of the the wave-pixmap so that fillRect doesn't clip it. At the same time the precision of the generated wave-pixmap is improved so it better fits the requested radius. Task-number: QTCREATORBUG-15851 Change-Id: If754387b20ab7b015857ecb0a0e8fe16de1d728a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Silence MSVC warnings when using certain std algorithmsMarc Mutz2016-04-262-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MSVC STL warns when passing naked pointers as non-bounded iterators to algorithms such as std::equal and std::copy, in an attempt to inform users that the range specified by that iterator has an implicit minimum size that the caller of the algorithm must ensure is met: warning C4996: 'std::_Equal1': Function call with parameters that may be unsafe - \ this call relies on the caller to check that the passed values are correct. To \ disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to \ use Visual C++ 'Checked Iterators' When building Qt, as well as when building user projects with qmake (cf. 0a76b6bc7f98900ea884cd10ccca1a332e5bdba5), we globally disable this warning (with -D_SCL_SECURE_NO_WARNINGS), but since we started using STL algorithms in public headers (e.g. in qvector.h), users get this warning in their own projects now, unless they, too, define said macro. But such a requirement is against the Qt policy to have headers that are warning-free as much as possible. The suggested way of fixing this warning is to wrap the naked pointer in a stdext::unchecked_array_iterator before passing it to the algorithm, cf. examples in https://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.120%29.aspx or, together with the capacity-made-explicit, in a stdext::checked_array_iterator. To avoid ifdefs for platforms that don't have these extensions (which, incidentally, for the unchecked case, includes MSVC 2012), wrap the calls in macros. The end game here is to drop -D_SCL_SECURE_NO_WARNINGS, at least for public headers, even though this commit also adds the wrapper to implementation and private header files. An alternative to the wrapper would have been the version of std::equal that takes four iterators. However, that is a C++14 library feature, while this version of Qt still needs to compile with a C++98 compiler, and, more importantly, there isn't, and never will be, a corresponding 4-iterator version of std::copy. Task-number: QTBUG-47948 Done-with: Stephen Kelly <steveire@gmail.com> Change-Id: I1bbab257fb5f1c5042939c382a412b596112ff26 Reviewed-by: Stephen Kelly <ske@ableton.com>
| * QZipReader - test that QFile::open was, indeed, successful.Timur Pocheptsov2016-04-261-4/+2
| | | | | | | | | | | | | | | | | | Coverity, CIDs 10917, 10918. This fix looks like purely cosmetic and unneeded: we check f->error() after f->open(). Unfortunately, f->open() can fail without setting an error (if you provided an invalid mode). Change-Id: Idbfcb9305b3f004e5e425cb6076b41e193b8d473 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Change some members of QFontEngineFT::Glyph to shortJian Liang2016-04-292-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some color bitmap fonts will have a size greater than 127 pixels, areMetricsTooLarge() will return true(its advance exceed 127) for these fonts and we are unable to render these fonts since QFontEngineFT::loadGlyph() will simply do nothing if areMetricsTooLarge() return true. To support bitmap font whose size is between 128 and 255, we change x,y,advance of QFontEngineFT::Glyph to short variable to make areMetricsTooLarge() return false, in this way we will be able to render such color bitmap fonts. Change-Id: I9ab244b14884cdde91040a462f2fbca650b91289 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Optimize convert_Indexed8_to_X32Allan Sandfeld Jensen2016-04-271-4/+10
| | | | | | | | | | | | | | | | Basic optimization of conversion from indexed8. Task-number: QTBUG-35747 Change-Id: Ic9d32789769eadb05fbecfebf2d2f2c87d66610b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Avoid processing bezier curves that will be clipped anywayAllan Sandfeld Jensen2016-04-271-4/+17
| | | | | | | | | | | | | | | | | | Simplify curves ourside the clipped area with a straight line that closes the path, but saves us a lot of time and memory when zooming in on a path. Change-Id: I437f7eab564b805ebbefccd6755060156227c88d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix font fallback for an overridden Common script casesKonstantin Ritt2016-04-273-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Always prefer the requested font, even if it doesn't support the script of interest, and fallback to a font that *does* support that script, so that the best-matching font always takes a precedence. The result looks much closer to what CT and GDI/DW does. Task-number: QTBUG-35836 Task-number: QTBUG-39377 Task-number: QTBUG-43408 Change-Id: I6a89593565683f318f7292ec5ecf271dadc4142a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | QPdf: replace a hand-written qWarning with Q_UNIMPLEMENTEDMarc Mutz2016-04-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | But keep the 'Implement me' as a comment. Remove default label from the switch to indicate that the warning is only for the conical gradient case, and not for the NoGradient case. Also enables compiler warnings should we ever decide to add another gradient type. Change-Id: I891e652ff0293b4b4c254c7a55ebc6120b4fbcb6 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-04-261-19/+19
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-251-19/+19
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| | * Avoid conversion warnings in qrgba64.hAllan Sandfeld Jensen2016-04-141-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make implicit down conversions explicit to silence the most pedantic of compiler warnings. Task-number: QTBUG-52545 Change-Id: Id8f9574b47c8b4ee43023c80a3e009fab0e85008 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | QtGui: mark more types as primitive/movableMarc Mutz2016-04-255-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These types are held in QVarLengthArrays, so benefit from being trivially relocatable. They are also part of the private API, so there's no BC issues with potential uses of these types in QList, except for QPainter::PixmapFragment, which consequently has been marked as relocatable only. Change-Id: I90fb9a19231c6f5c71c593602fc997ffafe8f047 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Update ANGLE to chromium/2651Oliver Wolff2016-04-251-0/+3
|/ / | | | | | | | | Change-Id: I1cd32b780b1a0b913fab870e155ae1f4f9ac40d7 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Interpret fixed CSS line-height as minimum rather than absoluteEskil Abrahamsen Blomfeldt2016-04-195-17/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTextBlockFormat::FixedHeight overrides the line height regardless of its calculated height. If the line contains objects or text which is higher than the specified line height, using FixedHeight will cause them to overlap with the previous line. This is not what happens in normal web browsers. The expected behavior is that the line height given in CSS is the minimum height, but that we still reserve space needed to display everything without overlaps. To make it possible for people to retain the old behavior, we introduce the -qt-line-height-type property, which allows them to override the default. This also fixes output from toHtml() to use the new property rather than set the minimum height of the paragraph or the "line-spacing" property, which does not exist in either CSS nor in Qt. [ChangeLog][QtGui][Important Behavior Changes] When line height is specified in pixels, this is now interpreted as the minimum line height rather than an absolute line height to avoid overlaps. To get the old behavior, use the -qt-line-height-type property in CSS and set it to "fixed". Task-number: QTBUG-51962 Change-Id: Ic2dde649b69209672170dad4c2de1e1c432a1078 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fix perspective clipping regressionAllan Sandfeld Jensen2016-04-151-3/+25
| | | | | | | | | | | | | | | | Undoes part of c327fb79e1a50c825a945e97f2c66d07a1c6d225 so perspective transforms are still handled by QTransform on the path. Change-Id: I4801f24898a401ff93a96a852170ea6b7b70ce1c Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* | QGuiApplication: don't force lower case styleOverrideJ-P Nurmi2016-04-151-2/+2
| | | | | | | | | | | | | | | | | | QtQuick Controls 2.0 is going to have capitalized style names (Material, Universal, ...) so move the toLower() call to QApplication where widgets make use of styleOverride. Change-Id: I5a8c5ee38517690728f5f8f01024d4e692c81668 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Fix some qdoc-warnings in 5.7.Friedemann Kleint2016-04-132-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/global/qnamespace.qdoc:101: warning: Undocumented enum item 'AA_SynthesizeMouseForUnhandledTabletEvents' in Qt::ApplicationAttribute qtbase/src/corelib/global/qnamespace.qdoc:2554: warning: Undocumented enum item 'ImAnchorRectangle' in Qt::InputMethodQuery qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: Can't link to 'Q_COMPILER_DELEGATING_CONSTRUCTORS' qtbase/src/gui/image/qiconloader.cpp:160: warning: Cannot find 'QIconCacheGtkReader' specified with '\class' in any header file qtbase/src/gui/painting/qpaintengine_raster.cpp:1382: warning: No documentation for 'QRasterPaintEngine::fillPath(const QPainterPath &path, QSpanData *fillData)' qtbase/src/testlib/qtest.h:176: warning: No documentation for 'QTest::toString(const QHostAddress &addr)' qtbase/src/testlib/qtest_gui.h:77: warning: No documentation for 'QTest::toString(const QColor &color)' Change-Id: If9ac0807accf2530ec7fc2ca7db71a110f9f79bb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Make the eglfs and eglfs-viv detection and build work for INTEGRITY.Rolland Dudemaine2016-04-131-0/+4
| | | | | | | | | | | | | | | | | | | | The majority of these changes is about #ifdef-ing the Linux-specific use of /dev/fb0. The display handle is also acquired using fbGetDisplay(), which is equivalent to fbGetDisplayByIndex(0) but is also portable. Change-Id: I6f460edc9c06ae7461a6aab2a816ac6f645208c4 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-10/+9
|\| | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| * Qt Quick: Fix bug for selections with line wraps and breaksEskil Abrahamsen Blomfeldt2016-04-081-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes yet another bug where the selection spans both line wraps and explicit line breaks. Offsetting the log clusters by the text position in 342c909b340cb1bfbb95480fc79dcea21a470c83 was not entirely correct, because in some cases the script item will refer to a specific part of the string, as indicated by si.position, while iterator.itemStart is in the context of the full string. In this case, the log cluster array pointer we use refers to the script item's part of the array, i.e. it is already offset by si.position. Therefore, we must offset the logClusters pointer by the text position *relative* to the current script item. Previously we would actually offset by si.position twice in cases where si.position != 0. We want the text range to refer to the full string, though, so it can be compared to other text ranges later. However, in some cases when we are requesting only part of a script item, then iterator.itemStart does not correspond to relativeFrom, so in order for the text range search to work, we must pass in the text positions we are using [relativeFrom, relativeTo], though offset by si.position so that it refers to the full string and not just the part addressed by the script item. Task-number: QTBUG-51759 Change-Id: Ib69856d6d3bc1dd501db94c9d295623f436d122c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Use QTransform instead of doing transforms manuallyv5.7.0-beta1Allan Sandfeld Jensen2016-04-122-59/+8
| | | | | | | | | | | | | | Minor cleanup of QOutlineMapper to take advantage of QTransform. Change-Id: I15534970a821c7f1de42f4a5a2560f04ae420d16 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Do not clip or rasterize paths completely outside the device rectAllan Sandfeld Jensen2016-04-091-2/+6
| | | | | | | | | | | | | | | | | | | | The controlPointRect is a conservative area that is guaranteed to contain the path, if that does not intersect with the painter's device rect, the path must be fully outside the painted area, and can be ignored. Change-Id: If14d7dbaf916aa284b941d01e773da3365dce5bf Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QtBase: use erase and std::remove_if with QList and QVectorAnton Kudryavtsev2016-04-082-14/+15
| | | | | | | | | | | | | | ... instead of using removeAt in a loop, with quadratic complexity. Change-Id: I38b49e56b12c396db9fc0f1b75d8fb43c503a7f6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | add cross-platform tablet->mouse event synth; enable on AndroidShawn Rutledge2016-04-083-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's urgent to fix the issue that on Android, it became impossible to interact with any widget or MouseArea which handles only mouse events but not tablet events, using the stylus, because stylus events are sent only as QTabletEvents. Before 5.6 (change 01d78ba86a631386a4d47b7c12d2a359da28f517) they were sent as touch events, and mouse events were synthesized from those. Whereas on other platforms, every QTabletEvent is followed by a synthesized QMouseEvent. This fix proceeds in the direction that event synthesis should be done in cross-platform code so that platform plugins don't have to repeat it, following the same pattern as for touch->mouse synthesis. Just as in that case, the application can disable it, and the platform plugin can also report that it's unnecessary for Qt to do the synthesis because the platform already does. So QTBUG-51618 is fixed, but QTBUG-47007 requires us to remove the tablet->mouse synthesis from all platform plugins, because the plugin does not know whether the tablet event was accepted or not, so it does not have enough information to decide whether to synthesize a mouse event. Synthesis has been unconditional until now, which contradicts what the documentation says: the mouse event should be sent only if the tablet event is NOT accepted. We can now gradually make this promise come true. [ChangeLog][QtCore][Tablet support] A synthetic mouse event will no longer be sent after every QTabletEvent, only after those which are not accepted (as documented). Task-number: QTBUG-47007 Task-number: QTBUG-51618 Change-Id: I99404e0c2b39bbca4377be6fd48e0c6b20338466 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Add flag for showing document terminator in textEskil Abrahamsen Blomfeldt2016-04-083-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 208496091d994c2ffe44ea41368fb659978c1581, the behavior of QTextOption::ShowLineAndParagraphSeparators was changed to also include a section symbol at the end of the document. This was an unnecessary behavioral change. Instead we add a separate flag for this marker. [ChangeLog][QtGui][Text] Added QTextOption::ShowDocumentTerminator flag. Task-number: QTBUG-52048 Change-Id: I2f6f7e5c9c894f46525682f2c6520a7003fa09bc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-073-5/+8
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| * Fix QPrinter PDF output using fonts with spaces in the PostScript name.Jake Petroules2016-04-061-3/+4
| | | | | | | | | | | | | | Task-number: QTBUG-52352 Done-with: Andy Shaw <andy.shaw@theqtcompany.com> Change-Id: Id8dcb4a57520c2cc53483672f6578e5ab0bb5de5 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Avoid unnecessary allocation in QClipData::setClipRegion()Gabriel de Dietrich2016-04-061-1/+1
| | | | | | | | | | Change-Id: I1280a496478ec6839ac432ffd63ecea28dbb972a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Do not disconnect with nullptr when unplugging screensLaszlo Agocs2016-04-051-1/+3
| | | | | | | | | | | | | | Task-number: QTBUG-42803 Change-Id: I080ec3f0cc2cb55b43a9b8792f03b002b2e0f982 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Add support for ImhAnchorRectangleJan Arve Sæther2016-04-064-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | Adds the following API: * QInputMethod::anchorRectangle() * QPlatformInputContext::setSelectionOnFocusObject() This will be used for determining how to display selection handles. Change-Id: If57e3fd58ff0f1ba7899f7dd62bfa9c006028667 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-048-29/+63
|\| | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| * Fix possible out-of-bounds access when making distance fieldsEskil Abrahamsen Blomfeldt2016-03-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | While extremely unlikely, there is a theoretical possibility that the '0' glyph of a given font will have a width or height of 1 pixel, in which case the (x + 1) / 2 way of getting the center would give us an out of bounds pixel. We just default to true in this case, since we cannot make any assumption based on the 0 glyph if it doesn't make any sense. If the image is invalid, we default to false. Change-Id: I36cea0b80c9d55aa10eb65db44d1b7ec8a40fc8c Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>