1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/launcher/advancedpage.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

491 lines
24 KiB
C++
Raw Normal View History

#include "advancedpage.hpp"
#include <array>
2022-06-16 21:29:55 +02:00
#include <cmath>
Fix ASAN error: heap-use-after-free ================================================================= ==20931==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000206030 at pc 0x7fc8b0f3a72b bp 0x7ffcee176860 sp 0x7ffcee176008 READ of size 13 at 0x607000206030 thread T0 #0 0x7fc8b0f3a72a in __interceptor_strlen /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 #1 0x562e069a0af7 in QString::fromUtf8(char const*, int) /usr/include/qt/QtCore/qstring.h:706 #2 0x562e069a0af7 in Launcher::AdvancedPage::AdvancedPage(Config::GameSettings&, QWidget*) /home/elsid/dev/openmw/apps/launcher/advancedpage.cpp:29 #3 0x562e06959613 in Launcher::MainDialog::createPages() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:127 #4 0x562e069691d2 in Launcher::MainDialog::setup() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:228 #5 0x562e06969d88 in Launcher::MainDialog::showFirstRunDialog() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:188 #6 0x562e06957025 in main /home/elsid/dev/openmw/apps/launcher/main.cpp:35 #7 0x7fc8ad0d9b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #8 0x562e0690fced in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw-launcher+0x56ced) 0x607000206030 is located 16 bytes inside of 64-byte region [0x607000206020,0x607000206060) freed by thread T0 here: #0 0x7fc8b0fb3f19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x7fc8b0de3388 (/usr/lib/libopenal.so.1+0x40388) previously allocated by thread T0 here: #0 0x7fc8b0fb4fd6 in __interceptor_posix_memalign /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:226 #1 0x7fc8b0e379cb (/usr/lib/libopenal.so.1+0x949cb) SUMMARY: AddressSanitizer: heap-use-after-free /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 in __interceptor_strlen Shadow bytes around the buggy address: 0x0c0e80038bb0: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 0x0c0e80038bc0: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 0x0c0e80038bd0: 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 0x0c0e80038be0: 00 00 02 fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c0e80038bf0: 02 fa fa fa fa fa fd fd fd fd fd fd fd fd fa fa =>0x0c0e80038c00: fa fa fa fa fd fd[fd]fd fd fd fd fd fa fa fa fa 0x0c0e80038c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==20931==ABORTING
2021-12-20 19:50:58 +01:00
#include <string>
#include <QCompleter>
#include <QFileDialog>
2021-04-09 19:28:08 +00:00
#include <QString>
2022-06-16 21:29:55 +02:00
#include <components/config/gamesettings.hpp>
2021-04-09 19:28:08 +00:00
#include "utils/openalutil.hpp"
Launcher::AdvancedPage::AdvancedPage(Config::GameSettings& gameSettings, QWidget* parent)
: QWidget(parent)
, mGameSettings(gameSettings)
{
setObjectName("AdvancedPage");
setupUi(this);
Fix ASAN error: heap-use-after-free ================================================================= ==20931==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000206030 at pc 0x7fc8b0f3a72b bp 0x7ffcee176860 sp 0x7ffcee176008 READ of size 13 at 0x607000206030 thread T0 #0 0x7fc8b0f3a72a in __interceptor_strlen /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 #1 0x562e069a0af7 in QString::fromUtf8(char const*, int) /usr/include/qt/QtCore/qstring.h:706 #2 0x562e069a0af7 in Launcher::AdvancedPage::AdvancedPage(Config::GameSettings&, QWidget*) /home/elsid/dev/openmw/apps/launcher/advancedpage.cpp:29 #3 0x562e06959613 in Launcher::MainDialog::createPages() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:127 #4 0x562e069691d2 in Launcher::MainDialog::setup() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:228 #5 0x562e06969d88 in Launcher::MainDialog::showFirstRunDialog() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:188 #6 0x562e06957025 in main /home/elsid/dev/openmw/apps/launcher/main.cpp:35 #7 0x7fc8ad0d9b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #8 0x562e0690fced in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw-launcher+0x56ced) 0x607000206030 is located 16 bytes inside of 64-byte region [0x607000206020,0x607000206060) freed by thread T0 here: #0 0x7fc8b0fb3f19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x7fc8b0de3388 (/usr/lib/libopenal.so.1+0x40388) previously allocated by thread T0 here: #0 0x7fc8b0fb4fd6 in __interceptor_posix_memalign /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:226 #1 0x7fc8b0e379cb (/usr/lib/libopenal.so.1+0x949cb) SUMMARY: AddressSanitizer: heap-use-after-free /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 in __interceptor_strlen Shadow bytes around the buggy address: 0x0c0e80038bb0: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 0x0c0e80038bc0: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 0x0c0e80038bd0: 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 0x0c0e80038be0: 00 00 02 fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c0e80038bf0: 02 fa fa fa fa fa fd fd fd fd fd fd fd fd fa fa =>0x0c0e80038c00: fa fa fa fa fd fd[fd]fd fd fd fd fd fa fa fa fa 0x0c0e80038c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==20931==ABORTING
2021-12-20 19:50:58 +01:00
for (const std::string& name : Launcher::enumerateOpenALDevices())
2021-04-09 19:28:08 +00:00
{
Fix ASAN error: heap-use-after-free ================================================================= ==20931==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000206030 at pc 0x7fc8b0f3a72b bp 0x7ffcee176860 sp 0x7ffcee176008 READ of size 13 at 0x607000206030 thread T0 #0 0x7fc8b0f3a72a in __interceptor_strlen /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 #1 0x562e069a0af7 in QString::fromUtf8(char const*, int) /usr/include/qt/QtCore/qstring.h:706 #2 0x562e069a0af7 in Launcher::AdvancedPage::AdvancedPage(Config::GameSettings&, QWidget*) /home/elsid/dev/openmw/apps/launcher/advancedpage.cpp:29 #3 0x562e06959613 in Launcher::MainDialog::createPages() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:127 #4 0x562e069691d2 in Launcher::MainDialog::setup() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:228 #5 0x562e06969d88 in Launcher::MainDialog::showFirstRunDialog() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:188 #6 0x562e06957025 in main /home/elsid/dev/openmw/apps/launcher/main.cpp:35 #7 0x7fc8ad0d9b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #8 0x562e0690fced in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw-launcher+0x56ced) 0x607000206030 is located 16 bytes inside of 64-byte region [0x607000206020,0x607000206060) freed by thread T0 here: #0 0x7fc8b0fb3f19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x7fc8b0de3388 (/usr/lib/libopenal.so.1+0x40388) previously allocated by thread T0 here: #0 0x7fc8b0fb4fd6 in __interceptor_posix_memalign /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:226 #1 0x7fc8b0e379cb (/usr/lib/libopenal.so.1+0x949cb) SUMMARY: AddressSanitizer: heap-use-after-free /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 in __interceptor_strlen Shadow bytes around the buggy address: 0x0c0e80038bb0: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 0x0c0e80038bc0: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 0x0c0e80038bd0: 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 0x0c0e80038be0: 00 00 02 fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c0e80038bf0: 02 fa fa fa fa fa fd fd fd fd fd fd fd fd fa fa =>0x0c0e80038c00: fa fa fa fa fd fd[fd]fd fd fd fd fd fa fa fa fa 0x0c0e80038c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==20931==ABORTING
2021-12-20 19:50:58 +01:00
audioDeviceSelectorComboBox->addItem(QString::fromStdString(name), QString::fromStdString(name));
2021-04-09 19:28:08 +00:00
}
Fix ASAN error: heap-use-after-free ================================================================= ==20931==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000206030 at pc 0x7fc8b0f3a72b bp 0x7ffcee176860 sp 0x7ffcee176008 READ of size 13 at 0x607000206030 thread T0 #0 0x7fc8b0f3a72a in __interceptor_strlen /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 #1 0x562e069a0af7 in QString::fromUtf8(char const*, int) /usr/include/qt/QtCore/qstring.h:706 #2 0x562e069a0af7 in Launcher::AdvancedPage::AdvancedPage(Config::GameSettings&, QWidget*) /home/elsid/dev/openmw/apps/launcher/advancedpage.cpp:29 #3 0x562e06959613 in Launcher::MainDialog::createPages() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:127 #4 0x562e069691d2 in Launcher::MainDialog::setup() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:228 #5 0x562e06969d88 in Launcher::MainDialog::showFirstRunDialog() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:188 #6 0x562e06957025 in main /home/elsid/dev/openmw/apps/launcher/main.cpp:35 #7 0x7fc8ad0d9b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #8 0x562e0690fced in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw-launcher+0x56ced) 0x607000206030 is located 16 bytes inside of 64-byte region [0x607000206020,0x607000206060) freed by thread T0 here: #0 0x7fc8b0fb3f19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x7fc8b0de3388 (/usr/lib/libopenal.so.1+0x40388) previously allocated by thread T0 here: #0 0x7fc8b0fb4fd6 in __interceptor_posix_memalign /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:226 #1 0x7fc8b0e379cb (/usr/lib/libopenal.so.1+0x949cb) SUMMARY: AddressSanitizer: heap-use-after-free /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 in __interceptor_strlen Shadow bytes around the buggy address: 0x0c0e80038bb0: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 0x0c0e80038bc0: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 0x0c0e80038bd0: 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 0x0c0e80038be0: 00 00 02 fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c0e80038bf0: 02 fa fa fa fa fa fd fd fd fd fd fd fd fd fa fa =>0x0c0e80038c00: fa fa fa fa fd fd[fd]fd fd fd fd fd fa fa fa fa 0x0c0e80038c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==20931==ABORTING
2021-12-20 19:50:58 +01:00
for (const std::string& name : Launcher::enumerateOpenALDevicesHrtf())
2021-04-09 19:28:08 +00:00
{
Fix ASAN error: heap-use-after-free ================================================================= ==20931==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000206030 at pc 0x7fc8b0f3a72b bp 0x7ffcee176860 sp 0x7ffcee176008 READ of size 13 at 0x607000206030 thread T0 #0 0x7fc8b0f3a72a in __interceptor_strlen /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 #1 0x562e069a0af7 in QString::fromUtf8(char const*, int) /usr/include/qt/QtCore/qstring.h:706 #2 0x562e069a0af7 in Launcher::AdvancedPage::AdvancedPage(Config::GameSettings&, QWidget*) /home/elsid/dev/openmw/apps/launcher/advancedpage.cpp:29 #3 0x562e06959613 in Launcher::MainDialog::createPages() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:127 #4 0x562e069691d2 in Launcher::MainDialog::setup() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:228 #5 0x562e06969d88 in Launcher::MainDialog::showFirstRunDialog() /home/elsid/dev/openmw/apps/launcher/maindialog.cpp:188 #6 0x562e06957025 in main /home/elsid/dev/openmw/apps/launcher/main.cpp:35 #7 0x7fc8ad0d9b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #8 0x562e0690fced in _start (/home/elsid/dev/openmw/build/gcc/asan/openmw-launcher+0x56ced) 0x607000206030 is located 16 bytes inside of 64-byte region [0x607000206020,0x607000206060) freed by thread T0 here: #0 0x7fc8b0fb3f19 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x7fc8b0de3388 (/usr/lib/libopenal.so.1+0x40388) previously allocated by thread T0 here: #0 0x7fc8b0fb4fd6 in __interceptor_posix_memalign /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:226 #1 0x7fc8b0e379cb (/usr/lib/libopenal.so.1+0x949cb) SUMMARY: AddressSanitizer: heap-use-after-free /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:389 in __interceptor_strlen Shadow bytes around the buggy address: 0x0c0e80038bb0: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 0x0c0e80038bc0: 00 00 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 0x0c0e80038bd0: 00 00 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 0x0c0e80038be0: 00 00 02 fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c0e80038bf0: 02 fa fa fa fa fa fd fd fd fd fd fd fd fd fa fa =>0x0c0e80038c00: fa fa fa fa fd fd[fd]fd fd fd fd fd fa fa fa fa 0x0c0e80038c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e80038c50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==20931==ABORTING
2021-12-20 19:50:58 +01:00
hrtfProfileSelectorComboBox->addItem(QString::fromStdString(name), QString::fromStdString(name));
2021-04-09 19:28:08 +00:00
}
loadSettings();
2021-04-09 19:28:08 +00:00
mCellNameCompleter.setModel(&mCellNameCompleterModel);
startDefaultCharacterAtField->setCompleter(&mCellNameCompleter);
}
void Launcher::AdvancedPage::loadCellsForAutocomplete(QStringList cellNames)
{
// Update the list of suggestions for the "Start default character at" field
mCellNameCompleterModel.setStringList(cellNames);
mCellNameCompleter.setCompletionMode(QCompleter::PopupCompletion);
mCellNameCompleter.setCaseSensitivity(Qt::CaseSensitivity::CaseInsensitive);
}
void Launcher::AdvancedPage::on_skipMenuCheckBox_stateChanged(int state)
{
startDefaultCharacterAtLabel->setEnabled(state == Qt::Checked);
startDefaultCharacterAtField->setEnabled(state == Qt::Checked);
}
void Launcher::AdvancedPage::on_runScriptAfterStartupBrowseButton_clicked()
{
QString scriptFile = QFileDialog::getOpenFileName(
this, QObject::tr("Select script file"), QDir::currentPath(), QString(tr("Text file (*.txt)")));
if (scriptFile.isEmpty())
return;
QFileInfo info(scriptFile);
if (!info.exists() || !info.isReadable())
return;
const QString path(QDir::toNativeSeparators(info.absoluteFilePath()));
runScriptAfterStartupField->setText(path);
}
2020-07-09 14:56:13 +02:00
namespace
{
constexpr double CellSizeInUnits = 8192;
double convertToCells(double unitRadius)
{
return unitRadius / CellSizeInUnits;
2020-07-09 14:56:13 +02:00
}
int convertToUnits(double CellGridRadius)
2020-07-09 14:56:13 +02:00
{
return static_cast<int>(CellSizeInUnits * CellGridRadius);
2020-07-09 14:56:13 +02:00
}
}
bool Launcher::AdvancedPage::loadSettings()
{
2020-07-09 14:56:13 +02:00
// Game mechanics
{
loadSettingBool(toggleSneakCheckBox, "toggle sneak", "Input");
loadSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game");
loadSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game");
loadSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game");
loadSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
loadSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
loadSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
loadSettingBool(classicCalmSpellsCheckBox, "classic calm spells behavior", "Game");
2020-07-09 14:56:13 +02:00
loadSettingBool(
requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
loadSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
loadSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game");
2020-08-07 20:17:44 +00:00
loadSettingBool(swimUpwardCorrectionCheckBox, "swim upward correction", "Game");
loadSettingBool(avoidCollisionsCheckBox, "NPCs avoid collisions", "Game");
int unarmedFactorsStrengthIndex = Settings::Manager::getInt("strength influences hand to hand", "Game");
2020-07-09 14:56:13 +02:00
if (unarmedFactorsStrengthIndex >= 0 && unarmedFactorsStrengthIndex <= 2)
unarmedFactorsStrengthComboBox->setCurrentIndex(unarmedFactorsStrengthIndex);
loadSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
2020-08-07 20:17:44 +00:00
loadSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
int numPhysicsThreads = Settings::Manager::getInt("async num threads", "Physics");
if (numPhysicsThreads >= 0)
physicsThreadsSpinBox->setValue(numPhysicsThreads);
loadSettingBool(allowNPCToFollowOverWaterSurfaceCheckBox, "allow actors to follow over water surface", "Game");
loadSettingBool(unarmedCreatureAttacksDamageArmorCheckBox, "unarmed creature attacks damage armor", "Game");
const int actorCollisionShapeType = Settings::Manager::getInt("actor collision shape type", "Game");
if (0 <= actorCollisionShapeType && actorCollisionShapeType < actorCollisonShapeTypeComboBox->count())
actorCollisonShapeTypeComboBox->setCurrentIndex(actorCollisionShapeType);
2020-07-09 14:56:13 +02:00
}
// Visuals
{
2020-08-07 20:17:44 +00:00
loadSettingBool(autoUseObjectNormalMapsCheckBox, "auto use object normal maps", "Shaders");
loadSettingBool(autoUseObjectSpecularMapsCheckBox, "auto use object specular maps", "Shaders");
loadSettingBool(autoUseTerrainNormalMapsCheckBox, "auto use terrain normal maps", "Shaders");
loadSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders");
2020-07-09 14:56:13 +02:00
loadSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
2021-11-01 09:26:50 -07:00
loadSettingBool(softParticlesCheckBox, "soft particles", "Shaders");
loadSettingBool(antialiasAlphaTestCheckBox, "antialias alpha test", "Shaders");
if (Settings::Manager::getInt("antialiasing", "Video") == 0)
{
antialiasAlphaTestCheckBox->setCheckState(Qt::Unchecked);
}
loadSettingBool(adjustCoverageForAlphaTestCheckBox, "adjust coverage for alpha test", "Shaders");
2020-07-09 14:56:13 +02:00
loadSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
connect(animSourcesCheckBox, &QCheckBox::toggled, this, &AdvancedPage::slotAnimSourcesToggled);
2020-07-09 14:56:13 +02:00
loadSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
2021-01-09 13:19:41 +04:00
if (animSourcesCheckBox->checkState() != Qt::Unchecked)
2020-07-09 14:56:13 +02:00
{
loadSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");
loadSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game");
}
loadSettingBool(turnToMovementDirectionCheckBox, "turn to movement direction", "Game");
loadSettingBool(smoothMovementCheckBox, "smooth movement", "Game");
2020-07-09 14:56:13 +02:00
const bool distantTerrain = Settings::Manager::getBool("distant terrain", "Terrain");
const bool objectPaging = Settings::Manager::getBool("object paging", "Terrain");
2020-07-09 14:56:13 +02:00
if (distantTerrain && objectPaging)
{
distantLandCheckBox->setCheckState(Qt::Checked);
}
loadSettingBool(activeGridObjectPagingCheckBox, "object paging active grid", "Terrain");
viewingDistanceComboBox->setValue(convertToCells(Settings::Manager::getInt("viewing distance", "Camera")));
objectPagingMinSizeComboBox->setValue(Settings::Manager::getDouble("object paging min size", "Terrain"));
2022-01-11 09:34:19 +00:00
loadSettingBool(nightDaySwitchesCheckBox, "day night switches", "Game");
2022-05-13 18:58:00 -07:00
connect(postprocessEnabledCheckBox, &QCheckBox::toggled, this, &AdvancedPage::slotPostProcessToggled);
2022-05-13 18:58:00 -07:00
loadSettingBool(postprocessEnabledCheckBox, "enabled", "Post Processing");
loadSettingBool(postprocessTransparentPostpassCheckBox, "transparent postpass", "Post Processing");
2022-07-22 20:41:08 -07:00
postprocessHDRTimeComboBox->setValue(Settings::Manager::getDouble("auto exposure speed", "Post Processing"));
2022-07-11 00:26:22 +00:00
connect(skyBlendingCheckBox, &QCheckBox::toggled, this, &AdvancedPage::slotSkyBlendingToggled);
2022-07-11 00:26:22 +00:00
loadSettingBool(radialFogCheckBox, "radial fog", "Fog");
loadSettingBool(exponentialFogCheckBox, "exponential fog", "Fog");
loadSettingBool(skyBlendingCheckBox, "sky blending", "Fog");
skyBlendingStartComboBox->setValue(Settings::Manager::getDouble("sky blending start", "Fog"));
2020-07-09 14:56:13 +02:00
}
2021-04-09 19:28:08 +00:00
// Audio
{
const std::string& selectedAudioDevice = Settings::Manager::getString("device", "Sound");
2021-04-09 19:28:08 +00:00
if (selectedAudioDevice.empty() == false)
{
int audioDeviceIndex = audioDeviceSelectorComboBox->findData(QString::fromStdString(selectedAudioDevice));
if (audioDeviceIndex != -1)
{
audioDeviceSelectorComboBox->setCurrentIndex(audioDeviceIndex);
}
}
int hrtfEnabledIndex = Settings::Manager::getInt("hrtf enable", "Sound");
2021-04-09 19:28:08 +00:00
if (hrtfEnabledIndex >= -1 && hrtfEnabledIndex <= 1)
{
enableHRTFComboBox->setCurrentIndex(hrtfEnabledIndex + 1);
}
const std::string& selectedHRTFProfile = Settings::Manager::getString("hrtf", "Sound");
2021-04-09 19:28:08 +00:00
if (selectedHRTFProfile.empty() == false)
{
int hrtfProfileIndex = hrtfProfileSelectorComboBox->findData(QString::fromStdString(selectedHRTFProfile));
if (hrtfProfileIndex != -1)
{
hrtfProfileSelectorComboBox->setCurrentIndex(hrtfProfileIndex);
}
}
}
2020-07-09 14:56:13 +02:00
// Interface Changes
{
loadSettingBool(showEffectDurationCheckBox, "show effect duration", "Game");
loadSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game");
loadSettingBool(showMeleeInfoCheckBox, "show melee info", "Game");
loadSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game");
loadSettingBool(changeDialogTopicsCheckBox, "color topic enable", "GUI");
int showOwnedIndex = Settings::Manager::getInt("show owned", "Game");
2020-07-09 14:56:13 +02:00
// Match the index with the option (only 0, 1, 2, or 3 are valid). Will default to 0 if invalid.
if (showOwnedIndex >= 0 && showOwnedIndex <= 3)
showOwnedComboBox->setCurrentIndex(showOwnedIndex);
loadSettingBool(stretchBackgroundCheckBox, "stretch menu background", "GUI");
loadSettingBool(useZoomOnMapCheckBox, "allow zooming", "Map");
2020-12-10 19:02:38 +01:00
loadSettingBool(graphicHerbalismCheckBox, "graphic herbalism", "Game");
scalingSpinBox->setValue(Settings::Manager::getFloat("scaling factor", "GUI"));
fontSizeSpinBox->setValue(Settings::Manager::getInt("font size", "GUI"));
2020-07-09 14:56:13 +02:00
}
// Bug fixes
{
loadSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game");
loadSettingBool(
trainersTrainingSkillsBasedOnBaseSkillCheckBox, "trainers training skills based on base skill", "Game");
}
// Miscellaneous
{
// Saves
loadSettingBool(timePlayedCheckbox, "timeplayed", "Saves");
loadSettingInt(maximumQuicksavesComboBox, "max quicksaves", "Saves");
2020-07-09 14:56:13 +02:00
// Other Settings
QString screenshotFormatString
= QString::fromStdString(Settings::Manager::getString("screenshot format", "General")).toUpper();
2020-07-09 14:56:13 +02:00
if (screenshotFormatComboBox->findText(screenshotFormatString) == -1)
screenshotFormatComboBox->addItem(screenshotFormatString);
screenshotFormatComboBox->setCurrentIndex(screenshotFormatComboBox->findText(screenshotFormatString));
loadSettingBool(notifyOnSavedScreenshotCheckBox, "notify on saved screenshot", "General");
2020-07-09 14:56:13 +02:00
}
// Testing
2020-07-09 14:56:13 +02:00
{
loadSettingBool(grabCursorCheckBox, "grab cursor", "Input");
2020-07-09 14:56:13 +02:00
bool skipMenu = mGameSettings.value("skip-menu").toInt() == 1;
if (skipMenu)
{
skipMenuCheckBox->setCheckState(Qt::Checked);
}
startDefaultCharacterAtLabel->setEnabled(skipMenu);
startDefaultCharacterAtField->setEnabled(skipMenu);
startDefaultCharacterAtField->setText(mGameSettings.value("start"));
runScriptAfterStartupField->setText(mGameSettings.value("script-run"));
}
return true;
}
void Launcher::AdvancedPage::saveSettings()
{
2020-07-09 14:56:13 +02:00
// Game mechanics
{
saveSettingBool(toggleSneakCheckBox, "toggle sneak", "Input");
saveSettingBool(canLootDuringDeathAnimationCheckBox, "can loot during death animation", "Game");
saveSettingBool(followersAttackOnSightCheckBox, "followers attack on sight", "Game");
saveSettingBool(rebalanceSoulGemValuesCheckBox, "rebalance soul gem values", "Game");
saveSettingBool(enchantedWeaponsMagicalCheckBox, "enchanted weapons are magical", "Game");
saveSettingBool(permanentBarterDispositionChangeCheckBox, "barter disposition change is permanent", "Game");
saveSettingBool(classicReflectedAbsorbSpellsCheckBox, "classic reflected absorb spells behavior", "Game");
saveSettingBool(classicCalmSpellsCheckBox, "classic calm spells behavior", "Game");
2020-07-09 14:56:13 +02:00
saveSettingBool(
requireAppropriateAmmunitionCheckBox, "only appropriate ammunition bypasses resistance", "Game");
saveSettingBool(uncappedDamageFatigueCheckBox, "uncapped damage fatigue", "Game");
saveSettingBool(normaliseRaceSpeedCheckBox, "normalise race speed", "Game");
2020-08-07 20:17:44 +00:00
saveSettingBool(swimUpwardCorrectionCheckBox, "swim upward correction", "Game");
saveSettingBool(avoidCollisionsCheckBox, "NPCs avoid collisions", "Game");
saveSettingInt(unarmedFactorsStrengthComboBox, "strength influences hand to hand", "Game");
saveSettingBool(stealingFromKnockedOutCheckBox, "always allow stealing from knocked out actors", "Game");
2020-08-07 20:17:44 +00:00
saveSettingBool(enableNavigatorCheckBox, "enable", "Navigator");
saveSettingInt(physicsThreadsSpinBox, "async num threads", "Physics");
saveSettingBool(allowNPCToFollowOverWaterSurfaceCheckBox, "allow actors to follow over water surface", "Game");
saveSettingBool(unarmedCreatureAttacksDamageArmorCheckBox, "unarmed creature attacks damage armor", "Game");
saveSettingInt(actorCollisonShapeTypeComboBox, "actor collision shape type", "Game");
2020-07-09 14:56:13 +02:00
}
// Visuals
{
2020-08-07 20:17:44 +00:00
saveSettingBool(autoUseObjectNormalMapsCheckBox, "auto use object normal maps", "Shaders");
saveSettingBool(autoUseObjectSpecularMapsCheckBox, "auto use object specular maps", "Shaders");
saveSettingBool(autoUseTerrainNormalMapsCheckBox, "auto use terrain normal maps", "Shaders");
saveSettingBool(autoUseTerrainSpecularMapsCheckBox, "auto use terrain specular maps", "Shaders");
2020-07-09 14:56:13 +02:00
saveSettingBool(bumpMapLocalLightingCheckBox, "apply lighting to environment maps", "Shaders");
2022-06-06 22:40:38 +02:00
saveSettingBool(radialFogCheckBox, "radial fog", "Fog");
2021-11-01 09:26:50 -07:00
saveSettingBool(softParticlesCheckBox, "soft particles", "Shaders");
saveSettingBool(antialiasAlphaTestCheckBox, "antialias alpha test", "Shaders");
saveSettingBool(adjustCoverageForAlphaTestCheckBox, "adjust coverage for alpha test", "Shaders");
2020-07-09 14:56:13 +02:00
saveSettingBool(magicItemAnimationsCheckBox, "use magic item animations", "Game");
saveSettingBool(animSourcesCheckBox, "use additional anim sources", "Game");
saveSettingBool(weaponSheathingCheckBox, "weapon sheathing", "Game");
saveSettingBool(shieldSheathingCheckBox, "shield sheathing", "Game");
saveSettingBool(turnToMovementDirectionCheckBox, "turn to movement direction", "Game");
saveSettingBool(smoothMovementCheckBox, "smooth movement", "Game");
2020-07-09 14:56:13 +02:00
const bool distantTerrain = Settings::Manager::getBool("distant terrain", "Terrain");
const bool objectPaging = Settings::Manager::getBool("object paging", "Terrain");
2020-07-09 14:56:13 +02:00
const bool wantDistantLand = distantLandCheckBox->checkState();
if (wantDistantLand != (distantTerrain && objectPaging))
{
Settings::Manager::setBool("distant terrain", "Terrain", wantDistantLand);
Settings::Manager::setBool("object paging", "Terrain", wantDistantLand);
2020-07-09 14:56:13 +02:00
}
saveSettingBool(activeGridObjectPagingCheckBox, "object paging active grid", "Terrain");
int viewingDistance = convertToUnits(viewingDistanceComboBox->value());
if (viewingDistance != Settings::Manager::getInt("viewing distance", "Camera"))
2020-07-09 14:56:13 +02:00
{
Settings::Manager::setInt("viewing distance", "Camera", viewingDistance);
2020-07-09 14:56:13 +02:00
}
double objectPagingMinSize = objectPagingMinSizeComboBox->value();
if (objectPagingMinSize != Settings::Manager::getDouble("object paging min size", "Terrain"))
Settings::Manager::setDouble("object paging min size", "Terrain", objectPagingMinSize);
2022-01-11 09:34:19 +00:00
saveSettingBool(nightDaySwitchesCheckBox, "day night switches", "Game");
2022-05-13 18:58:00 -07:00
saveSettingBool(postprocessEnabledCheckBox, "enabled", "Post Processing");
saveSettingBool(postprocessTransparentPostpassCheckBox, "transparent postpass", "Post Processing");
double hdrExposureTime = postprocessHDRTimeComboBox->value();
2022-07-22 20:41:08 -07:00
if (hdrExposureTime != Settings::Manager::getDouble("auto exposure speed", "Post Processing"))
Settings::Manager::setDouble("auto exposure speed", "Post Processing", hdrExposureTime);
2022-07-11 00:26:22 +00:00
saveSettingBool(radialFogCheckBox, "radial fog", "Fog");
saveSettingBool(exponentialFogCheckBox, "exponential fog", "Fog");
saveSettingBool(skyBlendingCheckBox, "sky blending", "Fog");
Settings::Manager::setDouble("sky blending start", "Fog", skyBlendingStartComboBox->value());
2020-07-09 14:56:13 +02:00
}
2021-04-09 19:28:08 +00:00
// Audio
{
int audioDeviceIndex = audioDeviceSelectorComboBox->currentIndex();
const std::string& prevAudioDevice = Settings::Manager::getString("device", "Sound");
2021-04-09 19:28:08 +00:00
if (audioDeviceIndex != 0)
{
const std::string& newAudioDevice = audioDeviceSelectorComboBox->currentText().toUtf8().constData();
if (newAudioDevice != prevAudioDevice)
Settings::Manager::setString("device", "Sound", newAudioDevice);
}
else if (!prevAudioDevice.empty())
2021-04-09 19:28:08 +00:00
{
Settings::Manager::setString("device", "Sound", {});
2021-04-09 19:28:08 +00:00
}
int hrtfEnabledIndex = enableHRTFComboBox->currentIndex() - 1;
if (hrtfEnabledIndex != Settings::Manager::getInt("hrtf enable", "Sound"))
2021-04-09 19:28:08 +00:00
{
Settings::Manager::setInt("hrtf enable", "Sound", hrtfEnabledIndex);
2021-04-09 19:28:08 +00:00
}
int selectedHRTFProfileIndex = hrtfProfileSelectorComboBox->currentIndex();
const std::string& prevHRTFProfile = Settings::Manager::getString("hrtf", "Sound");
2021-04-09 19:28:08 +00:00
if (selectedHRTFProfileIndex != 0)
{
const std::string& newHRTFProfile = hrtfProfileSelectorComboBox->currentText().toUtf8().constData();
if (newHRTFProfile != prevHRTFProfile)
Settings::Manager::setString("hrtf", "Sound", newHRTFProfile);
2021-04-09 19:28:08 +00:00
}
else if (!prevHRTFProfile.empty())
2021-04-09 19:28:08 +00:00
{
Settings::Manager::setString("hrtf", "Sound", {});
2021-04-09 19:28:08 +00:00
}
}
2020-07-09 14:56:13 +02:00
// Interface Changes
{
saveSettingBool(showEffectDurationCheckBox, "show effect duration", "Game");
saveSettingBool(showEnchantChanceCheckBox, "show enchant chance", "Game");
saveSettingBool(showMeleeInfoCheckBox, "show melee info", "Game");
saveSettingBool(showProjectileDamageCheckBox, "show projectile damage", "Game");
saveSettingBool(changeDialogTopicsCheckBox, "color topic enable", "GUI");
saveSettingInt(showOwnedComboBox, "show owned", "Game");
saveSettingBool(stretchBackgroundCheckBox, "stretch menu background", "GUI");
saveSettingBool(useZoomOnMapCheckBox, "allow zooming", "Map");
2020-12-10 19:02:38 +01:00
saveSettingBool(graphicHerbalismCheckBox, "graphic herbalism", "Game");
float uiScalingFactor = scalingSpinBox->value();
if (uiScalingFactor != Settings::Manager::getFloat("scaling factor", "GUI"))
Settings::Manager::setFloat("scaling factor", "GUI", uiScalingFactor);
int fontSize = fontSizeSpinBox->value();
if (fontSize != Settings::Manager::getInt("font size", "GUI"))
Settings::Manager::setInt("font size", "GUI", fontSize);
2020-07-09 14:56:13 +02:00
}
// Bug fixes
{
saveSettingBool(preventMerchantEquippingCheckBox, "prevent merchant equipping", "Game");
saveSettingBool(
trainersTrainingSkillsBasedOnBaseSkillCheckBox, "trainers training skills based on base skill", "Game");
}
// Miscellaneous
{
// Saves Settings
saveSettingBool(timePlayedCheckbox, "timeplayed", "Saves");
saveSettingInt(maximumQuicksavesComboBox, "max quicksaves", "Saves");
2020-07-09 14:56:13 +02:00
// Other Settings
std::string screenshotFormatString = screenshotFormatComboBox->currentText().toLower().toStdString();
if (screenshotFormatString != Settings::Manager::getString("screenshot format", "General"))
Settings::Manager::setString("screenshot format", "General", screenshotFormatString);
saveSettingBool(notifyOnSavedScreenshotCheckBox, "notify on saved screenshot", "General");
2020-07-09 14:56:13 +02:00
}
// Testing
2020-07-09 14:56:13 +02:00
{
saveSettingBool(grabCursorCheckBox, "grab cursor", "Input");
int skipMenu = skipMenuCheckBox->checkState() == Qt::Checked;
if (skipMenu != mGameSettings.value("skip-menu").toInt())
mGameSettings.setValue("skip-menu", QString::number(skipMenu));
QString startCell = startDefaultCharacterAtField->text();
if (startCell != mGameSettings.value("start"))
{
mGameSettings.setValue("start", startCell);
}
QString scriptRun = runScriptAfterStartupField->text();
if (scriptRun != mGameSettings.value("script-run"))
mGameSettings.setValue("script-run", scriptRun);
}
}
2020-07-09 14:56:13 +02:00
void Launcher::AdvancedPage::loadSettingBool(QCheckBox* checkbox, const std::string& setting, const std::string& group)
{
if (Settings::Manager::getBool(setting, group))
checkbox->setCheckState(Qt::Checked);
}
2020-07-09 14:56:13 +02:00
void Launcher::AdvancedPage::saveSettingBool(QCheckBox* checkbox, const std::string& setting, const std::string& group)
{
bool cValue = checkbox->checkState();
if (cValue != Settings::Manager::getBool(setting, group))
Settings::Manager::setBool(setting, group, cValue);
}
void Launcher::AdvancedPage::loadSettingInt(QComboBox* comboBox, const std::string& setting, const std::string& group)
{
int currentIndex = Settings::Manager::getInt(setting, group);
comboBox->setCurrentIndex(currentIndex);
}
void Launcher::AdvancedPage::saveSettingInt(QComboBox* comboBox, const std::string& setting, const std::string& group)
{
int currentIndex = comboBox->currentIndex();
if (currentIndex != Settings::Manager::getInt(setting, group))
Settings::Manager::setInt(setting, group, currentIndex);
}
void Launcher::AdvancedPage::loadSettingInt(QSpinBox* spinBox, const std::string& setting, const std::string& group)
{
int value = Settings::Manager::getInt(setting, group);
spinBox->setValue(value);
}
void Launcher::AdvancedPage::saveSettingInt(QSpinBox* spinBox, const std::string& setting, const std::string& group)
{
int value = spinBox->value();
if (value != Settings::Manager::getInt(setting, group))
Settings::Manager::setInt(setting, group, value);
}
void Launcher::AdvancedPage::slotLoadedCellsChanged(QStringList cellNames)
{
loadCellsForAutocomplete(cellNames);
}
void Launcher::AdvancedPage::slotAnimSourcesToggled(bool checked)
{
weaponSheathingCheckBox->setEnabled(checked);
shieldSheathingCheckBox->setEnabled(checked);
if (!checked)
{
weaponSheathingCheckBox->setCheckState(Qt::Unchecked);
shieldSheathingCheckBox->setCheckState(Qt::Unchecked);
}
}
2020-08-07 20:17:44 +00:00
2022-05-13 18:58:00 -07:00
void Launcher::AdvancedPage::slotPostProcessToggled(bool checked)
{
postprocessTransparentPostpassCheckBox->setEnabled(checked);
postprocessHDRTimeComboBox->setEnabled(checked);
postprocessHDRTimeLabel->setEnabled(checked);
}
2022-07-11 00:26:22 +00:00
void Launcher::AdvancedPage::slotSkyBlendingToggled(bool checked)
{
skyBlendingStartComboBox->setEnabled(checked);
skyBlendingStartLabel->setEnabled(checked);
}