summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/dev' into wip/qt6Lars Knoll2019-08-06377-3090/+5630
|\ | | | | | | Change-Id: Ib719a6249069e6bd6c9311bbec7f364855ab82ff
| * Mark QDBusError::ErrorType a Q_ENUMThiago Macieira2019-08-051-0/+3
| | | | | | | | | | | | | | | | | | Easier qDebugging. Fixes: QTBUG-77183 Change-Id: Ife213d861bb14c1787e1fffd15b63a1f8d64cc30 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QTest: add toString(QBitArray)Thiago Macieira2019-08-051-0/+11
| | | | | | | | | | Change-Id: Ife213d861bb14c1787e1fffd15b70598cda8baf3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Remove the unused includes for QSignalMapperSona Kurazyan2019-08-051-1/+0
| | | | | | | | | | Change-Id: I13f19fadc7ad3fed8eb0a6718244cc8880e91be9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Thou Shalt Not Specialize std Function TemplatesMarc Mutz2019-08-033-27/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (or forward-declare std types) (with apologies to Mr Walter Brown) This applies the changes to our other smart pointers that a0c4b6f34546bdd22167a76a0540d37e9a37c0cf applied to QSharedPointer, with the same rationale: wg21.link/p0551. It also fixes a fwd declaration of std::function, including <functional> instead. Rationale: wg21.link/p684r0. Change-Id: If275af91f6eac15eb418b200ac7d08ba084a6130 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Add an easier way to change colorspacesAllan Sandfeld Jensen2019-08-023-22/+107
| | | | | | | | | | | | | | | | | | | | Adds setters for transfer-functions and primaries. This allows us to remove use of private QColorSpace API from the PNG handler. Change-Id: Ieeff81c813c253649500acd1e53f35247b872325 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * rhi: Add a note about size to newBuffer()Laszlo Agocs2019-08-022-4/+11
| | | | | | | | | | | | | | Also make sure the gl backend is consistent with the other three. Change-Id: I2f6b783f5fa474c94ede460f5d7ac6fe8129a4f6 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * rhi: gl: Add support for bool members in uniform blocksLaszlo Agocs2019-08-021-0/+12
| | | | | | | | | | | | | | | | | | Note that SPIRV-Cross does not translate 'bool' to GLSL versions that do not have uint. So in practice we will still need to use 'int' instead in shaders that also target old GL versions. Change-Id: I070f5414fe761796ab92937034b7182cdfb73a14 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * rhi: Move info prints to categorized loggingLaszlo Agocs2019-08-026-19/+53
| | | | | | | | | | | | | | | | | | | | | | Following the Quick scenegraph (qt.scenegraph.*), we now have qt.rhi.general. Other categories may get added later. This does not change the printing of real errors, those will continue to use qWarning(). Change-Id: Id95416fc82ba8add9527212e431bcbd47d416f1a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * Improve our color space terminologyAllan Sandfeld Jensen2019-08-025-77/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace our use of 'gamut' with 'primaries'. One is the axes of the color space, the other the volume of representable values. For the currently supported color spaces those are mostly equivalent, but when we later add support for scRgb, this would be misleading as it has the same primaries as sRGB but a much wider gamut, and we would like to use the same primaries/"gamut" id for it. Also few people would know what "the sRGB gamut" is, but "the sRGB primaries" is easily googable. Change-Id: I3348ccaae27a071ec77a4356331b9bbbf92e0d19 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Clean up documentation of deprecated APIs from QApplicationSona Kurazyan2019-08-011-41/+2
| | | | | | | | | | | | | | | | | | | | Build docs for deprecated APIs conditionally, based on deprecation version. Remove the docs of methods deprecated since 5.0.0, these methods are not compiled anymore. Change-Id: If9302eecc8b3fff4a27c2e4a66ac102add7d66c5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Remove usages of deprecated APIs of qtbase/widgetsSona Kurazyan2019-08-015-77/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace the usages of deprecated APIs by corresponding alternatives in the library code and documentation. - Build docs for deprecated APIs conditionally, based on deprecation version. Remove the docs of methods deprecated since 5.0.0, these methods are not compiled anymore. - Modify the tests to make them build when deprecated APIs disabled: * Make the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, add tests for the replacement Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: I6aaf0a1369c479fb880369a38f2b8e1e86b46934 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Un-deprecate QSignalMapperSona Kurazyan2019-08-012-10/+4
| | | | | | | | | | | | | | | | | | | | From the comments on QTBUG-73407 and the last comments on 29bcbeab90210da80234529905d17280374f9684, it seems like there are still use-cases when QSignalMapper is useful. Change-Id: I8402286cb8a395a4601cda8a4cdda51f19aef073 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * QTestLib: Speed up QCOMPARE for QStringFriedemann Kleint2019-08-014-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | Add overloads for qCompare() for QStringView making use of the fast formatting helper introduced by 94aa350621e8a5c4ad3b438c10fc1c0a9ed3bc8a for int. Speeds up the bug report example by a factor of 3..4. Task-number: QTBUG-38890 Change-Id: Icc706618b2f1d23b37d354a04d4e1d1cc4b5aee3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Fix QColorTransform memory leakAllan Sandfeld Jensen2019-08-011-0/+1
| | | | | | | | | | | | | | Introduced recently when the smart-pointer was made manual. Change-Id: I29a041631e94a8e131dd29dae32975d68b386e00 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QResource: consistently cache resourceList()Marc Mutz2019-08-011-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each call to reourceList() uses atomic operations to check whether resourceGLobalData has not expired, yet. Some functions already cached the value, but then went on to use the function directly afterwards. In some cases, this was due to the cached value being a pointer-to-const and the function later deciding to mutate the list. But all the code is safe from detaches, so this distinction need not be made. Standardize on caching, and using the cached value, except in functions which call it only once. Change-Id: I79780b990da539bf7beaa8104e13cb8187f84812 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-014-7/+8
| |\ | | | | | | | | | Change-Id: I4505ec6fe17a1aa2c8d1e6576234d06a34eb9f99
| | * QAbstractItemView: refine documentation for SingleSelectionChristian Ehrlicher2019-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt5.1 it is possible to deselect the current selected item in SingleSelection mode when pressing the Ctrl key during the click but this was not mentioned in the docs. Change-Id: I86652308215bf218ea959f869334b6077e4634f9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Fix assert in QPainterPath after clear()Eirik Aavitsland2019-07-312-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newly introduced clear() method left the path in an undefined state: d_ptr allocated, but no elements. The elements vector is otherwise never empty, since ensureData() inserts a dummy initial moveTo element. Fix by making sure that clear() leaves the path in the same state as ensureData() (i.e. "empty" but not "null"), except possibly more capacity allocated in the elements vector. Fixes: QTBUG-76534 Change-Id: I7ad8b312913f5eb6e22023f5d2fd873e54b1e23c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-311-1/+1
| | |\ | | | | | | | | | | | | Change-Id: Ifbaa4877051d93bcb0d58eed35bfe8dffa5634a3
| | | * qfsfileengine_p.h: Un-inline processOpenModeFlagsOliver Wolff2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An inlined exported function does not make sense and will cause a warning. Fixes: QTBUG-77242 Change-Id: I016b93d6b39c4db82148fdc5a8a92bc9d5751885 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| * | | Fix spdy build without features.propertiesTasuku Suzuki2019-08-012-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move location of stream ID from a dynamic property to an internal QHash. Change-Id: I9bab4cbfaebe6a04d54afa7889aac748070e1f2e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | Parse color space name from ICC profileAllan Sandfeld Jensen2019-07-312-9/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds parsing of ICCv2 and ICCv4 description tags. Change-Id: I8647e1529d4127950624f16c475d8dba610149b6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | | Harden ICC parserAllan Sandfeld Jensen2019-07-311-52/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing implicit size checks of tags by passing the already checked explicitly given size forward. Also adds my fuzzing test for the ICC parser as it is security critical, by being used by multiple image formats. Change-Id: Ieb632ccb78f9b445a276959ffbd66fa04a7a5b45 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | | QSortFilterProxyModel: avoid some unnecessary copiesChristian Ehrlicher2019-07-311-34/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up QSortFilterProxyModel by using const refs instead copies and range-based for loops instead plain loops Change-Id: Ic1250f33e7c311a9e1d3c19cc5dc7a9578423e74 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | QWheelEvent: use QT_DEPRECATED_VERSION_X_5_15Marc Mutz2019-07-311-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... in an attempt to get qt5 integration going. Change-Id: I22dd6ff2cb9a6d11620878c432905bd07292220b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | rhi: gl: Add support for computeLaszlo Agocs2019-07-315-254/+832
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and storage buffers and images. Change-Id: If38a51322e3187088a13cf4e9b88cb40c8af8621 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | | rhi: metal: Do not hold on to the drawable when not presentingLaszlo Agocs2019-07-312-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Quick render loops do SkipPresent occasionally, and it all seemed to work with the threaded one because we lack an autorelease pool on the SG render thread. (to be corrected separately) The basic one ended up crashing sometimes, however. Holding on to the drawable is incorrect. Fixes: QTBUG-76953 Change-Id: I0d0ec6d09aa209d2c848d7a9dbd9b15916fe23ab Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | | rhi: vulkan: Fix glitches on resize on X11Laszlo Agocs2019-07-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...by notifying QVulkanInstance about the present. With the xcb platform this then gets turned into updating the sync request counter. Change-Id: Iecfb6d10ead3befcb24c19433d4712ed73a84bb4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-3015-49/+207
| |\ \ \
| | * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-3015-49/+207
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/mingw_make.cpp Change-Id: I2f790bc8572bd22fea01edf7ca74595b29f063eb
| | | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-305-20/+77
| | | |\| | | | | | | | | | | | | | | | Change-Id: Ibdbd88e11cd03d5ce558e67ad8e9a21436e7ef89
| | | | * macOS: Respect QSurfaceFormat color space when creating NSWindowTor Arne Vestbø2019-07-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-47660 Change-Id: I90a2956bfaa52c361a3eba32f0ea19c0eca8c277 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Move processOpenModeFlags out of QFSFileEngineOliver Wolff2019-07-292-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same logic is needed for QWinRTFileEngine. To be able to reuse the code, it was moved out of the class. Task-number: QTBUG-77095 Change-Id: If52b2fc8a0f3056d32fc693775565a1c3803b7d4 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | | * QWinRTFileEngine: Handle QIODevice::Truncate when opening filesOliver Wolff2019-07-291-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-77095 Change-Id: I45b38fab779518c49b22077c493d8640572d40d9 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | | | * QWinRTFileEngine: Implement setSizeOliver Wolff2019-07-292-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-77132 Change-Id: Ic0410297a2215f1b7b656966cbe84b925706532f Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | | * | Fix crash when the focus widget gets a focus proxy after the factDavid Faure2019-07-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QApplicationPrivate::focus_widget became a dangling pointer in the following scenario: A widget first gets focus and later on gets a focus proxy. QApplicationPrivate::focus_widget was still pointing to the initial widget. Upon destruction, QWidget::hasFocus() [which follows to the focus proxy and then compares with focus_widget] was therefore false for both widgets. So QWidget::clearFocus() didn't call QApplicationPrivate::setFocusWidget(0) for either of them. As a result, focus_widget remained set, and became dangling. In real life, this happened with a QWebEngineView, which the application gave focus to upon creation. At that time it doesn't have a focus proxy yet. That happens later, in QWebEngineViewPrivate::widgetChanged. https://bugs.kde.org/show_bug.cgi?id=381793 Change-Id: Ifee610bb76a2d4d2797b98ece9bffe5fffe3c6a6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | * | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-297-26/+99
| | | |\ \
| | | | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-297-26/+99
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qresource.cpp Change-Id: I54917f72444a621bd08aeaa15f5d17415993144d
| | | | | * QHostInfo: Always post results through the event loop to the receiverVolker Hilsheimer2019-07-262-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lookups performed via QHostInfoRunnable must not synchronously call the user-code's receiver objects, as that would execute user-code in the wrong thread. Instead, post a metacall event through the event loop of the receiver object, or the thread that initiated the lookup. This was done correctly for the trivial cases of empty host name or cached results, so the code generally existed. By moving it from a global function into a member function of QHostInfoResult, we can simply access the required data to construct and post the event. As we process that posted event, we need to check that the context object (which is already guarded via QPointer) is still alive, if we had one in the first place. If we had one, and it's deleted, then abort. [ChangeLog][QtNetwork][QHostInfo] Functors used in the lookupHost overloads are now called correctly in the thread of the context object. When used without context object, the thread that initiates the lookup will run the functor, and is required to run an event loop. Change-Id: I9b38d4f9a23cfc4d9e07bc72de2d2cefe5d0d033 Fixes: QTBUG-76276 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | | | | * macOS: Respect color space set on NSWindow when flushing backingstoreTor Arne Vestbø2019-07-262-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default Qt tries to avoid potentially costly color matching by not assigning an sRGB color space to our backingstore, even if that's what we in practice fill it with. We used to do this by assigning the display's color space, which effectively opts out of color matching, similar to the old behavior of the device RGB color space (which nowadays implies sRGB). By picking up the color space from the NSWindow instead, we allow the user to override the color space to trigger color matching, for example by explicitly setting it to NSColorSpace.sRGBColorSpace. NSWindow will fall back to the screen's color space if the window doesn't have one set. Task-number: QTBUG-47660 Change-Id: Iac8177e85e86fe9044a41eb2c93fbf26bb83c248 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | | * QMacStyle - another slider fixTimur Pocheptsov2019-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a follow-up to fixed resize handling: the trick Gabriel wanted to use to enforce a specific look on a slider's bar, never actually worked due to misplaced statement which essentially is cancelling the 'magic' before the bar is drawn. Now it's fixed: bar is centered (between the rows of tickmarks above and below) + it's had a nice blue filling back! Change-Id: I3021c2b86e4c25981eeee015e32baa24ccebc3bd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | | | * Android: Fix SSL 1.1 support on API-21BogDan Vatra2019-07-261-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSL 1.1.x libs must be suffixed otherwise it will use the system ones which on API-21 are OpenSSL 1.0 not 1.1 Fixes: QTBUG-76884 Change-Id: I7d4052be68cf7dc65f74a48da8e1e37182056a5e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | | | * QResource: fix nullptr-check gone tautologicalMarc Mutz2019-07-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 136c5b9338f71775eb42528cfc7c23b2b4e5dff9. Before that change, each of the three members was a separate Q_GLOBAL_STATIC, so checking resourceList() for nullptr was the correct thing to do to find out whether the static was already destroyed. After the change, the resourceList() function will never return nullptr. Either resourceGlobalData.isDestroyed(), in which case dereferencing it asserts, or it isn't, in which case resourceList() returns a valid pointer. An explicit isDestroyed() check was added to the unregister function, but the register one was also checking resourceList() for nullptr, and this was left unprotected. Add the check and remove the now-tautological checks for nullptr resourceList(). Change-Id: I41fe66939ce858a77802b8af04c1de6e4fafe048 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * | | Windows QPA: Fix detection of the Surface Pen eraser buttonAndre de la Rocha2019-07-291-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Surface Pen eraser button generates Meta+F18/19/20 keystrokes, but when it is not touching the screen the Fn WM_KEYDOWN message is eaten and only a Fn WM_KEYUP message with the previous state as "not pressed" is generated, which would be ignored. With this patch we detect this case and synthesize the expected key events to allow the button to be used in applications. Fixes: QTBUG-77153 Change-Id: I075f5cbb903cb36c9ec241ee1bb31d436b725e3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * | | wasm: fix wide character data downloadLorn Potter2019-07-291-2/+4
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to pass correct buffer size Change-Id: I19cb65114f49decc225cd807d59f1f08ad6b70c9 Fixes: QTBUG-76212 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | | | QWidget/QLineEdit: deprecate get{Contents,Text}Margins()Marc Mutz2019-07-3010-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have contentsMargins() and textMargins() methods since 4.6 which are much more efficient and easier to use. [ChangeLog][QtWidgets][QLineEdit] The getTextMargins() member function has been deprecated in favor of textMargins(). [ChangeLog][QtWidgets][QWidget] The getContentsMargins() member function has been deprecated in favor of contentsMargins(). Change-Id: Ifdb890af6198fc682b94701786c67a5b945a4b4c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | | QEasingCurve: reduce code duplication in setCurveShape()Marc Mutz2019-07-301-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating an explicit QEasingCurve object in each switched-over case, extract the conversion between the enums involved into a helper and just call setEasingCurve() with the result (implicitly converted to QEasingCurve). Saves 0.5KiB in text size on optimized AMD64 Linux GCC 9.1 builds. Change-Id: I81b5d7199d9dd99ba3735c910a50e371e0b99838 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | | QEasingCurve: remove a default case labelMarc Mutz2019-07-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default: case label turns off compiler warnings for missing enumeration values, which we'd like to have, so remove it. Change-Id: I96247a7fc46e91a29591a907e52841a90df62f10 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | | QLineEdit: use QMargins internally instead of 4 x intMarc Mutz2019-07-303-40/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the four ints xTextMargin with one QMargins member, and the effectiveXTextMargin() function with effectiveTextMargins(). The left and right effective margins were always used together, so this in no case leads to extra work, compared to separate functions. Change-Id: I46d061919ffac297142213ccb4033caa0288b554 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>