QmlDesigner: Fix build

Fixes an error and a warning, and removes a local inconsistency
regarding "void static" vs "static void".

Change-Id: I1685823162290cb7d5f2df9cef6e32928fbf0a32
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Christian Kandeler
2018-03-08 16:15:02 +01:00
committed by Thomas Hartmann
parent a11d49efee
commit c0f98299df

View File

@@ -472,7 +472,7 @@ QString RewriterView::auxiliaryDataAsQML() const
for (auto i = data.begin(); i != data.end(); ++i) { for (auto i = data.begin(); i != data.end(); ++i) {
const QVariant value = i.value(); const QVariant value = i.value();
QString strValue = value.toString(); QString strValue = value.toString();
if (value.type() == QMetaType::QString) if (static_cast<QMetaType::Type>(value.type()) == QMetaType::QString)
strValue = "\"" + strValue + "\""; strValue = "\"" + strValue + "\"";
if (!strValue.isEmpty()) { if (!strValue.isEmpty()) {
@@ -933,14 +933,14 @@ void RewriterView::writeAuxiliaryData()
} }
} }
void checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view); static void checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view);
void static checkChildNodes(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view) static void checkChildNodes(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view)
{ {
for (auto child : node->children()) for (auto child : node->children())
checkNode(child, view); checkNode(child, view);
} }
void static checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view) static void checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view)
{ {
if (!node) if (!node)
return; return;