aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Register C++ types declarativelyMitch Curtis2020-08-261-84/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt to the new way of registering C++ types. The types need to be seen at compile time so that code can be generated that invokes them. This patch: - Adds QML_* macros where applicable. - Adapts the build system files to the new way of registering modules. - Splits up the QtQuick.Controls[.*].impl files into their own plugins, as we can only register one QML module per .pro file. - Removes C++ type registration calls in every plugin. - Moves private types from src/quickcontrols2/quickcontrols2.pro to src/quickcontrols2/impl/quickcontrols2-impl.pro. Some of these types need to be exposed to QML, but quickcontrols2.pro is already in use to declare the QtQuick.Controls import (and also provides the public C++ QQuickStyle API), and the new QML_IMPORT_NAME/VERSION syntax only allows one module per project. As some of the types that need to be exposed to QML are also referenced by some C++ code (e.g. tests, etc.), we just move all of the private types to the new library. Follow-up patches will register the QML types declaratively. Task-number: QTBUG-82922 Change-Id: Iaf9ee106237d61701d57a8896f3822304c8151a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-091-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic36741d2bcaec8d5e5dc96638b7122f8ce51bdb2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Controls: update license headersJ-P Nurmi2016-04-141-2/+2
| | | | | | | This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. Change-Id: Ib653135662bfd353a73290539995e8e5be211587 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickUniversalFocusRectangle: optimize string usageAnton Kudryavtsev2016-03-291-2/+4
| | | | | | | | | | Replace QString::arg() chain with multi-arg overloaded function. It's faster because of args are replaced in one pass. While touching the code, also cache width and height of bound. Change-Id: Id8d19143f426ed1998713204dc9c8d4b51e58db5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickUniversalFocusRectangle: proper construction of vectorAnton Kudryavtsev2016-03-291-1/+1
| | | | | | | | | ... with known size and known value by according ctor. Don't use appending for this case. Change-Id: Ib2bf9703bb03bdfa628d1ae78c6d0353e991b3e4 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Optimize QQuickUniversalFocusRectangle::paint()J-P Nurmi2016-02-061-11/+22
| | | | | | Change-Id: I75cc70df9f5eef5a1e0132ea8ec90938305dfde2 Task-number: QTBUG-50575 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickUniversalFocusRectangle: avoid unnecessary paintsJ-P Nurmi2016-02-061-0/+3
| | | | | | | | | | | | | Drawing a double-dashed focus rectangle gets seemingly expensive if the active focus control is eg. a SwipeView that covers the whole screen. In fact, SwipeView does not even request a focus rectangle (useSystemFocusVisuals: false), so it makes no sense to waste CPU cycles drawing a huge double-dashed rectangle. It's a bit unclear why QQuickPaintedItem even calls paint() when it's hidden... Change-Id: I57a8dd309674b8a6e99749544242a00dc02471ee Task-number: QTBUG-50575 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Universal: make FocusRectangle transparent for positioners & SwipeViewJ-P Nurmi2016-01-121-0/+2
| | | | | | | | | | The focus rectangle follows (is re-parented to) the current active focus control, but it should never be added to the delegate model of a positioner or container. Change-Id: I2979f4ffbb6a833b5f031988b3cc969a93d3c541 Task-number: QTBUG-50404 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Universal: focus rectangleJ-P Nurmi2015-12-121-0/+66
Change-Id: I74005dcce5f1f41e9455b882f313952f88c364f9 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>