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
Marco Bubke
flatpak-qt-creator
Commits
45415783
Commit
45415783
authored
Jun 10, 2010
by
Christian Kamm
Browse files
QmlJS: Get rid of xml file describing qml builtin types.
The type information is now generated at runtime.
parent
e4871393
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qml-type-descriptions/qml-builtin-types.xml
deleted
100644 → 0
View file @
e4871393
This diff is collapsed.
Click to expand it.
src/libs/qmljs/qmljsinterpreter.cpp
View file @
45415783
...
...
@@ -1939,7 +1939,7 @@ const Value *Function::invoke(const Activation *activation) const
// typing environment
////////////////////////////////////////////////////////////////////////////////
QList
<
const
FakeMetaObject
*>
CppQmlTypesLoader
::
objectsFromXml
;
QList
<
const
FakeMetaObject
*>
CppQmlTypesLoader
::
builtinObjects
;
QStringList
CppQmlTypesLoader
::
load
(
const
QFileInfoList
&
xmlFiles
)
{
...
...
@@ -1968,7 +1968,7 @@ QStringList CppQmlTypesLoader::load(const QFileInfoList &xmlFiles)
QMapIterator
<
QString
,
FakeMetaObject
*>
it
(
newObjects
);
while
(
it
.
hasNext
())
{
it
.
next
();
objectsFromXml
.
append
(
it
.
value
());
builtinObjects
.
append
(
it
.
value
());
}
}
...
...
@@ -2359,7 +2359,7 @@ Engine::Engine()
{
initializePrototypes
();
_cppQmlTypes
.
load
(
this
,
CppQmlTypesLoader
::
objectsFromXml
);
_cppQmlTypes
.
load
(
this
,
CppQmlTypesLoader
::
builtinObjects
);
}
Engine
::~
Engine
()
...
...
src/libs/qmljs/qmljsinterpreter.h
View file @
45415783
...
...
@@ -517,7 +517,7 @@ class QMLJS_EXPORT CppQmlTypesLoader
public:
/** \return an empty list when successful, error messages otherwise. */
static
QStringList
load
(
const
QFileInfoList
&
xmlFiles
);
static
QList
<
const
FakeMetaObject
*>
objectsFromXml
;
static
QList
<
const
FakeMetaObject
*>
builtinObjects
;
// parses the xml string and fills the newObjects map
static
QString
parseQmlTypeXml
(
const
QByteArray
&
xml
,
QMap
<
QString
,
FakeMetaObject
*>
*
newObjects
);
...
...
src/plugins/qmljseditor/qmljsmodelmanager.cpp
View file @
45415783
...
...
@@ -89,6 +89,9 @@ void ModelManager::loadQmlTypeDescriptions()
const
QStringList
errors
=
Interpreter
::
CppQmlTypesLoader
::
load
(
xmlFiles
);
foreach
(
const
QString
&
error
,
errors
)
qWarning
()
<<
qPrintable
(
error
);
// loads the builtin types
loadQmlPluginTypes
(
QString
());
}
Snapshot
ModelManager
::
snapshot
()
const
...
...
@@ -493,7 +496,11 @@ void ModelManager::qmlPluginTypeDumpDone(int exitCode)
QMutexLocker
locker
(
&
m_mutex
);
LibraryInfo
libraryInfo
=
_snapshot
.
libraryInfo
(
libraryPath
);
libraryInfo
.
setMetaObjects
(
objectsList
);
_snapshot
.
insertLibraryInfo
(
libraryPath
,
libraryInfo
);
if
(
!
libraryPath
.
isEmpty
())
{
LibraryInfo
libraryInfo
=
_snapshot
.
libraryInfo
(
libraryPath
);
libraryInfo
.
setMetaObjects
(
objectsList
);
_snapshot
.
insertLibraryInfo
(
libraryPath
,
libraryInfo
);
}
else
{
Interpreter
::
CppQmlTypesLoader
::
builtinObjects
.
append
(
objectsList
);
}
}
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