summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-02Tests: Remove all file(GLOB) from CMakeLists in TestsAndrew Kaster
Using a file(GLOB) to find all the test files in a directory is an easy hack to get things started, but has some drawbacks. Namely, if you add a test, it won't be found again without re-running CMake. `ninja` seems to do this automatically, but it would be nice to one day stop seeing it rechecking our globbed directories.
2021-09-02Tests: Add tests for Core::deferred_invokesin-ack
2021-09-02LibCore: Remove deferred_invoke overload with Object& parametersin-ack
This is not necessary because the user can just use this, which is referenced until the deferred invocation is complete.
2021-09-02Userland: Migrate to argument-less deferred_invokesin-ack
Only one place used this argument and it was to hold on to a strong ref for the object. Since we already do that now, there's no need to keep this argument around since this can be easily captured. This commit contains no changes.
2021-09-02LibCore+Userland: Implement Core::deferred_invokesin-ack
Core::deferred_invoke is a way of executing an action after previously queued events have been processed. It removes the requirement of having/being a Core::Object subclass in order to defer invocation through Core::Object::deferred_invoke. Core::Object::deferred_invoke now delegates to Core::deferred_invoke. The version with the Object& argument is still present but will be removed in the following commits. This commit additionally fixes a new places where the DeferredInvocationEvent was dispatched to the event loop directly, and replaces them with the Core::deferred_invoke equivalent.
2021-09-02Welcome: Update tips.txtthankyouverycool
Super+Wheeling window opacity was removed in 370d374. Guilty only of being ahead of its time.
2021-09-02Welcome: Replace rand()/srand() with AK::get_random_uniform()thankyouverycool
2021-09-02Welcome: Make license headers uniformthankyouverycool
2021-09-01LibGUI: Don't draw Scrollbar scrubber when scrubber rect is nullthankyouverycool
Fixes null scrubbers drawing over the decrement button when window dimensions dictate they disappear.
2021-09-01LibGUI:: Style Combo and SpinBox buttons as ThickCapsthankyouverycool
These suffered the same visual defect as scrollbars when styled as normal buttons: against backgrounds with the same color as their highlighting, aspect was lost.
2021-09-01js: Use CodepointOriented spans and use the codepoint length of tokensin-ack
We were previously using byte-oriented spans. This would work if not for token.line_column() being in codepoints.
2021-09-013DFileViewer: Maintain the FPS counter's positionDawid Wolosowicz
Without this, any resize of the GLContextWidget might leave the label somewhere it shouldn't be. Toggling fullscreen is a single example of that behavior.
2021-09-01LibIMAP: Stop leaking a Core::Promise<bool> in IMAP::Client::connect()Andreas Kling
2021-09-01AK: Move forward() into the std namespaceAndreas Kling
Same as we already did with move(). This allows compiler diagnostics and static analyzers like SonarCloud to detect more issues.
2021-09-01LibIMAP: Remove accidental use of STLAndreas Kling
2021-09-01LibGUI: Show an error message box in the FilePicker on no permissionsKarol Kosek
The first attempt in #9037 used a special label as a view, if it wanted to communicate any kind of error, but that sure did look a bit ugly. Here, we are just showing a message box right before setting the new path as: - the contents of the previous directory will be visible in background, which I find pretty nice, and - I don't have to deal with adding a path history vector to reopen the previous directory (which might not even exist then). :^)
2021-09-01SpaceAnalyzer: Enable icons within the breadcrumbbarDawid Wolosowicz
The breadcrumbbar in here serves exactly the same purpose as the one in File Manager. Given that, I believe it's worth to keep these two visually consistent.
2021-09-01SoundPlayer: Use GUI::ActionGroup for Visualization menuThitat Auareesuksakul
Removed the old custom checkbox selection code in the Visualization menu and replaced them with GUI::ActionGroup with set_exclusive enabled instead :^)
2021-09-01Profiler: Minor static code analysis issues in FlameGraphViewBrian Gianforcaro
2021-09-01Profiler: Use = default for empty destructorBrian Gianforcaro
2021-09-01Kernel: Use = default for empty destructorsBrian Gianforcaro
2021-09-01Meta: Add Sonar Cloud link / badge to the README.mdBrian Gianforcaro
2021-09-01HackStudio: Fix typo in C++ file extension mapping codeBrian Gianforcaro
This looks like a copy past bug where we were checking "cc" twice instead of checking for the equivalent header extension. Found by Sonar Cloud.
2021-09-01SoundPlayer: Fix file leak in M3UParser::from_file(..)Brian Gianforcaro
Found by Sonar Cloud.
2021-09-01Kernel: Don't cast to NetworkOrdered<u16>* from random dataBrian Gianforcaro
NetworkOrdered is a non trivial type, and it's undefined behavior to cast a random pointer to it and then pretend it's that type. Instead just call AK::convert_between_host_and_network_endian on the individual u16*. This suppresses static analysis warnings. I don't think there was a "bug" in the previous code, it worked, but it was very brittle.
2021-09-01Kernel: Convert UserOrKernelBuffer callbacks to use AK::BytesBrian Gianforcaro
2021-09-01Kernel: Convert random bytes interface to use AK::BytesBrian Gianforcaro
2021-09-01Kernel: Pass InodeMetadata by reference in TmpFSInode::createBrian Gianforcaro
This struct is non-trivially large, it makes sense to pass it by reference instead of by value in the factory method. Found by Sonar Cloud.
2021-09-01AK: Pass AK::Format TypeErasedFormatParams by reference in AK::StringBrian Gianforcaro
This silences a overeager warning in sonar cloud, warning that slicing could occur with `VariadicFormatParams` which derives from `TypeErasedFormatParams`. Reference: https://sonarcloud.io/project/issues?id=SerenityOS_serenity&issues=AXuVPBW3k92xXUF3qXTE&open=AXuVPBW3k92xXUF3qXTE This is a continuation of f0b3aa033134b788a28fe8cf8ff6028d0e7941e8.
2021-09-01LibJS: Change offset in ISODateTimeWithinLimits to actually 24hLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/1d61d6f
2021-09-01LibJS: Throw RangeError for +/-∞ argument values in Temporal.Duration()Linus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/ababe1b
2021-09-01LibJS: Make 'options' argument of Calendar prototype functions optionalLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/9cc913e
2021-09-01LibJS: Throw RangeError in PrepareTemporalFields for +/-∞Linus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/499282a
2021-09-01LibJS: Throw TypeError if Instant.prototype.round() options is undefinedLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/943018f
2021-09-01LibJS: Handle undefined, NaN, and Infinity in ToTemporalDurationRecordLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/d4b9bcf
2021-09-01LibUnicode: Resolve the most likely territory alias when there are manyTimothy Flynn
2021-09-01LibUnicode: Generate Unicode locale likely subtag dataTimothy Flynn
CLDR contains a set of likely subtag data where, given a locale, you can resolve what is the most likely language, script, or territory of that locale. This data is needed for resolving territory aliases. These aliases might contain multiple territories, and we need to resolve which of those territories is most likely correct for a locale. Note that the likely subtag data is quite huge (a few thousand entries). As an optimization encouraged by the spec, we only generate the smallest subset of this data that we actually need (about 150 entries).
2021-09-01LibUnicode: Perform complex Unicode locale alias substitutionTimothy Flynn
2021-09-01LibUnicode: Generate complex Unicode locale alias matchingTimothy Flynn
Most alias substitutions are "simple", meaning that alias matching is done by examining a single locale subtag. However, there are a handful of "complex" aliases where matching is done by examining multiple subtags. For example, the variant subtag "lojban" causes the locale "art-lojban" to be canonicalized to "jbo", but only when the language subtag is "art" (i.e. this should not occur for the locale "en-lojban"). This generates a method to perform complex alias matching.
2021-09-01LibUnicode: Canonicalize calendar subtagsTimothy Flynn
Calendar subtags are a bit of an odd-man-out in that we must match the variants "ethiopic-amete-alem" in that order, without any other variant in the locale. So a separate method is needed for this, and we now defer sorting the variant list until after other canonicalization is done.
2021-09-01LibUnicode: Canonicalize timezone subtagsTimothy Flynn
2021-09-01LibUnicode: Canonicalize the subtag "imperial" to "uksystem"Timothy Flynn
2021-09-01LibUnicode: Canonicalize the subtag "primary" and "tertiary" to "levelN"Timothy Flynn
2021-09-01LibUnicode: Canonicalize the subtag "names" to "prprname"Timothy Flynn
2021-09-01LibUnicode: Canonicalize the subtag "yes" to "true"Timothy Flynn
2021-09-01LibUnicode: Substitute Unicode locale aliases during canonicalizationTimothy Flynn
Unicode TR35 defines how locale subtag aliases should be emplaced when converting a locale to canonical form. For most subtags, it is a simple substitution. Language subtags depend on context; for example, the language "sh" should become "sr-Latn", but if the original locale has a script subtag already ("sh-Cyrl"), then only the language subtag of the alias should be taken ("sr-Latn"). To facilitate this, we now make two passes when canonicalizing a locale. In the first pass, we convert the LocaleID structure to canonical syntax (where the conversions all happen in-place). In the second pass, we form the canonical string based on the canonical syntax.
2021-09-01LibUnicode: Generate Unicode locale alias dataTimothy Flynn
CLDR contains a set of aliases for languages, territories, etc. that no longer are meant to be used (e.g. due to deprecation). For example, the language "aam" is deprecated and should be canonicalized as "aas".
2021-09-01LibJS+LibUnicode: Store parsed Unicode locale data as full stringsTimothy Flynn
Originally, it was convenient to store the parsed Unicode locale data as views into the original string being parsed. But to implement locale aliases will require mutating the data that was parsed. To prepare for that, store the parsed data as proper strings.
2021-09-01LibUnicode: Extract cldr-core dataset from CLDR databaseTimothy Flynn
2021-09-01LibJS: Handle Unicode locale extensions in LookupMatcher AOTimothy Flynn