diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-06-02 13:09:28 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-06-05 20:57:32 +0200 |
commit | 999c79863c574bdf3e1650a1b0901fdf83a9e0b4 (patch) | |
tree | 5b681c135637d00e8ea610db84ce71ce9f263142 /src/corelib/thread | |
parent | 458d49861f5ab04490014f7839be0dab30c8ac61 (diff) |
Remove QThreadPool::cancel()
Deprecated in 5.9
Change-Id: Ib6e2a5da1e7ee2664fb6fa496bdc880fab870901
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qrunnable.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthreadpool.cpp | 18 | ||||
-rw-r--r-- | src/corelib/thread/qthreadpool.h | 4 |
3 files changed, 0 insertions, 24 deletions
diff --git a/src/corelib/thread/qrunnable.h b/src/corelib/thread/qrunnable.h index 47ea00bdb0..9f8ab2a3d0 100644 --- a/src/corelib/thread/qrunnable.h +++ b/src/corelib/thread/qrunnable.h @@ -52,9 +52,7 @@ class Q_CORE_EXPORT QRunnable friend class QThreadPool; friend class QThreadPoolPrivate; friend class QThreadPoolThread; -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) Q_DISABLE_COPY(QRunnable) -#endif public: virtual void run() = 0; diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp index d2dcc32280..9657112abc 100644 --- a/src/corelib/thread/qthreadpool.cpp +++ b/src/corelib/thread/qthreadpool.cpp @@ -786,24 +786,6 @@ bool QThreadPool::contains(const QThread *thread) const return d->allThreads.contains(const_cast<QThreadPoolThread *>(poolThread)); } -#if QT_DEPRECATED_SINCE(5, 9) -/*! - \since 5.5 - \obsolete use tryTake() instead, but note the different deletion rules. - - Removes the specified \a runnable from the queue if it is not yet started. - The runnables for which \l{QRunnable::autoDelete()}{runnable->autoDelete()} - returns \c true are deleted. - - \sa start(), tryTake() -*/ -void QThreadPool::cancel(QRunnable *runnable) -{ - if (tryTake(runnable) && runnable->autoDelete() && !runnable->ref) // tryTake already deref'ed - delete runnable; -} -#endif - QT_END_NAMESPACE #include "moc_qthreadpool.cpp" diff --git a/src/corelib/thread/qthreadpool.h b/src/corelib/thread/qthreadpool.h index 004f76a240..0d143574cf 100644 --- a/src/corelib/thread/qthreadpool.h +++ b/src/corelib/thread/qthreadpool.h @@ -95,10 +95,6 @@ public: bool contains(const QThread *thread) const; -#if QT_DEPRECATED_SINCE(5, 9) - QT_DEPRECATED_X("use tryTake(), but note the different deletion rules") - void cancel(QRunnable *runnable); -#endif Q_REQUIRED_RESULT bool tryTake(QRunnable *runnable); }; |