Fix qml warnings in ToolboxAuthorPage

This commit is contained in:
Kostas Karmas 2020-07-27 10:40:53 +02:00
parent 47f02a8d28
commit 2c6cbc7be4

View file

@ -33,7 +33,7 @@ Item
width: UM.Theme.getSize("toolbox_thumbnail_medium").width width: UM.Theme.getSize("toolbox_thumbnail_medium").width
height: UM.Theme.getSize("toolbox_thumbnail_medium").height height: UM.Theme.getSize("toolbox_thumbnail_medium").height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: details.icon_url || "../../images/placeholder.svg" source: details && details.icon_url ? details.icon_url : "../../images/placeholder.svg"
mipmap: true mipmap: true
anchors anchors
{ {
@ -56,7 +56,7 @@ Item
rightMargin: UM.Theme.getSize("wide_margin").width rightMargin: UM.Theme.getSize("wide_margin").width
bottomMargin: UM.Theme.getSize("default_margin").height bottomMargin: UM.Theme.getSize("default_margin").height
} }
text: details.name || "" text: details && details.name ? details.name : ""
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
width: parent.width width: parent.width
@ -66,7 +66,7 @@ Item
Label Label
{ {
id: description id: description
text: details.description || "" text: details && details.description ? details.description : ""
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
anchors anchors
{ {
@ -121,7 +121,7 @@ Item
{ {
text: text:
{ {
if (details.website) if (details && details.website)
{ {
return "<a href=\"" + details.website + "\">" + details.website + "</a>" return "<a href=\"" + details.website + "\">" + details.website + "</a>"
} }
@ -140,7 +140,7 @@ Item
{ {
text: text:
{ {
if (details.email) if (details && details.email)
{ {
return "<a href=\"mailto:" + details.email + "\">" + details.email + "</a>" return "<a href=\"mailto:" + details.email + "\">" + details.email + "</a>"
} }