summaryrefslogtreecommitdiff
path: root/qt5/tests/stress-threads-qt5.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2018-01-08 22:55:00 +0100
committerAlbert Astals Cid <aacid@kde.org>2018-01-08 22:55:00 +0100
commite428033c2d7efbbbf89bb2f84c8998521ac7ef8e (patch)
tree546f48df418659224c4500adc01fcddb4d9384a9 /qt5/tests/stress-threads-qt5.cpp
parent2e47887616155dee566083e1aac9adab69aa4386 (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.cpp12
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;