From 9c845a2a52c75af0b3efc8184c909807e7b1cdcb Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@nokia.com> Date: Thu, 7 Jan 2010 19:21:45 +0100 Subject: [PATCH] Fix to allow case where ID is removed from the text file. --- src/plugins/qmldesigner/core/model/modelnode.cpp | 2 +- src/plugins/qmldesigner/core/model/texttomodelmerger.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/core/model/modelnode.cpp b/src/plugins/qmldesigner/core/model/modelnode.cpp index 600977f606d..6fb91ea9b9b 100644 --- a/src/plugins/qmldesigner/core/model/modelnode.cpp +++ b/src/plugins/qmldesigner/core/model/modelnode.cpp @@ -169,7 +169,7 @@ static bool idContainsWrongLetter(const QString& id) bool ModelNode::isValidId(const QString &id) { - return !(id.isEmpty() || idContainsWrongLetter(id)); + return id.isEmpty() || !idContainsWrongLetter(id); } void ModelNode::setId(const QString& id) diff --git a/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp index b1a2fda3373..f3e0d57fbe3 100644 --- a/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp @@ -114,7 +114,7 @@ bool TextToModelMerger::load(const QByteArray &data, DifferenceHandler &differen setActive(false); - throw; + return false; } } -- GitLab