MenuApplets: Fix using OwnPtr<> with RefCounted types

This commit is contained in:
Sergey Bugaev 2020-06-12 16:27:34 +03:00 committed by Andreas Kling
parent eb3700c565
commit 62d1ac63e8
Notes: sideshowbarker 2024-07-19 05:42:25 +09:00

View file

@ -36,8 +36,8 @@ class AudioWidget final : public GUI::Widget {
C_OBJECT(AudioWidget)
public:
AudioWidget()
: m_audio_client(Audio::ClientConnection::construct())
{
m_audio_client = make<Audio::ClientConnection>();
m_audio_client->on_muted_state_change = [this](bool muted) {
if (m_audio_muted == muted)
return;
@ -68,7 +68,7 @@ private:
painter.blit({}, audio_bitmap, audio_bitmap.rect());
}
OwnPtr<Audio::ClientConnection> m_audio_client;
NonnullRefPtr<Audio::ClientConnection> m_audio_client;
RefPtr<Gfx::Bitmap> m_muted_bitmap;
RefPtr<Gfx::Bitmap> m_unmuted_bitmap;
bool m_audio_muted { false };