diff options
author | Mike Krus <mike.krus@kdab.com> | 2019-05-28 12:05:14 +0100 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2019-05-28 14:22:32 +0100 |
commit | 6a8cfd6e52ad340c80b5a8b862b713192cecf791 (patch) | |
tree | f37c56c315a6808c560152253109c1bc2f567c37 | |
parent | da99cc29a09656c387070f5e32acd23720fe5def (diff) |
Clean up warnings
Change-Id: I1ddad305359586481021e85f6e4a470d3a6521b0
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | src/quick3d/quick3d/qt3dquick_global.cpp | 14 | ||||
-rw-r--r-- | src/render/jobs/framecleanupjob.cpp | 1 | ||||
-rw-r--r-- | src/render/renderers/opengl/renderer/renderer.cpp | 2 | ||||
-rw-r--r-- | tests/auto/core/qentity/tst_qentity.cpp | 6 | ||||
-rw-r--r-- | tests/auto/render/textures/tst_textures.cpp | 1 |
5 files changed, 13 insertions, 11 deletions
diff --git a/src/quick3d/quick3d/qt3dquick_global.cpp b/src/quick3d/quick3d/qt3dquick_global.cpp index 8c88feef1..afba0ad32 100644 --- a/src/quick3d/quick3d/qt3dquick_global.cpp +++ b/src/quick3d/quick3d/qt3dquick_global.cpp @@ -54,7 +54,7 @@ namespace Quick { class Quick3DColorProvider : public QQmlColorProvider { public: - QVariant colorFromString(const QString &s, bool *ok) + QVariant colorFromString(const QString &s, bool *ok) override { QColor c(s); if (c.isValid()) { @@ -66,7 +66,7 @@ public: return QVariant(); } - unsigned rgbaFromString(const QString &s, bool *ok) + unsigned rgbaFromString(const QString &s, bool *ok) override { QColor c(s); if (c.isValid()) { @@ -88,12 +88,12 @@ public: return QString(); } - QVariant fromRgbF(double r, double g, double b, double a) + QVariant fromRgbF(double r, double g, double b, double a) override { return QVariant(QColor::fromRgbF(r, g, b, a)); } - QVariant fromHslF(double h, double s, double l, double a) + QVariant fromHslF(double h, double s, double l, double a) override { return QVariant(QColor::fromHslF(h, s, l, a)); } @@ -103,21 +103,21 @@ public: return QVariant(QColor::fromHsvF(h, s, v, a)); } - QVariant lighter(const QVariant &var, qreal factor) + QVariant lighter(const QVariant &var, qreal factor) override { QColor color = var.value<QColor>(); color = color.lighter(int(qRound(factor*100.))); return QVariant::fromValue(color); } - QVariant darker(const QVariant &var, qreal factor) + QVariant darker(const QVariant &var, qreal factor) override { QColor color = var.value<QColor>(); color = color.darker(int(qRound(factor*100.))); return QVariant::fromValue(color); } - QVariant tint(const QVariant &baseVar, const QVariant &tintVar) + QVariant tint(const QVariant &baseVar, const QVariant &tintVar) override { QColor tintColor = tintVar.value<QColor>(); diff --git a/src/render/jobs/framecleanupjob.cpp b/src/render/jobs/framecleanupjob.cpp index 7ebe31531..d0496f991 100644 --- a/src/render/jobs/framecleanupjob.cpp +++ b/src/render/jobs/framecleanupjob.cpp @@ -79,6 +79,7 @@ void FrameCleanupJob::run() void FrameCleanupJob::updateBoundingVolumesDebug(Entity *node) { + Q_UNUSED(node); #if 0 BoundingVolumeDebug *debugBV = node->renderComponent<BoundingVolumeDebug>(); if (debugBV) { diff --git a/src/render/renderers/opengl/renderer/renderer.cpp b/src/render/renderers/opengl/renderer/renderer.cpp index e9c582458..59949ee34 100644 --- a/src/render/renderers/opengl/renderer/renderer.cpp +++ b/src/render/renderers/opengl/renderer/renderer.cpp @@ -192,13 +192,13 @@ Renderer::Renderer(QRenderAspect::RenderType type) , m_updateMeshTriangleListJob(Render::UpdateMeshTriangleListJobPtr::create()) , m_filterCompatibleTechniqueJob(Render::FilterCompatibleTechniqueJobPtr::create()) , m_updateEntityLayersJob(Render::UpdateEntityLayersJobPtr::create()) + , m_updateEntityHierarchyJob(Render::UpdateEntityHierarchyJobPtr::create()) , m_bufferGathererJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { lookForDirtyBuffers(); }, JobTypes::DirtyBufferGathering)) , m_vaoGathererJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { lookForAbandonedVaos(); }, JobTypes::DirtyVaoGathering)) , m_textureGathererJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { lookForDirtyTextures(); }, JobTypes::DirtyTextureGathering)) , m_sendTextureChangesToFrontendJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { sendTextureChangesToFrontend(); }, JobTypes::SendTextureChangesToFrontend)) , m_introspectShaderJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([this] { reloadDirtyShaders(); }, JobTypes::DirtyShaderGathering)) , m_syncTextureLoadingJob(Render::GenericLambdaJobPtr<std::function<void ()>>::create([] {}, JobTypes::SyncTextureLoading)) - , m_updateEntityHierarchyJob(Render::UpdateEntityHierarchyJobPtr::create()) , m_ownedContext(false) , m_offscreenHelper(nullptr) #if QT_CONFIG(qt3d_profile_jobs) diff --git a/tests/auto/core/qentity/tst_qentity.cpp b/tests/auto/core/qentity/tst_qentity.cpp index e27cd1fc9..ef520d7f2 100644 --- a/tests/auto/core/qentity/tst_qentity.cpp +++ b/tests/auto/core/qentity/tst_qentity.cpp @@ -71,7 +71,7 @@ class MyQComponent : public Qt3DCore::QComponent { Q_OBJECT public: - explicit MyQComponent(Qt3DCore::QNode *parent = 0) + explicit MyQComponent(Qt3DCore::QNode *parent = nullptr) : QComponent(parent) {} }; @@ -80,7 +80,7 @@ public: class MyEntity : public Qt3DCore::QEntity { public: - explicit MyEntity(Qt3DCore::QNode *parent = 0) + explicit MyEntity(Qt3DCore::QNode *parent = nullptr) : QEntity(parent) {} }; @@ -589,6 +589,8 @@ void tst_Entity::checkCloning_data() Qt3DCore::QEntity *grandChild = new MyEntity(entityWithNestedChildren); QVector<QNodeId> childIds = {child->id(), grandChild->id()}; QTest::newRow("entityWithNestedChildren") << entityWithNestedChildren << childIds << 4; + + Q_UNUSED(dummy); } } diff --git a/tests/auto/render/textures/tst_textures.cpp b/tests/auto/render/textures/tst_textures.cpp index 8bd4b355c..010ed56a5 100644 --- a/tests/auto/render/textures/tst_textures.cpp +++ b/tests/auto/render/textures/tst_textures.cpp @@ -360,7 +360,6 @@ private Q_SLOTS: { // GIVEN QScopedPointer<Qt3DRender::Render::NodeManagers> mgrs(new Qt3DRender::Render::NodeManagers()); - Qt3DRender::Render::TextureManager *texMgr = mgrs->textureManager(); Qt3DRender::Render::TextureImageDataManager *texImgDataMgr = mgrs->textureImageDataManager(); TestTextureImage img(1); |