mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
Ladybird: Open files from the open files dialog as a QURL
This prevents us from needing to properly prepend file:// to the returned filename.
This commit is contained in:
parent
c75bd4ed15
commit
7245f6f11c
Notes:
sideshowbarker
2024-07-17 01:04:03 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/7245f6f11c Pull-request: https://github.com/SerenityOS/serenity/pull/23051 Reviewed-by: https://github.com/kalenikaliaksandr Reviewed-by: https://github.com/trflynn89 ✅
@ -720,9 +720,10 @@ void Tab::location_edit_return_pressed()
|
||||
|
||||
void Tab::open_file()
|
||||
{
|
||||
auto filename = QFileDialog::getOpenFileName(this, "Open file", QDir::homePath(), "All Files (*.*)");
|
||||
if (!filename.isNull())
|
||||
navigate(ak_url_from_qstring(filename));
|
||||
auto filename = QFileDialog::getOpenFileUrl(this, "Open file", QDir::homePath(), "All Files (*.*)");
|
||||
if (filename.isValid()) {
|
||||
navigate(ak_url_from_qurl(filename));
|
||||
}
|
||||
}
|
||||
|
||||
int Tab::tab_index()
|
||||
|
Loading…
Reference in New Issue
Block a user