Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
8af7efa3
Commit
8af7efa3
authored
14 years ago
by
Thomas Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
QmlDesigner.modelMerger: catch another exception
parent
7424f752
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/qmldesigner/designercore/model/modelmerger.cpp
+20
-15
20 additions, 15 deletions
src/plugins/qmldesigner/designercore/model/modelmerger.cpp
with
20 additions
and
15 deletions
src/plugins/qmldesigner/designercore/model/modelmerger.cpp
+
20
−
15
View file @
8af7efa3
...
...
@@ -38,6 +38,7 @@
#include
"bindingproperty.h"
#include
"variantproperty.h"
#include
"rewritertransaction.h"
#include
<rewritingexception.h>
#include
<QSet>
#include
<QStringList>
...
...
@@ -168,26 +169,30 @@ ModelNode ModelMerger::insertModel(const ModelNode &modelNode)
void
ModelMerger
::
replaceModel
(
const
ModelNode
&
modelNode
)
{
RewriterTransaction
transaction
(
view
()
->
beginRewriterTransaction
());
try
{
RewriterTransaction
transaction
(
view
()
->
beginRewriterTransaction
());
foreach
(
const
Import
&
import
,
modelNode
.
model
()
->
imports
())
view
()
->
model
()
->
addImport
(
import
);
view
()
->
model
()
->
setFileUrl
(
modelNode
.
model
()
->
fileUrl
());
foreach
(
const
Import
&
import
,
modelNode
.
model
()
->
imports
())
view
()
->
model
()
->
addImport
(
import
);
view
()
->
model
()
->
setFileUrl
(
modelNode
.
model
()
->
fileUrl
());
ModelNode
rootNode
(
view
()
->
rootModelNode
());
ModelNode
rootNode
(
view
()
->
rootModelNode
());
foreach
(
const
QString
&
propertyName
,
rootNode
.
propertyNames
())
rootNode
.
removeProperty
(
propertyName
);
foreach
(
const
QString
&
propertyName
,
rootNode
.
propertyNames
())
rootNode
.
removeProperty
(
propertyName
);
QHash
<
QString
,
QString
>
idRenamingHash
;
setupIdRenamingHash
(
modelNode
,
idRenamingHash
,
view
());
QHash
<
QString
,
QString
>
idRenamingHash
;
setupIdRenamingHash
(
modelNode
,
idRenamingHash
,
view
());
syncVariantProperties
(
rootNode
,
modelNode
);
syncBindingProperties
(
rootNode
,
modelNode
,
idRenamingHash
);
syncId
(
rootNode
,
modelNode
,
idRenamingHash
);
syncNodeProperties
(
rootNode
,
modelNode
,
idRenamingHash
,
view
());
syncNodeListProperties
(
rootNode
,
modelNode
,
idRenamingHash
,
view
());
m_view
->
changeRootNodeType
(
modelNode
.
type
(),
modelNode
.
majorVersion
(),
modelNode
.
minorVersion
());
syncVariantProperties
(
rootNode
,
modelNode
);
syncBindingProperties
(
rootNode
,
modelNode
,
idRenamingHash
);
syncId
(
rootNode
,
modelNode
,
idRenamingHash
);
syncNodeProperties
(
rootNode
,
modelNode
,
idRenamingHash
,
view
());
syncNodeListProperties
(
rootNode
,
modelNode
,
idRenamingHash
,
view
());
m_view
->
changeRootNodeType
(
modelNode
.
type
(),
modelNode
.
majorVersion
(),
modelNode
.
minorVersion
());
}
catch
(
RewritingException
&
e
)
{
qWarning
()
<<
e
.
description
();
//silent error
}
}
}
//namespace QmlDesigner
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment