Remove widget pointer from MoveCenterTabController

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 0c6ed9a68d
commit 1975192bb1
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -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();
}
+1 -2
View File
@@ -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 );