Network/AbstractSocket: Replace OnStateChange signal by OnStateChanged
This commit is contained in:
parent
e1cfa2e184
commit
583393acd0
|
|
@ -150,6 +150,7 @@ Nazara Engine:
|
||||||
- ⚠️ BaseWidget::SetSize has been renamed to BaseWidget::Resize
|
- ⚠️ BaseWidget::SetSize has been renamed to BaseWidget::Resize
|
||||||
- Added BaseWidget::ForEachWidgetChild
|
- Added BaseWidget::ForEachWidgetChild
|
||||||
- Added experimental BoxLayout class
|
- Added experimental BoxLayout class
|
||||||
|
- ⚠️ AbstractSocket::OnStateChange has been replaced by OnStateChanged, which is now called after state has been changed (with oldState and newState as parameters).
|
||||||
|
|
||||||
Nazara Development Kit:
|
Nazara Development Kit:
|
||||||
- Added ImageWidget (#139)
|
- Added ImageWidget (#139)
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ namespace Nz
|
||||||
AbstractSocket& operator=(AbstractSocket&& abstractSocket);
|
AbstractSocket& operator=(AbstractSocket&& abstractSocket);
|
||||||
|
|
||||||
// Signals:
|
// Signals:
|
||||||
NazaraSignal(OnStateChange, const AbstractSocket* /*socket*/, SocketState /*newState*/);
|
NazaraSignal(OnStateChanged, const AbstractSocket* /*socket*/, SocketState /*oldState*/, SocketState /*newState*/);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AbstractSocket(SocketType type);
|
AbstractSocket(SocketType type);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (C) 2017 Jérôme Leclercq
|
// Copyright (C) 2017 Jérôme Leclercq
|
||||||
// This file is part of the "Nazara Engine - Network module"
|
// This file is part of the "Nazara Engine - Network module"
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
||||||
|
|
@ -66,8 +66,9 @@ namespace Nz
|
||||||
{
|
{
|
||||||
if (m_state != newState)
|
if (m_state != newState)
|
||||||
{
|
{
|
||||||
OnStateChange(this, newState);
|
SocketState oldState = m_state;
|
||||||
m_state = newState;
|
m_state = newState;
|
||||||
|
OnStateChange(this, oldState, newState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue