forked from qt-creator/qt-creator
QmlDesigner: Fix qml warning in the states view
Happens when dragging an invalid item on a state. The item is null but the check check for undefined. Better approach is to always use the ! operator. Change-Id: I036e0f2d5231b0b0eb67a8400551c93fa0654ecb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -683,7 +683,7 @@ Rectangle {
|
|||||||
onEntered: function (drag) {
|
onEntered: function (drag) {
|
||||||
let dragSource = (drag.source as StateThumbnail)
|
let dragSource = (drag.source as StateThumbnail)
|
||||||
|
|
||||||
if (dragSource === undefined)
|
if (!dragSource)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (dragSource.extendString !== stateThumbnail.extendString
|
if (dragSource.extendString !== stateThumbnail.extendString
|
||||||
@@ -698,7 +698,7 @@ Rectangle {
|
|||||||
onDropped: function (drop) {
|
onDropped: function (drop) {
|
||||||
let dropSource = (drop.source as StateThumbnail)
|
let dropSource = (drop.source as StateThumbnail)
|
||||||
|
|
||||||
if (dropSource === undefined)
|
if (!dropSource)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (dropSource.extendString !== stateThumbnail.extendString
|
if (dropSource.extendString !== stateThumbnail.extendString
|
||||||
|
Reference in New Issue
Block a user