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
8f0cdd41
Commit
8f0cdd41
authored
Feb 01, 2011
by
Marco Bubke
Browse files
QmlDesigner.MetaInfo: Don't put unkown objects in the superclass stack
parent
26137151
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
View file @
8f0cdd41
...
...
@@ -128,6 +128,37 @@ private:
QList
<
PropertyInfo
>
m_properties
;
};
class
HasValueProcessor
:
public
Interpreter
::
MemberProcessor
{
public:
HasValueProcessor
(
const
Interpreter
::
Value
*
compareValue
)
:
MemberProcessor
(),
m_compareValue
(
compareValue
),
m_isInMembers
(
false
)
{}
virtual
bool
processProperty
(
const
QString
&
/*name*/
,
const
Interpreter
::
Value
*
value
)
{
if
(
value
==
m_compareValue
)
{
m_isInMembers
=
true
;
return
false
;
}
return
true
;
}
bool
hasValue
()
const
{
return
m_isInMembers
;
}
private:
const
Interpreter
::
Value
*
m_compareValue
;
bool
m_isInMembers
;
};
static
inline
bool
isValueType
(
const
QString
&
type
)
{
QStringList
objectValuesList
;
...
...
@@ -792,9 +823,12 @@ void NodeMetaInfoPrivate::setupPrototypes()
description
.
majorVersion
=
qmlValue
->
version
().
majorVersion
();
if
(
!
qmlValue
->
packageName
().
isEmpty
())
description
.
className
=
qmlValue
->
packageName
()
+
"/"
+
description
.
className
;
}
HasValueProcessor
hasValueProcessor
(
ov
);
lookupContext
()
->
context
()
->
typeEnvironment
(
document
())
->
processMembers
(
&
hasValueProcessor
);
if
(
hasValueProcessor
.
hasValue
())
m_prototypes
.
append
(
description
);
}
}
}
...
...
Write
Preview
Markdown
is supported
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