summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-12-15 19:36:54 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2016-12-16 07:54:56 +0000
commit3fe795a595462997bddc5997e39de4f84b85ba6a (patch)
treed772a3c22dafe4160df8c0bbabf78dba00b3d095
parent071e98a119548353246a969b8cd7e87e9f99000e (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.h2
-rw-r--r--src/pdf/qpdfbookmarkmodel.h12
-rw-r--r--src/pdf/qpdfdocument.cpp12
-rw-r--r--src/pdf/qpdfdocument.h2
4 files changed, 14 insertions, 14 deletions
diff --git a/examples/widgets/pdfviewer/pagerenderer.h b/examples/widgets/pdfviewer/pagerenderer.h
index be861a9..2e884ee 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 d429501..2517891 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 709c702..b6af97c 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 9db8eaa..fc24bfd 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);