mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
add normal script warnings mode (Fixes #2642)
This commit is contained in:
parent
197b8ec731
commit
b9f6baf317
3 changed files with 9 additions and 4 deletions
|
@ -312,17 +312,18 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
||||||
"\nA name from the list of colors defined in the list of SVG color keyword names."
|
"\nA name from the list of colors defined in the list of SVG color keyword names."
|
||||||
"\nX11 color names may also work.";
|
"\nX11 color names may also work.";
|
||||||
|
|
||||||
QString modeIgnore ("Ignore");
|
QString modeNormal ("Normal");
|
||||||
|
|
||||||
QStringList modes;
|
QStringList modes;
|
||||||
modes << modeIgnore << "Strict";
|
modes << "Ignore" << modeNormal << "Strict";
|
||||||
|
|
||||||
Setting *warnings = createSetting (Type_ComboBox, "warnings",
|
Setting *warnings = createSetting (Type_ComboBox, "warnings",
|
||||||
"Warning Mode");
|
"Warning Mode");
|
||||||
warnings->setDeclaredValues (modes);
|
warnings->setDeclaredValues (modes);
|
||||||
warnings->setDefaultValue (modeIgnore);
|
warnings->setDefaultValue (modeNormal);
|
||||||
warnings->setToolTip ("<ul>How to handle warning messages during compilation:<p>"
|
warnings->setToolTip ("<ul>How to handle warning messages during compilation:<p>"
|
||||||
"<li>Ignore: Do not report warning</li>"
|
"<li>Ignore: Do not report warning</li>"
|
||||||
|
"<li>Normal: Report warning as a warning</li>"
|
||||||
"<li>Strict: Promote warning to an error</li>"
|
"<li>Strict: Promote warning to an error</li>"
|
||||||
"</ul>");
|
"</ul>");
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,8 @@ void CSMTools::ScriptCheckStage::perform (int stage, CSMDoc::Messages& messages)
|
||||||
switch (mWarningMode)
|
switch (mWarningMode)
|
||||||
{
|
{
|
||||||
case Mode_Ignore: setWarningsMode (0); break;
|
case Mode_Ignore: setWarningsMode (0); break;
|
||||||
case Mode_Strict: setWarningsMode (1); break;
|
case Mode_Normal: setWarningsMode (1); break;
|
||||||
|
case Mode_Strict: setWarningsMode (2); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -123,6 +124,8 @@ void CSMTools::ScriptCheckStage::updateUserSetting (const QString& name, const Q
|
||||||
{
|
{
|
||||||
if (value.at (0)=="Ignore")
|
if (value.at (0)=="Ignore")
|
||||||
mWarningMode = Mode_Ignore;
|
mWarningMode = Mode_Ignore;
|
||||||
|
else if (value.at (0)=="Normal")
|
||||||
|
mWarningMode = Mode_Normal;
|
||||||
else if (value.at (0)=="Strict")
|
else if (value.at (0)=="Strict")
|
||||||
mWarningMode = Mode_Strict;
|
mWarningMode = Mode_Strict;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace CSMTools
|
||||||
enum WarningMode
|
enum WarningMode
|
||||||
{
|
{
|
||||||
Mode_Ignore,
|
Mode_Ignore,
|
||||||
|
Mode_Normal,
|
||||||
Mode_Strict
|
Mode_Strict
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue