summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* doc: clangqdoc must always see GL typedefsMartin Smith2017-12-082-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | QT_NO_OPENGL must not be defined when running clangqdoc because there are opengl elements that must be documented. That means clang will see uses of GLxxx, which might not be included on some platforms. For example, clang must parse the declaration for class QOpenGLFramebufferObject, which uses GLuint, GLenum, and GLbitfield, because there is documentation to be published for that class in qopenglframebufferobject.cpp. This change uses Q_CLANG_QDOC to first undef the needed GLxxx types and then provide suitable typedefs for them. This technique is also used in qglshader.h. This works for macOS, but is it the right way to solve the problem? This change also removes some \overload commands, because they shouldn't be used on constructors. And some \fn commands that are made unnecessary by upgrading to clang. Change-Id: I4ac658e951b3f2011698005f0238d4dea85fc403 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix persistence of custom colors palette in QColorDialogSerge Lysenko2017-12-081-0/+1
| | | | | | | | | QColorDialog does not save custom colors after application relaunching, if those colors were changed with drag'n'drop Task-number: QTBUG-64500 Change-Id: I8ba6e1ef4e078f7b93463e7b20c9e21659d4777e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-086-11/+11
| | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve QTabletEvent::rotation documentationShawn Rutledge2017-12-071-6/+9
| | | | | | | | | - There was a typo - It has not been limited to the 4D mouse for some time now - The Apple Pencil now supports rotation too Change-Id: I96e20a56491fbcb80e19dc39d0b48b543217aa24 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QRegion: deprecate rects()Marc Mutz2017-12-072-16/+38
| | | | | | | | | | | | | | | | | It was superseded by begin()/end() in Qt 5.8. The eventual removal of rects() will allow greater flexibility in the implementation's choice of data structure (std::vector, e.g., or QVarLengthArray). Remove all traces of rects() from the documentation. This means we need to copy information previously contained in the rects() docs to functions which previously just referred to rects(), in particular the begin()/end() familiy of functions. Change-Id: I90809809783252f7c552f24b4841f1e965580284 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtGui: port away from QRegion::rects()Marc Mutz2017-12-063-30/+30
| | | | | | | | | | | | Use begin()/end()/rectCount() instead, which don't require QRegionPrivate ::vectorize() calls. In QPaintEngineEx::clip(), the rectCount() == 1 case called clip(QRect), but forgot to return, causing another clip(QVectorPath) call with the same arguments. Fixed. Change-Id: Ife33112fc8006ed4bdff6409e2b8465ce7acb9d1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* doc: Add class qualifiers to parameter typesMartin Smith2017-12-062-2/+6
| | | | | | | | This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Document remaining anonymous enumsMartin Smith2017-12-061-0/+7
| | | | | | | | This change adds qdoc comments for the remaining nameless enum types. Change-Id: I4da8b67883c8020323437cf74c938d3655d8c384 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix qdoc errors for \fn commands in QGenericMatrixMartin Smith2017-12-031-29/+29
| | | | | | | | | This change updates the \fn commands in QGenericMatrix clangqdoc now parses these \fn commands and expects to see all the template stuff in the signatures. Change-Id: Icf815606f98271aae1959adc633e918e7f241aa0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Add default openGL typedefs for clangqdocMartin Smith2017-12-022-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | When Q_CLANG_QDOC is defined, ensure that the following openGL types are defined: typedef int GLint; typedef int GLsizei; typedef unsigned int GLuint; typedef unsigned int GLenum; typedef unsigned int GLbitfield; typedef float GLfloat; typedef float GLclampf; typedef bool GLboolean; typedef void GLvoid; typedef char GLchar; Running clangqdoc with these on macOS fixed over 500 qdoc errors! There were also some functions that declared the parameter list as void. It was also shown as void in the \fn command for each function in the .cpp file, which is wrong. When the function is declared in the header as int func(void), it should just be \fn int classname::func() in the .cpp file. Change-Id: I6489d499f0830e5ba97c085ed5dadfad5affecb7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix some ref qualifier documentation errorsMartin Smith2017-12-021-3/+8
| | | | | | | | | | Some member functions of QImage were upgraded to use ref qualifiers, but the documentation wasn't updated correctly to account for this. This change update the documentation for those member functions to show the ref qualifiers in the documentation. Change-Id: I0ff4011e9d0251062d5616d69e9dda6bdbc1c136 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Don't let qdoc see some defines that cause troubleMartin Smith2017-12-022-1/+3
| | | | | | | | | | | This update surrounds some #defines with #ifndef Q_CLANG_QDOC because they define some names that conflict with formal parameter names. Otherwise, clang starts replacing formal parameter names with $27 etc, when qdoc runs, and that causes trouble for qdoc. The change also replaces one use of Q_QDOC with Q_CLANG_QDOC. Change-Id: I6e93bf1e0d30d7590280b6f18f0e694556050685 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QImage: Output some bytes of first scanline on verbose debug streamsFriedemann Kleint2017-12-011-2/+9
| | | | | Change-Id: I1003c2b4109112fb2d2733a156120a041d7bd695 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* macx-clang: Opt-in xcb QPA support with XQuartzGabriel de Dietrich2017-12-011-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Enable xcb QPA plugin when XQuartz is available. This is done in a single build, alongside the Cocoa version. We delegate part of the configuration stage to pkg-config, so this becomes a requirement. Ensure that PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig is in your environment, or pkg-config is properly set up. Tested with the following configure options: configure \ -pkg-config \ -fontconfig -system-freetype \ -system-xcb -xkb -no-opengl \ -qt-xkbcommon -qt-xkbcommon-x11 Change-Id: I2eb5a0491172368afc4c629c540cbef08580348d Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-304-3/+7
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-304-3/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-233-2/+6
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_win.cpp src/plugins/platforms/ios/qioswindow.mm src/plugins/platforms/ios/quiview.mm tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
| | | * qpa: Teach handleApplicationStateChanged about sync/async deliveryTor Arne Vestbø2017-11-202-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using QWindowSystemInterface::SynchronousDelivery reduces the chance that we are flushing other events before delivering the application state change. Those other events may conclude that the application is still active, while in reality it is not, and do bad things. Change-Id: I738c162fac22d2cd18de1e080bcd2cda78ec3f77 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * QPixmap without QGuiApplication: do not crash, terminate gracefullyEirik Aavitsland2017-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Any attempt to create a non-null QPixmap in a QCoreApplication-based app would give a hard crash without a warning. This commit adds a check and instead calls qFatal with an explanatory message. This was originally fixed in Qt 4 (ref. QTBUG-17873) but that was lost in the migration to Qt 5. Note that this fix still allows null QPixmaps to be created under QCoreApplication, since that has worked in all Qt 5 versions. Task-number: QTBUG-53572 Task-number: QTBUG-64125 Change-Id: I60ae29b90f1bd3663aeed2ce88dc1690fe66552c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | QImage: Add the replacement function to byteCount's deprecation msgThiago Macieira2017-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I938b024e38bf4aac9154fffd14f903e22b364c0d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | macOS: Fix handling of multiple ampersands in menu itemsAndre de la Rocha2017-11-301-2/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the text of a QAction in a menu item contained a sequence of multiple ampersand characters, only one of them would be removed, which is inconsistent with the way this situation is handled on Windows, where every other ampersand is removed, which is also the way other widgets such as tabs, buttons, etc. are handled on macOS and other platforms. Task-number: QTBUG-63361 Change-Id: Ibd9a520afa37b3387f3b951a94a3c275742e7ad3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-2314-37/+75
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | Cocoa: Set NSImage (point) sizeMorten Johan Sørvig2017-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | when converting from QPixmap. This will make the image display correctly when used by native API. Task-number: QTBUG-60769 Change-Id: Iec3160affbe2902d34a219b6816f503dc2f56f74 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-5/+17
| |\| | | | | | | | | | Change-Id: I2f8f6b1d196548087219739faa3ad1517626da1e
| | * Document interaction of style name and other style propertiesAllan Sandfeld Jensen2017-11-121-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting style name to "Regular" and then setting bold to true, results in platform depending behavior, and should be avoided. Also removes comment about style name not working on Windows, it has been working since 5.8.0. Task-number: QTBUG-63792 Change-Id: Ie5be7215a673f5751dbeb6512df8ec7bfaef4d0a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-094-3/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * Fix QHighDpi::fromNativeLocalExposedRegion rounding errorsBłażej Szczygieł2017-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ceiling width/height fails to take into account rects that do no have their top left position on an exact point boundary. Example: QRect(0,0 20x20) and QRect(1,1 20x20) with scale 2.0 would give the same result of QRect(0,0 10x10). The correct rects are QRect(0,0 10x10) and QRect(0,0 11x11), so that we are sure to repaint all pixels within the exposed region. Before 5138fada0b9c, rects were also rounded incorrectly. The old method would give the result of QRect(0,0 11x11) in both cases, causing the exposed region to be larger than a window. Amends 5138fada0b9ce3968b23ec11df5f0d4e67544c43 Task-number: QTBUG-63943 Change-Id: I9f3dddf649bdc506c23bce1b6704860d61481459 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Enable glyph cache workaround for GC2000 as wellLaszlo Agocs2017-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glyph cache resize is clearly doing something that is not actually legal with OpenGL ES. Until this gets investigated properly, add the Vivante GC2000 (found in the commonly used i.MX6 quad) to the list since reports show that the issue occurs there as well. Task-number: QTBUG-49490 Change-Id: Ia890346d8dbb1691bc113e2ef522713ba6709393 Reviewed-by: Louis Kröger <louis.kroeger@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix memory corruption on scaled emojisAllan Sandfeld Jensen2017-11-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitmap glyphs are returned prescaled, which means we should include the transform in their bounding box. Additionally painting them should stick the smallest rect to avoid writing outside the allocated area, and assert in debug builds. Task-number: QTBUG-64239 Change-Id: I5f877d36566891323f528018f910798344ba4ce2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix dragging inside a modal window when a QShapedPixmapWindow is usedAndy Shaw2017-10-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression was introduced with a3d59c7c7f675b0a4e128efeb781aa1c2f7db4c0 which caused dragging to fail within a modal dialog on the XCB platform. By adding an exception for the QShapedPixmapWindow, which is the window used for the drag, we can allow that to continue to work whilst blocking to the other newly created windows. Task-number: QTBUG-63846 Change-Id: I7c7f365f30fcf5f04f50dc1a7fff7a09e6e5ed6c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-083-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | QWindowPrivate::globalPosition(): Take embedded windows into accountFriedemann Kleint2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformWindow::mapToGlobal() should also be used in case a window is embedded. Task-number: QTBUG-64116 Change-Id: I1fbdf3d185659d0faea13a593db901e36ab27d8d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Drop qvulkan headers from QtGui master headerLaszlo Agocs2017-11-032-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...in order to allow applications built against Vulkan-enabled pre-built packages to include <QtGui> on systems without Vulkan headers. This has the downside of not being able to pull in qvulkan* headers via the master header. This is an acceptable compromise for now. Task-number: QTBUG-64073 Change-Id: I63c5834dcec60e66aba34c003d4bfe8e7d31607f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Fix redundant Vulkan logging category definitionLaszlo Agocs2017-11-031-22/+22
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-64124 Change-Id: Ic8f9a7f62e3c00dba5f345037c45fb45908be848 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-302-3/+11
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowswindow.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
| | * Doc: QImageReader assumes exclusive control over its deviceEirik Aavitsland2017-10-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make an explicit mention of the fact that modifying a device while it is being held by a QImageReader is undefined. Task-number: QTBUG-61121 Change-Id: Ie0a016255c2614c5b8b415c8cd9602169153c8f8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix clazy-strict-iteratorsFriedemann Kleint2017-10-251-2/+2
| | | | | | | | | | | | | | | Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Doc: add hint about QMimeDatabase to QImageReader::canRead()Eirik Aavitsland2017-10-241-1/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63568 Change-Id: I5b700138487dbebfc8cbe70eb3a076efceafb361 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Add QFontMetrics(F)::horizontalAdvance() functionEskil Abrahamsen Blomfeldt2017-11-143-25/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A source of constant confusion is the QFontMetrics::width() function, which does not return the bounding width of the text, but the advance width. We deprecate this and add horizontalAdvance() instead, to avoid the confusion in the future. Note that there was an internal width() overload which was only there for the purpose of supporting the Qt::TextBypassShaping flag. This flag has already been replaced by public API, so no such overload is added. Instead, we deprecate the TextBypassShaping flag as well, which makes sense, since a replacement has been made. Also note that there was a consistency problem with QFontMetrics and QFontMetricsF, which are supposed to be interchangeable. The QFontMetrics::width() functions for strings took an optional int length argument, while the floating point version did not. This error is corrected in the advance() functions. [ChangeLog][QtGui][Text] Added QFontMetrics::horizontalAdvance() and QFontMetricsF::horizontalAdvance() to replace the confusingly named width() function. The latter has now been deprecated. Change-Id: I0dfda43aa65c8235be32c62fade82cae05b29c79 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Fix spelling issues in qhighdpiscaling.cppTor Arne Vestbø2017-11-131-3/+3
| | | | | | | | | | | | | | | Change-Id: I4ca5a2e79ff88a664505273d2a9f38b1b499076c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Add a missing semicolon in painting/qdrawhelper_neon.cppLiang Qi2017-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends f8807b82207d7f4f41536f777473c8870673c186. Q_PROCESSOR_ARM_64 was only tested in qt5 integration. Task-number: QTBUG-64393 Change-Id: I4471c2db3dc07e47e1825c2539c32c4d2a073396 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Expand ARGB32ToARGB32PM to also work on 32-bit ARM neonAllan Sandfeld Jensen2017-11-082-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | Replaced two AArch64 specific instructions with 2-3 instruction replacements from ARM32. Change-Id: I5cbbda5afdaabea52babaaf8e5cc57262d897159 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Fix narrowing warning on MSVCAllan Sandfeld Jensen2017-11-071-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-64307 Change-Id: I26032b71dc8fe316dddb8ce2adf6fd0a75ecf226 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-066-12/+12
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-056-12/+12
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| | * | Fix GCC -Wfloat-conversion warnings (available since GCC 4.9)Thiago Macieira2017-10-296-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning used to be part of -Wconversion, but that generates too more noise than we're willing to fix now (like conversion from qint64 to int). The float conversion does trigger for conversion from double to float, as shown in all the QVectorND uses of float, but more importantly, it triggers on passing floats to ints. Change-Id: I69f37f9304f24709a823fffd14e69cfd33f75988 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | mouse handling: fix issue when mixing QTest::mouse* APIsGatis Paeglis2017-11-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... that become apparent after switching qtestlib to use enhanced mouse event (a37785ec7638e7485112b87dd7e767881fecc114). With the old code path, where QGuiApplication was deducing event type it would deduce mouse release event even when there wasn't one. The new code path doesn't do that, which revealed an obscure problem when mixing QTest::mouse* APIs (where QWindow overload goes through QWindowSystemInterface API and QWidget overload goes through QApplication::notify() and sets mouse_buttons from there). What happened in this specific test case "./tst_qtreeview selection statusTip" was: // tst_QTreeView::selection sets mouse_buttons = Qt::LeftButton from QApplication::notify QTest::mousePress(widget, Qt::LeftButton, ..) // tst_QTreeView::statusTip QTest::mouseMove(window, ) The old code path sees that position and state has changed, creates a fake mouse event, which gets deduced as mouse release even if there wasn't one. And by luck this happened to set mouse_buttons=Qt::NoButton. So when we use mouse_buttons later to create QMouseEvent everything works as expected. With the enhanced mouse we don't clear the pressed button from mouse_buttons (set in tst_QTreeView::selection) as this is done only from press/release events, then pass it to QMouseEvent and later because of that QApplicationPrivate:: pickMouseReceiver() returns nullptr. The fix here is to use e->buttons when constructing QMouseEvent, instead of relying on mouse_buttons which gets changed from various places and has other issues that can not be solved without invalidating the current documentation of QGuiApplication::mouseButtons() (e.g QTBUG-33161). Tests and any Qt code in general should avoid using the fragile QGuiApplication::mouseButtons() API. This patch does not affect the old code path (it continues working as before) and fixes the issue described above for the enhanced mouse API. The enhanced mouse API actually is better in a way that it does not get affected by button state from test functions that run earlier, as opposed to the old code path where every subsequent test function uses mouse_buttons in whatever state it was left by the test functions that run earlier. Not relying on mouse_buttons when creating QMouseEvent helped also to discover other logic error. This caused an in incorrect button state for a mouse move event that is generated for a release event that simultaneously changes a mouse position. Task-number: QTBUG-64043 Change-Id: I6ad8e49d8437ab0858180c2d0d45694f3b3c2d60 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | | Cleanup of qcompositionfunctionsAllan Sandfeld Jensen2017-11-052-177/+60
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove long unused preload defines, make sign of alpha more consistent and use the RGB64 define structure more. This is preparing for trying to unify the declarations in case we need a third form with floating points for HDR. Change-Id: I47fc283aff1fe31a1eaba17e0413bc1e722f6a06 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Remove references to obsolete platformsJake Petroules2017-11-052-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Accessibility docs: remove wrong statementFrederik Gladhorn2017-10-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | All accessible interfaces are stored in a cache, we never pass ownership to callers. Change-Id: I99f0e27baf111e4ca820c8f31875c0c55b4d6edb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>