mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00: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
1 changed files with 4 additions and 3 deletions
|
@ -720,9 +720,10 @@ void Tab::location_edit_return_pressed()
|
||||||
|
|
||||||
void Tab::open_file()
|
void Tab::open_file()
|
||||||
{
|
{
|
||||||
auto filename = QFileDialog::getOpenFileName(this, "Open file", QDir::homePath(), "All Files (*.*)");
|
auto filename = QFileDialog::getOpenFileUrl(this, "Open file", QDir::homePath(), "All Files (*.*)");
|
||||||
if (!filename.isNull())
|
if (filename.isValid()) {
|
||||||
navigate(ak_url_from_qstring(filename));
|
navigate(ak_url_from_qurl(filename));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Tab::tab_index()
|
int Tab::tab_index()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue