diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fadb8c82a..7bc645d0af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -735,6 +735,7 @@ endif() if (APPLE) target_compile_definitions(components PRIVATE GL_SILENCE_DEPRECATION=1) target_compile_definitions(openmw PRIVATE GL_SILENCE_DEPRECATION=1) + target_compile_definitions(openmw-lib PRIVATE GL_SILENCE_DEPRECATION=1) endif() # Apple bundling diff --git a/apps/opencs/model/prefs/boolsetting.cpp b/apps/opencs/model/prefs/boolsetting.cpp index 44262e2012..98947f2ae0 100644 --- a/apps/opencs/model/prefs/boolsetting.cpp +++ b/apps/opencs/model/prefs/boolsetting.cpp @@ -34,7 +34,7 @@ CSMPrefs::SettingWidgets CSMPrefs::BoolSetting::makeWidgets(QWidget* parent) mWidget->setToolTip(tooltip); } - connect(mWidget, &QCheckBox::stateChanged, this, &BoolSetting::valueChanged); + connect(mWidget, &QCheckBox::checkStateChanged, this, &BoolSetting::valueChanged); return SettingWidgets{ .mLabel = nullptr, .mInput = mWidget }; } diff --git a/apps/opencs/model/prefs/shortcutmanager.cpp b/apps/opencs/model/prefs/shortcutmanager.cpp index 6e48eebb6a..82650e6456 100644 --- a/apps/opencs/model/prefs/shortcutmanager.cpp +++ b/apps/opencs/model/prefs/shortcutmanager.cpp @@ -431,7 +431,7 @@ namespace CSMPrefs std::make_pair((int)Qt::Key_twosuperior, "twosuperior"), std::make_pair((int)Qt::Key_threesuperior, "threesuperior"), std::make_pair((int)Qt::Key_acute, "acute"), - std::make_pair((int)Qt::Key_mu, "mu"), + std::make_pair((int)Qt::Key_micro, "mu"), std::make_pair((int)Qt::Key_paragraph, "paragraph"), std::make_pair((int)Qt::Key_periodcentered, "periodcentered"), std::make_pair((int)Qt::Key_cedilla, "cedilla"), diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index ac69805134..5f5a68b25e 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -298,7 +298,7 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor( } else if (qobject_cast(editor)) { - connect(static_cast(editor), &QCheckBox::stateChanged, proxy, + connect(static_cast(editor), &QCheckBox::checkStateChanged, proxy, qOverload<>(&DialogueDelegateDispatcherProxy::editorDataCommited)); } else if (qobject_cast(editor)) diff --git a/apps/opencs/view/world/extendedcommandconfigurator.cpp b/apps/opencs/view/world/extendedcommandconfigurator.cpp index 97494fa076..79de852b40 100644 --- a/apps/opencs/view/world/extendedcommandconfigurator.cpp +++ b/apps/opencs/view/world/extendedcommandconfigurator.cpp @@ -130,7 +130,7 @@ void CSVWorld::ExtendedCommandConfigurator::setupCheckBoxes(const std::vector 0; --i) { QCheckBox* checkBox = new QCheckBox(mTypeGroup); - connect(checkBox, &QCheckBox::stateChanged, this, &ExtendedCommandConfigurator::checkBoxStateChanged); + connect(checkBox, &QCheckBox::checkStateChanged, this, &ExtendedCommandConfigurator::checkBoxStateChanged); mTypeCheckBoxes.insert(std::make_pair(checkBox, CSMWorld::UniversalId::Type_None)); } } diff --git a/apps/opencs/view/world/tablesubview.cpp b/apps/opencs/view/world/tablesubview.cpp index d2bf425ddd..d899768476 100644 --- a/apps/opencs/view/world/tablesubview.cpp +++ b/apps/opencs/view/world/tablesubview.cpp @@ -55,7 +55,7 @@ CSVWorld::TableSubView::TableSubView( "\nCan be useful in finding the moved or modified" "\nobject instance while 3D editing."); autoJump->setCheckState(Qt::Unchecked); - connect(autoJump, &QCheckBox::stateChanged, mTable, &Table::jumpAfterModChanged); + connect(autoJump, &QCheckBox::checkStateChanged, mTable, &Table::jumpAfterModChanged); optHLayout->insertWidget(0, autoJump); optHLayout->setContentsMargins(QMargins(0, 3, 0, 0)); mOptions->setLayout(optHLayout); diff --git a/components/misc/strings/format.hpp b/components/misc/strings/format.hpp index 21ddf26622..56cbcf47cd 100644 --- a/components/misc/strings/format.hpp +++ b/components/misc/strings/format.hpp @@ -54,9 +54,9 @@ namespace Misc::StringUtils const int size = std::snprintf(nullptr, 0, fmt, argument(args)...); if (size < 0) throw std::system_error(errno, std::generic_category(), "Failed to compute resulting string size"); - // Note: sprintf also writes a trailing null character. We should remove it. + // Note: snprintf also writes a trailing null character. We should remove it. std::string ret(static_cast(size) + 1, '\0'); - if (std::sprintf(ret.data(), fmt, argument(args)...) < 0) + if (std::snprintf(ret.data(), ret.size(), fmt, argument(args)...) < 0) throw std::system_error(errno, std::generic_category(), "Failed to format string"); ret.erase(static_cast(size)); return ret;