summaryrefslogtreecommitdiffstats
path: root/src/core/file_picker_controller.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix compiler warnings in file_picker_controller.cppTamas Zakor2020-06-191-1/+1
| | | | | Change-Id: I6d160f90e7693d15cb495d38788c57b47a1fe548 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Fix path validation in FilePickerController::accepted()Tamas Zakor2020-05-201-18/+54
| | | | | | | | | | | | | In some cases QUrl::toLocalFile() does wrong path conversion on Windows. Therefore we have to convert the file URL to absolute path in another way and use FilePath::IsAbsolute() for validating that. Also stabilize WebEngineViewSingleFileUpload tests. They didn't wait for html title change when the expected value was the same as the default title. Change-Id: Ica7798a299f9b28657afeeccccfba3fdecc515e2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix default file dialogs in QMLSzabolcs David2020-03-241-2/+11
| | | | | | | | | | | QVariant::toStringList() never worked in that case where the variant stores QList<QUrl>. Bring back the old logic from 5.12 and unwrap URLs "manually". Task-number: QTWB-46 Change-Id: I8d690c092e1a9bd459ab55cd4d5934d633e907e1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Tamas Zakor <ztamas@inf.u-szeged.hu>
* Fix name filters of GTK file pickerSzabolcs David2020-02-161-0/+3
| | | | | | | | | | Setting an empty string instead of "()" fixes that case where the file input doesn't have "accept" attribute. Task-number: QTBUG-82109 Change-Id: I8a72f819fa6d8bbab4e5f1067b38ad75ff11e118 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Support accept attribute of file inputSzabolcs David2019-11-291-2/+50
| | | | | | | | | Set name filters of QFileDialog and QML FileDialog to avoid presenting all file types. Task-number: QTBUG-76564 Change-Id: I321214a30bc7e875ad132b015c63282f4eb482bf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix file URI checks for FilePickerController::accepted() on WindowsTamas Zakor2019-07-311-4/+19
| | | | | | | Extend auto tests with windows specific cases. Change-Id: I731cd520c12a38636a5df4829a79d7bd1d85a314 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Clean-up handling of selected filesAllan Sandfeld Jensen2019-07-271-20/+16
| | | | | | | | | | Simplifies the code and makes sure both the two QML implementations of the file-selector are source compatible. Note, this does not address issues with test on Windows. Change-Id: Ieee84866c456d600a812683cae389d6a6980366f Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix qmltests::WebEngineViewSingleFileUpload auto testsTamas Zakor2019-04-101-10/+21
| | | | | | | | | | | | | Add scheme checks for FilePickerController::accepted(). A file:// prefix to a file selected here causes chromium to terminate the render process due to an illegal ipc message. Extend auto tests with custom Dialog. Also fix directory upload test. Change-Id: I8d672e435129d62d268b48c3471b924c0161b44b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Adaptations for Chromium 72Allan Sandfeld Jensen2019-03-231-0/+1
| | | | | Change-Id: Ic355257066c7c1433862cb41e6f2bfa831147e0d Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Adaptations for Chromium 71Allan Sandfeld Jensen2019-01-281-12/+25
| | | | | | | 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>
* Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-061-3/+4
| | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Pass <input type="file"> result to correct RenderFrameHostViktor Engelmann2017-02-281-9/+8
| | | | | | | | | | | | | | | | | | | In WebContentsDelegateQt::RunFileChooser, we get a content::RenderFrameHost*, to which chromium wants us to pass the files that were selected. We now store that pointer in the FilePickerController, so that we can pass the files there in FilePickerController::filesSelectedInChooser. The attribute content::WebContents *m_contents is no longer needed then, because that was only used to obtain the main frame to which the files were sent (this caused problems when the file input was inside an iframe - we sent the result to the wrong frame in that case, so the file input object remained blocked). Task-number: QTBUG-59168 Change-Id: Ic2fdacb225e5a1a9e46ced6a1e4a9ff428f18a62 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations to Chromium 53Allan Sandfeld Jensen2016-09-141-1/+1
| | | | | Change-Id: I15053486edfd42ee607250b4f14fb6eaa325c959 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add missing consts in file picker controllerMichal Klocek2016-07-141-3/+3
| | | | | | Change-Id: I13a7e2d5b676e9c80561021610f4d647d75c63dd Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Unify license header usage.Jani Heikkinen2016-02-011-13/+16
| | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add tst_filePicker.qml test for UIDelegateAdam Kallai2015-04-241-2/+9
| | | | | | | | Testing single, multiple file and directory upload. Change-Id: I9da9e1f780a7f97a300fcaa38738ea781b85a4a7 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix initialization order in file_picker_controller.cppAndras Becsi2015-04-151-1/+1
| | | | | | Change-Id: I315c3476c943e81a43b21892c30f0550961194a1 Reviewed-by: Adam Kallai <kadam@inf.u-szeged.hu> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Merge remote-tracking branch 'origin/5.5' into devAllan Sandfeld Jensen2015-03-131-0/+4
| | | | | | | | | | Conflicts: src/webengine/api/qquickwebengineview_p_p.h src/webengine/ui_delegates_manager.cpp src/webengine/ui_delegates_manager.h src/webenginewidgets/api/qwebenginepage_p.h Change-Id: I8052de4d3b2e68a950832226f6f99e2aafca5505
* Refactor FilePickerControllerAdam Kallai2015-03-051-0/+118
Move FilePickerController classes to the QtWebEngine core to providing common functionality of files selecetion for WebEngine and WebEngineWidgtes. Change-Id: I6ab407095460ef5b63b454f7d62b98215383fc21 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>