Remove widget pointer from MoveCenterTabController
The pointer is not needed and is an anti pattern.
This commit is contained in:
@@ -492,7 +492,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
m_settingsTabController.initStage2( this );
|
||||
m_reviveTabController.initStage2( this );
|
||||
m_utilitiesTabController.initStage2( this );
|
||||
m_moveCenterTabController.initStage2( this, m_pWindow.get() );
|
||||
m_moveCenterTabController.initStage2( this );
|
||||
}
|
||||
|
||||
void OverlayController::OnRenderRequest()
|
||||
|
||||
@@ -159,11 +159,9 @@ void MoveCenterTabController::initStage1()
|
||||
m_lastGravityUpdateTimePoint = std::chrono::steady_clock::now();
|
||||
}
|
||||
|
||||
void MoveCenterTabController::initStage2( OverlayController* var_parent,
|
||||
QQuickWindow* var_widget )
|
||||
void MoveCenterTabController::initStage2( OverlayController* var_parent )
|
||||
{
|
||||
this->parent = var_parent;
|
||||
this->widget = var_widget;
|
||||
zeroOffsets();
|
||||
outputLogSettings();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ class MoveCenterTabController : public QObject
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
QQuickWindow* widget;
|
||||
|
||||
int m_trackingUniverse = static_cast<int>( vr::TrackingUniverseStanding );
|
||||
float m_offsetX = 0.0f;
|
||||
@@ -192,7 +191,7 @@ private:
|
||||
|
||||
public:
|
||||
void initStage1();
|
||||
void initStage2( OverlayController* parent, QQuickWindow* widget );
|
||||
void initStage2( OverlayController* parent );
|
||||
|
||||
void eventLoopTick( vr::ETrackingUniverseOrigin universe,
|
||||
vr::TrackedDevicePose_t* devicePoses );
|
||||
|
||||
Reference in New Issue
Block a user