From 2c5fad73e8939409639548571dcb942e6b2cb792 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 25 Jan 2016 15:54:23 -0200 Subject: Start to use the QSettings ObjectWrapper start of the QSettinsg Object Wrapper usage on the code this first patch removes two macros that generated around 200 lines in runtime for something like a quarter of it Basically, whenever we changed anything we called the PreferencesDialog::settingsChanged and connected everythign to that signal, now each setting has it's own changed signal and we can call it directly. The best thing about this approach is that we don't trigger repaints for things that are not directly profile related. ( actually we still do, but the plan is to remove them in due time) this commit breaks correct atualization of the profile (because everything was connected to PreferencesDialog::settingsChanged) and now I need to hunt a bit for the correct connections Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- profile-widget/profilewidget2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'profile-widget/profilewidget2.cpp') diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index f89590033..629149030 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -15,6 +15,7 @@ #include "models.h" #include "divepicturemodel.h" #include "divelist.h" +#include #ifndef SUBSURFACE_MOBILE #include "diveplanner.h" #include "simplewidgets.h" @@ -732,6 +733,12 @@ void ProfileWidget2::dateTimeChanged() emit dateTimeChangedItems(); } +void ProfileWidget2::actionRequestedReplot(bool triggered) +{ + Q_UNUSED(triggered); + settingsChanged(); +} + void ProfileWidget2::settingsChanged() { // if we are showing calculated ceilings then we have to replot() -- cgit v1.2.3-70-g09d2