diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-08-08 13:09:29 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-09-26 11:53:30 +0200 |
commit | 537a49e19c720c13bbd9df03b66ac406be8e95c5 (patch) | |
tree | d1542acfcbaeccfbe5b79122926f2584378e035d | |
parent | dea8c7c861369db6f66aebd3b032d81efe87b1f9 (diff) | |
download | qttools-537a49e19c720c13bbd9df03b66ac406be8e95c5.tar.gz |
QDoc: Make QDocGlobals' getters const
Except for for QDocGlobals::dependModules(), as it returns a reference
which would drop the const qualifier.
Do this as it makes sense that getters are const anyway; also it allows
for further refactoring of the relationship between main.cpp and Config.
Change-Id: I552edeaa3fe9cb8d0b326402bf8af4b63afe910a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r-- | src/qdoc/qdocglobals.cpp | 26 | ||||
-rw-r--r-- | src/qdoc/qdocglobals.h | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/src/qdoc/qdocglobals.cpp b/src/qdoc/qdocglobals.cpp index 22e9beb70..05fa3a96f 100644 --- a/src/qdoc/qdocglobals.cpp +++ b/src/qdoc/qdocglobals.cpp @@ -33,7 +33,7 @@ #include <QtCore/qdir.h> #include <QtCore/qfile.h> -bool QDocGlobals::highlighting() +bool QDocGlobals::highlighting() const { return m_highlighting; } @@ -43,7 +43,7 @@ void QDocGlobals::enableHighlighting(bool value) m_highlighting = value; } -bool QDocGlobals::showInternal() +bool QDocGlobals::showInternal() const { return m_showInternal; } @@ -53,7 +53,7 @@ void QDocGlobals::setShowInternal(bool value) m_showInternal = value; } -bool QDocGlobals::singleExec() +bool QDocGlobals::singleExec() const { return m_singleExec; } @@ -62,7 +62,7 @@ void QDocGlobals::setSingleExec(bool value) m_singleExec = value; } -bool QDocGlobals::writeQaPages() +bool QDocGlobals::writeQaPages() const { return m_writeQaPages; } @@ -71,7 +71,7 @@ void QDocGlobals::setWriteQaPages(bool value) m_writeQaPages = value; } -bool QDocGlobals::redirectDocumentationToDevNull() +bool QDocGlobals::redirectDocumentationToDevNull() const { return m_redirectDocumentationToDevNull; } @@ -81,7 +81,7 @@ void QDocGlobals::setRedirectDocumentationToDevNull(bool value) m_redirectDocumentationToDevNull = value; } -bool QDocGlobals::noLinkErrors() +bool QDocGlobals::noLinkErrors() const { return m_noLinkErrors; } @@ -91,7 +91,7 @@ void QDocGlobals::setNoLinkErrors(bool value) m_noLinkErrors = value; } -bool QDocGlobals::autolinkErrors() +bool QDocGlobals::autolinkErrors() const { return m_autolinkErrors; } @@ -101,7 +101,7 @@ void QDocGlobals::setAutolinkErrors(bool value) m_autolinkErrors = value; } -bool QDocGlobals::obsoleteLinks() +bool QDocGlobals::obsoleteLinks() const { return m_obsoleteLinks; } @@ -111,7 +111,7 @@ void QDocGlobals::setObsoleteLinks(bool value) m_obsoleteLinks = value; } -QStringList QDocGlobals::defines() +QStringList QDocGlobals::defines() const { return m_defines; } @@ -121,7 +121,7 @@ void QDocGlobals::addDefine(const QStringList &valueList) m_defines += valueList; } -QStringList QDocGlobals::includesPaths() +QStringList QDocGlobals::includesPaths() const { return m_includesPaths; } @@ -137,7 +137,7 @@ QStringList &QDocGlobals::dependModules() return m_dependModules; } -QStringList QDocGlobals::indexDirs() +QStringList QDocGlobals::indexDirs() const { return m_indexDirs; } @@ -147,7 +147,7 @@ void QDocGlobals::appendToIndexDirs(const QString &path) m_indexDirs += path; } -QString QDocGlobals::currentDir() +QString QDocGlobals::currentDir() const { return m_currentDir; } @@ -157,7 +157,7 @@ void QDocGlobals::setCurrentDir(const QString &path) m_currentDir = path; } -QString QDocGlobals::previousCurrentDir() +QString QDocGlobals::previousCurrentDir() const { return m_previousCurrentDir; } diff --git a/src/qdoc/qdocglobals.h b/src/qdoc/qdocglobals.h index d1198db37..640dd6bf6 100644 --- a/src/qdoc/qdocglobals.h +++ b/src/qdoc/qdocglobals.h @@ -40,45 +40,45 @@ struct QDocCommandLineParser; class QDocGlobals { public: - bool highlighting(); + bool highlighting() const; void enableHighlighting(bool value); - bool showInternal(); + bool showInternal() const; void setShowInternal(bool value); - bool singleExec(); + bool singleExec() const; void setSingleExec(bool value); - bool writeQaPages(); + bool writeQaPages() const; void setWriteQaPages(bool value); - bool redirectDocumentationToDevNull(); + bool redirectDocumentationToDevNull() const; void setRedirectDocumentationToDevNull(bool value); - bool noLinkErrors(); + bool noLinkErrors() const; void setNoLinkErrors(bool value); - bool autolinkErrors(); + bool autolinkErrors() const; void setAutolinkErrors(bool value); - bool obsoleteLinks(); + bool obsoleteLinks() const; void setObsoleteLinks(bool value); - QStringList defines(); + QStringList defines() const; void addDefine(const QStringList &valueList); - QStringList includesPaths(); + QStringList includesPaths() const; void addIncludePath(const QString &flag, const QString &path); QStringList &dependModules(); - QStringList indexDirs(); + QStringList indexDirs() const; void appendToIndexDirs(const QString &path); - QString currentDir(); + QString currentDir() const; void setCurrentDir(const QString &path); - QString previousCurrentDir(); + QString previousCurrentDir() const; void setPreviousCurrentDir(const QString &path); void setOptions(const QDocCommandLineParser &parser); |