diff options
author | Albert Astals Cid <aacid@kde.org> | 2018-01-08 22:55:00 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2018-01-08 22:55:00 +0100 |
commit | e428033c2d7efbbbf89bb2f84c8998521ac7ef8e (patch) | |
tree | 546f48df418659224c4500adc01fcddb4d9384a9 /qt5/tests/stress-threads-qt5.cpp | |
parent | 2e47887616155dee566083e1aac9adab69aa4386 (diff) |
Run clang-tidy with modernize nullptr
Also add two enum values in the qt5 frontend to representate no flags
Also mark glib/gtk/cairo system includes so that gcc doesn't report the issues in those headers
Diffstat (limited to 'qt5/tests/stress-threads-qt5.cpp')
-rw-r--r-- | qt5/tests/stress-threads-qt5.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qt5/tests/stress-threads-qt5.cpp b/qt5/tests/stress-threads-qt5.cpp index 0dc813e6..1e1095a1 100644 --- a/qt5/tests/stress-threads-qt5.cpp +++ b/qt5/tests/stress-threads-qt5.cpp @@ -19,7 +19,7 @@ class SillyThread : public QThread { public: - SillyThread(Poppler::Document* document, QObject* parent = 0); + SillyThread(Poppler::Document* document, QObject* parent = nullptr); void run() override; @@ -32,7 +32,7 @@ private: class CrazyThread : public QThread { public: - CrazyThread(uint seed, Poppler::Document* document, QMutex* annotationMutex, QObject* parent = 0); + CrazyThread(uint seed, Poppler::Document* document, QMutex* annotationMutex, QObject* parent = nullptr); void run() override; @@ -47,7 +47,7 @@ static Poppler::Page* loadPage(Poppler::Document* document, int index) { Poppler::Page* page = document->page(index); - if(page == 0) + if(page == nullptr) { qDebug() << "!Document::page"; @@ -169,7 +169,7 @@ void CrazyThread::run() PagePointer page(loadRandomPage(m_document)); - Poppler::Annotation* annotation = 0; + Poppler::Annotation* annotation = nullptr; switch(qrand() % 3) { @@ -271,14 +271,14 @@ int main(int argc, char** argv) const int sillyCount = atoi(argv[2]); const int crazyCount = atoi(argv[3]); - qsrand(time(0)); + qsrand(time(nullptr)); for(int argi = 4; argi < argc; ++argi) { const QString file = QFile::decodeName(argv[argi]); Poppler::Document* document = Poppler::Document::load(file); - if(document == 0) + if(document == nullptr) { qDebug() << "Could not load" << file; continue; |