aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
Commit message (Collapse)AuthorAgeFilesLines
* Remove qtquickcontrols2 sources and explain where they wentHEADdevMitch Curtis2021-08-16215-19188/+0
| | | | | | | | | | | | Now that qtquickcontrols2 has been merged into qtdeclarative, we should make it obvious that this repo should no longer be used, by preventing it from being built. Task-number: QTBUG-95173 Pick-to: 6.2 Change-Id: I95bd6a214f3d75a865ab163ee0a1f9ffbeb7a051 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Restructure tests in preparation for merging into qtdeclarativeMitch Curtis2021-07-22215-19/+20
| | | | | | | Task-number: QTBUG-95173 Change-Id: I541dc26cf2cdd6f2640824f693f7d059445367d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* gifs manual test: use cmake qt_internal_add_manual_testShawn Rutledge2021-07-201-1/+1
| | | | | | | Unknown CMake command "qt_add_test" Change-Id: I4a9e22d06da89968dcd9bbe22be6864f800deb15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add FontDialog to QtQuick.DialogsOliver Eftevaag2021-06-044-1/+226
| | | | | | | | | | | Adding non-native FontDialog to QtQuick. This is a native FontDialog on platforms that support it, and a non-native Qt Quick FontDialog on platforms that don't. Fixes: QTBUG-87799 Change-Id: I43a59e3668a8a40f1d0c04a3c2506283d552a22b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QtQuick.DialogsMitch Curtis2021-05-278-0/+745
| | | | | | | | | | [ChangeLog][QtQuickDialogs] Added FileDialog. This is a native FileDialog on platforms that support it, and a non-native Qt Quick FileDialog on platforms that don't. Fixes: QTBUG-87797 Change-Id: Ia3a98b616479b818c96c232a0329750023079642 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix up build system files for manual testsMitch Curtis2021-04-2613-3/+75
| | | | | | | | | | - Add missing tests to qmake/CMake "sub-dir" projects - Make each manual test a standalone project so that it can be opened in Creator Task-number: QTBUG-93020 Change-Id: I534192852fb8ffdf85398479fb0da2a29d04330a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rename dialogs manual test to qquickdialogMitch Curtis2021-04-2211-40/+32
| | | | | | | | In preparation for Qt Quick Dialogs, which will get their own manual test since they have different goals and one cannot be used for both. Change-Id: I63143b7603a3ed79c1a9a938d45bfe452926a44d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* testbench: don't override style stored in settings with default styleMitch Curtis2021-02-251-1/+1
| | | | | | | | | | | | | Now that we choose e.g. Fusion by default on Linux, QQuickStyle::name() will return that. If the user had a style previously selected and that was stored in settings, we should respect that. So, only prefer QQuickStyle::name() if we're not using the default style. Pick-to: 6.1 6.0 Change-Id: I986f4b169bb99836714f2f2ed99f17746686f946 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Convert manual tests to CMakeMitch Curtis2021-02-2512-0/+486
| | | | | | Pick-to: 6.1 6.0 Change-Id: Ia974de4a852b70a9b9fdc79a819229393758c9d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Manual test, nativestyle: fix frame sizeRichard Moe Gustavsen2021-01-131-1/+6
| | | | | | | | | | | | | | | | | | | | A Frame will will set it's own content size to be the same size as the implicit size of the child. But for some controls (TextEdit / TextArea), the implicit size is either read only, or should not be changed. For such controls, you need to set contentWidth/height explicitly on the Frame instead. Otherwise the frame will wrap around the implicit size of the item, and not it's actual size. For a TextEdit, the implicitWidth can sometimes be slightly smaller that the actual width, since the text is not drawn all the way to edge before it wraps to the next line. The result is that the Frame around it ends up smaller than it should. Pick-to: 6.0 Change-Id: Ibf800373d4424ffdb3e95475d9638503c2e99572 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* manual test, nativestyle: add vertical slider with tick marks on both sidesRichard Moe Gustavsen2020-10-301-1/+11
| | | | | | | | Show an example of having tick marks on both side of a slider. This API is currently private. Change-Id: I1a458754aff40b60b16dce5aac2fa41789eeae69 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* CMake: Update usage of add_qt_gui_executableAlexandru Croitor2020-10-291-1/+1
| | | | | Change-Id: I0e5eb05c60fafcf95db5e60ccbd1fee8e50da890 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Native style/Slider: Fix tickmarks and groove for fractional numbersJan Arve Sæther2020-10-191-0/+11
| | | | | | | | | In QQuickSlider, this was very noticeable for very short ranges (e.g. a range less than 1). It also caused wrong rendering of the groove on macOS style. Change-Id: I8a88b2e107e543f5b0cef5a7093b94b08ebeb398 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* test, nativestyle: change ScrollView bindingsRichard Moe Gustavsen2020-10-151-2/+2
| | | | | Change-Id: If805588d7a0a7b1fbacf5e89c0706a1acc98907a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ScrollView: always clip implicitly created FlickableRichard Moe Gustavsen2020-10-141-2/+0
| | | | | | | | | | | | | | We almost always want to clip the flickable so that flickable contents doesn't show up outside the scrollview. The only time this is not really needed, is when the scrollview covers the whole window and the scrollbars are transient. But for that corner case, if this optimization is needed, the user can simply create his own flickable child inside the scrollview, and control clipping on it explicit. [ChangeLog][ScrollView] ScrollView now clips its contents by default. Change-Id: I44bd7a8c397b90e14d0b9d5db8ec6523da205648 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Native style: ensure ScrollView contents doesn't go under the scrollbarsRichard Moe Gustavsen2020-10-093-5/+3
| | | | | | | | | On macOS the scrollbars are not transient. The contentItem of a ScrollView should therefore be aligned to the side of the scrollbars, rather than to the side of the ScrollView. Change-Id: Ie58753d61c04c979270995deb6e3b2650fa643db Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* nativestyle: SpinBox on WindowsJan Arve Sæther2020-10-061-0/+1
| | | | | Change-Id: I334af68282a59099698e46020b0644318eae5cce Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* manual style, nativestyle: don't set style from main.cppRichard Moe Gustavsen2020-09-301-14/+0
| | | | | | | | We now select the default style from the QQuickControls plugin, so the removed code snippet is no longer needed. Change-Id: I8117912d424ed7da87f81ce1f90f423a13545e54 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Native style: don't use transient scrollbarsRichard Moe Gustavsen2020-09-302-4/+0
| | | | | | | | We don't want to hide the scrollbars on desktop when it's not moving. Change-Id: I6ce555b06a598560a7253e2b8e6db71405b9322b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* CMake: Regenerate projects before API changeAlexandru Croitor2020-09-251-0/+4
| | | | | | | Task-number: QTBUG-86815 Change-Id: Ie0688d13b1787da3c1fc241a7d864aa014ca1d70 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Adjust testbench to properly support multiple stylesMitch Curtis2020-09-2414-31/+565
| | | | | | | | | | | | We need to split the uses of the Imagine style API out into file-selected files. We set Imagine.path so that the default assets are used for areas of the UI that are important to the functioning of the example, as using custom assets here could make it impossible to use the API if the assets were not created correctly. Change-Id: I2b6b683ffe65b7d573abf0ae793509a95417aead Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove binding to parent in testbenchMitch Curtis2020-09-241-1/+1
| | | | | | Task-number: QTBUG-82989 Change-Id: I5ce70afd395ecf0a0e91a70f19b2f1a04e1c1e6d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Rename "Default" style to "Basic"Mitch Curtis2020-09-247-13/+11
| | | | | | | | | | | | [ChangeLog][Styles] The Default style was renamed to Basic to account for the introduction of the platform styles (macOS, Windows), which will be used by default (where possible) when no style is specified. Fixes: QTBUG-85984 Task-number: QTBUG-68814 Task-number: QTBUG-86403 Change-Id: I22b3199c8662e4ee5d55a1be1a51c9856ac62376 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix fallback styles overwriting themesMitch Curtis2020-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | In Qt 5, QtQuickControls2Plugin::registerTypes() was responsible for calling initializeTheme() on each style plugin. Now that we delegate more work to the QML engine, each style plugin calls initializeTheme() via registerTypes(). To avoid fallback styles overwriting font and palette data set by the current style, we need to check if the theme has been intialized before calling initializeTheme(). To do this, we add a static "themeInitialized" bool that QQuickStylePlugin sets to true after calling intializeTheme() for the first time. It checks this value and avoids calling intializeTheme() if it's true. We also need to make QQuickStylePlugin ensure that the theme it's initializing belongs to the current style. Fixes: QTBUG-86303 Change-Id: Ie65e646677c78622829f4949c41cb79204cf5786 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix more compiler warnings from deprecated application attributesVolker Hilsheimer2020-09-165-5/+0
| | | | | | | | | Also cleanup documentation, with the exception of the "High-DPI Support in Qt Quick Controls" page, which needs to be either removed or rewritten after some fact checking. Change-Id: I3cdf1f8554f8f26627a9a5f17c2ee0038c933468 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix ProgressBar on WindowsJan Arve Sæther2020-09-091-32/+0
| | | | | | | | | | | | | | Also remove the two custom progress bars from the manual test where one has a custom background, and the other has a custom contentItem. If you want to customize a progress bar, you need to provide customizations for both the background and the contentItem. You cannot provide a custom background (or contentItem) alone, since its almost impossible to create a custom background that fits well with the contentItem of all the other possible styles it might be using. Change-Id: I82a87513e73f319bcecbfaed341ac4949f64c3bb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'nativestyle' into devMitch Curtis2020-09-0436-0/+3205
|\ | | | | | | Change-Id: I18a4fd46cf13c65fe6f4c3981b7c61ab52109b8d
| * Native style, manual test: update location to Default styleRichard Moe Gustavsen2020-08-283-5/+5
| | | | | | | | | | Change-Id: I3fb788ceba150664ed1c7b4040b73a0b7fdd7337 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Native style: remove versioning from importsRichard Moe Gustavsen2020-08-2828-91/+91
| | | | | | | | | | Change-Id: I73319d18ca6540227ce6bf4bdcf217a3c279c64c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Native style: clean-up importsRichard Moe Gustavsen2020-08-283-3/+2
| | | | | | | | | | Change-Id: Id05edfccb617c72db902f5a7147ed8433be62e7c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Merge branch 'dev' into nativestyleRichard Moe Gustavsen2020-08-2697-258/+259
| |\ | | | | | | | | | Change-Id: I9999194551f71abec3731355cd746e69e2e0b187
| * | Native style: move DesktopGallery to manual tests, and rename to nativestyleRichard Moe Gustavsen2020-08-2636-0/+3206
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | auto tests: remove all versioning from the test dataRichard Moe Gustavsen2020-09-041-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | The problem is that QtQuick.Controls.macos is only available with revision 6.0. And when importing e.g QtQuick.Controls 2.15, we try to load a style with the same revision. But it simply doesn't exist. So remove all versioning from the tests to also support testing newer styles. Change-Id: I666a93ab03ec4c5dcf2055a363547f8cdac8d25e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Use qmlRegisterModuleImport() to register stylesMitch Curtis2020-08-262-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch completes the cumulative work done in previous patches. - Uses qmlRegisterModuleImport() to register styles. This has some added requirements: - Each style must now be a QML module -- that is, it must have a qmldir file. - As a result of the above, the module must be available within the QML import path in order to be found. - The various forms of accepted style names have been reduced down to one ("Material", "MyStyle", etc). See below for an explanation of why. - The following API in QQuickStyle is removed: addStylePath(), availableStyles(), path(), stylePathList(). These no longer make sense now that we reuse the existing QML import system. - Adds the tst_qquickstyleselector auto test back as "styleimports". qmlRegisterModuleImport() vs resolvedUrl() Previously we would use QQuickStyleSelector to select individual QML files based on which style was set. We'd do this once when QtQuick.Controls was first imported. With Qt 6, and the requirement that each style be a proper QML module, qmlRegisterModuleImport() was introduced. This allows us to "link" one import with another. For an example of what this looks like in practice, suppose the style was set to "MyStyle", and the fallback to "Material". The "QtQuick.Controls" import will be linked to "MyStyle", "MyStyle" to "QtQuick.Controls.Material", and as a final fallback (for controls like Action which only the Default style implements), "QtQuick.Controls.Material" to "QtQuick.Controls.Default". This is the same behavior as in Qt 5 (see qquickstyleselector.cpp): // 1) requested style (e.g. "MyStyle", included in d->selectors) // 2) fallback style (e.g. "Material", included in d->selectors) // 3) default style (empty selector, not in d->selectors) This is a necessary step to enable compilation of QML to C++. Reducing the set of accepted style names The problem In QtQuickControls2Plugin() we need to call QQuickStylePrivate::init(baseUrl()) in order to detect if the style is a custom style in QQuickStyleSpec::resolve() (by checking if the style path starts with the base URL). In Qt 5, init() is called in QtQuickControls2Plugin::registerTypes(), but in Qt 6 that's too late, because we need to call qmlRegisterModuleImport() in the constructor. qmlRegisterModuleImport() itself requires the style to have already been set in order to create the correct import URI ("QtQuick.Controls.X" for built-in styles, "MyCustomStyle" for custom styles). The solution By reducing the valid forms for style names down to one: ./myapp -style MyStyle we solve the problem of needing baseUrl() to determine if the style is a custom style or not, but needing to call it too early (since we now call qmlRegisterModuleImport() in QtQuickControls2Plugin(), which itself requires the style to have already been set). baseUrl() can't have been set before the constructor is finished. All of the various forms for _setting_ a style are still valid; environment variables, qtquickcontrols2.conf, etc. [ChangeLog][Important Behavior Changes] Custom styles must now have a qmldir that lists the files that the style implements. For example, for a style that only implements Button: --- module MyStyle Button 1.0 Button.qml --- In addition, there is now only one valid, case-sensitive form for style names: "Material", "MyStyle", etc. These changes are done to help enable the compilation of QML code to C++, as well as improve tooling capabilities. [ChangeLog][Important Behavior Changes] The following API was removed: - QQuickStyle::addStylePath() - QQuickStyle::availableStyles() - QQuickStyle::path() - QQuickStyle::stylePathList() - QT_QUICK_CONTROLS_STYLE_PATH This API is no longer necessary and/or able to be provided now that styles are treated as regular QML modules. Task-number: QTBUG-82922 Change-Id: I3b281131903c7c3c1cf0616eb7486a872dccd730 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Remove all version numbers from QML importsMitch Curtis2020-08-2695-256/+256
| | | | | | | | | | | | | | | | | | As of Qt 6, the latest version will be used by default. This saves us a lot of effort in terms of version bumps. Task-number: QTBUG-82922 Change-Id: I74eba8185ec3ccc75bc293d4b2ea87d59e2d9928 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Register C++ types declarativelyMitch Curtis2020-08-261-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Replace QDesktopWidget with QScreen in manual testVolker Hilsheimer2020-07-141-2/+2
| | | | | Change-Id: I09b9b01494575b78af8ab11d33a2ea511efc5526 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use QList instead of QVectorJarek Kobus2020-07-094-16/+16
| | | | | | Task-number: QTBUG-84469 Change-Id: I4991ab7ce8ba8d2522005b1b0a78f7b474c54419 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Platform: remove deprecated iconName, iconSource APIMitch Curtis2020-06-051-1/+1
| | | | | | | | | | | | | [ChangeLog][Platform][Menu] The deprecated iconName and iconSource properties were removed. Use the icon property instead. [ChangeLog][Platform][MenuItem] The deprecated iconName and iconSource properties were removed. Use the icon property instead. [ChangeLog][Platform][SystemTrayIcon] The deprecated iconName and iconSource properties were removed. Use the icon property instead. Task-number: QTBUG-84715 Change-Id: I91a8ceb1a291b78fc342756de24e18b818a49b4b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove the remaining usages of QRegExp and QRegExpValidatorLars Knoll2020-03-191-3/+3
| | | | | Change-Id: Iab8e682eeb43b3403eba37f7decb7f7a494ae361 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* HeaderView: set implicitSize on the style itemsv5.15.0-beta2Richard Moe Gustavsen2020-03-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By setting an implicit size, the user don't need to set a width or height on a HeaderView himself, but it will get the default size recommended by the style. By doing it the way it's done in the patch we achieve the following: 1. A HeaderView will by default be resized to be the same size as the delegate. 2. If the application sets a size on HeaderView it that is larger than the implicit size of the delegate, the delegate will be resized to have the same size (effectively filling out the free space in the header). 3. If the size of HeaderView is smaller than the implicit size of the delegate, the delegate will simply be clipped. (effectivly saying that the implicitSize of the delegate is also it's minimum size). If this is not acceptable for the application, it will need to use a custom delegate. Since a HeaderView delegate is a component and not an item, it should not be a part of the sanity checks we do to avoid using internal IDs. Hence we blacklist until we have a better way of handling such cases. Task-number: QTPM-1300 Change-Id: I30ca3e13ce5e1371b60f5c4ecf742a7d7e794a36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add HorizontalHeaderView and VerticalHeaderViewv5.15.0-alpha1Yulong Bai2020-02-114-0/+359
| | | | | | | | | | [ChangeLog][Controls] Add HorizontalHeaderView and VerticalHeaderView. They are controls associated with TableView. Support flicking synchronization Support default, fusion, imagine, material and universal delegate styles. Fixes: QTPM-1300 Change-Id: Ie3f913dd616cda0d4e5a22a3d95baf71692370fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Run optipng on all imagesMitch Curtis2019-11-041-0/+0
| | | | | | | | find . -name "*.png" -exec optipng -o 7 -strip all {} \; Change-Id: I2238b2dd38813d33ed48d79817f872f922cfa28d Fixes: QTBUG-79275 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: fix import versions in SplitView documentationv5.13.0-rc3v5.13.0-rc2v5.13.0Mitch Curtis2019-06-041-2/+2
| | | | | | Change-Id: Ib491000bf2751f24e3dc635958bdf997193c225e Fixes: QTBUG-76077 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-027-0/+529
|\ | | | | | | Change-Id: Ibd3a8a111ce70643199c64f41143f332a34826f8
| * Add dialogs manual testMitch Curtis2019-02-227-0/+529
| | | | | | | | | | | | | | | | | | | | As with the buttons manual test, there are a lot of possible combinations of dialogs, which makes automated testing very difficult. This test will allow us to see lots of different combinations all at once for a particular style. Change-Id: I42fa5a1e027c9f56bebf859078d3e54fe1902228 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | gifrecorder: fix process timing outMitch Curtis2019-02-251-1/+2
| | | | | | | | | | | | | | Give conversion a longer time to finish. Change-Id: Iacc403906f9094ffc688f8c98c401b88bc935961 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | gifrecorder: improve the codeMitch Curtis2019-02-251-22/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename startProcess() to waitForProcessToStart(), since that's what it does, and it makes it consistent with waitForProcessToFinish(). - Add ProcessWaitResult struct for error reporting and make both waitForProcessToStart() and waitForProcessToFinish() use it. This allows us to stop using QFAIL in helper functions, which will not abort the test. - Add some double quotes in debug output to help readability. - Add code comments to explain stuff that I've forgotten and had to look up. Change-Id: Ie54c0ee752d57acd3501b72025fc1eb482dfa238 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | gifrecorder: Use ffmpeg instead of the deprecated avconvVenugopal Shivashankar2019-02-251-7/+7
| | | | | | | | | | | | | | | | | | The libav-tools that provides the avconv tool is deprecated since Ubuntu 18.04 release. The ffmpeg pkg is the alternative suggested. Change-Id: I5d3d3b9409448402f67a7481827f0f1925cbb89f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Fix heap-use-after-free in tst_gifsMitch Curtis2019-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value of qPrintable should not be stored. The shortened ASAN output: ================================================================= ==23322==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060002b4e58 at pc 0x7f8b035f7569 bp 0x7fff7ea38530 sp 0x7fff7ea38520 READ of size 1 at 0x6060002b4e58 thread T0 #0 0x7f8b035f7568 in QMetaObject::indexOfProperty(char const*) const /home/mitch/dev/qt5-dev/qtbase/src/corelib/kernel/qmetaobject.cpp:1015 #1 0x7f8b03687194 in QObject::property(char const*) const /home/mitch/dev/qt5-dev/qtbase/src/corelib/kernel/qobject.cpp:3891 #2 0x55a59f4cc085 in tst_Gifs::checkables() /home/mitch/dev/qt5-dev/qtquickcontrols2/tests/manual/gifs/tst_gifs.cpp:737 0x6060002b4e58 is located 24 bytes inside of 64-byte region [0x6060002b4e40,0x6060002b4e80) freed by thread T0 here: #0 0x7f8b0708c7b8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7b8) #1 0x7f8b02fcc0a2 in QArrayData::deallocate(QArrayData*, unsigned long, unsigned long) /home/mitch/dev/qt5-dev/qtbase/src/corelib/tools/qarraydata.cpp:167 #2 0x55a59f4cbf5c in QTypedArrayData<char>::deallocate(QArrayData*) /home/mitch/dev/qt5-dev-debug/qtbase/include/QtCore/../../../../qt5-dev/qtbase/src/corelib/tools/qarraydata.h:239 #3 0x55a59f4cbf5c in QByteArray::~QByteArray() /home/mitch/dev/qt5-dev-debug/qtbase/include/QtCore/../../../../qt5-dev/qtbase/src/corelib/tools/qbytearray.h:476 #4 0x55a59f4cbf5c in tst_Gifs::checkables() /home/mitch/dev/qt5-dev/qtquickcontrols2/tests/manual/gifs/tst_gifs.cpp:736 previously allocated by thread T0 here: #0 0x7f8b0708cf40 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdef40) #1 0x7f8b02fcb451 in reallocateData /home/mitch/dev/qt5-dev/qtbase/src/corelib/tools/qarraydata.cpp:83 #2 0x7f8b02fcbf7f in QArrayData::reallocateUnaligned(QArrayData*, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) /home/mitch/dev/qt5-dev/qtbase/src/corelib/tools/qarraydata.cpp:146 #3 0x7f8b02fd58fa in QTypedArrayData<char>::reallocateUnaligned(QTypedArrayData<char>*, unsigned long, QFlags<QArrayData::AllocationOption>) ../../include/QtCore/../../../../qt5-dev/qtbase/src/corelib/tools/qarraydata.h:233 #4 0x7f8b02fd58fa in QByteArray::reallocData(unsigned int, QFlags<QArrayData::AllocationOption>) /home/mitch/dev/qt5-dev/qtbase/src/corelib/tools/qbytearray.cpp:1914 #5 0x7f8b02fd63c1 in QByteArray::resize(int) /home/mitch/dev/qt5-dev/qtbase/src/corelib/tools/qbytearray.cpp:1875 #6 0x7f8b0373c3a0 in QUtf8::convertFromUnicode(QChar const*, int, QTextCodec::ConverterState*) /home/mitch/dev/qt5-dev/qtbase/src/corelib/codecs/qutfcodec.cpp:456 #7 0x7f8b0373c653 in QUtf8Codec::convertFromUnicode(QChar const*, int, QTextCodec::ConverterState*) const /home/mitch/dev/qt5-dev/qtbase/src/corelib/codecs/qutfcodec.cpp:983 #8 0x7f8b0374918b in QTextCodec::fromUnicode(QStringView) const /home/mitch/dev/qt5-dev/qtbase/src/corelib/codecs/qtextcodec.cpp:846 #9 0x7f8b0311c01a in qt_convert_to_local_8bit /home/mitch/dev/qt5-dev/qtbase/src/corelib/tools/qstring.cpp:5369 #10 0x7f8b031366cb in QString::toLocal8Bit_helper(QChar const*, int) /home/mitch/dev/qt5-dev/qtbase/src/corelib/tools/qstring.cpp:5359 #11 0x55a59f4cbd70 in QString::toLocal8Bit() && /home/mitch/dev/qt5-dev-debug/qtbase/include/QtCore/../../../../qt5-dev/qtbase/src/corelib/tools/qstring.h:556 #12 0x55a59f4cbd70 in tst_Gifs::checkables() /home/mitch/dev/qt5-dev/qtquickcontrols2/tests/manual/gifs/tst_gifs.cpp:736 Change-Id: I5a967607e7ebff5177261f32222b9f50ee65d35e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>