Skip to content

Commit

Permalink
Fix compilation for UE4.15: enforce modern rules for includes
Browse files Browse the repository at this point in the history
 - each header and source file must include everything it needs
 - no more include files including many other like "SlateBasics.h" and "SlateExtras.h"
  • Loading branch information
SRombauts committed Jan 30, 2017
1 parent 93a5846 commit 2764480
Show file tree
Hide file tree
Showing 17 changed files with 91 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
#include "PlasticSourceControlPrivatePCH.h"
#include "PlasticSourceControlCommand.h"
#include "PlasticSourceControlModule.h"
#include "PlasticSourceControlProvider.h"
#include "ISourceControlOperation.h"
#include "IPlasticSourceControlWorker.h"
#include "Modules/ModuleManager.h"


FPlasticSourceControlCommand::FPlasticSourceControlCommand(const TSharedRef<class ISourceControlOperation, ESPMode::ThreadSafe>& InOperation, const TSharedRef<class IPlasticSourceControlWorker, ESPMode::ThreadSafe>& InWorker, const FSourceControlOperationComplete& InOperationCompleteDelegate)
: Operation(InOperation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

#pragma once

#include "CoreMinimal.h"
#include "Misc/IQueuedWork.h"
#include "ISourceControlProvider.h"

/**
* Used to execute Plastic commands multi-threaded.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
#include "PlasticSourceControlMenuCommands.h"

#include "PlasticSourceControlProvider.h"
#include "PlasticSourceControlOperations.h"

#include "SlateExtras.h"
#include "LevelEditor.h"
#include "Widgets/Notifications/SNotificationList.h"
#include "Framework/Notifications/NotificationManager.h"
#include "Framework/Multibox/MultiBoxBuilder.h"
#include "Misc/MessageDialog.h"
#include "EditorStyleSet.h"

static const FName PlasticSourceControlMenuTabName("PlasticSourceControlMenu");

Expand Down
15 changes: 11 additions & 4 deletions Source/PlasticSourceControl/Private/PlasticSourceControlMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

#pragma once

#include "CoreMinimal.h"
#include "ISourceControlProvider.h"

#include "ISourceControlOperation.h"
#include "SourceControlOperations.h"
#include "PlasticSourceControlOperations.h"

class FToolBarBuilder;
class FMenuBuilder;
Expand All @@ -20,7 +26,7 @@ class FPlasticSourceControlMenu
private:
void AddMenuExtension(FMenuBuilder& Builder);

TSharedRef<FExtender> OnExtendLevelEditorViewMenu(const TSharedRef<FUICommandList> CommandList);
TSharedRef<class FExtender> OnExtendLevelEditorViewMenu(const TSharedRef<class FUICommandList> CommandList);

void DisplayInProgressNotification(const FSourceControlOperationRef& InOperation);
void RemoveInProgressNotification();
Expand All @@ -33,10 +39,11 @@ class FPlasticSourceControlMenu
FDelegateHandle ViewMenuExtenderHandle;

/** Current source control operation from menu if any */
// TODO: move back to the cpp file (and remove corresponding include files)
TSharedPtr<FSync, ESPMode::ThreadSafe> SyncOperation;
TSharedPtr<class FPlasticRevertUnchanged, ESPMode::ThreadSafe> RevertUnchangedOperation;
TSharedPtr<class FPlasticRevertAll, ESPMode::ThreadSafe> RevertAllOperation;
TWeakPtr<SNotificationItem> OperationInProgressNotification;
TSharedPtr<FPlasticRevertUnchanged, ESPMode::ThreadSafe> RevertUnchangedOperation;
TSharedPtr<FPlasticRevertAll, ESPMode::ThreadSafe> RevertAllOperation;
TWeakPtr<class SNotificationItem> OperationInProgressNotification;
/** Delegate called when a source control operation has completed */
void OnSourceControlOperationComplete(const FSourceControlOperationRef& InOperation, ECommandResult::Type InResult);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

#pragma once

#include "SlateBasics.h"
#include "CoreMinimal.h"
#include "Commands.h"
#include "PlasticSourceControlMenuStyle.h"

class FPlasticSourceControlMenuCommands : public TCommands<FPlasticSourceControlMenuCommands>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

#include "PlasticSourceControlMenuStyle.h"
#include "SlateGameResources.h"
#include "Styling/ISlateStyle.h"
#include "Styling/SlateStyleRegistry.h"
#include "Framework/Application/SlateApplication.h"
#include "IPluginManager.h"

TSharedPtr< FSlateStyleSet > FPlasticSourceControlMenuStyle::StyleInstance = NULL;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2016 Codice Software - Sebastien Rombauts (sebastien.rombauts@gmail.com)
#pragma once

#include "SlateBasics.h"
#include "CoreMinimal.h"

/** */
class FPlasticSourceControlMenuStyle
Expand All @@ -15,16 +15,16 @@ class FPlasticSourceControlMenuStyle
/** reloads textures used by slate renderer */
static void ReloadTextures();

/** @return The Slate style set for the Shooter game */
static const ISlateStyle& Get();
/** @return The Slate style set for the menu */
static const class ISlateStyle& Get();

static FName GetStyleSetName();

private:

static TSharedRef< class FSlateStyleSet > Create();
static TSharedRef<class FSlateStyleSet> Create();

private:

static TSharedPtr< class FSlateStyleSet > StyleInstance;
static TSharedPtr<class FSlateStyleSet> StyleInstance;
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

#include "PlasticSourceControlPrivatePCH.h"
#include "PlasticSourceControlModule.h"
#include "ModuleManager.h"
#include "ISourceControlModule.h"
#include "PlasticSourceControlOperations.h"
#include "Runtime/Core/Public/Features/IModularFeatures.h"
#include "Misc/App.h"
#include "Features/IModularFeatures.h"
#include "IPluginManager.h"

#define LOCTEXT_NAMESPACE "PlasticSourceControl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include "PlasticSourceControlUtils.h"
#include "AssetRegistryModule.h"

#include "HAL/FileManager.h"
#include "Misc/Paths.h"

#define LOCTEXT_NAMESPACE "PlasticSourceControl"

FName FPlasticRevertUnchanged::GetName() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "PlasticSourceControlState.h"
#include "PlasticSourceControlRevision.h"

#include "ISourceControlOperation.h"

/**
* Internal operation used to revert checked-out unchanged files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@

#pragma once

#include "Core.h"
#include "SlateBasics.h"
#include "EditorStyle.h"
#include "CoreMinimal.h"
#include "ISourceControlModule.h"
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include "MessageLog.h"
#include "ScopedSourceControlProgress.h"

#include "Misc/Paths.h"
#include "HAL/PlatformProcess.h"
#include "Misc/QueuedThreadPool.h"

#define LOCTEXT_NAMESPACE "PlasticSourceControl"

static FName ProviderName("Plastic SCM");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
#include "PlasticSourceControlUtils.h"
#include "SPlasticSourceControlSettings.h"

#include "HAL/FileManager.h"
#include "Misc/Paths.h"

#define LOCTEXT_NAMESPACE "PlasticSourceControl"

bool FPlasticSourceControlRevision::Get( FString& InOutFilename ) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include "PlasticSourceControlUtils.h"
#include "SourceControlHelpers.h"

#include "Misc/ScopeLock.h"
#include "Misc/ConfigCacheIni.h"
#include "HAL/PlatformTime.h"

namespace PlasticSettingsConstants
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@

#include "PlasticSourceControlPrivatePCH.h"
#include "PlasticSourceControlUtils.h"
#include "PlasticSourceControlState.h"
#include "PlasticSourceControlModule.h"
#include "PlasticSourceControlCommand.h"
#include "HAL/PlatformProcess.h"
#include "HAL/PlatformFilemanager.h"
#include "HAL/FileManager.h"
#include "Misc/ScopeLock.h"
#include "Misc/FileHelper.h"
#include "Misc/Paths.h"
#include "HAL/PlatformTime.h"
#include "Modules/ModuleManager.h"
#include "XmlParser.h"

#if PLATFORM_LINUX
#include <sys/ioctl.h>
#endif

#if PLATFORM_WINDOWS
#include "WindowsHWrapper.h" // SECURITY_ATTRIBUTES
#undef GetUserName
#endif


namespace PlasticSourceControlConstants
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@
#include "PlasticSourceControlModule.h"
#include "PlasticSourceControlUtils.h"

#include "SlateExtras.h"
#include "Fonts/SlateFontInfo.h"
#include "Misc/Paths.h"
#include "Misc/FileHelper.h"
#include "Modules/ModuleManager.h"
#include "Framework/Notifications/NotificationManager.h"
#include "Styling/SlateTypes.h"
#include "Widgets/Input/SEditableTextBox.h"
#include "Widgets/Input/SMultiLineEditableTextBox.h"
#include "Widgets/Input/SButton.h"
#include "Widgets/Input/SCheckBox.h"
#include "Widgets/Layout/SBorder.h"
#include "Widgets/Layout/SSeparator.h"
#include "Widgets/Notifications/SNotificationList.h"
#include "Widgets/SBoxPanel.h"
#include "Widgets/Text/STextBlock.h"
#include "EditorStyleSet.h"

#define LOCTEXT_NAMESPACE "SPlasticSourceControlSettings"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

#pragma once

#include "CoreMinimal.h"
#include "Widgets/SCompoundWidget.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Layout/Visibility.h"
#include "Input/Reply.h"
#include "Styling/SlateTypes.h"

#include "ISourceControlProvider.h"
#include "ISourceControlOperation.h"

class SPlasticSourceControlSettings : public SCompoundWidget
{
public:
Expand Down Expand Up @@ -48,7 +58,7 @@ class SPlasticSourceControlSettings : public SCompoundWidget
FText InitialCommitMessage;

/** Initial checkin asynchronous operation progress notification */
TWeakPtr<SNotificationItem> OperationInProgressNotification;
TWeakPtr<class SNotificationItem> OperationInProgressNotification;

void DisplayInProgressNotification(const FSourceControlOperationRef& InOperation);
void RemoveInProgressNotification();
Expand All @@ -58,7 +68,6 @@ class SPlasticSourceControlSettings : public SCompoundWidget
/** Delegate called when a source control operation has completed */
void OnSourceControlOperationComplete(const FSourceControlOperationRef& InOperation, ECommandResult::Type InResult);


FReply OnClickedInitializePlasticWorkspace();

/** Delegate to add a Plastic ignore.conf file to an existing Plastic workspace */
Expand Down

0 comments on commit 2764480

Please sign in to comment.