forked from qt-creator/qt-creator
QmlDesigner: fix crash spaces in properties
Task-number: QTCREATORBUG-16059 Change-Id: Ie6e0fa25675e1f800315de4f22558c83b7d2bba1 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
40a9463c56
commit
6c110d3120
@@ -58,6 +58,7 @@ AbstractProperty::AbstractProperty(const PropertyName &propertyName, const Inter
|
||||
m_view(view)
|
||||
{
|
||||
Q_ASSERT(!m_model || m_view);
|
||||
Q_ASSERT_X(!m_propertyName.contains(' '), Q_FUNC_INFO, "a property name can not contain a space");
|
||||
}
|
||||
|
||||
AbstractProperty::AbstractProperty(const Internal::InternalPropertyPointer &property, Model* model, AbstractView *view)
|
||||
|
||||
@@ -59,6 +59,7 @@ PropertiesComboBox::PropertiesComboBox(QWidget *parent) : QComboBox(parent)
|
||||
{
|
||||
static QScopedPointer<QStyle> style(QStyleFactory::create(QLatin1String("windows")));
|
||||
setEditable(true);
|
||||
setValidator(new QRegularExpressionValidator(QRegularExpression(QLatin1String("[a-z|A-Z|0-9|._-]*")), this));
|
||||
if (style)
|
||||
setStyle(style.data());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user