forked from qt-creator/qt-creator
QmlDesigner: Fix QtDS crash in Property Editor
* Remove dot handling in ExpressionTextField as it was triggering a crash of QtDS * Secure ExpressionTextField with validator to avoid false input Task-number: QDS-15509 Pick-to: qds/4.7 Change-Id: I3fd9632e8d202a633d6f405ce5523d15088ecb6f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
0d84e720ed
commit
ee83670597
@@ -58,6 +58,9 @@ Section {
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
fixedSize: true
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /^[\d\w]*$/
|
||||
}
|
||||
|
||||
property bool blockEditingFinished: false
|
||||
|
||||
|
@@ -15,8 +15,6 @@ StudioControls.TextField {
|
||||
|
||||
property bool completeOnlyTypes: false
|
||||
property bool completionActive: listView.model !== null
|
||||
property bool dotCompletion: false
|
||||
property int dotCursorPos: 0
|
||||
property string prefix
|
||||
property bool fixedSize: false
|
||||
property bool replaceCurrentTextByCompletion: false
|
||||
@@ -146,14 +144,6 @@ StudioControls.TextField {
|
||||
|
||||
switch (event.key) {
|
||||
|
||||
case Qt.Key_Period:
|
||||
textField.dotCursorPos = textField.cursorPosition + 1
|
||||
text = textField.text + "."
|
||||
pos = textField.dotCursorPos
|
||||
explicitComplete = false
|
||||
textField.dotCompletion = true
|
||||
break
|
||||
|
||||
case Qt.Key_Right:
|
||||
if (!textField.completionActive)
|
||||
return
|
||||
@@ -209,7 +199,6 @@ StudioControls.TextField {
|
||||
// list.pop()
|
||||
|
||||
// listView.model = list
|
||||
// textField.dotCompletion = false
|
||||
|
||||
// event.accepted = true
|
||||
// } else {
|
||||
|
Reference in New Issue
Block a user