diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-10-08 12:36:40 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-10-08 13:58:15 +0300 |
commit | f779a742d99504d6dda658ac6a3a72be50473750 (patch) | |
tree | 65bc197fc3d01ffb7a1695d69b45b95c394a91a1 | |
parent | 57587b3ee47a989e2770fc9451ea05fdaf1494f4 (diff) |
Revert "Indicate shader errors in Editor" for branch 2.5
This reverts commit fdc856278f325a3a41f9db2f706df5332ebd4d5c.
Change-Id: Iba1add3c3a5d4fc9e1cfd2fcddd5c7eb720c5fd8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
9 files changed, 0 insertions, 55 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.cpp b/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.cpp index 3a90b0f5..c487d1ae 100644 --- a/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.cpp +++ b/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.cpp @@ -1505,14 +1505,6 @@ std::set<QString> CClientDataModelBridge::GetDynamicObjectTextureList() const return theSourcePathList; } -TInstanceHandleList CClientDataModelBridge::GetEffectList() const -{ - TInstanceHandleList theEffectInstances; - m_DataCore->GetInstancesDerivedFrom(theEffectInstances, m_Effect.m_Instance); - - return theEffectInstances; -} - std::set<QString> CClientDataModelBridge::getRenderableList() const { std::vector<SValue> valueList diff --git a/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.h b/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.h index 71ca2a81..3233bd42 100644 --- a/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.h +++ b/src/Authoring/Client/Code/Core/Doc/ClientDataModelBridge/ClientDataModelBridge.h @@ -360,7 +360,6 @@ public: std::set<QString> GetSourcePathList() const; std::set<QString> GetFontFileList() const; std::set<QString> GetDynamicObjectTextureList() const; - qt3dsdm::TInstanceHandleList GetEffectList() const; std::set<QString> getRenderableList() const; bool IsLockedAtAll(qt3dsdm::Qt3DSDMInstanceHandle inInstance); bool IsDuplicateable(qt3dsdm::Qt3DSDMInstanceHandle inInstance); diff --git a/src/Authoring/Qt3DStudio/Application/StudioApp.cpp b/src/Authoring/Qt3DStudio/Application/StudioApp.cpp index 12e00357..e07e1b05 100644 --- a/src/Authoring/Qt3DStudio/Application/StudioApp.cpp +++ b/src/Authoring/Qt3DStudio/Application/StudioApp.cpp @@ -2059,13 +2059,6 @@ void CStudioApp::showPresentationIdEmptyWarning() Qt3DSMessageBox::ICON_WARNING, false); } -void CStudioApp::showShaderCompileError(QString &error) -{ - m_dialogs->DisplayMessageBox(tr("Warning"), - tr("Shader compile error.\n\n") + error, - Qt3DSMessageBox::ICON_WARNING, false); -} - void CStudioApp::showInvalidFilenameWarning() { m_dialogs->DisplayMessageBox(tr("Invalid filename"), diff --git a/src/Authoring/Qt3DStudio/Application/StudioApp.h b/src/Authoring/Qt3DStudio/Application/StudioApp.h index c4b9f553..8fccafcf 100644 --- a/src/Authoring/Qt3DStudio/Application/StudioApp.h +++ b/src/Authoring/Qt3DStudio/Application/StudioApp.h @@ -219,7 +219,6 @@ public: void showPresentationIdUniqueWarning(); void showPresentationIdEmptyWarning(); void showInvalidFilenameWarning(); - void showShaderCompileError(QString &error); void checkDeletedDatainputs(bool askFromUser); void saveDataInputsToProjectFile(); void verifyDatainputBindings(); diff --git a/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp b/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp index f11893b7..ab7d3e45 100644 --- a/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp @@ -50,7 +50,6 @@ #include "IDragable.h" #include "IObjectReferenceHelper.h" #include "IDirectoryWatchingSystem.h" -#include "IStudioRenderer.h" ProjectFileSystemModel::ProjectFileSystemModel(QObject *parent) : QAbstractListModel(parent) , m_model(new QFileSystemModel(this)) @@ -208,16 +207,6 @@ void ProjectFileSystemModel::updateReferences() std::for_each(effectTextureList.begin(), effectTextureList.end(), addReferencesPresentation); std::for_each(renderableList.begin(), renderableList.end(), addReferencesRenderable); - qt3dsdm::TInstanceHandleList theEffectInstances(bridge->GetEffectList()); - - for (const auto instance : theEffectInstances) { - auto err = g_StudioApp.getRenderer().getShaderError(instance); - if (!err.isEmpty()) { - err.prepend(bridge->GetSourcePath(instance) + QStringLiteral("\n\n")); - g_StudioApp.showShaderCompileError(err); - } - } - m_references.insert(projectPath); updateRoles({IsReferencedRole, Qt::DecorationRole}); diff --git a/src/Authoring/Qt3DStudio/Render/IStudioRenderer.h b/src/Authoring/Qt3DStudio/Render/IStudioRenderer.h index f3ccb163..fc543a89 100644 --- a/src/Authoring/Qt3DStudio/Render/IStudioRenderer.h +++ b/src/Authoring/Qt3DStudio/Render/IStudioRenderer.h @@ -67,7 +67,6 @@ public: virtual void SetGuidesEnabled(bool val) = 0; virtual bool AreGuidesEditable() const = 0; virtual void SetGuidesEditable(bool val) = 0; - virtual QString getShaderError(qt3dsdm::Qt3DSDMInstanceHandle theInstance) const = 0; // Setting the camera to -1 disables the edit cameras // So setting the camera to 0- (numcameras - 1) will set change the active // edit camera. diff --git a/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp b/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp index 2b52a323..320bca23 100644 --- a/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp +++ b/src/Authoring/Qt3DStudio/Render/StudioRenderer.cpp @@ -417,17 +417,6 @@ struct SRendererImpl : public IStudioRenderer, Render(); } - QString getShaderError(qt3dsdm::Qt3DSDMInstanceHandle theInstance) const - { - SGraphObjectTranslator *translator - = static_cast<SGraphObjectTranslator *>( - m_Translation->GetOrCreateTranslator(theInstance)); - if (translator) - return translator->GetError(); - else - return {}; - } - void getPreviewFbo(QSize &outFboDim, qt3ds::QT3DSU32 &outFboTexture) override { if (m_Translation) { diff --git a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp index c90fcb93..c710dcd9 100644 --- a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp +++ b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp @@ -1173,19 +1173,6 @@ struct SEffectTranslator : public SDynamicObjectTranslator if (m_EffectSystem) theItem.Reset(*m_EffectSystem); } - - const QString GetError() override - { - SEffect &theItem = static_cast<SEffect &>(GetGraphObject()); - return QString::fromUtf8(theItem.GetError().c_str()); - } - - void SetError(const QString &error) override - { - SEffect &theItem = static_cast<SEffect &>(GetGraphObject()); - theItem.SetError(m_EffectSystem->GetResourceManager().GetRenderContext() - .GetStringTable().RegisterStr(error)); - } }; struct SCustomMaterialTranslator : public SDynamicObjectTranslator { diff --git a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.h b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.h index 71b4112b..3dd9134f 100644 --- a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.h +++ b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.h @@ -96,8 +96,6 @@ namespace studio { virtual void ClearChildren() = 0; virtual void AppendChild(SGraphObject &inChild) = 0; virtual void ResetEffect() {} - virtual void SetError(const QString &error) { Q_UNUSED(error); } - virtual const QString GetError() { return {}; } virtual SGraphObject &GetGraphObject() { return *m_GraphObject; } virtual SGraphObject &GetNonAliasedGraphObject() { return *m_GraphObject; } virtual qt3dsdm::Qt3DSDMInstanceHandle GetInstanceHandle() { return m_InstanceHandle; } |