summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-07-06 13:46:31 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2018-07-06 12:47:04 +0000
commit927ba6e8e93b6bc5bff143222a55f7ec9577cd46 (patch)
tree25bc763b8cfccaa6a50fffae37d257fb8fb581b2
parent1f1cec2dbdd9da2aa3866f5f7ed2100582d3b29d (diff)
Fix bunch of compiler warnings
Change-Id: Ie383f6f72be3d2948fbd03a44ac4a48b1cc58302 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Authoring/Client/Code/Core/Doc/Doc.cpp2
-rw-r--r--src/Authoring/Common/Code/Graph/Graph.cpp2
-rw-r--r--src/Authoring/QT3DSDM/QT3DSDM.pro1
-rw-r--r--src/Authoring/QT3DSDM/Systems/Cores/SimpleAnimationCore.cpp4
-rw-r--r--src/Authoring/QT3DSDM/Systems/Qt3DSDMHandles.cpp33
-rw-r--r--src/Authoring/QT3DSIMP/Qt3DSImportSGTranslation/Qt3DSImportColladaSGTranslation.cpp3
-rw-r--r--src/Authoring/Studio/Palettes/Action/ActionModel.cpp2
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/InteractiveTimelineItem.cpp2
-rw-r--r--src/Authoring/Studio/Render/StudioGradientWidget.cpp8
-rw-r--r--src/Authoring/Studio/Render/StudioRendererTranslation.cpp2
-rw-r--r--src/Runtime/Qt3DSRuntimeStatic/Qt3DSRuntimeStatic.pro8
-rw-r--r--src/Runtime/Source/Engine/Source/EnginePrefix.cpp31
-rw-r--r--src/Runtime/Source/Qt3DSRender/Source/Qt3DSRenderShaderProgram.cpp4
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderDynamicObjectSystemUtil.h2
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderLightConstantProperties.h2
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/RendererImpl/Qt3DSVertexPipelineImpl.h4
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureBMP.cpp1
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureDDS.cpp1
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureGIF.cpp1
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialShaderGenerator.cpp5
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialSystem.cpp2
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDefaultMaterialShaderGenerator.cpp13
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDynamicObjectSystem.cpp3
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderGraphObjectSerializer.cpp2
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderShaderCache.cpp18
-rw-r--r--src/Runtime/Source/Qt3DSRuntimeRender/Source/q3dsqmlrender.cpp7
-rw-r--r--src/Runtime/Source/Runtime/Source/RuntimePrefix.cpp31
-rw-r--r--src/Runtime/Source/System/Source/SystemPrefix.cpp31
-rw-r--r--src/commonplatform.pri3
29 files changed, 60 insertions, 168 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
index 3cc4a485..b72fcbc2 100644
--- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
@@ -574,7 +574,7 @@ CDoc::GetInstanceFromSelectable(Q3DStudio::SSelectedValue inSelectedItem)
int CDoc::getSelectedInstancesCount() const
{
- return m_SelectedValue.GetSelectedInstances().size();
+ return int(m_SelectedValue.GetSelectedInstances().size());
}
qt3dsdm::Qt3DSDMInstanceHandle CDoc::GetSelectedInstance()
diff --git a/src/Authoring/Common/Code/Graph/Graph.cpp b/src/Authoring/Common/Code/Graph/Graph.cpp
index 463f111c..2d14b2cc 100644
--- a/src/Authoring/Common/Code/Graph/Graph.cpp
+++ b/src/Authoring/Common/Code/Graph/Graph.cpp
@@ -52,7 +52,7 @@ typedef Q3DStudio::Graph::SGraphNode<int, int> SGraphableImpl;
typedef SGraphableImpl *TGraphableImplPtr;
typedef SGraphableImpl::TNodeList TGraphableImplList;
-struct SGraphImpl;
+class SGraphImpl;
typedef SGraphImpl *TGraphImplPtr;
// Transaction events are implemented by this small set of satellite classes.
diff --git a/src/Authoring/QT3DSDM/QT3DSDM.pro b/src/Authoring/QT3DSDM/QT3DSDM.pro
index 63e1a824..3e2cc68e 100644
--- a/src/Authoring/QT3DSDM/QT3DSDM.pro
+++ b/src/Authoring/QT3DSDM/QT3DSDM.pro
@@ -36,7 +36,6 @@ SOURCES += \
Systems/StudioPropertySystem.cpp \
Systems/Qt3DSDMComposerTypeDefinitions.cpp \
Systems/Qt3DSDMGuides.cpp \
- Systems/Qt3DSDMHandles.cpp \
Systems/Qt3DSDMMetaData.cpp \
Systems/Qt3DSDMSignalSystem.cpp \
Systems/Qt3DSDMStringTable.cpp \
diff --git a/src/Authoring/QT3DSDM/Systems/Cores/SimpleAnimationCore.cpp b/src/Authoring/QT3DSDM/Systems/Cores/SimpleAnimationCore.cpp
index 38f08e11..c15854f1 100644
--- a/src/Authoring/QT3DSDM/Systems/Cores/SimpleAnimationCore.cpp
+++ b/src/Authoring/QT3DSDM/Systems/Cores/SimpleAnimationCore.cpp
@@ -29,6 +29,10 @@
#include "Qt3DSDMPrefix.h"
#include "SimpleAnimationCore.h"
+#ifdef _WIN32
+#pragma warning(disable : 4503) // decorated name length exceeded
+#endif
+
typedef long INT32;
typedef float FLOAT;
#define DATALOGGER_CUBICROOT 0
diff --git a/src/Authoring/QT3DSDM/Systems/Qt3DSDMHandles.cpp b/src/Authoring/QT3DSDM/Systems/Qt3DSDMHandles.cpp
deleted file mode 100644
index 703424ba..00000000
--- a/src/Authoring/QT3DSDM/Systems/Qt3DSDMHandles.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt 3D Studio.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "Qt3DSDMPrefix.h"
-#include "Qt3DSDMHandles.h"
-
-namespace qt3dsdm {
-}
diff --git a/src/Authoring/QT3DSIMP/Qt3DSImportSGTranslation/Qt3DSImportColladaSGTranslation.cpp b/src/Authoring/QT3DSIMP/Qt3DSImportSGTranslation/Qt3DSImportColladaSGTranslation.cpp
index 7f5c4940..20775960 100644
--- a/src/Authoring/QT3DSIMP/Qt3DSImportSGTranslation/Qt3DSImportColladaSGTranslation.cpp
+++ b/src/Authoring/QT3DSIMP/Qt3DSImportSGTranslation/Qt3DSImportColladaSGTranslation.cpp
@@ -403,7 +403,8 @@ void ColladaDOMWalker::SetFColladaAuthoringTool(const char *inName)
// Guess the authoring tool type & version
// This looks very hackish because there is no standard and it is based on the test data that I
// have
- const std::string theAuthoringToolLowerCase = QByteArray::fromRawData(inName, strlen(inName)).toLower().toStdString();
+ const std::string theAuthoringToolLowerCase = QByteArray::fromRawData(
+ inName, int(strlen(inName))).toLower().toStdString();
EAuthoringToolType theAuthoringToolType = EAuthoringToolType_Unknown;
if (theAuthoringToolLowerCase.find("studiocore") != std::string::npos) {
diff --git a/src/Authoring/Studio/Palettes/Action/ActionModel.cpp b/src/Authoring/Studio/Palettes/Action/ActionModel.cpp
index a9d7a074..556215de 100644
--- a/src/Authoring/Studio/Palettes/Action/ActionModel.cpp
+++ b/src/Authoring/Studio/Palettes/Action/ActionModel.cpp
@@ -71,7 +71,7 @@ int ActionModel::rowCount(const QModelIndex &parent) const
if (parent.isValid())
return 0;
- return m_actions.size();
+ return int(m_actions.size());
}
QVariant ActionModel::data(const QModelIndex &index, int role) const
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/InteractiveTimelineItem.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/InteractiveTimelineItem.cpp
index 163c55ad..a4bb31f4 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/InteractiveTimelineItem.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/InteractiveTimelineItem.cpp
@@ -48,12 +48,14 @@ int InteractiveTimelineItem::type() const
void InteractiveTimelineItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
+ Q_UNUSED(event)
if (m_state != Selected)
setState(Hovered);
}
void InteractiveTimelineItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
+ Q_UNUSED(event)
if (m_state != Selected)
setState(Normal);
}
diff --git a/src/Authoring/Studio/Render/StudioGradientWidget.cpp b/src/Authoring/Studio/Render/StudioGradientWidget.cpp
index d3adcf0b..1b514f65 100644
--- a/src/Authoring/Studio/Render/StudioGradientWidget.cpp
+++ b/src/Authoring/Studio/Render/StudioGradientWidget.cpp
@@ -157,10 +157,10 @@ void SGradientWidget::Render(IRenderWidgetContext &inWidgetContext, NVRenderCont
m_shader = CreateGradientShader(inWidgetContext, inRenderContext);
inRenderContext.SetActiveShader(m_shader);
- m_shader->SetPropertyValue("color0", QT3DSVec3(0.6, 0.6, 0.6));
- m_shader->SetPropertyValue("color1", QT3DSVec3(0.4, 0.4, 0.4));
- m_shader->SetPropertyValue("color2", QT3DSVec3(0.1, 0.1, 0.1));
- m_shader->SetPropertyValue("color3", QT3DSVec3(0.35, 0.35, 0.35));
+ m_shader->SetPropertyValue("color0", QT3DSVec3(0.6f, 0.6f, 0.6f));
+ m_shader->SetPropertyValue("color1", QT3DSVec3(0.4f, 0.4f, 0.4f));
+ m_shader->SetPropertyValue("color2", QT3DSVec3(0.1f, 0.1f, 0.1f));
+ m_shader->SetPropertyValue("color3", QT3DSVec3(0.35f, 0.35f, 0.35f));
}
inRenderContext.SetDepthWriteEnabled(false);
diff --git a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
index 95bba43c..5e33ee4d 100644
--- a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
+++ b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
@@ -2847,7 +2847,7 @@ SStudioPickValue STranslation::Pick(CPt inMouseCoords, TranslationSelectMode::En
// This doesn't use the color picker or renderer pick
float lastDist = 99999999999999.0f;
int lastIndex = -1;
- for (size_t i = 0; i < m_editModeCamerasAndLights.size(); ++i) {
+ for (int i = 0; i < int(m_editModeCamerasAndLights.size()); ++i) {
const QT3DSVec2 mouseCoords((QT3DSF32)inMouseCoords.x, (QT3DSF32)inMouseCoords.y);
float dist;
SGraphObject &object = m_editModeCamerasAndLights[i]->GetGraphObject();
diff --git a/src/Runtime/Qt3DSRuntimeStatic/Qt3DSRuntimeStatic.pro b/src/Runtime/Qt3DSRuntimeStatic/Qt3DSRuntimeStatic.pro
index 7e08ffbb..eeb3e4b0 100644
--- a/src/Runtime/Qt3DSRuntimeStatic/Qt3DSRuntimeStatic.pro
+++ b/src/Runtime/Qt3DSRuntimeStatic/Qt3DSRuntimeStatic.pro
@@ -612,7 +612,6 @@ SOURCES += \
../../Authoring/QT3DSDM/Systems/Qt3DSDMMetaData.cpp \
../../Authoring/QT3DSDM/Systems/Qt3DSDMXML.cpp \
../../Authoring/QT3DSDM/Systems/Qt3DSDMStringTable.cpp \
- ../../Authoring/QT3DSDM/Systems/Qt3DSDMHandles.cpp \
../../Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp \
../../Authoring/QT3DSDM/Systems/Qt3DSDMValue.cpp \
../../Authoring/QT3DSDM/Systems/Cores/SimpleDataCore.cpp
@@ -634,9 +633,6 @@ HEADERS += \
HEADERS += \
../Source/Engine/Include/EnginePrefix.h
-SOURCES += \
- ../Source/Engine/Source/EnginePrefix.cpp
-
# Event
SOURCES += \
../Source/Qt3DSEvent/Source/EventFactory.cpp \
@@ -663,14 +659,10 @@ HEADERS += \
../Source/Runtime/Include/q3dsqmlbehavior.h
SOURCES += \
- ../Source/Runtime/Source/RuntimePrefix.cpp \
../Source/Runtime/Source/q3dsqmlscript.cpp \
../Source/Runtime/Source/q3dsqmlbehavior.cpp
# System
-SOURCES += \
- ../Source/System/Source/SystemPrefix.cpp
-
HEADERS += \
../Source/System/Include/SystemPrefix.h
diff --git a/src/Runtime/Source/Engine/Source/EnginePrefix.cpp b/src/Runtime/Source/Engine/Source/EnginePrefix.cpp
deleted file mode 100644
index d3c2930f..00000000
--- a/src/Runtime/Source/Engine/Source/EnginePrefix.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 1993-2009 NVIDIA Corporation.
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt 3D Studio.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "EnginePrefix.h"
diff --git a/src/Runtime/Source/Qt3DSRender/Source/Qt3DSRenderShaderProgram.cpp b/src/Runtime/Source/Qt3DSRender/Source/Qt3DSRenderShaderProgram.cpp
index 3e5da0d6..09f1094b 100644
--- a/src/Runtime/Source/Qt3DSRender/Source/Qt3DSRenderShaderProgram.cpp
+++ b/src/Runtime/Source/Qt3DSRender/Source/Qt3DSRenderShaderProgram.cpp
@@ -349,6 +349,7 @@ namespace render {
QT3DSI32 location, QT3DSI32 count, NVRenderShaderDataTypes::Enum type,
NVRenderTexture2DHandle inValue, QVector<QT3DSU32> &oldValue)
{
+ Q_UNUSED(type)
if (inValue) {
bool update = false;
for (int i = 0; i < count; i++) {
@@ -419,6 +420,7 @@ namespace render {
QT3DSI32 location, QT3DSI32 count, NVRenderShaderDataTypes::Enum type,
NVRenderTextureCubeHandle inValue, QVector<QT3DSU32> &oldValue)
{
+ Q_UNUSED(type)
if (inValue) {
bool update = false;
for (int i = 0; i < count; i++) {
@@ -906,6 +908,7 @@ namespace render {
void NVRenderShaderProgram::SetConstantValue(NVRenderShaderConstantBase *inConstant,
NVRenderTexture2D *inValue, const QT3DSI32 inCount)
{
+ Q_UNUSED(inCount)
SetConstantValueOfType(this, inConstant, inValue, 1);
}
void NVRenderShaderProgram::SetConstantValue(NVRenderShaderConstantBase *inConstant,
@@ -923,6 +926,7 @@ namespace render {
void NVRenderShaderProgram::SetConstantValue(NVRenderShaderConstantBase *inConstant,
NVRenderTextureCube *inValue, const QT3DSI32 inCount)
{
+ Q_UNUSED(inCount)
SetConstantValueOfType(this, inConstant, inValue, 1);
}
void NVRenderShaderProgram::SetConstantValue(NVRenderShaderConstantBase *inConstant,
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderDynamicObjectSystemUtil.h b/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderDynamicObjectSystemUtil.h
index 79c8962e..5d78a4c9 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderDynamicObjectSystemUtil.h
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderDynamicObjectSystemUtil.h
@@ -51,6 +51,7 @@ namespace render {
, m_StringTable(inStrTable)
, m_ProjectDir(inProjectDir)
{
+ Q_UNUSED(alloc)
}
void Remap(CRegisteredString &inStr) { inStr.Remap(m_StrData); }
};
@@ -67,6 +68,7 @@ namespace render {
: m_Map(map)
, m_StringTable(inStrTable)
{
+ Q_UNUSED(alloc)
m_ProjectDir.assign(inProjectDir);
}
void Remap(CRegisteredString &inStr) { inStr.Remap(m_Map); }
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderLightConstantProperties.h b/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderLightConstantProperties.h
index a0f0cc06..4dcd62c5 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderLightConstantProperties.h
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Include/Qt3DSRenderLightConstantProperties.h
@@ -157,7 +157,7 @@ struct SLightConstantProperties
: m_lightCount(lcount, shader.m_Shader)
{
m_constants.resize(count);
- for (unsigned int i = 0; i < count; ++i) {
+ for (int i = 0; i < count; ++i) {
QString lref;
if (packed)
lref = lseed + QStringLiteral("_%1_");
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/RendererImpl/Qt3DSVertexPipelineImpl.h b/src/Runtime/Source/Qt3DSRuntimeRender/RendererImpl/Qt3DSVertexPipelineImpl.h
index f5ee6716..e2de7e0f 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/RendererImpl/Qt3DSVertexPipelineImpl.h
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/RendererImpl/Qt3DSVertexPipelineImpl.h
@@ -182,9 +182,9 @@ namespace render {
&& ProgramGenerator().GetStage(ShaderGeneratorStages::TessEval)) {
const char8_t *theExtension("TE[");
// we always assume triangles
- for (size_t i = 0; i < 3; i++) {
+ for (int i = 0; i < 3; i++) {
char buf[10];
- sprintf(buf, "%lu", i);
+ sprintf(buf, "%d", i);
for (TStrTableStrMap::const_iterator iter = m_InterpolationParameters.begin(),
end = m_InterpolationParameters.end();
iter != end; ++iter) {
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureBMP.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureBMP.cpp
index 623ae343..29e75a89 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureBMP.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureBMP.cpp
@@ -1253,6 +1253,7 @@ SLoadedTexture *SLoadedTexture::LoadBMP(ISeekableIOStream &inStream, bool inFlip
NVFoundationBase &inFnd,
qt3ds::render::NVRenderContextType renderContextType)
{
+ Q_UNUSED(renderContextType)
FreeImageIO theIO(inFnd.getAllocator(), inFnd);
SLoadedTexture *retval = DoLoadBMP(&theIO, &inStream, 0);
if (retval)
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureDDS.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureDDS.cpp
index b86c55d6..19d41d11 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureDDS.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureDDS.cpp
@@ -685,6 +685,7 @@ namespace render {
NVFoundationBase &inFnd,
qt3ds::render::NVRenderContextType renderContextType)
{
+ Q_UNUSED(renderContextType)
FreeImageIO theIO(inFnd.getAllocator(), inFnd);
SLoadedTexture *retval = DoLoadDDS(&theIO, inStream, flipVertical);
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureGIF.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureGIF.cpp
index 8821b77a..ece4d3a3 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureGIF.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/ResourceManager/Qt3DSRenderLoadedTextureGIF.cpp
@@ -837,6 +837,7 @@ SLoadedTexture *SLoadedTexture::LoadGIF(ISeekableIOStream &inStream, bool inFlip
NVFoundationBase &inFnd,
qt3ds::render::NVRenderContextType renderContextType)
{
+ Q_UNUSED(renderContextType)
FreeImageIO theIO(inFnd.getAllocator(), inFnd);
void *gifData = Open(&theIO, &inStream);
if (gifData) {
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialShaderGenerator.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialShaderGenerator.cpp
index 37244978..f388a1cb 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialShaderGenerator.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialShaderGenerator.cpp
@@ -542,7 +542,7 @@ struct SShaderGenerator : public ICustomMaterialShaderGenerator
else
lightName = "lights";
char buf[16];
- _snprintf(buf, 16, "[%lu]", shadeIdx);
+ _snprintf(buf, 16, "[%d]", int(shadeIdx));
lightName.append(buf);
NVScopedRefCounted<SShaderLightProperties> theNewEntry =
@@ -564,6 +564,7 @@ struct SShaderGenerator : public ICustomMaterialShaderGenerator
SShaderGeneratorGeneratedShader::ShadowMapPropertyArray &shadowMaps,
SShaderGeneratorGeneratedShader::ShadowCubePropertyArray &shadowCubes)
{
+ Q_UNUSED(inProgram)
if (inShadow) {
if (shadowMap == false && inShadow->m_DepthCube
&& (numShadowCubes < QT3DS_MAX_NUM_SHADOWS)) {
@@ -1031,7 +1032,7 @@ struct SShaderGenerator : public ICustomMaterialShaderGenerator
eastl::string::size_type pos = 0;
while ((pos = srcString.find("out vec4 fragColor", pos)) != eastl::string::npos) {
srcString.insert(pos, "//");
- pos += strlen("//out vec4 fragColor");
+ pos += int(strlen("//out vec4 fragColor"));
}
}
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialSystem.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialSystem.cpp
index a6f60e25..1ae32bf4 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialSystem.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderCustomMaterialSystem.cpp
@@ -1993,6 +1993,8 @@ struct SMaterialSystem : public ICustomMaterialSystem
void OnMaterialActivationChange(const SCustomMaterial &inMaterial, bool inActive) override
{
+ Q_UNUSED(inMaterial)
+ Q_UNUSED(inActive)
}
void EndFrame() override
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDefaultMaterialShaderGenerator.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDefaultMaterialShaderGenerator.cpp
index 76f7cb82..b049aed3 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDefaultMaterialShaderGenerator.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDefaultMaterialShaderGenerator.cpp
@@ -357,7 +357,7 @@ struct SShaderGenerator : public IDefaultMaterialShaderGenerator
{
m_ImageStem = "image";
char buf[16];
- _snprintf(buf, 16, "%lu", imageIdx);
+ _snprintf(buf, 16, "%d", int(imageIdx));
m_ImageStem.append(buf);
m_ImageStem.append("_");
@@ -377,7 +377,7 @@ struct SShaderGenerator : public IDefaultMaterialShaderGenerator
{
m_TexCoordTemp = "varTexCoord";
char buf[16];
- _snprintf(buf, 16, "%lu", uvSet);
+ _snprintf(buf, 16, "%d", int(uvSet));
m_TexCoordTemp.append(buf);
}
@@ -570,7 +570,7 @@ struct SShaderGenerator : public IDefaultMaterialShaderGenerator
m_ShadowMapStem = "shadowmap";
m_ShadowCubeStem = "shadowcube";
char buf[16];
- _snprintf(buf, 16, "%lu", lightIdx);
+ _snprintf(buf, 16, "%d", int(lightIdx));
m_ShadowMapStem.append(buf);
m_ShadowCubeStem.append(buf);
m_ShadowMatrixStem = m_ShadowMapStem;
@@ -680,7 +680,7 @@ struct SShaderGenerator : public IDefaultMaterialShaderGenerator
{
if (m_LightsAsSeparateUniforms) {
char buf[16];
- _snprintf(buf, 16, "light_%u", lightIdx);
+ _snprintf(buf, 16, "light_%d", int(lightIdx));
m_LightStem = buf;
m_LightColor = m_LightStem;
m_LightColor.append("_diffuse");
@@ -704,7 +704,7 @@ struct SShaderGenerator : public IDefaultMaterialShaderGenerator
} else {
m_LightStem = "lights";
char buf[16];
- _snprintf(buf, 16, "[%u].", lightIdx);
+ _snprintf(buf, 16, "[%d].", int(lightIdx));
m_LightStem.append(buf);
m_LightColor = m_LightStem;
@@ -1938,7 +1938,8 @@ struct SShaderGenerator : public IDefaultMaterialShaderGenerator
SLightConstantProperties<SShaderGeneratorGeneratedShader> *GetLightConstantProperties(SShaderGeneratorGeneratedShader &shader)
{
if (!shader.m_lightConstantProperties
- || shader.m_Lights.size() > !shader.m_lightConstantProperties->m_constants.size()) {
+ || int(shader.m_Lights.size())
+ > shader.m_lightConstantProperties->m_constants.size()) {
if (shader.m_lightConstantProperties)
delete shader.m_lightConstantProperties;
shader.m_lightConstantProperties
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDynamicObjectSystem.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDynamicObjectSystem.cpp
index d86c1ad6..4a98dfe1 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDynamicObjectSystem.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderDynamicObjectSystem.cpp
@@ -1022,7 +1022,8 @@ struct SDynamicObjectSystemImpl : public IDynamicObjectSystem
}
theInsert.first->second = (char8_t *)m_Allocator.allocate(
theReadBuffer.size() + 1, "SDynamicObjectSystem::DoLoadShader", __FILE__, __LINE__);
- memCopy(theInsert.first->second, theReadBuffer.c_str(), theReadBuffer.size() + 1);
+ memCopy(theInsert.first->second, theReadBuffer.c_str(),
+ QT3DSU32(theReadBuffer.size()) + 1);
} else
theReadBuffer.assign(theInsert.first->second);
DoInsertShaderHeaderInformation(theReadBuffer, inPathToEffect);
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderGraphObjectSerializer.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderGraphObjectSerializer.cpp
index 3a75134d..8fc7e5aa 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderGraphObjectSerializer.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderGraphObjectSerializer.cpp
@@ -95,6 +95,7 @@ struct SSerializerWriteContext
, m_FileSizeStats(inStats)
, m_StringTable(inStringTable)
{
+ Q_UNUSED(inAllocator)
m_BasePath.assign(inProjectDirectory);
}
@@ -168,6 +169,7 @@ struct SSerializerReadContext : public SDataReader
, m_StrTableBlock(inStrTable)
, m_ProjectDirectory(inProjectDirectory)
{
+ Q_UNUSED(inAllocator)
}
void Remap(CRegisteredString &inStr) { inStr.Remap(m_StrTableBlock); }
template <typename TObjType>
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderShaderCache.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderShaderCache.cpp
index a3e70778..0c7c4997 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderShaderCache.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSRenderShaderCache.cpp
@@ -151,9 +151,9 @@ inline qt3ds::render::NVRenderContextType StringToContextType(const CRenderStrin
return retval;
do {
- pos = inContextType.find('|', lastpos);
+ pos = int(inContextType.find('|', lastpos));
if (pos == eastl::string::npos)
- pos = inContextType.size();
+ pos = int(inContextType.size());
{
eastl::string::size_type sectionLen = NVMin(pos - lastpos, lastTempBufIdx);
@@ -437,7 +437,7 @@ struct ShaderCache : public IShaderCache
str.insert(0, m_InsertStr);
if (inFeatures.size()) {
- eastl::string::size_type insertPos = m_InsertStr.size();
+ eastl::string::size_type insertPos = int(m_InsertStr.size());
m_InsertStr.clear();
for (QT3DSU32 idx = 0, end = inFeatures.size(); idx < end; ++idx) {
SShaderPreprocessorFeature feature(inFeatures[idx]);
@@ -507,12 +507,12 @@ struct ShaderCache : public IShaderCache
theInserter.first->second =
m_RenderContext
- .CompileSource(inKey, m_VertexCode.c_str(), m_VertexCode.size(),
- m_FragmentCode.c_str(), m_FragmentCode.size(),
- m_TessCtrlCode.c_str(), m_TessCtrlCode.size(),
- m_TessEvalCode.c_str(), m_TessEvalCode.size(),
- m_GeometryCode.c_str(), m_GeometryCode.size(), separableProgram)
- .mShader;
+ .CompileSource(inKey, m_VertexCode.c_str(), QT3DSU32(m_VertexCode.size()),
+ m_FragmentCode.c_str(), QT3DSU32(m_FragmentCode.size()),
+ m_TessCtrlCode.c_str(), QT3DSU32(m_TessCtrlCode.size()),
+ m_TessEvalCode.c_str(), QT3DSU32(m_TessEvalCode.size()),
+ m_GeometryCode.c_str(), QT3DSU32(m_GeometryCode.size()),
+ separableProgram).mShader;
if (theInserter.first->second) {
if (m_ShaderCache) {
IDOMWriter::Scope __writeScope(*m_ShaderCache, "Program");
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/q3dsqmlrender.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/q3dsqmlrender.cpp
index eb9e37fa..d825f1d9 100644
--- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/q3dsqmlrender.cpp
+++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/q3dsqmlrender.cpp
@@ -102,9 +102,10 @@ void Q3DSQmlRender::Render(const SOffscreenRendererEnvironment &inEnvironment,
SScene::RenderClearCommand inColorBufferNeedsClear,
const SRenderInstanceId instanceId)
{
- Q_UNUSED(inEnvironment);
- Q_UNUSED(inPresentationScaleFactor);
- Q_UNUSED(inColorBufferNeedsClear);
+ Q_UNUSED(inEnvironment)
+ Q_UNUSED(inPresentationScaleFactor)
+ Q_UNUSED(inColorBufferNeedsClear)
+ Q_UNUSED(instanceId)
if (m_qmlStreamRenderer) {
inRenderContext.PushPropertySet();
diff --git a/src/Runtime/Source/Runtime/Source/RuntimePrefix.cpp b/src/Runtime/Source/Runtime/Source/RuntimePrefix.cpp
deleted file mode 100644
index d9ebd84a..00000000
--- a/src/Runtime/Source/Runtime/Source/RuntimePrefix.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 1993-2009 NVIDIA Corporation.
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt 3D Studio.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "RuntimePrefix.h"
diff --git a/src/Runtime/Source/System/Source/SystemPrefix.cpp b/src/Runtime/Source/System/Source/SystemPrefix.cpp
deleted file mode 100644
index 4b631168..00000000
--- a/src/Runtime/Source/System/Source/SystemPrefix.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 1993-2009 NVIDIA Corporation.
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt 3D Studio.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "SystemPrefix.h"
diff --git a/src/commonplatform.pri b/src/commonplatform.pri
index d7997191..f3c79655 100644
--- a/src/commonplatform.pri
+++ b/src/commonplatform.pri
@@ -82,6 +82,9 @@ win32 {
win32-msvc {
QMAKE_CXXFLAGS += /MP /d2Zi+
QMAKE_CFLAGS += /MP /d2Zi+
+ # Warning C4251 = needs to have dll-interface to be used by clients of class,
+ # it comes from a lot of Qt headers, so disabling it.
+ QMAKE_CXXFLAGS_WARN_ON += -wd4251 #needs to have dll-interface to be used by clients
}
CONFIG(debug, debug|release) {