changed RingBufferHistory to use qvector instead of raw array