Code/Tools
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -47,7 +47,6 @@ namespace AssetBundler
|
||||
|
||||
QSharedPointer<Ui::AddSeedDialog> m_ui;
|
||||
QString m_platformSpecificCachePath;
|
||||
bool m_isAddSeedDialog = false;
|
||||
|
||||
AZStd::string m_fileName;
|
||||
|
||||
|
||||
-1
@@ -101,7 +101,6 @@ namespace AssetBuilderSDK
|
||||
|
||||
for (const auto& thisEntry : productDependencySet)
|
||||
{
|
||||
constexpr int flags = 0;
|
||||
productDependencies.emplace_back(thisEntry.first, thisEntry.second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,6 @@ void FolderRootWatch::WatchFolderLoop()
|
||||
for (size_t index=0; index<bytesRead;)
|
||||
{
|
||||
struct inotify_event *event = ( struct inotify_event * ) &eventBuffer[ index ];
|
||||
const char* eventName = event->name;
|
||||
|
||||
if (event->mask & (IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVE ))
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace AssetProcessor
|
||||
{
|
||||
static constexpr unsigned int MessageType = TRequest::MessageType;
|
||||
|
||||
m_messageHandlers[MessageType] = [this, handler = AZStd::move(handler)](MessageData<AzFramework::AssetSystem::BaseAssetProcessorMessage> messageData)
|
||||
m_messageHandlers[MessageType] = [handler = AZStd::move(handler)](MessageData<AzFramework::AssetSystem::BaseAssetProcessorMessage> messageData)
|
||||
{
|
||||
MessageData<TRequest> downcastData = messageData;
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ namespace AssetProcessor
|
||||
// Merge the Project User and User home settings registry only in non-release builds
|
||||
constexpr bool executeRegDumpCommands = false;
|
||||
AZ::CommandLine* commandLine{};
|
||||
AZ::ComponentApplicationBus::Broadcast([®istry, &commandLine](AZ::ComponentApplicationRequests* appRequests)
|
||||
AZ::ComponentApplicationBus::Broadcast([&commandLine](AZ::ComponentApplicationRequests* appRequests)
|
||||
{
|
||||
commandLine = appRequests->GetAzCommandLine();
|
||||
});
|
||||
|
||||
@@ -3500,7 +3500,6 @@ TEST_F(AssetProcessorManagerTest, JobDependencyOrderOnce_MultipleJobs_EmitOK)
|
||||
using namespace AssetProcessor;
|
||||
using namespace AssetBuilderSDK;
|
||||
|
||||
AZ::Uuid dummyBuilderUUID = AZ::Uuid::CreateRandom();
|
||||
QDir tempPath(m_tempDir.path());
|
||||
QString watchFolderPath = tempPath.absoluteFilePath("subfolder1");
|
||||
const ScanFolderInfo* scanFolder = m_config->GetScanFolderByPath(watchFolderPath);
|
||||
|
||||
@@ -447,7 +447,6 @@ TEST_F(RCBuilderTest, ProcessLegacyRCJob_ProcessStandardSingleJob_Valid)
|
||||
TEST_F(RCBuilderTest, ProcessLegacyRCJob_ProcessCopySingleJob_Valid)
|
||||
{
|
||||
AZStd::string name = "test";
|
||||
AZ::Uuid builderUuid = AZ::Uuid::CreateRandom();
|
||||
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
|
||||
MockRCCompiler* mockRC = new MockRCCompiler();
|
||||
TestInternalRecognizerBasedBuilder test(mockRC);
|
||||
@@ -506,7 +505,6 @@ TEST_F(RCBuilderTest, MatchTempFileToSkip_SkipRCFiles_false)
|
||||
|
||||
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Valid)
|
||||
{
|
||||
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
|
||||
MockRCCompiler* mockRC = new MockRCCompiler();
|
||||
TestInternalRecognizerBasedBuilder test(mockRC);
|
||||
MockRecognizerConfiguration configuration;
|
||||
@@ -536,7 +534,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Valid)
|
||||
|
||||
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Failed)
|
||||
{
|
||||
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
|
||||
MockRCCompiler* mockRC = new MockRCCompiler();
|
||||
TestInternalRecognizerBasedBuilder test(mockRC);
|
||||
MockRecognizerConfiguration configuration;
|
||||
@@ -564,7 +561,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardRCSingleJob_Failed)
|
||||
|
||||
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardCopySingleJob_Valid)
|
||||
{
|
||||
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
|
||||
MockRCCompiler* mockRC = new MockRCCompiler();
|
||||
TestInternalRecognizerBasedBuilder test(mockRC);
|
||||
MockRecognizerConfiguration configuration;
|
||||
@@ -590,7 +586,6 @@ TEST_F(RCBuilderTest, ProcessJob_ProcessStandardCopySingleJob_Valid)
|
||||
|
||||
TEST_F(RCBuilderTest, ProcessJob_ProcessStandardSkippedSingleJob_Invalid)
|
||||
{
|
||||
AZ::Uuid assetTypeUUid = AZ::Uuid::CreateRandom();
|
||||
MockRCCompiler* mockRC = new MockRCCompiler();
|
||||
TestInternalRecognizerBasedBuilder test(mockRC);
|
||||
MockRecognizerConfiguration configuration;
|
||||
|
||||
@@ -87,8 +87,6 @@ namespace AssetProcessor
|
||||
return;
|
||||
}
|
||||
|
||||
QModelIndex newIndicesStart;
|
||||
|
||||
AssetTreeItem* parentItem = m_root.get();
|
||||
// Use posix path separator for each child item
|
||||
AZ::IO::Path currentFullFolderPath(AZ::IO::PosixPathSeparator);
|
||||
|
||||
@@ -604,14 +604,14 @@ void RCcontrollerUnitTests::RunRCControllerTests()
|
||||
m_rcController.m_RCJobListModel.addNewJob(jobA);
|
||||
|
||||
bool beginWorkA = false;
|
||||
QObject::connect(jobA, &RCJob::BeginWork, this, [this, &beginWorkA]()
|
||||
QObject::connect(jobA, &RCJob::BeginWork, this, [&beginWorkA]()
|
||||
{
|
||||
beginWorkA = true;
|
||||
}
|
||||
);
|
||||
|
||||
bool jobFinishedA = false;
|
||||
QObject::connect(jobA, &RCJob::JobFinished, this, [this, &jobFinishedA](AssetBuilderSDK::ProcessJobResponse /*result*/)
|
||||
QObject::connect(jobA, &RCJob::JobFinished, this, [&jobFinishedA](AssetBuilderSDK::ProcessJobResponse /*result*/)
|
||||
{
|
||||
jobFinishedA = true;
|
||||
}
|
||||
@@ -655,7 +655,7 @@ void RCcontrollerUnitTests::RunRCControllerTests()
|
||||
);
|
||||
|
||||
bool jobFinishedB = false;
|
||||
QObject::connect(jobB, &RCJob::JobFinished, this, [this, &jobFinishedB](AssetBuilderSDK::ProcessJobResponse /*result*/)
|
||||
QObject::connect(jobB, &RCJob::JobFinished, this, [&jobFinishedB](AssetBuilderSDK::ProcessJobResponse /*result*/)
|
||||
{
|
||||
jobFinishedB = true;
|
||||
}
|
||||
|
||||
@@ -319,13 +319,6 @@ void UtilitiesUnitTests::StartTest()
|
||||
|
||||
// --------------- TEST FilePatternMatcher
|
||||
{
|
||||
const char* wildcardMatch[] = {
|
||||
"*.cfg",
|
||||
"*.txt",
|
||||
"abf*.llm"
|
||||
"sdf.c*",
|
||||
"a.bcd"
|
||||
};
|
||||
{
|
||||
AssetBuilderSDK::FilePatternMatcher extensionWildcardTest(AssetBuilderSDK::AssetBuilderPattern("*.cfg", AssetBuilderSDK::AssetBuilderPattern::Wildcard));
|
||||
UNIT_TEST_EXPECT_TRUE(extensionWildcardTest.MatchesPath(AZStd::string("foo.cfg")));
|
||||
|
||||
@@ -1209,7 +1209,7 @@ void ApplicationManagerBase::InitFileProcessor()
|
||||
AssetProcessor::ThreadController<AssetProcessor::FileProcessor>* fileProcessorHelper = new AssetProcessor::ThreadController<AssetProcessor::FileProcessor>();
|
||||
|
||||
addRunningThread(fileProcessorHelper);
|
||||
m_fileProcessor.reset(fileProcessorHelper->initialize([this, &fileProcessorHelper]()
|
||||
m_fileProcessor.reset(fileProcessorHelper->initialize([this]()
|
||||
{
|
||||
return new AssetProcessor::FileProcessor(m_platformConfiguration);
|
||||
}));
|
||||
|
||||
@@ -1399,7 +1399,6 @@ namespace AssetUtilities
|
||||
QString inputName;
|
||||
QString platformName;
|
||||
QString jobDescription;
|
||||
AZ::Uuid guid = AZ::Uuid::CreateNull();
|
||||
|
||||
using namespace AzToolsFramework::AssetDatabase;
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ namespace O3DE::ProjectManager
|
||||
constexpr int waitTimeInMs = 3000;
|
||||
QTimer::singleShot(
|
||||
waitTimeInMs, this,
|
||||
[this, button]
|
||||
[button]
|
||||
{
|
||||
if (button)
|
||||
{
|
||||
|
||||
@@ -652,7 +652,6 @@ namespace AZ
|
||||
aiAnimMesh* aiAnimMesh = mesh->mAnimMeshes[meshIdx];
|
||||
AZStd::string_view nodeName(aiAnimMesh->mName.C_Str());
|
||||
|
||||
const AZ::u32 maxKeys = static_cast<AZ::u32>(keys.size());
|
||||
AZ::u32 keyIdx = 0;
|
||||
for (AZ::u32 frame = 0; frame < numKeyFrames; ++frame)
|
||||
{
|
||||
|
||||
@@ -105,7 +105,6 @@ namespace AZ
|
||||
}
|
||||
break;
|
||||
}
|
||||
AZ::Matrix4x4 inverse = currentCoordMatrix.GetInverseTransform();
|
||||
AZ::Matrix4x4 adjustmatrix = targetCoordMatrix * currentCoordMatrix.GetInverseTransform();
|
||||
m_adjustTransform.reset(new DataTypes::MatrixType(AssImpSDKWrapper::AssImpTypeConverter::ToTransform(adjustmatrix)));
|
||||
m_adjustTransformInverse.reset(new DataTypes::MatrixType(m_adjustTransform->GetInverseFull()));
|
||||
|
||||
@@ -332,7 +332,7 @@ namespace AZ
|
||||
{
|
||||
SceneGraph testSceneGraph;
|
||||
AZStd::shared_ptr<DataTypes::MockIGraphObject> testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
|
||||
SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "FirstChild", AZStd::move(testDataObject));
|
||||
testSceneGraph.AddChild(testSceneGraph.GetRoot(), "FirstChild", AZStd::move(testDataObject));
|
||||
|
||||
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
|
||||
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "SecondChild", AZStd::move(testDataObject));
|
||||
@@ -350,7 +350,7 @@ namespace AZ
|
||||
SceneGraph::NodeIndex testRootNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "testRoot", AZStd::move(testDataObject));
|
||||
|
||||
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
|
||||
SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
|
||||
testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
|
||||
|
||||
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
|
||||
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject));
|
||||
@@ -371,10 +371,10 @@ namespace AZ
|
||||
SceneGraph::NodeIndex testRootNodeSiblingIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), "testRootSibling", AZStd::move(testDataObject));
|
||||
|
||||
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
|
||||
SceneGraph::NodeIndex firstChildNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
|
||||
testSceneGraph.AddChild(testRootNodeIndex, "FirstChild", AZStd::move(testDataObject));
|
||||
|
||||
testDataObject = AZStd::make_shared<DataTypes::MockIGraphObject>();
|
||||
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject));
|
||||
testSceneGraph.AddChild(testRootNodeIndex, "SecondChild", AZStd::move(testDataObject));
|
||||
|
||||
SceneGraph::NodeIndex foundIndex = testSceneGraph.Find(testRootNodeSiblingIndex, "SecondChild");
|
||||
EXPECT_FALSE(foundIndex.IsValid());
|
||||
@@ -475,7 +475,7 @@ namespace AZ
|
||||
|
||||
AZStd::string expectedNodeName("TestNode");
|
||||
|
||||
SceneGraph::NodeIndex testNodeIndex = testSceneGraph.AddChild(testSceneGraph.GetRoot(), expectedNodeName.c_str());
|
||||
testSceneGraph.AddChild(testSceneGraph.GetRoot(), expectedNodeName.c_str());
|
||||
SceneGraph::NodeIndex foundIndex = testSceneGraph.Find(expectedNodeName);
|
||||
ASSERT_TRUE(foundIndex.IsValid());
|
||||
const SceneGraph::Name& nodeName = testSceneGraph.GetNodeName(foundIndex);
|
||||
|
||||
-1
@@ -303,7 +303,6 @@ namespace AZ
|
||||
TYPED_TEST_P(SceneGraphDownwardsIteratorContext, Algorithms_FindIf_FindsValue3InNodeAdotC)
|
||||
{
|
||||
using Traversal = typename SceneGraphDownwardsIteratorContext<TypeParam>::Traversal;
|
||||
SceneGraph::NodeIndex index = this->m_graph.Find("A.C");
|
||||
auto sceneView = MakeSceneGraphDownwardsView<Traversal>(this->m_graph, this->m_graph.GetContentStorage().begin());
|
||||
auto result = AZStd::find_if(sceneView.begin(), sceneView.end(),
|
||||
[](const AZStd::shared_ptr<DataTypes::IGraphObject>& object) -> bool
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace AZ
|
||||
hider->setLayout(layout2);
|
||||
layoutOriginal->addWidget(hider);
|
||||
|
||||
connect(toolButton, &QToolButton::clicked, this, [this, hider, parentWidget, toolButton]
|
||||
connect(toolButton, &QToolButton::clicked, this, [this, hider, toolButton]
|
||||
{
|
||||
m_expanded = !m_expanded;
|
||||
if (m_expanded)
|
||||
|
||||
@@ -23,9 +23,8 @@ namespace AreaChart
|
||||
// LineSeries
|
||||
///////////////
|
||||
|
||||
LineSeries::LineSeries(AreaChart* owner, size_t seriesId, const QString& name, const QColor& color, size_t seriesSize)
|
||||
: m_owner(owner)
|
||||
, m_seriesId(seriesId)
|
||||
LineSeries::LineSeries([[maybe_unused]] AreaChart* owner, size_t seriesId, const QString& name, const QColor& color, size_t seriesSize)
|
||||
: m_seriesId(seriesId)
|
||||
, m_name(name)
|
||||
, m_color(color)
|
||||
, m_highlighted(false)
|
||||
|
||||
@@ -69,7 +69,6 @@ namespace AreaChart
|
||||
|
||||
private:
|
||||
|
||||
AreaChart* m_owner;
|
||||
LinePoints m_linePoints;
|
||||
|
||||
size_t m_seriesId;
|
||||
@@ -182,7 +181,6 @@ namespace AreaChart
|
||||
|
||||
size_t m_inspectionSeries;
|
||||
|
||||
size_t m_mouseOverArea;
|
||||
AZStd::vector< AZStd::vector<HitArea> > m_hitAreas;
|
||||
|
||||
bool m_clicked;
|
||||
|
||||
@@ -439,7 +439,6 @@ namespace Driller
|
||||
|
||||
QColor drawColor = budgetMarker.GetColor();
|
||||
|
||||
QRect sizeRect = rect();
|
||||
int x = rect().left();
|
||||
float normalizedValue = ((budgetMarker.GetValue() + 1.0f) / 2.0f);
|
||||
int y = static_cast<int>(rect().bottom() - (rect().height() * normalizedValue));
|
||||
|
||||
@@ -744,7 +744,6 @@ namespace Driller
|
||||
|
||||
bool wascapturing = IsInCaptureMode(CaptureMode::Capturing);
|
||||
|
||||
CaptureMode::Inspecting;
|
||||
emit OnCaptureModeChange(m_captureMode);
|
||||
|
||||
if (m_data)
|
||||
|
||||
@@ -496,7 +496,6 @@ namespace Driller
|
||||
m_persistentState->m_treeExpansionData.clear();
|
||||
QSet<QString> qSetQString;
|
||||
m_gui->widgetProfilerData->WriteTreeViewStateTo(qSetQString);
|
||||
QSet<QString>::iterator iter = qSetQString.begin();
|
||||
for (auto iterStrings = qSetQString.begin(); iterStrings != qSetQString.end(); ++iterStrings)
|
||||
{
|
||||
m_persistentState->m_treeExpansionData.push_back(iterStrings->toUtf8().data());
|
||||
|
||||
@@ -130,12 +130,8 @@ namespace LUAEditor
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
||||
}
|
||||
|
||||
QVariant CompletionModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
QVariant CompletionModel::headerData([[maybe_unused]] int section, [[maybe_unused]] Qt::Orientation orientation, [[maybe_unused]] int role) const
|
||||
{
|
||||
section;
|
||||
orientation;
|
||||
role;
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,10 +67,8 @@ namespace LUAEditor
|
||||
OnBreakpointLineDeleted.clear();
|
||||
}
|
||||
|
||||
void LUAEditorBreakpointWidget::paintEvent(QPaintEvent* paintEvent)
|
||||
void LUAEditorBreakpointWidget::paintEvent([[maybe_unused]] QPaintEvent* paintEvent)
|
||||
{
|
||||
paintEvent;
|
||||
|
||||
QPainter p(this);
|
||||
|
||||
auto colors = AZ::UserSettings::CreateFind<SyntaxStyleSettings>(AZ_CRC("LUA Editor Text Settings", 0xb6e15565), AZ::UserSettings::CT_GLOBAL);
|
||||
|
||||
@@ -950,7 +950,6 @@ namespace LUAEditor
|
||||
newAssetName += ".lua";
|
||||
}
|
||||
|
||||
AZ::Data::AssetType assetType = AZ::AzTypeInfo<AZ::ScriptAsset>::Uuid();
|
||||
AZ::Data::AssetId catalogAssetId;
|
||||
EBUS_EVENT_RESULT(catalogAssetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, newAssetName.c_str(), AZ::AzTypeInfo<AZ::ScriptAsset>::Uuid(), false);
|
||||
|
||||
@@ -2419,7 +2418,7 @@ namespace LUAEditor
|
||||
std::regex errorRegex(".+\\.lua:(\\d+):(.*)");
|
||||
|
||||
AzToolsFramework::Logging::LogLine::ParseLog(logResult.GetValue().c_str(), logResult.GetValue().size(),
|
||||
[this, &msg, ¤tAsset, &errorRegex](AzToolsFramework::Logging::LogLine& logLine)
|
||||
[this, ¤tAsset, &errorRegex](AzToolsFramework::Logging::LogLine& logLine)
|
||||
{
|
||||
if ((logLine.GetLogType() == AzToolsFramework::Logging::LogLine::TYPE_WARNING) || (logLine.GetLogType() == AzToolsFramework::Logging::LogLine::TYPE_ERROR))
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace LUAEditor
|
||||
auto pState = AZ::UserSettings::CreateFind<LUAEditorInternal::FindSavedState>(AZ_CRC("FindInCurrent", 0xba0962af), AZ::UserSettings::CT_LOCAL);
|
||||
m_gui->wrapCheckBox->setChecked((pState ? pState->m_findWrap : true));
|
||||
|
||||
connect(m_gui->wrapCheckBox, &QCheckBox::stateChanged, this, [this](int newState)
|
||||
connect(m_gui->wrapCheckBox, &QCheckBox::stateChanged, this, [](int newState)
|
||||
{
|
||||
auto pState = AZ::UserSettings::CreateFind<LUAEditorInternal::FindSavedState>(AZ_CRC("FindInCurrent", 0xba0962af), AZ::UserSettings::CT_LOCAL);
|
||||
pState->m_findWrap = (newState == Qt::Checked);
|
||||
@@ -350,7 +350,6 @@ namespace LUAEditor
|
||||
|
||||
void LUAEditorFindDialog::FindInView(LUAViewWidget* pLUAViewWidget, QListWidget* pCurrentFindListView)
|
||||
{
|
||||
pCurrentFindListView;
|
||||
if (!pLUAViewWidget)
|
||||
{
|
||||
return;
|
||||
@@ -373,8 +372,6 @@ namespace LUAEditor
|
||||
|
||||
void LUAEditorFindDialog::FindNextInView(LUAViewWidget::FindOperation* operation, LUAViewWidget* pLUAViewWidget, QListWidget* pCurrentFindListView)
|
||||
{
|
||||
pLUAViewWidget;
|
||||
pCurrentFindListView;
|
||||
int line = 0;
|
||||
int index = 0;
|
||||
pLUAViewWidget->GetCursorPosition(line, index);
|
||||
|
||||
@@ -31,10 +31,8 @@ namespace LUAEditor
|
||||
{
|
||||
}
|
||||
|
||||
void FoldingWidget::paintEvent(QPaintEvent* paintEvent)
|
||||
void FoldingWidget::paintEvent([[maybe_unused]] QPaintEvent* paintEvent)
|
||||
{
|
||||
paintEvent;
|
||||
|
||||
auto colors = AZ::UserSettings::CreateFind<SyntaxStyleSettings>(AZ_CRC("LUA Editor Text Settings", 0xb6e15565), AZ::UserSettings::CT_GLOBAL);
|
||||
|
||||
auto cursor = m_textEdit->textCursor();
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace LUAEditor
|
||||
auto newState = AZ::UserSettings::CreateFind<LUAEditorMainWindowSavedState>(AZ_CRC("LUA EDITOR MAIN WINDOW STATE", 0xa181bc4a), AZ::UserSettings::CT_LOCAL);
|
||||
m_gui->actionAutoReloadUnmodifiedFiles->setChecked(newState->m_bAutoReloadUnmodifiedFiles);
|
||||
|
||||
connect(m_gui->actionAutoReloadUnmodifiedFiles, &QAction::triggered, this, [this](bool newValue)
|
||||
connect(m_gui->actionAutoReloadUnmodifiedFiles, &QAction::triggered, this, [](bool newValue)
|
||||
{
|
||||
auto newState = AZ::UserSettings::CreateFind<LUAEditorMainWindowSavedState>(AZ_CRC("LUA EDITOR MAIN WINDOW STATE", 0xa181bc4a), AZ::UserSettings::CT_LOCAL);
|
||||
newState->m_bAutoReloadUnmodifiedFiles = newValue;
|
||||
@@ -2394,7 +2394,6 @@ namespace LUAEditor
|
||||
// if we have any elements, the last element is top right aligned:
|
||||
QLayoutItem* pItem = children[children.size() - 1];
|
||||
QSize lastItemSize = pItem->minimumSize();
|
||||
QPoint topRight = effectiveRect.topRight();
|
||||
|
||||
const int magicalRightEdgeOffset = pItem->widget()->style()->pixelMetric(QStyle::PM_ScrollBarExtent);
|
||||
QRect topRightCorner(effectiveRect.topRight() - QPoint(lastItemSize.width() + magicalRightEdgeOffset, 0) + QPoint(-2, 2), lastItemSize);
|
||||
|
||||
@@ -16,9 +16,8 @@ namespace LUAEditor
|
||||
namespace
|
||||
{
|
||||
template<typename Container>
|
||||
void CreateTypes(Container& container)
|
||||
void CreateTypes([[maybe_unused]] Container& container)
|
||||
{
|
||||
container;
|
||||
}
|
||||
|
||||
template<typename Container, typename Type, typename ... Types>
|
||||
@@ -44,11 +43,11 @@ namespace LUAEditor
|
||||
{
|
||||
public:
|
||||
virtual ~BaseParserState() {}
|
||||
virtual bool IsMultilineState(LUASyntaxHighlighter::StateMachine& machine) const { (void*)&machine; return false; }
|
||||
virtual void StartState(LUASyntaxHighlighter::StateMachine& machine) { (void*)&machine; }
|
||||
virtual bool IsMultilineState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine) const { return false; }
|
||||
virtual void StartState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine) {}
|
||||
//note you only get 13 bits of usable space here. see QTBlockState m_syntaxHighlighterStateExtra
|
||||
virtual AZ::u16 GetSaveState() const { return 0; }
|
||||
virtual void SetSaveState(AZ::u16 state) { state; }
|
||||
virtual void SetSaveState([[maybe_unused]] AZ::u16 state) {}
|
||||
virtual void Parse(LUASyntaxHighlighter::StateMachine& machine, const QChar& nextChar) = 0;
|
||||
};
|
||||
|
||||
@@ -87,7 +86,7 @@ namespace LUAEditor
|
||||
class LongCommentParserState
|
||||
: public BaseParserState
|
||||
{
|
||||
bool IsMultilineState(LUASyntaxHighlighter::StateMachine& machine) const override { (void*)&machine; return true; }
|
||||
bool IsMultilineState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine) const override { return true; }
|
||||
void StartState(LUASyntaxHighlighter::StateMachine& machine) override;
|
||||
AZ::u16 GetSaveState() const override { return m_bracketLevel; }
|
||||
void SetSaveState(AZ::u16 state) override;
|
||||
@@ -341,9 +340,8 @@ namespace LUAEditor
|
||||
}
|
||||
}
|
||||
|
||||
void ShortCommentParserState::StartState(LUASyntaxHighlighter::StateMachine& machine)
|
||||
void ShortCommentParserState::StartState([[maybe_unused]] LUASyntaxHighlighter::StateMachine& machine)
|
||||
{
|
||||
machine;
|
||||
m_mightBeLong = true;
|
||||
}
|
||||
|
||||
@@ -365,10 +363,8 @@ namespace LUAEditor
|
||||
m_endNextChar = false;
|
||||
}
|
||||
|
||||
void LongCommentParserState::Parse(LUASyntaxHighlighter::StateMachine& machine, const QChar& nextChar)
|
||||
void LongCommentParserState::Parse(LUASyntaxHighlighter::StateMachine& machine, [[maybe_unused]] const QChar& nextChar)
|
||||
{
|
||||
nextChar;
|
||||
|
||||
if (m_endNextChar)
|
||||
{
|
||||
machine.SetState(ParserStates::Null);
|
||||
|
||||
@@ -1200,8 +1200,6 @@ namespace LUAEditor
|
||||
|
||||
void LUAViewWidget::focusInEvent(QFocusEvent* pEvent)
|
||||
{
|
||||
pEvent;
|
||||
|
||||
QWidget::focusInEvent(pEvent);
|
||||
m_gui->m_luaTextEdit->setFocus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user