Commit Graph

12 Commits

Author SHA1 Message Date
Andreas Kling
8b1108e485 Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Dawid Wolosowicz
484b9c1ba3 LibGUI: West Const to East Const refactor 2021-09-08 15:48:02 +04:30
Dawid Wolosowicz
2d91ba2737 LibGUI: Remove an unnecessarily specific inline capacity 2021-09-08 15:48:02 +04:30
sin-ack
7ba321c91b LibGUI: Implement granular operations for Model subclasses
These can be used by Model subclasses to signal the exact operations
that happened to a model, so that persistent model indices in that
area are not invalidated.
2021-08-08 14:13:37 +02:00
sin-ack
d73116e5d5 LibGUI: Implement persistent indices for models
This patch adds persistent indices to models.  A PersistentModelIndex is
a ModelIndex that will survive most model updates (provided that the
data the PersistentModelIndex points to has not been removed by the
model's data store).  PersistentModelIndex objects can be safely held
by objects outside the model they originated from.
2021-08-08 14:13:37 +02:00
sin-ack
16ac3bbfd7 LibGUI+Applications: Rename Model::is_valid to is_within_range
The previous name did not describe what the function checked, and was
easy to confuse with ModelIndex::is_valid.
2021-08-06 21:03:53 +02:00
sin-ack
ca2c81251a Everywhere: Replace Model::update() with Model::invalidate()
Most of the models were just calling did_update anyway, which is
pointless since it can be unified to the base Model class. Instead, code
calling update() will now call invalidate(), which functions identically
and is more obvious in what it does.

Additionally, a default implementation is provided, which removes the
need to add empty implementations of update() for each model subclass.

Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
2021-08-06 19:14:31 +02:00
Andreas Kling
3d4afe7614 Everywhere: "indexes" => "indices"
I've wasted a silly amount of time in the past fretting over which
of these words to use. Let's just choose one and use it everywhere. :^)
2021-04-29 22:23:52 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
speles
aa9c5d4418 LibGUI: Add possibility to search for exact match in model 2021-03-01 11:16:18 +01:00
Andreas Kling
db694491f3 LibGUI: Make Model::data_matches() take Variant by const-reference 2021-02-16 20:08:32 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00