Age | Commit message (Collapse) | Author |
|
|
|
|
|
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.
This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.
From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
|
|
|
|
This commit updates all application man page links to point to the
Applications subdirectory.
|
|
|
|
|
|
|
|
Adds fallible factories, ports DeprecatedString, and rebuilds the
layout to accomodate system font changes.
|
|
This now defaults to serializing the path with percent decoded segments
(which is what all callers expect), but has an option not to. This fixes
`file://` URLs with spaces in their paths.
The name has been changed to serialize_path() path to make it more clear
that this method will generate a new string each call (except for the
cannot_be_a_base_url() case). A few callers have then been updated to
avoid repeatedly calling this function.
|
|
|
|
Similar to POSIX read, the basic read and write functions of AK::Stream
do not have a lower limit of how much data they read or write (apart
from "none at all").
Rename the functions to "read some [data]" and "write some [data]" (with
"data" being omitted, since everything here is reading and writing data)
to make them sufficiently distinct from the functions that ensure to
use the entire buffer (which should be the go-to function for most
usages).
No functional changes, just a lot of new FIXMEs.
|
|
|
|
|
|
The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
|
|
|
|
|
|
Strings include ASCII, UTF-8, and UTF-16
Co-authored-by: Andreas Krohn <hamburger1984@gmail.com>
|
|
|
|
|
|
As usual, this removes many unused includes and moves used includes
further down the chain.
|
|
|
|
|
|
|
|
Because usage of the input_type parameter is now higher than of the
placeholder parameter, this makes for a cleaner API.
|
|
Do this where we were already checking if the input was empty after the
InputBox was submitted. Those places gain interactive input validation.
:^)
|
|
This function is made from what composed `set_file()` (which now calls
the new function). It allows to create a `HexDocumentFile` without
calling the hackish `set_file(move(m_file))`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Stream` will be qualified as `AK::Stream` until we remove the
`Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is
defined by `SeekableStream`, since defining its own would require us to
qualify it with `AK::SeekMode` everywhere.
|
|
Those don't have any non-try counterpart, so we might as well just omit
it.
|
|
These are not needed anymore since the introduction of the new
get_root_session_id syscall.
|
|
|
|
A subsequent commit will add to_utf8 back to create an AK::String.
|
|
This could fail to allocate the underlying storage needed to store the
UTF-8 data. Propagate this error.
|
|
These could fail to allocate the underlying storage needed to store the
UTF-16 data. Propagate these errors.
|
|
It's the only one, so the `try` prefix is unnecessary now.
|
|
MOAR FIXMES! ;^)
|
|
These functions return the deprecated `Core::File` class, so let's mark
it as such to avoid possible confusion between future non try_*
functions which will use Core::Stream family classes and to possibly
grab someone's attention. :^)
|
|
Rip that bandaid off!
This does the following, in one big, awkward jump:
- Replace all uses of `set_main_widget<Foo>()` with the `try` version.
- Remove `set_main_widget<Foo>()`.
- Rename the `try` version to just be `set_main_widget` because it's now
the only one.
The majority of places that call `set_main_widget<Foo>()` are inside
constructors, so this unfortunately gives us a big batch of new
`release_value_but_fixme_should_propagate_errors()` calls.
|
|
Specifically, the ones HexEditor::did_complete_action possibly raised in
case creating an undo stack entry or pushing it onto the undo stack
fails. In this case, an error popup is displayed and the modifications
are undone.
This removes 2 FIXMEs inside the code :^)
|
|
`try_save_file_deprecated`
This precedes the addition of a new api using `Core::Stream`
|
|
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.
One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
|
|
This patch will switch cursor to DragCopy when a user enters a widget
while dragging file(s), giving them a visual clue that it *might* be
dropped into this widget.
This is a rather naive approach, as the cursor icon will change for any
kind of file, as currently programs don't know the drag contents before
dropping it. But after all I think it's better than nothing. :^)
|