Skip to content

Commit

Permalink
[FIX] 5.5 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vampy committed Nov 24, 2024
1 parent ed73e2f commit 8e4e08e
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [Code Style](#code-style)
- [Commit messages](#commit-messages)

Supported unreal versions: `5.2`, `5.3`, `5.4`
Supported unreal versions: `5.3`, `5.4`, `5.5`

## Features

Expand Down
2 changes: 1 addition & 1 deletion Source/DlgSystem/GameplayDebugger/SDlgDataDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void SDlgDataDisplay::Construct(const FArguments& InArgs, const TWeakObjectPtr<c
WorldContextObjectPtr = InWorldContextObjectPtr;
RootTreeItem = MakeShared<FDlgDataDisplayTreeRootNode>();
ActorsTreeView = SNew(STreeView<TSharedPtr<FDlgDataDisplayTreeNode>>)
.ItemHeight(32)
// .ItemHeight(32)
.TreeItemsSource(&RootChildren)
.OnGenerateRow(this, &Self::HandleGenerateRow)
.OnSelectionChanged(this, &Self::HandleTreeSelectionChanged)
Expand Down
8 changes: 7 additions & 1 deletion Source/DlgSystem/IO/DlgJsonParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,13 @@ bool FDlgJsonParser::JsonValueToProperty(const TSharedPtr<FJsonValue>& JsonValue
for (int32 Index = 0; Index < ItemsToRead; ++Index)
{
// ValuePtr + Index * Property->ElementSize is literally FScriptArrayHelper::GetRawPtr
bReturnStatus &= ConvertScalarJsonValueToProperty(ArrayValue[Index], Property, ContainerPtr, ValueIntPtr + Index * Property->ElementSize);
#if NY_ENGINE_VERSION >= 505
const int32 ElementSize = Property->GetElementSize();
#else
const int32 ElementSize = Property->ElementSize;
#endif

bReturnStatus &= ConvertScalarJsonValueToProperty(ArrayValue[Index], Property, ContainerPtr, ValueIntPtr + Index * ElementSize);
}
return bReturnStatus;
}
Expand Down
8 changes: 7 additions & 1 deletion Source/DlgSystem/IO/DlgJsonWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,13 @@ TSharedPtr<FJsonValue> FDlgJsonWriter::PropertyToJsonValue(const FProperty* Prop
IndexInArray = Index;

// ValuePtr + Index * Property->ElementSize is literally FScriptArrayHelper::GetRawPtr
const TSharedPtr<FJsonValue> JsonValue = ConvertScalarPropertyToJsonValue(Property, ContainerPtr, ValueIntPtr + Index * Property->ElementSize);
#if NY_ENGINE_VERSION >= 505
const int32 ElementSize = Property->GetElementSize();
#else
const int32 ElementSize = Property->ElementSize;
#endif

const TSharedPtr<FJsonValue> JsonValue = ConvertScalarPropertyToJsonValue(Property, ContainerPtr, ValueIntPtr + Index * ElementSize);
if (JsonValue.IsValid())
{
Array.Add(JsonValue);
Expand Down
2 changes: 1 addition & 1 deletion Source/DlgSystemEditor/Browser/SDlgBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void SDlgBrowser::Construct(const FArguments& InArgs)

RootTreeItem = MakeShared<FDialogueBrowserTreeRootNode>();
ParticipantsTreeView = SNew(STreeView<TSharedPtr<FDlgBrowserTreeNode>>)
.ItemHeight(32)
// .ItemHeight(32)
.TreeItemsSource(&RootChildren)
.OnGenerateRow(this, &Self::HandleGenerateRow)
.OnSelectionChanged(this, &Self::HandleTreeSelectionChanged)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ FText SDlgTextPropertyEditableTextBox::GetToolTipText() const
bIsLocalized = !TextId.IsEmpty();
if (bIsLocalized)
{
Namespace = TextId.GetNamespace().GetChars();
Key = TextId.GetKey().GetChars();
Namespace = TextId.GetNamespace().ToString();
Key = TextId.GetKey().ToString();
}
#else
bIsLocalized = FTextLocalizationManager::Get().FindNamespaceAndKeyFromDisplayString(FTextInspector::GetSharedDisplayString(TextValue), Namespace, Key);
Expand Down Expand Up @@ -958,7 +958,12 @@ void SDlgTextPropertyEditableTextBox::HandleLocalizableCheckStateChanged(ECheckB
NewKey
);

#if NY_ENGINE_VERSION >= 505
EditableTextProperty->SetText(TextIndex, FText::AsLocalizable_Advanced(*NewNamespace, *NewKey, *PropertyValue.ToString()));
#else
EditableTextProperty->SetText(TextIndex, FInternationalization::Get().ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText(*PropertyValue.ToString(), *NewNamespace, *NewKey));
#endif // NY_ENGINE_VERSION >= 505

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

#include "PropertyHandle.h"
#include "Widgets/Input/SSearchBox.h"
#include "Widgets/Views/STileView.h"
#include "Framework/Application/SlateApplication.h"
#include "DetailWidgetRow.h"
#include "IDocumentation.h"
#include "Layout/WidgetPath.h"

#include "DlgSystem/NYEngineVersionHelpers.h"
Expand Down Expand Up @@ -275,10 +274,10 @@ TSharedRef<SWidget> SDlgTextPropertyPickList::GetListViewWidget()
.Padding(0)
.BorderImage(FNYAppStyle::GetBrush("NoBorder"));

ListViewWidget = SNew(SListView<TextListItem>)
ListViewWidget = SNew(STileView<TextListItem>)
.SelectionMode(ESelectionMode::Single)
.ListItemsSource(&Suggestions)
.OnGenerateRow(this, &Self::HandleListGenerateRow)
.OnGenerateTile(this, &Self::HandleListGenerateRow)
.OnSelectionChanged(this, &Self::HandleListSelectionChanged)
.ItemHeight(20);

Expand Down
2 changes: 1 addition & 1 deletion Source/DlgSystemEditor/Search/SDlgFindInDialogues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void SDlgFindInDialogues::Construct(const FArguments& InArgs, const TSharedPtr<F
.BorderImage(FNYAppStyle::GetBrush("Menu.Background"))
[
SAssignNew(TreeView, STreeView<TSharedPtr<FDlgSearchResult>>)
.ItemHeight(24)
// .ItemHeight(24)
.TreeItemsSource(&ItemsFound)
.OnGenerateRow(this, &Self::HandleGenerateRow)
.OnGetChildren(this, &Self::HandleGetChildren)
Expand Down

0 comments on commit 8e4e08e

Please sign in to comment.