always update m_oldState after emit stateChanged()