Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
34016549
Commit
34016549
authored
Apr 12, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.propertyEditor: fix FileWidget
See: Bauhaus-577
parent
01e364d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/propertyeditor/filewidget.cpp
View file @
34016549
...
...
@@ -114,8 +114,10 @@ void FileWidget::setFileName(const QUrl &fileName)
return
;
m_fileName
=
fileName
;
m_lineEdit
->
setText
(
fileName
.
toString
());
m_comboBox
->
setEditText
(
m_fileName
.
toString
());
if
(
m_lineEdit
->
text
()
!=
fileName
.
toString
())
m_lineEdit
->
setText
(
fileName
.
toString
());
if
(
m_comboBox
->
currentText
()
!=
fileName
.
toString
())
m_comboBox
->
setEditText
(
m_fileName
.
toString
());
emit
fileNameChanged
(
fileName
);
}
...
...
src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
View file @
34016549
...
...
@@ -396,19 +396,22 @@ void PropertyEditor::changeValue(const QString &propertyName)
castedValue
=
QVariant
(
newColor
);
}
try
{
if
(
!
value
->
value
().
isValid
())
{
//reset
fxObjectNode
.
removeVariantProperty
(
propertyName
);
}
else
{
if
(
castedValue
.
isValid
()
&&
!
castedValue
.
isNull
())
m_locked
=
true
;
if
(
!
castedValue
.
isValid
())
return
;
try
{
if
(
!
value
->
value
().
isValid
())
{
//reset
fxObjectNode
.
removeVariantProperty
(
propertyName
);
}
else
{
if
(
castedValue
.
isValid
()
&&
!
castedValue
.
isNull
())
m_locked
=
true
;
fxObjectNode
.
setVariantProperty
(
propertyName
,
castedValue
);
m_locked
=
false
;
}
}
catch
(
RewritingException
&
e
)
{
QMessageBox
::
warning
(
0
,
"Error"
,
e
.
description
());
}
}
catch
(
RewritingException
&
e
)
{
QMessageBox
::
warning
(
0
,
"Error"
,
e
.
description
());
}
}
void
PropertyEditor
::
changeExpression
(
const
QString
&
name
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment