diff options
author | Robert Brock <robert.brock@kdab.com> | 2016-03-02 16:04:07 +0000 |
---|---|---|
committer | Robert Brock <robert.brock@kdab.com> | 2016-03-03 09:36:37 +0000 |
commit | 568805fd24931787b8d318d869fa7149f09dc958 (patch) | |
tree | c7ab812ec4fcf31909a06996bb32f95a63369279 /src | |
parent | c14e55774d10b56a9283e873dc3ba1645a3b8392 (diff) |
QAbstractSceneParser property renaming
renamed parserStatus to statusChanged
renamed isExtensionSupported to isFileTypeSupported
As per API review
Change-Id: I22bdfca53ae7d7b1c8dd07642261a98ddcdbebed
Task-number: QTBUG-51485
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/sceneparsers/assimp/assimpparser.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sceneparsers/assimp/assimpparser.h | 2 | ||||
-rw-r--r-- | src/plugins/sceneparsers/gltf/gltfparser.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sceneparsers/gltf/gltfparser.h | 2 | ||||
-rw-r--r-- | src/render/io/qabstractsceneparser.cpp | 14 | ||||
-rw-r--r-- | src/render/io/qabstractsceneparser.h | 12 | ||||
-rw-r--r-- | src/render/jobs/loadscenejob.cpp | 2 |
7 files changed, 18 insertions, 18 deletions
diff --git a/src/plugins/sceneparsers/assimp/assimpparser.cpp b/src/plugins/sceneparsers/assimp/assimpparser.cpp index e506372e9..20a2c4525 100644 --- a/src/plugins/sceneparsers/assimp/assimpparser.cpp +++ b/src/plugins/sceneparsers/assimp/assimpparser.cpp @@ -336,7 +336,7 @@ void AssimpParser::setSource(const QUrl &source) * Returns \c true if the extension of \a source is supported by * the assimp parser. */ -bool AssimpParser::isExtensionSupported(const QUrl &source) const +bool AssimpParser::isFileTypeSupported(const QUrl &source) const { const QString path = QUrlHelper::urlToLocalFileOrQrc(source); return AssimpParser::isAssimpPath(path); diff --git a/src/plugins/sceneparsers/assimp/assimpparser.h b/src/plugins/sceneparsers/assimp/assimpparser.h index fcc7bf592..22acd80c5 100644 --- a/src/plugins/sceneparsers/assimp/assimpparser.h +++ b/src/plugins/sceneparsers/assimp/assimpparser.h @@ -92,7 +92,7 @@ public: // SceneParserInterface interface void setSource(const QUrl& source) Q_DECL_OVERRIDE; - bool isExtensionSupported(const QUrl &source) const Q_DECL_OVERRIDE; + bool isFileTypeSupported(const QUrl &source) const Q_DECL_OVERRIDE; Qt3DCore::QEntity *scene(const QString &id = QString()) Q_DECL_OVERRIDE; Qt3DCore::QEntity *node(const QString &id) Q_DECL_OVERRIDE; diff --git a/src/plugins/sceneparsers/gltf/gltfparser.cpp b/src/plugins/sceneparsers/gltf/gltfparser.cpp index 5a6c10025..532ea242d 100644 --- a/src/plugins/sceneparsers/gltf/gltfparser.cpp +++ b/src/plugins/sceneparsers/gltf/gltfparser.cpp @@ -223,7 +223,7 @@ void GLTFParser::setSource(const QUrl &source) * Returns true if the extension of \a path is supported by the * GLTF parser. */ -bool GLTFParser::isExtensionSupported(const QUrl &source) const +bool GLTFParser::isFileTypeSupported(const QUrl &source) const { const QString path = QUrlHelper::urlToLocalFileOrQrc(source); return GLTFParser::isGLTFPath(path); diff --git a/src/plugins/sceneparsers/gltf/gltfparser.h b/src/plugins/sceneparsers/gltf/gltfparser.h index ff2a9baec..87c6859ab 100644 --- a/src/plugins/sceneparsers/gltf/gltfparser.h +++ b/src/plugins/sceneparsers/gltf/gltfparser.h @@ -95,7 +95,7 @@ public: // SceneParserInterface interface void setSource(const QUrl &source) Q_DECL_FINAL; - bool isExtensionSupported(const QUrl &source) const Q_DECL_FINAL; + bool isFileTypeSupported(const QUrl &source) const Q_DECL_FINAL; Qt3DCore::QEntity *node(const QString &id) Q_DECL_FINAL; Qt3DCore::QEntity *scene(const QString &id = QString()) Q_DECL_FINAL; diff --git a/src/render/io/qabstractsceneparser.cpp b/src/render/io/qabstractsceneparser.cpp index 26f410ed9..351d9b2a7 100644 --- a/src/render/io/qabstractsceneparser.cpp +++ b/src/render/io/qabstractsceneparser.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE namespace Qt3DRender { QAbstractSceneParser::QAbstractSceneParser() : QObject(), - m_parserStatus(Empty) + m_status(Empty) { } @@ -54,9 +54,9 @@ QAbstractSceneParser::~QAbstractSceneParser() { } -QAbstractSceneParser::ParserStatus QAbstractSceneParser::parserStatus() const +QAbstractSceneParser::ParserStatus QAbstractSceneParser::status() const { - return m_parserStatus; + return m_status; } QStringList QAbstractSceneParser::errors() const @@ -64,11 +64,11 @@ QStringList QAbstractSceneParser::errors() const return m_errors; } -void QAbstractSceneParser::setParserStatus(ParserStatus parserStatus) +void QAbstractSceneParser::setStatus(ParserStatus status) { - if (parserStatus != m_parserStatus) { - m_parserStatus = parserStatus; - emit parserStatusChanged(parserStatus); + if (status != m_status) { + m_status = status; + emit statusChanged(status); } } diff --git a/src/render/io/qabstractsceneparser.h b/src/render/io/qabstractsceneparser.h index 07a5ee9b5..69ca4f131 100644 --- a/src/render/io/qabstractsceneparser.h +++ b/src/render/io/qabstractsceneparser.h @@ -59,7 +59,7 @@ Q_DECLARE_LOGGING_CATEGORY(SceneParsers) class QT3DRENDERSHARED_EXPORT QAbstractSceneParser : public QObject { Q_OBJECT - Q_PROPERTY(ParserStatus parserStatus READ parserStatus NOTIFY parserStatusChanged) + Q_PROPERTY(ParserStatus status READ status NOTIFY statusChanged) Q_PROPERTY(QStringList errors READ errors NOTIFY errorsChanged) public: @@ -75,24 +75,24 @@ public: virtual ~QAbstractSceneParser(); virtual void setSource(const QUrl &source) = 0; - virtual bool isExtensionSupported(const QUrl &source) const = 0; + virtual bool isFileTypeSupported(const QUrl &source) const = 0; virtual Qt3DCore::QEntity *scene(const QString &id = QString()) = 0; virtual Qt3DCore::QEntity *node(const QString &id) = 0; - ParserStatus parserStatus() const; + ParserStatus status() const; QStringList errors() const; Q_SIGNALS: - void parserStatusChanged(ParserStatus parserStatus); + void statusChanged(ParserStatus status); void errorsChanged(const QStringList &errors); protected: - void setParserStatus(ParserStatus parserStatus); + void setStatus(ParserStatus status); void logError(const QString &error); void logInfo(const QString &info); private: - ParserStatus m_parserStatus; + ParserStatus m_status; QStringList m_errors; }; diff --git a/src/render/jobs/loadscenejob.cpp b/src/render/jobs/loadscenejob.cpp index 610091953..eacfe403d 100644 --- a/src/render/jobs/loadscenejob.cpp +++ b/src/render/jobs/loadscenejob.cpp @@ -62,7 +62,7 @@ void LoadSceneJob::run() Qt3DCore::QEntity *sceneTree = m_managers->sceneManager()->sceneTreeFromSource(m_source); if (sceneTree == Q_NULLPTR) { Q_FOREACH (QAbstractSceneParser *parser, m_parsers) { - if (parser->isExtensionSupported(m_source)) { + if (parser->isFileTypeSupported(m_source)) { parser->setSource(m_source); sceneTree = parser->scene(); m_managers->sceneManager()->addLoadedSceneTree(m_source, sceneTree); |