Merge branch 'development' into cmake/SPEC-7484

This commit is contained in:
Esteban Papp
2021-08-10 14:30:07 -07:00
153 changed files with 5217 additions and 2016 deletions
-3
View File
@@ -1626,9 +1626,6 @@ bool CCryEditApp::InitInstance()
ReflectedVarInit::setupReflection(serializeContext);
RegisterReflectedVarHandlers();
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
CreateSplashScreen();
// Register the application's document templates. Document templates
+12 -12
View File
@@ -449,21 +449,21 @@ void CViewportTitleDlg::AddFOVMenus(QMenu* menu, std::function<void(float)> call
if (!customPresets.empty())
{
for (size_t i = 0; i < customPresets.size(); ++i)
for (const QString& customPreset : customPresets)
{
if (customPresets[i].isEmpty())
if (customPreset.isEmpty())
{
break;
}
float fov = gSettings.viewports.fDefaultFov;
bool ok;
float f = customPresets[i].toDouble(&ok);
float f = customPreset.toDouble(&ok);
if (ok)
{
fov = std::max(1.0f, f);
fov = std::min(120.0f, f);
QAction* action = menu->addAction(customPresets[i]);
QAction* action = menu->addAction(customPreset);
connect(action, &QAction::triggered, action, [fov, callback](){ callback(fov); });
}
}
@@ -535,15 +535,15 @@ void CViewportTitleDlg::AddAspectRatioMenus(QMenu* menu, std::function<void(int,
menu->addSeparator();
for (size_t i = 0; i < customPresets.size(); ++i)
for (const QString& customPreset : customPresets)
{
if (customPresets[i].isEmpty())
if (customPreset.isEmpty())
{
break;
}
static QRegularExpression regex(QStringLiteral("^(\\d+):(\\d+)$"));
QRegularExpressionMatch matches = regex.match(customPresets[i]);
QRegularExpressionMatch matches = regex.match(customPreset);
if (matches.hasMatch())
{
bool ok;
@@ -551,7 +551,7 @@ void CViewportTitleDlg::AddAspectRatioMenus(QMenu* menu, std::function<void(int,
Q_ASSERT(ok);
unsigned int height = matches.captured(2).toInt(&ok);
Q_ASSERT(ok);
QAction* action = menu->addAction(customPresets[i]);
QAction* action = menu->addAction(customPreset);
connect(action, &QAction::triggered, action, [width, height, callback]() {callback(width, height); });
}
}
@@ -684,15 +684,15 @@ void CViewportTitleDlg::AddResolutionMenus(QMenu* menu, std::function<void(int,
menu->addSeparator();
for (size_t i = 0; i < customPresets.size(); ++i)
for (const QString& customPreset : customPresets)
{
if (customPresets[i].isEmpty())
if (customPreset.isEmpty())
{
break;
}
static QRegularExpression regex(QStringLiteral("^(\\d+) x (\\d+)$"));
QRegularExpressionMatch matches = regex.match(customPresets[i]);
QRegularExpressionMatch matches = regex.match(customPreset);
if (matches.hasMatch())
{
bool ok;
@@ -700,7 +700,7 @@ void CViewportTitleDlg::AddResolutionMenus(QMenu* menu, std::function<void(int,
Q_ASSERT(ok);
int height = matches.captured(2).toInt(&ok);
Q_ASSERT(ok);
QAction* action = menu->addAction(customPresets[i]);
QAction* action = menu->addAction(customPreset);
connect(action, &QAction::triggered, action, [width, height, callback](){ callback(width, height); });
}
}