diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-12-15 19:36:54 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2019-11-25 12:01:39 +0100 |
commit | b2b7503192cb6cb2f0c97a76a5320f710d2d6568 (patch) | |
tree | a4c4669a0044175cb9aec4b0df67b283072f5f0a | |
parent | b9f3310cf9f5d2a35c1c97c334931052cee6f932 (diff) |
replace Q_NULLPTR and Q_DECL_OVERRIDE
Change-Id: Icf33776f70bdde71f320de0a129361ac28fd18c8
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
-rw-r--r-- | examples/widgets/pdfviewer/pagerenderer.h | 2 | ||||
-rw-r--r-- | src/pdf/qpdfbookmarkmodel.h | 12 | ||||
-rw-r--r-- | src/pdf/qpdfdocument.cpp | 12 | ||||
-rw-r--r-- | src/pdf/qpdfdocument.h | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/examples/widgets/pdfviewer/pagerenderer.h b/examples/widgets/pdfviewer/pagerenderer.h index be861a974..2e884eed2 100644 --- a/examples/widgets/pdfviewer/pagerenderer.h +++ b/examples/widgets/pdfviewer/pagerenderer.h @@ -43,7 +43,7 @@ signals: void pageReady(int page, qreal zoom, QImage image); protected: - void run() Q_DECL_OVERRIDE; + void run() override; private: void renderPage(int page, qreal zoom); diff --git a/src/pdf/qpdfbookmarkmodel.h b/src/pdf/qpdfbookmarkmodel.h index d42950184..251789153 100644 --- a/src/pdf/qpdfbookmarkmodel.h +++ b/src/pdf/qpdfbookmarkmodel.h @@ -53,7 +53,7 @@ public: }; Q_ENUM(Role) - explicit QPdfBookmarkModel(QObject *parent = Q_NULLPTR); + explicit QPdfBookmarkModel(QObject *parent = nullptr); QPdfDocument* document() const; void setDocument(QPdfDocument *document); @@ -61,11 +61,11 @@ public: StructureMode structureMode() const; void setStructureMode(StructureMode mode); - QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; - QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE; - int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; - int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &index, int role) const override; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex &index) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; Q_SIGNALS: void documentChanged(QPdfDocument *document); diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp index 709c702bf..b6af97c81 100644 --- a/src/pdf/qpdfdocument.cpp +++ b/src/pdf/qpdfdocument.cpp @@ -39,8 +39,8 @@ QPdfMutexLocker::QPdfMutexLocker() } QPdfDocumentPrivate::QPdfDocumentPrivate() - : avail(Q_NULLPTR) - , doc(Q_NULLPTR) + : avail(nullptr) + , doc(nullptr) , loadComplete(false) , status(QPdfDocument::Null) , lastError(QPdfDocument::NoError) @@ -83,11 +83,11 @@ void QPdfDocumentPrivate::clear() if (doc) FPDF_CloseDocument(doc); - doc = Q_NULLPTR; + doc = nullptr; if (avail) FPDFAvail_Destroy(avail); - avail = Q_NULLPTR; + avail = nullptr; lock.unlock(); loadComplete = false; @@ -229,7 +229,7 @@ void QPdfDocumentPrivate::tryLoadDocument() if (lastError == QPdfDocument::IncorrectPasswordError) { FPDF_CloseDocument(doc); - doc = Q_NULLPTR; + doc = nullptr; setStatus(QPdfDocument::Error); emit q->passwordRequired(); @@ -432,7 +432,7 @@ QVariant QPdfDocument::metaData(MetaDataField field) const } QPdfMutexLocker lock; - const unsigned long len = FPDF_GetMetaText(d->doc, fieldName.constData(), Q_NULLPTR, 0); + const unsigned long len = FPDF_GetMetaText(d->doc, fieldName.constData(), nullptr, 0); QVector<ushort> buf(len); FPDF_GetMetaText(d->doc, fieldName.constData(), buf.data(), buf.length()); diff --git a/src/pdf/qpdfdocument.h b/src/pdf/qpdfdocument.h index 9db8eaa6a..fc24bfdda 100644 --- a/src/pdf/qpdfdocument.h +++ b/src/pdf/qpdfdocument.h @@ -71,7 +71,7 @@ public: }; Q_ENUM(MetaDataField) - explicit QPdfDocument(QObject *parent = Q_NULLPTR); + explicit QPdfDocument(QObject *parent = nullptr); ~QPdfDocument(); DocumentError load(const QString &fileName); |