mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 13:28:35 +01:00
Drop signal CClientUIInterface::LoadWallet
This commit is contained in:
committed by
João Barbosa
parent
be50469217
commit
81ea66c30e
@@ -22,6 +22,15 @@ public:
|
||||
boost::signals2::scoped_connection m_connection;
|
||||
};
|
||||
|
||||
class CleanupHandler : public Handler
|
||||
{
|
||||
public:
|
||||
explicit CleanupHandler(std::function<void()> cleanup) : m_cleanup(std::move(cleanup)) {}
|
||||
~CleanupHandler() override { if (!m_cleanup) return; m_cleanup(); m_cleanup = nullptr; }
|
||||
void disconnect() override { if (!m_cleanup) return; m_cleanup(); m_cleanup = nullptr; }
|
||||
std::function<void()> m_cleanup;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<Handler> MakeHandler(boost::signals2::connection connection)
|
||||
@@ -29,4 +38,9 @@ std::unique_ptr<Handler> MakeHandler(boost::signals2::connection connection)
|
||||
return MakeUnique<HandlerImpl>(std::move(connection));
|
||||
}
|
||||
|
||||
std::unique_ptr<Handler> MakeHandler(std::function<void()> cleanup)
|
||||
{
|
||||
return MakeUnique<CleanupHandler>(std::move(cleanup));
|
||||
}
|
||||
|
||||
} // namespace interfaces
|
||||
|
||||
Reference in New Issue
Block a user