Merge pull request #7259 from aws-lumberyard-dev/cgalvan/RemovedLegacyIEventLoopHook

Removed legacy/unused IEventLoopHook
monroegm-disable-blank-issue-2
Chris Galvan 4 years ago committed by GitHub
commit 49d120b316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,7 +13,6 @@
#include <QMap>
#include <QTranslator>
#include <QSet>
#include "IEventLoopHook.h"
#include <unordered_map>
#include <AzCore/PlatformDef.h>

@ -1828,34 +1828,6 @@ bool CCryEditApp::InitInstance()
return true;
}
void CCryEditApp::RegisterEventLoopHook(IEventLoopHook* pHook)
{
pHook->pNextHook = m_pEventLoopHook;
m_pEventLoopHook = pHook;
}
void CCryEditApp::UnregisterEventLoopHook(IEventLoopHook* pHookToRemove)
{
IEventLoopHook* pPrevious = nullptr;
for (IEventLoopHook* pHook = m_pEventLoopHook; pHook != nullptr; pHook = pHook->pNextHook)
{
if (pHook == pHookToRemove)
{
if (pPrevious)
{
pPrevious->pNextHook = pHookToRemove->pNextHook;
}
else
{
m_pEventLoopHook = pHookToRemove->pNextHook;
}
pHookToRemove->pNextHook = nullptr;
return;
}
}
}
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::LoadFile(QString fileName)
{

@ -30,7 +30,6 @@ class CConsoleDialog;
struct mg_connection;
struct mg_request_info;
struct mg_context;
struct IEventLoopHook;
class QAction;
class MainWindow;
class QSharedMemory;
@ -153,8 +152,6 @@ public:
int IdleProcessing(bool bBackground);
bool IsWindowInForeground();
void RunInitPythonScript(CEditCommandLineInfo& cmdInfo);
void RegisterEventLoopHook(IEventLoopHook* pHook);
void UnregisterEventLoopHook(IEventLoopHook* pHook);
void DisableIdleProcessing() override;
void EnableIdleProcessing() override;
@ -344,7 +341,6 @@ private:
QString m_lastOpenLevelPath;
CQuickAccessBar* m_pQuickAccessBar = nullptr;
IEventLoopHook* m_pEventLoopHook = nullptr;
QString m_rootEnginePath;
int m_disableIdleProcessingCounter = 0; //!< Counts requests to disable idle processing. When non-zero, idle processing will be disabled.

@ -66,7 +66,6 @@ class IAWSResourceManager;
struct ISystem;
struct IRenderer;
struct AABB;
struct IEventLoopHook;
struct IErrorReport; // Vladimir@conffx
struct IFileUtil; // Vladimir@conffx
struct IEditorLog; // Vladimir@conffx
@ -509,11 +508,6 @@ struct IEditor
virtual void SetActiveView(CViewport* viewport) = 0;
virtual struct IEditorFileMonitor* GetFileMonitor() = 0;
// These are needed for Qt integration:
virtual void RegisterEventLoopHook(IEventLoopHook* pHook) = 0;
virtual void UnregisterEventLoopHook(IEventLoopHook* pHook) = 0;
// ^^^
//! QMimeData is used by the Qt clipboard.
//! IMPORTANT: Any QMimeData allocated for the clipboard will be deleted
//! when the editor exists. If a QMimeData is allocated by a different

@ -789,16 +789,6 @@ IEditorFileMonitor* CEditorImpl::GetFileMonitor()
return m_pEditorFileMonitor.get();
}
void CEditorImpl::RegisterEventLoopHook(IEventLoopHook* pHook)
{
CCryEditApp::instance()->RegisterEventLoopHook(pHook);
}
void CEditorImpl::UnregisterEventLoopHook(IEventLoopHook* pHook)
{
CCryEditApp::instance()->UnregisterEventLoopHook(pHook);
}
float CEditorImpl::GetTerrainElevation(float x, float y)
{
float terrainElevation = AzFramework::Terrain::TerrainDataRequests::GetDefaultTerrainHeight();

@ -155,8 +155,6 @@ public:
CMusicManager* GetMusicManager() override { return m_pMusicManager; };
IEditorFileMonitor* GetFileMonitor() override;
void RegisterEventLoopHook(IEventLoopHook* pHook) override;
void UnregisterEventLoopHook(IEventLoopHook* pHook) override;
IIconManager* GetIconManager() override;
float GetTerrainElevation(float x, float y) override;
Editor::EditorQtApplication* GetEditorQtApplication() override { return m_QtApplication; }

@ -1,24 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_INCLUDE_IEVENTLOOPHOOK_H
#define CRYINCLUDE_EDITOR_INCLUDE_IEVENTLOOPHOOK_H
#pragma once
struct IEventLoopHook
{
IEventLoopHook* pNextHook;
IEventLoopHook()
: pNextHook(0) {}
virtual bool PrePumpMessage() { return false; }
};
#endif // CRYINCLUDE_EDITOR_INCLUDE_IEVENTLOOPHOOK_H

@ -97,8 +97,6 @@ public:
MOCK_METHOD0(GetActiveView, class CViewport* ());
MOCK_METHOD1(SetActiveView, void(CViewport*));
MOCK_METHOD0(GetFileMonitor, struct IEditorFileMonitor* ());
MOCK_METHOD1(RegisterEventLoopHook, void(IEventLoopHook* ));
MOCK_METHOD1(UnregisterEventLoopHook, void(IEventLoopHook* ));
MOCK_CONST_METHOD0(CreateQMimeData, QMimeData* ());
MOCK_CONST_METHOD1(DestroyQMimeData, void(QMimeData*));
MOCK_METHOD0(GetLevelIndependentFileMan, class CLevelIndependentFileMan* ());

@ -270,7 +270,6 @@ set(FILES
Include/ICommandManager.h
Include/IDisplayViewport.h
Include/IEditorClassFactory.h
Include/IEventLoopHook.h
Include/IExportManager.h
Include/IGizmoManager.h
Include/IIconManager.h

Loading…
Cancel
Save