From 5605b9b1040e30e12700cb2f03e2250fb267d261 Mon Sep 17 00:00:00 2001 From: Vasily Date: Sat, 20 Jul 2019 10:10:40 +0200 Subject: [PATCH] Remove widget pointer from SteamVRTabController The pointer is not needed and is an anti pattern. --- src/overlaycontroller.cpp | 2 +- src/tabcontrollers/SteamVRTabController.cpp | 4 +--- src/tabcontrollers/SteamVRTabController.h | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/overlaycontroller.cpp b/src/overlaycontroller.cpp index 8912ab3..d77c0f7 100644 --- a/src/overlaycontroller.cpp +++ b/src/overlaycontroller.cpp @@ -484,7 +484,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem, m_pPumpEventsTimer->start(); - m_steamVRTabController.initStage2( this, m_pWindow.get() ); + m_steamVRTabController.initStage2( this ); m_chaperoneTabController.initStage2( this, m_pWindow.get() ); m_fixFloorTabController.initStage2( this, m_pWindow.get() ); m_audioTabController.initStage2( this, m_pWindow.get() ); diff --git a/src/tabcontrollers/SteamVRTabController.cpp b/src/tabcontrollers/SteamVRTabController.cpp index c655ffc..2e3ec90 100644 --- a/src/tabcontrollers/SteamVRTabController.cpp +++ b/src/tabcontrollers/SteamVRTabController.cpp @@ -13,11 +13,9 @@ void SteamVRTabController::initStage1() reloadSteamVRProfiles(); } -void SteamVRTabController::initStage2( OverlayController* var_parent, - QQuickWindow* var_widget ) +void SteamVRTabController::initStage2( OverlayController* var_parent ) { this->parent = var_parent; - this->widget = var_widget; } void SteamVRTabController::eventLoopTick() diff --git a/src/tabcontrollers/SteamVRTabController.h b/src/tabcontrollers/SteamVRTabController.h index c6d78ec..ec3ce60 100644 --- a/src/tabcontrollers/SteamVRTabController.h +++ b/src/tabcontrollers/SteamVRTabController.h @@ -44,7 +44,6 @@ class SteamVRTabController : public QObject private: OverlayController* parent; - QQuickWindow* widget; float m_superSampling = 1.0; bool m_motionSmoothing = true; @@ -61,7 +60,7 @@ private: public: void initStage1(); - void initStage2( OverlayController* parent, QQuickWindow* widget ); + void initStage2( OverlayController* parent ); void eventLoopTick();