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:
Vendored
+1
-1
@@ -62,7 +62,7 @@ QFuture<void> CacheTask::DownloadFrame(FramePtr frame, const QByteArray &hash)
|
||||
return QtConcurrent::run(&download_threads_, FrameHashCache::SaveCacheFrame, hash, frame);
|
||||
}
|
||||
|
||||
void CacheTask::FrameDownloaded(const QByteArray &hash, const QLinkedList<rational> ×)
|
||||
void CacheTask::FrameDownloaded(const QByteArray &hash, const std::list<rational> ×)
|
||||
{
|
||||
foreach (const rational& t, times) {
|
||||
viewer()->video_frame_cache()->SetHash(t, hash);
|
||||
|
||||
Vendored
+1
-1
@@ -42,7 +42,7 @@ public slots:
|
||||
protected:
|
||||
virtual QFuture<void> DownloadFrame(FramePtr frame, const QByteArray &hash) override;
|
||||
|
||||
virtual void FrameDownloaded(const QByteArray& hash, const QLinkedList<rational>& times) override;
|
||||
virtual void FrameDownloaded(const QByteArray& hash, const std::list<rational>& times) override;
|
||||
|
||||
virtual void AudioDownloaded(const TimeRange& range, SampleBufferPtr samples) override;
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ QFuture<void> ExportTask::DownloadFrame(FramePtr frame, const QByteArray &hash)
|
||||
return QtConcurrent::run(FrameColorConvert, color_processor_, frame);
|
||||
}
|
||||
|
||||
void ExportTask::FrameDownloaded(const QByteArray &hash, const QLinkedList<rational> ×)
|
||||
void ExportTask::FrameDownloaded(const QByteArray &hash, const std::list<rational> ×)
|
||||
{
|
||||
FramePtr f = rendered_frame_.value(hash);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public slots:
|
||||
protected:
|
||||
virtual QFuture<void> DownloadFrame(FramePtr frame, const QByteArray &hash) override;
|
||||
|
||||
virtual void FrameDownloaded(const QByteArray& hash, const QLinkedList<rational>& times) override;
|
||||
virtual void FrameDownloaded(const QByteArray& hash, const std::list<rational>& times) override;
|
||||
|
||||
virtual void AudioDownloaded(const TimeRange& range, SampleBufferPtr samples) override;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ protected:
|
||||
|
||||
virtual QFuture<void> DownloadFrame(FramePtr frame, const QByteArray &hash) = 0;
|
||||
|
||||
virtual void FrameDownloaded(const QByteArray& hash, const QLinkedList<rational>& times) = 0;
|
||||
virtual void FrameDownloaded(const QByteArray& hash, const std::list<rational>& times) = 0;
|
||||
|
||||
virtual void AudioDownloaded(const TimeRange& range, SampleBufferPtr samples) = 0;
|
||||
|
||||
|
||||
@@ -102,8 +102,8 @@ void TaskManager::AddTask(Task* t)
|
||||
|
||||
void TaskManager::CancelTask(Task *t)
|
||||
{
|
||||
if (failed_tasks_.contains(t)) {
|
||||
failed_tasks_.removeOne(t);
|
||||
if (std::find(failed_tasks_.begin(), failed_tasks_.end(), t) != failed_tasks_.end()) {
|
||||
failed_tasks_.remove(t);
|
||||
emit TaskRemoved(t);
|
||||
t->deleteLater();
|
||||
} else {
|
||||
@@ -125,7 +125,7 @@ void TaskManager::TaskFinished()
|
||||
} else {
|
||||
// Task failed, keep it so the user can see the error message
|
||||
emit TaskFailed(t);
|
||||
failed_tasks_.append(t);
|
||||
failed_tasks_.push_back(t);
|
||||
}
|
||||
|
||||
watcher->deleteLater();
|
||||
|
||||
@@ -119,7 +119,7 @@ private:
|
||||
/**
|
||||
* @brief Internal list of failed tasks
|
||||
*/
|
||||
QLinkedList<Task*> failed_tasks_;
|
||||
std::list<Task*> failed_tasks_;
|
||||
|
||||
/**
|
||||
* @brief Task thread pool
|
||||
|
||||
Reference in New Issue
Block a user