mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
Spreadsheet: Port to Core::Stream
It also takes advantage of the new, `Core::Stream`-friendly, interface in `LibFileSystemAccessClient`.
This commit is contained in:
parent
81008062a7
commit
c6aeb9811c
9 changed files with 52 additions and 54 deletions
|
@ -14,15 +14,11 @@
|
|||
#include <LibCore/System.h>
|
||||
#include <LibFileSystemAccessClient/Client.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/Icon.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/Menubar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <unistd.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
|
@ -69,8 +65,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->show();
|
||||
|
||||
if (filename) {
|
||||
auto file = TRY(FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, filename));
|
||||
spreadsheet_widget->load_file(file);
|
||||
auto file = TRY(FileSystemAccessClient::Client::the().request_file_read_only_approved(window, filename));
|
||||
spreadsheet_widget->load_file(file.filename(), file.stream());
|
||||
}
|
||||
|
||||
return app->exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue