Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
de0beff4
Commit
de0beff4
authored
Jan 28, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.propertyEditor: avoiding warnings
I added more checks for undefined - there should be no warnings left
parent
95a39159
Changes
5
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qmldesigner/propertyeditor/Qt/CheckBox.qml
View file @
de0beff4
...
...
@@ -7,10 +7,10 @@ QCheckBox { //This is a special CheckBox that does color coding for states
property
var
baseStateFlag
;
checkable
:
true
;
checked
:
backendValue
===
undefined
?
false
:
backendValue
.
value
;
onToggled
:
{
backendValue
.
value
=
checked
;
}
checked
:
(
backendValue
===
undefined
||
backendValue
===
null
)
?
false
:
backendValue
.
value
;
onToggled
:
{
backendValue
.
value
=
checked
;
}
onBaseStateFlagChanged
:
{
evaluate
();
...
...
share/qtcreator/qmldesigner/propertyeditor/Qt/DoubleSpinBox.qml
View file @
de0beff4
...
...
@@ -10,7 +10,7 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
property
alias
minimum
:
box
.
minimum
property
alias
maximum
:
box
.
maximum
property
alias
text
:
label
.
text
property
bool
enabled
property
bool
enabled
:
true
minimumHeight
:
22
;
...
...
@@ -57,6 +57,7 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
font.bold
:
true
;
alignment
:
"
Qt::AlignRight | Qt::AlignVCenter
"
maximumWidth
:
80
visible
:
DoubleSpinBox
.
text
!=
""
;
}
QDoubleSpinBox
{
...
...
@@ -65,11 +66,11 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
keyboardTracking
:
false
;
enabled
:
(
DoubleSpinBox
.
backendValue
===
undefined
||
DoubleSpinBox
.
backendValue
===
null
)
?
fals
e
:
!
backendValue
.
isBound
&&
DoubleSpinBox
.
enabled
;
?
tru
e
:
!
backendValue
.
isBound
&&
DoubleSpinBox
.
enabled
;
property
bool
readingFromBackend
:
false
;
property
real
valueFromBackend
:
(
DoubleSpinBox
.
backendValue
===
undefined
||
DoubleSpinBox
.
backendValue
===
null
)
DoubleSpinBox
.
backendValue
===
null
||
DoubleSpinBox
.
backendValue
.
value
===
undefined
)
?
.
0
:
DoubleSpinBox
.
backendValue
.
value
;
onValueFromBackendChanged
:
{
...
...
@@ -86,9 +87,7 @@ QWidget { //This is a special DoubleSpinBox that does color coding for states
onMouseOverChanged
:
{
}
}
}
ExtendedFunctionButton
{
...
...
share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml
View file @
de0beff4
...
...
@@ -30,22 +30,18 @@ layout: VerticalLayout{
"
DropShadow
"
]
}
onCurrentTextChanged
:
{
print
(
"
currentTextChanged before dirty
"
);
onCurrentTextChanged
:
{
if
(
dirty
)
//avoid recursion;
return
;
print
(
"
currentTextChanged
"
);
if
(
backendValues
.
effect
.
complexNode
.
exists
)
backendValues
.
effect
.
complexNode
.
remove
();
if
(
currentText
==
"
None
"
)
{
print
(
"
none
"
);
;
}
else
if
(
backendValues
.
effect
.
complexNode
!=
null
)
{
print
(
"
add
"
);
backendValues
.
effect
.
complexNode
.
add
(
"
Qt/
"
+
currentText
);
}
}
...
...
share/qtcreator/qmldesigner/propertyeditor/Qt/LineEdit.qml
View file @
de0beff4
...
...
@@ -18,7 +18,6 @@ QWidget {
text
:
backendValue
.
value
onTextEdited
:
{
print
(
"
text edited
"
)
backendValue
.
value
=
text
}
...
...
share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml
View file @
de0beff4
...
...
@@ -47,7 +47,8 @@ QWidget { //This is a special SpinBox that does color coding for states
id
:
box
;
enabled
:
backendValue
===
undefined
||
backendValue
.
isBound
===
undefined
||
backendValue
.
isBound
===
null
?
false
:
!
backendValue
.
isBound
property
bool
readingFromBackend
:
false
;
property
int
valueFromBackend
:
SpinBox
.
backendValue
==
null
?
.
0
:
SpinBox
.
backendValue
.
value
;
property
int
valueFromBackend
:
(
SpinBox
.
backendValue
===
undefined
||
SpinBox
.
backendValue
==
null
)
?
.
0
:
SpinBox
.
backendValue
.
value
;
onValueFromBackendChanged
:
{
readingFromBackend
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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