diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-05-12 13:56:43 +0430 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-12 11:00:45 +0100 |
commit | a91a49337c5992d64b30f493eea1eb492792b667 (patch) | |
tree | b665e2c0b31a9935ca8a8f8b5b71bbadf476e32f /Userland/Libraries/LibWeb | |
parent | 422ef7904e9eb6be1182421a7529ed0d5e00991f (diff) | |
download | serenity-a91a49337c5992d64b30f493eea1eb492792b667.zip |
LibCore+Everywhere: Move OpenMode out of IODevice
...and make it an enum class so people don't omit "OpenMode".
Diffstat (limited to 'Userland/Libraries/LibWeb')
6 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp index 160c7cec3a..42b1991329 100644 --- a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp +++ b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) return 1; } auto file = Core::File::construct(argv[1]); - if (!file->open(Core::IODevice::ReadOnly)) + if (!file->open(Core::OpenMode::ReadOnly)) return 1; auto json = JsonValue::from_string(file->read_all()); diff --git a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp index ddb42723c0..79d16e6406 100644 --- a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp +++ b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) return 1; } auto file = Core::File::construct(argv[1]); - if (!file->open(Core::IODevice::ReadOnly)) + if (!file->open(Core::OpenMode::ReadOnly)) return 1; auto json = JsonValue::from_string(file->read_all()); diff --git a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_cpp.cpp b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_cpp.cpp index 03e7e9c42f..fbfe0b6c6c 100644 --- a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_cpp.cpp +++ b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_cpp.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) return 1; } auto file = Core::File::construct(argv[1]); - if (!file->open(Core::IODevice::ReadOnly)) + if (!file->open(Core::OpenMode::ReadOnly)) return 1; auto json = JsonValue::from_string(file->read_all()); diff --git a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_h.cpp b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_h.cpp index a5b34ad67c..8c11b37055 100644 --- a/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_h.cpp +++ b/Userland/Libraries/LibWeb/CodeGenerators/Generate_CSS_ValueID_h.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) return 1; } auto file = Core::File::construct(argv[1]); - if (!file->open(Core::IODevice::ReadOnly)) + if (!file->open(Core::OpenMode::ReadOnly)) return 1; auto json = JsonValue::from_string(file->read_all()); diff --git a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp index c62c1e6aa1..c5495beaf2 100644 --- a/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp +++ b/Userland/Libraries/LibWeb/CodeGenerators/WrapperGenerator.cpp @@ -394,7 +394,7 @@ int main(int argc, char** argv) args_parser.add_positional_argument(path, "IDL file", "idl-file"); args_parser.parse(argc, argv); - auto file_or_error = Core::File::open(path, Core::IODevice::ReadOnly); + auto file_or_error = Core::File::open(path, Core::OpenMode::ReadOnly); if (file_or_error.is_error()) { fprintf(stderr, "Cannot open %s\n", path); return 1; diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp index e8b144449a..b02fb31ccd 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -133,7 +133,7 @@ void ResourceLoader::load(const LoadRequest& request, Function<void(ReadonlyByte if (url.protocol() == "file") { auto f = Core::File::construct(); f->set_filename(url.path()); - if (!f->open(Core::IODevice::OpenMode::ReadOnly)) { + if (!f->open(Core::OpenMode::ReadOnly)) { dbgln("ResourceLoader::load: Error: {}", f->error_string()); if (error_callback) error_callback(f->error_string(), {}); |