summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-15 15:29:46 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-16 15:32:03 +0100
commitaa3d6dd09fb2ecf4a5bf91536ca67b4f71b24613 (patch)
tree50d55ab1822ba68733325955ce6be24d82752a87 /opentrack
parent94cdd29400d739fcec664266537ecf3904a8476d (diff)
many: switch from using std::unique_ptr<t>::get() to &*ptr
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/main-window.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp
index bd8c129a..d4587831 100644
--- a/opentrack/main-window.cpp
+++ b/opentrack/main-window.cpp
@@ -423,10 +423,10 @@ void main_window::start_tracker_()
}
if (pFilterDialog)
- pFilterDialog->register_filter(work->libs.pFilter.get());
+ pFilterDialog->register_filter(&*work->libs.pFilter);
if (pProtocolDialog)
- pProtocolDialog->register_protocol(work->libs.pProtocol.get());
+ pProtocolDialog->register_protocol(&*work->libs.pProtocol);
pose_update_timer.start(15);
@@ -601,7 +601,7 @@ void main_window::show_tracker_settings_(bool show)
{
if (mk_dialog(pTrackerDialog, show, current_tracker()) && work && work->libs.pTracker)
{
- pTrackerDialog->register_tracker(work->libs.pTracker.get());
+ pTrackerDialog->register_tracker(&*work->libs.pTracker);
QObject::connect(&*pTrackerDialog, &ITrackerDialog::closing,
this, [this] { pTrackerDialog = nullptr; });
}
@@ -616,7 +616,7 @@ void main_window::show_proto_settings_(bool show)
{
if (mk_dialog(pProtocolDialog, show, current_protocol()) && work && work->libs.pProtocol)
{
- pProtocolDialog->register_protocol(work->libs.pProtocol.get());
+ pProtocolDialog->register_protocol(&*work->libs.pProtocol);
QObject::connect(&*pProtocolDialog, &IProtocolDialog::closing,
this, [this] { pProtocolDialog = nullptr; });
}
@@ -626,7 +626,7 @@ void main_window::show_filter_settings_(bool show)
{
if (mk_dialog(pFilterDialog, show, current_filter()) && work && work->libs.pFilter)
{
- pFilterDialog->register_filter(work->libs.pFilter.get());
+ pFilterDialog->register_filter(&*work->libs.pFilter);
QObject::connect(&*pFilterDialog, &IFilterDialog::closing,
this, [this] { pFilterDialog = nullptr; });
}
@@ -739,10 +739,8 @@ void main_window::ensure_tray()
tray->setContextMenu(&tray_menu);
tray->show();
- connect(tray.get(),
- &QSystemTrayIcon::activated,
- this,
- &main_window::toggle_restore_from_tray);
+ connect(&*tray, &QSystemTrayIcon::activated,
+ this, &main_window::toggle_restore_from_tray);
}
QApplication::setQuitOnLastWindowClosed(false);