mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 19:32:12 +00:00
LibCore: Remove CTimer::create() overloads in favor of construct()
This commit is contained in:
parent
9e00651e14
commit
f4b51a63ec
13 changed files with 14 additions and 24 deletions
|
@ -7,16 +7,6 @@
|
|||
class CTimer final : public CObject {
|
||||
C_OBJECT(CTimer)
|
||||
public:
|
||||
static ObjectPtr<CTimer> create(CObject* parent = nullptr)
|
||||
{
|
||||
return new CTimer(parent);
|
||||
}
|
||||
|
||||
static ObjectPtr<CTimer> create(int interval, Function<void()>&& timeout_handler, CObject* parent = nullptr)
|
||||
{
|
||||
return new CTimer(interval, move(timeout_handler), parent);
|
||||
}
|
||||
|
||||
virtual ~CTimer() override;
|
||||
|
||||
void start();
|
||||
|
|
|
@ -10,7 +10,7 @@ GAbstractButton::GAbstractButton(const StringView& text, GWidget* parent)
|
|||
: GWidget(parent)
|
||||
, m_text(text)
|
||||
{
|
||||
m_auto_repeat_timer = CTimer::create(this);
|
||||
m_auto_repeat_timer = CTimer::construct(this);
|
||||
m_auto_repeat_timer->on_timeout = [this] {
|
||||
click();
|
||||
};
|
||||
|
|
|
@ -61,7 +61,7 @@ GScrollBar::GScrollBar(Orientation orientation, GWidget* parent)
|
|||
: GWidget(parent)
|
||||
, m_orientation(orientation)
|
||||
{
|
||||
m_automatic_scrolling_timer = CTimer::create(this);
|
||||
m_automatic_scrolling_timer = CTimer::construct(this);
|
||||
if (!s_up_arrow_bitmap)
|
||||
s_up_arrow_bitmap = &CharacterBitmap::create_from_ascii(s_up_arrow_bitmap_data, 9, 9).leak_ref();
|
||||
if (!s_down_arrow_bitmap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue