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 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.
|
|
Fixes #14158
|
|
It is unsafe to defer this selection update, because ::open_url itself
is called when users make selection updates, creating a race.
This fixes and infinite selection change loop one could easily reproduce
by holding an up or down arrow key in the tree view while clicking on a
tree view item a couple of times.
|
|
|
|
|
|
As usual, this removes many unused includes and moves used includes
further down the chain.
|
|
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.
|
|
The browse view now always tracks the currently open help page.
|
|
It's the only one, so the `try` prefix is unnecessary now.
|
|
MOAR FIXMES! ;^)
|
|
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.
|
|
index_from_path is the only remaining model index handling function that
wasn't aware of subsections. After this change, clicked pages are
resolved to a model index correctly, eliminating the weird
subsection-expansion bugs from before.
|
|
This now expands nodes unnecessarily with nested sections.
|
|
Clicking on a subsection now displays the sibling page, which is
intended to be the main page for that section.
|
|
|
|
This is convenient for the section node which might compute children
on the fly.
|
|
This was a relict when the sections were still a help-internal array.
|
|
The responsible code was actually casting everything to a SectionNode
pointer, violating type safety all over the place and leading to
frequent crashes. I'm surprised this was not exhibited before; I guess
my recent changes made this bug surface.
|
|
Previously it was reference-captured, causing crash because of stack
use after return.
|
|
This is the old behavior before the recent LibManual refactor. It also
moves the definition of the index page into LibManual for better reuse.
|
|
This managed to fly under my radar for the LibManual PR, and somehow it
only happens for the Clang build but doesn't always trigger on CI.
|
|
This deduplicates argument handling logic from Help and man and makes it
more modular for future use cases. The argument handling works as
before: two arguments specify section and page (in this order), one
argument specifies either a page (the first section that it's found in
is used) or a path to a manpage markdown file.
|
|
This was failing probably because AK::URL was being too strict; and the
query emptyness check was flipped.
|
|
This way, we'll have an easier time changing these paths.
|
|
- Calculate the full name on demand
- Make section and name protected
- Reorder some members logically
- Change the name getter to be fallible, as some implementors need to
allocate
|
|
This is a first step in deduplicating code within and across Help and
man.
Because LibManual also doesn't contain any DeprecatedString, some
adjustments to Help's string handling is included, just to interoperate
with LibManual better. Further work in this area mostly requires String
APIs in LibGUI.
|
|
This is just two ints or 8 bytes or the size of the reference on
x86_64 or AArch64.
|
|
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 :^)
|
|
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.
Also included are changes to readd now missing dependencies to tools
that actually need them.
|
|
|
|
|
|
We previously put the generated headers in SOURCES, which did not mark
them as GENERATED (and did not produce a proper dependency).
This commit moves all generated headers into GENERATED_SOURCES, and
removes useless header SOURCES.
|
|
This is a partial revert of commit 7af5eef. After 97d15e9, the 'proc'
promise is not needed for operations using getsid().
This also fixes launching several applications in which 7af5eef added
the 'proc' promise only in the second call to pledge().
|
|
This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.
Userland: Switch over servers to sid based sockets
Userland: Properly pledge and unveil for sid based sockets
|
|
URL had properly named replacements for protocol(), set_protocol() and
create_with_file_protocol() already. This patch removes these function
and updates all call sites to use the functions named according to the
specification.
See https://url.spec.whatwg.org/#concept-url-scheme
|
|
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move
the UCD data to the main LibUnicode library, and rename LibUnicodeData
to LibLocaleData. This is another prepatory change to migrate to
LibLocale.
|
|
|
|
|
|
|
|
The `/tmp/user` directory is owned by root, this solution prevents
malicious users to interfere with other users' portals.
This commit also moves `launch`'s portal in the user directory.
|
|
This patch replaces the concept of fixed resizees with opportunistic
ones which use the new SpecialDimension::OpportunisticGrow UISize.
This lets us simplify splitter resize code and take advantage of
the layout system's automatic calculations for minimum size and
expansion. Functionally the same as before, but fixes Splitter's
unintended ability to grow window size.
|
|
This patch implements man pages opened using the help url protocol
properly getting added to the navigation history as well as enabling
the back and forward buttons in such cases.
|
|
Various changes are needed to support this:
- The directory is created by Core::Account on login (and located in
/tmp).
- Service's sockets are now deleted on exit (to allow re-creation)
- SystemServer needs to handle SIGTERM to correctly destroy services.
|
|
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).
No functional changes.
|