fixed compile error

This commit is contained in:
Marcel Otte 2016-01-10 18:06:10 +01:00
parent 182becb31b
commit 91e7b195bf
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,8 @@
#include <memory>
#include <QVBoxLayout>
#include <QRegExpValidator>
#include <QRegExp>
#include <QLabel>
GuidedEditorElementView::GuidedEditorElementView(QWidget* parent)
: QWidget(parent)
@ -35,7 +37,8 @@ void GuidedEditorElementView::setElement(GuidedEditorElement& element)
case ElementType::INPUT:
this->input = std::make_unique<QLineEdit>(this);
this->layout->addWidget(input.get());
this->input->setValidator(std::make_shared<QRegExpValidator>(element.getSyntaxregex(), input.get()).get());
this->input->setValidator(std::make_shared<QRegExpValidator>(QRegExp(element.getSyntaxregex())).get());
break;
case ElementType::STATIC:
this->staticLabel = std::make_unique<QLabel>(this);