mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Single instance of SpecialFields (#4660)
i) Ensure that SpecialFields (and SepcialTabs for consistency) are singletons, and GlobalContext & RideCache can reload its configuration. ii) GlobalContext not longer holds a SpecialFields parameter, SpecialFields is a single globally available object. ii) The unused model and accessor have been removed. iii) The unused and unimplemented fieldType() and associated enum have been removed. iv) All SpecialFields accessor functions now use const QString& parameter types.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "RideMetric.h"
|
||||
#include "UserMetricSettings.h"
|
||||
#include "UserMetricParser.h"
|
||||
#include "SpecialFields.h"
|
||||
#include <QXmlInputSource>
|
||||
#include <QXmlSimpleReader>
|
||||
|
||||
@@ -99,7 +100,7 @@ RideCache::RideCache(Context *context) : context(context)
|
||||
}
|
||||
|
||||
// reset special fields to take into account user metrics
|
||||
GlobalContext::context()->specialFields = SpecialFields();
|
||||
SpecialFields::getInstance().reloadFields();
|
||||
}
|
||||
|
||||
// set the list
|
||||
|
||||
Reference in New Issue
Block a user