diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2021-11-28 20:45:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-30 10:52:18 +0100 |
commit | 2565f458d17853c875597d891c4004f00b94ed78 (patch) | |
tree | 5e13238f8326ae266a9e41fa7c8e7e01af2ce96d /Userland/Applets/ClipboardHistory/ClipboardHistoryModel.h | |
parent | 298a6b99378e6cdbb80c5623582e510063da3d3f (diff) | |
download | serenity-2565f458d17853c875597d891c4004f00b94ed78.zip |
ClipboardHistory: Add debug dump action
This allows for easy dumping of clipboard data to the debug console.
Diffstat (limited to 'Userland/Applets/ClipboardHistory/ClipboardHistoryModel.h')
-rw-r--r-- | Userland/Applets/ClipboardHistory/ClipboardHistoryModel.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Applets/ClipboardHistory/ClipboardHistoryModel.h b/Userland/Applets/ClipboardHistory/ClipboardHistoryModel.h index c62718dcbb..06aba406b6 100644 --- a/Userland/Applets/ClipboardHistory/ClipboardHistoryModel.h +++ b/Userland/Applets/ClipboardHistory/ClipboardHistoryModel.h @@ -30,6 +30,9 @@ public: const GUI::Clipboard::DataAndType& item_at(int index) const { return m_history_items[index]; } void remove_item(int index); + // ^GUI::Model + virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override; + // ^Config::Listener virtual void config_string_did_change(String const& domain, String const& group, String const& key, String const& value) override; @@ -41,7 +44,6 @@ private: virtual int row_count(const GUI::ModelIndex&) const override { return m_history_items.size(); } virtual String column_name(int) const override; virtual int column_count(const GUI::ModelIndex&) const override { return Column::__Count; } - virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override; // ^GUI::Clipboard::ClipboardClient virtual void clipboard_content_did_change(const String&) override { add_item(GUI::Clipboard::the().fetch_data_and_type()); } |