QmlDesigner: Avoid internal warnings

Change-Id: I20c9d77a6758e70b138f9fec30a6845354d20880
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-01-30 15:14:48 +01:00
parent d3efef8679
commit 7c61cc3151

View File

@@ -295,9 +295,11 @@ void TimelineSettingsModel::updateTimeline(int row)
propertyChanges.modelNode().variantProperty("enabled").setValue(false); propertyChanges.modelNode().variantProperty("enabled").setValue(false);
} }
QmlPropertyChanges propertyChanges(modelState.propertyChanges(timeline)); if (timeline.isValid()) { /* If timeline is invalid 'none' was selected */
if (propertyChanges.isValid()) QmlPropertyChanges propertyChanges(modelState.propertyChanges(timeline));
propertyChanges.modelNode().variantProperty("enabled").setValue(true); if (propertyChanges.isValid())
propertyChanges.modelNode().variantProperty("enabled").setValue(true);
}
} }
} catch (Exception &e) { } catch (Exception &e) {
@@ -345,9 +347,11 @@ void TimelineSettingsModel::updateAnimation(int row)
} }
} }
QmlPropertyChanges propertyChanges(modelState.propertyChanges(animation)); if (animation.isValid()) { /* If animation is invalid 'none' was selected */
if (propertyChanges.isValid()) QmlPropertyChanges propertyChanges(modelState.propertyChanges(animation));
propertyChanges.modelNode().variantProperty("running").setValue(true); if (propertyChanges.isValid())
propertyChanges.modelNode().variantProperty("running").setValue(true);
}
} }
} catch (Exception &e) { } catch (Exception &e) {
m_exceptionError = e.description(); m_exceptionError = e.description();