Age | Commit message (Collapse) | Author |
|
We were only setting the wrapping mode when triggering the action. So:
- Any editors open without triggering a wrapping-mode action would have
the default (WrapAtWords) instead of the selected item (NoWrap).
- Any editors opened after triggering an action would have the default
too.
This fixes both situations, by:
- Storing the current wrapping mode in `m_wrapping_mode`. Later this
could be loaded from the config.
- Changing that value any time a wrapping-mode action is triggered.
- Setting the wrapping mode on newly-created editors.
|
|
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As usual, this removes many unused includes and moves used includes
further down the chain.
|
|
|
|
I went through all callers of adopt_own() and replaced them with
try_make<>() if possible or adopt_nonnull_own_or_enomem() else
in cases where it was easy (i.e. in functions already returning
ErrorOr).
No intended behavior change.
|
|
`write_to_file(StringView path)` was based on the `Core::File` overload.
The return type also changed from `bool` to `ErrorOr<void>` to ease
error propagation.
|
|
Either take the underlying objects with release_* methods or move() the
instances around.
|
|
|
|
|
|
SQLClient exists as a wrapper around SQL IPC to provide a bit friendlier
interface for clients to deal with. Though right now, it mostly forwards
values as-is from IPC to the clients. This makes it a bit verbose to add
values to IPC responses, as we then have to add it to the callbacks used
by all clients. It's also a bit confusing seeing a sea of "auto" as the
parameter types for these callbacks.
This patch moves these response values to named structures instead. This
will allow adding values without needing to simultaneously update all
clients. We can then separately handle the new values in interested
clients only.
|
|
This implements the same percentage formatting for the disassembly and
flamegraph views as we have for the profile model.
|
|
`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.
|
|
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
|
|
|
|
|
|
|
|
|
|
|
|
Those don't have any non-try counterpart, so we might as well just omit
it.
|
|
|
|
|
|
Splitting this into a separate commit was an afterthought, so this does
not yet feature any fallible operations.
|
|
This looks like it should compile, but UserspaceEmulator is currently
broken on any non-i686 platform anyways, so I can't test that.
|
|
These are currently being implicitly including by FixedPoint.h by way of
Format.h. The former will soon be removed from the latter, which would
otherwise cause a compile error in these files.
|
|
This is a preparatory step to making `get()` return `ErrorOr`.
|
|
These are formatters that can only be used with debug print
functions, such as dbgln(). Currently this is limited to
Formatter<ErrorOr<T>>. With this you can still debug log ErrorOr
values (good for debugging), but trying to use them in any
String::formatted() call will fail (which prevents .to_string()
errors with the new failable strings being ignored).
You make a formatter debug only by adding a constexpr method like:
static constexpr bool is_debug_only() { return true; }
|
|
These are not needed anymore since the introduction of the new
get_root_session_id syscall.
|
|
No new features, but it sure makes things look more fancy. :^)
|
|
There isn't much layout right now, but it felt very wrong to not have
the GML editor use GML. :^)
|
|
|
|
This was unintuitive, and only useful in a few cases. In the majority,
users had to immediately call `stop()`, and several who did want the
timer started would call `start()` on it immediately anyway. Case in
point: There are only two places I had to add a manual `start()`.
|
|
The FIXMEs must flow!
|
|
|
|
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
|
|
|
|
We changed elapsed() to return i64 instead of int as that's what
AK::Time::to_milliseconds() returns, causing a bunch of implicit lossy
conversions in callers. Clean those up with a mix of type changes and
casts.
|
|
Simplify a lot of uses of ElapsedTimer by converting the callers to
elapsed_time from elapsed, as the AK::Time returned is better for unit
conversions and comparisons against constants.
|
|
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.
|
|
Without this, the "Widget not registered" error stays visible if the
widgets defined by the GML do not themselves fill with their background
color.
Also tidied up some unused includes.
|
|
In doing so, this removes all uses of the Encoder's stream operator,
except for where it is currently still used in the generated IPC code.
So the stream operator currently discards any errors, which is the
existing behavior. A subsequent commit will propagate the errors.
|
|
These instances were detected by searching for files that include
stdlib.h, but don't match the regex:
\\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_
uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex
it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs|
ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble
n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o
penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo
c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete
nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou
l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b
(Without the linebreaks.)
This regex is pessimistic, so there might be more files that don't
actually use anything from the stdlib.
In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
|