aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Native style: move DesktopGallery to manual tests, and rename to nativestyleRichard Moe Gustavsen2020-08-2636-2/+0
| | | | | | | | This should not be shipped as an example in it's current state. But the app is needed for now as a manual test while we develop the styles. Change-Id: I719ec629789bc4c8b51d14c97afd7b91b822e89b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Native style, DesktopGallery: wrap TextArea inside ScrollView, and not FlickableRichard Moe Gustavsen2020-08-211-20/+37
| | | | | | | From the documentation for TextArea, this is the recommended approach. Change-Id: I37428488cba6d406b3e9c6f6dae9dcab04cece79 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Native style: clean-up QStyle using a post routineRichard Moe Gustavsen2020-08-201-0/+23
| | | | | | | | | | | | | | | | | | When we delete QStyle, it will free up it's own internal resources. Especially on macOS, this means releasing a lot of NSViews and NSCells from the QMacStyle destructor. If we did this from ~QtQuickControls2NativeStylePlugin, it would happen when the plugin was unloaded from a Q_DESTRUCTOR_FUNCTION in QLibrary, which is very late in the tear-down process, and after qGuiApp has been set to nullptr, NSApplication has stopped running, and perhaps also other static platform variables (e.g in AppKit?) has been deleted. And to our best guess, this is also why we see a crash in AppKit from the destructor in QMacStyle. So for this reason, we delete QStyle from a post routine rather than from the destructor. Change-Id: I9dfb0d3394f14e5cd8b88d5a5fbbf3b73284faf1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Native style: don't draw frame around TextAreaRichard Moe Gustavsen2020-08-205-152/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In controls, it's seems to be undefined if the style should draw a frame around TextArea or not. E.g the Imagine style do, but the the Fusion style does not. This is a bit unfortunate, because depending on how you use a TextArea, you might want a frame around the TextArea itself, or the ScrollView around it (including the scrollbars), or not at all (*). For this reason, we should not draw a frame around the TextArea, but leave it to the user to compose the (style independent) structure, e.g Frame { ScrollView { TextArea{} } } Frame { TextArea {} }. TextArea {} This patch will remove drawing a frame around TextArea from the native style. Then at least Fusion, macOS and Windows will work the same way. This also means that we can remove the QQuickStyleItemTextArea, since we end up not using QStyle at all for drawing a TextArea. (*) Compared to Widgets, a QPlainTextEdit inherits from QAbstractScrollArea, which inherits from QFrame. In QFrame, you can choose frameShape, and even set it to NoFrame. Change-Id: Icabfa294744e87ccf262855faa0992f2d71ec4cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Native style: make textareas selectable by mouseRichard Moe Gustavsen2020-08-131-0/+6
| | | | | Change-Id: I767278fd63ace4248c0e239b9e3872da17433554 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge branch 'dev' into nativestyleRichard Moe Gustavsen2020-08-1319-64/+247
|\ | | | | | | Change-Id: Ib1414eac2ad31cbaff6408ba84020a1e5dc064f4
| * CMake: Don't find_package(Qt6QmlTools) directly for cross-buildsAlexandru Croitor2020-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It will fail when cross compiling to a platform that has a different size value of CMAKE_SIZEOF_VOID_P than the host one. Instead call find_package() on the base package (Qml in this case) and it will look for QmlTools itself in a special way that that resets the value of CMAKE_SIZEOF_VOID_P, thus ensuring the package is found. Fixes: QTBUG-86012 Change-Id: Ibf7f06b8cfea0ccde10b7ca8429ef8ae598f93f2 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
| * Fix event refactoring warnings and errorsMitch Curtis2020-08-119-44/+44
| | | | | | | | | | Change-Id: I426b4f75066c9db72759398e4d76fd5323044d57 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Fix QQmlDirParser build error with static buildsMitch Curtis2020-08-111-1/+1
| | | | | | | | | | Change-Id: I5efa74355cddd662787613af3ac3cf665a6c146c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-08-111-5/+2
| | | | | | | | | | Change-Id: Id705ffea8c87a84ee7c39879d6988be18ecff90a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Support Markdown in the TextEditor example, including local pathsShawn Rutledge2020-08-107-13/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | The example still loads an HTML file from resources by default, but now it's possible to give either a relative or absolute file path on the command line to load an html, markdown or plain text file. Alternatively you can use the file dialog to load any of these types. We assume that any resources (such as images) with relative paths are to be loaded from the directory where the source text file is. Pick-to: 5.15 Change-Id: I37bc2d6aa2306016453770dc2fd66efa41a16618 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Native style: increase combobox minimum sizeRichard Moe Gustavsen2020-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | After testing on Big Sur, it becomes clear that the minimum size (which is also the size of the nine patch image) needs to be larger in order for the combobox to render correctly. Change-Id: Iac70efa348afb7efb0af9453dd392b40ba3a9f89 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Native style: add configure optionsRichard Moe Gustavsen2020-08-128-9/+37
| | | | | | | | | | Change-Id: I54521f85aa821369ba3ff57fb037ae4996845c97 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Native style: increase text field minimum sizeRichard Moe Gustavsen2020-08-111-3/+3
| | | | | | | | | | | | | | | | | | | | After testing on Big Sur, it becomes clear that the minimum size (which is also the size of the nine patch image) needs to be larger in order for the text field to render correctly. Change-Id: I74ede6415545f0ddee3fc2175772c1b07c2c3999 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Native style: fix leaks in qquickmacstyleRichard Moe Gustavsen2020-08-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | After running the "leaks" app in Instruments, several places showed up to leak memory. This patch will add auto release pools at those places to stop that from happening. Change-Id: If7f49290fde60e71d1a40c10bc3d538df6c1da5c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Native style: support building with cmakeRichard Moe Gustavsen2020-07-306-1/+426
| | | | | | | | | | | | Change-Id: Idec0507a8bbdfc345e731a9e376ef8dd00534946 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Native style: remove fusiondesktopRichard Moe Gustavsen2020-07-308-232/+0
| | | | | | | | | | | | | | | | This style is not needed, since the already existing fusion style is working also for desktop. Change-Id: I0f92fdb88dc6173530be0f33b98a6f2d97e65afb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge branch 'dev' into nativestyleRichard Moe Gustavsen2020-07-17124-716/+1516
|\| | | | | | | Change-Id: I5375ecd1dcbc058806e34fce757df2bf30dac16e
| * ComboBox: add implicitContentWidthPolicyMitch Curtis2020-07-163-7/+374
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls][ComboBox] Added implicitContentWidthPolicy, which controls how the implicitContentWidth of the ComboBox is calculated. This can be used to automatically ensure that text is not elided. Fixes: QTBUG-78281 Change-Id: If669fa4ef05e5da498992843469000ef39c335ec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Doc: mention cache property in the relevant placesMitch Curtis2020-07-154-0/+5
| | | | | | | | | | | | | | | | This was missed in 033564edf5b79e32da63597930e25105a3442f01. Pick-to: 5.15 Change-Id: I7bc465338d5b9960ad7b746a816cd33efcca1bdc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Remove another binding to parentMitch Curtis2020-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to what was done in 456d26e97ec7745fdbd1afaaaa6c1dc217eca060. The warning was: Material/ComboBox.qml:68: TypeError: Cannot read property 'Material' of null Task-number: QTBUG-82989 Pick-to: 5.15 Change-Id: Id82d62d6aca0c0e517d6f8630c51f54739aea95f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Fix tst_QQuickMenu::subMenuPosition()Mitch Curtis2020-07-141-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're still getting failures after QCOMPARE was fixed (in c78a960198d59fb9a9ddd83ad7098b1db396edfd): FAIL! : tst_QQuickMenu::Material::subMenuPosition(cascading,flip) Compared doubles are not the same (fuzzy compare) Actual (subSubMenu1->popupItem()->x()) : 3.88240550819e-11 Expected (subMenu1->popupItem()->x() - subSubMenu1->width() + overlap): 0 tst_qquickmenu.cpp(1532) : failure location Quoting Eddy: "[...] the threshold for double equality is one part in 1e12; the threshold for fuzzy-is-zero is likewise 1e-12; so 3e-11 is non-zero. One work-around, of course, would be to cast float(each operand) so as to get float's wider tolerance (one part in 100,000, null if less than 1e-5)." So that's what we do in this patch. Change-Id: Iecf1b6f4b2cf2c81eb652bb0f565ac682b024dae Pick-to: 5.15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Fix crash on exit when centering Popup within Overlay in StackView itemMitch Curtis2020-07-144-1/+128
| | | | | | | | | | | | | | | | | | | | | | If a Popup is centered within an Overlay, and that Overlay is destroyed before the Popup, we must make sure centerIn is cleared so we don't try to access a dangling pointer. Fixes: QTBUG-84579 Pick-to: 5.15 5.12 Change-Id: Icb2750f847f9d5710725bedc4d1c92bf4c122c03 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Replace QDesktopWidget with QScreen in manual testVolker Hilsheimer2020-07-141-2/+2
| | | | | | | | | | Change-Id: I09b9b01494575b78af8ab11d33a2ea511efc5526 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * CMake: Enable enforcing CI testsAlexandru Croitor2020-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | Any failing tests in CMake configurations will now prevent integrations to go through in this repository. Task-number: QTBUG-84886 Change-Id: I67852aa694eeb8a30cff8da2087db83acb286eb6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Use QList instead of QVectorJarek Kobus2020-07-097-19/+19
| | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: I4991ab7ce8ba8d2522005b1b0a78f7b474c54419 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-07-071-3/+3
| | | | | | | | | | Change-Id: I95029591883e94303feaf7afc3a70a5ec1603598 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-07-061-3/+3
| | | | | | | | | | Change-Id: Ifa8da2e19bc839d12a6f1f2c7870d381ba97c12f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-07-031-3/+3
| | | | | | | | | | Change-Id: I657c8860cf5eb8690b04c104498e1ed2dbcbd6f2 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-07-021-3/+3
| | | | | | | | | | Change-Id: I3c6a5ec5bd1f3dd100064a8bf961aae7ba44a46e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-07-021-3/+3
| | | | | | | | | | Change-Id: I1f1fd0dd2265f8dfb5552b571822b60d3255aca8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-07-011-3/+3
| | | | | | | | | | Change-Id: Id0f9448c99b99aa125924b7cb1978a7b3702b691 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-07-011-3/+3
| | | | | | | | | | Change-Id: I6086cef517a1f8a177227e7a0ce11f9390fbb506 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * tst_designer: fix QByteArray::append() compile errorMitch Curtis2020-06-301-1/+1
| | | | | | | | | | | | | | | | The overload taking a QString was removed, but is equivalent to passing the result of toUtf8(). Change-Id: I6edbbc78ce20eb1ed23dc77583342fc31ec86408 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-06-301-3/+3
| | | | | | | | | | Change-Id: Ifaca91b9f4a215ef7346ff96f76341c2da77c4ad Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Adapt to renaming of QQmlMetaType::isModule()Ulf Hermann2020-06-301-2/+4
| | | | | | | | | | | | Change-Id: I2db7915377caec6c80e04979a5813c605ae33e09 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * Add ; to Q_UNUSEDLars Schmertmann2020-06-309-21/+21
| | | | | | | | | | | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I92ef02ede041d3965151165a479a1ea0549cc0f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Doc: Update docs with cmake package informationNico Vertriest2020-06-261-0/+1
| | | | | | | | | | | | Task-number: QTBUG-85179 Change-Id: Ib95b1b18ea2d9f0a1f80685302bef4805fcaf5f3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-06-261-2/+2
| | | | | | | | | | Change-Id: I954bb262266b899cf104f04e48cd6d30a2e0b05c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-06-255-67/+12
| | | | | | | | | | | | Change-Id: I1f6bf96f30f5dcea4d9838b0638f9412309a069e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Liang Qi <liang.qi@qt.io>
| * QQuickSplitHandleAttached: pass correct d ptr to QObject constructorMitch Curtis2020-06-251-1/+1
| | | | | | | | | | | | | | | | Not sure how this ever worked, but the tests have been passing, so... Pick-to: 5.15 Change-Id: I6afecc692d56e5e58687cf5b60e87510275ec2b1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Fix warnings after deprecation of QApplication::keyboardModifiersVolker Hilsheimer2020-06-251-2/+5
| | | | | | | | | | | | | | | | Use QInputEvent::modifiers where possible, disable warnings otherwise. Change-Id: Ifcb4ff4395e4a3eb1e6cce24e169b628346769be Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Document how to use CMake for Qt Quick Controls 2Kai Koehne2020-06-253-11/+24
| | | | | | | | | | | | | | Task-number: QTBUG-73058 Change-Id: Ib8f9dd5a1c44e1fc2487ca75226ed2ee8f7867d4 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * QQuickApplicationHelper: don't use QTest macros outside test functionsMitch Curtis2020-06-177-5/+103
| | | | | | | | | | | | | | | | | | This has no effect. Task-number: QTBUG-66320 Pick-to: 5.15 5.12 Change-Id: Ie6efb26243178c4044ac0bc721c21ad89769c982 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Port QtQuickControls2 from QTextCodec to QString{Converter|Decoder}Karsten Heimrich2020-06-171-4/+11
| | | | | | | | | | | | Task-number: QTBUG-75665 Change-Id: Ib66a260dc3bfc39e2e50c38db56ca72b8186a4ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-06-161-3/+3
| | | | | | | | | | Change-Id: I04035c2c28ca7eb18dbb47d6dae2cecd2ee25cae Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * QmlDesigner: Fix DialSpecifics snap modeHenning Gruendl2020-06-161-1/+1
| | | | | | | | | | | | | | Pick-to: 5.15 Task-number: QDS-2278 Change-Id: I74be7066b1bf2a0827a3fe7dca7b46e466ef8c58 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-06-161-2/+2
| | | | | | | | | | Change-Id: I4680c105cee43883171febdcc855a14ef56f2032 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-06-161-3/+3
| | | | | | | | | | Change-Id: I3ad44df8536d46983b69f1421818185ab74430ad Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
| * Update dependencies on 'dev' in qt/qtquickcontrols2Qt Submodule Update Bot2020-06-151-2/+2
| | | | | | | | | | Change-Id: I45abfe3d564269b5a142c907cb71773e0334b207 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>