mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 10:09:42 +00:00
Merge branch 'fix/less-strict-ids' into 'master'
Fix(idvalidator): Allow any printable character in refIds Closes #7721 See merge request OpenMW/openmw!3896
This commit is contained in:
commit
9434f52c14
3 changed files with 2 additions and 15 deletions
|
@ -136,6 +136,7 @@
|
|||
Bug #7679: Scene luminance value flashes when toggling shaders
|
||||
Bug #7685: Corky sometimes doesn't follow Llovyn Andus
|
||||
Bug #7712: Casting doesn't support spells and enchantments with no effects
|
||||
Bug #7721: CS: Special Chars Not Allowed in IDs
|
||||
Bug #7723: Assaulting vampires and werewolves shouldn't be a crime
|
||||
Bug #7724: Guards don't help vs werewolves
|
||||
Bug #7733: Launcher shows incorrect data paths when there's two plugins with the same name
|
||||
|
|
|
@ -2,17 +2,6 @@
|
|||
|
||||
#include <components/misc/strings/lower.hpp>
|
||||
|
||||
bool CSVWorld::IdValidator::isValid(const QChar& c, bool first) const
|
||||
{
|
||||
if (c.isLetter() || c == '_')
|
||||
return true;
|
||||
|
||||
if (!first && (c.isDigit() || c.isSpace()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
CSVWorld::IdValidator::IdValidator(bool relaxed, QObject* parent)
|
||||
: QValidator(parent)
|
||||
, mRelaxed(relaxed)
|
||||
|
@ -92,7 +81,7 @@ QValidator::State CSVWorld::IdValidator::validate(QString& input, int& pos) cons
|
|||
{
|
||||
prevScope = false;
|
||||
|
||||
if (!isValid(*iter, first))
|
||||
if (!iter->isPrint())
|
||||
return QValidator::Invalid;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,9 +13,6 @@ namespace CSVWorld
|
|||
std::string mNamespace;
|
||||
mutable std::string mError;
|
||||
|
||||
private:
|
||||
bool isValid(const QChar& c, bool first) const;
|
||||
|
||||
public:
|
||||
IdValidator(bool relaxed = false, QObject* parent = nullptr);
|
||||
///< \param relaxed Relaxed rules for IDs that also functino as user visible text
|
||||
|
|
Loading…
Reference in a new issue