validate IDs entered by the user

This commit is contained in:
Marc Zinnschlag 2013-07-28 14:40:11 +02:00
parent 4f6e99c391
commit 32c697abc6
4 changed files with 53 additions and 1 deletions

View file

@ -10,6 +10,8 @@
#include "../../model/world/data.hpp"
#include "../../model/world/idtable.hpp"
#include "idvalidator.hpp"
void CSVWorld::GenericCreator::update()
{
mErrors = getErrors();
@ -27,6 +29,7 @@ CSVWorld::GenericCreator::GenericCreator (CSMWorld::Data& data, QUndoStack& undo
layout->setContentsMargins (0, 0, 0, 0);
mId = new QLineEdit;
mId->setValidator (new IdValidator (this));
layout->addWidget (mId, 1);
mCreate = new QPushButton ("Create");