diff options
-rw-r--r-- | Userland/Applications/FontEditor/UndoSelection.h | 2 | ||||
-rw-r--r-- | Userland/Applications/Help/ManualModel.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/ImageViewer/ViewWidget.h | 2 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/Tools/TextTool.h | 2 | ||||
-rw-r--r-- | Userland/Applications/TerminalSettings/TerminalSettingsWidget.h | 4 | ||||
-rw-r--r-- | Userland/Applications/ThemeEditor/PreviewWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/VideoPlayer/VideoFrameWidget.h | 3 | ||||
-rw-r--r-- | Userland/Demos/WidgetGallery/GalleryWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/EditorWrapper.cpp | 3 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 4 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.h | 6 | ||||
-rw-r--r-- | Userland/DevTools/Profiler/TimelineHeader.h | 2 | ||||
-rw-r--r-- | Userland/Games/Chess/ChessWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Chess/ChessWidget.h | 4 | ||||
-rw-r--r-- | Userland/Games/ColorLines/ColorLines.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/ColorLines/ColorLines.h | 2 | ||||
-rw-r--r-- | Userland/Games/Hearts/Player.cpp | 2 |
17 files changed, 23 insertions, 23 deletions
diff --git a/Userland/Applications/FontEditor/UndoSelection.h b/Userland/Applications/FontEditor/UndoSelection.h index 4961a4687e..69d97b8a26 100644 --- a/Userland/Applications/FontEditor/UndoSelection.h +++ b/Userland/Applications/FontEditor/UndoSelection.h @@ -13,7 +13,7 @@ class UndoSelection : public RefCounted<UndoSelection> { public: - explicit UndoSelection(int const start, int const size, u32 const active_glyph, Gfx::BitmapFont const& font, NonnullRefPtr<GUI::GlyphMapWidget> glyph_map_widget) + explicit UndoSelection(int const start, int const size, u32 const active_glyph, Gfx::BitmapFont& font, NonnullRefPtr<GUI::GlyphMapWidget> glyph_map_widget) : m_start(start) , m_size(size) , m_active_glyph(active_glyph) diff --git a/Userland/Applications/Help/ManualModel.cpp b/Userland/Applications/Help/ManualModel.cpp index 906a3ad730..1bd80035f6 100644 --- a/Userland/Applications/Help/ManualModel.cpp +++ b/Userland/Applications/Help/ManualModel.cpp @@ -149,7 +149,7 @@ GUI::ModelIndex ManualModel::parent_index(const GUI::ModelIndex& index) const return {}; auto children = maybe_children.release_value(); for (size_t row = 0; row < children.size(); row++) { - Manual::Node* child_at_row = children[row]; + Manual::Node const* child_at_row = children[row]; if (child_at_row == parent) return create_index(row, 0, parent); } diff --git a/Userland/Applications/ImageViewer/ViewWidget.h b/Userland/Applications/ImageViewer/ViewWidget.h index b3a8d001f9..d87596cef7 100644 --- a/Userland/Applications/ImageViewer/ViewWidget.h +++ b/Userland/Applications/ImageViewer/ViewWidget.h @@ -66,7 +66,7 @@ private: Vector<DeprecatedString> load_files_from_directory(DeprecatedString const& path) const; DeprecatedString m_path; - RefPtr<Gfx::Bitmap> m_bitmap; + RefPtr<Gfx::Bitmap const> m_bitmap; Optional<ImageDecoderClient::DecodedImage> m_decoded_image; size_t m_current_frame_index { 0 }; diff --git a/Userland/Applications/PixelPaint/Tools/TextTool.h b/Userland/Applications/PixelPaint/Tools/TextTool.h index bbf56bf9f5..62b512a104 100644 --- a/Userland/Applications/PixelPaint/Tools/TextTool.h +++ b/Userland/Applications/PixelPaint/Tools/TextTool.h @@ -53,7 +53,7 @@ private: RefPtr<Core::Timer> m_cursor_blink_timer; RefPtr<PixelPaint::TextToolEditor> m_text_editor; Gfx::IntPoint m_add_text_position { 0, 0 }; - RefPtr<Gfx::Font> m_selected_font; + RefPtr<Gfx::Font const> m_selected_font; bool m_text_input_is_active { false }; bool m_cursor_blink_state { false }; bool m_mouse_is_over_text { false }; diff --git a/Userland/Applications/TerminalSettings/TerminalSettingsWidget.h b/Userland/Applications/TerminalSettings/TerminalSettingsWidget.h index f5fc21a2f1..b8ff45469f 100644 --- a/Userland/Applications/TerminalSettings/TerminalSettingsWidget.h +++ b/Userland/Applications/TerminalSettings/TerminalSettingsWidget.h @@ -47,13 +47,13 @@ private: TerminalSettingsViewWidget(); void write_back_settings() const; - RefPtr<Gfx::Font> m_font; + RefPtr<Gfx::Font const> m_font; float m_opacity; DeprecatedString m_color_scheme; VT::CursorShape m_cursor_shape { VT::CursorShape::Block }; bool m_cursor_is_blinking_set { true }; - RefPtr<Gfx::Font> m_original_font; + RefPtr<Gfx::Font const> m_original_font; float m_original_opacity; DeprecatedString m_original_color_scheme; VT::CursorShape m_original_cursor_shape; diff --git a/Userland/Applications/ThemeEditor/PreviewWidget.cpp b/Userland/Applications/ThemeEditor/PreviewWidget.cpp index 58732192ae..977bb2f0a4 100644 --- a/Userland/Applications/ThemeEditor/PreviewWidget.cpp +++ b/Userland/Applications/ThemeEditor/PreviewWidget.cpp @@ -39,7 +39,7 @@ public: return gallery; } - void set_preview_palette(Gfx::Palette const& palette) + void set_preview_palette(Gfx::Palette& palette) { set_palette(palette); Function<void(GUI::Widget&)> recurse = [&](GUI::Widget& parent_widget) { diff --git a/Userland/Applications/VideoPlayer/VideoFrameWidget.h b/Userland/Applications/VideoPlayer/VideoFrameWidget.h index 77e9cef746..0a59e662a3 100644 --- a/Userland/Applications/VideoPlayer/VideoFrameWidget.h +++ b/Userland/Applications/VideoPlayer/VideoFrameWidget.h @@ -26,7 +26,6 @@ public: virtual ~VideoFrameWidget() override = default; void set_bitmap(Gfx::Bitmap const*); - Gfx::Bitmap* bitmap() { return m_bitmap.ptr(); } Gfx::Bitmap const* bitmap() const { return m_bitmap.ptr(); } void set_sizing_mode(VideoSizingMode value) { m_sizing_mode = value; } @@ -44,7 +43,7 @@ protected: virtual void paint_event(GUI::PaintEvent&) override; private: - RefPtr<Gfx::Bitmap> m_bitmap; + RefPtr<Gfx::Bitmap const> m_bitmap; VideoSizingMode m_sizing_mode { VideoSizingMode::Fit }; bool m_auto_resize { false }; }; diff --git a/Userland/Demos/WidgetGallery/GalleryWidget.cpp b/Userland/Demos/WidgetGallery/GalleryWidget.cpp index 295df36d33..1d90223fe5 100644 --- a/Userland/Demos/WidgetGallery/GalleryWidget.cpp +++ b/Userland/Demos/WidgetGallery/GalleryWidget.cpp @@ -306,7 +306,7 @@ GalleryWidget::GalleryWidget() m_cursors_tableview->on_activation = [&](const GUI::ModelIndex& index) { auto icon_index = index.model()->index(index.row(), MouseCursorModel::Column::Bitmap); - m_cursors_tableview->set_override_cursor(NonnullRefPtr<Gfx::Bitmap>(icon_index.data().as_bitmap())); + m_cursors_tableview->set_override_cursor(NonnullRefPtr<Gfx::Bitmap const>(icon_index.data().as_bitmap())); }; auto icons_tab = tab_widget.try_add_tab<GUI::Widget>("Icons").release_value_but_fixme_should_propagate_errors(); diff --git a/Userland/DevTools/HackStudio/EditorWrapper.cpp b/Userland/DevTools/HackStudio/EditorWrapper.cpp index d6c91d5ad2..6cb484f9be 100644 --- a/Userland/DevTools/HackStudio/EditorWrapper.cpp +++ b/Userland/DevTools/HackStudio/EditorWrapper.cpp @@ -50,7 +50,8 @@ void EditorWrapper::set_mode_displayable() { editor().set_mode(GUI::TextEditor::Editable); editor().set_background_role(Gfx::ColorRole::Base); - editor().set_palette(GUI::Application::the()->palette()); + auto palette = GUI::Application::the()->palette(); + editor().set_palette(palette); } void EditorWrapper::set_mode_non_displayable() diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index c3283e1c69..f698340168 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -1837,7 +1837,7 @@ void HackStudioWidget::update_history_actions() m_locations_history_forward_action->set_enabled(true); } -RefPtr<Gfx::Font> HackStudioWidget::read_editor_font_from_config() +RefPtr<Gfx::Font const> HackStudioWidget::read_editor_font_from_config() { auto font_family = Config::read_string("HackStudio"sv, "EditorFont"sv, "Family"sv, "Csilla"sv); auto font_variant = Config::read_string("HackStudio"sv, "EditorFont"sv, "Variant"sv, "Regular"sv); @@ -1850,7 +1850,7 @@ RefPtr<Gfx::Font> HackStudioWidget::read_editor_font_from_config() return font; } -void HackStudioWidget::change_editor_font(RefPtr<Gfx::Font> font) +void HackStudioWidget::change_editor_font(RefPtr<Gfx::Font const> font) { m_editor_font = move(font); for (auto& editor_wrapper : m_all_editor_wrappers) { diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.h b/Userland/DevTools/HackStudio/HackStudioWidget.h index e1325628cc..47a8b87bff 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.h +++ b/Userland/DevTools/HackStudio/HackStudioWidget.h @@ -248,9 +248,9 @@ private: RefPtr<GUI::Action> m_toggle_semantic_highlighting_action; RefPtr<GUI::Action> m_open_project_configuration_action; - RefPtr<Gfx::Font> read_editor_font_from_config(); - void change_editor_font(RefPtr<Gfx::Font>); - RefPtr<Gfx::Font> m_editor_font; + RefPtr<Gfx::Font const> read_editor_font_from_config(); + void change_editor_font(RefPtr<Gfx::Font const>); + RefPtr<Gfx::Font const> m_editor_font; RefPtr<GUI::Action> m_editor_font_action; GUI::TextEditor::WrappingMode m_wrapping_mode { GUI::TextEditor::NoWrap }; diff --git a/Userland/DevTools/Profiler/TimelineHeader.h b/Userland/DevTools/Profiler/TimelineHeader.h index e484a1233a..334afdbb66 100644 --- a/Userland/DevTools/Profiler/TimelineHeader.h +++ b/Userland/DevTools/Profiler/TimelineHeader.h @@ -32,7 +32,7 @@ private: Profile& m_profile; Process const& m_process; - RefPtr<Gfx::Bitmap> m_icon; + RefPtr<Gfx::Bitmap const> m_icon; DeprecatedString m_text; bool m_selected; }; diff --git a/Userland/Games/Chess/ChessWidget.cpp b/Userland/Games/Chess/ChessWidget.cpp index 8b3532bedc..2f43ab111b 100644 --- a/Userland/Games/Chess/ChessWidget.cpp +++ b/Userland/Games/Chess/ChessWidget.cpp @@ -421,7 +421,7 @@ Chess::Square ChessWidget::mouse_to_square(GUI::MouseEvent& event) const } } -RefPtr<Gfx::Bitmap> ChessWidget::get_piece_graphic(Chess::Piece const& piece) const +RefPtr<Gfx::Bitmap const> ChessWidget::get_piece_graphic(Chess::Piece const& piece) const { return m_pieces.get(piece).value(); } diff --git a/Userland/Games/Chess/ChessWidget.h b/Userland/Games/Chess/ChessWidget.h index 3e35f2706f..82db2648d1 100644 --- a/Userland/Games/Chess/ChessWidget.h +++ b/Userland/Games/Chess/ChessWidget.h @@ -48,7 +48,7 @@ public: bool drag_enabled() const { return m_drag_enabled; } void set_drag_enabled(bool e) { m_drag_enabled = e; } - RefPtr<Gfx::Bitmap> get_piece_graphic(Chess::Piece const& piece) const; + RefPtr<Gfx::Bitmap const> get_piece_graphic(Chess::Piece const& piece) const; bool show_available_moves() const { return m_show_available_moves; } void set_show_available_moves(bool e) { m_show_available_moves = e; } @@ -128,7 +128,7 @@ private: Color m_marking_alternate_color { Color::from_argb(0x66ffaa00) }; Color m_marking_secondary_color { Color::from_argb(0x6655dd55) }; Chess::Color m_side { Chess::Color::White }; - HashMap<Chess::Piece, RefPtr<Gfx::Bitmap>> m_pieces; + HashMap<Chess::Piece, RefPtr<Gfx::Bitmap const>> m_pieces; DeprecatedString m_piece_set; Chess::Square m_moving_square { 50, 50 }; Gfx::IntPoint m_drag_point; diff --git a/Userland/Games/ColorLines/ColorLines.cpp b/Userland/Games/ColorLines/ColorLines.cpp index 992f51de6b..cae00b18aa 100644 --- a/Userland/Games/ColorLines/ColorLines.cpp +++ b/Userland/Games/ColorLines/ColorLines.cpp @@ -40,7 +40,7 @@ ColorLines::BitmapArray ColorLines::build_marble_color_bitmaps() ColorLines::BitmapArray ColorLines::build_marble_trace_bitmaps() { // Use "Paw Prints" Unicode Character (U+1F43E) - auto trace_bitmap = NonnullRefPtr<Gfx::Bitmap>(*Gfx::Emoji::emoji_for_code_point(0x1F43E)); + auto trace_bitmap = NonnullRefPtr<Gfx::Bitmap const>(*Gfx::Emoji::emoji_for_code_point(0x1F43E)); BitmapArray result; result.ensure_capacity(number_of_marble_trace_bitmaps); result.append(trace_bitmap); diff --git a/Userland/Games/ColorLines/ColorLines.h b/Userland/Games/ColorLines/ColorLines.h index 0197080720..362bbd8937 100644 --- a/Userland/Games/ColorLines/ColorLines.h +++ b/Userland/Games/ColorLines/ColorLines.h @@ -47,7 +47,7 @@ private: void restart_timer(int milliseconds); using Point = Gfx::IntPoint; - using BitmapArray = Vector<NonnullRefPtr<Gfx::Bitmap>>; + using BitmapArray = Vector<NonnullRefPtr<Gfx::Bitmap const>>; StringView const m_app_name; GameState m_game_state { GameState::Idle }; diff --git a/Userland/Games/Hearts/Player.cpp b/Userland/Games/Hearts/Player.cpp index 80a3c3729c..5feb78f7e7 100644 --- a/Userland/Games/Hearts/Player.cpp +++ b/Userland/Games/Hearts/Player.cpp @@ -162,7 +162,7 @@ void Player::remove_cards(NonnullRefPtrVector<Card> const& cards) { for (auto& card : cards) { hand.remove_first_matching([&card](auto& other_card) { - return other_card == card; + return other_card.ptr() == &card; }); } } |