more fixes for Code
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -87,11 +87,6 @@ namespace AzToolsFramework
|
||||
{
|
||||
namespace Internal
|
||||
{
|
||||
static const char* s_engineConfigFileName = "engine.json";
|
||||
static const char* s_engineConfigEngineVersionKey = "O3DEVersion";
|
||||
|
||||
static const char* s_startupLogWindow = "Startup";
|
||||
|
||||
template<typename IdContainerType>
|
||||
void DeleteEntities(const IdContainerType& entityIds)
|
||||
{
|
||||
|
||||
+28
@@ -939,6 +939,34 @@ namespace AzToolsFramework
|
||||
jobinfo.m_warningCount = jobDatabaseEntry.m_warningCount;
|
||||
jobinfo.m_errorCount = jobDatabaseEntry.m_errorCount;
|
||||
}
|
||||
|
||||
bool GetDatabaseInfoResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::databaseInfoHandler handler);
|
||||
bool GetScanFolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::scanFolderHandler handler);
|
||||
bool GetSourceResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceHandler handler);
|
||||
bool GetSourceAndScanfolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedSourceScanFolderHandler handler);
|
||||
bool GetSourceDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceFileDependencyHandler handler);
|
||||
bool GetJobResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::jobHandler handler);
|
||||
bool GetJobResult(
|
||||
const char* callName,
|
||||
SQLite::Statement* statement,
|
||||
AssetDatabaseConnection::jobHandler handler,
|
||||
AZ::Uuid builderGuid = AZ::Uuid::CreateNull(),
|
||||
const char* jobKey = nullptr,
|
||||
AssetSystem::JobStatus status = AssetSystem::JobStatus::Any);
|
||||
bool GetProductResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::productHandler handler);
|
||||
bool GetProductResult(
|
||||
const char* callName,
|
||||
SQLite::Statement* statement,
|
||||
AssetDatabaseConnection::productHandler handler,
|
||||
AZ::Uuid builderGuid = AZ::Uuid::CreateNull(),
|
||||
const char* jobKey = nullptr,
|
||||
AssetSystem::JobStatus status = AssetSystem::JobStatus::Any);
|
||||
bool GetLegacySubIDsResult(const char* callname, SQLite::Statement* statement, AssetDatabaseConnection::legacySubIDsHandler handler);
|
||||
bool GetProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyHandler handler);
|
||||
bool GetProductDependencyAndPathResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyAndPathHandler handler);
|
||||
bool GetMissingProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::missingProductDependencyHandler handler);
|
||||
bool GetCombinedDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedProductDependencyHandler handler);
|
||||
bool GetFileResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::fileHandler handler);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
-20
@@ -655,26 +655,6 @@ namespace AzToolsFramework
|
||||
// before every query, since validating it essentially must makes sure it exists.
|
||||
AZStd::unordered_set<AZStd::string> m_validatedTables;
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
//boiler plate
|
||||
bool GetDatabaseInfoResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::databaseInfoHandler handler);
|
||||
bool GetScanFolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::scanFolderHandler handler);
|
||||
bool GetSourceResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceHandler handler);
|
||||
bool GetSourceAndScanfolderResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedSourceScanFolderHandler handler);
|
||||
bool GetSourceDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::sourceFileDependencyHandler handler);
|
||||
bool GetJobResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::jobHandler handler);
|
||||
bool GetJobResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::jobHandler handler, AZ::Uuid builderGuid = AZ::Uuid::CreateNull(), const char* jobKey = nullptr, AssetSystem::JobStatus status = AssetSystem::JobStatus::Any);
|
||||
bool GetProductResultSimple(const char* name, SQLite::Statement* statement, AssetDatabaseConnection::productHandler handler);
|
||||
bool GetProductResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productHandler handler, AZ::Uuid builderGuid = AZ::Uuid::CreateNull(), const char* jobKey = nullptr, AssetSystem::JobStatus status = AssetSystem::JobStatus::Any);
|
||||
bool GetLegacySubIDsResult(const char* callname, SQLite::Statement* statement, AssetDatabaseConnection::legacySubIDsHandler handler);
|
||||
bool GetProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyHandler handler);
|
||||
bool GetProductDependencyAndPathResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::productDependencyAndPathHandler handler);
|
||||
bool GetMissingProductDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::missingProductDependencyHandler handler);
|
||||
bool GetCombinedDependencyResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::combinedProductDependencyHandler handler);
|
||||
bool GetFileResult(const char* callName, SQLite::Statement* statement, AssetDatabaseConnection::fileHandler handler);
|
||||
}
|
||||
} // namespace AssetDatabase
|
||||
}// namespace AzToolsFramework
|
||||
|
||||
|
||||
+1
-1
@@ -262,7 +262,7 @@ namespace AzToolsFramework
|
||||
m_serializeContext->EnumerateDerived<AZ::Component>(
|
||||
[&typeNameList, entityType](const AZ::SerializeContext::ClassData* componentClass, const AZ::Uuid& knownType) -> bool
|
||||
{
|
||||
AZ_UNUSED(knownType)
|
||||
AZ_UNUSED(knownType);
|
||||
|
||||
if (!componentClass->m_editData)
|
||||
{
|
||||
|
||||
@@ -1324,7 +1324,7 @@ namespace AzToolsFramework
|
||||
AZ::SliceComponent::EntityAncestorList::const_iterator ancestorIter = ancestors.begin();
|
||||
// Skip the first, that would be a regular slice root and not a subslice root, which was already checked.
|
||||
++ancestorIter;
|
||||
for (ancestorIter; ancestorIter != ancestors.end(); ++ancestorIter)
|
||||
for (; ancestorIter != ancestors.end(); ++ancestorIter)
|
||||
{
|
||||
const AZ::SliceComponent::Ancestor& ancestor = *ancestorIter;
|
||||
if (!ancestor.m_entity || !SliceUtilities::IsRootEntity(*ancestor.m_entity))
|
||||
|
||||
-1
@@ -98,7 +98,6 @@ namespace AzToolsFramework
|
||||
void SliceEditorEntityOwnershipService::OnSlicePreInstantiate(const AZ::Data::AssetId& sliceAssetId, const AZ::SliceComponent::SliceInstanceAddress& sliceAddress)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
const AzFramework::SliceInstantiationTicket ticket = *AzFramework::SliceInstantiationResultBus::GetCurrentBusId();
|
||||
|
||||
// Start an undo that will wrap the entire slice instantiation event (unable to do this at a higher level since this is queued up by AzFramework and there's no undo concept at that level)
|
||||
ToolsApplicationRequests::Bus::Broadcast(&ToolsApplicationRequests::Bus::Events::BeginUndoBatch, "Slice Instantiation");
|
||||
|
||||
+1
-1
@@ -895,7 +895,7 @@ namespace AzToolsFramework
|
||||
// calculate average position of selected vertices for translation manipulator
|
||||
MidpointCalculator midpointCalculator;
|
||||
m_translationManipulator->Process(
|
||||
[this, &midpointCalculator, fixedVertices](typename IndexedTranslationManipulator<Vertex>::VertexLookup& vertex)
|
||||
[&midpointCalculator, fixedVertices](typename IndexedTranslationManipulator<Vertex>::VertexLookup& vertex)
|
||||
{
|
||||
Vertex v;
|
||||
bool found = false;
|
||||
|
||||
-2
@@ -262,8 +262,6 @@ namespace AzToolsFramework
|
||||
void InstanceToTemplatePropagator::AddPatchesToLink(const PrefabDom& patches, Link& link)
|
||||
{
|
||||
PrefabDom& linkDom = link.GetLinkDom();
|
||||
PrefabDomValueReference linkPatchesReference =
|
||||
PrefabDomUtils::FindPrefabDomValue(linkDom, PrefabDomUtils::PatchesName);
|
||||
|
||||
/*
|
||||
If the original allocator the patches were created with gets destroyed, then the patches would become garbage in the
|
||||
|
||||
@@ -1298,9 +1298,6 @@ namespace AzToolsFramework
|
||||
command->RunRedo();
|
||||
}
|
||||
|
||||
const auto instanceTemplateId = instancePtr->GetTemplateId();
|
||||
auto parentContainerEntityId = parentInstance.GetContainerEntityId();
|
||||
|
||||
instancePtr->DetachNestedInstances(
|
||||
[&](AZStd::unique_ptr<Instance> detachedNestedInstance)
|
||||
{
|
||||
|
||||
@@ -461,7 +461,7 @@ namespace AzToolsFramework
|
||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||
msgBox.setDefaultButton(QMessageBox::Yes);
|
||||
msgBox.setDetailedText(message.c_str());
|
||||
const int response = msgBox.exec();
|
||||
msgBox.exec();
|
||||
|
||||
if (msgBox.clickedButton() == moveButton)
|
||||
{
|
||||
@@ -2043,7 +2043,7 @@ namespace AzToolsFramework
|
||||
QAction* confirmSelected = new QAction(detachMenu);
|
||||
confirmationMessageBox->addAction(confirmSelected);
|
||||
|
||||
QObject::connect(reassignToAction, &QAction::triggered, [reassignToAction, confirmationMessageBox, selectedEntity, ancestors, currentAncestorIndex]() mutable
|
||||
QObject::connect(reassignToAction, &QAction::triggered, [confirmationMessageBox, ancestors, currentAncestorIndex]() mutable
|
||||
{
|
||||
if (confirmationMessageBox->exec() == QDialog::Accepted)
|
||||
{
|
||||
@@ -4200,8 +4200,6 @@ namespace AzToolsFramework
|
||||
|
||||
if (canPush)
|
||||
{
|
||||
AZ::Data::AssetId targetSliceAssetId = sliceAncestryToPushTo.at(0).m_sliceAddress.GetReference()->GetSliceAsset().GetId();
|
||||
|
||||
//remember we're trying to push to this root, so we don't try to push to any others
|
||||
size_t ancestrySize = sliceAncestryToPushTo.size();
|
||||
rootAncestorPushList.push_back(sliceAncestryToPushTo[ancestrySize-1].m_sliceAddress.GetReference()->GetSliceAsset().GetId());
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace AzToolsFramework
|
||||
|
||||
LoadingThumbnail::LoadingThumbnail()
|
||||
: Thumbnail(MAKE_TKEY(ThumbnailKey))
|
||||
, m_angle(0)
|
||||
{
|
||||
auto absoluteIconPath = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / LoadingIconPath;
|
||||
m_loadingMovie.setFileName(absoluteIconPath.c_str());
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace AzToolsFramework
|
||||
void OnTick(float deltaTime, AZ::ScriptTimePoint /*time*/) override;
|
||||
|
||||
private:
|
||||
float m_angle;
|
||||
QMovie m_loadingMovie;
|
||||
};
|
||||
} // namespace Thumbnailer
|
||||
|
||||
@@ -111,9 +111,6 @@ namespace AzToolsFramework
|
||||
painter, option.rect.left() - 1, option.rect.top(), option.rect.bottom(), m_layerBorderBottomColor, layerColor);
|
||||
}
|
||||
|
||||
QModelIndex nameColumn = index.sibling(index.row(), EntityOutlinerListModel::Column::ColumnName);
|
||||
QModelIndex sibling = index.sibling(index.row() + 1, index.column());
|
||||
|
||||
QPoint lineBottomLeft(option.rect.bottomLeft());
|
||||
QPoint lineTopLeft(option.rect.topLeft());
|
||||
|
||||
|
||||
+1
-5
@@ -1106,8 +1106,6 @@ namespace AzToolsFramework
|
||||
QMimeData* EntityOutlinerListModel::mimeData(const QModelIndexList& indexes) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
AZ::TypeId uuid1 = AZ::AzTypeInfo<AZ::Entity>::Uuid();
|
||||
AZ::TypeId uuid2 = AZ::AzTypeInfo<EditorEntityIdContainer>::Uuid();
|
||||
|
||||
EditorEntityIdContainer entityIdList;
|
||||
for (const QModelIndex& index : indexes)
|
||||
@@ -1334,13 +1332,11 @@ namespace AzToolsFramework
|
||||
QueueEntityUpdate(entityId);
|
||||
}
|
||||
|
||||
void EntityOutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin(AZ::EntityId parentId, AZ::EntityId childId)
|
||||
void EntityOutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin([[maybe_unused]] AZ::EntityId parentId, [[maybe_unused]] AZ::EntityId childId)
|
||||
{
|
||||
//add/remove operations trigger selection change signals which assert and break undo/redo operations in progress in inspector etc.
|
||||
//so disallow selection updates until change is complete
|
||||
emit EnableSelectionUpdates(false);
|
||||
auto parentIndex = GetIndexFromEntity(parentId);
|
||||
auto childIndex = GetIndexFromEntity(childId);
|
||||
beginResetModel();
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -157,7 +157,7 @@ namespace AzToolsFramework
|
||||
QAction* createAction = menu->addAction(QObject::tr("Create Prefab..."));
|
||||
createAction->setToolTip(QObject::tr("Creates a prefab out of the currently selected entities."));
|
||||
|
||||
QObject::connect(createAction, &QAction::triggered, createAction, [this, selectedEntities] {
|
||||
QObject::connect(createAction, &QAction::triggered, createAction, [selectedEntities] {
|
||||
ContextMenu_CreatePrefab(selectedEntities);
|
||||
});
|
||||
}
|
||||
@@ -171,7 +171,7 @@ namespace AzToolsFramework
|
||||
instantiateAction->setToolTip(QObject::tr("Instantiates a prefab file in the scene."));
|
||||
|
||||
QObject::connect(
|
||||
instantiateAction, &QAction::triggered, instantiateAction, [this] { ContextMenu_InstantiatePrefab(); });
|
||||
instantiateAction, &QAction::triggered, instantiateAction, [] { ContextMenu_InstantiatePrefab(); });
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
@@ -196,7 +196,7 @@ namespace AzToolsFramework
|
||||
QAction* editAction = menu->addAction(QObject::tr("Edit Prefab"));
|
||||
editAction->setToolTip(QObject::tr("Edit the prefab in focus mode."));
|
||||
|
||||
QObject::connect(editAction, &QAction::triggered, editAction, [this, selectedEntity] {
|
||||
QObject::connect(editAction, &QAction::triggered, editAction, [selectedEntity] {
|
||||
ContextMenu_EditPrefab(selectedEntity);
|
||||
});
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace AzToolsFramework
|
||||
QAction* saveAction = menu->addAction(QObject::tr("Save Prefab to file"));
|
||||
saveAction->setToolTip(QObject::tr("Save the changes to the prefab to disk."));
|
||||
|
||||
QObject::connect(saveAction, &QAction::triggered, saveAction, [this, selectedEntity] {
|
||||
QObject::connect(saveAction, &QAction::triggered, saveAction, [selectedEntity] {
|
||||
ContextMenu_SavePrefab(selectedEntity);
|
||||
});
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace AzToolsFramework
|
||||
}
|
||||
|
||||
QAction* deleteAction = menu->addAction(QObject::tr("Delete"));
|
||||
QObject::connect(deleteAction, &QAction::triggered, deleteAction, [this] { ContextMenu_DeleteSelected(); });
|
||||
QObject::connect(deleteAction, &QAction::triggered, deleteAction, [] { ContextMenu_DeleteSelected(); });
|
||||
if (selectedEntities.size() == 0 ||
|
||||
(selectedEntities.size() == 1 && s_prefabPublicInterface->IsLevelInstanceContainerEntity(selectedEntities[0])))
|
||||
{
|
||||
@@ -247,7 +247,7 @@ namespace AzToolsFramework
|
||||
QAction* detachPrefabAction = menu->addAction(QObject::tr("Detach Prefab..."));
|
||||
QObject::connect(
|
||||
detachPrefabAction, &QAction::triggered, detachPrefabAction,
|
||||
[this, selectedEntity]
|
||||
[selectedEntity]
|
||||
{
|
||||
ContextMenu_DetachPrefab(selectedEntity);
|
||||
});
|
||||
@@ -994,7 +994,7 @@ namespace AzToolsFramework
|
||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||
msgBox.setDefaultButton(QMessageBox::Yes);
|
||||
msgBox.setDetailedText(message.c_str());
|
||||
const int response = msgBox.exec();
|
||||
msgBox.exec();
|
||||
|
||||
if (msgBox.clickedButton() == moveButton)
|
||||
{
|
||||
|
||||
+1
-3
@@ -2491,7 +2491,7 @@ namespace AzToolsFramework
|
||||
QAction* revertAction = revertMenu->addAction(QObject::tr("Entity"));
|
||||
revertAction->setToolTip(QObject::tr("This will revert all component properties on this entity to the last saved."));
|
||||
|
||||
QObject::connect(revertAction, &QAction::triggered, [this, relevantEntities]
|
||||
QObject::connect(revertAction, &QAction::triggered, [relevantEntities]
|
||||
{
|
||||
SliceEditorEntityOwnershipServiceRequestBus::Broadcast(
|
||||
&SliceEditorEntityOwnershipServiceRequests::ResetEntitiesToSliceDefaults, relevantEntities);
|
||||
@@ -4394,7 +4394,6 @@ namespace AzToolsFramework
|
||||
{
|
||||
ResetDrag(event);
|
||||
|
||||
Qt::MouseButtons realButtons = QApplication::mouseButtons();
|
||||
if (QApplication::overrideCursor() && !(event->buttons() & Qt::LeftButton))
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
@@ -4606,7 +4605,6 @@ namespace AzToolsFramework
|
||||
bool EntityPropertyEditor::GetComponentsAtDropEventPosition(QDropEvent* event, AZ::Entity::ComponentArrayType& targetComponents)
|
||||
{
|
||||
const QPoint globalPos(mapToGlobal(event->pos()));
|
||||
const QRect globalRect(GetInflatedRectFromPoint(globalPos, kComponentEditorDropTargetPrecision));
|
||||
|
||||
//get component editor(s) where drop will occur
|
||||
ComponentEditor* targetComponentEditor = GetReorderDropTarget(
|
||||
|
||||
+1
-1
@@ -548,7 +548,7 @@ namespace AzToolsFramework
|
||||
|
||||
// Connect pressed to opening the error dialog
|
||||
// Must capture this for call to QObject::connect
|
||||
connect(m_errorButton, &QPushButton::pressed, this, [this, errorLog]() {
|
||||
connect(m_errorButton, &QPushButton::pressed, this, [errorLog]() {
|
||||
// Create the dialog for the log panel, and set the layout
|
||||
QDialog* logDialog = new QDialog();
|
||||
logDialog->setMinimumSize(1024, 400);
|
||||
|
||||
+1
-1
@@ -2141,7 +2141,7 @@ namespace AzToolsFramework
|
||||
AZStd::shared_ptr<void> keyToAdd(nullptr);
|
||||
|
||||
bool createdElement = pContainerNode->CreateContainerElement(CreateContainerElementSelectClassCallback,
|
||||
[this, pContainerNode, promptForValue, &keyToAdd](void* dataPtr, const AZ::SerializeContext::ClassElement* classElement, bool noDefaultData, AZ::SerializeContext*) -> bool
|
||||
[pContainerNode, promptForValue, &keyToAdd](void* dataPtr, const AZ::SerializeContext::ClassElement* classElement, bool noDefaultData, AZ::SerializeContext*) -> bool
|
||||
{
|
||||
bool handled = false;
|
||||
|
||||
|
||||
@@ -2529,7 +2529,7 @@ namespace AzToolsFramework
|
||||
AZ_Warning("SlicePush", levelSlice, "SlicePushWidget::CalculateReferenceCount could not find root slice, displayed counts will be inaccurate!");
|
||||
size_t instanceCount = 0;
|
||||
AZ::Data::AssetBus::EnumerateHandlersId(assetId,
|
||||
[&instanceCount, assetId, levelSlice] (AZ::Data::AssetEvents* handler) -> bool
|
||||
[&instanceCount, assetId] (AZ::Data::AssetEvents* handler) -> bool
|
||||
{
|
||||
AZ::SliceComponent* component = azrtti_cast<AZ::SliceComponent*>(handler);
|
||||
if (component)
|
||||
|
||||
@@ -132,7 +132,6 @@ namespace AzToolsFramework
|
||||
QPointer<QAbstractItemModel> m_dataModel;
|
||||
QPointer<QItemSelectionModel> m_selectionModel;
|
||||
AZStd::intrusive_ptr<QTreeViewStateSaverData> m_data;
|
||||
bool m_defaultToExpandIndexes = false;
|
||||
|
||||
Q_DISABLE_COPY(QTreeViewStateSaver)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user