diffstat for threadweaver-5.46.0 threadweaver-5.57.0 .gitignore | 21 ++ CMakeLists.txt | 17 + autotests/AppendCharacterAndVerifyJob.h | 2 autotests/AppendCharacterJob.h | 6 autotests/JobLoggingDecorator.h | 2 autotests/JobLoggingWeaver.h | 2 autotests/JobTests.cpp | 27 +- autotests/LifecycleTests.cpp | 2 autotests/QueueFactoryTests.cpp | 6 autotests/QueueTests.h | 6 autotests/WaitForIdleAndFinished.h | 4 benchmarks/QueueBenchmarks.cpp | 6 debian/changelog | 272 +++++++++++++++++++++++++++++ debian/control | 12 - debian/libkf5threadweaver-dev.acc.in | 3 debian/libkf5threadweaver5.symbols | 2 debian/tests/testsuite | 2 docs/whymultithreading.md | 6 examples/HelloInternet.in.md | 2 examples/HelloInternet/MainWidget.h | 2 examples/HelloWorldRaw/HelloWorldRaw.cpp | 2 examples/ThumbNailer/ComputeThumbNailJob.h | 4 examples/ThumbNailer/FileLoaderJob.h | 4 examples/ThumbNailer/ImageListFilter.h | 2 examples/ThumbNailer/ImageLoaderJob.h | 4 examples/ThumbNailer/ItemDelegate.h | 4 examples/ThumbNailer/MainWindow.h | 2 examples/ThumbNailer/Model.cpp | 2 examples/ThumbNailer/Model.h | 6 examples/ThumbNailer/PriorityDecorator.h | 4 src/collection.cpp | 6 src/collection.h | 10 - src/collection_p.cpp | 2 src/collection_p.h | 4 src/dependencypolicy.h | 10 - src/destructedstate.h | 38 ++-- src/executewrapper_p.h | 6 src/iddecorator.cpp | 2 src/iddecorator.h | 44 ++-- src/inconstructionstate.h | 8 src/job.h | 48 ++--- src/job_p.h | 8 src/lambda.h | 2 src/qobjectdecorator.h | 4 src/queue.h | 34 +-- src/queueapi.h | 2 src/queueing.h | 2 src/queueinterface.h | 4 src/queuepolicy.h | 2 src/queuesignals.h | 2 src/resourcerestrictionpolicy.h | 12 - src/sequence_p.h | 14 - src/shuttingdownstate.cpp | 2 src/shuttingdownstate.h | 12 - src/suspendedstate.h | 8 src/suspendingstate.h | 10 - src/thread.h | 4 src/threadweaver.h | 1 src/weaver.cpp | 2 src/weaver.h | 70 +++---- src/weaver_p.cpp | 2 src/weaverimplstate.h | 38 ++-- src/weaverinterface.h | 6 src/workinghardstate.h | 10 - 64 files changed, 583 insertions(+), 282 deletions(-) diff -Nru threadweaver-5.46.0/.gitignore threadweaver-5.57.0/.gitignore --- threadweaver-5.46.0/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ threadweaver-5.57.0/.gitignore 2019-04-07 07:22:12.000000000 +0000 @@ -0,0 +1,21 @@ +# Ignore the following files +*~ +*.[oa] +*.diff +*.kate-swp +*.kdev4 +.kdev_include_paths +*.kdevelop.pcs +*.moc +*.moc.cpp +*.orig +*.user +.*.swp +.swp.* +Doxyfile +Makefile +avail +random_seed +/build*/ +CMakeLists.txt.user* +*.unc-backup* diff -Nru threadweaver-5.46.0/CMakeLists.txt threadweaver-5.57.0/CMakeLists.txt --- threadweaver-5.46.0/CMakeLists.txt 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/CMakeLists.txt 2019-04-07 07:22:12.000000000 +0000 @@ -1,10 +1,10 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.46.0") # handled by release scripts +set(KF5_VERSION "5.57.0") # handled by release scripts project(ThreadWeaver VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.46.0 NO_MODULE) +find_package(ECM 5.57.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -16,7 +16,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) -set(REQUIRED_QT_VERSION 5.8.0) +set(REQUIRED_QT_VERSION 5.10.0) find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) @@ -34,10 +34,13 @@ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5ThreadWeaverConfigVersion.cmake" SOVERSION 5) # -- - +add_definitions(-DQT_NO_FOREACH) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) add_subdirectory(src) -add_subdirectory(autotests) -add_subdirectory(benchmarks) +if (BUILD_TESTING) + add_subdirectory(autotests) + add_subdirectory(benchmarks) +endif() add_subdirectory(examples) # create a Config.cmake and a ConfigVersion.cmake file and install them diff -Nru threadweaver-5.46.0/autotests/AppendCharacterAndVerifyJob.h threadweaver-5.57.0/autotests/AppendCharacterAndVerifyJob.h --- threadweaver-5.46.0/autotests/AppendCharacterAndVerifyJob.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/AppendCharacterAndVerifyJob.h 2019-04-07 07:22:12.000000000 +0000 @@ -35,7 +35,7 @@ public: AppendCharacterAndVerifyJob(); void setValues(QChar character, QString *stringref, const QString &expected); - void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) Q_DECL_OVERRIDE; + void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) override; private: QString m_expected; diff -Nru threadweaver-5.46.0/autotests/AppendCharacterJob.h threadweaver-5.57.0/autotests/AppendCharacterJob.h --- threadweaver-5.46.0/autotests/AppendCharacterJob.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/AppendCharacterJob.h 2019-04-07 07:22:12.000000000 +0000 @@ -54,7 +54,7 @@ m_stringref = stringref; } - void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) Q_DECL_OVERRIDE + void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) override { QMutexLocker locker(&s_GlobalMutex); m_stringref->append(m_c); @@ -87,7 +87,7 @@ { } - void run(ThreadWeaver::JobPointer job, ThreadWeaver::Thread* thread) Q_DECL_OVERRIDE + void run(ThreadWeaver::JobPointer job, ThreadWeaver::Thread* thread) override { AppendCharacterJob::run(job, thread); setStatus(Job::Status_Failed); @@ -110,7 +110,7 @@ TWDEBUG(3, "~BusyJob\n"); } - void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) Q_DECL_OVERRIDE + void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) override { using namespace ThreadWeaver; TWDEBUG(3, "BusyJob: entered run()\n"); diff -Nru threadweaver-5.46.0/autotests/JobLoggingDecorator.h threadweaver-5.57.0/autotests/JobLoggingDecorator.h --- threadweaver-5.46.0/autotests/JobLoggingDecorator.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/JobLoggingDecorator.h 2019-04-07 07:22:12.000000000 +0000 @@ -49,7 +49,7 @@ }; explicit JobLoggingDecorator(const ThreadWeaver::JobPointer &job, JobLoggingDecoratorCollector* collector); - void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; + void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override; private: JobData data_; JobLoggingDecoratorCollector* collector_; diff -Nru threadweaver-5.46.0/autotests/JobLoggingWeaver.h threadweaver-5.57.0/autotests/JobLoggingWeaver.h --- threadweaver-5.46.0/autotests/JobLoggingWeaver.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/JobLoggingWeaver.h 2019-04-07 07:22:12.000000000 +0000 @@ -37,7 +37,7 @@ Q_OBJECT public: explicit JobLoggingWeaver(QObject* parent = nullptr); - void enqueue(const QVector &jobs) Q_DECL_OVERRIDE; + void enqueue(const QVector &jobs) override; private: JobLoggingDecoratorCollector collector_; diff -Nru threadweaver-5.46.0/autotests/JobTests.cpp threadweaver-5.57.0/autotests/JobTests.cpp --- threadweaver-5.46.0/autotests/JobTests.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/JobTests.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -176,7 +176,7 @@ class GeneratingCollection : public Collection { public: - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { std::for_each(SequenceTemplate.cbegin(), SequenceTemplate.cend(), [this](QChar it) { *this << new AppendCharacterJob(it, &sequence_); } ); @@ -187,7 +187,7 @@ class GeneratingSequence : public Sequence { public: - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { std::for_each(SequenceTemplate.cbegin(), SequenceTemplate.cend(), [this](QChar it) { *this << new AppendCharacterJob(it, &sequence_); } ); @@ -800,7 +800,8 @@ AppendCharacterJob g('g', &sequence); Collection collection; collection << a << b << c << d << e << f << g; - Q_FOREACH(AppendCharacterJob* job, QList() << &a << &b << &c << &d << &e << &f << &g) { + const QList lstJob = { &a, &b, &c, &d, &e, &f, &g }; + for (AppendCharacterJob* job : lstJob) { QMutexLocker l(job->mutex()); job->assignQueuePolicy(&restriction); } @@ -954,7 +955,7 @@ struct InstanceCountedJob : public Job { static QAtomicInt counter; - void run(JobPointer, Thread *) Q_DECL_OVERRIDE + void run(JobPointer, Thread *) override { } @@ -974,7 +975,7 @@ /** @brief Verify that neither the queue nor the thread keep a reference to the job after completing it. * * This is necessary because user-allocated objects like queue policies may be registered with the jobs. If the jobs stick around - * until the thread or queue are deleted, the user-allocatd objects may have gone out of scope or been deleted already, causing + * until the thread or queue are deleted, the user-allocated objects may have gone out of scope or been deleted already, causing * potential errors. From ThreadWeaver's point of view, a job seizes to exist once the processing thread asks for the next job. */ void JobTests::JobsAreDestroyedAfterFinishTest() { @@ -1000,7 +1001,7 @@ using namespace ThreadWeaver; struct FailingJob : public Job { - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { throw JobFailed(); } }; @@ -1010,7 +1011,7 @@ QCOMPARE(failing.status(), Job::Status_Failed); struct AbortingJob : public Job { - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { throw JobAborted(); } }; @@ -1020,7 +1021,7 @@ QCOMPARE(aborting.status(), Job::Status_Aborted); struct SuccessfulJob : public Job { - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { // do nothing } }; @@ -1034,7 +1035,7 @@ using namespace ThreadWeaver; struct FailingJob : public Job { - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { setStatus(Job::Status_Failed); } }; @@ -1044,7 +1045,7 @@ QCOMPARE(failing.status(), Job::Status_Failed); struct AbortingJob : public Job { - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { setStatus(Job::Status_Aborted); } }; @@ -1054,7 +1055,7 @@ QCOMPARE(aborting.status(), Job::Status_Aborted); struct SuccessfulJob : public Job { - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { // do nothing } }; @@ -1110,7 +1111,7 @@ : start_(start), count_(count), numbers_(numbers) {} - void run(JobPointer, Thread*) Q_DECL_OVERRIDE { + void run(JobPointer, Thread*) override { numbers_->append(start_); for(int index = start_ + 1; index < start_+count_; ++index) { *this << new GeneratingEnumeratorSequence(numbers_, index, 1); @@ -1129,7 +1130,7 @@ : start_(start), count_(count), numbers_(numbers) {} - void run(JobPointer, Thread*) Q_DECL_OVERRIDE { + void run(JobPointer, Thread*) override { numbers_->append(start_); QVector elements; for(int index = start_ + 1; index < start_+count_; ++index) { diff -Nru threadweaver-5.46.0/autotests/LifecycleTests.cpp threadweaver-5.57.0/autotests/LifecycleTests.cpp --- threadweaver-5.46.0/autotests/LifecycleTests.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/LifecycleTests.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -46,7 +46,7 @@ m_exists = false; } - void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) Q_DECL_OVERRIDE {} + void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) override {} private: bool &m_exists; diff -Nru threadweaver-5.46.0/autotests/QueueFactoryTests.cpp threadweaver-5.57.0/autotests/QueueFactoryTests.cpp --- threadweaver-5.46.0/autotests/QueueFactoryTests.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/QueueFactoryTests.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -44,7 +44,7 @@ , original_(job) {} - void run(JobPointer self, Thread *thread) Q_DECL_OVERRIDE { + void run(JobPointer self, Thread *thread) override { counter.fetchAndAddRelease(1); IdDecorator::run(self, thread); counter.fetchAndAddAcquire(1); @@ -58,7 +58,7 @@ Q_OBJECT public: explicit JobCountingWeaver(QObject *parent = nullptr) : Weaver(parent) {} - void enqueue(const QVector &jobs) Q_DECL_OVERRIDE { + void enqueue(const QVector &jobs) override { QVector decorated; std::transform(jobs.begin(), jobs.end(), std::back_inserter(decorated), [](const JobPointer & job) @@ -71,7 +71,7 @@ class CountingGlobalQueueFactory : public Queue::GlobalQueueFactory { - Queue *create(QObject *parent = nullptr) Q_DECL_OVERRIDE { + Queue *create(QObject *parent = nullptr) override { return new Queue(new JobCountingWeaver, parent); } }; diff -Nru threadweaver-5.46.0/autotests/QueueTests.h threadweaver-5.57.0/autotests/QueueTests.h --- threadweaver-5.46.0/autotests/QueueTests.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/QueueTests.h 2019-04-07 07:22:12.000000000 +0000 @@ -37,7 +37,7 @@ public: LowPriorityAppendCharacterJob(QChar character = QChar(), QString *stringref = nullptr); - int priority() const Q_DECL_OVERRIDE; + int priority() const override; }; class HighPriorityAppendCharacterJob : public AppendCharacterJob @@ -45,7 +45,7 @@ public: HighPriorityAppendCharacterJob(QChar character = QChar(), QString *stringref = nullptr); - int priority() const Q_DECL_OVERRIDE; + int priority() const override; }; namespace ThreadWeaver @@ -65,7 +65,7 @@ SecondThreadThatQueues(); protected: - void run() Q_DECL_OVERRIDE; + void run() override; }; class QueueTests : public QObject diff -Nru threadweaver-5.46.0/autotests/WaitForIdleAndFinished.h threadweaver-5.57.0/autotests/WaitForIdleAndFinished.h --- threadweaver-5.46.0/autotests/WaitForIdleAndFinished.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/autotests/WaitForIdleAndFinished.h 2019-04-07 07:22:12.000000000 +0000 @@ -40,11 +40,13 @@ public: explicit WaitForIdleAndFinished(ThreadWeaver::Queue *weaver); ~WaitForIdleAndFinished(); + WaitForIdleAndFinished(const WaitForIdleAndFinished &) = delete; + WaitForIdleAndFinished &operator=(const WaitForIdleAndFinished &) = delete; private: ThreadWeaver::Queue *weaver_; }; -/** @brief Create a WaitForIdleAndFinished, and supress the IDE unused warning. */ +/** @brief Create a WaitForIdleAndFinished, and suppress the IDE unused warning. */ #define WAITFORIDLEANDFINISHED(queue) const WaitForIdleAndFinished waitForIdleAndFinished##__LINE__(queue);\ Q_UNUSED(waitForIdleAndFinished##__LINE__); diff -Nru threadweaver-5.46.0/benchmarks/QueueBenchmarks.cpp threadweaver-5.57.0/benchmarks/QueueBenchmarks.cpp --- threadweaver-5.46.0/benchmarks/QueueBenchmarks.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/benchmarks/QueueBenchmarks.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -72,7 +72,7 @@ } protected: - void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) Q_DECL_OVERRIDE + void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *) override { payload(); } @@ -294,8 +294,8 @@ const QList threads = singleThreaded ? QList() << 1 : QList() << 1 << 2 << 4 << 8 << 16 << 32 << 64 << 128; const QList ms = QList() << 1 << 10 << 100 << 1000 << 10000 << 100000; - Q_FOREACH (int m, ms) { - Q_FOREACH (int t, threads) { + for (int m : ms) { + for (int t : threads) { const QString name = QString::fromLatin1("%1 threads, %2 values").arg(t).arg(m); // newRow expects const char*, but then qstrdup's it in the QTestData constructor. Eeeew. QTest::newRow(qPrintable(name)) << m << 256 << 256 << t; diff -Nru threadweaver-5.46.0/debian/changelog threadweaver-5.57.0/debian/changelog --- threadweaver-5.46.0/debian/changelog 2018-05-17 20:16:00.000000000 +0000 +++ threadweaver-5.57.0/debian/changelog 2019-04-22 07:41:36.000000000 +0000 @@ -1,3 +1,70 @@ +threadweaver (5.57.0-0ubuntu1) eoan; urgency=medium + + * New upstream release (5.57.0) + + -- Rik Mills Mon, 22 Apr 2019 08:41:36 +0100 + +threadweaver (5.56.0-0ubuntu1) disco; urgency=medium + + * New upstream release (5.56.0) + + -- José Manuel Santamaría Lema Sat, 09 Mar 2019 16:39:13 +0000 + +threadweaver (5.55.0-0ubuntu1) disco; urgency=medium + + * New upstream release (5.55.0) + + -- Rik Mills Wed, 13 Feb 2019 08:34:42 +0000 + +threadweaver (5.54.0-0ubuntu1) disco; urgency=medium + + * New upstream release (5.54.0) + + -- Rik Mills Sun, 13 Jan 2019 12:37:45 +0000 + +threadweaver (5.53.0-0ubuntu1) disco; urgency=medium + + * New upstream release (5.53.0) + + -- José Manuel Santamaría Lema Sun, 09 Dec 2018 20:51:17 +0000 + +threadweaver (5.52.0-0ubuntu1) disco; urgency=medium + + [ Rik Mills ] + * New upstream release (5.51.0) + + [ José Manuel Santamaría Lema ] + * New upstream release (5.52.0) + + -- José Manuel Santamaría Lema Thu, 22 Nov 2018 14:44:39 +0000 + +threadweaver (5.50.0-0ubuntu1) cosmic; urgency=medium + + * New upstream release (5.50.0) + + -- Rik Mills Mon, 10 Sep 2018 22:20:27 +0100 + +threadweaver (5.49.0-0ubuntu1) cosmic; urgency=medium + + [ Rik Mills ] + * New upstream release (5.48.0) + * New upstream release (5.49.0) + + [ José Manuel Santamaría Lema ] + * Move away from dhmk and set compat level to 11 in order to reduce + delta with Debian + + -- Rik Mills Tue, 21 Aug 2018 20:32:46 +0100 + +threadweaver (5.47.0-0ubuntu1) cosmic; urgency=medium + + * New upstream release (5.47.0) + * Merge with debian, notes: + - keep using dhmk and debhelper compat level = 9, see: + https://phabricator.kde.org/w/kubuntu/black-operations/pyramid/ + + -- Rik Mills Thu, 14 Jun 2018 15:52:16 +0100 + threadweaver (5.46.0-1) unstable; urgency=medium * New upstream release (5.46.0). @@ -9,6 +76,13 @@ -- Maximiliano Curia Thu, 17 May 2018 22:16:00 +0200 +threadweaver (5.46.0-0ubuntu1) cosmic; urgency=medium + + * New upstream release (5.45.0) + * New upstream release (5.46.0) + + -- Rik Mills Tue, 15 May 2018 15:59:16 +0100 + threadweaver (5.45.0-1) unstable; urgency=medium * New upstream release (5.45.0). @@ -27,6 +101,12 @@ -- Maximiliano Curia Wed, 21 Mar 2018 14:41:37 +0100 +threadweaver (5.44.0-0ubuntu1) bionic; urgency=medium + + * New upstream release (5.44.0) + + -- Rik Mills Mon, 12 Mar 2018 20:00:48 +0000 + threadweaver (5.43.0-1) experimental; urgency=medium * Use the salsa canonical urls @@ -37,6 +117,19 @@ -- Maximiliano Curia Mon, 26 Feb 2018 11:44:28 +0100 +threadweaver (5.43.0-0ubuntu2) bionic; urgency=medium + + * Don't fail testsuite on arm64. Was previously an always-failed, and still + does in all but a very occasional case. + + -- Rik Mills Tue, 13 Feb 2018 10:14:36 +0000 + +threadweaver (5.43.0-0ubuntu1) bionic; urgency=medium + + * New upstream release (5.43.0) + + -- Rik Mills Sun, 11 Feb 2018 11:18:11 +0000 + threadweaver (5.42.0-2) sid; urgency=medium * New revision @@ -57,6 +150,12 @@ -- Maximiliano Curia Fri, 02 Feb 2018 12:06:22 +0100 +threadweaver (5.42.0-0ubuntu1) bionic; urgency=medium + + * New upstream release (5.42.0) + + -- Rik Mills Fri, 26 Jan 2018 22:24:41 +0000 + threadweaver (5.41.0-1) experimental; urgency=medium [ Maximiliano Curia ] @@ -71,6 +170,27 @@ -- Maximiliano Curia Fri, 15 Dec 2017 10:43:29 -0300 +threadweaver (5.41.0-0ubuntu1) bionic; urgency=low + + * New upstream release (5.41.0) + + -- Walter Lapchynski Sun, 10 Dec 2017 22:10:25 -0600 + +threadweaver (5.40.0-0ubuntu1) bionic; urgency=medium + + * New upstream release (5.39.0) + * New upstream release (5.40.0) + + -- Rik Mills Fri, 24 Nov 2017 17:19:14 +0000 + +threadweaver (5.38.0-0ubuntu1) artful; urgency=medium + + * Update sybmols from build logs. Remove private symbols now upstream + changes ensure these are no longer leaked + * New upstream release (5.38.0) + + -- Rik Mills Mon, 11 Sep 2017 13:18:37 +0100 + threadweaver (5.37.0-2) sid; urgency=medium * New revision @@ -95,6 +215,13 @@ -- Maximiliano Curia Wed, 16 Aug 2017 10:42:37 +0200 +threadweaver (5.37.0-0ubuntu1) artful; urgency=medium + + * New upstream release (5.37.0) + * Update symbols from build logs + + -- Rik Mills Sat, 12 Aug 2017 18:46:48 +0100 + threadweaver (5.36.0-1) experimental; urgency=medium [ Maximiliano Curia ] @@ -116,6 +243,44 @@ -- Maximiliano Curia Sun, 09 Jul 2017 23:41:38 +0200 +threadweaver (5.36.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.36.0) + + -- José Manuel Santamaría Lema Tue, 11 Jul 2017 23:51:50 +0100 + +threadweaver (5.35.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.35.0) + + -- José Manuel Santamaría Lema Mon, 12 Jun 2017 22:56:44 +0100 + +threadweaver (5.34.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.34.0) + + -- José Manuel Santamaría Lema Mon, 15 May 2017 21:24:36 +0100 + +threadweaver (5.33.0-0ubuntu1) artful; urgency=low + + * New upstream release (5.33.0) + + -- José Manuel Santamaría Lema Sat, 29 Apr 2017 18:03:33 +0100 + +threadweaver (5.31.0-0ubuntu1) zesty; urgency=medium + + * Pass '-fno-keep-inline-functions' to gcc in the acc test in order to + avoid possible spurious test failures. + * New upstream release (5.31.0) + + -- José Manuel Santamaría Lema Tue, 14 Feb 2017 22:50:01 +0000 + +threadweaver (5.30.0-0ubuntu1) zesty; urgency=low + + * New upstream release (5.30.0) + + -- Rik Mills Wed, 01 Feb 2017 18:33:38 +0000 + threadweaver (5.28.0-1) unstable; urgency=medium [ Automatic packaging ] @@ -127,6 +292,20 @@ -- Maximiliano Curia Fri, 18 Nov 2016 16:03:23 +0100 +threadweaver (5.28.0-0ubuntu1) zesty; urgency=low + + [ Rik Mills ] + * New upstream release (5.27.0) + + [ José Manuel Santamaría Lema ] + * Update Vcs-Git field to use https:// instead of git:// + * New upstream release (5.28.0) + + [ Simon Quigley ] + * Merge from Debian + + -- José Manuel Santamaría Lema Mon, 05 Dec 2016 20:15:30 +0000 + threadweaver (5.27.0-1) unstable; urgency=medium [ Automatic packaging ] @@ -148,6 +327,12 @@ -- Maximiliano Curia Thu, 29 Sep 2016 11:58:38 +0200 +threadweaver (5.26.0-0ubuntu1) yakkety; urgency=low + + * New upstream release (5.26.0) + + -- Rik Mills Thu, 22 Sep 2016 13:54:02 +0100 + threadweaver (5.25.0-1) unstable; urgency=medium [ Automatic packaging ] @@ -158,6 +343,12 @@ -- Maximiliano Curia Thu, 18 Aug 2016 17:18:59 +0200 +threadweaver (5.24.0-0ubuntu1) yakkety; urgency=medium + + * New upstream release (5.24.0) + + -- Philip Muškovac Tue, 26 Jul 2016 08:52:36 +0000 + threadweaver (5.23.0-1) unstable; urgency=medium [ Automatic packaging ] @@ -165,6 +356,12 @@ -- Maximiliano Curia Sat, 18 Jun 2016 08:35:09 +0200 +threadweaver (5.23.0-0ubuntu1) yakkety; urgency=medium + + * New upstream release (5.23.0) + + -- Clive Johnston Mon, 11 Jul 2016 22:25:44 +0200 + threadweaver (5.22.0-1) unstable; urgency=medium [ Automatic packaging ] @@ -172,6 +369,21 @@ -- Maximiliano Curia Wed, 18 May 2016 16:33:39 +0200 +threadweaver (5.22.0-0ubuntu1) yakkety; urgency=medium + + [ Scarlett Clark ] + * New upstream release. + * Debian merge: No remaining changes. + + [ Philip Muškovac ] + * Update the Vcs URLs now that the repositories are hosted on + Launchpad + + [ Clive Johnston ] + * New upstream release + + -- Clive Johnston Tue, 17 May 2016 17:04:11 -0700 + threadweaver (5.21.0-1) experimental; urgency=medium [ Maximiliano Curia ] @@ -200,6 +412,17 @@ -- Maximiliano Curia Wed, 27 Jan 2016 13:34:28 +0100 +threadweaver (5.18.0-0ubuntu1) xenial; urgency=medium + + [ Scarlett Clark ] + * Debian Merge: No remaining changes. + * New upstream release Xenial + + [ Philip Muškovac ] + * New upstream release + + -- Philip Muškovac Wed, 06 Jan 2016 15:13:28 +0100 + threadweaver (5.16.0-1) unstable; urgency=medium * New upstream release (5.16.0). @@ -213,6 +436,22 @@ -- Maximiliano Curia Fri, 09 Oct 2015 19:16:45 +0200 +threadweaver (5.15.0-0ubuntu2) xenial; urgency=medium + + * Fix autopackagetests by adding allow-stderr to the requirements. + + -- Philip Muškovac Tue, 03 Nov 2015 15:34:57 +0100 + +threadweaver (5.15.0-0ubuntu1) wily; urgency=medium + + [ Scarlett Clark ] + * Vivid backport + + [ Jonathan Riddell ] + * new upstream release + + -- Jonathan Riddell Wed, 07 Oct 2015 14:01:13 +0100 + threadweaver (5.14.0-2) unstable; urgency=medium * Move auto test to autopkgtests. @@ -225,6 +464,12 @@ -- Maximiliano Curia Tue, 15 Sep 2015 13:49:49 +0200 +threadweaver (5.14.0-0ubuntu1) wily; urgency=medium + + * new upstream release + + -- Clive Johnston Thu, 17 Sep 2015 13:30:08 +0100 + threadweaver (5.13.0-1) unstable; urgency=medium * New upstream release (5.13.0). @@ -232,6 +477,12 @@ -- Maximiliano Curia Thu, 13 Aug 2015 11:41:22 +0200 +threadweaver (5.13.0-0ubuntu1) wily; urgency=medium + + * new upstream release + + -- Jonathan Riddell Mon, 10 Aug 2015 13:37:32 +0200 + threadweaver (5.12.0-1) unstable; urgency=medium * New upstream release (5.12.0). @@ -240,13 +491,34 @@ -- Maximiliano Curia Thu, 09 Jul 2015 12:44:02 +0200 +threadweaver (5.12.0-0ubuntu1) wily; urgency=medium + + [ Scarlett Clark ] + * New upstream release + + [ José Manuel Santamaría Lema ] + * Update symbols files; mark missing symbols for GCC 5 as optional. + + [ Scarlett Clark ] + * Vivid backport. + + -- Scarlett Clark Mon, 03 Aug 2015 16:13:03 +0200 + threadweaver (5.11.0-1) unstable; urgency=medium + [ Maximiliano Curia ] * New upstream release (5.10.0). * New upstream release (5.11.0). -- Maximiliano Curia Fri, 26 Jun 2015 14:11:58 +0200 +threadweaver (5.10.0-0ubuntu1) wily; urgency=medium + + [ Jonathan Riddell ] + * New upstream release + + -- Jonathan Riddell Wed, 03 Jun 2015 21:05:15 +0200 + threadweaver (5.9.0-1) experimental; urgency=medium * New upstream release (5.9.0). diff -Nru threadweaver-5.46.0/debian/control threadweaver-5.57.0/debian/control --- threadweaver-5.46.0/debian/control 2018-05-17 20:16:00.000000000 +0000 +++ threadweaver-5.57.0/debian/control 2019-04-22 07:41:36.000000000 +0000 @@ -6,7 +6,7 @@ Build-Depends: cmake (>= 3.0~), debhelper (>= 11~), doxygen, - extra-cmake-modules (>= 5.46.0~), + extra-cmake-modules (>= 5.57.0~), graphviz, libqt5sql5-sqlite:native, pkg-kde-tools (>= 0.15.15ubuntu1~), @@ -14,16 +14,15 @@ qttools5-dev-tools, Standards-Version: 4.1.4 Homepage: https://projects.kde.org/projects/frameworks/threadweaver -Vcs-Browser: https://salsa.debian.org/qt-kde-team/kde/threadweaver -Vcs-Git: https://salsa.debian.org/qt-kde-team/kde/threadweaver.git +Vcs-Browser: https://code.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/threadweaver +Vcs-Git: https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/threadweaver Package: libkf5threadweaver-dev -Section: libdevel Architecture: any +Section: libdevel Depends: libkf5threadweaver5 (= ${binary:Version}), qtbase5-dev (>= 5.8.0~), ${misc:Depends}, -Breaks: libkf5kdelibs4support-dev (<< 5.46) Recommends: libkf5threadweaver-doc (= ${source:Version}) Description: ThreadWeaver library to help multithreaded programming in Qt ThreadWeaver is a helper for multithreaded programming. It uses a job-based @@ -39,6 +38,7 @@ Package: libkf5threadweaver-doc Architecture: all Multi-Arch: foreign +Section: doc Depends: ${misc:Depends}, ${shlibs:Depends} Description: ThreadWeaver library to help multithreaded programming in Qt ThreadWeaver is a helper for multithreaded programming. It uses a job-based @@ -50,13 +50,11 @@ This package is part of KDE Frameworks 5. . This package contains the qch documentation files. -Section: doc Package: libkf5threadweaver5 Architecture: any Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends} -Breaks: libkf5runner5 (<< 5.46) Description: ThreadWeaver library to help multithreaded programming in Qt ThreadWeaver is a helper for multithreaded programming. It uses a job-based interface to queue tasks and execute them in an efficient way. You simply diff -Nru threadweaver-5.46.0/debian/libkf5threadweaver-dev.acc.in threadweaver-5.57.0/debian/libkf5threadweaver-dev.acc.in --- threadweaver-5.46.0/debian/libkf5threadweaver-dev.acc.in 2018-05-17 20:16:00.000000000 +0000 +++ threadweaver-5.57.0/debian/libkf5threadweaver-dev.acc.in 2019-04-22 07:41:36.000000000 +0000 @@ -1,4 +1,4 @@ - + @@ -15,6 +15,7 @@ -fPIC + -fno-keep-inline-functions -std=c++11 diff -Nru threadweaver-5.46.0/debian/libkf5threadweaver5.symbols threadweaver-5.57.0/debian/libkf5threadweaver5.symbols --- threadweaver-5.46.0/debian/libkf5threadweaver5.symbols 2018-05-17 20:16:00.000000000 +0000 +++ threadweaver-5.57.0/debian/libkf5threadweaver5.symbols 2019-04-22 07:41:36.000000000 +0000 @@ -1,4 +1,4 @@ -# SymbolsHelper-Confirmed: 5.41.0 amd64 +# SymbolsHelper-Confirmed: 5.37.0+git20170815 amd64 libKF5ThreadWeaver.so.5 libkf5threadweaver5 #MINVER# _ZN12ThreadWeaver10Collection1dEv@Base 4.98.0 _ZN12ThreadWeaver10Collection22aboutToBeQueued_lockedEPNS_8QueueAPIE@Base 4.96.0 diff -Nru threadweaver-5.46.0/debian/tests/testsuite threadweaver-5.57.0/debian/tests/testsuite --- threadweaver-5.46.0/debian/tests/testsuite 2018-05-17 20:16:00.000000000 +0000 +++ threadweaver-5.57.0/debian/tests/testsuite 2019-04-22 07:41:36.000000000 +0000 @@ -1,3 +1,5 @@ #!/bin/sh +dpkg-architecture -e arm64 && exit 0 + dh_auto_test diff -Nru threadweaver-5.46.0/docs/whymultithreading.md threadweaver-5.57.0/docs/whymultithreading.md --- threadweaver-5.46.0/docs/whymultithreading.md 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/docs/whymultithreading.md 2019-04-07 07:22:12.000000000 +0000 @@ -18,7 +18,7 @@ that is much limited if the application is executing processing power expensive, lengthy operations. This leads, for example, to delayed or sluggish processing of necessary paint events. Even if this does not influence the total time necessary to perform the operation the -user requested, is is annoying and not state of the art. +user requested, it is annoying and not state of the art. There are different approaches to solve this issue. The crudest one may be to process single or multiple events while performing a lengthy @@ -35,7 +35,7 @@ are hard to assess, and especially hard to test in laboratory environments where networks are fast and reliable and the system I/O load is generally low. Network operations may fail. Hard disks may be -suspended. The I/O subsystem may be so busy that transfering 2 kByte may +suspended. The I/O subsystem may be so busy that transferring 2 kByte may take a couple of seconds. Processing events in objects that are executed in other threads is @@ -91,5 +91,5 @@ In general, ThreadWeaver tries to make the task of creating multithreaded, performant applications as simple as possible. Programmers should be relieved of synchronization, execution -dependendancy and load balancing issues as much as possible. The API +dependency and load balancing issues as much as possible. The API tends to be clean, extensible and easy to understand. diff -Nru threadweaver-5.46.0/examples/HelloInternet/MainWidget.h threadweaver-5.57.0/examples/HelloInternet/MainWidget.h --- threadweaver-5.46.0/examples/HelloInternet/MainWidget.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/HelloInternet/MainWidget.h 2019-04-07 07:22:12.000000000 +0000 @@ -14,7 +14,7 @@ ~MainWidget(); protected: - void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *) override; public Q_SLOTS: void setImage(QImage image); diff -Nru threadweaver-5.46.0/examples/HelloInternet.in.md threadweaver-5.57.0/examples/HelloInternet.in.md --- threadweaver-5.46.0/examples/HelloInternet.in.md 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/HelloInternet.in.md 2019-04-07 07:22:12.000000000 +0000 @@ -97,7 +97,7 @@ The method is called from the worker thread that executes the job, not the main thread. When the signal is emitted, Qt notices that sender and receiver are not in the same thread at the time, and sends the signal -asynchroneously. The receiver will not be called from the thread +asynchronously. The receiver will not be called from the thread executing `loadPlaceholderFromResource()`, instead it will be invoked from the event loop of the main thread. That means there is no shared data between the controller and the main widget for processing the diff -Nru threadweaver-5.46.0/examples/HelloWorldRaw/HelloWorldRaw.cpp threadweaver-5.57.0/examples/HelloWorldRaw/HelloWorldRaw.cpp --- threadweaver-5.46.0/examples/HelloWorldRaw/HelloWorldRaw.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/HelloWorldRaw/HelloWorldRaw.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -34,7 +34,7 @@ public: QDebugJob(const char* message = nullptr) : m_message(message) {} protected: - void run(JobPointer, Thread*) Q_DECL_OVERRIDE { + void run(JobPointer, Thread*) override { qDebug() << m_message; } private: diff -Nru threadweaver-5.46.0/examples/ThumbNailer/ComputeThumbNailJob.h threadweaver-5.57.0/examples/ThumbNailer/ComputeThumbNailJob.h --- threadweaver-5.46.0/examples/ThumbNailer/ComputeThumbNailJob.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/ComputeThumbNailJob.h 2019-04-07 07:22:12.000000000 +0000 @@ -39,8 +39,8 @@ { public: ComputeThumbNailJob(Image* image, ThreadWeaver::ResourceRestrictionPolicy* throttle); - int priority() const Q_DECL_OVERRIDE; - void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; + int priority() const override; + void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override; private: Image* m_image; diff -Nru threadweaver-5.46.0/examples/ThumbNailer/FileLoaderJob.h threadweaver-5.57.0/examples/ThumbNailer/FileLoaderJob.h --- threadweaver-5.46.0/examples/ThumbNailer/FileLoaderJob.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/FileLoaderJob.h 2019-04-07 07:22:12.000000000 +0000 @@ -39,8 +39,8 @@ { public: explicit FileLoaderJob(Image* image, ThreadWeaver::ResourceRestrictionPolicy* throttle); - int priority() const Q_DECL_OVERRIDE; - void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; + int priority() const override; + void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override; private: Image* m_image; diff -Nru threadweaver-5.46.0/examples/ThumbNailer/ImageListFilter.h threadweaver-5.57.0/examples/ThumbNailer/ImageListFilter.h --- threadweaver-5.46.0/examples/ThumbNailer/ImageListFilter.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/ImageListFilter.h 2019-04-07 07:22:12.000000000 +0000 @@ -34,7 +34,7 @@ Q_OBJECT public: explicit ImageListFilter(Image::Steps step, QObject* parent = nullptr); - bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const Q_DECL_OVERRIDE; + bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const override; private: Image::Steps m_step; }; diff -Nru threadweaver-5.46.0/examples/ThumbNailer/ImageLoaderJob.h threadweaver-5.57.0/examples/ThumbNailer/ImageLoaderJob.h --- threadweaver-5.46.0/examples/ThumbNailer/ImageLoaderJob.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/ImageLoaderJob.h 2019-04-07 07:22:12.000000000 +0000 @@ -39,8 +39,8 @@ { public: explicit ImageLoaderJob(Image* image, ThreadWeaver::ResourceRestrictionPolicy* throttle); - int priority() const Q_DECL_OVERRIDE; - void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; + int priority() const override; + void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override; private: Image* m_image; diff -Nru threadweaver-5.46.0/examples/ThumbNailer/ItemDelegate.h threadweaver-5.57.0/examples/ThumbNailer/ItemDelegate.h --- threadweaver-5.46.0/examples/ThumbNailer/ItemDelegate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/ItemDelegate.h 2019-04-07 07:22:12.000000000 +0000 @@ -29,8 +29,8 @@ static const int TextMargin; static const int Margin; private: - QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex& index) const Q_DECL_OVERRIDE; - void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE; + QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex& index) const override; + void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const override; }; #endif // SMIVITEMDELEGATE diff -Nru threadweaver-5.46.0/examples/ThumbNailer/MainWindow.h threadweaver-5.57.0/examples/ThumbNailer/MainWindow.h --- threadweaver-5.46.0/examples/ThumbNailer/MainWindow.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/MainWindow.h 2019-04-07 07:22:12.000000000 +0000 @@ -48,7 +48,7 @@ ~MainWindow(); protected: - void closeEvent(QCloseEvent*) Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent*) override; public Q_SLOTS: void slotProgress(int step, int total); diff -Nru threadweaver-5.46.0/examples/ThumbNailer/Model.cpp threadweaver-5.57.0/examples/ThumbNailer/Model.cpp --- threadweaver-5.46.0/examples/ThumbNailer/Model.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/Model.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -158,7 +158,7 @@ queue.flush(); Queue::instance()->finish(); // figure out result: - foreach (const Image& image, m_images) { + for (const Image& image : qAsConst(m_images)) { if (image.progress().first != Image::Step_NumberOfSteps) return false; } return true; diff -Nru threadweaver-5.46.0/examples/ThumbNailer/Model.h threadweaver-5.57.0/examples/ThumbNailer/Model.h --- threadweaver-5.46.0/examples/ThumbNailer/Model.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/Model.h 2019-04-07 07:22:12.000000000 +0000 @@ -70,9 +70,9 @@ void progressChanged(); void elementChanged(int id); - int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; - QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; Q_SIGNALS: void completed(); diff -Nru threadweaver-5.46.0/examples/ThumbNailer/PriorityDecorator.h threadweaver-5.57.0/examples/ThumbNailer/PriorityDecorator.h --- threadweaver-5.46.0/examples/ThumbNailer/PriorityDecorator.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/examples/ThumbNailer/PriorityDecorator.h 2019-04-07 07:22:12.000000000 +0000 @@ -34,9 +34,9 @@ explicit PriorityDecorator(int priority, ThreadWeaver::JobInterface* job, bool autoDelete = true); //FIXME temp - void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; + void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override; - int priority() const Q_DECL_OVERRIDE; + int priority() const override; private: int m_priority; diff -Nru threadweaver-5.46.0/src/collection.cpp threadweaver-5.57.0/src/collection.cpp --- threadweaver-5.46.0/src/collection.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/collection.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -54,7 +54,7 @@ collection = collection_; } - void begin(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE { + void begin(const JobPointer& job, Thread *thread) override { TWDEBUG(4, "CollectionExecuteWrapper::begin: collection %p\n", collection); ExecuteWrapper::begin(job, thread); Q_ASSERT(collection); @@ -62,14 +62,14 @@ ExecuteWrapper::begin(job, thread); } - void end(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE { + void end(const JobPointer& job, Thread *thread) override { TWDEBUG(4, "CollectionExecuteWrapper::end: collection %p\n", collection); Q_ASSERT(collection); ExecuteWrapper::end(job, thread); collection->d()->elementFinished(collection, job, thread); } - void cleanup(const JobPointer& job, Thread *) Q_DECL_OVERRIDE { + void cleanup(const JobPointer& job, Thread *) override { //Once job is unwrapped from us, this object is dangling. Job::executor points to the next higher up execute wrapper. //It is thus safe to "delete this". By no means add any later steps after delete! delete unwrap(job); diff -Nru threadweaver-5.46.0/src/collection.h threadweaver-5.57.0/src/collection.h --- threadweaver-5.46.0/src/collection.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/collection.h 2019-04-07 07:22:12.000000000 +0000 @@ -49,7 +49,7 @@ public: Collection(); Collection(ThreadWeaver::Private::Collection_Private * d); - ~Collection(); + ~Collection() override; /** Append a job to the collection. * @@ -81,10 +81,10 @@ protected: /** Overload to queue the collection. */ - void aboutToBeQueued_locked(QueueAPI *api) Q_DECL_OVERRIDE; + void aboutToBeQueued_locked(QueueAPI *api) override; /** Overload to dequeue the collection. */ - void aboutToBeDequeued_locked(QueueAPI *api) Q_DECL_OVERRIDE; + void aboutToBeDequeued_locked(QueueAPI *api) override; /** Return a ref-erence to the job in the job list at position i. */ JobPointer jobAt(int i); @@ -97,11 +97,11 @@ protected: /** Overload the execute method. */ - void execute(const JobPointer& job, Thread *) Q_DECL_OVERRIDE; + void execute(const JobPointer& job, Thread *) override; /** Overload run(). * We have to. */ - void run(JobPointer self, Thread *thread) Q_DECL_OVERRIDE; + void run(JobPointer self, Thread *thread) override; protected: friend class CollectionExecuteWrapper; //needs to access d() diff -Nru threadweaver-5.46.0/src/collection_p.cpp threadweaver-5.57.0/src/collection_p.cpp --- threadweaver-5.46.0/src/collection_p.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/collection_p.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -80,6 +80,8 @@ QMutexLocker* locker; MutexUnlocker(QMutexLocker* l) : locker(l) { locker->unlock(); } ~MutexUnlocker() { locker->relock(); } + MutexUnlocker(const MutexUnlocker &) = delete; + MutexUnlocker &operator=(const MutexUnlocker &) = delete; }; } diff -Nru threadweaver-5.46.0/src/collection_p.h threadweaver-5.57.0/src/collection_p.h --- threadweaver-5.46.0/src/collection_p.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/collection_p.h 2019-04-07 07:22:12.000000000 +0000 @@ -42,8 +42,8 @@ class CollectionSelfExecuteWrapper : public ThreadWeaver::ExecuteWrapper { public: - void begin(const JobPointer&, Thread *) Q_DECL_OVERRIDE; - void end(const JobPointer&, Thread *) Q_DECL_OVERRIDE; + void begin(const JobPointer&, Thread *) override; + void end(const JobPointer&, Thread *) override; void callBegin(); void callEnd(); diff -Nru threadweaver-5.46.0/src/dependencypolicy.h threadweaver-5.57.0/src/dependencypolicy.h --- threadweaver-5.46.0/src/dependencypolicy.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/dependencypolicy.h 2019-04-07 07:22:12.000000000 +0000 @@ -52,7 +52,7 @@ { public: /** Destructor. */ - ~DependencyPolicy(); + ~DependencyPolicy() override; /** @brief Add jobB as a dependency of jobA. * jobA will only be executed after jobB has been successfully processed. @@ -84,13 +84,13 @@ static DependencyPolicy &instance(); - bool canRun(JobPointer) Q_DECL_OVERRIDE; + bool canRun(JobPointer) override; - void free(JobPointer) Q_DECL_OVERRIDE; + void free(JobPointer) override; - void release(JobPointer) Q_DECL_OVERRIDE; + void release(JobPointer) override; - void destructed(JobInterface *job) Q_DECL_OVERRIDE; + void destructed(JobInterface *job) override; bool isEmpty() const; diff -Nru threadweaver-5.46.0/src/destructedstate.h threadweaver-5.57.0/src/destructedstate.h --- threadweaver-5.46.0/src/destructedstate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/destructedstate.h 2019-04-07 07:22:12.000000000 +0000 @@ -43,25 +43,25 @@ { public: explicit DestructedState(QueueSignals *weaver); - void shutDown() Q_DECL_OVERRIDE; - Weaver *weaver() Q_DECL_OVERRIDE; - const Weaver *weaver() const Q_DECL_OVERRIDE; - void setMaximumNumberOfThreads(int cap) Q_DECL_OVERRIDE; - int maximumNumberOfThreads() const Q_DECL_OVERRIDE; - int currentNumberOfThreads() const Q_DECL_OVERRIDE; - void enqueue(const QVector &job) Q_DECL_OVERRIDE; - bool dequeue(const JobPointer &job) Q_DECL_OVERRIDE; - void dequeue() Q_DECL_OVERRIDE; - void finish() Q_DECL_OVERRIDE; - bool isEmpty() const Q_DECL_OVERRIDE; - bool isIdle() const Q_DECL_OVERRIDE; - int queueLength() const Q_DECL_OVERRIDE; - void requestAbort() Q_DECL_OVERRIDE; - void suspend() Q_DECL_OVERRIDE; - void resume() Q_DECL_OVERRIDE; - JobPointer applyForWork(Thread *th, bool wasBusy) Q_DECL_OVERRIDE; - void waitForAvailableJob(Thread *th) Q_DECL_OVERRIDE; - StateId stateId() const Q_DECL_OVERRIDE; + void shutDown() override; + Weaver *weaver() override; + const Weaver *weaver() const override; + void setMaximumNumberOfThreads(int cap) override; + int maximumNumberOfThreads() const override; + int currentNumberOfThreads() const override; + void enqueue(const QVector &job) override; + bool dequeue(const JobPointer &job) override; + void dequeue() override; + void finish() override; + bool isEmpty() const override; + bool isIdle() const override; + int queueLength() const override; + void requestAbort() override; + void suspend() override; + void resume() override; + JobPointer applyForWork(Thread *th, bool wasBusy) override; + void waitForAvailableJob(Thread *th) override; + StateId stateId() const override; }; } diff -Nru threadweaver-5.46.0/src/executewrapper_p.h threadweaver-5.57.0/src/executewrapper_p.h --- threadweaver-5.46.0/src/executewrapper_p.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/executewrapper_p.h 2019-04-07 07:22:12.000000000 +0000 @@ -46,10 +46,10 @@ ExecuteWrapper(); Executor *wrap(Executor *previous); Executor *unwrap(const JobPointer& job); - void begin(const JobPointer& job, Thread *) Q_DECL_OVERRIDE; - void execute(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; + void begin(const JobPointer& job, Thread *) override; + void execute(const JobPointer& job, Thread *thread) override; void executeWrapped(const JobPointer& job, Thread *thread); - void end(const JobPointer& job, Thread *) Q_DECL_OVERRIDE; + void end(const JobPointer& job, Thread *) override; private: QAtomicPointer wrapped; diff -Nru threadweaver-5.46.0/src/iddecorator.cpp threadweaver-5.57.0/src/iddecorator.cpp --- threadweaver-5.46.0/src/iddecorator.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/iddecorator.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -50,7 +50,7 @@ IdDecorator::~IdDecorator() { - // Do not assert here. IdDecorator can decorate a null pointer. Only assert if a method is called on a decorared + // Do not assert here. IdDecorator can decorate a null pointer. Only assert if a method is called on a decorated // null pointer. if (autoDelete()) { delete job(); diff -Nru threadweaver-5.46.0/src/iddecorator.h threadweaver-5.57.0/src/iddecorator.h --- threadweaver-5.46.0/src/iddecorator.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/iddecorator.h 2019-04-07 07:22:12.000000000 +0000 @@ -45,7 +45,7 @@ { public: explicit IdDecorator(JobInterface *job, bool autoDelete = true); - ~IdDecorator(); + ~IdDecorator() override; /** Retrieve the decorated job. */ const JobInterface *job() const; /** Retrieve the decorated job. */ @@ -67,29 +67,29 @@ * If the decorated Job is not a Sequence, 0 is returned. */ Sequence *sequence(); - void execute(const JobPointer& job, Thread *) Q_DECL_OVERRIDE; - void blockingExecute() Q_DECL_OVERRIDE; - Executor *setExecutor(Executor *executor) Q_DECL_OVERRIDE; - Executor *executor() const Q_DECL_OVERRIDE; - int priority() const Q_DECL_OVERRIDE; - void setStatus(Status) Q_DECL_OVERRIDE; - Status status() const Q_DECL_OVERRIDE; - bool success() const Q_DECL_OVERRIDE; - void requestAbort() Q_DECL_OVERRIDE; - void aboutToBeQueued(QueueAPI *api) Q_DECL_OVERRIDE; - void aboutToBeQueued_locked(QueueAPI *api) Q_DECL_OVERRIDE; - void aboutToBeDequeued(QueueAPI *api) Q_DECL_OVERRIDE; - void aboutToBeDequeued_locked(QueueAPI *api) Q_DECL_OVERRIDE; - bool isFinished() const Q_DECL_OVERRIDE; - void assignQueuePolicy(QueuePolicy *) Q_DECL_OVERRIDE; - void removeQueuePolicy(QueuePolicy *) Q_DECL_OVERRIDE; - QList queuePolicies() const Q_DECL_OVERRIDE; - QMutex *mutex() const Q_DECL_OVERRIDE; + void execute(const JobPointer& job, Thread *) override; + void blockingExecute() override; + Executor *setExecutor(Executor *executor) override; + Executor *executor() const override; + int priority() const override; + void setStatus(Status) override; + Status status() const override; + bool success() const override; + void requestAbort() override; + void aboutToBeQueued(QueueAPI *api) override; + void aboutToBeQueued_locked(QueueAPI *api) override; + void aboutToBeDequeued(QueueAPI *api) override; + void aboutToBeDequeued_locked(QueueAPI *api) override; + bool isFinished() const override; + void assignQueuePolicy(QueuePolicy *) override; + void removeQueuePolicy(QueuePolicy *) override; + QList queuePolicies() const override; + QMutex *mutex() const override; protected: - void run(JobPointer self, Thread *thread) Q_DECL_OVERRIDE; - void defaultBegin(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; - void defaultEnd(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; + void run(JobPointer self, Thread *thread) override; + void defaultBegin(const JobPointer& job, Thread *thread) override; + void defaultEnd(const JobPointer& job, Thread *thread) override; private: class Private1; diff -Nru threadweaver-5.46.0/src/inconstructionstate.h threadweaver-5.57.0/src/inconstructionstate.h --- threadweaver-5.46.0/src/inconstructionstate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/inconstructionstate.h 2019-04-07 07:22:12.000000000 +0000 @@ -45,13 +45,13 @@ public: explicit InConstructionState(QueueSignals *weaver); /** Suspend job processing. */ - void suspend() Q_DECL_OVERRIDE; + void suspend() override; /** Resume job processing. */ - void resume() Q_DECL_OVERRIDE; + void resume() override; /** Assign a job to an idle thread. */ - JobPointer applyForWork(Thread *th, bool wasBusy) Q_DECL_OVERRIDE; + JobPointer applyForWork(Thread *th, bool wasBusy) override; /** reimpl */ - StateId stateId() const Q_DECL_OVERRIDE; + StateId stateId() const override; }; } diff -Nru threadweaver-5.46.0/src/job.h threadweaver-5.57.0/src/job.h --- threadweaver-5.46.0/src/job.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/job.h 2019-04-07 07:22:12.000000000 +0000 @@ -67,7 +67,7 @@ Job(Private::Job_Private* d); /** Destructor. */ - virtual ~Job(); + ~Job() override; /** Perform the job. The thread in which this job is executed is given as a parameter. * @@ -78,20 +78,20 @@ * job is the Job that the queue is executing. It is not necessarily equal to this. For example, Jobs that are * decorated expose the decorator's address, not the address of the decorated object. */ - void execute(const JobPointer& job, Thread *) Q_DECL_OVERRIDE; + void execute(const JobPointer& job, Thread *) override; - /** Perform the job synchroneously in the current thread. */ - void blockingExecute() Q_DECL_OVERRIDE; + /** Perform the job synchronously in the current thread. */ + void blockingExecute() override; /** Set the Executor object that is supposed to run the job. * * Returns the previously set executor. The executor can never be unset. If zero is passed in as the new executor, the Job * will internally reset to a default executor that only invokes run(). */ - Executor *setExecutor(Executor *executor) Q_DECL_OVERRIDE; + Executor *setExecutor(Executor *executor) override; /** Returns the executor currently set on the Job. */ - Executor *executor() const Q_DECL_OVERRIDE; + Executor *executor() const override; /** The queueing priority of the job. * Jobs will be sorted by their queueing priority when enqueued. A higher queueing priority will place the job in front of all @@ -102,18 +102,18 @@ * * The default implementation returns zero. Only if this method is overloaded for some job classes, priorities will influence * the execution order of jobs. */ - int priority() const Q_DECL_OVERRIDE; + int priority() const override; /** @brief Set the status of the Job. * * Do not call this method unless you know what you are doing, please :-) */ - void setStatus(Status) Q_DECL_OVERRIDE; + void setStatus(Status) override; /** @brief The status of the job. * * The status will be changed to Status_Success if the run() method exits normally. */ - Status status() const Q_DECL_OVERRIDE; + Status status() const override; /** Return whether the Job finished successfully or not. * The default implementation simply returns true. Overload in derived classes if the derived Job class can fail. @@ -125,7 +125,7 @@ * not be executed after a failure, it is important to dequeue those before deleting the failed Job. A Sequence may be * helpful for that purpose. */ - bool success() const Q_DECL_OVERRIDE; + bool success() const override; /** Abort the execution of the job. * @@ -137,7 +137,7 @@ * The method is not pure virtual because users are not supposed to be forced to always implement requestAbort(). Also, this * method is supposed to return immediately, not after the abort has completed. It requests the abort, the Job has to act on * the request. */ - void requestAbort() Q_DECL_OVERRIDE {} + void requestAbort() override {} /** The job is about to be added to the weaver's job queue. * @@ -148,10 +148,10 @@ * is save to assume that recursive queueing is atomic from the queues perspective. * * @param api the QueueAPI object the job will be queued in */ - void aboutToBeQueued(QueueAPI *api) Q_DECL_OVERRIDE; + void aboutToBeQueued(QueueAPI *api) override; /** Called from aboutToBeQueued() while the mutex is being held. */ - void aboutToBeQueued_locked(QueueAPI *api) Q_DECL_OVERRIDE; + void aboutToBeQueued_locked(QueueAPI *api) override; /** This Job is about the be dequeued from the weaver's job queue. * @@ -162,29 +162,29 @@ * Note: The default implementation does nothing. * * @param weaver the Weaver object from which the job will be dequeued */ - void aboutToBeDequeued(QueueAPI *api) Q_DECL_OVERRIDE; + void aboutToBeDequeued(QueueAPI *api) override; /** Called from aboutToBeDequeued() while the mutex is being held. */ - void aboutToBeDequeued_locked(QueueAPI *api) Q_DECL_OVERRIDE; + void aboutToBeDequeued_locked(QueueAPI *api) override; /** Returns true if the jobs's execute method finished. */ - bool isFinished() const Q_DECL_OVERRIDE; + bool isFinished() const override; /** Assign a queue policy. * * Queue Policies customize the queueing (running) behaviour of sets of jobs. Examples for queue policies are dependencies * and resource restrictions. Every queue policy object can only be assigned once to a job, multiple assignments will be * IGNORED. */ - void assignQueuePolicy(QueuePolicy *) Q_DECL_OVERRIDE; + void assignQueuePolicy(QueuePolicy *) override; /** Remove a queue policy from this job. */ - void removeQueuePolicy(QueuePolicy *) Q_DECL_OVERRIDE; + void removeQueuePolicy(QueuePolicy *) override; /** @brief Return the queue policies assigned to this Job. */ - QList queuePolicies() const Q_DECL_OVERRIDE; + QList queuePolicies() const override; /** The mutex used to protect this job. */ - QMutex *mutex() const Q_DECL_OVERRIDE; + QMutex *mutex() const override; private: Private::Job_Private *d_; @@ -199,26 +199,26 @@ * It is called from execute(). This method is the one to overload it with the job's task. * * The Job will be executed in the specified thread. thread may be zero, indicating that the job is being executed some - * other way (for example, synchroneously by some other job). self specifies the job as the queue sees it. Whenever publishing + * other way (for example, synchronously by some other job). self specifies the job as the queue sees it. Whenever publishing * information about the job to the outside world, for example by emitting signals, use self, not this. self is the reference * counted object handled by the queue. Using it as signal parameters will amongst other things prevent thejob from being * memory managed and deleted. */ - virtual void run(JobPointer self, Thread *thread) Q_DECL_OVERRIDE = 0; + virtual void run(JobPointer self, Thread *thread) override = 0; /** @brief Perform standard tasks before starting the execution of a job. * * The default implementation is empty. * job is the Job that the queue is executing. It is not necessarily equal to this. For example, Jobs that are * decorated expose the decorator's address, not the address of the decorated object. */ - void defaultBegin(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; + void defaultBegin(const JobPointer& job, Thread *thread) override; /** @brief Perform standard task after the execution of a job. * * The default implementation is empty. * job is the Job that the queue is executing. It is not necessarily equal to this. For example, Jobs that are * decorated expose the decorator's address, not the address of the decorated object. */ - void defaultEnd(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; + void defaultEnd(const JobPointer& job, Thread *thread) override; }; } diff -Nru threadweaver-5.46.0/src/job_p.h threadweaver-5.57.0/src/job_p.h --- threadweaver-5.46.0/src/job_p.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/job_p.h 2019-04-07 07:22:12.000000000 +0000 @@ -38,9 +38,9 @@ class THREADWEAVER_EXPORT DefaultExecutor : public ThreadWeaver::Executor { public: - void begin(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; - void execute(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; - void end(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; + void begin(const JobPointer& job, Thread *thread) override; + void execute(const JobPointer& job, Thread *thread) override; + void end(const JobPointer& job, Thread *thread) override; }; extern DefaultExecutor defaultExecutor; @@ -48,7 +48,7 @@ class DebugExecuteWrapper : public ThreadWeaver::ExecuteWrapper { public: - void execute(const JobPointer &job, ThreadWeaver::Thread *th) Q_DECL_OVERRIDE; + void execute(const JobPointer &job, ThreadWeaver::Thread *th) override; }; class Job_Private diff -Nru threadweaver-5.46.0/src/lambda.h threadweaver-5.57.0/src/lambda.h --- threadweaver-5.46.0/src/lambda.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/lambda.h 2019-04-07 07:22:12.000000000 +0000 @@ -43,7 +43,7 @@ {} protected: - void run(JobPointer, Thread *) Q_DECL_OVERRIDE { + void run(JobPointer, Thread *) override { t(); } diff -Nru threadweaver-5.46.0/src/qobjectdecorator.h threadweaver-5.57.0/src/qobjectdecorator.h --- threadweaver-5.46.0/src/qobjectdecorator.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/qobjectdecorator.h 2019-04-07 07:22:12.000000000 +0000 @@ -56,8 +56,8 @@ void failed(ThreadWeaver::JobPointer); protected: - void defaultBegin(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; - void defaultEnd(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE; + void defaultBegin(const JobPointer& job, Thread *thread) override; + void defaultEnd(const JobPointer& job, Thread *thread) override; }; typedef QSharedPointer QJobPointer; diff -Nru threadweaver-5.46.0/src/queue.h threadweaver-5.57.0/src/queue.h --- threadweaver-5.46.0/src/queue.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/queue.h 2019-04-07 07:22:12.000000000 +0000 @@ -60,30 +60,30 @@ /** @brief Construct a queue with a customized implementation * The queue takes ownership and will delete the implementation upon destruction. */ explicit Queue(QueueSignals *implementation, QObject *parent = nullptr); - virtual ~Queue(); + ~Queue() override; QueueStream stream(); - const State *state() const Q_DECL_OVERRIDE; + const State *state() const override; - void setMaximumNumberOfThreads(int cap) Q_DECL_OVERRIDE; - int maximumNumberOfThreads() const Q_DECL_OVERRIDE; - int currentNumberOfThreads() const Q_DECL_OVERRIDE; + void setMaximumNumberOfThreads(int cap) override; + int maximumNumberOfThreads() const override; + int currentNumberOfThreads() const override; static ThreadWeaver::Queue *instance(); - void enqueue(const QVector &jobs) Q_DECL_OVERRIDE; + void enqueue(const QVector &jobs) override; void enqueue(const JobPointer &job); - bool dequeue(const JobPointer &) Q_DECL_OVERRIDE; - void dequeue() Q_DECL_OVERRIDE; - void finish() Q_DECL_OVERRIDE; - void suspend() Q_DECL_OVERRIDE; - void resume() Q_DECL_OVERRIDE; - bool isEmpty() const Q_DECL_OVERRIDE; - bool isIdle() const Q_DECL_OVERRIDE; - int queueLength() const Q_DECL_OVERRIDE; - void requestAbort() Q_DECL_OVERRIDE; - void reschedule() Q_DECL_OVERRIDE; - void shutDown() Q_DECL_OVERRIDE; + bool dequeue(const JobPointer &) override; + void dequeue() override; + void finish() override; + void suspend() override; + void resume() override; + bool isEmpty() const override; + bool isIdle() const override; + int queueLength() const override; + void requestAbort() override; + void reschedule() override; + void shutDown() override; /** @brief Interface for the global queue factory. */ struct GlobalQueueFactory { diff -Nru threadweaver-5.46.0/src/queueapi.h threadweaver-5.57.0/src/queueapi.h --- threadweaver-5.46.0/src/queueapi.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/queueapi.h 2019-04-07 07:22:12.000000000 +0000 @@ -45,7 +45,7 @@ explicit QueueAPI(ThreadWeaver::Private::QueueSignals_Private* d, QObject *parent = nullptr); virtual void shutDown_p() = 0; - const State *state() const Q_DECL_OVERRIDE = 0; + const State *state() const override = 0; virtual State *state() = 0; virtual void setMaximumNumberOfThreads_p(int cap) = 0; virtual int maximumNumberOfThreads_p() const = 0; diff -Nru threadweaver-5.46.0/src/queueing.h threadweaver-5.57.0/src/queueing.h --- threadweaver-5.46.0/src/queueing.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/queueing.h 2019-04-07 07:22:12.000000000 +0000 @@ -79,7 +79,7 @@ return ret; } -// specialise for JobPointer: +// specialize for JobPointer: template<> inline JobPointer enqueue(Queue *weaver, JobPointer job) { diff -Nru threadweaver-5.46.0/src/queueinterface.h threadweaver-5.57.0/src/queueinterface.h --- threadweaver-5.46.0/src/queueinterface.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/queueinterface.h 2019-04-07 07:22:12.000000000 +0000 @@ -25,8 +25,8 @@ */ -#ifndef WeaverInterface_H -#define WeaverInterface_H +#ifndef QueueInterface_H +#define QueueInterface_H #include #include diff -Nru threadweaver-5.46.0/src/queuepolicy.h threadweaver-5.57.0/src/queuepolicy.h --- threadweaver-5.46.0/src/queuepolicy.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/queuepolicy.h 2019-04-07 07:22:12.000000000 +0000 @@ -51,7 +51,7 @@ * A job can have multiple queue policies assigned, and will only be executed if all of them * return true from canRun() within the same execution attempt. Jobs only keep a reference to the * QueuePolicy. Therefore, the same policy object can be assigned to multiple jobs and this way - * control the way all those jobs are exeuted. Jobs never assume ownership of their assigned queue + * control the way all those jobs are executed. Jobs never assume ownership of their assigned queue * policies. */ class THREADWEAVER_EXPORT QueuePolicy diff -Nru threadweaver-5.46.0/src/queuesignals.h threadweaver-5.57.0/src/queuesignals.h --- threadweaver-5.46.0/src/queuesignals.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/queuesignals.h 2019-04-07 07:22:12.000000000 +0000 @@ -48,7 +48,7 @@ Q_SIGNALS: /** @brief Emitted when the Queue has completed all jobs currently queued. * - * The Queue emits finished() when the the job queue is empty, and the last job currently processed by a worker threads was + * The Queue emits finished() when the job queue is empty, and the last job currently processed by a worker threads was * completed. Beware that if multiple jobs are enqueued repeatedly one by one, this signal might be emitted multiple times, because the * queued jobs where processed before new ones could be queued. To avoid this, queue all relevant jobs in a single operation, * using for example a QueueStream or a Collection. diff -Nru threadweaver-5.46.0/src/resourcerestrictionpolicy.h threadweaver-5.57.0/src/resourcerestrictionpolicy.h --- threadweaver-5.46.0/src/resourcerestrictionpolicy.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/resourcerestrictionpolicy.h 2019-04-07 07:22:12.000000000 +0000 @@ -44,7 +44,7 @@ * If a set of Jobs accesses a resource that can be overloaded, this may degrade application performance. For * example, loading too many files from the hard disc at the same time may lead to longer load times. * ResourceRestrictionPolicy can be used to cap the number of accesses. Resource restriction policies are - * shared between the affected jobs. All jobs that share a resurce restriction policy have to acquire + * shared between the affected jobs. All jobs that share a resource restriction policy have to acquire * permission from the policy before they can run. In this way, resource restrictions can be compared to * semaphores, only that they require no locking at the thread level. * The example uses a resource restriction to limit the number of images files that are loaded from @@ -55,7 +55,7 @@ { public: explicit ResourceRestrictionPolicy(int cap = 0); - ~ResourceRestrictionPolicy(); + ~ResourceRestrictionPolicy() override; /** @brief Cap the number of simultaneously executing jobs. * Capping the amount of jobs will make sure that at max the number of jobs executing at any time is @@ -65,10 +65,10 @@ */ void setCap(int newCap); int cap() const; - bool canRun(JobPointer) Q_DECL_OVERRIDE; - void free(JobPointer) Q_DECL_OVERRIDE; - void release(JobPointer) Q_DECL_OVERRIDE; - void destructed(JobInterface *job) Q_DECL_OVERRIDE; + bool canRun(JobPointer) override; + void free(JobPointer) override; + void release(JobPointer) override; + void destructed(JobInterface *job) override; private: class Private; diff -Nru threadweaver-5.46.0/src/sequence_p.h threadweaver-5.57.0/src/sequence_p.h --- threadweaver-5.46.0/src/sequence_p.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/sequence_p.h 2019-04-07 07:22:12.000000000 +0000 @@ -39,10 +39,10 @@ class BlockerPolicy : public QueuePolicy { public: - bool canRun(JobPointer) Q_DECL_OVERRIDE; - void free(JobPointer) Q_DECL_OVERRIDE; - void release(JobPointer) Q_DECL_OVERRIDE; - void destructed(JobInterface *job) Q_DECL_OVERRIDE; + bool canRun(JobPointer) override; + void free(JobPointer) override; + void release(JobPointer) override; + void destructed(JobInterface *job) override; }; class Sequence_Private : public Collection_Private @@ -50,9 +50,9 @@ public: Sequence_Private(); BlockerPolicy* blocker(); - void prepareToEnqueueElements() Q_DECL_OVERRIDE; - void processCompletedElement(Collection* collection, JobPointer job, Thread *thread) Q_DECL_OVERRIDE; - void elementDequeued(const JobPointer& job) Q_DECL_OVERRIDE; + void prepareToEnqueueElements() override; + void processCompletedElement(Collection* collection, JobPointer job, Thread *thread) override; + void elementDequeued(const JobPointer& job) override; BlockerPolicy blocker_; QAtomicInt completed_; }; diff -Nru threadweaver-5.46.0/src/shuttingdownstate.cpp threadweaver-5.57.0/src/shuttingdownstate.cpp --- threadweaver-5.46.0/src/shuttingdownstate.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/shuttingdownstate.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -59,7 +59,7 @@ void ShuttingDownState::waitForAvailableJob(Thread *) { - // immidiately return here + // immediately return here } StateId ShuttingDownState::stateId() const diff -Nru threadweaver-5.46.0/src/shuttingdownstate.h threadweaver-5.57.0/src/shuttingdownstate.h --- threadweaver-5.46.0/src/shuttingdownstate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/shuttingdownstate.h 2019-04-07 07:22:12.000000000 +0000 @@ -45,17 +45,17 @@ explicit ShuttingDownState(QueueSignals *weaver); /** Shut down the queue. */ - void shutDown() Q_DECL_OVERRIDE; + void shutDown() override; /** Suspend job processing. */ - void suspend() Q_DECL_OVERRIDE; + void suspend() override; /** Resume job processing. */ - void resume() Q_DECL_OVERRIDE; + void resume() override; /** Assign a job to an idle thread. */ - JobPointer applyForWork(Thread *th, bool wasBusy) Q_DECL_OVERRIDE; + JobPointer applyForWork(Thread *th, bool wasBusy) override; /** Wait (by suspending the calling thread) until a job becomes available. */ - void waitForAvailableJob(Thread *th) Q_DECL_OVERRIDE; + void waitForAvailableJob(Thread *th) override; /** reimpl */ - StateId stateId() const Q_DECL_OVERRIDE; + StateId stateId() const override; }; } diff -Nru threadweaver-5.46.0/src/suspendedstate.h threadweaver-5.57.0/src/suspendedstate.h --- threadweaver-5.46.0/src/suspendedstate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/suspendedstate.h 2019-04-07 07:22:12.000000000 +0000 @@ -42,13 +42,13 @@ public: explicit SuspendedState(Weaver *weaver); /** Suspend job processing. */ - void suspend() Q_DECL_OVERRIDE; + void suspend() override; /** Resume job processing. */ - void resume() Q_DECL_OVERRIDE; + void resume() override; /** Assign a job to an idle thread. */ - JobPointer applyForWork(Thread *th, bool wasBusy) Q_DECL_OVERRIDE; + JobPointer applyForWork(Thread *th, bool wasBusy) override; /** reimpl */ - StateId stateId() const Q_DECL_OVERRIDE; + StateId stateId() const override; }; } diff -Nru threadweaver-5.46.0/src/suspendingstate.h threadweaver-5.57.0/src/suspendingstate.h --- threadweaver-5.46.0/src/suspendingstate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/suspendingstate.h 2019-04-07 07:22:12.000000000 +0000 @@ -43,15 +43,15 @@ public: explicit SuspendingState(Weaver *weaver); /** Suspend job processing. */ - void suspend() Q_DECL_OVERRIDE; + void suspend() override; /** Resume job processing. */ - void resume() Q_DECL_OVERRIDE; + void resume() override; /** Assign a job to an idle thread. */ - JobPointer applyForWork(Thread *th, bool wasBusy) Q_DECL_OVERRIDE; + JobPointer applyForWork(Thread *th, bool wasBusy) override; /** Overload. */ - void activated() Q_DECL_OVERRIDE; + void activated() override; /** reimpl */ - StateId stateId() const Q_DECL_OVERRIDE; + StateId stateId() const override; }; } diff -Nru threadweaver-5.46.0/src/thread.h threadweaver-5.57.0/src/thread.h --- threadweaver-5.46.0/src/thread.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/thread.h 2019-04-07 07:22:12.000000000 +0000 @@ -55,14 +55,14 @@ explicit Thread(Weaver *parent = nullptr); /** The destructor. */ - ~Thread(); + ~Thread() override; /** @brief The run method is reimplemented to execute jobs from the queue. * * Whenever the thread is idle, it will ask its Weaver parent for a Job to do. The Weaver will either return a Job or a null * pointer. When a null pointer is returned, it tells the thread to exit. */ - void run() Q_DECL_OVERRIDE; + void run() override; /** @brief Returns the thread id. * diff -Nru threadweaver-5.46.0/src/threadweaver.h threadweaver-5.57.0/src/threadweaver.h --- threadweaver-5.46.0/src/threadweaver.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/threadweaver.h 2019-04-07 07:22:12.000000000 +0000 @@ -36,6 +36,5 @@ #include "job.h" #include "collection.h" #include "sequence.h" -#include "queueing.h" #endif // THREADWEAVER_H diff -Nru threadweaver-5.46.0/src/weaver.cpp threadweaver-5.57.0/src/weaver.cpp --- threadweaver-5.46.0/src/weaver.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/weaver.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -224,7 +224,7 @@ if (jobs.isEmpty()) { return; } - Q_FOREACH (const JobPointer &job, jobs) { + for (const JobPointer &job : jobs) { if (job) { Q_ASSERT(job->status() == Job::Status_New); adjustInventory(jobs.size()); diff -Nru threadweaver-5.46.0/src/weaver.h threadweaver-5.57.0/src/weaver.h --- threadweaver-5.46.0/src/weaver.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/weaver.h 2019-04-07 07:22:12.000000000 +0000 @@ -53,29 +53,29 @@ Q_OBJECT public: explicit Weaver(QObject *parent = nullptr); - virtual ~Weaver(); - void shutDown() Q_DECL_OVERRIDE; - void shutDown_p() Q_DECL_OVERRIDE; - - const State *state() const Q_DECL_OVERRIDE; - State *state() Q_DECL_OVERRIDE; - - void setMaximumNumberOfThreads(int cap) Q_DECL_OVERRIDE; - int maximumNumberOfThreads() const Q_DECL_OVERRIDE; - int currentNumberOfThreads() const Q_DECL_OVERRIDE; + ~Weaver() override; + void shutDown() override; + void shutDown_p() override; + + const State *state() const override; + State *state() override; + + void setMaximumNumberOfThreads(int cap) override; + int maximumNumberOfThreads() const override; + int currentNumberOfThreads() const override; void setState(StateId); - void enqueue(const QVector &jobs) Q_DECL_OVERRIDE; - bool dequeue(const JobPointer &job) Q_DECL_OVERRIDE; - void dequeue() Q_DECL_OVERRIDE; - void finish() Q_DECL_OVERRIDE; - void suspend() Q_DECL_OVERRIDE; - void resume() Q_DECL_OVERRIDE; - bool isEmpty() const Q_DECL_OVERRIDE; - bool isIdle() const Q_DECL_OVERRIDE; - int queueLength() const Q_DECL_OVERRIDE; - JobPointer applyForWork(Thread *thread, bool wasBusy) Q_DECL_OVERRIDE; - void waitForAvailableJob(Thread *th) Q_DECL_OVERRIDE; + void enqueue(const QVector &jobs) override; + bool dequeue(const JobPointer &job) override; + void dequeue() override; + void finish() override; + void suspend() override; + void resume() override; + bool isEmpty() const override; + bool isIdle() const override; + int queueLength() const override; + JobPointer applyForWork(Thread *thread, bool wasBusy) override; + void waitForAvailableJob(Thread *th) override; void blockThreadUntilJobsAreBeingAssigned(Thread *th); void blockThreadUntilJobsAreBeingAssigned_locked(Thread *th); void incActiveThreadCount(); @@ -85,26 +85,26 @@ void threadEnteredRun(Thread *thread); JobPointer takeFirstAvailableJobOrSuspendOrWait(Thread *th, bool threadWasBusy, bool suspendIfAllThreadsInactive, bool justReturning); - void requestAbort() Q_DECL_OVERRIDE; - void reschedule() Q_DECL_OVERRIDE; + void requestAbort() override; + void reschedule() override; //FIXME: rename _p to _locked: friend class WeaverImplState; friend class SuspendingState; void setState_p(StateId); - void setMaximumNumberOfThreads_p(int cap) Q_DECL_OVERRIDE; - int maximumNumberOfThreads_p() const Q_DECL_OVERRIDE; - int currentNumberOfThreads_p() const Q_DECL_OVERRIDE; + void setMaximumNumberOfThreads_p(int cap) override; + int maximumNumberOfThreads_p() const override; + int currentNumberOfThreads_p() const override; void enqueue_p(const QVector &jobs); - bool dequeue_p(JobPointer job) Q_DECL_OVERRIDE; - void dequeue_p() Q_DECL_OVERRIDE; - void finish_p() Q_DECL_OVERRIDE; - void suspend_p() Q_DECL_OVERRIDE; - void resume_p() Q_DECL_OVERRIDE; - bool isEmpty_p() const Q_DECL_OVERRIDE; - bool isIdle_p() const Q_DECL_OVERRIDE; - int queueLength_p() const Q_DECL_OVERRIDE; - void requestAbort_p() Q_DECL_OVERRIDE; + bool dequeue_p(JobPointer job) override; + void dequeue_p() override; + void finish_p() override; + void suspend_p() override; + void resume_p() override; + bool isEmpty_p() const override; + bool isIdle_p() const override; + int queueLength_p() const override; + void requestAbort_p() override; Q_SIGNALS: /** @brief A Thread has been created. */ diff -Nru threadweaver-5.46.0/src/weaver_p.cpp threadweaver-5.57.0/src/weaver_p.cpp --- threadweaver-5.46.0/src/weaver_p.cpp 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/weaver_p.cpp 2019-04-07 07:22:12.000000000 +0000 @@ -117,7 +117,7 @@ void Weaver_Private::deleteExpiredThreads() { Q_ASSERT(!mutex->tryLock()); //mutex has to be held when this method is called - foreach (Thread* thread, expiredThreads) { + for (Thread* thread : qAsConst(expiredThreads)) { thread->wait(); delete thread; } diff -Nru threadweaver-5.46.0/src/weaverimplstate.h threadweaver-5.57.0/src/weaverimplstate.h --- threadweaver-5.46.0/src/weaverimplstate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/weaverimplstate.h 2019-04-07 07:22:12.000000000 +0000 @@ -26,8 +26,8 @@ $Id$ */ -#ifndef STATEIMPLEMENTATION_H -#define STATEIMPLEMENTATION_H +#ifndef WEAVERIMPLSTATE_H +#define WEAVERIMPLSTATE_H #include "state.h" #include "weaver.h" @@ -43,41 +43,41 @@ public: explicit WeaverImplState(QueueSignals *weaver); - const State *state() const Q_DECL_OVERRIDE; + const State *state() const override; /** Shut down the queue. */ - void shutDown() Q_DECL_OVERRIDE; + void shutDown() override; /** Set the maximum number of threads this Weaver object may start. */ - void setMaximumNumberOfThreads(int cap) Q_DECL_OVERRIDE; + void setMaximumNumberOfThreads(int cap) override; /** Get the maximum number of threads this Weaver may start. */ - int maximumNumberOfThreads() const Q_DECL_OVERRIDE; + int maximumNumberOfThreads() const override; /** Returns the current number of threads in the inventory. */ - int currentNumberOfThreads() const Q_DECL_OVERRIDE; + int currentNumberOfThreads() const override; /** Enqueue a job. */ - void enqueue(const QVector &jobs) Q_DECL_OVERRIDE; + void enqueue(const QVector &jobs) override; /** Dequeue a job. */ - bool dequeue(const JobPointer &job) Q_DECL_OVERRIDE; + bool dequeue(const JobPointer &job) override; /** Dequeue all jobs. */ - void dequeue() Q_DECL_OVERRIDE; + void dequeue() override; /** Finish all queued jobs. */ - void finish() Q_DECL_OVERRIDE; + void finish() override; /** Are no more jobs queued? */ - bool isEmpty() const Q_DECL_OVERRIDE; + bool isEmpty() const override; /** Are all threads waiting? */ - bool isIdle() const Q_DECL_OVERRIDE; + bool isIdle() const override; /** How many jobs are currently queued? */ - int queueLength() const Q_DECL_OVERRIDE; + int queueLength() const override; /** Request abort for all queued and currently executed jobs. */ - void requestAbort() Q_DECL_OVERRIDE; + void requestAbort() override; /** Reschedule jobs to threads. */ - void reschedule() Q_DECL_OVERRIDE; + void reschedule() override; /** Wait (by suspending the calling thread) until a job becomes available. */ - void waitForAvailableJob(Thread *th) Q_DECL_OVERRIDE; + void waitForAvailableJob(Thread *th) override; protected: /** Provide correct return type for WeaverImpl states. */ - Weaver *weaver() Q_DECL_OVERRIDE; - const Weaver *weaver() const Q_DECL_OVERRIDE; + Weaver *weaver() override; + const Weaver *weaver() const override; }; } diff -Nru threadweaver-5.46.0/src/weaverinterface.h threadweaver-5.57.0/src/weaverinterface.h --- threadweaver-5.46.0/src/weaverinterface.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/weaverinterface.h 2019-04-07 07:22:12.000000000 +0000 @@ -25,8 +25,8 @@ */ -#ifndef THREADWEAVER_QUEUEINTERFACE_H -#define THREADWEAVER_QUEUEINTERFACE_H +#ifndef WEAVER_INTERFACE_H +#define WEAVER_INTERFACE_H #include "jobpointer.h" @@ -53,4 +53,4 @@ } -#endif // THREADWEAVER_QUEUEINTERFACE_H +#endif // WEAVER_INTERFACE_H diff -Nru threadweaver-5.46.0/src/workinghardstate.h threadweaver-5.57.0/src/workinghardstate.h --- threadweaver-5.46.0/src/workinghardstate.h 2018-05-05 12:40:22.000000000 +0000 +++ threadweaver-5.57.0/src/workinghardstate.h 2019-04-07 07:22:12.000000000 +0000 @@ -42,15 +42,15 @@ public: explicit WorkingHardState(Weaver *weaver); /** Suspend job processing. */ - void suspend() Q_DECL_OVERRIDE; + void suspend() override; /** Resume job processing. */ - void resume() Q_DECL_OVERRIDE; + void resume() override; /** Assign a job to an idle thread. */ - JobPointer applyForWork(Thread *th, bool wasBusy) Q_DECL_OVERRIDE; + JobPointer applyForWork(Thread *th, bool wasBusy) override; /** Overload. */ - void activated() Q_DECL_OVERRIDE; + void activated() override; /** reimpl */ - StateId stateId() const Q_DECL_OVERRIDE; + StateId stateId() const override; }; }