diff options
author | Thomas Groman <tgroman@nuegia.net> | 2019-09-19 00:41:48 -0700 |
---|---|---|
committer | Thomas Groman <tgroman@nuegia.net> | 2019-09-19 00:41:48 -0700 |
commit | 32b3ed0a1362a4b0798ad71fac3450fb77cb7e41 (patch) | |
tree | 7be7a2f602e6a5af7bc2db86bef9cf2a659c3d3d /api/logic/settings/PassthroughSetting.cpp | |
parent | 5fb2c6334e7d5237db11695b4c0ec0f2d1e47c88 (diff) | |
download | MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.gz MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.lz MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.xz MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.zip |
merged from 0.6.7 codebase
Diffstat (limited to 'api/logic/settings/PassthroughSetting.cpp')
-rw-r--r-- | api/logic/settings/PassthroughSetting.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/api/logic/settings/PassthroughSetting.cpp b/api/logic/settings/PassthroughSetting.cpp index 5da5d11c..beee4152 100644 --- a/api/logic/settings/PassthroughSetting.cpp +++ b/api/logic/settings/PassthroughSetting.cpp @@ -1,4 +1,4 @@ -/* Copyright 2013-2018 MultiMC Contributors +/* Copyright 2013-2019 MultiMC Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,54 +16,54 @@ #include "PassthroughSetting.h" PassthroughSetting::PassthroughSetting(std::shared_ptr<Setting> other, std::shared_ptr<Setting> gate) - : Setting(other->configKeys(), QVariant()) + : Setting(other->configKeys(), QVariant()) { - Q_ASSERT(other); - m_other = other; - m_gate = gate; + Q_ASSERT(other); + m_other = other; + m_gate = gate; } bool PassthroughSetting::isOverriding() const { - if(!m_gate) - { - return false; - } - return m_gate->get().toBool(); + if(!m_gate) + { + return false; + } + return m_gate->get().toBool(); } QVariant PassthroughSetting::defValue() const { - if(isOverriding()) - { - return m_other->get(); - } - return m_other->defValue(); + if(isOverriding()) + { + return m_other->get(); + } + return m_other->defValue(); } QVariant PassthroughSetting::get() const { - if(isOverriding()) - { - return Setting::get(); - } - return m_other->get(); + if(isOverriding()) + { + return Setting::get(); + } + return m_other->get(); } void PassthroughSetting::reset() { - if(isOverriding()) - { - Setting::reset(); - } - m_other->reset(); + if(isOverriding()) + { + Setting::reset(); + } + m_other->reset(); } void PassthroughSetting::set(QVariant value) { - if(isOverriding()) - { - Setting::set(value); - } - m_other->set(value); + if(isOverriding()) + { + Setting::set(value); + } + m_other->set(value); } |