summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate QWebEngineDownloadItem path API properlyTamas Zakor2019-11-051-0/+4
| | | | | | | | Implements suggestion from 5.14 API review: - Replace QT_DEPRECATED with QT_DEPRECATED_SINCE and QT_DEPRECATED_VERSION_X Change-Id: I4d0bf8a2b535c44b5749cbd3bbab7e305bd137c6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix all GCC and Clang warningsJüri Valdmann2019-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix all warnings save for -Wdeprecated-declarations in tests. Warnings from GCC 9.2.0: src/core/renderer/extensions/resource_request_policy_qt.cpp:157:23: warning: variable 'resource_root_relative_path' set but not used [-Wunused-but-set-variable] src/core/chromium_overrides.cpp:121:21: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] src/core/render_widget_host_view_qt.cpp:540:12: warning: enumeration value 'kNull' not handled in switch [-Wswitch] warning: enumeration value 'kMiddlePanningVertical' not handled in switch [-Wswitch] warning: enumeration value 'kMiddlePanningHorizontal' not handled in switch [-Wswitch] warning: enumeration value 'kDndNone' not handled in switch [-Wswitch] warning: enumeration value 'kDndMove' not handled in switch [-Wswitch] warning: enumeration value 'kDndCopy' not handled in switch [-Wswitch] warning: enumeration value 'kDndLink' not handled in switch [-Wswitch] warning: enumeration value 'kMaxValue' not handled in switch [-Wswitch] src/core/type_conversion.cpp:57:12: warning: enumeration value ‘kRGBA_F16Norm_SkColorType’ not handled in switch [-Wswitch] src/core/api/qtbug-60565.cpp:83:6: warning: 'void __ShimCppDeleteArrayNoThrow(void*, const std::nothrow_t&)' alias between functions of incompatible types 'void(void*, const std::nothrow_t&) noexcept' and 'void(void*)' [-Wattribute-alias=] src/core/api/qtbug-60565.cpp:79:6: warning: 'void __ShimCppDeleteNoThrow(void*, const std::nothrow_t&)' alias between functions of incompatible types 'void(void*, const std::nothrow_t&) noexcept' and 'void(void*)' [-Wattribute-alias=] src/core/api/qtbug-60565.cpp:75:6: warning: 'void __ShimCppNewArrayNoThrow(size_t, const std::nothrow_t&)' alias between functions of incompatible types 'void(size_t, const std::nothrow_t&) noexcept' {aka 'void(long unsigned int, const std::nothrow_t&) noexcept'} and 'void*(size_t)' {aka 'void*(long unsigned int)'} [-Wattribute-alias=] src/core/api/qtbug-60565.cpp:71:6: warning: 'void __ShimCppNewNoThrow(size_t, const std::nothrow_t&)' alias between functions of incompatible types 'void(size_t, const std::nothrow_t&) noexcept' {aka 'void(long unsigned int, const std::nothrow_t&) noexcept'} and 'void*(size_t)' {aka 'void*(long unsigned int)'} [-Wattribute-alias=] Warnings from Clang 9.0.1: src/core/renderer/extensions/renderer_permissions_policy_delegate_qt.h:61:29: warning: private field 'm_dispatcher' is not used [-Wunused-private-field] src/core/web_event_factory.cpp:1296:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] src/core/compositor/compositor_resource_fence.h:55:81: warning: extra ';' after member function definition [-Wextra-semi] src/core/renderer/render_frame_observer_qt.h:81:10: warning: 'ReadyToCommitNavigation' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] src/core/extensions/mime_handler_view_guest_delegate_qt.h:69:27: warning: private field 'guest_' is not used [-Wunused-private-field] src/core/chromium_overrides.cpp:121:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] src/core/chromium_overrides.cpp:145:64: warning: missing field 'set_up_command_line' initializer [-Wmissing-field-initializers] src/core/chromium_overrides.cpp:146:55: warning: missing field 'set_up_command_line' initializer [-Wmissing-field-initializers] src/core/render_widget_host_view_qt.cpp:540:13: warning: 7 enumeration values not handled in switch: 'kNull', 'kMiddlePanningVertical', 'kMiddlePanningHorizontal'... [-Wswitch] src/core/compositor/stream_video_node.cpp:50:18: warning: 'updateState' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] src/core/compositor/stream_video_node.cpp:103:18: warning: 'initialize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] src/core/type_conversion.cpp:57:13: warning: enumeration value 'kRGBA_F16Norm_SkColorType' not handled in switch [-Wswitch] src/core/renderer_host/web_channel_ipc_transport_host.cpp:59:60: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi] tests/auto/widgets/loadsignals/tst_loadsignals.cpp:237:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp:1112:62: warning: lambda capture 'item' is not used [-Wunused-lambda-capture] tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp:1534:55: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] Change-Id: I374be0d4e58accc0a00a2596a560dd6103a98994 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add API to change download directory path and file nameTamas Zakor2019-07-051-10/+146
| | | | | | | | | | | | | | | | | | Add functions and property to change the download directory and file name in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and deprecate the path() and setPath(). Regenerating the uniquifying download filename after change the download directory. [ChangeLog][DownloadItem] Add functions and property to change the download directory and file name in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and deprecate the path() and setPath(). Task-number: QTBUG-56978 Change-Id: I6e63da82a187add8bc3206cc80c8bf6865fbdd35 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devJüri Valdmann2019-07-021-18/+13
|\ | | | | | | Change-Id: I806417dd7a6d2594a86ee49feedc4ad9ee48add2
| * Refactor tst_QWebEngineDownloadItem::downloadPathValidation()Tamas Zakor2019-05-291-18/+13
| | | | | | | | | | | | | | | | | | Set temporary download path with new API. Change-Id: Ie448b14c9b063db45c99406bc491d92f3d61cb15 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devAllan Sandfeld Jensen2019-05-271-0/+123
|\| | | | | | | Change-Id: I70917458ba43c8fbf27fee2382eee42618588fe4
| * Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-05-241-0/+123
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/net/network_delegate_qt.cpp tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp Change-Id: Ib715b3047213583e0441b915d3cabb801d9d4ba8
| | * Add path validation for QWebEngineDownloadItem::setPath()Tamas Zakor2019-05-201-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not set path if it ends with separator or if it matches with an already existing directory name. Task-number: QTBUG-75566 Change-Id: I4b78b28afe034c7589633c569a4945a36b32008e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Add API to get the suggested download file nameTamas Zakor2019-05-161-0/+13
|/ / | | | | | | | | | | | | | | | | [ChangeLog][DownloadItem] Add functions and property to get the suggested download file name. Task-number: QTBUG-56978 Change-Id: I902870c6358271322da613a15ccc11639384e404 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Skip downloadToReadOnlyDir auto test on WindowsPeter Varga2019-04-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | It should be rather skipped than blacklisted since it is not expected to work on Windows. See the corresponding warning about ACLs: https://doc.qt.io/qt-5/qfile.html#setPermissions Task-number: QTBUG-74698 Change-Id: Iad66c028583d6811b7a413dd9800e9095d8f6da7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Unskip downloadUniqueFilenameWithTimestamp auto testPeter Varga2019-04-091-7/+4
| | | | | | | | | | | | Task-number: QTBUG-74764 Change-Id: I0e872449584b37c484e4d5ea46ba0bbc47124f51 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Make the skip actually compileAllan Sandfeld Jensen2019-04-021-1/+1
| | | | | | | | | | Change-Id: I348fd097db179557d04cde224f6a49f0d1c2f97d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Skip downloadUniqueFileNameWithTimeStamp auto test on WindowsPeter Varga2019-03-281-0/+3
| | | | | | | | | | | | Task-number: QTBUG-74764 Change-Id: I2638a6857e1d29ebacaafac3fff5daab57268b54 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-03-041-0/+32
|\| | | | | | | Change-Id: I1dd136df7004b11e2f38a2ec4e82a6fa81627479
| * Remove download properly on profile destruction to avoid use after freeKirill Burtsev2019-02-191-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | In the Widgets API, download items are children of the profile and are destroyed when the parent profile destroys its children. The download item's destructor can therefore not access the profile, as it would cause a heap-use-after-free crashes. On quick side turn ongoing downloads cleanup to match widgets one. Fixes: QTBUG-73839 Change-Id: Iabb379e91187e3e68ebcd4693fec35883b72b1f2 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix incrementing download IDTamas Zakor2019-02-141-1/+0
| | | | | | | | | | | | | | | | Adapt DownloadManagerDelegateQt::m_currentId to https://chromium-review.googlesource.com/1144311 Change-Id: I74d0165b096d5d02261290a7f84fda420a2b146c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add API to set default download pathTamas Zakor2019-01-301-0/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Also add new test for check uniquifying download filename. Update plugins.qmltypes to 1.9 [ChangeLog][Profile][QtWebEngine][QtWebEngineWidgets] Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Task-number: QTBUG-66262 Task-number: QTBUG-72176 Change-Id: I7fa93b66c326766b176aec24d453dd75602b91de Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 71Allan Sandfeld Jensen2019-01-281-0/+1
|/ | | | | | | Change-Id: Ib650113b05dfd4771240804f94e33c07aa317bf2 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Remove download items internally when API objects are deletedAllan Sandfeld Jensen2019-01-211-5/+39
| | | | | | | | | | We were never removing internal download item. [ChangeLog][Behavioral Changes] Deleting a download item will now also cancel it if it is still in progress. Change-Id: I2fab497d7acf7ca6ca17f4a61e106b1c18bfb333 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Add QWebEngineDownloadItem page/view accessorAllan Sandfeld Jensen2018-08-021-0/+4
| | | | | | | | | | To be able to determine where a download was triggered. [ChangeLog][DownloadItem] Added a page/view accessor to tell were the download was triggered. Change-Id: I21843a545a3e0eb66f5e5fa8a50e77564f2118a7 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Clean-up of test namesAllan Sandfeld Jensen2018-07-231-0/+778
We want to only use the qwebengine-prefix for tests of actual classes. Change-Id: I0ab4e17f3b4994cc67e836112965307236d61549 Reviewed-by: Kai Koehne <kai.koehne@qt.io>