Code/Tools
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -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