From 5aad426ced9e07600a3817a937de5daaa9a16c28 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 31 Jan 2018 00:05:58 +0100 Subject: [PATCH] Ref T239, removed "QTimer m_xxx { this };" pattern * not in worker classes as parent might have a relevance there * in UI classes it is useless --- src/blackcore/simulatorcommon.h | 2 +- src/blackcore/vatsim/networkvatlib.h | 8 ++++---- src/blackgui/components/aircraftcomponent.h | 2 +- src/blackgui/components/aircraftpartshistory.h | 2 +- src/blackgui/components/atcstationcomponent.h | 2 +- .../components/infobarwebreadersstatuscomponent.h | 2 +- src/blackgui/components/logincomponent.h | 2 +- src/blackgui/components/mappingcomponent.h | 2 +- src/blackgui/components/simulatorcomponent.h | 2 +- src/blackgui/components/transpondermodeselector.h | 2 +- src/blackgui/components/usercomponent.h | 2 +- src/blackgui/components/weathercomponent.h | 2 +- src/blackgui/editors/validationindicator.h | 2 +- src/blackgui/led.h | 2 +- src/plugins/simulator/emulated/simulatoremulated.h | 2 +- .../simulator/emulated/simulatoremulatedmonitordialog.h | 2 +- src/plugins/simulator/fsxcommon/simulatorfsxcommon.h | 2 +- src/swiftguistandard/swiftguistd.h | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/blackcore/simulatorcommon.h b/src/blackcore/simulatorcommon.h index c6c02d560..cd5732720 100644 --- a/src/blackcore/simulatorcommon.h +++ b/src/blackcore/simulatorcommon.h @@ -265,7 +265,7 @@ namespace BlackCore bool m_blinkCycle = false; //!< used for highlighting qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting int m_timerCounter = 0; //!< allows to calculate n seconds - QTimer m_oneSecondTimer { this }; //!< multi purpose timer + QTimer m_oneSecondTimer; //!< multi purpose timer BlackMisc::Simulation::CSimulatorPluginInfo m_simulatorPluginInfo; //!< info object BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored BlackMisc::Aviation::CCallsignSet m_callsignsToBeRendered; //!< callsigns which will be rendered diff --git a/src/blackcore/vatsim/networkvatlib.h b/src/blackcore/vatsim/networkvatlib.h index 9e3b317e8..de15a407c 100644 --- a/src/blackcore/vatsim/networkvatlib.h +++ b/src/blackcore/vatsim/networkvatlib.h @@ -242,10 +242,10 @@ namespace BlackCore BlackMisc::CDigestSignal m_dsSendTextMessage { this, &CNetworkVatlib::emitConsolidatedTextMessages, 500, 10 }; BlackMisc::Network::CTextMessageList m_textMessagesToConsolidate; - QTimer m_scheduledConfigUpdate { this }; - QTimer m_processingTimer { this }; - QTimer m_positionUpdateTimer { this }; - QTimer m_interimPositionUpdateTimer { this }; + QTimer m_scheduledConfigUpdate; + QTimer m_processingTimer; + QTimer m_positionUpdateTimer; + QTimer m_interimPositionUpdateTimer; static int const c_processingIntervalMsec = 100; //!< interval for the processing timer static int const c_updatePostionIntervalMsec = 5000; //!< interval for the position update timer (send our position to network) diff --git a/src/blackgui/components/aircraftcomponent.h b/src/blackgui/components/aircraftcomponent.h index 8dd101a6b..91932e54e 100644 --- a/src/blackgui/components/aircraftcomponent.h +++ b/src/blackgui/components/aircraftcomponent.h @@ -86,7 +86,7 @@ namespace BlackGui private: QScopedPointer ui; BlackMisc::CSettingReadOnly m_settings { this, &CAircraftComponent::ps_settingsChanged }; //!< settings changed - QTimer m_updateTimer { this }; + QTimer m_updateTimer; }; } // ns } // ns diff --git a/src/blackgui/components/aircraftpartshistory.h b/src/blackgui/components/aircraftpartshistory.h index c3efeec7a..f23a25435 100644 --- a/src/blackgui/components/aircraftpartshistory.h +++ b/src/blackgui/components/aircraftpartshistory.h @@ -39,7 +39,7 @@ namespace BlackGui private: QScopedPointer ui; - QTimer m_timerUpdateHistory { this }; + QTimer m_timerUpdateHistory; QTextDocument m_text { this }; uint m_htmlHash = 0; diff --git a/src/blackgui/components/atcstationcomponent.h b/src/blackgui/components/atcstationcomponent.h index 3be082d9a..e08f64d86 100644 --- a/src/blackgui/components/atcstationcomponent.h +++ b/src/blackgui/components/atcstationcomponent.h @@ -131,7 +131,7 @@ namespace BlackGui void settingsChanged(); QScopedPointer ui; - QTimer m_updateTimer { this }; + QTimer m_updateTimer; QDateTime m_timestampLastReadOnlineStations; //!< stations read QDateTime m_timestampOnlineStationsChanged; //!< stations marked as changed QDateTime m_timestampLastReadBookedStations; //!< stations read diff --git a/src/blackgui/components/infobarwebreadersstatuscomponent.h b/src/blackgui/components/infobarwebreadersstatuscomponent.h index 7d9de0a2c..1ee48ab14 100644 --- a/src/blackgui/components/infobarwebreadersstatuscomponent.h +++ b/src/blackgui/components/infobarwebreadersstatuscomponent.h @@ -82,7 +82,7 @@ namespace BlackGui virtual void showConsolidationStatus(bool show); private: - QTimer m_timer { this }; //!< check timer + QTimer m_timer; //!< check timer BlackGui::CLedWidget *m_ledSwiftDb = nullptr; BlackGui::CLedWidget *m_ledDataReady = nullptr; BlackGui::CLedWidget *m_ledConsolidation = nullptr; diff --git a/src/blackgui/components/logincomponent.h b/src/blackgui/components/logincomponent.h index 35fd65447..1f8716bed 100644 --- a/src/blackgui/components/logincomponent.h +++ b/src/blackgui/components/logincomponent.h @@ -211,7 +211,7 @@ namespace BlackGui const QIcon m_iconPlay {":/famfamfam/icons/famfamfam/icons/silk/control_play_blue.png"}; const QIcon m_iconPause {":/famfamfam/icons/famfamfam/icons/silk/control_pause_blue.png"}; const int LogoffIntervalSeconds = 20; //!< time before logoff - QTimer m_logoffCountdownTimer { this }; //!< timer for logoff countdown + QTimer m_logoffCountdownTimer; //!< timer for logoff countdown BlackMisc::CSettingReadOnly m_otherTrafficNetworkServers { this, &CLoginComponent::reloadSettings }; BlackMisc::CData m_lastAircraftModel { this }; //!< recently used aircraft model BlackMisc::CData m_lastServer { this }; //!< recently used server (VATSIM, other) diff --git a/src/blackgui/components/mappingcomponent.h b/src/blackgui/components/mappingcomponent.h index 13d9fb81c..3f511d7d2 100644 --- a/src/blackgui/components/mappingcomponent.h +++ b/src/blackgui/components/mappingcomponent.h @@ -151,7 +151,7 @@ namespace BlackGui static constexpr int OverlayMessageMs = 5000; QScopedPointer ui; bool m_missedRenderedAircraftUpdate = true; //! Rendered aircraft need update - QTimer m_updateTimer { this }; + QTimer m_updateTimer; BlackMisc::CTokenBucket m_bucket { 3, BlackMisc::PhysicalQuantities::CTime(5.0, BlackMisc::PhysicalQuantities::CTimeUnit::s()), 1}; Views::CCheckBoxDelegate *m_currentMappingsViewDelegate = nullptr; //! checkbox in view BlackMisc::CIdentifier m_identifier { "MappingComponent", this }; diff --git a/src/blackgui/components/simulatorcomponent.h b/src/blackgui/components/simulatorcomponent.h index 41f7abf3f..50dbfddf4 100644 --- a/src/blackgui/components/simulatorcomponent.h +++ b/src/blackgui/components/simulatorcomponent.h @@ -90,7 +90,7 @@ namespace BlackGui void addOrUpdateLiveDataByName(const QString &name, const QString &value, BlackMisc::CIcons::IconIndex iconIndex); QScopedPointer ui; - QTimer m_updateTimer { this }; + QTimer m_updateTimer; }; } // ns } // ns diff --git a/src/blackgui/components/transpondermodeselector.h b/src/blackgui/components/transpondermodeselector.h index 03615f50e..22a56f68d 100644 --- a/src/blackgui/components/transpondermodeselector.h +++ b/src/blackgui/components/transpondermodeselector.h @@ -77,7 +77,7 @@ namespace BlackGui private: BlackMisc::Aviation::CTransponder::TransponderMode m_currentMode = BlackMisc::Aviation::CTransponder::StateStandby; BlackMisc::Aviation::CTransponder::TransponderMode m_resetMode = BlackMisc::Aviation::CTransponder::StateStandby; - QTimer m_resetTimer { this }; + QTimer m_resetTimer; }; } // ns } // ns diff --git a/src/blackgui/components/usercomponent.h b/src/blackgui/components/usercomponent.h index a745470d9..94eafc99a 100644 --- a/src/blackgui/components/usercomponent.h +++ b/src/blackgui/components/usercomponent.h @@ -66,7 +66,7 @@ namespace BlackGui private: QScopedPointer ui; - QTimer m_updateTimer { this }; + QTimer m_updateTimer; BlackMisc::CSettingReadOnly m_settings { this, &CUserComponent::ps_settingsChanged }; }; } diff --git a/src/blackgui/components/weathercomponent.h b/src/blackgui/components/weathercomponent.h index bdc1aaf39..25fdb591f 100644 --- a/src/blackgui/components/weathercomponent.h +++ b/src/blackgui/components/weathercomponent.h @@ -77,7 +77,7 @@ namespace BlackGui QScopedPointer ui; QScopedPointer m_coordinateDialog { new CCoordinateDialog(this) }; QVector m_weatherScenarios; - QTimer m_weatherUpdateTimer { this }; + QTimer m_weatherUpdateTimer; BlackMisc::Geo::CCoordinateGeodetic m_lastOwnAircraftPosition; BlackMisc::CSetting m_weatherScenarioSetting { this }; BlackCore::CActionBindings m_hotkeyBindings; //!< allow binding of hotkey diff --git a/src/blackgui/editors/validationindicator.h b/src/blackgui/editors/validationindicator.h index 5dac931e5..25c6ec3d6 100644 --- a/src/blackgui/editors/validationindicator.h +++ b/src/blackgui/editors/validationindicator.h @@ -74,7 +74,7 @@ namespace BlackGui //! Set background color void setBackgroundColor(const QString colorName); - QTimer m_resetTimer { this}; //!< reset to neutral + QTimer m_resetTimer; //!< reset to neutral QString m_originalStyleSheet; //!< stored, to be able to reset }; } // ns diff --git a/src/blackgui/led.h b/src/blackgui/led.h index 91df23e55..b8b8405d8 100644 --- a/src/blackgui/led.h +++ b/src/blackgui/led.h @@ -151,7 +151,7 @@ namespace BlackGui QString m_tooltipTriState = "tri-state"; //!< tooltip tri-state QString m_currentToolTip = "off"; //!< currently used tooltip QScopedPointer m_renderer; //!< Renderer - QTimer m_resetTimer { this }; //!< reset state + QTimer m_resetTimer; //!< reset state //! Init void init(); diff --git a/src/plugins/simulator/emulated/simulatoremulated.h b/src/plugins/simulator/emulated/simulatoremulated.h index 8aafd03d5..95633d767 100644 --- a/src/plugins/simulator/emulated/simulatoremulated.h +++ b/src/plugins/simulator/emulated/simulatoremulated.h @@ -163,7 +163,7 @@ namespace BlackSimPlugin bool m_timeSyncronized = false; int m_countInterpolatedSituations = 0; int m_countInterpolatedParts = 0; - QTimer m_interpolatorFetchTimer { this }; //!< fetch data from interpolator + QTimer m_interpolatorFetchTimer; //!< fetch data from interpolator BlackMisc::PhysicalQuantities::CTime m_offsetTime; BlackMisc::Simulation::CSimulatedAircraft m_myAircraft; //!< represents own aircraft of simulator BlackMisc::Simulation::CSimulatedAircraftList m_renderedAircraft; //!< represents remote aircraft in simulator diff --git a/src/plugins/simulator/emulated/simulatoremulatedmonitordialog.h b/src/plugins/simulator/emulated/simulatoremulatedmonitordialog.h index dcdddff0e..ce0feab85 100644 --- a/src/plugins/simulator/emulated/simulatoremulatedmonitordialog.h +++ b/src/plugins/simulator/emulated/simulatoremulatedmonitordialog.h @@ -107,7 +107,7 @@ namespace BlackSimPlugin QScopedPointer ui; CSimulatorEmulated *m_simulator = nullptr; - QTimer m_uiUpdateTimer { this }; + QTimer m_uiUpdateTimer; }; } // ns } // ns diff --git a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h index 2d48940a1..b7f0497aa 100644 --- a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h +++ b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h @@ -365,7 +365,7 @@ namespace BlackSimPlugin CSimConnectObjects m_simConnectObjectsPositionAndPartsTraces; //!< position/parts received, but object not yet added, excluded, disabled etc. SIMCONNECT_DATA_REQUEST_ID m_requestIdSimData = static_cast(RequestSimDataStart); //!< request id, use obtainRequestId() to get id BlackMisc::Simulation::CSimulatedAircraftList m_addPendingAircraft; //!< aircraft awaiting to be added - QTimer m_addPendingAircraftTimer { this }; //!< updating of aircraft awaiting to be added + QTimer m_addPendingAircraftTimer; //!< updating of aircraft awaiting to be added }; //! Listener for FSX diff --git a/src/swiftguistandard/swiftguistd.h b/src/swiftguistandard/swiftguistd.h index 2762953a1..4b6ed54fe 100644 --- a/src/swiftguistandard/swiftguistd.h +++ b/src/swiftguistandard/swiftguistd.h @@ -115,7 +115,7 @@ private: bool m_contextAudioAvailable = false; //!< audio context available? bool m_displayingDBusReconnect = false; //!< currently displaying reconnect dialog bool m_dbDataLoading = false; //!< DB or shared data loading in progress - QTimer m_timerContextWatchdog { this }; //!< core available? + QTimer m_timerContextWatchdog; //!< core available? BlackMisc::Simulation::CSimulatedAircraft m_ownAircraft; //!< own aircraft's state //! GUI status update