31 SetShouldPersist(
true);
37 bool shouldPersist =
true;
44 const QString defaultString = parameters->value(
"default");
45 if (!defaultString.isNull())
51 const QString persistedString = parameters->value(
"persisted");
52 if (!persistedString.isNull()
53 && persistedString.compare(
"false", Qt::CaseInsensitive) == 0)
54 shouldPersist =
false;
56 SetShouldPersist(shouldPersist);
64 const QString prefValue = store->Get(preferenceKey, QString());
65 if (!prefValue.isEmpty())
80 store->Put(preferenceKey, *objStr);
88 PersistentState::SetValue(value);
void SetInitializationData(const SmartPointer< IConfigurationElement > &config, const QString &propertyName, const Object::Pointer &data) override
Implements transparent reference counting.
static const QString STATE_ID
static const QString PARAMETER_ID
void SetValue(const Object::Pointer &value) override
void Load(const SmartPointer< IPreferences > &store, const QString &preferenceKey) override
SmartPointer< Other > Cast() const
void Save(const SmartPointer< IPreferences > &store, const QString &preferenceKey) override