mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
LibGUI: Add formatter for ModelIndex.
This commit is contained in:
parent
a7533eb29c
commit
93d04b9f8d
2 changed files with 21 additions and 0 deletions
|
@ -80,8 +80,15 @@ const LogStream& operator<<(const LogStream&, const ModelIndex&);
|
|||
}
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Formatter<GUI::ModelIndex> : Formatter<StringView> {
|
||||
void format(TypeErasedFormatParams&, FormatBuilder&, const GUI::ModelIndex&);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Traits<GUI::ModelIndex> : public GenericTraits<GUI::ModelIndex> {
|
||||
static unsigned hash(const GUI::ModelIndex& index) { return pair_int_hash(index.row(), index.column()); }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue