various: update Qt code deprecated in 5.15

- Replaces QLinkedList with std::list as recommended by Qt docs.
- Replaces QWheelEvent::delta() with QWheelEvent::angleDelta(). This
  should also benefit trackpad behavior.
This commit is contained in:
itsmattkc
2020-05-27 02:54:05 +10:00
parent da04777a25
commit 3e3cacbc85
12 changed files with 29 additions and 27 deletions
+3 -3
View File
@@ -32,14 +32,14 @@ struct ViewerPlaybackFrame {
FramePtr frame;
};
class ViewerQueue : public QLinkedList<ViewerPlaybackFrame> {
class ViewerQueue : public std::list<ViewerPlaybackFrame> {
public:
ViewerQueue() = default;
void AppendTimewise(const ViewerPlaybackFrame& f, int playback_speed)
{
if (this->isEmpty() || (this->last().timestamp < f.timestamp) == (playback_speed > 0)) {
this->append(f);
if (this->empty() || (this->back().timestamp < f.timestamp) == (playback_speed > 0)) {
this->push_back(f);
} else {
for (iterator i=this->begin(); i!=this->end(); i++) {
if ((i->timestamp > f.timestamp) == (playback_speed > 0)) {