GH-907 improve Java testing and PermGen deprecation handling
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "settings/Setting.h"
|
||||
#include "settings/OverrideSetting.h"
|
||||
#include "PassthroughSetting.h"
|
||||
#include <QDebug>
|
||||
|
||||
#include <QVariant>
|
||||
@ -44,6 +45,22 @@ std::shared_ptr<Setting> SettingsObject::registerOverride(std::shared_ptr<Settin
|
||||
return override;
|
||||
}
|
||||
|
||||
std::shared_ptr<Setting> SettingsObject::registerPassthrough(std::shared_ptr<Setting> original,
|
||||
std::shared_ptr<Setting> gate)
|
||||
{
|
||||
if (contains(original->id()))
|
||||
{
|
||||
qCritical() << QString("Failed to register setting %1. ID already exists.")
|
||||
.arg(original->id());
|
||||
return nullptr; // Fail
|
||||
}
|
||||
auto passthrough = std::make_shared<PassthroughSetting>(original, gate);
|
||||
passthrough->m_storage = this;
|
||||
connectSignals(*passthrough);
|
||||
m_settings.insert(passthrough->id(), passthrough);
|
||||
return passthrough;
|
||||
}
|
||||
|
||||
std::shared_ptr<Setting> SettingsObject::registerSetting(QStringList synonyms, QVariant defVal)
|
||||
{
|
||||
if (synonyms.empty())
|
||||
|
Reference in New Issue
Block a user