Remove widget pointer from ChaperoneTabController

The pointer is not needed and is an anti pattern.
This commit is contained in:
Vasily
2019-07-20 21:24:03 +02:00
committed by username223
parent 5605b9b104
commit 6a3e22bdd6
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -485,7 +485,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
m_pPumpEventsTimer->start();
m_steamVRTabController.initStage2( this );
m_chaperoneTabController.initStage2( this, m_pWindow.get() );
m_chaperoneTabController.initStage2( this );
m_fixFloorTabController.initStage2( this, m_pWindow.get() );
m_audioTabController.initStage2( this, m_pWindow.get() );
m_statisticsTabController.initStage2( this, m_pWindow.get() );
@@ -47,11 +47,9 @@ void ChaperoneTabController::initStage1()
eventLoopTick( nullptr, 0.0f, 0.0f, 0.0f );
}
void ChaperoneTabController::initStage2( OverlayController* var_parent,
QQuickWindow* var_widget )
void ChaperoneTabController::initStage2( OverlayController* var_parent )
{
this->parent = var_parent;
this->widget = var_widget;
}
ChaperoneTabController::~ChaperoneTabController()
+1 -2
View File
@@ -135,7 +135,6 @@ class ChaperoneTabController : public QObject
private:
OverlayController* parent;
QQuickWindow* widget;
float m_visibility = 0.6f;
float m_fadeDistance = 0.7f;
@@ -193,7 +192,7 @@ public:
~ChaperoneTabController();
void initStage1();
void initStage2( OverlayController* parent, QQuickWindow* widget );
void initStage2( OverlayController* parent );
void eventLoopTick( vr::TrackedDevicePose_t* devicePoses,
float leftSpeed,