Hello community, here is the log from the commit of package threadweaver for openSUSE:Factory checked in at 2017-03-03 17:29:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/threadweaver (Old) and /work/SRC/openSUSE:Factory/.threadweaver.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "threadweaver" Fri Mar 3 17:29:51 2017 rev:38 rq:461501 version:5.31.0 Changes: -------- --- /work/SRC/openSUSE:Factory/threadweaver/threadweaver.changes 2017-02-03 20:03:32.171631533 +0100 +++ /work/SRC/openSUSE:Factory/.threadweaver.new/threadweaver.changes 2017-03-03 17:29:52.493421843 +0100 @@ -1,0 +2,7 @@ +Thu Feb 9 10:21:18 UTC 2017 - hrvoje.sen...@gmail.com + +- Update to 5.31.0 + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.31.0.php + +------------------------------------------------------------------- Old: ---- threadweaver-5.30.0.tar.xz New: ---- threadweaver-5.31.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ threadweaver.spec ++++++ --- /var/tmp/diff_new_pack.CH56oS/_old 2017-03-03 17:29:53.097336518 +0100 +++ /var/tmp/diff_new_pack.CH56oS/_new 2017-03-03 17:29:53.097336518 +0100 @@ -17,15 +17,15 @@ %define lname libKF5ThreadWeaver5 -%define _tar_path 5.30 +%define _tar_path 5.31 Name: threadweaver -Version: 5.30.0 +Version: 5.31.0 Release: 0 BuildRequires: cmake >= 3.0 BuildRequires: extra-cmake-modules >= %{_tar_path} BuildRequires: fdupes BuildRequires: kf5-filesystem -BuildRequires: cmake(Qt5Core) >= 5.5.0 +BuildRequires: cmake(Qt5Core) >= 5.6.0 Summary: KDE Helper for multithreaded programming License: LGPL-2.1+ Group: System/GUI/KDE @@ -62,7 +62,7 @@ Group: Development/Libraries/KDE Requires: %lname = %{version} Requires: extra-cmake-modules -Requires: cmake(Qt5Core) >= 5.5.0 +Requires: cmake(Qt5Core) >= 5.6.0 %description devel ThreadWeaver is a helper for multithreaded programming. It uses a job-based ++++++ threadweaver-5.30.0.tar.xz -> threadweaver-5.31.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/CMakeLists.txt new/threadweaver-5.31.0/CMakeLists.txt --- old/threadweaver-5.30.0/CMakeLists.txt 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/CMakeLists.txt 2017-02-04 19:40:16.000000000 +0100 @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.0) -set(KF5_VERSION "5.30.0") # handled by release scripts +set(KF5_VERSION "5.31.0") # handled by release scripts project(ThreadWeaver VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.30.0 NO_MODULE) +find_package(ECM 5.31.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.5.0) +set(REQUIRED_QT_VERSION 5.6.0) find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/AppendCharacterJob.h new/threadweaver-5.31.0/autotests/AppendCharacterJob.h --- old/threadweaver-5.30.0/autotests/AppendCharacterJob.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/AppendCharacterJob.h 2017-02-04 19:40:16.000000000 +0100 @@ -42,7 +42,7 @@ class AppendCharacterJob : public ThreadWeaver::Job { public: - AppendCharacterJob(QChar c = QChar(), QString *stringref = 0) + AppendCharacterJob(QChar c = QChar(), QString *stringref = nullptr) : ThreadWeaver::Job() { setValues(c, stringref); @@ -82,7 +82,7 @@ class FailingAppendCharacterJob : public AppendCharacterJob { public: - FailingAppendCharacterJob(QChar c = QChar(), QString *stringref = 0) + FailingAppendCharacterJob(QChar c = QChar(), QString *stringref = nullptr) : AppendCharacterJob(c, stringref) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/JobLoggingWeaver.h new/threadweaver-5.31.0/autotests/JobLoggingWeaver.h --- old/threadweaver-5.30.0/autotests/JobLoggingWeaver.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/JobLoggingWeaver.h 2017-02-04 19:40:16.000000000 +0100 @@ -36,7 +36,7 @@ { Q_OBJECT public: - explicit JobLoggingWeaver(QObject* parent = 0); + explicit JobLoggingWeaver(QObject* parent = nullptr); void enqueue(const QVector<ThreadWeaver::JobPointer> &jobs) Q_DECL_OVERRIDE; private: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/JobTests.cpp new/threadweaver-5.31.0/autotests/JobTests.cpp --- old/threadweaver-5.30.0/autotests/JobTests.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/JobTests.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -322,7 +322,7 @@ JobPointer jobB(new AppendCharacterJob(QChar('b'), &result)); QObjectDecorator collection(new Collection()); Collection *decorated = dynamic_cast<Collection *>(collection.job()); - QVERIFY(decorated != 0); + QVERIFY(decorated != nullptr); decorated->addJob(jobA); decorated->addJob(jobB); @@ -925,7 +925,7 @@ void JobTests::IdDecoratorAutoDeleteTest() { using namespace ThreadWeaver; - IdDecorator id(0); + IdDecorator id(nullptr); QCOMPARE(id.autoDelete(), true); // autoDelete is on by default id.setAutoDelete(false); QCOMPARE(id.autoDelete(), false); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/LifecycleTests.cpp new/threadweaver-5.31.0/autotests/LifecycleTests.cpp --- old/threadweaver-5.30.0/autotests/LifecycleTests.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/LifecycleTests.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -92,7 +92,7 @@ ThreadWeaver::JobPointer job1(new NotifyOnDeletejob(job1Exists)); QCOMPARE(job1Exists, true); int argc = 0; - QCoreApplication app(argc, (char **)0); Q_UNUSED(app); + QCoreApplication app(argc, (char **)nullptr); Q_UNUSED(app); QVERIFY(ThreadWeaver::Queue::instance()); ThreadWeaver::Queue::instance()->suspend(); ThreadWeaver::Queue::instance()->enqueue(job1); @@ -105,7 +105,7 @@ QCOMPARE(job2Exists, false); QCOMPARE(job1Exists, true); } - QVERIFY(ThreadWeaver::Queue::instance() == 0); + QVERIFY(ThreadWeaver::Queue::instance() == nullptr); QCOMPARE(job2Exists, false); QCOMPARE(job1Exists, false); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/QueueFactoryTests.cpp new/threadweaver-5.31.0/autotests/QueueFactoryTests.cpp --- old/threadweaver-5.30.0/autotests/QueueFactoryTests.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/QueueFactoryTests.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -57,7 +57,7 @@ { Q_OBJECT public: - explicit JobCountingWeaver(QObject *parent = 0) : Weaver(parent) {} + explicit JobCountingWeaver(QObject *parent = nullptr) : Weaver(parent) {} void enqueue(const QVector<JobPointer> &jobs) Q_DECL_OVERRIDE { QVector<JobPointer> decorated; std::transform(jobs.begin(), jobs.end(), std::back_inserter(decorated), @@ -71,7 +71,7 @@ class CountingGlobalQueueFactory : public Queue::GlobalQueueFactory { - Queue *create(QObject *parent = 0) Q_DECL_OVERRIDE { + Queue *create(QObject *parent = nullptr) Q_DECL_OVERRIDE { return new Queue(new JobCountingWeaver, parent); } }; @@ -85,7 +85,7 @@ void testQueueFactory() { counter.storeRelease(0); - QCoreApplication app(argc, (char **)0); + QCoreApplication app(argc, (char **)nullptr); Queue queue(new JobCountingWeaver(this)); queue.enqueue(make_job([]() {})); // nop queue.finish(); @@ -95,7 +95,7 @@ void testGlobalQueueFactory() { Queue::setGlobalQueueFactory(new CountingGlobalQueueFactory()); - QCoreApplication app(argc, (char **)0); + QCoreApplication app(argc, (char **)nullptr); counter.storeRelease(0); Queue::instance()->enqueue(make_job([]() {})); // nop Queue::instance()->finish(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/QueueTests.cpp new/threadweaver-5.31.0/autotests/QueueTests.cpp --- old/threadweaver-5.30.0/autotests/QueueTests.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/QueueTests.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -87,7 +87,7 @@ QueueTests::QueueTests(QObject *parent) : QObject(parent) - , autoDeleteJob(0) + , autoDeleteJob(nullptr) { } @@ -147,7 +147,7 @@ // test that signals are properly emitted (asynchronously, that is): QVERIFY(thread() == QThread::currentThread()); QVERIFY(job == autoDeleteJob); - delete autoDeleteJob; autoDeleteJob = 0; + delete autoDeleteJob; autoDeleteJob = nullptr; } void QueueTests::DeleteDoneJobsFromSequenceTest() @@ -159,7 +159,7 @@ AppendCharacterJob c(QChar('c'), &sequence); Collection collection; collection << make_job_raw(autoDeleteJob) << b << c; - QVERIFY(autoDeleteJob != 0); + QVERIFY(autoDeleteJob != nullptr); QVERIFY(connect(autoDeleteJob, SIGNAL(done(ThreadWeaver::JobPointer)), SLOT(deleteJob(ThreadWeaver::JobPointer)))); stream() << collection; @@ -167,14 +167,14 @@ Queue::instance()->finish(); QTest::qWait(100); // return to event queue to make sure signals are delivered // no need to delete a, that should be done in deleteJob - QVERIFY(autoDeleteJob == 0); + QVERIFY(autoDeleteJob == nullptr); } void QueueTests::deleteCollection(ThreadWeaver::JobPointer collection) { QVERIFY(thread() == QThread::currentThread()); QVERIFY(collection == autoDeleteCollection); - delete autoDeleteCollection; autoDeleteCollection = 0; + delete autoDeleteCollection; autoDeleteCollection = nullptr; } void QueueTests::DeleteCollectionOnDoneTest() @@ -199,7 +199,7 @@ QTest::qWait(10); // no need to delete a, that should be done in deleteJob QVERIFY(sequence.length() == 2); - QVERIFY(autoDeleteCollection == 0); + QVERIFY(autoDeleteCollection == nullptr); } QTEST_MAIN(QueueTests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/QueueTests.h new/threadweaver-5.31.0/autotests/QueueTests.h --- old/threadweaver-5.30.0/autotests/QueueTests.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/QueueTests.h 2017-02-04 19:40:16.000000000 +0100 @@ -35,7 +35,7 @@ class LowPriorityAppendCharacterJob : public AppendCharacterJob { public: - LowPriorityAppendCharacterJob(QChar character = QChar(), QString *stringref = 0); + LowPriorityAppendCharacterJob(QChar character = QChar(), QString *stringref = nullptr); int priority() const Q_DECL_OVERRIDE; }; @@ -43,7 +43,7 @@ class HighPriorityAppendCharacterJob : public AppendCharacterJob { public: - HighPriorityAppendCharacterJob(QChar character = QChar(), QString *stringref = 0); + HighPriorityAppendCharacterJob(QChar character = QChar(), QString *stringref = nullptr); int priority() const Q_DECL_OVERRIDE; }; @@ -73,7 +73,7 @@ Q_OBJECT public: - explicit QueueTests(QObject *parent = 0); + explicit QueueTests(QObject *parent = nullptr); public Q_SLOTS: // this slot (which is not a test) is part of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/autotests/ShutdownOnQApplicationQuitTests.cpp new/threadweaver-5.31.0/autotests/ShutdownOnQApplicationQuitTests.cpp --- old/threadweaver-5.30.0/autotests/ShutdownOnQApplicationQuitTests.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/autotests/ShutdownOnQApplicationQuitTests.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -51,13 +51,13 @@ { { int argc = 0; - QCoreApplication app(argc, (char **)0); - QVERIFY(ThreadWeaver::Queue::instance() != 0); + QCoreApplication app(argc, (char **)nullptr); + QVERIFY(ThreadWeaver::Queue::instance() != nullptr); ThreadWeaver::Queue::instance()->suspend(); ThreadWeaver::Queue::instance()->resume(); QTest::qWait(10); } - QVERIFY(ThreadWeaver::Queue::instance() == 0); + QVERIFY(ThreadWeaver::Queue::instance() == nullptr); } QTEST_APPLESS_MAIN(ShutdownOnQApplicationQuitTests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/HelloInternet/MainWidget.h new/threadweaver-5.31.0/examples/HelloInternet/MainWidget.h --- old/threadweaver-5.30.0/examples/HelloInternet/MainWidget.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/HelloInternet/MainWidget.h 2017-02-04 19:40:16.000000000 +0100 @@ -10,7 +10,7 @@ Q_OBJECT public: - explicit MainWidget(QWidget *parent = 0); + explicit MainWidget(QWidget *parent = nullptr); ~MainWidget(); protected: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/HelloWorldRaw/HelloWorldRaw.cpp new/threadweaver-5.31.0/examples/HelloWorldRaw/HelloWorldRaw.cpp --- old/threadweaver-5.30.0/examples/HelloWorldRaw/HelloWorldRaw.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/HelloWorldRaw/HelloWorldRaw.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -32,7 +32,7 @@ //@@snippet_begin(sample-helloworldraw-class) class QDebugJob : public Job { public: - QDebugJob(const char* message = 0) : m_message(message) {} + QDebugJob(const char* message = nullptr) : m_message(message) {} protected: void run(JobPointer, Thread*) Q_DECL_OVERRIDE { qDebug() << m_message; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/ThumbNailer/AverageLoadManager.h new/threadweaver-5.31.0/examples/ThumbNailer/AverageLoadManager.h --- old/threadweaver-5.30.0/examples/ThumbNailer/AverageLoadManager.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/ThumbNailer/AverageLoadManager.h 2017-02-04 19:40:16.000000000 +0100 @@ -9,7 +9,7 @@ { Q_OBJECT public: - explicit AverageLoadManager(QObject *parent = 0); + explicit AverageLoadManager(QObject *parent = nullptr); void activate(bool enabled); bool available() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/ThumbNailer/Image.h new/threadweaver-5.31.0/examples/ThumbNailer/Image.h --- old/threadweaver-5.30.0/examples/ThumbNailer/Image.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/ThumbNailer/Image.h 2017-02-04 19:40:16.000000000 +0100 @@ -53,7 +53,7 @@ }; Image(const QString inputFileName = QString(), const QString outputFileName = QString(), - Model* model = 0, int id = 0); + Model* model = nullptr, int id = 0); Progress progress() const; QString description() const; QString details() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/ThumbNailer/ImageListFilter.h new/threadweaver-5.31.0/examples/ThumbNailer/ImageListFilter.h --- old/threadweaver-5.30.0/examples/ThumbNailer/ImageListFilter.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/ThumbNailer/ImageListFilter.h 2017-02-04 19:40:16.000000000 +0100 @@ -33,7 +33,7 @@ class ImageListFilter : public QSortFilterProxyModel { Q_OBJECT public: - explicit ImageListFilter(Image::Steps step, QObject* parent = 0); + explicit ImageListFilter(Image::Steps step, QObject* parent = nullptr); bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const Q_DECL_OVERRIDE; private: Image::Steps m_step; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/ThumbNailer/ItemDelegate.h new/threadweaver-5.31.0/examples/ThumbNailer/ItemDelegate.h --- old/threadweaver-5.30.0/examples/ThumbNailer/ItemDelegate.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/ThumbNailer/ItemDelegate.h 2017-02-04 19:40:16.000000000 +0100 @@ -24,7 +24,7 @@ { Q_OBJECT public: - ItemDelegate(QObject* parent = 0); + ItemDelegate(QObject* parent = nullptr); static const int FrameWidth; static const int TextMargin; static const int Margin; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/ThumbNailer/MainWindow.h new/threadweaver-5.31.0/examples/ThumbNailer/MainWindow.h --- old/threadweaver-5.30.0/examples/ThumbNailer/MainWindow.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/ThumbNailer/MainWindow.h 2017-02-04 19:40:16.000000000 +0100 @@ -44,7 +44,7 @@ Q_OBJECT public: - explicit MainWindow(QWidget *parent = 0); + explicit MainWindow(QWidget *parent = nullptr); ~MainWindow(); protected: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/examples/ThumbNailer/Model.h new/threadweaver-5.31.0/examples/ThumbNailer/Model.h --- old/threadweaver-5.30.0/examples/ThumbNailer/Model.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/examples/ThumbNailer/Model.h 2017-02-04 19:40:16.000000000 +0100 @@ -46,7 +46,7 @@ Role_StepRole }; - explicit Model(QObject *parent = 0); + explicit Model(QObject *parent = nullptr); int fileLoaderCap() const; void setFileLoaderCap(int cap); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/collection.cpp new/threadweaver-5.31.0/src/collection.cpp --- old/threadweaver-5.30.0/src/collection.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/collection.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -46,7 +46,7 @@ { public: CollectionExecuteWrapper() - : collection(0) + : collection(nullptr) {} void setCollection(Collection *collection_) @@ -94,7 +94,7 @@ MUTEX_ASSERT_UNLOCKED(mutex()); // dequeue all remaining jobs: QMutexLocker l(mutex()); Q_UNUSED(l); - if (d()->api != 0) { // still queued + if (d()->api != nullptr) { // still queued d()->dequeueElements(this, false); } } @@ -102,8 +102,8 @@ void Collection::addJob(JobPointer job) { QMutexLocker l(mutex()); Q_UNUSED(l); - REQUIRE(d()->api == 0 || d()->selfIsExecuting == true); // not queued yet or still running - REQUIRE(job != 0); + REQUIRE(d()->api == nullptr || d()->selfIsExecuting == true); // not queued yet or still running + REQUIRE(job != nullptr); CollectionExecuteWrapper *wrapper = new CollectionExecuteWrapper(); wrapper->setCollection(this); @@ -121,7 +121,7 @@ void Collection::aboutToBeQueued_locked(QueueAPI *api) { Q_ASSERT(!mutex()->tryLock()); - Q_ASSERT(d()->api == 0); // never queue twice + Q_ASSERT(d()->api == nullptr); // never queue twice d()->api = api; d()->selfExecuteWrapper.wrap(setExecutor(&d()->selfExecuteWrapper)); CollectionExecuteWrapper *wrapper = new CollectionExecuteWrapper(); @@ -135,7 +135,7 @@ Q_ASSERT(!mutex()->tryLock()); Q_ASSERT(api && d()->api == api); d()->dequeueElements(this, true); - d()->api = 0; + d()->api = nullptr; Job::aboutToBeDequeued_locked(api); } @@ -144,7 +144,7 @@ { QMutexLocker l(mutex()); Q_UNUSED(l); Q_ASSERT(d()->self.isNull()); - Q_ASSERT(d()->api != 0); + Q_ASSERT(d()->api != nullptr); d()->self = job; d()->selfIsExecuting = true; // reset in elementFinished } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/collection_p.cpp new/threadweaver-5.31.0/src/collection_p.cpp --- old/threadweaver-5.30.0/src/collection_p.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/collection_p.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -35,7 +35,7 @@ namespace Private { Collection_Private::Collection_Private() - : api(0) + : api(nullptr) , jobCounter(0) , selfIsExecuting(false) { @@ -53,7 +53,7 @@ if (collection->status() < Job::Status_Success) { collection->setStatus(Job::Status_Success); } - api = 0; + api = nullptr; } void Collection_Private::enqueueElements() @@ -132,7 +132,7 @@ void Collection_Private::stop_locked(Collection *collection) { Q_ASSERT(!mutex.tryLock()); - if (api != 0) { + if (api != nullptr) { TWDEBUG(4, "Collection::stop: dequeueing %p.\n", collection); if (!api->dequeue(ManagedJobPointer<Collection>(collection))) { dequeueElements(collection, false); @@ -144,7 +144,7 @@ { // dequeue everything: Q_ASSERT(!mutex.tryLock()); - if (api == 0) { + if (api == nullptr) { return; //not queued } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/dependencypolicy.cpp new/threadweaver-5.31.0/src/dependencypolicy.cpp --- old/threadweaver-5.30.0/src/dependencypolicy.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/dependencypolicy.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -77,7 +77,7 @@ void DependencyPolicy::addDependency(JobPointer jobA, JobPointer jobB) { // jobA depends on jobB - REQUIRE(jobA != 0 && jobB != 0 && jobA != jobB); + REQUIRE(jobA != nullptr && jobB != nullptr && jobA != jobB); QMutexLocker a(jobA->mutex()); QMutexLocker b(jobB->mutex()); @@ -96,7 +96,7 @@ bool DependencyPolicy::removeDependency(JobPointer jobA, JobPointer jobB) { - REQUIRE(jobA != 0 && jobB != 0); + REQUIRE(jobA != nullptr && jobB != nullptr); bool result = false; QMutexLocker l(d->mutex()); @@ -156,7 +156,7 @@ bool DependencyPolicy::hasUnresolvedDependencies(JobPointer job) const { - REQUIRE(job != 0); + REQUIRE(job != nullptr); QMutexLocker l(d->mutex()); return d->dependencies().contains(job); } @@ -175,13 +175,13 @@ bool DependencyPolicy::canRun(JobPointer job) { - REQUIRE(job != 0); + REQUIRE(job != nullptr); return !hasUnresolvedDependencies(job); } void DependencyPolicy::free(JobPointer job) { - REQUIRE(job != 0); + REQUIRE(job != nullptr); REQUIRE(job->status() > Job::Status_Running); if (job->success()) { resolveDependencies(job); @@ -195,12 +195,12 @@ void DependencyPolicy::release(JobPointer job) { - REQUIRE(job != 0); Q_UNUSED(job) + REQUIRE(job != nullptr); Q_UNUSED(job) } void DependencyPolicy::destructed(JobInterface *job) { - REQUIRE(job != 0); + REQUIRE(job != nullptr); resolveDependencies(ManagedJobPointer<JobInterface>(job)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/destructedstate.cpp new/threadweaver-5.31.0/src/destructedstate.cpp --- old/threadweaver-5.30.0/src/destructedstate.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/destructedstate.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -32,7 +32,7 @@ { DestructedState::DestructedState(QueueSignals *) - : WeaverImplState(0) // make sure we cannot use weaver, ever :-) + : WeaverImplState(nullptr) // make sure we cannot use weaver, ever :-) { } @@ -42,12 +42,12 @@ Weaver *DestructedState::weaver() { - return 0; + return nullptr; } const Weaver *DestructedState::weaver() const { - return 0; + return nullptr; } void DestructedState::setMaximumNumberOfThreads(int) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/executewrapper.cpp new/threadweaver-5.31.0/src/executewrapper.cpp --- old/threadweaver-5.30.0/src/executewrapper.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/executewrapper.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -42,13 +42,13 @@ { Executor *executor = job->setExecutor(wrapped.fetchAndAddOrdered(0)); Q_ASSERT_X(executor == this, Q_FUNC_INFO, "ExecuteWrapper can only unwrap itself!"); - wrapped.fetchAndStoreOrdered(0); + wrapped.fetchAndStoreOrdered(nullptr); return executor; } void ExecuteWrapper::begin(const JobPointer& job, Thread *thread) { - Q_ASSERT(wrapped.loadAcquire() != 0); + Q_ASSERT(wrapped.loadAcquire() != nullptr); wrapped.loadAcquire()->begin(job, thread); } @@ -60,13 +60,13 @@ void ExecuteWrapper::executeWrapped(const JobPointer& job, Thread *thread) { Executor *executor = wrapped.loadAcquire(); - Q_ASSERT_X(executor != 0, Q_FUNC_INFO, "Wrapped Executor cannot be zero!"); + Q_ASSERT_X(executor != nullptr, Q_FUNC_INFO, "Wrapped Executor cannot be zero!"); executor->execute(job, thread); } void ExecuteWrapper::end(const JobPointer& job, Thread *thread) { - Q_ASSERT(wrapped.loadAcquire() != 0); + Q_ASSERT(wrapped.loadAcquire() != nullptr); wrapped.loadAcquire()->end(job, thread); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/iddecorator.cpp new/threadweaver-5.31.0/src/iddecorator.cpp --- old/threadweaver-5.30.0/src/iddecorator.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/iddecorator.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -43,7 +43,7 @@ // autoDelete setting. The goal is not to require a dynamic allocation on creation. IdDecorator::IdDecorator(JobInterface *decoratee, bool autoDelete) : d1(reinterpret_cast<Private1 *>(decoratee)) - , d2(0) + , d2(nullptr) { setAutoDelete(autoDelete); } @@ -199,7 +199,7 @@ if (onOff) { d2 = reinterpret_cast<IdDecorator::Private2 *>(IdDecorator_AutoDelete); } else { - d2 = 0; + d2 = nullptr; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/job.cpp new/threadweaver-5.31.0/src/job.cpp --- old/threadweaver-5.30.0/src/job.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/job.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -101,12 +101,12 @@ void Job::blockingExecute() { - execute(ManagedJobPointer<Job>(this), 0); + execute(ManagedJobPointer<Job>(this), nullptr); } Executor *Job::setExecutor(Executor *executor) { - return d()->executor.fetchAndStoreOrdered(executor == 0 ? &Private::defaultExecutor : executor); + return d()->executor.fetchAndStoreOrdered(executor == nullptr ? &Private::defaultExecutor : executor); } Executor *Job::executor() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/qobjectdecorator.h new/threadweaver-5.31.0/src/qobjectdecorator.h --- old/threadweaver-5.30.0/src/qobjectdecorator.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/qobjectdecorator.h 2017-02-04 19:40:16.000000000 +0100 @@ -42,8 +42,8 @@ { Q_OBJECT public: - explicit QObjectDecorator(JobInterface *decoratee, QObject *parent = 0); - explicit QObjectDecorator(JobInterface *decoratee, bool autoDelete, QObject *parent = 0); + explicit QObjectDecorator(JobInterface *decoratee, QObject *parent = nullptr); + explicit QObjectDecorator(JobInterface *decoratee, bool autoDelete, QObject *parent = nullptr); Q_SIGNALS: /** This signal is emitted when this job is being processed by a thread. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/queue.cpp new/threadweaver-5.31.0/src/queue.cpp --- old/threadweaver-5.30.0/src/queue.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/queue.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -45,7 +45,7 @@ Private(Queue *q, QueueSignals *queue) : implementation(queue) { - Q_ASSERT_X(qApp != 0, Q_FUNC_INFO, "Cannot create global ThreadWeaver instance before QApplication!"); + Q_ASSERT_X(qApp != nullptr, Q_FUNC_INFO, "Cannot create global ThreadWeaver instance before QApplication!"); Q_ASSERT(queue); queue->setParent(q); q->connect(implementation, SIGNAL(finished()), SIGNAL(finished())); @@ -134,7 +134,7 @@ : QObject(app) , instance_(instance) { - Q_ASSERT_X(app != 0, Q_FUNC_INFO, "Calling ThreadWeaver::Weaver::instance() requires a QCoreApplication!"); + Q_ASSERT_X(app != nullptr, Q_FUNC_INFO, "Calling ThreadWeaver::Weaver::instance() requires a QCoreApplication!"); QObject *impl = instance.load()->findChild<QueueSignals*>(); Q_ASSERT(impl); impl->setObjectName(QStringLiteral("GlobalQueue")); @@ -143,9 +143,9 @@ ~StaticThreadWeaverInstanceGuard() { - instance_.fetchAndStoreOrdered(0); + instance_.fetchAndStoreOrdered(nullptr); delete globalQueueFactory; - globalQueueFactory = 0; + globalQueueFactory = nullptr; } private: static void shutDownGlobalQueue() @@ -178,7 +178,7 @@ //the object s_instance pointed to. static StaticThreadWeaverInstanceGuard *s_instanceGuard = new StaticThreadWeaverInstanceGuard(s_instance, qApp); Q_UNUSED(s_instanceGuard); - Q_ASSERT_X(s_instance.load() == 0 || s_instance.load()->thread() == QCoreApplication::instance()->thread(), + Q_ASSERT_X(s_instance.load() == nullptr || s_instance.load()->thread() == QCoreApplication::instance()->thread(), Q_FUNC_INFO, "The global ThreadWeaver queue needs to be instantiated (accessed first) from the main thread!"); return s_instance.loadAcquire(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/queue.h new/threadweaver-5.31.0/src/queue.h --- old/threadweaver-5.30.0/src/queue.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/queue.h 2017-02-04 19:40:16.000000000 +0100 @@ -56,10 +56,10 @@ { Q_OBJECT public: - explicit Queue(QObject *parent = 0); + explicit Queue(QObject *parent = nullptr); /** @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 = 0); + explicit Queue(QueueSignals *implementation, QObject *parent = nullptr); virtual ~Queue(); QueueStream stream(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/queueapi.h new/threadweaver-5.31.0/src/queueapi.h --- old/threadweaver-5.30.0/src/queueapi.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/queueapi.h 2017-02-04 19:40:16.000000000 +0100 @@ -41,8 +41,8 @@ Q_OBJECT public: - explicit QueueAPI(QObject *parent = 0); - explicit QueueAPI(ThreadWeaver::Private::QueueSignals_Private* d, QObject *parent = 0); + explicit QueueAPI(QObject *parent = nullptr); + explicit QueueAPI(ThreadWeaver::Private::QueueSignals_Private* d, QObject *parent = nullptr); virtual void shutDown_p() = 0; const State *state() const Q_DECL_OVERRIDE = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/queuesignals.cpp new/threadweaver-5.31.0/src/queuesignals.cpp --- old/threadweaver-5.30.0/src/queuesignals.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/queuesignals.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -39,7 +39,7 @@ /** @brief Construct a QueueSignals object, passing the QObject parent. */ QueueSignals::QueueSignals(QObject *parent) : QObject(parent) - , m_d(0) + , m_d(nullptr) { } @@ -52,7 +52,7 @@ QueueSignals::~QueueSignals() { delete m_d; - m_d = 0; + m_d = nullptr; } Private::QueueSignals_Private *QueueSignals::d() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/queuesignals.h new/threadweaver-5.31.0/src/queuesignals.h --- old/threadweaver-5.30.0/src/queuesignals.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/queuesignals.h 2017-02-04 19:40:16.000000000 +0100 @@ -41,8 +41,8 @@ { Q_OBJECT public: - explicit QueueSignals(QObject *parent = 0); - explicit QueueSignals(ThreadWeaver::Private::QueueSignals_Private* d, QObject *parent = 0); + explicit QueueSignals(QObject *parent = nullptr); + explicit QueueSignals(ThreadWeaver::Private::QueueSignals_Private* d, QObject *parent = nullptr); virtual ~QueueSignals(); Q_SIGNALS: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/sequence_p.cpp new/threadweaver-5.31.0/src/sequence_p.cpp --- old/threadweaver-5.30.0/src/sequence_p.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/sequence_p.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -58,7 +58,7 @@ void Sequence_Private::processCompletedElement(Collection* collection, JobPointer job, Thread*) { Q_ASSERT(!mutex.tryLock()); - Q_ASSERT(job != 0); + Q_ASSERT(job != nullptr); Q_ASSERT(!self.isNull()); const JobInterface::Status status = job->status(); if (status != JobInterface::Status_Success) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/thread.cpp new/threadweaver-5.31.0/src/thread.cpp --- old/threadweaver-5.30.0/src/thread.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/thread.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -47,7 +47,7 @@ explicit Private(Weaver *theParent) : parent(theParent) , id(makeId()) - , job(0) + , job(nullptr) { Q_ASSERT(parent); } @@ -88,7 +88,7 @@ void Thread::run() { Q_ASSERT(d->parent); - Q_ASSERT(QCoreApplication::instance() != 0); + Q_ASSERT(QCoreApplication::instance() != nullptr); d->parent->threadEnteredRun(this); emit started(this); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/thread.h new/threadweaver-5.31.0/src/thread.h --- old/threadweaver-5.30.0/src/thread.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/thread.h 2017-02-04 19:40:16.000000000 +0100 @@ -52,7 +52,7 @@ * * @param parent the parent Weaver */ - explicit Thread(Weaver *parent = 0); + explicit Thread(Weaver *parent = nullptr); /** The destructor. */ ~Thread(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/weaver.cpp new/threadweaver-5.31.0/src/weaver.cpp --- old/threadweaver-5.30.0/src/weaver.cpp 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/weaver.cpp 2017-02-04 19:40:16.000000000 +0100 @@ -107,7 +107,7 @@ // loop). for (;;) { - Thread *th = 0; + Thread *th = nullptr; { QMutexLocker l(d()->mutex); Q_UNUSED(l); if (d()->inventory.isEmpty()) { @@ -150,7 +150,7 @@ Q_ASSERT(!d()->mutex->tryLock()); //mutex has to be held when this method is called State *newState = d()->states[id].data(); State *previous = d()->state.fetchAndStoreOrdered(newState); - if (previous == 0 || previous->stateId() != id) { + if (previous == nullptr || previous->stateId() != id) { newState->activated(); TWDEBUG(2, "WeaverImpl::setState: state changed to \"%s\".\n", newState->stateName().toLatin1().constData()); if (id == Suspended) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/threadweaver-5.30.0/src/weaver.h new/threadweaver-5.31.0/src/weaver.h --- old/threadweaver-5.30.0/src/weaver.h 2017-01-08 16:53:09.000000000 +0100 +++ new/threadweaver-5.31.0/src/weaver.h 2017-02-04 19:40:16.000000000 +0100 @@ -52,7 +52,7 @@ { Q_OBJECT public: - explicit Weaver(QObject *parent = 0); + explicit Weaver(QObject *parent = nullptr); virtual ~Weaver(); void shutDown() Q_DECL_OVERRIDE; void shutDown_p() Q_DECL_OVERRIDE;