Skip to content

Commit 0003049

Browse files
committed
Modernization pass (IWYU).
1 parent 5448a27 commit 0003049

File tree

12 files changed

+34
-21
lines changed

12 files changed

+34
-21
lines changed

Source/TextAsset/Private/TextAssetModule.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
22

3-
#include "CoreMinimal.h"
4-
#include "ModuleInterface.h"
5-
#include "ModuleManager.h"
6-
#include "TextAsset.h"
3+
#include "Modules/ModuleInterface.h"
4+
#include "Modules/ModuleManager.h"
75

86

97
/**

Source/TextAsset/Public/TextAsset.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
#pragma once
44

5-
#include "CoreMinimal.h"
5+
#include "Internationalization/Text.h"
66
#include "UObject/Object.h"
77
#include "UObject/ObjectMacros.h"
8+
89
#include "TextAsset.generated.h"
910

1011

Source/TextAssetEditor/Private/AssetTools/TextAssetActions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
#include "Framework/MultiBox/MultiBoxBuilder.h"
66
#include "TextAsset.h"
7-
#include "TextAssetEditorToolkit.h"
87
#include "Styling/SlateStyle.h"
98

9+
#include "TextAssetEditorToolkit.h"
10+
1011

1112
#define LOCTEXT_NAMESPACE "AssetTypeActions"
1213

Source/TextAssetEditor/Private/AssetTools/TextAssetActions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#pragma once
44

5-
#include "CoreMinimal.h"
65
#include "AssetTypeActions_Base.h"
6+
#include "Templates/SharedPointer.h"
77

88
class ISlateStyle;
99

Source/TextAssetEditor/Private/Factories/TextAssetFactory.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include "TextAssetFactory.h"
44

5+
#include "Containers/UnrealString.h"
56
#include "TextAsset.h"
67
#include "Misc/FileHelper.h"
78

Source/TextAssetEditor/Private/Factories/TextAssetFactoryNew.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
22

33
#include "TextAssetFactoryNew.h"
4+
45
#include "TextAsset.h"
56

67

Source/TextAssetEditor/Private/Styles/TextAssetEditorStyle.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#pragma once
44

5-
#include "CoreMinimal.h"
65
#include "IPluginManager.h"
76
#include "Brushes/SlateImageBrush.h"
87
#include "Styling/SlateStyle.h"

Source/TextAssetEditor/Private/TextAssetEditorModule.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
22

3-
#include "AssetEditorToolkit.h"
4-
#include "ModuleInterface.h"
5-
#include "TextAssetActions.h"
6-
#include "TextAssetEditorStyle.h"
3+
#include "Containers/Array.h"
4+
#include "Modules/ModuleInterface.h"
5+
#include "Modules/ModuleManager.h"
6+
#include "Templates/SharedPointer.h"
7+
#include "Toolkits/AssetEditorToolkit.h"
8+
9+
#include "AssetTools/TextAssetActions.h"
10+
#include "Styles/TextAssetEditorStyle.h"
711

812

913
#define LOCTEXT_NAMESPACE "FTextAssetEditorModule"

Source/TextAssetEditor/Private/Toolkits/TextAssetEditorToolkit.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "EditorStyleSet.h"
88
#include "STextAssetEditor.h"
99
#include "TextAsset.h"
10+
#include "UObject/NameTypes.h"
1011
#include "Widgets/Docking/SDockTab.h"
1112

1213
#define LOCTEXT_NAMESPACE "FTextAssetEditorToolkit"
@@ -17,8 +18,11 @@ DEFINE_LOG_CATEGORY_STATIC(LogTextAssetEditor, Log, All);
1718
/* Local constants
1819
*****************************************************************************/
1920

20-
static const FName TextAssetEditorAppIdentifier("TextAssetEditorApp");
21-
static const FName TextEditorTabId("TextEditor");
21+
namespace TextAssetEditor
22+
{
23+
static const FName AppIdentifier("TextAssetEditorApp");
24+
static const FName TabId("TextEditor");
25+
}
2226

2327

2428
/* FTextAssetEditorToolkit structors
@@ -72,7 +76,7 @@ void FTextAssetEditorToolkit::Initialize(UTextAsset* InTextAsset, const EToolkit
7276
->Split
7377
(
7478
FTabManager::NewStack()
75-
->AddTab(TextEditorTabId, ETabState::OpenedTab)
79+
->AddTab(TextAssetEditor::TabId, ETabState::OpenedTab)
7680
->SetHideTabWell(true)
7781
->SetSizeCoefficient(0.9f)
7882
)
@@ -82,7 +86,7 @@ void FTextAssetEditorToolkit::Initialize(UTextAsset* InTextAsset, const EToolkit
8286
FAssetEditorToolkit::InitAssetEditor(
8387
InMode,
8488
InToolkitHost,
85-
TextAssetEditorAppIdentifier,
89+
TextAssetEditor::AppIdentifier,
8690
Layout,
8791
true /*bCreateDefaultStandaloneMenu*/,
8892
true /*bCreateDefaultToolbar*/,
@@ -109,7 +113,7 @@ void FTextAssetEditorToolkit::RegisterTabSpawners(const TSharedRef<class FTabMan
109113

110114
FAssetEditorToolkit::RegisterTabSpawners(InTabManager);
111115

112-
InTabManager->RegisterTabSpawner(TextEditorTabId, FOnSpawnTab::CreateSP(this, &FTextAssetEditorToolkit::HandleTabManagerSpawnTab, TextEditorTabId))
116+
InTabManager->RegisterTabSpawner(TextAssetEditor::TabId, FOnSpawnTab::CreateSP(this, &FTextAssetEditorToolkit::HandleTabManagerSpawnTab, TextAssetEditor::TabId))
113117
.SetDisplayName(LOCTEXT("TextEditorTabName", "Text Editor"))
114118
.SetGroup(WorkspaceMenuCategoryRef)
115119
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tabs.Viewports"));
@@ -120,7 +124,7 @@ void FTextAssetEditorToolkit::UnregisterTabSpawners(const TSharedRef<class FTabM
120124
{
121125
FAssetEditorToolkit::UnregisterTabSpawners(InTabManager);
122126

123-
InTabManager->UnregisterTabSpawner(TextEditorTabId);
127+
InTabManager->UnregisterTabSpawner(TextAssetEditor::TabId);
124128
}
125129

126130

@@ -180,7 +184,7 @@ TSharedRef<SDockTab> FTextAssetEditorToolkit::HandleTabManagerSpawnTab(const FSp
180184
{
181185
TSharedPtr<SWidget> TabWidget = SNullWidget::NullWidget;
182186

183-
if (TabIdentifier == TextEditorTabId)
187+
if (TabIdentifier == TextAssetEditor::TabId)
184188
{
185189
TabWidget = SNew(STextAssetEditor, TextAsset, Style);
186190
}

Source/TextAssetEditor/Private/Toolkits/TextAssetEditorToolkit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#pragma once
44

5-
#include "CoreMinimal.h"
65
#include "EditorUndoClient.h"
6+
#include "Templates/SharedPointer.h"
77
#include "Toolkits/AssetEditorToolkit.h"
88
#include "UObject/GCObject.h"
99

0 commit comments

Comments
 (0)