mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +00:00
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
This commit is contained in:
parent
77b9fa89dd
commit
90b1354688
188 changed files with 562 additions and 562 deletions
|
@ -44,7 +44,7 @@ private:
|
|||
|
||||
ViewMode m_view_mode { Invalid };
|
||||
|
||||
Retained<GDirectoryModel> m_model;
|
||||
NonnullRefPtr<GDirectoryModel> m_model;
|
||||
int m_path_history_position { 0 };
|
||||
Vector<String> m_path_history;
|
||||
void add_path_to_history(const StringView& path);
|
||||
|
|
|
@ -103,8 +103,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
});
|
||||
|
||||
RetainPtr<GAction> view_as_table_action;
|
||||
RetainPtr<GAction> view_as_icons_action;
|
||||
RefPtr<GAction> view_as_table_action;
|
||||
RefPtr<GAction> view_as_icons_action;
|
||||
|
||||
view_as_table_action = GAction::create("Table view", { Mod_Ctrl, KeyCode::Key_L }, GraphicsBitmap::load_from_file("/res/icons/16x16/table-view.png"), [&](const GAction&) {
|
||||
directory_view->set_view_mode(DirectoryView::ViewMode::List);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <LibGUI/GTextBox.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
FontEditorWidget::FontEditorWidget(const String& path, RetainPtr<Font>&& edited_font, GWidget* parent)
|
||||
FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Font>&& edited_font, GWidget* parent)
|
||||
: GWidget(parent)
|
||||
, m_edited_font(move(edited_font))
|
||||
{
|
||||
|
|
|
@ -9,11 +9,11 @@ class GTextBox;
|
|||
|
||||
class FontEditorWidget final : public GWidget {
|
||||
public:
|
||||
FontEditorWidget(const String& path, RetainPtr<Font>&&, GWidget* parent = nullptr);
|
||||
FontEditorWidget(const String& path, RefPtr<Font>&&, GWidget* parent = nullptr);
|
||||
virtual ~FontEditorWidget() override;
|
||||
|
||||
private:
|
||||
RetainPtr<Font> m_edited_font;
|
||||
RefPtr<Font> m_edited_font;
|
||||
|
||||
GlyphMapWidget* m_glyph_map_widget { nullptr };
|
||||
GlyphEditorWidget* m_glyph_editor_widget { nullptr };
|
||||
|
|
|
@ -24,7 +24,7 @@ private:
|
|||
|
||||
void draw_at_mouse(const GMouseEvent&);
|
||||
|
||||
RetainPtr<Font> m_font;
|
||||
RefPtr<Font> m_font;
|
||||
byte m_glyph { 0 };
|
||||
int m_scale { 10 };
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ private:
|
|||
|
||||
Rect get_outer_rect(byte glyph) const;
|
||||
|
||||
RetainPtr<Font> m_font;
|
||||
RefPtr<Font> m_font;
|
||||
int m_rows { 8 };
|
||||
int m_horizontal_spacing { 2 };
|
||||
int m_vertical_spacing { 2 };
|
||||
|
|
|
@ -7,7 +7,7 @@ int main(int argc, char** argv)
|
|||
{
|
||||
GApplication app(argc, argv);
|
||||
|
||||
RetainPtr<Font> edited_font;
|
||||
RefPtr<Font> edited_font;
|
||||
String path;
|
||||
|
||||
if (argc == 2) {
|
||||
|
|
|
@ -24,10 +24,10 @@ private:
|
|||
IRCClient m_client;
|
||||
GStackWidget* m_container { nullptr };
|
||||
GTableView* m_window_list { nullptr };
|
||||
RetainPtr<GAction> m_join_action;
|
||||
RetainPtr<GAction> m_part_action;
|
||||
RetainPtr<GAction> m_whois_action;
|
||||
RetainPtr<GAction> m_open_query_action;
|
||||
RetainPtr<GAction> m_close_query_action;
|
||||
RetainPtr<GAction> m_change_nick_action;
|
||||
RefPtr<GAction> m_join_action;
|
||||
RefPtr<GAction> m_part_action;
|
||||
RefPtr<GAction> m_whois_action;
|
||||
RefPtr<GAction> m_open_query_action;
|
||||
RefPtr<GAction> m_close_query_action;
|
||||
RefPtr<GAction> m_change_nick_action;
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ IRCChannel::~IRCChannel()
|
|||
{
|
||||
}
|
||||
|
||||
Retained<IRCChannel> IRCChannel::create(IRCClient& client, const String& name)
|
||||
NonnullRefPtr<IRCChannel> IRCChannel::create(IRCClient& client, const String& name)
|
||||
{
|
||||
return adopt(*new IRCChannel(client, name));
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ class IRCWindow;
|
|||
|
||||
class IRCChannel : public RefCounted<IRCChannel> {
|
||||
public:
|
||||
static Retained<IRCChannel> create(IRCClient&, const String&);
|
||||
static NonnullRefPtr<IRCChannel> create(IRCClient&, const String&);
|
||||
~IRCChannel();
|
||||
|
||||
bool is_open() const { return m_open; }
|
||||
|
@ -64,7 +64,7 @@ private:
|
|||
Vector<Member> m_members;
|
||||
bool m_open { false };
|
||||
|
||||
Retained<IRCLogBuffer> m_log;
|
||||
Retained<IRCChannelMemberListModel> m_member_model;
|
||||
NonnullRefPtr<IRCLogBuffer> m_log;
|
||||
NonnullRefPtr<IRCChannelMemberListModel> m_member_model;
|
||||
IRCWindow* m_window { nullptr };
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ public:
|
|||
enum Column {
|
||||
Name
|
||||
};
|
||||
static Retained<IRCChannelMemberListModel> create(IRCChannel& channel) { return adopt(*new IRCChannelMemberListModel(channel)); }
|
||||
static NonnullRefPtr<IRCChannelMemberListModel> create(IRCChannel& channel) { return adopt(*new IRCChannelMemberListModel(channel)); }
|
||||
virtual ~IRCChannelMemberListModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex&) const override;
|
||||
|
|
|
@ -120,14 +120,14 @@ private:
|
|||
|
||||
String m_nickname;
|
||||
OwnPtr<CNotifier> m_notifier;
|
||||
HashMap<String, RetainPtr<IRCChannel>> m_channels;
|
||||
HashMap<String, RetainPtr<IRCQuery>> m_queries;
|
||||
HashMap<String, RefPtr<IRCChannel>> m_channels;
|
||||
HashMap<String, RefPtr<IRCQuery>> m_queries;
|
||||
|
||||
Vector<IRCWindow*> m_windows;
|
||||
|
||||
IRCWindow* m_server_subwindow { nullptr };
|
||||
|
||||
Retained<IRCWindowListModel> m_client_window_list_model;
|
||||
Retained<IRCLogBuffer> m_log;
|
||||
Retained<CConfigFile> m_config;
|
||||
NonnullRefPtr<IRCWindowListModel> m_client_window_list_model;
|
||||
NonnullRefPtr<IRCLogBuffer> m_log;
|
||||
NonnullRefPtr<CConfigFile> m_config;
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
Retained<IRCLogBuffer> IRCLogBuffer::create()
|
||||
NonnullRefPtr<IRCLogBuffer> IRCLogBuffer::create()
|
||||
{
|
||||
return adopt(*new IRCLogBuffer);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class IRCLogBufferModel;
|
|||
|
||||
class IRCLogBuffer : public RefCounted<IRCLogBuffer> {
|
||||
public:
|
||||
static Retained<IRCLogBuffer> create();
|
||||
static NonnullRefPtr<IRCLogBuffer> create();
|
||||
~IRCLogBuffer();
|
||||
|
||||
struct Message {
|
||||
|
@ -32,6 +32,6 @@ public:
|
|||
|
||||
private:
|
||||
IRCLogBuffer();
|
||||
Retained<IRCLogBufferModel> m_model;
|
||||
NonnullRefPtr<IRCLogBufferModel> m_model;
|
||||
CircularQueue<Message, 1000> m_messages;
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
IRCLogBufferModel::IRCLogBufferModel(Retained<IRCLogBuffer>&& log_buffer)
|
||||
IRCLogBufferModel::IRCLogBufferModel(NonnullRefPtr<IRCLogBuffer>&& log_buffer)
|
||||
: m_log_buffer(move(log_buffer))
|
||||
{
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ public:
|
|||
__Count,
|
||||
};
|
||||
|
||||
static Retained<IRCLogBufferModel> create(Retained<IRCLogBuffer>&& log_buffer) { return adopt(*new IRCLogBufferModel(move(log_buffer))); }
|
||||
static NonnullRefPtr<IRCLogBufferModel> create(NonnullRefPtr<IRCLogBuffer>&& log_buffer) { return adopt(*new IRCLogBufferModel(move(log_buffer))); }
|
||||
virtual ~IRCLogBufferModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex&) const override;
|
||||
|
@ -24,7 +24,7 @@ public:
|
|||
virtual void update() override;
|
||||
|
||||
private:
|
||||
explicit IRCLogBufferModel(Retained<IRCLogBuffer>&&);
|
||||
explicit IRCLogBufferModel(NonnullRefPtr<IRCLogBuffer>&&);
|
||||
|
||||
Retained<IRCLogBuffer> m_log_buffer;
|
||||
NonnullRefPtr<IRCLogBuffer> m_log_buffer;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ IRCQuery::~IRCQuery()
|
|||
{
|
||||
}
|
||||
|
||||
Retained<IRCQuery> IRCQuery::create(IRCClient& client, const String& name)
|
||||
NonnullRefPtr<IRCQuery> IRCQuery::create(IRCClient& client, const String& name)
|
||||
{
|
||||
return adopt(*new IRCQuery(client, name));
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ class IRCWindow;
|
|||
|
||||
class IRCQuery : public RefCounted<IRCQuery> {
|
||||
public:
|
||||
static Retained<IRCQuery> create(IRCClient&, const String& name);
|
||||
static NonnullRefPtr<IRCQuery> create(IRCClient&, const String& name);
|
||||
~IRCQuery();
|
||||
|
||||
String name() const { return m_name; }
|
||||
|
@ -35,5 +35,5 @@ private:
|
|||
String m_name;
|
||||
IRCWindow* m_window { nullptr };
|
||||
|
||||
Retained<IRCLogBuffer> m_log;
|
||||
NonnullRefPtr<IRCLogBuffer> m_log;
|
||||
};
|
||||
|
|
|
@ -49,6 +49,6 @@ private:
|
|||
String m_name;
|
||||
GTableView* m_table_view { nullptr };
|
||||
GTextEditor* m_text_editor { nullptr };
|
||||
RetainPtr<IRCLogBuffer> m_log_buffer;
|
||||
RefPtr<IRCLogBuffer> m_log_buffer;
|
||||
int m_unread_count { 0 };
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ public:
|
|||
Name,
|
||||
};
|
||||
|
||||
static Retained<IRCWindowListModel> create(IRCClient& client) { return adopt(*new IRCWindowListModel(client)); }
|
||||
static NonnullRefPtr<IRCWindowListModel> create(IRCClient& client) { return adopt(*new IRCWindowListModel(client)); }
|
||||
virtual ~IRCWindowListModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex&) const override;
|
||||
|
|
|
@ -32,7 +32,7 @@ private:
|
|||
virtual void mouseup_event(GMouseEvent&) override;
|
||||
virtual void mousemove_event(GMouseEvent&) override;
|
||||
|
||||
RetainPtr<GraphicsBitmap> m_bitmap;
|
||||
RefPtr<GraphicsBitmap> m_bitmap;
|
||||
|
||||
Color m_primary_color { Color::Black };
|
||||
Color m_secondary_color { Color::White };
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
__Count
|
||||
};
|
||||
|
||||
static Retained<ProcessModel> create(GraphWidget& graph) { return adopt(*new ProcessModel(graph)); }
|
||||
static NonnullRefPtr<ProcessModel> create(GraphWidget& graph) { return adopt(*new ProcessModel(graph)); }
|
||||
virtual ~ProcessModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex&) const override;
|
||||
|
@ -61,9 +61,9 @@ private:
|
|||
HashMap<uid_t, String> m_usernames;
|
||||
HashMap<pid_t, OwnPtr<Process>> m_processes;
|
||||
Vector<pid_t> m_pids;
|
||||
RetainPtr<GraphicsBitmap> m_generic_process_icon;
|
||||
RetainPtr<GraphicsBitmap> m_high_priority_icon;
|
||||
RetainPtr<GraphicsBitmap> m_low_priority_icon;
|
||||
RetainPtr<GraphicsBitmap> m_normal_priority_icon;
|
||||
RefPtr<GraphicsBitmap> m_generic_process_icon;
|
||||
RefPtr<GraphicsBitmap> m_high_priority_icon;
|
||||
RefPtr<GraphicsBitmap> m_low_priority_icon;
|
||||
RefPtr<GraphicsBitmap> m_normal_priority_icon;
|
||||
CFile m_proc_all;
|
||||
};
|
||||
|
|
|
@ -55,7 +55,7 @@ private:
|
|||
Rect m_rect;
|
||||
GButton* m_button { nullptr };
|
||||
String m_icon_path;
|
||||
RetainPtr<GraphicsBitmap> m_icon;
|
||||
RefPtr<GraphicsBitmap> m_icon;
|
||||
bool m_active { false };
|
||||
bool m_minimized { false };
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
byte Terminal::Attribute::default_foreground_color = 7;
|
||||
byte Terminal::Attribute::default_background_color = 0;
|
||||
|
||||
Terminal::Terminal(int ptm_fd, RetainPtr<CConfigFile> config)
|
||||
Terminal::Terminal(int ptm_fd, RefPtr<CConfigFile> config)
|
||||
: m_ptm_fd(ptm_fd)
|
||||
, m_notifier(ptm_fd, CNotifier::Read)
|
||||
, m_config(config)
|
||||
|
|
|
@ -14,7 +14,7 @@ class Font;
|
|||
|
||||
class Terminal final : public GFrame {
|
||||
public:
|
||||
explicit Terminal(int ptm_fd, RetainPtr<CConfigFile> config);
|
||||
explicit Terminal(int ptm_fd, RefPtr<CConfigFile> config);
|
||||
virtual ~Terminal() override;
|
||||
|
||||
void create_window();
|
||||
|
@ -30,7 +30,7 @@ public:
|
|||
bool should_beep() { return m_should_beep; }
|
||||
void set_should_beep(bool sb) { m_should_beep = sb; };
|
||||
|
||||
RetainPtr<CConfigFile> config() const { return m_config; }
|
||||
RefPtr<CConfigFile> config() const { return m_config; }
|
||||
|
||||
private:
|
||||
typedef Vector<unsigned, 4> ParamVector;
|
||||
|
@ -205,7 +205,7 @@ private:
|
|||
|
||||
CTimer m_cursor_blink_timer;
|
||||
CTimer m_visual_beep_timer;
|
||||
RetainPtr<CConfigFile> m_config;
|
||||
RefPtr<CConfigFile> m_config;
|
||||
|
||||
byte m_last_char { 0 };
|
||||
};
|
||||
|
|
|
@ -81,7 +81,7 @@ static void make_shell(int ptm_fd)
|
|||
}
|
||||
}
|
||||
|
||||
GWindow* create_settings_window(Terminal& terminal, RetainPtr<CConfigFile> config)
|
||||
GWindow* create_settings_window(Terminal& terminal, RefPtr<CConfigFile> config)
|
||||
{
|
||||
auto* window = new GWindow;
|
||||
window->set_title("Terminal Settings");
|
||||
|
@ -149,7 +149,7 @@ int main(int argc, char** argv)
|
|||
window->set_double_buffering_enabled(false);
|
||||
window->set_should_exit_event_loop_on_close(true);
|
||||
|
||||
RetainPtr<CConfigFile> config = CConfigFile::get_for_app("Terminal");
|
||||
RefPtr<CConfigFile> config = CConfigFile::get_for_app("Terminal");
|
||||
Terminal terminal(ptm_fd, config);
|
||||
window->set_has_alpha_channel(true);
|
||||
window->set_main_widget(&terminal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue